calc-math.el (math-largest-emacs-expt): Handle the cases when expt
[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") || {
f657c21b
GM
415 echo Please tell bug-autoconf@gnu.org about your system,
416 echo including any error possibly output before this message.
417 echo This can help us improve future autoconf versions.
418 echo Configuration will now proceed without shell functions.
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
9d89ffd0
JD
695XFT_CFLAGS
696XFT_LIBS
d6e01aa5
KL
697ALLOCA
698liblockfile
699LIBOBJS
700NEED_SETGID
701KMEM_GROUP
702GETLOADAVG_LIBS
703GETOPT_H
704GETOPTOBJS
705version
706configuration
707canonical
708srcdir
709lispdir
710locallisppath
711lisppath
712x_default_search_path
713etcdir
714archlibdir
715bitmapdir
716gamedir
717gameuser
718c_switch_system
719c_switch_machine
720LD_SWITCH_X_SITE
721LD_SWITCH_X_SITE_AUX
722C_SWITCH_X_SITE
723X_TOOLKIT_TYPE
724machfile
725opsysfile
726carbon_appdir
727LTLIBOBJS'
6bae0ccf 728ac_subst_files=''
d6e01aa5
KL
729 ac_precious_vars='build_alias
730host_alias
731target_alias
732CC
733CFLAGS
734LDFLAGS
735LIBS
736CPPFLAGS
737CPP
738XMKMF'
739
c0d27fcc 740
ba4481b5 741# Initialize some variables set by options.
503d2be0
AS
742ac_init_help=
743ac_init_version=false
ba4481b5
DL
744# The variables have the same names as the options, with
745# dashes changed to underlines.
503d2be0 746cache_file=/dev/null
ba4481b5 747exec_prefix=NONE
ba4481b5 748no_create=
ba4481b5
DL
749no_recursion=
750prefix=NONE
751program_prefix=NONE
752program_suffix=NONE
753program_transform_name=s,x,x,
754silent=
755site=
756srcdir=
ba4481b5
DL
757verbose=
758x_includes=NONE
759x_libraries=NONE
503d2be0
AS
760
761# Installation directory options.
762# These are left unexpanded so users can "make install exec_prefix=/foo"
763# and all the variables that are supposed to be based on exec_prefix
764# by default will actually change.
765# Use braces instead of parens because sh, perl, etc. also accept them.
d6e01aa5 766# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
767bindir='${exec_prefix}/bin'
768sbindir='${exec_prefix}/sbin'
769libexecdir='${exec_prefix}/libexec'
d6e01aa5
KL
770datarootdir='${prefix}/share'
771datadir='${datarootdir}'
ba4481b5
DL
772sysconfdir='${prefix}/etc'
773sharedstatedir='${prefix}/com'
774localstatedir='${prefix}/var'
ba4481b5
DL
775includedir='${prefix}/include'
776oldincludedir='/usr/include'
d6e01aa5
KL
777docdir='${datarootdir}/doc/${PACKAGE}'
778infodir='${datarootdir}/info'
779htmldir='${docdir}'
780dvidir='${docdir}'
781pdfdir='${docdir}'
782psdir='${docdir}'
783libdir='${exec_prefix}/lib'
784localedir='${datarootdir}/locale'
785mandir='${datarootdir}/man'
ba4481b5 786
ba4481b5 787ac_prev=
d6e01aa5 788ac_dashdash=
ba4481b5
DL
789for ac_option
790do
ba4481b5
DL
791 # If the previous option needs an argument, assign it.
792 if test -n "$ac_prev"; then
d6e01aa5 793 eval $ac_prev=\$ac_option
ba4481b5
DL
794 ac_prev=
795 continue
796 fi
797
d6e01aa5
KL
798 case $ac_option in
799 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
800 *) ac_optarg=yes ;;
801 esac
ba4481b5
DL
802
803 # Accept the important Cygnus configure options, so we can diagnose typos.
804
d6e01aa5
KL
805 case $ac_dashdash$ac_option in
806 --)
807 ac_dashdash=yes ;;
ba4481b5
DL
808
809 -bindir | --bindir | --bindi | --bind | --bin | --bi)
810 ac_prev=bindir ;;
811 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 812 bindir=$ac_optarg ;;
ba4481b5
DL
813
814 -build | --build | --buil | --bui | --bu)
503d2be0 815 ac_prev=build_alias ;;
ba4481b5 816 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 817 build_alias=$ac_optarg ;;
ba4481b5
DL
818
819 -cache-file | --cache-file | --cache-fil | --cache-fi \
820 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
821 ac_prev=cache_file ;;
822 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
823 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
824 cache_file=$ac_optarg ;;
825
826 --config-cache | -C)
827 cache_file=config.cache ;;
ba4481b5 828
d6e01aa5 829 -datadir | --datadir | --datadi | --datad)
ba4481b5 830 ac_prev=datadir ;;
d6e01aa5 831 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 832 datadir=$ac_optarg ;;
ba4481b5 833
d6e01aa5
KL
834 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
835 | --dataroo | --dataro | --datar)
836 ac_prev=datarootdir ;;
837 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
838 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
839 datarootdir=$ac_optarg ;;
840
ba4481b5 841 -disable-* | --disable-*)
503d2be0 842 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 843 # Reject names that are not valid shell variable names.
d6e01aa5 844 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
845 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
846 { (exit 1); exit 1; }; }
d6e01aa5
KL
847 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
848 eval enable_$ac_feature=no ;;
849
850 -docdir | --docdir | --docdi | --doc | --do)
851 ac_prev=docdir ;;
852 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
853 docdir=$ac_optarg ;;
854
855 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
856 ac_prev=dvidir ;;
857 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
858 dvidir=$ac_optarg ;;
ba4481b5
DL
859
860 -enable-* | --enable-*)
503d2be0 861 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 862 # Reject names that are not valid shell variable names.
d6e01aa5 863 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
864 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
865 { (exit 1); exit 1; }; }
d6e01aa5
KL
866 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
867 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
868
869 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
870 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
871 | --exec | --exe | --ex)
872 ac_prev=exec_prefix ;;
873 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
874 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
875 | --exec=* | --exe=* | --ex=*)
503d2be0 876 exec_prefix=$ac_optarg ;;
ba4481b5
DL
877
878 -gas | --gas | --ga | --g)
879 # Obsolete; use --with-gas.
880 with_gas=yes ;;
881
503d2be0
AS
882 -help | --help | --hel | --he | -h)
883 ac_init_help=long ;;
884 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
885 ac_init_help=recursive ;;
886 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
887 ac_init_help=short ;;
ba4481b5
DL
888
889 -host | --host | --hos | --ho)
503d2be0 890 ac_prev=host_alias ;;
ba4481b5 891 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 892 host_alias=$ac_optarg ;;
ba4481b5 893
d6e01aa5
KL
894 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
895 ac_prev=htmldir ;;
896 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
897 | --ht=*)
898 htmldir=$ac_optarg ;;
899
ba4481b5
DL
900 -includedir | --includedir | --includedi | --included | --include \
901 | --includ | --inclu | --incl | --inc)
902 ac_prev=includedir ;;
903 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
904 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 905 includedir=$ac_optarg ;;
ba4481b5
DL
906
907 -infodir | --infodir | --infodi | --infod | --info | --inf)
908 ac_prev=infodir ;;
909 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 910 infodir=$ac_optarg ;;
ba4481b5
DL
911
912 -libdir | --libdir | --libdi | --libd)
913 ac_prev=libdir ;;
914 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 915 libdir=$ac_optarg ;;
ba4481b5
DL
916
917 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
918 | --libexe | --libex | --libe)
919 ac_prev=libexecdir ;;
920 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
921 | --libexe=* | --libex=* | --libe=*)
503d2be0 922 libexecdir=$ac_optarg ;;
ba4481b5 923
d6e01aa5
KL
924 -localedir | --localedir | --localedi | --localed | --locale)
925 ac_prev=localedir ;;
926 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
927 localedir=$ac_optarg ;;
928
ba4481b5 929 -localstatedir | --localstatedir | --localstatedi | --localstated \
d6e01aa5 930 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
931 ac_prev=localstatedir ;;
932 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
d6e01aa5 933 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 934 localstatedir=$ac_optarg ;;
ba4481b5
DL
935
936 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
937 ac_prev=mandir ;;
938 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 939 mandir=$ac_optarg ;;
ba4481b5
DL
940
941 -nfp | --nfp | --nf)
942 # Obsolete; use --without-fp.
943 with_fp=no ;;
944
945 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 946 | --no-cr | --no-c | -n)
ba4481b5
DL
947 no_create=yes ;;
948
949 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
950 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
951 no_recursion=yes ;;
952
953 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
954 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
955 | --oldin | --oldi | --old | --ol | --o)
956 ac_prev=oldincludedir ;;
957 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
958 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
959 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 960 oldincludedir=$ac_optarg ;;
ba4481b5
DL
961
962 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
963 ac_prev=prefix ;;
964 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 965 prefix=$ac_optarg ;;
ba4481b5
DL
966
967 -program-prefix | --program-prefix | --program-prefi | --program-pref \
968 | --program-pre | --program-pr | --program-p)
969 ac_prev=program_prefix ;;
970 -program-prefix=* | --program-prefix=* | --program-prefi=* \
971 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 972 program_prefix=$ac_optarg ;;
ba4481b5
DL
973
974 -program-suffix | --program-suffix | --program-suffi | --program-suff \
975 | --program-suf | --program-su | --program-s)
976 ac_prev=program_suffix ;;
977 -program-suffix=* | --program-suffix=* | --program-suffi=* \
978 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 979 program_suffix=$ac_optarg ;;
ba4481b5
DL
980
981 -program-transform-name | --program-transform-name \
982 | --program-transform-nam | --program-transform-na \
983 | --program-transform-n | --program-transform- \
984 | --program-transform | --program-transfor \
985 | --program-transfo | --program-transf \
986 | --program-trans | --program-tran \
987 | --progr-tra | --program-tr | --program-t)
988 ac_prev=program_transform_name ;;
989 -program-transform-name=* | --program-transform-name=* \
990 | --program-transform-nam=* | --program-transform-na=* \
991 | --program-transform-n=* | --program-transform-=* \
992 | --program-transform=* | --program-transfor=* \
993 | --program-transfo=* | --program-transf=* \
994 | --program-trans=* | --program-tran=* \
995 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 996 program_transform_name=$ac_optarg ;;
ba4481b5 997
d6e01aa5
KL
998 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
999 ac_prev=pdfdir ;;
1000 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1001 pdfdir=$ac_optarg ;;
1002
1003 -psdir | --psdir | --psdi | --psd | --ps)
1004 ac_prev=psdir ;;
1005 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1006 psdir=$ac_optarg ;;
1007
ba4481b5
DL
1008 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1009 | -silent | --silent | --silen | --sile | --sil)
1010 silent=yes ;;
1011
1012 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1013 ac_prev=sbindir ;;
1014 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1015 | --sbi=* | --sb=*)
503d2be0 1016 sbindir=$ac_optarg ;;
ba4481b5
DL
1017
1018 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1019 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1020 | --sharedst | --shareds | --shared | --share | --shar \
1021 | --sha | --sh)
1022 ac_prev=sharedstatedir ;;
1023 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1024 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1025 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1026 | --sha=* | --sh=*)
503d2be0 1027 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1028
1029 -site | --site | --sit)
1030 ac_prev=site ;;
1031 -site=* | --site=* | --sit=*)
503d2be0 1032 site=$ac_optarg ;;
ba4481b5
DL
1033
1034 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1035 ac_prev=srcdir ;;
1036 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1037 srcdir=$ac_optarg ;;
ba4481b5
DL
1038
1039 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1040 | --syscon | --sysco | --sysc | --sys | --sy)
1041 ac_prev=sysconfdir ;;
1042 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1043 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1044 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1045
1046 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1047 ac_prev=target_alias ;;
ba4481b5 1048 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1049 target_alias=$ac_optarg ;;
ba4481b5
DL
1050
1051 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1052 verbose=yes ;;
1053
503d2be0
AS
1054 -version | --version | --versio | --versi | --vers | -V)
1055 ac_init_version=: ;;
ba4481b5
DL
1056
1057 -with-* | --with-*)
503d2be0 1058 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1059 # Reject names that are not valid shell variable names.
d6e01aa5 1060 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1061 { echo "$as_me: error: invalid package name: $ac_package" >&2
1062 { (exit 1); exit 1; }; }
d6e01aa5
KL
1063 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1064 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1065
1066 -without-* | --without-*)
503d2be0 1067 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1068 # Reject names that are not valid shell variable names.
d6e01aa5 1069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
d6e01aa5
KL
1072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=no ;;
ba4481b5
DL
1074
1075 --x)
1076 # Obsolete; use --with-x.
1077 with_x=yes ;;
1078
1079 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1080 | --x-incl | --x-inc | --x-in | --x-i)
1081 ac_prev=x_includes ;;
1082 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1083 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1084 x_includes=$ac_optarg ;;
ba4481b5
DL
1085
1086 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1087 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1088 ac_prev=x_libraries ;;
1089 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1090 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1091 x_libraries=$ac_optarg ;;
ba4481b5 1092
503d2be0
AS
1093 -*) { echo "$as_me: error: unrecognized option: $ac_option
1094Try \`$0 --help' for more information." >&2
1095 { (exit 1); exit 1; }; }
ba4481b5
DL
1096 ;;
1097
503d2be0
AS
1098 *=*)
1099 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1100 # Reject names that are not valid shell variable names.
1101 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1102 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1103 { (exit 1); exit 1; }; }
d6e01aa5 1104 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1105 export $ac_envvar ;;
1106
ba4481b5 1107 *)
503d2be0
AS
1108 # FIXME: should be removed in autoconf 3.0.
1109 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1110 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1111 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1112 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1113 ;;
1114
1115 esac
1116done
1117
1118if test -n "$ac_prev"; then
503d2be0
AS
1119 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1120 { echo "$as_me: error: missing argument to $ac_option" >&2
1121 { (exit 1); exit 1; }; }
ba4481b5 1122fi
ba4481b5 1123
d6e01aa5
KL
1124# Be sure to have absolute directory names.
1125for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1126 datadir sysconfdir sharedstatedir localstatedir includedir \
1127 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1128 libdir localedir mandir
ba4481b5 1129do
d6e01aa5 1130 eval ac_val=\$$ac_var
503d2be0 1131 case $ac_val in
d6e01aa5
KL
1132 [\\/$]* | ?:[\\/]* ) continue;;
1133 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1134 esac
d6e01aa5
KL
1135 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1136 { (exit 1); exit 1; }; }
ba4481b5
DL
1137done
1138
503d2be0
AS
1139# There might be people who depend on the old broken behavior: `$host'
1140# used to hold the argument of --host etc.
c0d27fcc 1141# FIXME: To remove some day.
503d2be0
AS
1142build=$build_alias
1143host=$host_alias
1144target=$target_alias
1145
c0d27fcc 1146# FIXME: To remove some day.
503d2be0
AS
1147if test "x$host_alias" != x; then
1148 if test "x$build_alias" = x; then
1149 cross_compiling=maybe
1150 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1151 If a cross compiler is detected then cross compile mode will be used." >&2
1152 elif test "x$build_alias" != "x$host_alias"; then
1153 cross_compiling=yes
1154 fi
1155fi
ba4481b5 1156
503d2be0
AS
1157ac_tool_prefix=
1158test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1159
503d2be0 1160test "$silent" = yes && exec 6>/dev/null
ba4481b5 1161
c0d27fcc 1162
d6e01aa5
KL
1163ac_pwd=`pwd` && test -n "$ac_pwd" &&
1164ac_ls_di=`ls -di .` &&
1165ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1166 { echo "$as_me: error: Working directory cannot be determined" >&2
1167 { (exit 1); exit 1; }; }
1168test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1169 { echo "$as_me: error: pwd does not report name of working directory" >&2
1170 { (exit 1); exit 1; }; }
1171
1172
1173# Find the source files, if location was not specified.
1174if test -z "$srcdir"; then
1175 ac_srcdir_defaulted=yes
1176 # Try the directory containing this script, then the parent directory.
1177 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1178$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1179 X"$0" : 'X\(//\)[^/]' \| \
1180 X"$0" : 'X\(//\)$' \| \
d6e01aa5 1181 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1182echo X"$0" |
d6e01aa5
KL
1183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1184 s//\1/
1185 q
1186 }
1187 /^X\(\/\/\)[^/].*/{
1188 s//\1/
1189 q
1190 }
1191 /^X\(\/\/\)$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\).*/{
1196 s//\1/
1197 q
1198 }
1199 s/.*/./; q'`
ba4481b5 1200 srcdir=$ac_confdir
d6e01aa5 1201 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1202 srcdir=..
1203 fi
1204else
1205 ac_srcdir_defaulted=no
1206fi
d6e01aa5
KL
1207if test ! -r "$srcdir/$ac_unique_file"; then
1208 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1209 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1210 { (exit 1); exit 1; }; }
ba4481b5 1211fi
d6e01aa5
KL
1212ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1213ac_abs_confdir=`(
1214 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1215 { (exit 1); exit 1; }; }
d6e01aa5
KL
1216 pwd)`
1217# When building in place, set srcdir=.
1218if test "$ac_abs_confdir" = "$ac_pwd"; then
1219 srcdir=.
1220fi
1221# Remove unnecessary trailing slashes from srcdir.
1222# Double slashes in file names in object file debugging info
1223# mess up M-x gdb in Emacs.
1224case $srcdir in
1225*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1226esac
1227for ac_var in $ac_precious_vars; do
1228 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1229 eval ac_env_${ac_var}_value=\$${ac_var}
1230 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1231 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1232done
503d2be0
AS
1233
1234#
1235# Report the --help message.
1236#
1237if test "$ac_init_help" = "long"; then
1238 # Omit some internal or obsolete options to make the list less imposing.
1239 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1240 cat <<_ACEOF
503d2be0
AS
1241\`configure' configures this package to adapt to many kinds of systems.
1242
1243Usage: $0 [OPTION]... [VAR=VALUE]...
1244
1245To assign environment variables (e.g., CC, CFLAGS...), specify them as
1246VAR=VALUE. See below for descriptions of some of the useful variables.
1247
1248Defaults for the options are specified in brackets.
1249
1250Configuration:
1251 -h, --help display this help and exit
1252 --help=short display options specific to this package
1253 --help=recursive display the short help of all the included packages
1254 -V, --version display version information and exit
1255 -q, --quiet, --silent do not print \`checking...' messages
1256 --cache-file=FILE cache test results in FILE [disabled]
1257 -C, --config-cache alias for \`--cache-file=config.cache'
1258 -n, --no-create do not create output files
1259 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1260
503d2be0
AS
1261Installation directories:
1262 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1263 [$ac_default_prefix]
503d2be0 1264 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1265 [PREFIX]
503d2be0
AS
1266
1267By default, \`make install' will install all the files in
1268\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1269an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1270for instance \`--prefix=\$HOME'.
1271
1272For better control, use the options below.
1273
1274Fine tuning of the installation directories:
1275 --bindir=DIR user executables [EPREFIX/bin]
1276 --sbindir=DIR system admin executables [EPREFIX/sbin]
1277 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1278 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1279 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1280 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1281 --libdir=DIR object code libraries [EPREFIX/lib]
1282 --includedir=DIR C header files [PREFIX/include]
1283 --oldincludedir=DIR C header files for non-gcc [/usr/include]
d6e01aa5
KL
1284 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1285 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1286 --infodir=DIR info documentation [DATAROOTDIR/info]
1287 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1288 --mandir=DIR man documentation [DATAROOTDIR/man]
1289 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1290 --htmldir=DIR html documentation [DOCDIR]
1291 --dvidir=DIR dvi documentation [DOCDIR]
1292 --pdfdir=DIR pdf documentation [DOCDIR]
1293 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1294_ACEOF
503d2be0 1295
c0d27fcc 1296 cat <<\_ACEOF
503d2be0 1297
ba5da88a
PJ
1298Program names:
1299 --program-prefix=PREFIX prepend PREFIX to installed program names
1300 --program-suffix=SUFFIX append SUFFIX to installed program names
1301 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1302
503d2be0
AS
1303X features:
1304 --x-includes=DIR X include files are in DIR
1305 --x-libraries=DIR X library files are in DIR
1306
1307System types:
1308 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1309 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1310_ACEOF
503d2be0
AS
1311fi
1312
1313if test -n "$ac_init_help"; then
1314
c0d27fcc 1315 cat <<\_ACEOF
503d2be0
AS
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1320 --enable-carbon-app[=DIR]
6a3a24fa 1321 specify install directory for Emacs.app on Mac OS X
709e90de 1322 [DIR=/Application]
d0098f13 1323 --enable-asserts compile code with asserts enabled
709e90de
AS
1324 --enable-maintainer-mode
1325 enable make rules and dependencies not useful (and
1326 sometimes confusing) to the casual installer
9adfabc2
LK
1327 --enable-locallisppath=PATH
1328 directories Emacs should search for lisp files
1329 specific to this site
503d2be0
AS
1330 --disable-largefile omit support for large files
1331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1335 --without-gcc don't use GCC to compile Emacs if GCC is found
1336 --without-pop don't support POP mail retrieval with movemail
1337 --with-kerberos support Kerberos-authenticated POP
1338 --with-kerberos5 support Kerberos version 5 authenticated POP
1339 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1340 --without-sound don't compile with sound support
49adb60f
TTN
1341 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1342 motif, gtk, no)
503d2be0
AS
1343 --with-xpm use -lXpm for displaying XPM images
1344 --with-jpeg use -ljpeg for displaying JPEG images
1345 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1346 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1347 --with-png use -lpng for displaying PNG images
79011b82 1348 --with-gpm use -lgpm for mouse support on a GNU/Linux console
0cfc0546 1349 --with-rsvg use -lrsvg-2 for displaying SVG images
488dd4c4 1350 --with-gtk use GTK (same as --with-x-toolkit=gtk)
49adb60f 1351 --with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
503d2be0 1352 --without-toolkit-scroll-bars
cc227489 1353 don't use Motif or Xaw3d scroll bars
c982cf7d 1354 --without-xaw3d don't use Xaw3d
cc227489 1355 --without-xim don't use X11 XIM
e0f712ba 1356 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1357 --with-x use the X Window System
1358
1359Some influential environment variables:
1360 CC C compiler command
1361 CFLAGS C compiler flags
1362 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1363 nonstandard directory <lib dir>
d6e01aa5
KL
1364 LIBS libraries to pass to the linker, e.g. -l<library>
1365 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1366 you have headers in a nonstandard directory <include dir>
503d2be0 1367 CPP C preprocessor
d6e01aa5 1368 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1369
1370Use these variables to override the choices made by `configure' or to help
1371it to find libraries and programs with nonstandard names/locations.
1372
c0d27fcc 1373_ACEOF
d6e01aa5 1374ac_status=$?
503d2be0
AS
1375fi
1376
1377if test "$ac_init_help" = "recursive"; then
1378 # If there are subdirs, report their specific --help.
c0d27fcc 1379 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
d6e01aa5 1380 test -d "$ac_dir" || continue
c0d27fcc
MR
1381 ac_builddir=.
1382
d6e01aa5
KL
1383case "$ac_dir" in
1384.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385*)
c0d27fcc 1386 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
1387 # A ".." for each directory in $ac_dir_suffix.
1388 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1389 case $ac_top_builddir_sub in
1390 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1391 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1392 esac ;;
1393esac
1394ac_abs_top_builddir=$ac_pwd
1395ac_abs_builddir=$ac_pwd$ac_dir_suffix
1396# for backward compatibility:
1397ac_top_builddir=$ac_top_build_prefix
503d2be0 1398
c0d27fcc 1399case $srcdir in
d6e01aa5 1400 .) # We are building in place.
c0d27fcc 1401 ac_srcdir=.
d6e01aa5
KL
1402 ac_top_srcdir=$ac_top_builddir_sub
1403 ac_abs_top_srcdir=$ac_pwd ;;
1404 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1405 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
1406 ac_top_srcdir=$srcdir
1407 ac_abs_top_srcdir=$srcdir ;;
1408 *) # Relative name.
1409 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1410 ac_top_srcdir=$ac_top_build_prefix$srcdir
1411 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1412esac
d6e01aa5
KL
1413ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1414
1415 cd "$ac_dir" || { ac_status=$?; continue; }
1416 # Check for guested configure.
1417 if test -f "$ac_srcdir/configure.gnu"; then
1418 echo &&
1419 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1420 elif test -f "$ac_srcdir/configure"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1423 else
c0d27fcc 1424 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
d6e01aa5
KL
1425 fi || ac_status=$?
1426 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1427 done
1428fi
1429
d6e01aa5 1430test -n "$ac_init_help" && exit $ac_status
503d2be0 1431if $ac_init_version; then
c0d27fcc 1432 cat <<\_ACEOF
d6e01aa5
KL
1433configure
1434generated by GNU Autoconf 2.61
503d2be0 1435
d6e01aa5
KL
1436Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14372002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1438This configure script is free software; the Free Software Foundation
1439gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1440_ACEOF
d6e01aa5 1441 exit
503d2be0 1442fi
d6e01aa5 1443cat >config.log <<_ACEOF
503d2be0
AS
1444This file contains any messages produced by compilers while
1445running configure, to aid debugging if configure makes a mistake.
1446
1447It was created by $as_me, which was
d6e01aa5 1448generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1449
1450 $ $0 $@
1451
c0d27fcc 1452_ACEOF
d6e01aa5 1453exec 5>>config.log
503d2be0
AS
1454{
1455cat <<_ASUNAME
c0d27fcc
MR
1456## --------- ##
1457## Platform. ##
1458## --------- ##
503d2be0
AS
1459
1460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1461uname -m = `(uname -m) 2>/dev/null || echo unknown`
1462uname -r = `(uname -r) 2>/dev/null || echo unknown`
1463uname -s = `(uname -s) 2>/dev/null || echo unknown`
1464uname -v = `(uname -v) 2>/dev/null || echo unknown`
1465
1466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1468
1469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
d6e01aa5 1472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1476
925c2f3f 1477_ASUNAME
c0d27fcc
MR
1478
1479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1480for as_dir in $PATH
1481do
1482 IFS=$as_save_IFS
1483 test -z "$as_dir" && as_dir=.
1484 echo "PATH: $as_dir"
1485done
d6e01aa5 1486IFS=$as_save_IFS
c0d27fcc 1487
503d2be0
AS
1488} >&5
1489
c0d27fcc
MR
1490cat >&5 <<_ACEOF
1491
1492
1493## ----------- ##
1494## Core tests. ##
1495## ----------- ##
1496
1497_ACEOF
503d2be0 1498
503d2be0
AS
1499
1500# Keep a trace of the command line.
1501# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1502# Strip out --silent because we don't want to record it for future runs.
503d2be0 1503# Also quote any args containing shell meta-characters.
19650fd6 1504# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1505ac_configure_args=
19650fd6
AS
1506ac_configure_args0=
1507ac_configure_args1=
19650fd6
AS
1508ac_must_keep_next=false
1509for ac_pass in 1 2
503d2be0 1510do
19650fd6
AS
1511 for ac_arg
1512 do
1513 case $ac_arg in
1514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1516 | -silent | --silent | --silen | --sile | --sil)
1517 continue ;;
d6e01aa5 1518 *\'*)
19650fd6
AS
1519 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1520 esac
1521 case $ac_pass in
1522 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1523 2)
1524 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1525 if test $ac_must_keep_next = true; then
edfaf76d 1526 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1527 else
edfaf76d
LK
1528 case $ac_arg in
1529 *=* | --config-cache | -C | -disable-* | --disable-* \
1530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1532 | -with-* | --with-* | -without-* | --without-* | --x)
1533 case "$ac_configure_args0 " in
1534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1535 esac
1536 ;;
1537 -* ) ac_must_keep_next=true ;;
1538 esac
19650fd6 1539 fi
d6e01aa5 1540 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1541 ;;
1542 esac
1543 done
503d2be0 1544done
19650fd6
AS
1545$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1546$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1547
1548# When interrupted or exit'd, cleanup temporary files, and complete
1549# config.log. We remove comments because anyway the quotes in there
1550# would cause problems or look ugly.
d6e01aa5
KL
1551# WARNING: Use '\'' to represent an apostrophe within the trap.
1552# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1553trap 'exit_status=$?
1554 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1555 {
1556 echo
6bae0ccf 1557
c0d27fcc
MR
1558 cat <<\_ASBOX
1559## ---------------- ##
1560## Cache variables. ##
1561## ---------------- ##
1562_ASBOX
1563 echo
1564 # The following way of writing the cache mishandles newlines in values,
d6e01aa5
KL
1565(
1566 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1567 eval ac_val=\$$ac_var
1568 case $ac_val in #(
1569 *${as_nl}*)
1570 case $ac_var in #(
1571 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1572echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1573 esac
1574 case $ac_var in #(
1575 _ | IFS | as_nl) ;; #(
1576 *) $as_unset $ac_var ;;
1577 esac ;;
1578 esac
1579 done
503d2be0 1580 (set) 2>&1 |
d6e01aa5
KL
1581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1582 *${as_nl}ac_space=\ *)
503d2be0 1583 sed -n \
d6e01aa5
KL
1584 "s/'\''/'\''\\\\'\'''\''/g;
1585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1586 ;; #(
503d2be0 1587 *)
d6e01aa5 1588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1589 ;;
d6e01aa5
KL
1590 esac |
1591 sort
1592)
c0d27fcc 1593 echo
6bae0ccf
DL
1594
1595 cat <<\_ASBOX
1596## ----------------- ##
1597## Output variables. ##
1598## ----------------- ##
1599_ASBOX
1600 echo
1601 for ac_var in $ac_subst_vars
1602 do
d6e01aa5
KL
1603 eval ac_val=\$$ac_var
1604 case $ac_val in
1605 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1606 esac
1607 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1608 done | sort
1609 echo
1610
1611 if test -n "$ac_subst_files"; then
1612 cat <<\_ASBOX
d6e01aa5
KL
1613## ------------------- ##
1614## File substitutions. ##
1615## ------------------- ##
6bae0ccf
DL
1616_ASBOX
1617 echo
1618 for ac_var in $ac_subst_files
1619 do
d6e01aa5
KL
1620 eval ac_val=\$$ac_var
1621 case $ac_val in
1622 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1623 esac
1624 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1625 done | sort
1626 echo
1627 fi
1628
c0d27fcc
MR
1629 if test -s confdefs.h; then
1630 cat <<\_ASBOX
1631## ----------- ##
1632## confdefs.h. ##
1633## ----------- ##
1634_ASBOX
1635 echo
d6e01aa5 1636 cat confdefs.h
c0d27fcc
MR
1637 echo
1638 fi
1639 test "$ac_signal" != 0 &&
1640 echo "$as_me: caught signal $ac_signal"
1641 echo "$as_me: exit $exit_status"
1642 } >&5
d6e01aa5
KL
1643 rm -f core *.core core.conftest.* &&
1644 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1645 exit $exit_status
d6e01aa5 1646' 0
503d2be0
AS
1647for ac_signal in 1 2 13 15; do
1648 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1649done
1650ac_signal=0
1651
1652# confdefs.h avoids OS command line length limits that DEFS can exceed.
d6e01aa5 1653rm -f -r conftest* confdefs.h
ba4481b5 1654
c0d27fcc
MR
1655# Predefined preprocessor variables.
1656
1657cat >>confdefs.h <<_ACEOF
1658#define PACKAGE_NAME "$PACKAGE_NAME"
1659_ACEOF
1660
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_VERSION "$PACKAGE_VERSION"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_STRING "$PACKAGE_STRING"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1679_ACEOF
1680
1681
503d2be0 1682# Let the site file select an alternate cache file if it wants to.
ba4481b5 1683# Prefer explicitly selected file to automatically selected ones.
d6e01aa5
KL
1684if test -n "$CONFIG_SITE"; then
1685 set x "$CONFIG_SITE"
1686elif test "x$prefix" != xNONE; then
1687 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1688else
1689 set x "$ac_default_prefix/share/config.site" \
1690 "$ac_default_prefix/etc/config.site"
ba4481b5 1691fi
d6e01aa5
KL
1692shift
1693for ac_site_file
1694do
ba4481b5 1695 if test -r "$ac_site_file"; then
c0d27fcc 1696 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1697echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1698 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1699 . "$ac_site_file"
1700 fi
1701done
1702
1703if test -r "$cache_file"; then
503d2be0
AS
1704 # Some versions of bash will fail to source /dev/null (special
1705 # files actually), so we avoid doing that.
1706 if test -f "$cache_file"; then
c0d27fcc 1707 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1708echo "$as_me: loading cache $cache_file" >&6;}
1709 case $cache_file in
d6e01aa5
KL
1710 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1711 *) . "./$cache_file";;
503d2be0
AS
1712 esac
1713 fi
ba4481b5 1714else
c0d27fcc 1715 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1716echo "$as_me: creating cache $cache_file" >&6;}
1717 >$cache_file
1718fi
1719
d6e01aa5
KL
1720ac_header_list="$ac_header_list sys/time.h"
1721ac_header_list="$ac_header_list unistd.h"
1722ac_func_list="$ac_func_list alarm"
503d2be0
AS
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
d6e01aa5 1726for ac_var in $ac_precious_vars; do
503d2be0
AS
1727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
d6e01aa5
KL
1729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1731 case $ac_old_set,$ac_new_set in
1732 set,)
c0d27fcc 1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
c0d27fcc 1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1746echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1748echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1749 ac_cache_corrupted=:
503d2be0
AS
1750 fi;;
1751 esac
c0d27fcc 1752 # Pass precious variables to config.status.
503d2be0
AS
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
d6e01aa5 1755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
c0d27fcc 1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
ba4481b5
DL
1770fi
1771
c0d27fcc
MR
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
d6e01aa5
KL
1788ac_ext=c
1789ac_cpp='$CPP $CPPFLAGS'
1790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1792ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1793
6bae0ccf 1794
d6e01aa5 1795ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1796
c0d27fcc 1797
ba5da88a 1798test "$program_prefix" != NONE &&
d6e01aa5 1799 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1800# Use a double $ so make ignores it.
1801test "$program_suffix" != NONE &&
d6e01aa5 1802 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1803# Double any \ or $. echo might interpret backslashes.
1804# By default was `s,x,x', remove it if useless.
1805cat <<\_ACEOF >conftest.sed
1806s/[\\$]/&&/g;s/;s,x,x,$//
1807_ACEOF
1808program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
d6e01aa5 1809rm -f conftest.sed
ba5da88a 1810
c0d27fcc 1811
ba4481b5
DL
1812lispdir='${datadir}/emacs/${version}/lisp'
1813locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1814'${datadir}/emacs/site-lisp'
1815lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1816etcdir='${datadir}/emacs/${version}/etc'
1817archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1818docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1819gamedir='${localstatedir}/games/emacs'
98418dba
CW
1820
1821gameuser=games
1822
c0d27fcc 1823
49adb60f 1824
d6e01aa5 1825# Check whether --with-gcc was given.
ba4481b5 1826if test "${with_gcc+set}" = set; then
d6e01aa5
KL
1827 withval=$with_gcc;
1828fi
503d2be0 1829
ba4481b5 1830
49adb60f 1831
d6e01aa5 1832# Check whether --with-pop was given.
ba4481b5 1833if test "${with_pop+set}" = set; then
d6e01aa5 1834 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1835 cat >>confdefs.h <<\_ACEOF
ba4481b5 1836#define MAIL_USE_POP 1
c0d27fcc 1837_ACEOF
ba4481b5 1838
243cf185
DL
1839else :
1840fi
3d9fec71 1841else
c0d27fcc 1842 cat >>confdefs.h <<\_ACEOF
3d9fec71 1843#define MAIL_USE_POP 1
c0d27fcc 1844_ACEOF
3d9fec71 1845
d6e01aa5 1846fi
ba4481b5 1847
c0d27fcc 1848
d6e01aa5 1849
49adb60f 1850
d6e01aa5 1851# Check whether --with-kerberos was given.
a21616bd 1852if test "${with_kerberos+set}" = set; then
54e6585f
CY
1853 withval=$with_kerberos; if test "$withval" = yes; then
1854 cat >>confdefs.h <<\_ACEOF
a21616bd 1855#define KERBEROS 1
c0d27fcc 1856_ACEOF
a21616bd 1857
d6e01aa5 1858fi
54e6585f 1859fi
a21616bd 1860
c0d27fcc 1861
d6e01aa5 1862
49adb60f 1863
d6e01aa5 1864# Check whether --with-kerberos5 was given.
a21616bd 1865if test "${with_kerberos5+set}" = set; then
d6e01aa5 1866 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1867 if test "${with_kerberos+set}" != set; then
1868 with_kerberos=yes
c0d27fcc 1869 cat >>confdefs.h <<\_ACEOF
a21616bd 1870#define KERBEROS 1
c0d27fcc 1871_ACEOF
a21616bd
KR
1872
1873 fi
b936fae4 1874
c0d27fcc 1875cat >>confdefs.h <<\_ACEOF
a21616bd 1876#define KERBEROS5 1
c0d27fcc 1877_ACEOF
a21616bd 1878
d6e01aa5 1879fi
54e6585f 1880fi
a21616bd 1881
b936fae4 1882
49adb60f 1883
d6e01aa5
KL
1884# Check whether --with-hesiod was given.
1885if test "${with_hesiod+set}" = set; then
54e6585f
CY
1886 withval=$with_hesiod; if test "$withval" = yes; then
1887
c0d27fcc 1888cat >>confdefs.h <<\_ACEOF
ba4481b5 1889#define HESIOD 1
c0d27fcc 1890_ACEOF
ba4481b5 1891
d6e01aa5 1892fi
54e6585f 1893fi
ba4481b5 1894
c0d27fcc 1895
d6e01aa5
KL
1896
1897# Check whether --with-sound was given.
2c9dccc9 1898if test "${with_sound+set}" = set; then
d6e01aa5
KL
1899 withval=$with_sound;
1900fi
2c9dccc9 1901
2c9dccc9 1902
c0d27fcc 1903
d6e01aa5 1904# Check whether --with-x-toolkit was given.
ba4481b5 1905if test "${with_x_toolkit+set}" = set; then
d6e01aa5 1906 withval=$with_x_toolkit; case "${withval}" in
089a966d 1907 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1908 n | no ) val=no ;;
1909 l | lu | luc | luci | lucid ) val=lucid ;;
1910 a | at | ath | athe | athen | athena ) val=athena ;;
1911 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1912 g | gt | gtk ) val=gtk ;;
ba4481b5 1913 * )
29d69661 1914{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1915this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1916\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1917echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1918this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1919\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1920 { (exit 1); exit 1; }; }
ba4481b5
DL
1921 ;;
1922 esac
1923 with_x_toolkit=$val
1924
d6e01aa5
KL
1925fi
1926
ba4481b5 1927
49adb60f 1928
d6e01aa5 1929# Check whether --with-xpm was given.
ba4481b5 1930if test "${with_xpm+set}" = set; then
d6e01aa5
KL
1931 withval=$with_xpm;
1932fi
503d2be0 1933
ba4481b5 1934
d6e01aa5 1935# Check whether --with-jpeg was given.
ba4481b5 1936if test "${with_jpeg+set}" = set; then
d6e01aa5
KL
1937 withval=$with_jpeg;
1938fi
503d2be0 1939
ba4481b5 1940
d6e01aa5 1941# Check whether --with-tiff was given.
ba4481b5 1942if test "${with_tiff+set}" = set; then
d6e01aa5
KL
1943 withval=$with_tiff;
1944fi
503d2be0 1945
ba4481b5 1946
d6e01aa5 1947# Check whether --with-gif was given.
ba4481b5 1948if test "${with_gif+set}" = set; then
d6e01aa5
KL
1949 withval=$with_gif;
1950fi
503d2be0 1951
ba4481b5 1952
d6e01aa5 1953# Check whether --with-png was given.
ba4481b5 1954if test "${with_png+set}" = set; then
d6e01aa5
KL
1955 withval=$with_png;
1956fi
503d2be0 1957
ba4481b5 1958
79011b82
NR
1959# Check whether --with-gpm was given.
1960if test "${with_gpm+set}" = set; then
1961 withval=$with_gpm;
1962fi
1963
1964
0cfc0546
GM
1965# Check whether --with-rsvg was given.
1966if test "${with_rsvg+set}" = set; then
1967 withval=$with_rsvg;
1968fi
1969
1970
d6e01aa5 1971# Check whether --with-gtk was given.
488dd4c4 1972if test "${with_gtk+set}" = set; then
d6e01aa5
KL
1973 withval=$with_gtk;
1974fi
488dd4c4 1975
488dd4c4 1976
d6e01aa5 1977# Check whether --with-pkg-config-prog was given.
488dd4c4 1978if test "${with_pkg_config_prog+set}" = set; then
d6e01aa5
KL
1979 withval=$with_pkg_config_prog;
1980fi
488dd4c4 1981
488dd4c4 1982
d6e01aa5 1983# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1984if test "${with_toolkit_scroll_bars+set}" = set; then
d6e01aa5
KL
1985 withval=$with_toolkit_scroll_bars;
1986fi
503d2be0 1987
ba4481b5 1988
e35a28cd
TTN
1989# Check whether --with-xaw3d was given.
1990if test "${with_xaw3d+set}" = set; then
1991 withval=$with_xaw3d;
c982cf7d
JD
1992fi
1993
1994
d6e01aa5 1995# Check whether --with-xim was given.
1d36487c 1996if test "${with_xim+set}" = set; then
d6e01aa5
KL
1997 withval=$with_xim;
1998fi
1d36487c 1999
ba4481b5 2000
d6e01aa5 2001# Check whether --with-carbon was given.
e0f712ba 2002if test "${with_carbon+set}" = set; then
d6e01aa5
KL
2003 withval=$with_carbon;
2004fi
e0f712ba 2005
49adb60f 2006
d6e01aa5 2007# Check whether --enable-carbon-app was given.
6a3a24fa 2008if test "${enable_carbon_app+set}" = set; then
d6e01aa5
KL
2009 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2010fi
e0f712ba 2011
d6e01aa5
KL
2012
2013# Check whether --enable-asserts was given.
d0098f13 2014if test "${enable_asserts+set}" = set; then
d6e01aa5 2015 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2016else
2017 USE_XASSERTS=no
d6e01aa5
KL
2018fi
2019
d0098f13 2020
d6e01aa5 2021# Check whether --enable-maintainer-mode was given.
19650fd6 2022if test "${enable_maintainer_mode+set}" = set; then
d6e01aa5 2023 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2024else
2025 USE_MAINTAINER_MODE=no
d6e01aa5
KL
2026fi
2027
19650fd6
AS
2028if test $USE_MAINTAINER_MODE = yes; then
2029 MAINT=
2030else
2031 MAINT=#
2032fi
2033
2034
d6e01aa5 2035# Check whether --enable-locallisppath was given.
9adfabc2 2036if test "${enable_locallisppath+set}" = set; then
d6e01aa5 2037 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2038 locallisppath=
2039elif test "${enableval}" != "yes"; then
2040 locallisppath=${enableval}
2041fi
d6e01aa5
KL
2042fi
2043
9adfabc2 2044
ba4481b5 2045#### Make srcdir absolute, if it isn't already. It's important to
17494071 2046#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2047#### give you automounter prefixes, which can go away. We do all this
2048#### so Emacs can find its files when run uninstalled.
17494071
GM
2049## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2050unset CDPATH
ba4481b5
DL
2051case "${srcdir}" in
2052 /* ) ;;
2053 . )
2054 ## We may be able to use the $PWD environment variable to make this
2055 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2056 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2057 ## but that tested only for a well-formed and valid PWD,
2058 ## it did not object when PWD was well-formed and valid but just wrong.
2059 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2060 then
2061 srcdir="$PWD"
2062 else
2063 srcdir="`(cd ${srcdir}; pwd)`"
2064 fi
2065 ;;
2066 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2067esac
2068
2069#### Check if the source directory already has a configured system in it.
2070if test `pwd` != `(cd ${srcdir} && pwd)` \
2071 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2072 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2073 as a build directory right now; it has been configured in its own
2074 right. To configure in another directory as well, you MUST
2075 use GNU make. If you do not have GNU make, then you must
2076 now do \`make distclean' in ${srcdir},
2077 and then run $0 again." >&5
2078echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2079 as a build directory right now; it has been configured in its own
2080 right. To configure in another directory as well, you MUST
2081 use GNU make. If you do not have GNU make, then you must
2082 now do \`make distclean' in ${srcdir},
503d2be0 2083 and then run $0 again." >&2;}
ba4481b5
DL
2084fi
2085
2086#### Given the configuration name, set machfile and opsysfile to the
2087#### names of the m/*.h and s/*.h files we should use.
2088
2089### Canonicalize the configuration name.
2090
2091ac_aux_dir=
d6e01aa5
KL
2092for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2093 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2094 ac_aux_dir=$ac_dir
2095 ac_install_sh="$ac_aux_dir/install-sh -c"
2096 break
d6e01aa5 2097 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2098 ac_aux_dir=$ac_dir
2099 ac_install_sh="$ac_aux_dir/install.sh -c"
2100 break
d6e01aa5 2101 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2102 ac_aux_dir=$ac_dir
2103 ac_install_sh="$ac_aux_dir/shtool install -c"
2104 break
ba4481b5
DL
2105 fi
2106done
2107if test -z "$ac_aux_dir"; then
d6e01aa5
KL
2108 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2109echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2110 { (exit 1); exit 1; }; }
ba4481b5 2111fi
d6e01aa5
KL
2112
2113# These three variables are undocumented and unsupported,
2114# and are intended to be withdrawn in a future Autoconf release.
2115# They can cause serious problems if a builder's source tree is in a directory
2116# whose full name contains unusual characters.
2117ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2118ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2119ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2120
ba4481b5
DL
2121
2122# Make sure we can run config.sub.
d6e01aa5
KL
2123$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2124 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2125echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2126 { (exit 1); exit 1; }; }
2127
d6e01aa5
KL
2128{ echo "$as_me:$LINENO: checking build system type" >&5
2129echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2130if test "${ac_cv_build+set}" = set; then
2131 echo $ECHO_N "(cached) $ECHO_C" >&6
2132else
d6e01aa5
KL
2133 ac_build_alias=$build_alias
2134test "x$ac_build_alias" = x &&
2135 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2136test "x$ac_build_alias" = x &&
c0d27fcc 2137 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2138echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2139 { (exit 1); exit 1; }; }
d6e01aa5
KL
2140ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2141 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2142echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2143 { (exit 1); exit 1; }; }
2144
2145fi
d6e01aa5
KL
2146{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2147echo "${ECHO_T}$ac_cv_build" >&6; }
2148case $ac_cv_build in
2149*-*-*) ;;
2150*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2151echo "$as_me: error: invalid value of canonical build" >&2;}
2152 { (exit 1); exit 1; }; };;
2153esac
503d2be0 2154build=$ac_cv_build
d6e01aa5
KL
2155ac_save_IFS=$IFS; IFS='-'
2156set x $ac_cv_build
2157shift
2158build_cpu=$1
2159build_vendor=$2
2160shift; shift
2161# Remember, the first character of IFS is used to create $*,
2162# except with old shells:
2163build_os=$*
2164IFS=$ac_save_IFS
2165case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2166
2167
2168{ echo "$as_me:$LINENO: checking host system type" >&5
2169echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2170if test "${ac_cv_host+set}" = set; then
2171 echo $ECHO_N "(cached) $ECHO_C" >&6
2172else
d6e01aa5
KL
2173 if test "x$host_alias" = x; then
2174 ac_cv_host=$ac_cv_build
2175else
2176 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2177 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2178echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2179 { (exit 1); exit 1; }; }
d6e01aa5 2180fi
503d2be0
AS
2181
2182fi
d6e01aa5
KL
2183{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2184echo "${ECHO_T}$ac_cv_host" >&6; }
2185case $ac_cv_host in
2186*-*-*) ;;
2187*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2188echo "$as_me: error: invalid value of canonical host" >&2;}
2189 { (exit 1); exit 1; }; };;
2190esac
503d2be0 2191host=$ac_cv_host
d6e01aa5
KL
2192ac_save_IFS=$IFS; IFS='-'
2193set x $ac_cv_host
2194shift
2195host_cpu=$1
2196host_vendor=$2
2197shift; shift
2198# Remember, the first character of IFS is used to create $*,
2199# except with old shells:
2200host_os=$*
2201IFS=$ac_save_IFS
2202case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2203
c0d27fcc 2204
ba4481b5 2205canonical=$host
1770dcdc 2206configuration=${host_alias-${build_alias-$host}}
ba4481b5 2207
c0d27fcc 2208
22044edf 2209
ba4481b5
DL
2210### If you add support for a new configuration, add code to this
2211### switch statement to recognize your configuration name and select
2212### the appropriate operating system and machine description files.
2213
2214### You would hope that you could choose an m/*.h file pretty much
2215### based on the machine portion of the configuration name, and an s-
2216### file based on the operating system portion. However, it turns out
2217### that each m/*.h file is pretty manufacturer-specific - for
2218### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2219### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2220### machines. So we basically have to have a special case for each
2221### configuration name.
2222###
2223### As far as handling version numbers on operating systems is
2224### concerned, make sure things will fail in a fixable way. If
2225### /etc/MACHINES doesn't say anything about version numbers, be
2226### prepared to handle anything reasonably. If version numbers
2227### matter, be sure /etc/MACHINES says something about it.
2228###
2229### Eric Raymond says we should accept strings like "sysvr4" to mean
2230### "System V Release 4"; he writes, "The old convention encouraged
2231### confusion between `system' and `release' levels'."
2232
2233machine='' opsys='' unported=no
2234case "${canonical}" in
2235
1096bcc0
GM
2236 ## FreeBSD ports
2237 *-*-freebsd* )
2238 opsys=freebsd
2239 case "${canonical}" in
2240 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2241 ia64-*-freebsd*) machine=ia64 ;;
2242 sparc64-*-freebsd*) machine=sparc ;;
2243 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2244 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2245 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2246 esac
2247 ;;
2248
ba4481b5
DL
2249 ## NetBSD ports
2250 *-*-netbsd* )
2251 opsys=netbsd
dd038e26 2252 if test -f /usr/lib/crti.o; then
f57bd967
DL
2253
2254cat >>confdefs.h <<\_ACEOF
2255#define HAVE_CRTIN
dd038e26
AS
2256_ACEOF
2257
2258 fi
2259
ba4481b5
DL
2260 case "${canonical}" in
2261 alpha*-*-netbsd*) machine=alpha ;;
2262 i[3456]86-*-netbsd*) machine=intel386 ;;
2263 m68k-*-netbsd*)
2264 # This is somewhat bogus.
2265 machine=hp9000s300 ;;
ba4481b5 2266 mips-*-netbsd*) machine=pmax ;;
2df636f4 2267 mipsel-*-netbsd*) machine=pmax ;;
97836269 2268 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2269 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2270 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2271 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2272 vax-*-netbsd*) machine=vax ;;
2df636f4 2273 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2274 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2275 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2276 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2277 esac
2278 ;;
2279
2280 ## OpenBSD ports
2281 *-*-openbsd* )
2282 opsys=openbsd
2283 case "${canonical}" in
2284 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2285 arm-*-openbsd*) machine=arm ;;
2286 hppa-*-openbsd*) machine=hp9000s300 ;;
2287 i386-*-openbsd*) machine=intel386 ;;
2288 m68k-*-openbsd*) machine=hp9000s300 ;;
2289 m88k-*-openbsd*) machine=aviion ;;
2290 mips64-*-openbsd*) machine=mips64 ;;
2291 powerpc-*-openbsd*) machine=macppc ;;
2292 sh-*-openbsd*) machine=sh3el ;;
2293 sparc*-*-openbsd*) machine=sparc ;;
2294 vax-*-openbsd*) machine=vax ;;
2295 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2296 esac
2297 ;;
2298
10a3b1a1
EZ
2299 ## LynxOS ports
2300 *-*-lynxos* )
2301 opsys=lynxos
2302 case "${canonical}" in
2303 i[3456]86-*-lynxos*) machine=intel386 ;;
2304 powerpc-*-lynxos*) machine=powerpc ;;
2305 esac
2306 ;;
2307
ba4481b5
DL
2308 ## Acorn RISCiX:
2309 arm-acorn-riscix1.1* )
2310 machine=acorn opsys=riscix1-1
2311 ;;
2312 arm-acorn-riscix1.2* | arm-acorn-riscix )
2313 ## This name is riscix12 instead of riscix1.2
2314 ## to avoid a file name conflict on MSDOS.
2315 machine=acorn opsys=riscix12
2316 ;;
2317
2318 ## BSDI ports
2319 *-*-bsdi* )
2320 opsys=bsdi
2321 case "${canonical}" in
2322 i[345]86-*-bsdi*) machine=intel386 ;;
2323 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2324 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2325 esac
2326 case "${canonical}" in
2327 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2328 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2329 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2330 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2331 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2332 esac
2333 ;;
2334
2335 ## Alliant machines
2336 ## Strictly speaking, we need the version of the alliant operating
2337 ## system to choose the right machine file, but currently the
2338 ## configuration name doesn't tell us enough to choose the right
2339 ## one; we need to give alliants their own operating system name to
2340 ## do this right. When someone cares, they can help us.
2341 fx80-alliant-* )
2342 machine=alliant4 opsys=bsd4-2
2343 ;;
2344 i860-alliant-* )
2345 machine=alliant-2800 opsys=bsd4-3
2346 ;;
2347
2348 ## Alpha (DEC) machines.
2349 alpha*-dec-osf* )
2350 machine=alpha opsys=osf1
2351 # This is needed to find X11R6.1 libraries for certain tests.
2352 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2353 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2354 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2355 # due to non-traditional preprocessing with the current compiler
2356 # defaults. OSF 4 can also have that compiler version, and there
2357 # seems always to have been a usable /usr/bin/cpp.
2358 NON_GNU_CPP=/usr/bin/cpp
ca512671 2359 case "${canonical}" in
a55b799a 2360 alpha*-dec-osf[5-9]*)
bb17930d 2361 opsys=osf5-0 ;;
ca512671 2362 esac
ba4481b5
DL
2363 ;;
2364
2365 alpha*-*-linux-gnu* )
2366 machine=alpha opsys=gnu-linux
2367 ;;
2368
c4bb2108
DL
2369 arm*-*-linux-gnu* )
2370 machine=arm opsys=gnu-linux
2371 ;;
2372
ba4481b5
DL
2373 ## Altos 3068
2374 m68*-altos-sysv* )
2375 machine=altos opsys=usg5-2
2376 ;;
2377
2378 ## Amdahl UTS
2379 580-amdahl-sysv* )
2380 machine=amdahl opsys=usg5-2-2
2381 ;;
2382
2383 ## Apollo, Domain/OS
2384 m68*-apollo-* )
2385 machine=apollo opsys=bsd4-3
2386 ;;
2387
040c474e
CY
2388 ## Apple Darwin / Mac OS X
2389 *-apple-darwin* )
2390 case "${canonical}" in
2391 i[3456]86-* ) machine=intel386 ;;
2392 powerpc-* ) machine=powermac ;;
2393 * ) unported=yes ;;
2394 esac
2395 opsys=darwin
2396 # Define CPP as follows to make autoconf work correctly.
2397 CPP="${CC-cc} -E -no-cpp-precomp"
2398 # Use fink packages if available.
2399 if test -d /sw/include && test -d /sw/lib; then
2400 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2401 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2402 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2403 fi
2404 ;;
2405
ba4481b5
DL
2406 ## AT&T 3b2, 3b5, 3b15, 3b20
2407 we32k-att-sysv* )
2408 machine=att3b opsys=usg5-2-2
2409 ;;
2410
2411 ## AT&T 3b1 - The Mighty Unix PC!
2412 m68*-att-sysv* )
2413 machine=7300 opsys=usg5-2-2
2414 ;;
2415
2416 ## Bull dpx20
2417 rs6000-bull-bosx* )
2418 machine=ibmrs6000 opsys=aix3-2
2419 ;;
2420
2421 ## Bull dpx2
2422 m68*-bull-sysv3* )
2423 machine=dpx2 opsys=usg5-3
2424 ;;
2425
2426 ## Bull sps7
2427 m68*-bull-sysv2* )
2428 machine=sps7 opsys=usg5-2
2429 ;;
2430
2431 ## CCI 5/32, 6/32 -- see "Tahoe".
2432
2433 ## Celerity
2434 ## I don't know what configuration name to use for this; config.sub
2435 ## doesn't seem to know anything about it. Hey, Celerity users, get
2436 ## in touch with us!
2437 celerity-celerity-bsd* )
2438 machine=celerity opsys=bsd4-2
2439 ;;
2440
2441 ## Clipper
2442 ## What operating systems does this chip run that Emacs has been
2443 ## tested on?
2444 clipper-* )
2445 machine=clipper
2446 ## We'll use the catch-all code at the bottom to guess the
2447 ## operating system.
2448 ;;
2449
df645f7c
AS
2450 ## Compaq Nonstop
2451 mips-compaq-nonstopux* )
2452 machine=nonstopux opsys=nonstopux
2453 ;;
2454
ba4481b5
DL
2455 ## Convex
2456 *-convex-bsd* | *-convex-convexos* )
2457 machine=convex opsys=bsd4-3
2458 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2459 NON_GNU_CPP="cc -E -P"
2460 ;;
2461
2462 ## Cubix QBx/386
2463 i[3456]86-cubix-sysv* )
2464 machine=intel386 opsys=usg5-3
2465 ;;
2466
2467 ## Cydra 5
2468 cydra*-cydrome-sysv* )
2469 machine=cydra5 opsys=usg5-3
2470 ;;
2471
2472 ## Data General AViiON Machines
2473 ## DG changed naming conventions with the release of 5.4.4.10, they
2474 ## dropped the initial 5.4 but left the intervening R. Because of the
2475 ## R this shouldn't conflict with older versions of the OS (which I
2476 ## think were named like dgux4.*). In addition, DG new AViiONs series
2477 ## uses either Motorola M88k or Intel Pentium CPUs.
2478 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2479 machine=aviion opsys=dgux4
2480 ;;
2481 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2482 ## This name is dgux5-4-3 instead of dgux5-4r3
2483 ## to avoid a file name conflict on MSDOS.
2484 machine=aviion opsys=dgux5-4-3
2485 ;;
2486 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2487 machine=aviion opsys=dgux5-4r2
2488 ;;
2489 m88k-dg-dgux* )
2490 machine=aviion opsys=dgux
2491 ;;
2492
2493 ## Data General AViiON Intel (x86) Machines
2494 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2495 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2496 i[345]86-dg-dguxR4* )
2497 machine=aviion-intel opsys=dgux4
2498 ;;
2499
2500 ## DECstations
2501 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2502 machine=pmax opsys=bsd4-2
2503 ;;
2504 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2505 machine=pmax opsys=bsd4-3
2506 ;;
2507 mips-dec-ultrix* )
2508 machine=pmax opsys=ultrix4-3
2509 ;;
2510 mips-dec-osf* )
2511 machine=pmax opsys=osf1
2512 ;;
2513 mips-dec-mach_bsd4.3* )
2514 machine=pmax opsys=mach-bsd4-3
2515 ;;
2516
cd890796
JD
2517 ## Motorola Delta machines
2518 m68k-motorola-sysv* | m68000-motorola-sysv* )
2519 machine=delta opsys=usg5-3
2520 if test -z "`type gnucc | grep 'not found'`"
2521 then
2522 if test -s /etc/167config
2523 then CC="gnucc -m68040"
2524 else CC="gnucc -m68881"
2525 fi
2526 else
2527 if test -z "`type gcc | grep 'not found'`"
2528 then CC=gcc
2529 else CC=cc
2530 fi
2531 fi
2532 ;;
ba4481b5
DL
2533 m88k-motorola-sysv4* )
2534 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2535 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2536 # I hope there are not other 4.0 versions for this machine
2537 # which really need usg5-4 instead.
2538 machine=delta88k opsys=usg5-4-2
2539 ;;
2540 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2541 machine=delta88k opsys=usg5-3
2542 ;;
2543
2544 ## Dual machines
2545 m68*-dual-sysv* )
2546 machine=dual opsys=usg5-2
2547 ;;
2548 m68*-dual-uniplus* )
2549 machine=dual opsys=unipl5-2
2550 ;;
2551
2552 ## Elxsi 6400
2553 elxsi-elxsi-sysv* )
2554 machine=elxsi opsys=usg5-2
2555 ;;
2556
2557 ## Encore machines
2558 ns16k-encore-bsd* )
2559 machine=ns16000 opsys=umax
2560 ;;
2561
65171e3a
DL
2562 ## The GEC 63 - apparently, this port isn't really finished yet.
2563 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2564
2565 ## Gould Power Node and NP1
2566 pn-gould-bsd4.2* )
2567 machine=gould opsys=bsd4-2
2568 ;;
2569 pn-gould-bsd4.3* )
2570 machine=gould opsys=bsd4-3
2571 ;;
2572 np1-gould-bsd* )
2573 machine=gould-np1 opsys=bsd4-3
2574 ;;
2575
2576 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2577 ## as far as Emacs is concerned).
2578 m88k-harris-cxux* )
2579 # Build needs to be different on 7.0 and later releases
2580 case "`uname -r`" in
2581 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2582 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2583 esac
2584 NON_GNU_CPP="/lib/cpp"
2585 ;;
2586 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2587 m68k-harris-cxux* )
2588 machine=nh3000 opsys=cxux
2589 ;;
2590 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2591 powerpc-harris-powerunix )
2592 machine=nh6000 opsys=powerunix
2593 NON_GNU_CPP="cc -Xo -E -P"
2594 ;;
6fbb6db1
GM
2595 ## SR2001/SR2201 running HI-UX/MPP
2596 hppa1.1-hitachi-hiuxmpp* )
2597 machine=sr2k opsys=hiuxmpp
2598 ;;
2599 hppa1.1-hitachi-hiuxwe2* )
2600 machine=sr2k opsys=hiuxwe2
2601 ;;
ba4481b5
DL
2602 ## Honeywell XPS100
2603 xps*-honeywell-sysv* )
2604 machine=xps100 opsys=usg5-2
2605 ;;
2606
2607 ## HP 9000 series 200 or 300
2608 m68*-hp-bsd* )
2609 machine=hp9000s300 opsys=bsd4-3
2610 ;;
2611 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2612 m68*-hp-hpux* )
2613 case "`uname -r`" in
2614 ## Someone's system reports A.B8.05 for this.
2615 ## I wonder what other possibilities there are.
2616 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2617 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2618 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2619 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2620 *) machine=hp9000s300 opsys=hpux ;;
2621 esac
2622 ;;
2623
6fbb6db1
GM
2624 ## HP 9000 series 700 and 800, running HP/UX
2625 hppa*-hp-hpux7* )
2626 machine=hp800 opsys=hpux
2627 ;;
2628 hppa*-hp-hpux8* )
2629 machine=hp800 opsys=hpux8
2630 ;;
2631 hppa*-hp-hpux9shr* )
2632 machine=hp800 opsys=hpux9shr
2633 ;;
2634 hppa*-hp-hpux9* )
2635 machine=hp800 opsys=hpux9
2636 ;;
2637 hppa*-hp-hpux10.2* )
2638 machine=hp800 opsys=hpux10-20
2639 ;;
2640 hppa*-hp-hpux10* )
2641 machine=hp800 opsys=hpux10
2642 ;;
2643 hppa*-hp-hpux1[1-9]* )
2644 machine=hp800 opsys=hpux11
2645 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2646 ;;
2647
13aadc96
CY
2648 hppa*-*-linux-gnu* )
2649 machine=hp800 opsys=gnu-linux
2650 ;;
2651
6fbb6db1
GM
2652 ## HP 9000 series 700 and 800, running HP/UX
2653 hppa*-hp-hpux* )
2654 ## Cross-compilation? Nah!
2655 case "`uname -r`" in
2656 ## Someone's system reports A.B8.05 for this.
2657 ## I wonder what other possibilities there are.
2658 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2659 *.08.* ) machine=hp800 opsys=hpux8 ;;
2660 *.09.* ) machine=hp800 opsys=hpux9 ;;
2661 *) machine=hp800 opsys=hpux10 ;;
2662 esac
2663 ;;
13aadc96
CY
2664 hppa*-*-nextstep* )
2665 machine=hp800 opsys=nextstep
2666 ;;
2667
ba4481b5
DL
2668 ## Orion machines
2669 orion-orion-bsd* )
2670 machine=orion opsys=bsd4-2
2671 ;;
2672 clipper-orion-bsd* )
2673 machine=orion105 opsys=bsd4-2
2674 ;;
2675
2676 ## IBM machines
2677 i[3456]86-ibm-aix1.1* )
2678 machine=ibmps2-aix opsys=usg5-2-2
2679 ;;
2680 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2681 machine=ibmps2-aix opsys=usg5-3
2682 ;;
2683 i370-ibm-aix*)
2684 machine=ibm370aix opsys=usg5-3
2685 ;;
55597d70 2686 s390-*-linux-gnu* )
138f0859
GM
2687 machine=ibms390 opsys=gnu-linux
2688 ;;
bcdb1378
EZ
2689 s390x-*-linux-gnu* )
2690 machine=ibms390x opsys=gnu-linux
2691 ;;
ba4481b5
DL
2692 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2693 machine=ibmrs6000 opsys=aix3-1
2694 ;;
2695 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2696 machine=ibmrs6000 opsys=aix3-2-5
2697 ;;
2698 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2699 machine=ibmrs6000 opsys=aix4-1
2700 ;;
2701 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2702 machine=ibmrs6000 opsys=aix4-2
2703 ;;
67bf991b
CY
2704 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2705 machine=ibmrs6000 opsys=aix4-2
2706 ;;
55597d70 2707 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2708 machine=ibmrs6000 opsys=aix4-2
2709 ;;
ba4481b5
DL
2710 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2711 machine=ibmrs6000 opsys=aix4
2712 ;;
2713 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2714 machine=ibmrs6000 opsys=aix4-1
2715 ;;
2716 rs6000-ibm-aix* | powerpc-ibm-aix* )
2717 machine=ibmrs6000 opsys=aix3-2
2718 ;;
2719 romp-ibm-bsd4.3* )
2720 machine=ibmrt opsys=bsd4-3
2721 ;;
2722 romp-ibm-bsd4.2* )
2723 machine=ibmrt opsys=bsd4-2
2724 ;;
2725 romp-ibm-aos4.3* )
2726 machine=ibmrt opsys=bsd4-3
2727 ;;
2728 romp-ibm-aos4.2* )
2729 machine=ibmrt opsys=bsd4-2
2730 ;;
2731 romp-ibm-aos* )
2732 machine=ibmrt opsys=bsd4-3
2733 ;;
2734 romp-ibm-bsd* )
2735 machine=ibmrt opsys=bsd4-3
2736 ;;
2737 romp-ibm-aix* )
2738 machine=ibmrt-aix opsys=usg5-2-2
2739 ;;
2740
2741 ## Integrated Solutions `Optimum V'
2742 m68*-isi-bsd4.2* )
2743 machine=isi-ov opsys=bsd4-2
2744 ;;
2745 m68*-isi-bsd4.3* )
2746 machine=isi-ov opsys=bsd4-3
2747 ;;
2748
2749 ## Intel 386 machines where we do care about the manufacturer
2750 i[3456]86-intsys-sysv* )
2751 machine=is386 opsys=usg5-2-2
2752 ;;
2753
2754 ## Prime EXL
2755 i[3456]86-prime-sysv* )
2756 machine=i386 opsys=usg5-3
2757 ;;
2758
2759 ## Sequent Symmetry running Dynix
2760 i[3456]86-sequent-bsd* )
2761 machine=symmetry opsys=bsd4-3
2762 ;;
2763
2764 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2765 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2766 machine=sequent-ptx opsys=ptx4
2767 NON_GNU_CPP=/lib/cpp
2768 ;;
2769
2770 ## Sequent Symmetry running DYNIX/ptx
2771 ## Use the old cpp rather than the newer ANSI one.
2772 i[3456]86-sequent-ptx* )
2773 machine=sequent-ptx opsys=ptx
2774 NON_GNU_CPP="/lib/cpp"
2775 ;;
2776
2777 ## ncr machine running svr4.3.
2778 i[3456]86-ncr-sysv4.3 )
2779 machine=ncr386 opsys=usg5-4-3
2780 ;;
2781
2782 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2783 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2784 i[3456]86-ncr-sysv* )
2785 machine=ncr386 opsys=usg5-4-2
2786 ;;
2787
2788 ## Intel Paragon OSF/1
2789 i860-intel-osf1* )
2790 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2791 ;;
2792
2793 ## Intel 860
2794 i860-*-sysv4* )
2795 machine=i860 opsys=usg5-4
2796 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2797 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2798 ;;
2799
c76e04a8
GM
2800 ## Macintosh PowerPC
2801 powerpc*-*-linux-gnu* )
2802 machine=macppc opsys=gnu-linux
2803 ;;
2804
ba4481b5
DL
2805 ## Masscomp machines
2806 m68*-masscomp-rtu* )
2807 machine=masscomp opsys=rtu
2808 ;;
2809
2810 ## Megatest machines
2811 m68*-megatest-bsd* )
2812 machine=mega68 opsys=bsd4-2
2813 ;;
2814
2815 ## Workstations sold by MIPS
2816 ## This is not necessarily all workstations using the MIPS processor -
2817 ## Irises are produced by SGI, and DECstations by DEC.
2818
2819 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2820 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2821 ## it gives for choosing between the alternatives seems to be "Use
2822 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2823 ## the BSD world." I'll assume that these are instructions for
2824 ## handling two odd situations, and that every other situation
2825 ## should use mips.h and usg5-2-2, they being listed first.
2826 mips-mips-usg* )
2827 machine=mips4
2828 ## Fall through to the general code at the bottom to decide on the OS.
2829 ;;
2830 mips-mips-riscos4* )
2831 machine=mips4 opsys=bsd4-3
2832 NON_GNU_CC="cc -systype bsd43"
2833 NON_GNU_CPP="cc -systype bsd43 -E"
2834 ;;
2835 mips-mips-riscos5* )
2836 machine=mips4 opsys=riscos5
2837 NON_GNU_CC="cc -systype bsd43"
2838 NON_GNU_CPP="cc -systype bsd43 -E"
2839 ;;
2840 mips-mips-bsd* )
2841 machine=mips opsys=bsd4-3
2842 ;;
2843 mips-mips-* )
2844 machine=mips opsys=usg5-2-2
2845 ;;
2846
2847 ## NeXT
2848 m68*-next-* | m68k-*-nextstep* )
2849 machine=m68k opsys=nextstep
2850 ;;
2851
2852 ## The complete machine from National Semiconductor
2853 ns32k-ns-genix* )
2854 machine=ns32000 opsys=usg5-2
2855 ;;
2856
2857 ## NCR machines
2858 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2859 machine=tower32 opsys=usg5-2-2
2860 ;;
2861 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2862 machine=tower32v3 opsys=usg5-3
2863 ;;
2864
2865 ## NEC EWS4800
2866 mips-nec-sysv4*)
2867 machine=ews4800 opsys=ux4800
2868 ;;
2869
2870 ## Nixdorf Targon 31
2871 m68*-nixdorf-sysv* )
2872 machine=targon31 opsys=usg5-2-2
2873 ;;
2874
2875 ## Nu (TI or LMI)
2876 m68*-nu-sysv* )
2877 machine=nu opsys=usg5-2
2878 ;;
2879
2880 ## Plexus
2881 m68*-plexus-sysv* )
2882 machine=plexus opsys=usg5-2
2883 ;;
2884
ba4481b5
DL
2885 ## Pyramid machines
2886 ## I don't really have any idea what sort of processor the Pyramid has,
2887 ## so I'm assuming it is its own architecture.
2888 pyramid-pyramid-bsd* )
2889 machine=pyramid opsys=bsd4-2
2890 ;;
2891
2892 ## Sequent Balance
2893 ns32k-sequent-bsd4.2* )
2894 machine=sequent opsys=bsd4-2
2895 ;;
2896 ns32k-sequent-bsd4.3* )
2897 machine=sequent opsys=bsd4-3
2898 ;;
2899
2900 ## Siemens Nixdorf
2901 mips-siemens-sysv* | mips-sni-sysv*)
2902 machine=mips-siemens opsys=usg5-4
2903 NON_GNU_CC=/usr/ccs/bin/cc
2904 NON_GNU_CPP=/usr/ccs/lib/cpp
2905 ;;
2906
2907 ## Silicon Graphics machines
2908 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2909 m68*-sgi-iris3.5* )
2910 machine=irist opsys=iris3-5
2911 ;;
2912 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2913 machine=irist opsys=iris3-6
2914 ;;
2915 ## Iris 4D
2916 mips-sgi-irix3* )
2917 machine=iris4d opsys=irix3-3
2918 ;;
2919 mips-sgi-irix4* )
2920 machine=iris4d opsys=irix4-0
2921 ;;
2922 mips-sgi-irix6.5 )
2923 machine=iris4d opsys=irix6-5
946173ad
DL
2924 # Without defining _LANGUAGE_C, things get masked out in the headers
2925 # so that, for instance, grepping for `free' in stdlib.h fails and
2926 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2927 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2928 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2929 ;;
2930 mips-sgi-irix6* )
2931 machine=iris4d opsys=irix6-0
c4bb2108 2932 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2933 # but presumably it does no harm.
2934 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2935 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2936 NON_GCC_TEST_OPTIONS=-32
2937 ;;
2938 mips-sgi-irix5.[01]* )
2939 machine=iris4d opsys=irix5-0
2940 ;;
2941 mips-sgi-irix5* | mips-sgi-irix* )
2942 machine=iris4d opsys=irix5-2
2943 ;;
2944
2945 ## SONY machines
2946 m68*-sony-bsd4.2* )
2947 machine=news opsys=bsd4-2
2948 ;;
2949 m68*-sony-bsd4.3* )
2950 machine=news opsys=bsd4-3
2951 ;;
2952 m68*-sony-newsos3* | m68*-sony-news3*)
2953 machine=news opsys=bsd4-3
2954 ;;
2955 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2956 machine=news-risc opsys=bsd4-3
2957 ;;
2958 mips-sony-newsos6* )
2959 machine=news-r6 opsys=newsos6
2960 ;;
2961 mips-sony-news* )
2962 machine=news-risc opsys=newsos5
2963 ;;
2964
2965 ## Stride
2966 m68*-stride-sysv* )
2967 machine=stride opsys=usg5-2
2968 ;;
2969
2970 ## Suns
2971 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2972 machine=sparc opsys=gnu-linux
2973 ;;
2974
d054101f 2975 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2976 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2977 | rs6000-*-solaris2*)
2978 case "${canonical}" in
2979 m68*-sunos1* ) machine=sun1 ;;
2980 m68*-sunos2* ) machine=sun2 ;;
2981 m68* ) machine=sun3 ;;
2982 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2983 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2984 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2985 powerpcle* ) machine=powerpcle ;;
2986 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2987 sparc* ) machine=sparc ;;
2988 * ) unported=yes ;;
2989 esac
2990 case "${canonical}" in
2991 ## The Sun386 didn't get past 4.0.
2992 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2993 *-sunos4.0* ) opsys=sunos4-0 ;;
2994 *-sunos4.1.[3-9]*noshare )
2995 ## This name is sunos413 instead of sunos4-1-3
2996 ## to avoid a file name conflict on MSDOS.
2997 opsys=sunos413
2998 NON_GNU_CPP=/usr/lib/cpp
2999 NON_GCC_TEST_OPTIONS=-Bstatic
3000 GCC_TEST_OPTIONS=-static
3001 ;;
3002 *-sunos4.1.[3-9]* | *-sunos4shr*)
3003 opsys=sunos4shr
3004 NON_GNU_CPP=/usr/lib/cpp
3005 ;;
3006 *-sunos4* | *-sunos )
3007 opsys=sunos4-1
3008 NON_GCC_TEST_OPTIONS=-Bstatic
3009 GCC_TEST_OPTIONS=-static
3010 ;;
3011 *-sunos5.3* | *-solaris2.3* )
3012 opsys=sol2-3
3013 NON_GNU_CPP=/usr/ccs/lib/cpp
3014 ;;
3015 *-sunos5.4* | *-solaris2.4* )
3016 opsys=sol2-4
3017 NON_GNU_CPP=/usr/ccs/lib/cpp
3018 RANLIB="ar -ts"
3019 ;;
3020 *-sunos5.5* | *-solaris2.5* )
3021 opsys=sol2-5
3022 NON_GNU_CPP=/usr/ccs/lib/cpp
3023 RANLIB="ar -ts"
3024 ;;
8e967cf7
MR
3025 *-sunos5.6* | *-solaris2.6* )
3026 opsys=sol2-6
3027 NON_GNU_CPP=/usr/ccs/lib/cpp
3028 RANLIB="ar -ts"
3029 ;;
ba4481b5 3030 *-sunos5* | *-solaris* )
9e71690e 3031 opsys=sol2-6
089a966d
GM
3032 emacs_check_sunpro_c=yes
3033 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
3034 ;;
3035 * ) opsys=bsd4-2 ;;
3036 esac
3037 ## Watch out for a compiler that we know will not work.
3038 case "${canonical}" in
3039 *-solaris* | *-sunos5* )
3040 if [ "x$CC" = x/usr/ucb/cc ]; then
3041 ## /usr/ucb/cc doesn't work;
3042 ## we should find some other compiler that does work.
3043 unset CC
3044 fi
3045 ;;
3046 *) ;;
3047 esac
3048 ;;
3049 sparc-*-nextstep* )
3050 machine=sparc opsys=nextstep
3051 ;;
3052
3053 ## Tadpole 68k
3054 m68*-tadpole-sysv* )
3055 machine=tad68k opsys=usg5-3
3056 ;;
3057
3058 ## Tahoe machines
3059 tahoe-tahoe-bsd4.2* )
3060 machine=tahoe opsys=bsd4-2
3061 ;;
3062 tahoe-tahoe-bsd4.3* )
3063 machine=tahoe opsys=bsd4-3
3064 ;;
3065
3066 ## Tandem Integrity S2
3067 mips-tandem-sysv* )
3068 machine=tandem-s2 opsys=usg5-3
3069 ;;
3070
3071 ## Tektronix XD88
3072 m88k-tektronix-sysv3* )
3073 machine=tekxd88 opsys=usg5-3
3074 ;;
3075
3076 ## Tektronix 16000 box (6130?)
3077 ns16k-tektronix-bsd* )
3078 machine=ns16000 opsys=bsd4-2
3079 ;;
3080 ## Tektronix 4300
3081 ## src/m/tek4300.h hints that this is a m68k machine.
3082 m68*-tektronix-bsd* )
3083 machine=tek4300 opsys=bsd4-3
3084 ;;
3085
3086 ## Titan P2 or P3
3087 ## We seem to have lost the machine-description file titan.h!
3088 titan-titan-sysv* )
3089 machine=titan opsys=usg5-3
3090 ;;
3091
3092 ## Ustation E30 (SS5E)
3093 m68*-unisys-uniplus* )
3094 machine=ustation opsystem=unipl5-2
3095 ;;
3096
3097 ## Vaxen.
3098 vax-dec-* )
3099 machine=vax
3100 case "${canonical}" in
3101 *-bsd4.1* ) opsys=bsd4-1 ;;
3102 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3103 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3104 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3105 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3106 *-vms* ) opsys=vms ;;
3107 * ) unported=yes
3108 esac
3109 ;;
3110
3111 ## Whitechapel MG1
3112 ns16k-whitechapel-* )
3113 machine=mg1
3114 ## We don't know what sort of OS runs on these; we'll let the
3115 ## operating system guessing code below try.
3116 ;;
3117
3118 ## Wicat
3119 m68*-wicat-sysv* )
3120 machine=wicat opsys=usg5-2
3121 ;;
3122
f4988be7
GM
3123 ## IA-64
3124 ia64*-*-linux* )
3125 machine=ia64 opsys=gnu-linux
3126 ;;
3127
ba4481b5
DL
3128 ## Intel 386 machines where we don't care about the manufacturer
3129 i[3456]86-*-* )
3130 machine=intel386
3131 case "${canonical}" in
c60ee5e7 3132 *-cygwin ) opsys=cygwin ;;
eae54018 3133 *-darwin* ) opsys=darwin
23fd4483
ST
3134 CPP="${CC-cc} -E -no-cpp-precomp"
3135 ;;
ba4481b5
DL
3136 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3137 *-isc2.2* ) opsys=isc2-2 ;;
3138 *-isc4.0* ) opsys=isc4-0 ;;
3139 *-isc4.* ) opsys=isc4-1
3140 GCC_TEST_OPTIONS=-posix
3141 NON_GCC_TEST_OPTIONS=-Xp
3142 ;;
3143 *-isc* ) opsys=isc3-0 ;;
3144 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3145 *-esix* ) opsys=esix ;;
3146 *-xenix* ) opsys=xenix ;;
3147 *-linux-gnu* ) opsys=gnu-linux ;;
3148 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3149 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3150 NON_GNU_CPP=/lib/cpp
3151 # Prevent -belf from being passed to $CPP.
3152 # /lib/cpp does not accept it.
3153 OVERRIDE_CPPFLAGS=" "
3154 ;;
3155 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3156 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3157 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3158 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3159 *-nextstep* ) opsys=nextstep ;;
3160 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3161 esac
3162 ;;
3163
3164 ## m68k Linux-based GNU system
3165 m68k-*-linux-gnu* )
3166 machine=m68k opsys=gnu-linux
3167 ;;
3168
3169 ## Mips Linux-based GNU system
cd958eb3 3170 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3171 machine=mips opsys=gnu-linux
3172 ;;
3173
3174 ## UXP/DS
3175 sparc-fujitsu-sysv4* )
3176 machine=sparc opsys=uxpds
3177 NON_GNU_CPP=/usr/ccs/lib/cpp
3178 RANLIB="ar -ts"
3179 ;;
3180
3181 ## UXP/V
3182 f301-fujitsu-uxpv4.1)
3183 machine=f301 opsys=uxpv
3184 ;;
3185
598a2813
AS
3186 ## AMD x86-64 Linux-based GNU system
3187 x86_64-*-linux-gnu* )
24b01ec4 3188 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3189 ;;
3190
94218e27
DN
3191 ## Tensilica Xtensa Linux-based GNU system
3192 xtensa-*-linux-gnu* )
3193 machine=xtensa opsys=gnu-linux
3194 ;;
3195
ba4481b5
DL
3196 * )
3197 unported=yes
3198 ;;
3199esac
3200
3201### If the code above didn't choose an operating system, just choose
3202### an operating system based on the configuration name. You really
3203### only want to use this when you have no idea what the right
3204### operating system is; if you know what operating systems a machine
3205### runs, it's cleaner to make it explicit in the case statement
3206### above.
3207if test x"${opsys}" = x; then
3208 case "${canonical}" in
3209 *-gnu* ) opsys=gnu ;;
3210 *-bsd4.[01] ) opsys=bsd4-1 ;;
3211 *-bsd4.2 ) opsys=bsd4-2 ;;
3212 *-bsd4.3 ) opsys=bsd4-3 ;;
3213 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3214 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3215 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3216 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3217 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3218 *-sysv5uw* ) opsys=unixware ;;
3219 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3220 *-sysv4.1* | *-sysvr4.1* )
3221 NON_GNU_CPP=/usr/lib/cpp
3222 opsys=usg5-4 ;;
3223 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3224 if [ x$NON_GNU_CPP = x ]; then
3225 if [ -f /usr/ccs/lib/cpp ]; then
3226 NON_GNU_CPP=/usr/ccs/lib/cpp
3227 else
3228 NON_GNU_CPP=/lib/cpp
3229 fi
3230 fi
3231 opsys=usg5-4-2 ;;
3232 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3233 * )
3234 unported=yes
3235 ;;
3236 esac
3237fi
3238
c0d27fcc 3239
22044edf 3240
ba4481b5 3241if test $unported = yes; then
c0d27fcc 3242 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3243Check \`etc/MACHINES' for recognized configuration names." >&5
3244echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3245Check \`etc/MACHINES' for recognized configuration names." >&2;}
3246 { (exit 1); exit 1; }; }
ba4481b5
DL
3247fi
3248
3249machfile="m/${machine}.h"
3250opsysfile="s/${opsys}.h"
3251
c0d27fcc 3252
ba4481b5
DL
3253#### Choose a compiler.
3254test -n "$CC" && cc_specified=yes
3255
3256# Save the value of CFLAGS that the user specified.
3257SPECIFIED_CFLAGS="$CFLAGS"
3258
3259case ${with_gcc} in
3260 "yes" ) CC="gcc" GCC=yes ;;
3261 "no" ) : ${CC=cc} ;;
503d2be0
AS
3262 * )
3263esac
3264ac_ext=c
3265ac_cpp='$CPP $CPPFLAGS'
3266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3268ac_compiler_gnu=$ac_cv_c_compiler_gnu
3269if test -n "$ac_tool_prefix"; then
3270 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3271set dummy ${ac_tool_prefix}gcc; ac_word=$2
d6e01aa5
KL
3272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3274if test "${ac_cv_prog_CC+set}" = set; then
3275 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3276else
3277 if test -n "$CC"; then
3278 ac_cv_prog_CC="$CC" # Let the user override the test.
3279else
c0d27fcc
MR
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
3285 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3287 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3288 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3289 break 2
3290 fi
3291done
503d2be0 3292done
d6e01aa5 3293IFS=$as_save_IFS
503d2be0 3294
ba4481b5
DL
3295fi
3296fi
503d2be0 3297CC=$ac_cv_prog_CC
ba4481b5 3298if test -n "$CC"; then
d6e01aa5
KL
3299 { echo "$as_me:$LINENO: result: $CC" >&5
3300echo "${ECHO_T}$CC" >&6; }
503d2be0 3301else
d6e01aa5
KL
3302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
503d2be0
AS
3304fi
3305
d6e01aa5 3306
503d2be0
AS
3307fi
3308if test -z "$ac_cv_prog_CC"; then
3309 ac_ct_CC=$CC
3310 # Extract the first word of "gcc", so it can be a program name with args.
3311set dummy gcc; ac_word=$2
d6e01aa5
KL
3312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3314if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 if test -n "$ac_ct_CC"; then
3318 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3319else
c0d27fcc
MR
3320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3327 ac_cv_prog_ac_ct_CC="gcc"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
503d2be0 3332done
d6e01aa5 3333IFS=$as_save_IFS
503d2be0
AS
3334
3335fi
3336fi
3337ac_ct_CC=$ac_cv_prog_ac_ct_CC
3338if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3339 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3340echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3341else
d6e01aa5
KL
3342 { echo "$as_me:$LINENO: result: no" >&5
3343echo "${ECHO_T}no" >&6; }
503d2be0
AS
3344fi
3345
d6e01aa5
KL
3346 if test "x$ac_ct_CC" = x; then
3347 CC=""
3348 else
3349 case $cross_compiling:$ac_tool_warned in
3350yes:)
3351{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3352whose name does not start with the host triplet. If you think this
3353configuration is useful to you, please write to autoconf@gnu.org." >&5
3354echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3355whose name does not start with the host triplet. If you think this
3356configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3357ac_tool_warned=yes ;;
3358esac
3359 CC=$ac_ct_CC
3360 fi
503d2be0
AS
3361else
3362 CC="$ac_cv_prog_CC"
ba4481b5
DL
3363fi
3364
3365if test -z "$CC"; then
d6e01aa5
KL
3366 if test -n "$ac_tool_prefix"; then
3367 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3368set dummy ${ac_tool_prefix}cc; ac_word=$2
d6e01aa5
KL
3369{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3371if test "${ac_cv_prog_CC+set}" = set; then
3372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
c0d27fcc
MR
3377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
3382 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3384 ac_cv_prog_CC="${ac_tool_prefix}cc"
3385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3386 break 2
3387 fi
3388done
503d2be0 3389done
d6e01aa5 3390IFS=$as_save_IFS
503d2be0
AS
3391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
d6e01aa5
KL
3396 { echo "$as_me:$LINENO: result: $CC" >&5
3397echo "${ECHO_T}$CC" >&6; }
503d2be0 3398else
d6e01aa5
KL
3399 { echo "$as_me:$LINENO: result: no" >&5
3400echo "${ECHO_T}no" >&6; }
503d2be0
AS
3401fi
3402
503d2be0 3403
d6e01aa5 3404 fi
503d2be0
AS
3405fi
3406if test -z "$CC"; then
3407 # Extract the first word of "cc", so it can be a program name with args.
3408set dummy cc; ac_word=$2
d6e01aa5
KL
3409{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3410echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3411if test "${ac_cv_prog_CC+set}" = set; then
3412 echo $ECHO_N "(cached) $ECHO_C" >&6
3413else
3414 if test -n "$CC"; then
3415 ac_cv_prog_CC="$CC" # Let the user override the test.
3416else
3417 ac_prog_rejected=no
c0d27fcc
MR
3418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3419for as_dir in $PATH
3420do
3421 IFS=$as_save_IFS
3422 test -z "$as_dir" && as_dir=.
3423 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3424 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3425 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3426 ac_prog_rejected=yes
3427 continue
3428 fi
3429 ac_cv_prog_CC="cc"
3430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3431 break 2
3432 fi
3433done
503d2be0 3434done
d6e01aa5 3435IFS=$as_save_IFS
503d2be0 3436
ba4481b5
DL
3437if test $ac_prog_rejected = yes; then
3438 # We found a bogon in the path, so make sure we never use it.
3439 set dummy $ac_cv_prog_CC
3440 shift
503d2be0 3441 if test $# != 0; then
ba4481b5
DL
3442 # We chose a different compiler from the bogus one.
3443 # However, it has the same basename, so the bogon will be chosen
3444 # first if we set CC to just the basename; use the full file name.
3445 shift
6bae0ccf 3446 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3447 fi
3448fi
3449fi
3450fi
503d2be0 3451CC=$ac_cv_prog_CC
ba4481b5 3452if test -n "$CC"; then
d6e01aa5
KL
3453 { echo "$as_me:$LINENO: result: $CC" >&5
3454echo "${ECHO_T}$CC" >&6; }
ba4481b5 3455else
d6e01aa5
KL
3456 { echo "$as_me:$LINENO: result: no" >&5
3457echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3458fi
3459
d6e01aa5 3460
503d2be0
AS
3461fi
3462if test -z "$CC"; then
3463 if test -n "$ac_tool_prefix"; then
d6e01aa5 3464 for ac_prog in cl.exe
503d2be0
AS
3465 do
3466 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3467set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d6e01aa5
KL
3468{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3470if test "${ac_cv_prog_CC+set}" = set; then
3471 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3472else
3473 if test -n "$CC"; then
3474 ac_cv_prog_CC="$CC" # Let the user override the test.
3475else
c0d27fcc
MR
3476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477for as_dir in $PATH
3478do
3479 IFS=$as_save_IFS
3480 test -z "$as_dir" && as_dir=.
3481 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3483 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3484 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3485 break 2
3486 fi
3487done
503d2be0 3488done
d6e01aa5 3489IFS=$as_save_IFS
503d2be0 3490
c4bb2108
DL
3491fi
3492fi
503d2be0 3493CC=$ac_cv_prog_CC
c4bb2108 3494if test -n "$CC"; then
d6e01aa5
KL
3495 { echo "$as_me:$LINENO: result: $CC" >&5
3496echo "${ECHO_T}$CC" >&6; }
c4bb2108 3497else
d6e01aa5
KL
3498 { echo "$as_me:$LINENO: result: no" >&5
3499echo "${ECHO_T}no" >&6; }
503d2be0
AS
3500fi
3501
d6e01aa5 3502
503d2be0
AS
3503 test -n "$CC" && break
3504 done
3505fi
3506if test -z "$CC"; then
3507 ac_ct_CC=$CC
d6e01aa5 3508 for ac_prog in cl.exe
503d2be0
AS
3509do
3510 # Extract the first word of "$ac_prog", so it can be a program name with args.
3511set dummy $ac_prog; ac_word=$2
d6e01aa5
KL
3512{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3513echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3514if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
3516else
3517 if test -n "$ac_ct_CC"; then
3518 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3519else
c0d27fcc
MR
3520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3521for as_dir in $PATH
3522do
3523 IFS=$as_save_IFS
3524 test -z "$as_dir" && as_dir=.
3525 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3526 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3527 ac_cv_prog_ac_ct_CC="$ac_prog"
3528 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3529 break 2
3530 fi
3531done
503d2be0 3532done
d6e01aa5 3533IFS=$as_save_IFS
503d2be0 3534
c4bb2108 3535fi
503d2be0
AS
3536fi
3537ac_ct_CC=$ac_cv_prog_ac_ct_CC
3538if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3539 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3540echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3541else
d6e01aa5
KL
3542 { echo "$as_me:$LINENO: result: no" >&5
3543echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3544fi
3545
d6e01aa5 3546
503d2be0
AS
3547 test -n "$ac_ct_CC" && break
3548done
ba4481b5 3549
d6e01aa5
KL
3550 if test "x$ac_ct_CC" = x; then
3551 CC=""
3552 else
3553 case $cross_compiling:$ac_tool_warned in
3554yes:)
3555{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3556whose name does not start with the host triplet. If you think this
3557configuration is useful to you, please write to autoconf@gnu.org." >&5
3558echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3559whose name does not start with the host triplet. If you think this
3560configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3561ac_tool_warned=yes ;;
3562esac
3563 CC=$ac_ct_CC
3564 fi
503d2be0
AS
3565fi
3566
3567fi
ba4481b5 3568
c0d27fcc 3569
19650fd6
AS
3570test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3571See \`config.log' for more details." >&5
3572echo "$as_me: error: no acceptable C compiler found in \$PATH
3573See \`config.log' for more details." >&2;}
503d2be0 3574 { (exit 1); exit 1; }; }
c4bb2108 3575
503d2be0 3576# Provide some information about the compiler.
d6e01aa5 3577echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3578ac_compiler=`set X $ac_compile; echo $2`
d6e01aa5
KL
3579{ (ac_try="$ac_compiler --version >&5"
3580case "(($ac_try" in
3581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3582 *) ac_try_echo=$ac_try;;
3583esac
3584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3585 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3586 ac_status=$?
c0d27fcc 3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3588 (exit $ac_status); }
d6e01aa5
KL
3589{ (ac_try="$ac_compiler -v >&5"
3590case "(($ac_try" in
3591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592 *) ac_try_echo=$ac_try;;
3593esac
3594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3595 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3596 ac_status=$?
c0d27fcc 3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3598 (exit $ac_status); }
d6e01aa5
KL
3599{ (ac_try="$ac_compiler -V >&5"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
3604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3605 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3606 ac_status=$?
c0d27fcc 3607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3608 (exit $ac_status); }
3609
3610cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3611/* confdefs.h. */
3612_ACEOF
3613cat confdefs.h >>conftest.$ac_ext
3614cat >>conftest.$ac_ext <<_ACEOF
3615/* end confdefs.h. */
c4bb2108 3616
503d2be0
AS
3617int
3618main ()
3619{
3620
3621 ;
3622 return 0;
3623}
3624_ACEOF
3625ac_clean_files_save=$ac_clean_files
19650fd6 3626ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3627# Try to create an executable without -o first, disregard a.out.
3628# It will help us diagnose broken compilers, and finding out an intuition
3629# of exeext.
d6e01aa5
KL
3630{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3631echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3632ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
d6e01aa5
KL
3633#
3634# List of possible output files, starting from the most likely.
3635# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3636# only as a last resort. b.out is created by i960 compilers.
3637ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3638#
3639# The IRIX 6 linker writes into existing files which may not be
3640# executable, retaining their permissions. Remove them first so a
3641# subsequent execution test works.
3642ac_rmfiles=
3643for ac_file in $ac_files
3644do
3645 case $ac_file in
3646 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3647 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3648 esac
3649done
3650rm -f $ac_rmfiles
3651
3652if { (ac_try="$ac_link_default"
3653case "(($ac_try" in
3654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3655 *) ac_try_echo=$ac_try;;
3656esac
3657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3658 (eval "$ac_link_default") 2>&5
503d2be0 3659 ac_status=$?
c0d27fcc 3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3661 (exit $ac_status); }; then
d6e01aa5
KL
3662 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3663# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3664# in a Makefile. We should not override ac_cv_exeext if it was cached,
3665# so that the user can short-circuit this test for compilers unknown to
3666# Autoconf.
3667for ac_file in $ac_files ''
19650fd6 3668do
6bae0ccf 3669 test -f "$ac_file" || continue
503d2be0 3670 case $ac_file in
d6e01aa5 3671 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3672 ;;
19650fd6 3673 [ab].out )
edfaf76d
LK
3674 # We found the default executable, but exeext='' is most
3675 # certainly right.
3676 break;;
19650fd6 3677 *.* )
d6e01aa5
KL
3678 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3679 then :; else
3680 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3681 fi
3682 # We set ac_cv_exeext here because the later test for it is not
3683 # safe: cross compilers may not add the suffix if given an `-o'
3684 # argument, so we may need to know it at that point already.
3685 # Even if this section looks crufty: it has the advantage of
3686 # actually working.
edfaf76d 3687 break;;
19650fd6 3688 * )
edfaf76d 3689 break;;
503d2be0
AS
3690 esac
3691done
d6e01aa5
KL
3692test "$ac_cv_exeext" = no && ac_cv_exeext=
3693
503d2be0 3694else
d6e01aa5
KL
3695 ac_file=''
3696fi
3697
3698{ echo "$as_me:$LINENO: result: $ac_file" >&5
3699echo "${ECHO_T}$ac_file" >&6; }
3700if test -z "$ac_file"; then
503d2be0 3701 echo "$as_me: failed program was:" >&5
19650fd6
AS
3702sed 's/^/| /' conftest.$ac_ext >&5
3703
6bae0ccf 3704{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3705See \`config.log' for more details." >&5
6bae0ccf 3706echo "$as_me: error: C compiler cannot create executables
19650fd6 3707See \`config.log' for more details." >&2;}
503d2be0
AS
3708 { (exit 77); exit 77; }; }
3709fi
3710
3711ac_exeext=$ac_cv_exeext
503d2be0 3712
d6e01aa5 3713# Check that the compiler produces executables we can run. If not, either
503d2be0 3714# the compiler is broken, or we cross compile.
d6e01aa5
KL
3715{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3716echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3717# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3718# If not cross compiling, check that we can run a simple program.
3719if test "$cross_compiling" != yes; then
3720 if { ac_try='./$ac_file'
d6e01aa5
KL
3721 { (case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
3725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3726 (eval "$ac_try") 2>&5
503d2be0 3727 ac_status=$?
c0d27fcc 3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3729 (exit $ac_status); }; }; then
3730 cross_compiling=no
ba4481b5 3731 else
503d2be0
AS
3732 if test "$cross_compiling" = maybe; then
3733 cross_compiling=yes
3734 else
c0d27fcc 3735 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3736If you meant to cross compile, use \`--host'.
3737See \`config.log' for more details." >&5
503d2be0 3738echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3739If you meant to cross compile, use \`--host'.
3740See \`config.log' for more details." >&2;}
503d2be0
AS
3741 { (exit 1); exit 1; }; }
3742 fi
ba4481b5 3743 fi
503d2be0 3744fi
d6e01aa5
KL
3745{ echo "$as_me:$LINENO: result: yes" >&5
3746echo "${ECHO_T}yes" >&6; }
503d2be0 3747
19650fd6 3748rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3749ac_clean_files=$ac_clean_files_save
d6e01aa5 3750# Check that the compiler produces executables we can run. If not, either
503d2be0 3751# the compiler is broken, or we cross compile.
d6e01aa5
KL
3752{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3753echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3754{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3755echo "${ECHO_T}$cross_compiling" >&6; }
3756
3757{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3758echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3759if { (ac_try="$ac_link"
3760case "(($ac_try" in
3761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3762 *) ac_try_echo=$ac_try;;
3763esac
3764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3765 (eval "$ac_link") 2>&5
503d2be0 3766 ac_status=$?
c0d27fcc 3767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3768 (exit $ac_status); }; then
3769 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3770# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3771# work properly (i.e., refer to `conftest.exe'), while it won't with
3772# `rm'.
6bae0ccf
DL
3773for ac_file in conftest.exe conftest conftest.*; do
3774 test -f "$ac_file" || continue
503d2be0 3775 case $ac_file in
d6e01aa5 3776 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3777 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3778 break;;
503d2be0
AS
3779 * ) break;;
3780 esac
3781done
ba4481b5 3782else
19650fd6
AS
3783 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3784See \`config.log' for more details." >&5
3785echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3786See \`config.log' for more details." >&2;}
503d2be0 3787 { (exit 1); exit 1; }; }
ba4481b5 3788fi
ba4481b5 3789
503d2be0 3790rm -f conftest$ac_cv_exeext
d6e01aa5
KL
3791{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3792echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3793
503d2be0
AS
3794rm -f conftest.$ac_ext
3795EXEEXT=$ac_cv_exeext
3796ac_exeext=$EXEEXT
d6e01aa5
KL
3797{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3798echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3799if test "${ac_cv_objext+set}" = set; then
3800 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3801else
503d2be0 3802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3803/* confdefs.h. */
3804_ACEOF
3805cat confdefs.h >>conftest.$ac_ext
3806cat >>conftest.$ac_ext <<_ACEOF
3807/* end confdefs.h. */
ba4481b5 3808
503d2be0
AS
3809int
3810main ()
3811{
ba4481b5 3812
503d2be0
AS
3813 ;
3814 return 0;
3815}
3816_ACEOF
3817rm -f conftest.o conftest.obj
d6e01aa5
KL
3818if { (ac_try="$ac_compile"
3819case "(($ac_try" in
3820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3821 *) ac_try_echo=$ac_try;;
3822esac
3823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3824 (eval "$ac_compile") 2>&5
503d2be0 3825 ac_status=$?
c0d27fcc 3826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3827 (exit $ac_status); }; then
d6e01aa5
KL
3828 for ac_file in conftest.o conftest.obj conftest.*; do
3829 test -f "$ac_file" || continue;
503d2be0 3830 case $ac_file in
d6e01aa5 3831 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3832 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3833 break;;
3834 esac
3835done
c4bb2108 3836else
503d2be0 3837 echo "$as_me: failed program was:" >&5
19650fd6
AS
3838sed 's/^/| /' conftest.$ac_ext >&5
3839
3840{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3841See \`config.log' for more details." >&5
3842echo "$as_me: error: cannot compute suffix of object files: cannot compile
3843See \`config.log' for more details." >&2;}
503d2be0 3844 { (exit 1); exit 1; }; }
c4bb2108
DL
3845fi
3846
503d2be0
AS
3847rm -f conftest.$ac_cv_objext conftest.$ac_ext
3848fi
d6e01aa5
KL
3849{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3850echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3851OBJEXT=$ac_cv_objext
3852ac_objext=$OBJEXT
d6e01aa5
KL
3853{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3854echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3855if test "${ac_cv_c_compiler_gnu+set}" = set; then
3856 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3857else
503d2be0 3858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3859/* confdefs.h. */
3860_ACEOF
3861cat confdefs.h >>conftest.$ac_ext
3862cat >>conftest.$ac_ext <<_ACEOF
3863/* end confdefs.h. */
503d2be0
AS
3864
3865int
3866main ()
3867{
3868#ifndef __GNUC__
3869 choke me
3870#endif
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
3876rm -f conftest.$ac_objext
d6e01aa5
KL
3877if { (ac_try="$ac_compile"
3878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
3882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3883 (eval "$ac_compile") 2>conftest.er1
503d2be0 3884 ac_status=$?
edfaf76d
LK
3885 grep -v '^ *+' conftest.er1 >conftest.err
3886 rm -f conftest.er1
3887 cat conftest.err >&5
c0d27fcc 3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3889 (exit $ac_status); } && {
3890 test -z "$ac_c_werror_flag" ||
3891 test ! -s conftest.err
3892 } && test -s conftest.$ac_objext; then
503d2be0
AS
3893 ac_compiler_gnu=yes
3894else
3895 echo "$as_me: failed program was:" >&5
19650fd6
AS
3896sed 's/^/| /' conftest.$ac_ext >&5
3897
d6e01aa5 3898 ac_compiler_gnu=no
503d2be0 3899fi
d6e01aa5
KL
3900
3901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3902ac_cv_c_compiler_gnu=$ac_compiler_gnu
3903
3904fi
d6e01aa5
KL
3905{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3906echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3907GCC=`test $ac_compiler_gnu = yes && echo yes`
3908ac_test_CFLAGS=${CFLAGS+set}
3909ac_save_CFLAGS=$CFLAGS
d6e01aa5
KL
3910{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3911echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3912if test "${ac_cv_prog_cc_g+set}" = set; then
3913 echo $ECHO_N "(cached) $ECHO_C" >&6
3914else
d6e01aa5
KL
3915 ac_save_c_werror_flag=$ac_c_werror_flag
3916 ac_c_werror_flag=yes
3917 ac_cv_prog_cc_g=no
3918 CFLAGS="-g"
3919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3920/* confdefs.h. */
3921_ACEOF
3922cat confdefs.h >>conftest.$ac_ext
3923cat >>conftest.$ac_ext <<_ACEOF
3924/* end confdefs.h. */
503d2be0
AS
3925
3926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934rm -f conftest.$ac_objext
d6e01aa5
KL
3935if { (ac_try="$ac_compile"
3936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
3940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3941 (eval "$ac_compile") 2>conftest.er1
503d2be0 3942 ac_status=$?
edfaf76d
LK
3943 grep -v '^ *+' conftest.er1 >conftest.err
3944 rm -f conftest.er1
3945 cat conftest.err >&5
c0d27fcc 3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3947 (exit $ac_status); } && {
3948 test -z "$ac_c_werror_flag" ||
3949 test ! -s conftest.err
3950 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3951 ac_cv_prog_cc_g=yes
3952else
503d2be0 3953 echo "$as_me: failed program was:" >&5
19650fd6
AS
3954sed 's/^/| /' conftest.$ac_ext >&5
3955
d6e01aa5
KL
3956 CFLAGS=""
3957 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3958/* confdefs.h. */
3959_ACEOF
3960cat confdefs.h >>conftest.$ac_ext
3961cat >>conftest.$ac_ext <<_ACEOF
3962/* end confdefs.h. */
d6e01aa5
KL
3963
3964int
3965main ()
6bae0ccf 3966{
edfaf76d 3967
6bae0ccf
DL
3968 ;
3969 return 0;
3970}
3971_ACEOF
d6e01aa5
KL
3972rm -f conftest.$ac_objext
3973if { (ac_try="$ac_compile"
3974case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977esac
3978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3979 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3980 ac_status=$?
edfaf76d
LK
3981 grep -v '^ *+' conftest.er1 >conftest.err
3982 rm -f conftest.er1
3983 cat conftest.err >&5
6bae0ccf 3984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3985 (exit $ac_status); } && {
3986 test -z "$ac_c_werror_flag" ||
3987 test ! -s conftest.err
3988 } && test -s conftest.$ac_objext; then
3989 :
6bae0ccf
DL
3990else
3991 echo "$as_me: failed program was:" >&5
19650fd6
AS
3992sed 's/^/| /' conftest.$ac_ext >&5
3993
d6e01aa5
KL
3994 ac_c_werror_flag=$ac_save_c_werror_flag
3995 CFLAGS="-g"
3996 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3997/* confdefs.h. */
3998_ACEOF
3999cat confdefs.h >>conftest.$ac_ext
4000cat >>conftest.$ac_ext <<_ACEOF
4001/* end confdefs.h. */
d6e01aa5 4002
503d2be0
AS
4003int
4004main ()
4005{
d6e01aa5 4006
503d2be0
AS
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
d6e01aa5
KL
4012if { (ac_try="$ac_compile"
4013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
4017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4018 (eval "$ac_compile") 2>conftest.er1
503d2be0 4019 ac_status=$?
edfaf76d
LK
4020 grep -v '^ *+' conftest.er1 >conftest.err
4021 rm -f conftest.er1
4022 cat conftest.err >&5
c0d27fcc 4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4024 (exit $ac_status); } && {
4025 test -z "$ac_c_werror_flag" ||
4026 test ! -s conftest.err
4027 } && test -s conftest.$ac_objext; then
4028 ac_cv_prog_cc_g=yes
503d2be0
AS
4029else
4030 echo "$as_me: failed program was:" >&5
19650fd6
AS
4031sed 's/^/| /' conftest.$ac_ext >&5
4032
d6e01aa5 4033
503d2be0 4034fi
d6e01aa5
KL
4035
4036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037fi
4038
4039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4040fi
4041
4042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4043 ac_c_werror_flag=$ac_save_c_werror_flag
4044fi
4045{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4046echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4047if test "$ac_test_CFLAGS" = set; then
4048 CFLAGS=$ac_save_CFLAGS
4049elif test $ac_cv_prog_cc_g = yes; then
4050 if test "$GCC" = yes; then
4051 CFLAGS="-g -O2"
4052 else
4053 CFLAGS="-g"
4054 fi
4055else
4056 if test "$GCC" = yes; then
4057 CFLAGS="-O2"
4058 else
4059 CFLAGS=
4060 fi
4061fi
4062{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4063echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4064if test "${ac_cv_prog_cc_c89+set}" = set; then
4065 echo $ECHO_N "(cached) $ECHO_C" >&6
4066else
4067 ac_cv_prog_cc_c89=no
4068ac_save_CC=$CC
4069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4070/* confdefs.h. */
4071_ACEOF
4072cat confdefs.h >>conftest.$ac_ext
4073cat >>conftest.$ac_ext <<_ACEOF
4074/* end confdefs.h. */
d6e01aa5
KL
4075#include <stdarg.h>
4076#include <stdio.h>
4077#include <sys/types.h>
4078#include <sys/stat.h>
4079/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4080struct buf { int x; };
4081FILE * (*rcsopen) (struct buf *, struct stat *, int);
4082static char *e (p, i)
4083 char **p;
4084 int i;
4085{
4086 return p[i];
4087}
4088static char *f (char * (*g) (char **, int), char **p, ...)
4089{
4090 char *s;
4091 va_list v;
4092 va_start (v,p);
4093 s = g (p, va_arg (v,int));
4094 va_end (v);
4095 return s;
4096}
4097
4098/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4099 function prototypes and stuff, but not '\xHH' hex character constants.
4100 These don't provoke an error unfortunately, instead are silently treated
4101 as 'x'. The following induces an error, until -std is added to get
4102 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4103 array size at least. It's necessary to write '\x00'==0 to get something
4104 that's true only with -std. */
4105int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4106
4107/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4108 inside strings and character constants. */
4109#define FOO(x) 'x'
4110int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4111
4112int test (int i, double x);
4113struct s1 {int (*f) (int a);};
4114struct s2 {int (*f) (double a);};
4115int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4116int argc;
4117char **argv;
503d2be0
AS
4118int
4119main ()
4120{
d6e01aa5 4121return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4122 ;
4123 return 0;
4124}
4125_ACEOF
d6e01aa5
KL
4126for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4127 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4128do
4129 CC="$ac_save_CC $ac_arg"
4130 rm -f conftest.$ac_objext
4131if { (ac_try="$ac_compile"
4132case "(($ac_try" in
4133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134 *) ac_try_echo=$ac_try;;
4135esac
4136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4137 (eval "$ac_compile") 2>conftest.er1
503d2be0 4138 ac_status=$?
edfaf76d
LK
4139 grep -v '^ *+' conftest.er1 >conftest.err
4140 rm -f conftest.er1
4141 cat conftest.err >&5
c0d27fcc 4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4143 (exit $ac_status); } && {
4144 test -z "$ac_c_werror_flag" ||
4145 test ! -s conftest.err
4146 } && test -s conftest.$ac_objext; then
4147 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4148else
4149 echo "$as_me: failed program was:" >&5
19650fd6
AS
4150sed 's/^/| /' conftest.$ac_ext >&5
4151
d6e01aa5 4152
503d2be0 4153fi
d6e01aa5
KL
4154
4155rm -f core conftest.err conftest.$ac_objext
4156 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4157done
d6e01aa5
KL
4158rm -f conftest.$ac_ext
4159CC=$ac_save_CC
4160
503d2be0 4161fi
d6e01aa5
KL
4162# AC_CACHE_VAL
4163case "x$ac_cv_prog_cc_c89" in
4164 x)
4165 { echo "$as_me:$LINENO: result: none needed" >&5
4166echo "${ECHO_T}none needed" >&6; } ;;
4167 xno)
4168 { echo "$as_me:$LINENO: result: unsupported" >&5
4169echo "${ECHO_T}unsupported" >&6; } ;;
4170 *)
4171 CC="$CC $ac_cv_prog_cc_c89"
4172 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4173echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4174esac
ba4481b5 4175
19650fd6 4176
503d2be0
AS
4177ac_ext=c
4178ac_cpp='$CPP $CPPFLAGS'
4179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4181ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4182
c0d27fcc 4183
ba4481b5
DL
4184# On Suns, sometimes $CPP names a directory.
4185if test -n "$CPP" && test -d "$CPP"; then
4186 CPP=
4187fi
4188
089a966d
GM
4189## If not using gcc, and on Solaris, and no CPP specified, see if
4190## using a Sun compiler, which needs -Xs to prevent whitespace.
4191if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4192 test x"$CPP" = x; then
4193 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
4194echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
4195
4196if test "${emacs_cv_sunpro_c+set}" = set; then
4197 echo $ECHO_N "(cached) $ECHO_C" >&6
4198else
4199 cat >conftest.$ac_ext <<_ACEOF
4200/* confdefs.h. */
4201_ACEOF
4202cat confdefs.h >>conftest.$ac_ext
4203cat >>conftest.$ac_ext <<_ACEOF
4204/* end confdefs.h. */
4205
4206int
4207main ()
4208{
4209#ifndef __SUNPRO_C
4210fail;
4211#endif
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
4217rm -f conftest.$ac_objext conftest$ac_exeext
4218if { (ac_try="$ac_link"
4219case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4224 (eval "$ac_link") 2>conftest.er1
4225 ac_status=$?
4226 grep -v '^ *+' conftest.er1 >conftest.err
4227 rm -f conftest.er1
4228 cat conftest.err >&5
4229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230 (exit $ac_status); } && {
4231 test -z "$ac_c_werror_flag" ||
4232 test ! -s conftest.err
4233 } && test -s conftest$ac_exeext &&
4234 $as_test_x conftest$ac_exeext; then
4235 emacs_cv_sunpro_c=yes
4236else
4237 echo "$as_me: failed program was:" >&5
4238sed 's/^/| /' conftest.$ac_ext >&5
4239
4240 emacs_cv_sunpro_c=no
4241fi
4242
4243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4244 conftest$ac_exeext conftest.$ac_ext
4245fi
4246
4247 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
4248echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
4249
4250 if test x"$emacs_cv_sunpro_c" = xyes; then
4251 NON_GNU_CPP="$CC -E -Xs"
4252 fi
4253fi
4254
ba4481b5
DL
4255#### Some systems specify a CPP to use unless we are using GCC.
4256#### Now that we know whether we are using GCC, we can decide whether
4257#### to use that one.
4258if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4259then
4260 CPP="$NON_GNU_CPP"
4261fi
4262
4263#### Some systems specify a CC to use unless we are using GCC.
4264#### Now that we know whether we are using GCC, we can decide whether
4265#### to use that one.
4266if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4267 test x$cc_specified != xyes
4268then
4269 CC="$NON_GNU_CC"
4270fi
4271
4272if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4273then
4274 CC="$CC $GCC_TEST_OPTIONS"
4275fi
4276
4277if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4278then
4279 CC="$CC $NON_GCC_TEST_OPTIONS"
4280fi
4281
e143ad11
AS
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4287{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4288echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4289# On Suns, sometimes $CPP names a directory.
4290if test -n "$CPP" && test -d "$CPP"; then
4291 CPP=
4292fi
4293if test -z "$CPP"; then
4294 if test "${ac_cv_prog_CPP+set}" = set; then
4295 echo $ECHO_N "(cached) $ECHO_C" >&6
4296else
4297 # Double quotes because CPP needs to be expanded
4298 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4299 do
4300 ac_preproc_ok=false
4301for ac_c_preproc_warn_flag in '' yes
4302do
4303 # Use a header file that comes with gcc, so configuring glibc
4304 # with a fresh cross-compiler works.
4305 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4306 # <limits.h> exists even on freestanding compilers.
4307 # On the NeXT, cc -E runs the code through the compiler's parser,
4308 # not just through cpp. "Syntax error" is here to catch this case.
4309 cat >conftest.$ac_ext <<_ACEOF
4310/* confdefs.h. */
4311_ACEOF
4312cat confdefs.h >>conftest.$ac_ext
4313cat >>conftest.$ac_ext <<_ACEOF
4314/* end confdefs.h. */
4315#ifdef __STDC__
4316# include <limits.h>
4317#else
4318# include <assert.h>
4319#endif
4320 Syntax error
4321_ACEOF
d6e01aa5
KL
4322if { (ac_try="$ac_cpp conftest.$ac_ext"
4323case "(($ac_try" in
4324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4325 *) ac_try_echo=$ac_try;;
4326esac
4327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4328 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4329 ac_status=$?
4330 grep -v '^ *+' conftest.er1 >conftest.err
4331 rm -f conftest.er1
4332 cat conftest.err >&5
4333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4334 (exit $ac_status); } >/dev/null && {
4335 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4336 test ! -s conftest.err
4337 }; then
e143ad11
AS
4338 :
4339else
4340 echo "$as_me: failed program was:" >&5
4341sed 's/^/| /' conftest.$ac_ext >&5
4342
4343 # Broken: fails on valid input.
4344continue
4345fi
d6e01aa5 4346
e143ad11
AS
4347rm -f conftest.err conftest.$ac_ext
4348
d6e01aa5 4349 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4350 # can be detected and how.
4351 cat >conftest.$ac_ext <<_ACEOF
4352/* confdefs.h. */
4353_ACEOF
4354cat confdefs.h >>conftest.$ac_ext
4355cat >>conftest.$ac_ext <<_ACEOF
4356/* end confdefs.h. */
4357#include <ac_nonexistent.h>
4358_ACEOF
d6e01aa5
KL
4359if { (ac_try="$ac_cpp conftest.$ac_ext"
4360case "(($ac_try" in
4361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4362 *) ac_try_echo=$ac_try;;
4363esac
4364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4365 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4366 ac_status=$?
4367 grep -v '^ *+' conftest.er1 >conftest.err
4368 rm -f conftest.er1
4369 cat conftest.err >&5
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4371 (exit $ac_status); } >/dev/null && {
4372 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4373 test ! -s conftest.err
4374 }; then
e143ad11
AS
4375 # Broken: success on invalid input.
4376continue
4377else
4378 echo "$as_me: failed program was:" >&5
4379sed 's/^/| /' conftest.$ac_ext >&5
4380
4381 # Passes both tests.
4382ac_preproc_ok=:
4383break
4384fi
d6e01aa5 4385
e143ad11
AS
4386rm -f conftest.err conftest.$ac_ext
4387
4388done
4389# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4390rm -f conftest.err conftest.$ac_ext
4391if $ac_preproc_ok; then
4392 break
4393fi
4394
4395 done
4396 ac_cv_prog_CPP=$CPP
4397
4398fi
4399 CPP=$ac_cv_prog_CPP
4400else
4401 ac_cv_prog_CPP=$CPP
4402fi
d6e01aa5
KL
4403{ echo "$as_me:$LINENO: result: $CPP" >&5
4404echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4405ac_preproc_ok=false
4406for ac_c_preproc_warn_flag in '' yes
4407do
4408 # Use a header file that comes with gcc, so configuring glibc
4409 # with a fresh cross-compiler works.
4410 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4411 # <limits.h> exists even on freestanding compilers.
4412 # On the NeXT, cc -E runs the code through the compiler's parser,
4413 # not just through cpp. "Syntax error" is here to catch this case.
4414 cat >conftest.$ac_ext <<_ACEOF
4415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
4420#ifdef __STDC__
4421# include <limits.h>
4422#else
4423# include <assert.h>
4424#endif
4425 Syntax error
4426_ACEOF
d6e01aa5
KL
4427if { (ac_try="$ac_cpp conftest.$ac_ext"
4428case "(($ac_try" in
4429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4430 *) ac_try_echo=$ac_try;;
4431esac
4432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4433 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4434 ac_status=$?
4435 grep -v '^ *+' conftest.er1 >conftest.err
4436 rm -f conftest.er1
4437 cat conftest.err >&5
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4439 (exit $ac_status); } >/dev/null && {
4440 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4441 test ! -s conftest.err
4442 }; then
e143ad11
AS
4443 :
4444else
4445 echo "$as_me: failed program was:" >&5
4446sed 's/^/| /' conftest.$ac_ext >&5
4447
4448 # Broken: fails on valid input.
4449continue
4450fi
d6e01aa5 4451
e143ad11
AS
4452rm -f conftest.err conftest.$ac_ext
4453
d6e01aa5 4454 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4455 # can be detected and how.
4456 cat >conftest.$ac_ext <<_ACEOF
4457/* confdefs.h. */
4458_ACEOF
4459cat confdefs.h >>conftest.$ac_ext
4460cat >>conftest.$ac_ext <<_ACEOF
4461/* end confdefs.h. */
4462#include <ac_nonexistent.h>
4463_ACEOF
d6e01aa5
KL
4464if { (ac_try="$ac_cpp conftest.$ac_ext"
4465case "(($ac_try" in
4466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4467 *) ac_try_echo=$ac_try;;
4468esac
4469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4471 ac_status=$?
4472 grep -v '^ *+' conftest.er1 >conftest.err
4473 rm -f conftest.er1
4474 cat conftest.err >&5
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4476 (exit $ac_status); } >/dev/null && {
4477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4478 test ! -s conftest.err
4479 }; then
e143ad11
AS
4480 # Broken: success on invalid input.
4481continue
4482else
4483 echo "$as_me: failed program was:" >&5
4484sed 's/^/| /' conftest.$ac_ext >&5
4485
4486 # Passes both tests.
4487ac_preproc_ok=:
4488break
4489fi
d6e01aa5 4490
e143ad11
AS
4491rm -f conftest.err conftest.$ac_ext
4492
4493done
4494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4495rm -f conftest.err conftest.$ac_ext
4496if $ac_preproc_ok; then
4497 :
4498else
4499 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4500See \`config.log' for more details." >&5
4501echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4502See \`config.log' for more details." >&2;}
4503 { (exit 1); exit 1; }; }
4504fi
4505
4506ac_ext=c
4507ac_cpp='$CPP $CPPFLAGS'
4508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4510ac_compiler_gnu=$ac_cv_c_compiler_gnu
4511
4512
d6e01aa5
KL
4513{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4514echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4515if test "${ac_cv_path_GREP+set}" = set; then
4516 echo $ECHO_N "(cached) $ECHO_C" >&6
4517else
4518 # Extract the first word of "grep ggrep" to use in msg output
4519if test -z "$GREP"; then
4520set dummy grep ggrep; ac_prog_name=$2
4521if test "${ac_cv_path_GREP+set}" = set; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
4523else
4524 ac_path_GREP_found=false
4525# Loop through the user's path and test for each of PROGNAME-LIST
4526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4535 # Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 ac_count=`expr $ac_count + 1`
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563
4564 $ac_path_GREP_found && break 3
4565 done
4566done
4567
4568done
4569IFS=$as_save_IFS
4570
4571
4572fi
4573
4574GREP="$ac_cv_path_GREP"
4575if test -z "$GREP"; then
4576 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4577echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4578 { (exit 1); exit 1; }; }
4579fi
4580
4581else
4582 ac_cv_path_GREP=$GREP
4583fi
4584
4585
4586fi
4587{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4588echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4589 GREP="$ac_cv_path_GREP"
4590
4591
4592{ echo "$as_me:$LINENO: checking for egrep" >&5
4593echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4594if test "${ac_cv_path_EGREP+set}" = set; then
4595 echo $ECHO_N "(cached) $ECHO_C" >&6
4596else
4597 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4598 then ac_cv_path_EGREP="$GREP -E"
4599 else
4600 # Extract the first word of "egrep" to use in msg output
4601if test -z "$EGREP"; then
4602set dummy egrep; ac_prog_name=$2
4603if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4604 echo $ECHO_N "(cached) $ECHO_C" >&6
4605else
d6e01aa5
KL
4606 ac_path_EGREP_found=false
4607# Loop through the user's path and test for each of PROGNAME-LIST
4608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4610do
4611 IFS=$as_save_IFS
4612 test -z "$as_dir" && as_dir=.
4613 for ac_prog in egrep; do
4614 for ac_exec_ext in '' $ac_executable_extensions; do
4615 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4616 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4617 # Check for GNU ac_path_EGREP and select it if it is found.
4618 # Check for GNU $ac_path_EGREP
4619case `"$ac_path_EGREP" --version 2>&1` in
4620*GNU*)
4621 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4622*)
4623 ac_count=0
4624 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4625 while :
4626 do
4627 cat "conftest.in" "conftest.in" >"conftest.tmp"
4628 mv "conftest.tmp" "conftest.in"
4629 cp "conftest.in" "conftest.nl"
4630 echo 'EGREP' >> "conftest.nl"
4631 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4632 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4633 ac_count=`expr $ac_count + 1`
4634 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4635 # Best one so far, save it but keep looking for a better one
4636 ac_cv_path_EGREP="$ac_path_EGREP"
4637 ac_path_EGREP_max=$ac_count
e143ad11 4638 fi
d6e01aa5
KL
4639 # 10*(2^10) chars as input seems more than enough
4640 test $ac_count -gt 10 && break
4641 done
4642 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4643esac
4644
4645
4646 $ac_path_EGREP_found && break 3
4647 done
4648done
4649
4650done
4651IFS=$as_save_IFS
4652
4653
4654fi
4655
4656EGREP="$ac_cv_path_EGREP"
4657if test -z "$EGREP"; then
4658 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4659echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4660 { (exit 1); exit 1; }; }
4661fi
4662
4663else
4664 ac_cv_path_EGREP=$EGREP
e143ad11 4665fi
d6e01aa5
KL
4666
4667
4668 fi
4669fi
4670{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4671echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4672 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4673
4674
4675
d6e01aa5
KL
4676{ echo "$as_me:$LINENO: checking for AIX" >&5
4677echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4678cat >conftest.$ac_ext <<_ACEOF
4679/* confdefs.h. */
4680_ACEOF
4681cat confdefs.h >>conftest.$ac_ext
4682cat >>conftest.$ac_ext <<_ACEOF
4683/* end confdefs.h. */
4684#ifdef _AIX
4685 yes
4686#endif
4687
4688_ACEOF
4689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4690 $EGREP "yes" >/dev/null 2>&1; then
d6e01aa5
KL
4691 { echo "$as_me:$LINENO: result: yes" >&5
4692echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4693cat >>confdefs.h <<\_ACEOF
4694#define _ALL_SOURCE 1
4695_ACEOF
4696
4697else
d6e01aa5
KL
4698 { echo "$as_me:$LINENO: result: no" >&5
4699echo "${ECHO_T}no" >&6; }
e143ad11
AS
4700fi
4701rm -f conftest*
4702
4703
4704
4705cat >>confdefs.h <<\_ACEOF
4706#define _GNU_SOURCE 1
4707_ACEOF
4708
4709
4710
01abe918 4711### Use -Wno-pointer-sign if the compiler supports it
d6e01aa5
KL
4712{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4713echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4714SAVE_CFLAGS="$CFLAGS"
4715CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4716cat >conftest.$ac_ext <<_ACEOF
4717/* confdefs.h. */
4718_ACEOF
4719cat confdefs.h >>conftest.$ac_ext
4720cat >>conftest.$ac_ext <<_ACEOF
4721/* end confdefs.h. */
4722
4723int
4724main ()
4725{
4726
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
d6e01aa5
KL
4732if { (ac_try="$ac_compile"
4733case "(($ac_try" in
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4736esac
4737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4739 ac_status=$?
4740 grep -v '^ *+' conftest.er1 >conftest.err
4741 rm -f conftest.er1
4742 cat conftest.err >&5
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4744 (exit $ac_status); } && {
4745 test -z "$ac_c_werror_flag" ||
4746 test ! -s conftest.err
4747 } && test -s conftest.$ac_objext; then
01abe918
CY
4748 has_option=yes
4749else
4750 echo "$as_me: failed program was:" >&5
4751sed 's/^/| /' conftest.$ac_ext >&5
4752
d6e01aa5 4753 has_option=no
01abe918 4754fi
d6e01aa5
KL
4755
4756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4757if test $has_option = yes; then
4758 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4759fi
d6e01aa5
KL
4760{ echo "$as_me:$LINENO: result: $has_option" >&5
4761echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4762CFLAGS="$SAVE_CFLAGS"
4763unset has_option
4764unset SAVE_CFLAGS
4765
6a3a24fa 4766#### Some other nice autoconf tests.
ba4481b5 4767
d6e01aa5
KL
4768{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4769echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4770LN_S=$as_ln_s
4771if test "$LN_S" = "ln -s"; then
d6e01aa5
KL
4772 { echo "$as_me:$LINENO: result: yes" >&5
4773echo "${ECHO_T}yes" >&6; }
ba4481b5 4774else
d6e01aa5
KL
4775 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4776echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4777fi
4778
503d2be0
AS
4779ac_ext=c
4780ac_cpp='$CPP $CPPFLAGS'
4781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4783ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4784{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4785echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4786# On Suns, sometimes $CPP names a directory.
4787if test -n "$CPP" && test -d "$CPP"; then
4788 CPP=
4789fi
4790if test -z "$CPP"; then
503d2be0
AS
4791 if test "${ac_cv_prog_CPP+set}" = set; then
4792 echo $ECHO_N "(cached) $ECHO_C" >&6
4793else
4794 # Double quotes because CPP needs to be expanded
4795 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4796 do
4797 ac_preproc_ok=false
4798for ac_c_preproc_warn_flag in '' yes
4799do
4800 # Use a header file that comes with gcc, so configuring glibc
4801 # with a fresh cross-compiler works.
19650fd6
AS
4802 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4803 # <limits.h> exists even on freestanding compilers.
ba4481b5 4804 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4805 # not just through cpp. "Syntax error" is here to catch this case.
4806 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4807/* confdefs.h. */
4808_ACEOF
4809cat confdefs.h >>conftest.$ac_ext
4810cat >>conftest.$ac_ext <<_ACEOF
4811/* end confdefs.h. */
4812#ifdef __STDC__
4813# include <limits.h>
4814#else
4815# include <assert.h>
4816#endif
edfaf76d 4817 Syntax error
503d2be0 4818_ACEOF
d6e01aa5
KL
4819if { (ac_try="$ac_cpp conftest.$ac_ext"
4820case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4826 ac_status=$?
6bae0ccf 4827 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4828 rm -f conftest.er1
4829 cat conftest.err >&5
c0d27fcc 4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4831 (exit $ac_status); } >/dev/null && {
4832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4833 test ! -s conftest.err
4834 }; then
ba4481b5
DL
4835 :
4836else
503d2be0 4837 echo "$as_me: failed program was:" >&5
19650fd6
AS
4838sed 's/^/| /' conftest.$ac_ext >&5
4839
503d2be0
AS
4840 # Broken: fails on valid input.
4841continue
4842fi
d6e01aa5 4843
503d2be0
AS
4844rm -f conftest.err conftest.$ac_ext
4845
d6e01aa5 4846 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4847 # can be detected and how.
4848 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4849/* confdefs.h. */
4850_ACEOF
4851cat confdefs.h >>conftest.$ac_ext
4852cat >>conftest.$ac_ext <<_ACEOF
4853/* end confdefs.h. */
503d2be0
AS
4854#include <ac_nonexistent.h>
4855_ACEOF
d6e01aa5
KL
4856if { (ac_try="$ac_cpp conftest.$ac_ext"
4857case "(($ac_try" in
4858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4859 *) ac_try_echo=$ac_try;;
4860esac
4861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4862 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4863 ac_status=$?
6bae0ccf 4864 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4865 rm -f conftest.er1
4866 cat conftest.err >&5
c0d27fcc 4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4868 (exit $ac_status); } >/dev/null && {
4869 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4870 test ! -s conftest.err
4871 }; then
503d2be0
AS
4872 # Broken: success on invalid input.
4873continue
c4bb2108 4874else
503d2be0 4875 echo "$as_me: failed program was:" >&5
19650fd6
AS
4876sed 's/^/| /' conftest.$ac_ext >&5
4877
503d2be0
AS
4878 # Passes both tests.
4879ac_preproc_ok=:
4880break
4881fi
d6e01aa5 4882
503d2be0
AS
4883rm -f conftest.err conftest.$ac_ext
4884
4885done
4886# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4887rm -f conftest.err conftest.$ac_ext
4888if $ac_preproc_ok; then
4889 break
4890fi
4891
4892 done
4893 ac_cv_prog_CPP=$CPP
4894
4895fi
4896 CPP=$ac_cv_prog_CPP
4897else
4898 ac_cv_prog_CPP=$CPP
4899fi
d6e01aa5
KL
4900{ echo "$as_me:$LINENO: result: $CPP" >&5
4901echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4902ac_preproc_ok=false
4903for ac_c_preproc_warn_flag in '' yes
4904do
4905 # Use a header file that comes with gcc, so configuring glibc
4906 # with a fresh cross-compiler works.
19650fd6
AS
4907 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4908 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4909 # On the NeXT, cc -E runs the code through the compiler's parser,
4910 # not just through cpp. "Syntax error" is here to catch this case.
4911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
4917#ifdef __STDC__
4918# include <limits.h>
4919#else
4920# include <assert.h>
4921#endif
edfaf76d 4922 Syntax error
503d2be0 4923_ACEOF
d6e01aa5
KL
4924if { (ac_try="$ac_cpp conftest.$ac_ext"
4925case "(($ac_try" in
4926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4927 *) ac_try_echo=$ac_try;;
4928esac
4929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4931 ac_status=$?
6bae0ccf 4932 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4933 rm -f conftest.er1
4934 cat conftest.err >&5
c0d27fcc 4935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4936 (exit $ac_status); } >/dev/null && {
4937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4938 test ! -s conftest.err
4939 }; then
ba4481b5
DL
4940 :
4941else
503d2be0 4942 echo "$as_me: failed program was:" >&5
19650fd6
AS
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
503d2be0
AS
4945 # Broken: fails on valid input.
4946continue
4947fi
d6e01aa5 4948
503d2be0
AS
4949rm -f conftest.err conftest.$ac_ext
4950
d6e01aa5 4951 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4952 # can be detected and how.
4953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4954/* confdefs.h. */
4955_ACEOF
4956cat confdefs.h >>conftest.$ac_ext
4957cat >>conftest.$ac_ext <<_ACEOF
4958/* end confdefs.h. */
503d2be0
AS
4959#include <ac_nonexistent.h>
4960_ACEOF
d6e01aa5
KL
4961if { (ac_try="$ac_cpp conftest.$ac_ext"
4962case "(($ac_try" in
4963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964 *) ac_try_echo=$ac_try;;
4965esac
4966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4967 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4968 ac_status=$?
6bae0ccf 4969 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4970 rm -f conftest.er1
4971 cat conftest.err >&5
c0d27fcc 4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4973 (exit $ac_status); } >/dev/null && {
4974 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4975 test ! -s conftest.err
4976 }; then
503d2be0
AS
4977 # Broken: success on invalid input.
4978continue
4979else
4980 echo "$as_me: failed program was:" >&5
19650fd6
AS
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
503d2be0
AS
4983 # Passes both tests.
4984ac_preproc_ok=:
4985break
ba4481b5 4986fi
d6e01aa5 4987
503d2be0
AS
4988rm -f conftest.err conftest.$ac_ext
4989
4990done
4991# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4992rm -f conftest.err conftest.$ac_ext
4993if $ac_preproc_ok; then
4994 :
ba4481b5 4995else
19650fd6
AS
4996 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4997See \`config.log' for more details." >&5
4998echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4999See \`config.log' for more details." >&2;}
503d2be0 5000 { (exit 1); exit 1; }; }
ba4481b5 5001fi
503d2be0
AS
5002
5003ac_ext=c
5004ac_cpp='$CPP $CPPFLAGS'
5005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5007ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5008
5009# Find a good install program. We prefer a C program (faster),
5010# so one script is as good as another. But avoid the broken or
5011# incompatible versions:
5012# SysV /etc/install, /usr/sbin/install
5013# SunOS /usr/etc/install
5014# IRIX /sbin/install
5015# AIX /bin/install
503d2be0 5016# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5017# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5018# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5019# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5020# OS/2's system install, which has a completely different semantic
ba4481b5 5021# ./install, which can be erroneously created by make from ./install.sh.
d6e01aa5
KL
5022{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5023echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5024if test -z "$INSTALL"; then
503d2be0
AS
5025if test "${ac_cv_path_install+set}" = set; then
5026 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5027else
c0d27fcc
MR
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 # Account for people who put trailing slashes in PATH elements.
5034case $as_dir/ in
5035 ./ | .// | /cC/* | \
5036 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5037 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5038 /usr/ucb/* ) ;;
5039 *)
5040 # OSF1 and SCO ODT 3.0 have their own names for install.
5041 # Don't use installbsd from OSF since it installs stuff as root
5042 # by default.
5043 for ac_prog in ginstall scoinst install; do
5044 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5045 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5046 if test $ac_prog = install &&
5047 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5048 # AIX install. It has an incompatible calling convention.
5049 :
5050 elif test $ac_prog = install &&
5051 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5052 # program-specific install script used by HP pwplus--don't use.
5053 :
5054 else
5055 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5056 break 3
5057 fi
5058 fi
ba4481b5 5059 done
c0d27fcc
MR
5060 done
5061 ;;
5062esac
5063done
d6e01aa5 5064IFS=$as_save_IFS
c0d27fcc 5065
ba4481b5
DL
5066
5067fi
5068 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5069 INSTALL=$ac_cv_path_install
ba4481b5 5070 else
d6e01aa5
KL
5071 # As a last resort, use the slow shell script. Don't cache a
5072 # value for INSTALL within a source directory, because that will
ba4481b5 5073 # break other packages using the cache if that directory is
d6e01aa5 5074 # removed, or if the value is a relative name.
503d2be0 5075 INSTALL=$ac_install_sh
ba4481b5
DL
5076 fi
5077fi
d6e01aa5
KL
5078{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5079echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5080
5081# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5082# It thinks the first close brace ends the variable substitution.
5083test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5084
503d2be0 5085test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5086
ba4481b5
DL
5087test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5088
c0d27fcc
MR
5089if test "x$RANLIB" = x; then
5090 if test -n "$ac_tool_prefix"; then
5091 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5092set dummy ${ac_tool_prefix}ranlib; ac_word=$2
d6e01aa5
KL
5093{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5094echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5095if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5096 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5097else
5098 if test -n "$RANLIB"; then
5099 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5100else
c0d27fcc
MR
5101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
5106 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5108 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5110 break 2
5111 fi
5112done
503d2be0 5113done
d6e01aa5 5114IFS=$as_save_IFS
503d2be0 5115
7397acc4
DL
5116fi
5117fi
503d2be0 5118RANLIB=$ac_cv_prog_RANLIB
7397acc4 5119if test -n "$RANLIB"; then
d6e01aa5
KL
5120 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5121echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5122else
d6e01aa5
KL
5123 { echo "$as_me:$LINENO: result: no" >&5
5124echo "${ECHO_T}no" >&6; }
503d2be0
AS
5125fi
5126
d6e01aa5 5127
503d2be0
AS
5128fi
5129if test -z "$ac_cv_prog_RANLIB"; then
5130 ac_ct_RANLIB=$RANLIB
5131 # Extract the first word of "ranlib", so it can be a program name with args.
5132set dummy ranlib; ac_word=$2
d6e01aa5
KL
5133{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5134echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5135if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
5137else
5138 if test -n "$ac_ct_RANLIB"; then
5139 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5140else
c0d27fcc
MR
5141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144 IFS=$as_save_IFS
5145 test -z "$as_dir" && as_dir=.
5146 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5147 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5148 ac_cv_prog_ac_ct_RANLIB="ranlib"
5149 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5150 break 2
5151 fi
5152done
503d2be0 5153done
d6e01aa5 5154IFS=$as_save_IFS
503d2be0 5155
503d2be0
AS
5156fi
5157fi
5158ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5159if test -n "$ac_ct_RANLIB"; then
d6e01aa5
KL
5160 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5161echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5162else
d6e01aa5
KL
5163 { echo "$as_me:$LINENO: result: no" >&5
5164echo "${ECHO_T}no" >&6; }
503d2be0
AS
5165fi
5166
d6e01aa5
KL
5167 if test "x$ac_ct_RANLIB" = x; then
5168 RANLIB=":"
5169 else
5170 case $cross_compiling:$ac_tool_warned in
5171yes:)
5172{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5173whose name does not start with the host triplet. If you think this
5174configuration is useful to you, please write to autoconf@gnu.org." >&5
5175echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5176whose name does not start with the host triplet. If you think this
5177configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5178ac_tool_warned=yes ;;
5179esac
5180 RANLIB=$ac_ct_RANLIB
5181 fi
7397acc4 5182else
503d2be0 5183 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5184fi
5185
5186fi
9e71690e
DK
5187# Extract the first word of "install-info", so it can be a program name with args.
5188set dummy install-info; ac_word=$2
d6e01aa5
KL
5189{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5191if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5192 echo $ECHO_N "(cached) $ECHO_C" >&6
5193else
5194 case $INSTALL_INFO in
5195 [\\/]* | ?:[\\/]*)
5196 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5197 ;;
5198 *)
5199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
5204 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5206 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5207 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5208 break 2
5209 fi
5210done
5211done
d6e01aa5 5212IFS=$as_save_IFS
9e71690e
DK
5213
5214 ;;
5215esac
5216fi
5217INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5218if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5219 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5220echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5221else
d6e01aa5
KL
5222 { echo "$as_me:$LINENO: result: no" >&5
5223echo "${ECHO_T}no" >&6; }
9e71690e
DK
5224fi
5225
d6e01aa5 5226
9e71690e
DK
5227# Extract the first word of "install-info", so it can be a program name with args.
5228set dummy install-info; ac_word=$2
d6e01aa5
KL
5229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5231if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5232 echo $ECHO_N "(cached) $ECHO_C" >&6
5233else
5234 case $INSTALL_INFO in
5235 [\\/]* | ?:[\\/]*)
5236 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5237 ;;
5238 *)
5239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in /usr/sbin
5241do
5242 IFS=$as_save_IFS
5243 test -z "$as_dir" && as_dir=.
5244 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5246 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5248 break 2
5249 fi
5250done
5251done
d6e01aa5 5252IFS=$as_save_IFS
9e71690e
DK
5253
5254 ;;
5255esac
5256fi
5257INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5258if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5259 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5260echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5261else
d6e01aa5
KL
5262 { echo "$as_me:$LINENO: result: no" >&5
5263echo "${ECHO_T}no" >&6; }
9e71690e
DK
5264fi
5265
d6e01aa5 5266
9e71690e
DK
5267# Extract the first word of "install-info", so it can be a program name with args.
5268set dummy install-info; ac_word=$2
d6e01aa5
KL
5269{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5271if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273else
5274 case $INSTALL_INFO in
5275 [\\/]* | ?:[\\/]*)
5276 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5277 ;;
5278 *)
5279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5280for as_dir in /sbin
5281do
5282 IFS=$as_save_IFS
5283 test -z "$as_dir" && as_dir=.
5284 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5286 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5288 break 2
5289 fi
5290done
5291done
d6e01aa5 5292IFS=$as_save_IFS
9e71690e
DK
5293
5294 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5295 ;;
5296esac
5297fi
5298INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5299if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5300 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5301echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5302else
d6e01aa5
KL
5303 { echo "$as_me:$LINENO: result: no" >&5
5304echo "${ECHO_T}no" >&6; }
9e71690e
DK
5305fi
5306
d6e01aa5 5307
8ae52ca6
RF
5308# Extract the first word of "gzip", so it can be a program name with args.
5309set dummy gzip; ac_word=$2
d6e01aa5
KL
5310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5312if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5313 echo $ECHO_N "(cached) $ECHO_C" >&6
5314else
46e35e9f 5315 case $GZIP_PROG in
8ae52ca6 5316 [\\/]* | ?:[\\/]*)
46e35e9f 5317 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5318 ;;
5319 *)
5320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5321for as_dir in $PATH
5322do
5323 IFS=$as_save_IFS
5324 test -z "$as_dir" && as_dir=.
5325 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5327 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5329 break 2
5330 fi
5331done
5332done
d6e01aa5 5333IFS=$as_save_IFS
8ae52ca6
RF
5334
5335 ;;
5336esac
5337fi
46e35e9f 5338GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5339if test -n "$GZIP_PROG"; then
d6e01aa5
KL
5340 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5341echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5342else
d6e01aa5
KL
5343 { echo "$as_me:$LINENO: result: no" >&5
5344echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5345fi
5346
ba4481b5 5347
c0d27fcc 5348
d6e01aa5 5349
c982cf7d
JD
5350## Need makeinfo >= 4.6 (?) to build the manuals.
5351# Extract the first word of "makeinfo", so it can be a program name with args.
5352set dummy makeinfo; ac_word=$2
5353{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5355if test "${ac_cv_path_MAKEINFO+set}" = set; then
5356 echo $ECHO_N "(cached) $ECHO_C" >&6
5357else
5358 case $MAKEINFO in
5359 [\\/]* | ?:[\\/]*)
5360 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5361 ;;
5362 *)
5363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366 IFS=$as_save_IFS
5367 test -z "$as_dir" && as_dir=.
5368 for ac_exec_ext in '' $ac_executable_extensions; do
5369 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5370 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5372 break 2
5373 fi
5374done
5375done
5376IFS=$as_save_IFS
5377
5378 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5379 ;;
5380esac
5381fi
5382MAKEINFO=$ac_cv_path_MAKEINFO
5383if test -n "$MAKEINFO"; then
5384 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5385echo "${ECHO_T}$MAKEINFO" >&6; }
5386else
5387 { echo "$as_me:$LINENO: result: no" >&5
5388echo "${ECHO_T}no" >&6; }
5389fi
5390
5391
5392if test "$MAKEINFO" != "no" && \
d4840f44 5393 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
5394 MAKEINFO=no
5395fi
5396
5397if test "$MAKEINFO" = "no"; then
5398 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
5399echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
5400 { (exit 1); exit 1; }; }
5401fi
5402
5403
5404
8e967cf7
MR
5405if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5406then
5407 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5408fi
5409
5410if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5411then
5412 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5413fi
5414
c0d27fcc 5415
fe239f0f 5416late_LDFLAGS=$LDFLAGS
4af002d6 5417if test "$GCC" = yes; then
fe239f0f
AS
5418 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5419else
5420 LDFLAGS="$LDFLAGS -znocombreloc"
5421fi
5422
d6e01aa5
KL
5423{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5424echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5425cat >conftest.$ac_ext <<_ACEOF
5426main(){return 0;}
5427_ACEOF
5428rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
5429if { (ac_try="$ac_link"
5430case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433esac
5434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5435 (eval "$ac_link") 2>conftest.er1
fe239f0f 5436 ac_status=$?
edfaf76d
LK
5437 grep -v '^ *+' conftest.er1 >conftest.err
5438 rm -f conftest.er1
5439 cat conftest.err >&5
fe239f0f 5440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5441 (exit $ac_status); } && {
5442 test -z "$ac_c_werror_flag" ||
5443 test ! -s conftest.err
5444 } && test -s conftest$ac_exeext &&
5445 $as_test_x conftest$ac_exeext; then
5446 { echo "$as_me:$LINENO: result: yes" >&5
5447echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5448else
5449 echo "$as_me: failed program was:" >&5
5450sed 's/^/| /' conftest.$ac_ext >&5
5451
d6e01aa5
KL
5452 LDFLAGS=$late_LDFLAGS
5453 { echo "$as_me:$LINENO: result: no" >&5
5454echo "${ECHO_T}no" >&6; }
fe239f0f 5455fi
d6e01aa5
KL
5456
5457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5458 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5459
3b33a005
DL
5460#### Extract some information from the operating system and machine files.
5461
c0d27fcc 5462{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5463 - which libraries the lib-src programs will want, and
503d2be0
AS
5464 - whether the GNU malloc routines are usable..." >&5
5465echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5466 - which libraries the lib-src programs will want, and
503d2be0 5467 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5468
5469### First figure out CFLAGS (which we use for running the compiler here)
5470### and REAL_CFLAGS (which we use for real compilation).
5471### The two are the same except on a few systems, where they are made
5472### different to work around various lossages. For example,
5473### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5474### as implying static linking.
5475
5476### If the CFLAGS env var is specified, we use that value
5477### instead of the default.
5478
5479### It's not important that this name contain the PID; you can't run
5480### two configures in the same directory and have anything work
5481### anyway.
5482tempcname="conftest.c"
5483
5484echo '
5485#include "'${srcdir}'/src/'${opsysfile}'"
5486#include "'${srcdir}'/src/'${machfile}'"
5487#ifndef LIBS_MACHINE
5488#define LIBS_MACHINE
5489#endif
5490#ifndef LIBS_SYSTEM
5491#define LIBS_SYSTEM
5492#endif
5493#ifndef C_SWITCH_SYSTEM
5494#define C_SWITCH_SYSTEM
5495#endif
5496#ifndef C_SWITCH_MACHINE
5497#define C_SWITCH_MACHINE
5498#endif
5499configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5500configure___ c_switch_system=C_SWITCH_SYSTEM
5501configure___ c_switch_machine=C_SWITCH_MACHINE
5502
5503#ifndef LIB_X11_LIB
5504#define LIB_X11_LIB -lX11
5505#endif
5506
5507#ifndef LIBX11_MACHINE
5508#define LIBX11_MACHINE
5509#endif
5510
5511#ifndef LIBX11_SYSTEM
5512#define LIBX11_SYSTEM
5513#endif
5514configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5515
5516#ifdef UNEXEC
5517configure___ unexec=UNEXEC
5518#else
5519configure___ unexec=unexec.o
5520#endif
5521
5522#ifdef SYSTEM_MALLOC
5523configure___ system_malloc=yes
5524#else
5525configure___ system_malloc=no
5526#endif
5527
ef9e4345
GM
5528#ifdef USE_MMAP_FOR_BUFFERS
5529configure___ use_mmap_for_buffers=yes
73b77ee5 5530#else
ef9e4345 5531configure___ use_mmap_for_buffers=no
73b77ee5
GM
5532#endif
5533
3b33a005
DL
5534#ifndef C_DEBUG_SWITCH
5535#define C_DEBUG_SWITCH -g
5536#endif
5537
5538#ifndef C_OPTIMIZE_SWITCH
5539#ifdef __GNUC__
5540#define C_OPTIMIZE_SWITCH -O2
5541#else
5542#define C_OPTIMIZE_SWITCH -O
5543#endif
5544#endif
5545
01abe918
CY
5546#ifndef C_WARNINGS_SWITCH
5547#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5548#endif
5549
3b33a005
DL
5550#ifndef LD_SWITCH_MACHINE
5551#define LD_SWITCH_MACHINE
5552#endif
5553
5554#ifndef LD_SWITCH_SYSTEM
5555#define LD_SWITCH_SYSTEM
5556#endif
5557
5558#ifndef LD_SWITCH_X_SITE_AUX
5559#define LD_SWITCH_X_SITE_AUX
503d2be0 5560#endif
3b33a005
DL
5561
5562configure___ ld_switch_system=LD_SWITCH_SYSTEM
5563configure___ ld_switch_machine=LD_SWITCH_MACHINE
5564
5565#ifdef THIS_IS_CONFIGURE
5566
5567/* Get the CFLAGS for tests in configure. */
5568#ifdef __GNUC__
5569configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5570#else
5571configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5572#endif
5573
5574#else /* not THIS_IS_CONFIGURE */
5575
5576/* Get the CFLAGS for real compilation. */
5577#ifdef __GNUC__
01abe918 5578configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5579#else
5580configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5581#endif
5582
5583#endif /* not THIS_IS_CONFIGURE */
5584' > ${tempcname}
5585
5586# The value of CPP is a quoted variable reference, so we need to do this
5587# to get its actual value...
5588CPP=`eval "echo $CPP"`
5589eval `${CPP} -Isrc ${tempcname} \
5590 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5591if test "x$SPECIFIED_CFLAGS" = x; then
5592 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5593 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5594else
5595 REAL_CFLAGS="$CFLAGS"
5596fi
5597rm ${tempcname}
5598
5599ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5600
5601### Make sure subsequent tests use flags consistent with the build flags.
5602
5603if test x"${OVERRIDE_CPPFLAGS}" != x; then
5604 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5605else
5606 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5607fi
5608
6bae0ccf
DL
5609
5610
d6e01aa5 5611# Check whether --enable-largefile was given.
f4988be7 5612if test "${enable_largefile+set}" = set; then
d6e01aa5
KL
5613 enableval=$enable_largefile;
5614fi
f4988be7 5615
503d2be0 5616if test "$enable_largefile" != no; then
f4988be7 5617
d6e01aa5
KL
5618 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5619echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5620if test "${ac_cv_sys_largefile_CC+set}" = set; then
5621 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5622else
f4988be7 5623 ac_cv_sys_largefile_CC=no
503d2be0
AS
5624 if test "$GCC" != yes; then
5625 ac_save_CC=$CC
5626 while :; do
d6e01aa5
KL
5627 # IRIX 6.2 and later do not support large files by default,
5628 # so use the C compiler's -n32 option if that helps.
edfaf76d 5629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5630/* confdefs.h. */
5631_ACEOF
5632cat confdefs.h >>conftest.$ac_ext
5633cat >>conftest.$ac_ext <<_ACEOF
5634/* end confdefs.h. */
f4988be7 5635#include <sys/types.h>
503d2be0
AS
5636 /* Check that off_t can represent 2**63 - 1 correctly.
5637 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5638 since some C++ compilers masquerading as C compilers
5639 incorrectly reject 9223372036854775807. */
5640#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5641 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5642 && LARGE_OFF_T % 2147483647 == 1)
5643 ? 1 : -1];
5644int
5645main ()
5646{
f4988be7 5647
503d2be0
AS
5648 ;
5649 return 0;
5650}
5651_ACEOF
d6e01aa5
KL
5652 rm -f conftest.$ac_objext
5653if { (ac_try="$ac_compile"
5654case "(($ac_try" in
5655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5656 *) ac_try_echo=$ac_try;;
5657esac
5658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5659 (eval "$ac_compile") 2>conftest.er1
503d2be0 5660 ac_status=$?
edfaf76d
LK
5661 grep -v '^ *+' conftest.er1 >conftest.err
5662 rm -f conftest.er1
5663 cat conftest.err >&5
c0d27fcc 5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5665 (exit $ac_status); } && {
5666 test -z "$ac_c_werror_flag" ||
5667 test ! -s conftest.err
5668 } && test -s conftest.$ac_objext; then
503d2be0 5669 break
b192d653 5670else
503d2be0 5671 echo "$as_me: failed program was:" >&5
19650fd6
AS
5672sed 's/^/| /' conftest.$ac_ext >&5
5673
d6e01aa5 5674
503d2be0 5675fi
d6e01aa5
KL
5676
5677rm -f core conftest.err conftest.$ac_objext
5678 CC="$CC -n32"
5679 rm -f conftest.$ac_objext
5680if { (ac_try="$ac_compile"
5681case "(($ac_try" in
5682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5683 *) ac_try_echo=$ac_try;;
5684esac
5685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5686 (eval "$ac_compile") 2>conftest.er1
503d2be0 5687 ac_status=$?
edfaf76d
LK
5688 grep -v '^ *+' conftest.er1 >conftest.err
5689 rm -f conftest.er1
5690 cat conftest.err >&5
c0d27fcc 5691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5692 (exit $ac_status); } && {
5693 test -z "$ac_c_werror_flag" ||
5694 test ! -s conftest.err
5695 } && test -s conftest.$ac_objext; then
503d2be0
AS
5696 ac_cv_sys_largefile_CC=' -n32'; break
5697else
5698 echo "$as_me: failed program was:" >&5
19650fd6
AS
5699sed 's/^/| /' conftest.$ac_ext >&5
5700
d6e01aa5 5701
503d2be0 5702fi
d6e01aa5
KL
5703
5704rm -f core conftest.err conftest.$ac_objext
edfaf76d 5705 break
503d2be0
AS
5706 done
5707 CC=$ac_save_CC
5708 rm -f conftest.$ac_ext
5709 fi
b192d653 5710fi
d6e01aa5
KL
5711{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5712echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5713 if test "$ac_cv_sys_largefile_CC" != no; then
5714 CC=$CC$ac_cv_sys_largefile_CC
5715 fi
b192d653 5716
d6e01aa5
KL
5717 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5718echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5719if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5721else
503d2be0 5722 while :; do
503d2be0 5723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5724/* confdefs.h. */
5725_ACEOF
5726cat confdefs.h >>conftest.$ac_ext
5727cat >>conftest.$ac_ext <<_ACEOF
5728/* end confdefs.h. */
f4988be7 5729#include <sys/types.h>
503d2be0
AS
5730 /* Check that off_t can represent 2**63 - 1 correctly.
5731 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5732 since some C++ compilers masquerading as C compilers
5733 incorrectly reject 9223372036854775807. */
5734#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5735 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5736 && LARGE_OFF_T % 2147483647 == 1)
5737 ? 1 : -1];
5738int
5739main ()
5740{
f4988be7 5741
503d2be0
AS
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746rm -f conftest.$ac_objext
d6e01aa5
KL
5747if { (ac_try="$ac_compile"
5748case "(($ac_try" in
5749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5750 *) ac_try_echo=$ac_try;;
5751esac
5752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5753 (eval "$ac_compile") 2>conftest.er1
503d2be0 5754 ac_status=$?
edfaf76d
LK
5755 grep -v '^ *+' conftest.er1 >conftest.err
5756 rm -f conftest.er1
5757 cat conftest.err >&5
c0d27fcc 5758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5759 (exit $ac_status); } && {
5760 test -z "$ac_c_werror_flag" ||
5761 test ! -s conftest.err
5762 } && test -s conftest.$ac_objext; then
5763 ac_cv_sys_file_offset_bits=no; break
f4988be7 5764else
503d2be0 5765 echo "$as_me: failed program was:" >&5
19650fd6
AS
5766sed 's/^/| /' conftest.$ac_ext >&5
5767
d6e01aa5 5768
503d2be0 5769fi
d6e01aa5
KL
5770
5771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5773/* confdefs.h. */
5774_ACEOF
5775cat confdefs.h >>conftest.$ac_ext
5776cat >>conftest.$ac_ext <<_ACEOF
5777/* end confdefs.h. */
f4988be7
GM
5778#define _FILE_OFFSET_BITS 64
5779#include <sys/types.h>
503d2be0
AS
5780 /* Check that off_t can represent 2**63 - 1 correctly.
5781 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5782 since some C++ compilers masquerading as C compilers
5783 incorrectly reject 9223372036854775807. */
5784#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5785 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5786 && LARGE_OFF_T % 2147483647 == 1)
5787 ? 1 : -1];
5788int
5789main ()
5790{
5791
5792 ;
5793 return 0;
5794}
5795_ACEOF
5796rm -f conftest.$ac_objext
d6e01aa5
KL
5797if { (ac_try="$ac_compile"
5798case "(($ac_try" in
5799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5800 *) ac_try_echo=$ac_try;;
5801esac
5802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5803 (eval "$ac_compile") 2>conftest.er1
503d2be0 5804 ac_status=$?
edfaf76d
LK
5805 grep -v '^ *+' conftest.er1 >conftest.err
5806 rm -f conftest.er1
5807 cat conftest.err >&5
c0d27fcc 5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5809 (exit $ac_status); } && {
5810 test -z "$ac_c_werror_flag" ||
5811 test ! -s conftest.err
5812 } && test -s conftest.$ac_objext; then
503d2be0
AS
5813 ac_cv_sys_file_offset_bits=64; break
5814else
5815 echo "$as_me: failed program was:" >&5
19650fd6
AS
5816sed 's/^/| /' conftest.$ac_ext >&5
5817
d6e01aa5 5818
503d2be0 5819fi
d6e01aa5
KL
5820
5821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5823 break
5824done
ba4481b5 5825fi
d6e01aa5
KL
5826{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5827echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
5828case $ac_cv_sys_file_offset_bits in #(
5829 no | unknown) ;;
5830 *)
c0d27fcc 5831cat >>confdefs.h <<_ACEOF
f4988be7 5832#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5833_ACEOF
d6e01aa5
KL
5834;;
5835esac
503d2be0 5836rm -f conftest*
d6e01aa5
KL
5837 if test $ac_cv_sys_file_offset_bits = unknown; then
5838 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5839echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5840if test "${ac_cv_sys_large_files+set}" = set; then
5841 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5842else
503d2be0 5843 while :; do
503d2be0 5844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5845/* confdefs.h. */
5846_ACEOF
5847cat confdefs.h >>conftest.$ac_ext
5848cat >>conftest.$ac_ext <<_ACEOF
5849/* end confdefs.h. */
503d2be0
AS
5850#include <sys/types.h>
5851 /* Check that off_t can represent 2**63 - 1 correctly.
5852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5853 since some C++ compilers masquerading as C compilers
5854 incorrectly reject 9223372036854775807. */
5855#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5857 && LARGE_OFF_T % 2147483647 == 1)
5858 ? 1 : -1];
5859int
5860main ()
5861{
ba4481b5 5862
503d2be0
AS
5863 ;
5864 return 0;
5865}
5866_ACEOF
5867rm -f conftest.$ac_objext
d6e01aa5
KL
5868if { (ac_try="$ac_compile"
5869case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872esac
5873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5874 (eval "$ac_compile") 2>conftest.er1
503d2be0 5875 ac_status=$?
edfaf76d
LK
5876 grep -v '^ *+' conftest.er1 >conftest.err
5877 rm -f conftest.er1
5878 cat conftest.err >&5
c0d27fcc 5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5880 (exit $ac_status); } && {
5881 test -z "$ac_c_werror_flag" ||
5882 test ! -s conftest.err
5883 } && test -s conftest.$ac_objext; then
5884 ac_cv_sys_large_files=no; break
ba4481b5 5885else
503d2be0 5886 echo "$as_me: failed program was:" >&5
19650fd6
AS
5887sed 's/^/| /' conftest.$ac_ext >&5
5888
d6e01aa5 5889
503d2be0 5890fi
d6e01aa5
KL
5891
5892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5893 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5894/* confdefs.h. */
5895_ACEOF
5896cat confdefs.h >>conftest.$ac_ext
5897cat >>conftest.$ac_ext <<_ACEOF
5898/* end confdefs.h. */
f4988be7 5899#define _LARGE_FILES 1
503d2be0
AS
5900#include <sys/types.h>
5901 /* Check that off_t can represent 2**63 - 1 correctly.
5902 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5903 since some C++ compilers masquerading as C compilers
5904 incorrectly reject 9223372036854775807. */
5905#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5906 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5907 && LARGE_OFF_T % 2147483647 == 1)
5908 ? 1 : -1];
5909int
5910main ()
5911{
f4988be7 5912
503d2be0
AS
5913 ;
5914 return 0;
5915}
5916_ACEOF
5917rm -f conftest.$ac_objext
d6e01aa5
KL
5918if { (ac_try="$ac_compile"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
5923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5924 (eval "$ac_compile") 2>conftest.er1
503d2be0 5925 ac_status=$?
edfaf76d
LK
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
c0d27fcc 5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
5933 } && test -s conftest.$ac_objext; then
503d2be0
AS
5934 ac_cv_sys_large_files=1; break
5935else
5936 echo "$as_me: failed program was:" >&5
19650fd6
AS
5937sed 's/^/| /' conftest.$ac_ext >&5
5938
d6e01aa5 5939
503d2be0 5940fi
d6e01aa5
KL
5941
5942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5943 ac_cv_sys_large_files=unknown
503d2be0
AS
5944 break
5945done
ba4481b5 5946fi
d6e01aa5
KL
5947{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5948echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
5949case $ac_cv_sys_large_files in #(
5950 no | unknown) ;;
5951 *)
c0d27fcc 5952cat >>confdefs.h <<_ACEOF
f4988be7 5953#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5954_ACEOF
d6e01aa5
KL
5955;;
5956esac
503d2be0 5957rm -f conftest*
d6e01aa5 5958 fi
503d2be0 5959fi
ba4481b5 5960
c0d27fcc 5961
439f58ee 5962
bc5d9888
CY
5963### The standard library on x86-64 GNU/Linux distributions can
5964### be located in either /usr/lib64 or /usr/lib.
5965case "${canonical}" in
5966 x86_64-*-linux-gnu* )
5967 if test -d /usr/lib64; then
5968
5969cat >>confdefs.h <<\_ACEOF
5970#define HAVE_X86_64_LIB64_DIR 1
5971_ACEOF
5972
5973fi
5974esac
5975
439f58ee
JD
5976
5977
5978
2c9dccc9
PJ
5979if test "${with_sound}" != "no"; then
5980 # Sound support for GNU/Linux and the free BSDs.
d6e01aa5
KL
5981 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5982echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5983if test "${ac_cv_header_stdc+set}" = set; then
5984 echo $ECHO_N "(cached) $ECHO_C" >&6
5985else
5986 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5987/* confdefs.h. */
5988_ACEOF
5989cat confdefs.h >>conftest.$ac_ext
5990cat >>conftest.$ac_ext <<_ACEOF
5991/* end confdefs.h. */
c0d27fcc
MR
5992#include <stdlib.h>
5993#include <stdarg.h>
5994#include <string.h>
5995#include <float.h>
98418dba 5996
19650fd6
AS
5997int
5998main ()
5999{
6000
6001 ;
6002 return 0;
6003}
c0d27fcc 6004_ACEOF
19650fd6 6005rm -f conftest.$ac_objext
d6e01aa5
KL
6006if { (ac_try="$ac_compile"
6007case "(($ac_try" in
6008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6009 *) ac_try_echo=$ac_try;;
6010esac
6011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6012 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6013 ac_status=$?
edfaf76d
LK
6014 grep -v '^ *+' conftest.er1 >conftest.err
6015 rm -f conftest.er1
6016 cat conftest.err >&5
cd958eb3 6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6018 (exit $ac_status); } && {
6019 test -z "$ac_c_werror_flag" ||
6020 test ! -s conftest.err
6021 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6022 ac_cv_header_stdc=yes
6023else
6024 echo "$as_me: failed program was:" >&5
19650fd6
AS
6025sed 's/^/| /' conftest.$ac_ext >&5
6026
d6e01aa5 6027 ac_cv_header_stdc=no
c0d27fcc 6028fi
d6e01aa5
KL
6029
6030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
6031
6032if test $ac_cv_header_stdc = yes; then
6033 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6034 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6035/* confdefs.h. */
6036_ACEOF
6037cat confdefs.h >>conftest.$ac_ext
6038cat >>conftest.$ac_ext <<_ACEOF
6039/* end confdefs.h. */
c0d27fcc
MR
6040#include <string.h>
6041
6042_ACEOF
6043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6044 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
6045 :
6046else
6047 ac_cv_header_stdc=no
6048fi
6049rm -f conftest*
6050
6051fi
6052
6053if test $ac_cv_header_stdc = yes; then
6054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6056/* confdefs.h. */
6057_ACEOF
6058cat confdefs.h >>conftest.$ac_ext
6059cat >>conftest.$ac_ext <<_ACEOF
6060/* end confdefs.h. */
c0d27fcc
MR
6061#include <stdlib.h>
6062
6063_ACEOF
6064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6065 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
6066 :
6067else
6068 ac_cv_header_stdc=no
6069fi
6070rm -f conftest*
6071
6072fi
6073
6074if test $ac_cv_header_stdc = yes; then
6075 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6076 if test "$cross_compiling" = yes; then
6077 :
6078else
6079 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
c0d27fcc 6085#include <ctype.h>
d6e01aa5 6086#include <stdlib.h>
c0d27fcc
MR
6087#if ((' ' & 0x0FF) == 0x020)
6088# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6089# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6090#else
19650fd6 6091# define ISLOWER(c) \
edfaf76d
LK
6092 (('a' <= (c) && (c) <= 'i') \
6093 || ('j' <= (c) && (c) <= 'r') \
6094 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6095# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6096#endif
6097
6098#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6099int
6100main ()
6101{
6102 int i;
6103 for (i = 0; i < 256; i++)
6104 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6105 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
6106 return 2;
6107 return 0;
c0d27fcc
MR
6108}
6109_ACEOF
6110rm -f conftest$ac_exeext
d6e01aa5
KL
6111if { (ac_try="$ac_link"
6112case "(($ac_try" in
6113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6114 *) ac_try_echo=$ac_try;;
6115esac
6116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6117 (eval "$ac_link") 2>&5
c0d27fcc
MR
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
6121 { (case "(($ac_try" in
6122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6123 *) ac_try_echo=$ac_try;;
6124esac
6125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6126 (eval "$ac_try") 2>&5
c0d27fcc
MR
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); }; }; then
6130 :
6131else
6132 echo "$as_me: program exited with status $ac_status" >&5
6133echo "$as_me: failed program was:" >&5
19650fd6
AS
6134sed 's/^/| /' conftest.$ac_ext >&5
6135
c0d27fcc
MR
6136( exit $ac_status )
6137ac_cv_header_stdc=no
6138fi
d6e01aa5 6139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6140fi
d6e01aa5
KL
6141
6142
c0d27fcc
MR
6143fi
6144fi
d6e01aa5
KL
6145{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6146echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6147if test $ac_cv_header_stdc = yes; then
6148
6149cat >>confdefs.h <<\_ACEOF
6150#define STDC_HEADERS 1
6151_ACEOF
6152
6153fi
6154
6155# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6166 inttypes.h stdint.h unistd.h
98418dba
CW
6167do
6168as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6169{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6170echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6171if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6172 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6173else
925c2f3f 6174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
c0d27fcc
MR
6180$ac_includes_default
6181
6182#include <$ac_header>
6183_ACEOF
6184rm -f conftest.$ac_objext
d6e01aa5
KL
6185if { (ac_try="$ac_compile"
6186case "(($ac_try" in
6187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6188 *) ac_try_echo=$ac_try;;
6189esac
6190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6191 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6192 ac_status=$?
edfaf76d
LK
6193 grep -v '^ *+' conftest.er1 >conftest.err
6194 rm -f conftest.er1
6195 cat conftest.err >&5
c0d27fcc 6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6197 (exit $ac_status); } && {
6198 test -z "$ac_c_werror_flag" ||
6199 test ! -s conftest.err
6200 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6201 eval "$as_ac_Header=yes"
6202else
6203 echo "$as_me: failed program was:" >&5
19650fd6
AS
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
d6e01aa5 6206 eval "$as_ac_Header=no"
c0d27fcc 6207fi
d6e01aa5
KL
6208
6209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6210fi
d6e01aa5
KL
6211ac_res=`eval echo '${'$as_ac_Header'}'`
6212 { echo "$as_me:$LINENO: result: $ac_res" >&5
6213echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6214if test `eval echo '${'$as_ac_Header'}'` = yes; then
6215 cat >>confdefs.h <<_ACEOF
6216#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6217_ACEOF
6218
6219fi
6220
6221done
6222
6223
6224
6225
6226
6227for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6228do
6229as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6231 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6233if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6234 echo $ECHO_N "(cached) $ECHO_C" >&6
6235fi
d6e01aa5
KL
6236ac_res=`eval echo '${'$as_ac_Header'}'`
6237 { echo "$as_me:$LINENO: result: $ac_res" >&5
6238echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6239else
6240 # Is the header compilable?
d6e01aa5
KL
6241{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6242echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
c0d27fcc 6249$ac_includes_default
98418dba 6250#include <$ac_header>
503d2be0 6251_ACEOF
c0d27fcc 6252rm -f conftest.$ac_objext
d6e01aa5
KL
6253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
6258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6259 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6260 ac_status=$?
edfaf76d
LK
6261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
c0d27fcc 6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6269 ac_header_compiler=yes
6270else
6271 echo "$as_me: failed program was:" >&5
19650fd6
AS
6272sed 's/^/| /' conftest.$ac_ext >&5
6273
d6e01aa5 6274 ac_header_compiler=no
c0d27fcc 6275fi
d6e01aa5
KL
6276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6280
6281# Is the header present?
d6e01aa5
KL
6282{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6283echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6284cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
c0d27fcc
MR
6290#include <$ac_header>
6291_ACEOF
d6e01aa5
KL
6292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
6297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6299 ac_status=$?
6bae0ccf 6300 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6301 rm -f conftest.er1
6302 cat conftest.err >&5
c0d27fcc 6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
c0d27fcc 6308 ac_header_preproc=yes
f4988be7 6309else
503d2be0 6310 echo "$as_me: failed program was:" >&5
19650fd6
AS
6311sed 's/^/| /' conftest.$ac_ext >&5
6312
c0d27fcc 6313 ac_header_preproc=no
f4988be7 6314fi
d6e01aa5 6315
98418dba 6316rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6319
6320# So? What about this header?
edfaf76d
LK
6321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
c0d27fcc
MR
6323 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6325 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6327 ac_header_preproc=yes
19650fd6 6328 ;;
edfaf76d 6329 no:yes:* )
c0d27fcc
MR
6330 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6332 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6338 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6339echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6340 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6342
19650fd6 6343 ;;
c0d27fcc 6344esac
d6e01aa5
KL
6345{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6347if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6348 echo $ECHO_N "(cached) $ECHO_C" >&6
6349else
edfaf76d 6350 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6351fi
d6e01aa5
KL
6352ac_res=`eval echo '${'$as_ac_Header'}'`
6353 { echo "$as_me:$LINENO: result: $ac_res" >&5
6354echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6355
6356fi
98418dba 6357if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6358 cat >>confdefs.h <<_ACEOF
98418dba 6359#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6360_ACEOF
f4988be7
GM
6361
6362fi
c0d27fcc 6363
98418dba
CW
6364done
6365
6366 # Emulation library used on NetBSD.
d6e01aa5
KL
6367 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6368echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6369if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6370 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6371else
98418dba
CW
6372 ac_check_lib_save_LIBS=$LIBS
6373LIBS="-lossaudio $LIBS"
6374cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6375/* confdefs.h. */
6376_ACEOF
6377cat confdefs.h >>conftest.$ac_ext
6378cat >>conftest.$ac_ext <<_ACEOF
6379/* end confdefs.h. */
98418dba 6380
d6e01aa5
KL
6381/* Override any GCC internal prototype to avoid an error.
6382 Use char because int might match the return type of a GCC
6383 builtin and then its argument prototype would still apply. */
98418dba
CW
6384#ifdef __cplusplus
6385extern "C"
f4988be7 6386#endif
98418dba 6387char _oss_ioctl ();
503d2be0
AS
6388int
6389main ()
6390{
d6e01aa5 6391return _oss_ioctl ();
503d2be0
AS
6392 ;
6393 return 0;
6394}
6395_ACEOF
98418dba 6396rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
6397if { (ac_try="$ac_link"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
6402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6403 (eval "$ac_link") 2>conftest.er1
503d2be0 6404 ac_status=$?
edfaf76d
LK
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
c0d27fcc 6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest$ac_exeext &&
6413 $as_test_x conftest$ac_exeext; then
98418dba 6414 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6415else
503d2be0 6416 echo "$as_me: failed program was:" >&5
19650fd6
AS
6417sed 's/^/| /' conftest.$ac_ext >&5
6418
d6e01aa5 6419 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6420fi
d6e01aa5
KL
6421
6422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6423 conftest$ac_exeext conftest.$ac_ext
98418dba 6424LIBS=$ac_check_lib_save_LIBS
f4988be7 6425fi
d6e01aa5
KL
6426{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6427echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6428if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6429 LIBSOUND=-lossaudio
6430else
6431 LIBSOUND=
6432fi
6433
c0d27fcc 6434
439f58ee
JD
6435
6436 ALSA_REQUIRED=1.0.0
6437 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6438 if test "X${with_pkg_config_prog}" != X; then
6439 PKG_CONFIG="${with_pkg_config_prog}"
6440 fi
6441
6442 succeeded=no
6443
6444 if test -z "$PKG_CONFIG"; then
6445 # Extract the first word of "pkg-config", so it can be a program name with args.
6446set dummy pkg-config; ac_word=$2
d6e01aa5
KL
6447{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6449if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6450 echo $ECHO_N "(cached) $ECHO_C" >&6
6451else
6452 case $PKG_CONFIG in
6453 [\\/]* | ?:[\\/]*)
6454 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6455 ;;
6456 *)
6457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460 IFS=$as_save_IFS
6461 test -z "$as_dir" && as_dir=.
6462 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 6463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6464 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6465 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6466 break 2
6467 fi
6468done
6469done
d6e01aa5 6470IFS=$as_save_IFS
439f58ee
JD
6471
6472 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6473 ;;
6474esac
6475fi
6476PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6477if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
6478 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6479echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6480else
d6e01aa5
KL
6481 { echo "$as_me:$LINENO: result: no" >&5
6482echo "${ECHO_T}no" >&6; }
439f58ee
JD
6483fi
6484
d6e01aa5 6485
439f58ee
JD
6486 fi
6487
6488 if test "$PKG_CONFIG" = "no" ; then
6489 HAVE_ALSA=no
6490 else
6491 PKG_CONFIG_MIN_VERSION=0.9.0
6492 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
6493 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6494echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6495
67db6aa2 6496 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
d6e01aa5
KL
6497 { echo "$as_me:$LINENO: result: yes" >&5
6498echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6499 succeeded=yes
6500
d6e01aa5
KL
6501 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6502echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6503 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6504 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6505echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6506
d6e01aa5
KL
6507 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6508echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6509 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6510 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6511echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6512 else
d6e01aa5
KL
6513 { echo "$as_me:$LINENO: result: no" >&5
6514echo "${ECHO_T}no" >&6; }
439f58ee
JD
6515 ALSA_CFLAGS=""
6516 ALSA_LIBS=""
6517 ## If we have a custom action on failure, don't print errors, but
6518 ## do set a variable so people can do so.
6519 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6520
6521 fi
6522
6523
6524
6525 else
6526 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6527 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6528 fi
6529 fi
6530
6531 if test $succeeded = yes; then
6532 HAVE_ALSA=yes
6533 else
6534 HAVE_ALSA=no
6535 fi
6536
6537 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6538 SAVE_CFLAGS="$CFLAGS"
6539 SAVE_LDFLAGS="$LDFLAGS"
6540 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6541 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6542 cat >conftest.$ac_ext <<_ACEOF
6543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
6548#include <asoundlib.h>
6549int
6550main ()
6551{
6552snd_lib_error_set_handler (0);
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557rm -f conftest.$ac_objext
6558if { (ac_try="$ac_compile"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
6563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6564 (eval "$ac_compile") 2>conftest.er1
6565 ac_status=$?
6566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
6573 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6574 emacs_alsa_normal=yes
6575else
6576 echo "$as_me: failed program was:" >&5
6577sed 's/^/| /' conftest.$ac_ext >&5
6578
6579 emacs_alsa_normal=no
6580fi
6581
6582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6583 if test "$emacs_alsa_normal" != yes; then
6584 cat >conftest.$ac_ext <<_ACEOF
6585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
6590#include <alsa/asoundlib.h>
6591int
6592main ()
6593{
6594snd_lib_error_set_handler (0);
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
6600if { (ac_try="$ac_compile"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
6605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6606 (eval "$ac_compile") 2>conftest.er1
6607 ac_status=$?
6608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
6611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6612 (exit $ac_status); } && {
6613 test -z "$ac_c_werror_flag" ||
6614 test ! -s conftest.err
6615 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6616 emacs_alsa_subdir=yes
6617else
6618 echo "$as_me: failed program was:" >&5
6619sed 's/^/| /' conftest.$ac_ext >&5
6620
6621 emacs_alsa_subdir=no
6622fi
6623
6624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6625 if test "$emacs_alsa_subdir" != yes; then
6626 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6627echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6628 { (exit 1); exit 1; }; }
6629 fi
6630 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6631 fi
6632
6633 CFLAGS="$SAVE_CFLAGS"
6634 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6635 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6636 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6637
6638cat >>confdefs.h <<\_ACEOF
6639#define HAVE_ALSA 1
6640_ACEOF
6641
6642 fi
6643
f4988be7 6644fi
c0d27fcc
MR
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
22044edf
DL
6663
6664
973a76b1 6665
cffcede7 6666
551ffc27 6667
226e2359 6668
c0d27fcc 6669
f4988be7 6670
98418dba
CW
6671for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6672 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6673 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6674 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6675 sys/utsname.h pwd.h
98418dba
CW
6676do
6677as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6678if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6679 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6681if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6682 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6683fi
d6e01aa5
KL
6684ac_res=`eval echo '${'$as_ac_Header'}'`
6685 { echo "$as_me:$LINENO: result: $ac_res" >&5
6686echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6687else
c0d27fcc 6688 # Is the header compilable?
d6e01aa5
KL
6689{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6690echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6691cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6692/* confdefs.h. */
6693_ACEOF
6694cat confdefs.h >>conftest.$ac_ext
6695cat >>conftest.$ac_ext <<_ACEOF
6696/* end confdefs.h. */
c0d27fcc
MR
6697$ac_includes_default
6698#include <$ac_header>
6699_ACEOF
6700rm -f conftest.$ac_objext
d6e01aa5
KL
6701if { (ac_try="$ac_compile"
6702case "(($ac_try" in
6703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6704 *) ac_try_echo=$ac_try;;
6705esac
6706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6707 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6708 ac_status=$?
edfaf76d
LK
6709 grep -v '^ *+' conftest.er1 >conftest.err
6710 rm -f conftest.er1
6711 cat conftest.err >&5
c0d27fcc 6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6713 (exit $ac_status); } && {
6714 test -z "$ac_c_werror_flag" ||
6715 test ! -s conftest.err
6716 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6717 ac_header_compiler=yes
6718else
6719 echo "$as_me: failed program was:" >&5
19650fd6
AS
6720sed 's/^/| /' conftest.$ac_ext >&5
6721
d6e01aa5 6722 ac_header_compiler=no
c0d27fcc 6723fi
d6e01aa5
KL
6724
6725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6726{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6727echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6728
6729# Is the header present?
d6e01aa5
KL
6730{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6731echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6732cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
98418dba 6738#include <$ac_header>
503d2be0 6739_ACEOF
d6e01aa5
KL
6740if { (ac_try="$ac_cpp conftest.$ac_ext"
6741case "(($ac_try" in
6742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6743 *) ac_try_echo=$ac_try;;
6744esac
6745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6746 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6747 ac_status=$?
6bae0ccf 6748 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6749 rm -f conftest.er1
6750 cat conftest.err >&5
c0d27fcc 6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6752 (exit $ac_status); } >/dev/null && {
6753 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6754 test ! -s conftest.err
6755 }; then
c0d27fcc 6756 ac_header_preproc=yes
34ec9ebe 6757else
503d2be0 6758 echo "$as_me: failed program was:" >&5
19650fd6
AS
6759sed 's/^/| /' conftest.$ac_ext >&5
6760
c0d27fcc 6761 ac_header_preproc=no
34ec9ebe 6762fi
d6e01aa5 6763
98418dba 6764rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6765{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6766echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6767
6768# So? What about this header?
edfaf76d
LK
6769case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6770 yes:no: )
c0d27fcc
MR
6771 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6772echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6774echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6775 ac_header_preproc=yes
19650fd6 6776 ;;
edfaf76d 6777 no:yes:* )
c0d27fcc
MR
6778 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6779echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6780 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6781echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6782 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6783echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6784 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6785echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6786 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6787echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6788 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6789echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6790
19650fd6 6791 ;;
c0d27fcc 6792esac
d6e01aa5
KL
6793{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6794echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6795if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6796 echo $ECHO_N "(cached) $ECHO_C" >&6
6797else
edfaf76d 6798 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6799fi
d6e01aa5
KL
6800ac_res=`eval echo '${'$as_ac_Header'}'`
6801 { echo "$as_me:$LINENO: result: $ac_res" >&5
6802echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6803
6804fi
98418dba 6805if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6806 cat >>confdefs.h <<_ACEOF
98418dba 6807#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6808_ACEOF
34ec9ebe 6809
98418dba 6810fi
c0d27fcc 6811
98418dba
CW
6812done
6813
22044edf 6814
d6e01aa5
KL
6815{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6816echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6817cat >conftest.$ac_ext <<_ACEOF
6818/* confdefs.h. */
6819_ACEOF
6820cat confdefs.h >>conftest.$ac_ext
6821cat >>conftest.$ac_ext <<_ACEOF
6822/* end confdefs.h. */
6823#include <sys/personality.h>
6824int
6825main ()
6826{
6827personality (PER_LINUX32)
6828 ;
6829 return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
d6e01aa5
KL
6833if { (ac_try="$ac_compile"
6834case "(($ac_try" in
6835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836 *) ac_try_echo=$ac_try;;
6837esac
6838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6839 (eval "$ac_compile") 2>conftest.er1
f17e308a 6840 ac_status=$?
edfaf76d
LK
6841 grep -v '^ *+' conftest.er1 >conftest.err
6842 rm -f conftest.er1
6843 cat conftest.err >&5
f17e308a 6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6845 (exit $ac_status); } && {
6846 test -z "$ac_c_werror_flag" ||
6847 test ! -s conftest.err
6848 } && test -s conftest.$ac_objext; then
f17e308a
JD
6849 emacs_cv_personality_linux32=yes
6850else
6851 echo "$as_me: failed program was:" >&5
6852sed 's/^/| /' conftest.$ac_ext >&5
6853
d6e01aa5 6854 emacs_cv_personality_linux32=no
f17e308a 6855fi
d6e01aa5
KL
6856
6857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6858{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6859echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6860
6861if test $emacs_cv_personality_linux32 = yes; then
6862
6863cat >>confdefs.h <<\_ACEOF
6864#define HAVE_PERSONALITY_LINUX32 1
6865_ACEOF
6866
6867fi
6868
6869
22044edf
DL
6870for ac_header in term.h
6871do
6872as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6873{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6874echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6875if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6879/* confdefs.h. */
6880_ACEOF
6881cat confdefs.h >>conftest.$ac_ext
6882cat >>conftest.$ac_ext <<_ACEOF
6883/* end confdefs.h. */
22044edf
DL
6884#include <$ac_header>
6885_ACEOF
d6e01aa5
KL
6886if { (ac_try="$ac_cpp conftest.$ac_ext"
6887case "(($ac_try" in
6888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6889 *) ac_try_echo=$ac_try;;
6890esac
6891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6892 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6893 ac_status=$?
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6898 (exit $ac_status); } >/dev/null && {
6899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 }; then
22044edf
DL
6902 eval "$as_ac_Header=yes"
6903else
6904 echo "$as_me: failed program was:" >&5
19650fd6
AS
6905sed 's/^/| /' conftest.$ac_ext >&5
6906
22044edf
DL
6907 eval "$as_ac_Header=no"
6908fi
d6e01aa5 6909
22044edf
DL
6910rm -f conftest.err conftest.$ac_ext
6911fi
d6e01aa5
KL
6912ac_res=`eval echo '${'$as_ac_Header'}'`
6913 { echo "$as_me:$LINENO: result: $ac_res" >&5
6914echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6915if test `eval echo '${'$as_ac_Header'}'` = yes; then
6916 cat >>confdefs.h <<_ACEOF
6917#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6918_ACEOF
6919
6920fi
6921
6922done
6923
d6e01aa5
KL
6924{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6925echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6926if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6927 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6928else
503d2be0 6929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
98418dba
CW
6935#include <stdlib.h>
6936#include <stdarg.h>
6937#include <string.h>
6938#include <float.h>
6939
19650fd6
AS
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
98418dba 6947_ACEOF
19650fd6 6948rm -f conftest.$ac_objext
d6e01aa5
KL
6949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6956 ac_status=$?
edfaf76d
LK
6957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
cd958eb3 6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
98418dba 6965 ac_cv_header_stdc=yes
ba4481b5 6966else
503d2be0 6967 echo "$as_me: failed program was:" >&5
19650fd6
AS
6968sed 's/^/| /' conftest.$ac_ext >&5
6969
d6e01aa5 6970 ac_cv_header_stdc=no
ba4481b5 6971fi
d6e01aa5
KL
6972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6974
6975if test $ac_cv_header_stdc = yes; then
6976 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6977 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6978/* confdefs.h. */
6979_ACEOF
6980cat confdefs.h >>conftest.$ac_ext
6981cat >>conftest.$ac_ext <<_ACEOF
6982/* end confdefs.h. */
98418dba
CW
6983#include <string.h>
6984
6985_ACEOF
6986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6987 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6988 :
6989else
6990 ac_cv_header_stdc=no
ba4481b5 6991fi
98418dba 6992rm -f conftest*
ba4481b5
DL
6993
6994fi
6995
98418dba
CW
6996if test $ac_cv_header_stdc = yes; then
6997 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6998 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6999/* confdefs.h. */
7000_ACEOF
7001cat confdefs.h >>conftest.$ac_ext
7002cat >>conftest.$ac_ext <<_ACEOF
7003/* end confdefs.h. */
98418dba
CW
7004#include <stdlib.h>
7005
7006_ACEOF
7007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7008 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
7009 :
7010else
7011 ac_cv_header_stdc=no
7012fi
7013rm -f conftest*
7014
7015fi
7016
7017if test $ac_cv_header_stdc = yes; then
7018 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7019 if test "$cross_compiling" = yes; then
7020 :
d42122a3 7021else
503d2be0 7022 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
98418dba 7028#include <ctype.h>
d6e01aa5 7029#include <stdlib.h>
98418dba
CW
7030#if ((' ' & 0x0FF) == 0x020)
7031# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7032# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7033#else
19650fd6 7034# define ISLOWER(c) \
edfaf76d
LK
7035 (('a' <= (c) && (c) <= 'i') \
7036 || ('j' <= (c) && (c) <= 'r') \
7037 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
7038# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7039#endif
7040
7041#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
7042int
7043main ()
7044{
98418dba
CW
7045 int i;
7046 for (i = 0; i < 256; i++)
7047 if (XOR (islower (i), ISLOWER (i))
edfaf76d 7048 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
7049 return 2;
7050 return 0;
503d2be0
AS
7051}
7052_ACEOF
98418dba 7053rm -f conftest$ac_exeext
d6e01aa5
KL
7054if { (ac_try="$ac_link"
7055case "(($ac_try" in
7056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7057 *) ac_try_echo=$ac_try;;
7058esac
7059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7060 (eval "$ac_link") 2>&5
503d2be0 7061 ac_status=$?
c0d27fcc 7062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
7064 { (case "(($ac_try" in
7065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7066 *) ac_try_echo=$ac_try;;
7067esac
7068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7069 (eval "$ac_try") 2>&5
503d2be0 7070 ac_status=$?
c0d27fcc 7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7072 (exit $ac_status); }; }; then
98418dba 7073 :
d42122a3 7074else
98418dba
CW
7075 echo "$as_me: program exited with status $ac_status" >&5
7076echo "$as_me: failed program was:" >&5
19650fd6
AS
7077sed 's/^/| /' conftest.$ac_ext >&5
7078
c0d27fcc 7079( exit $ac_status )
98418dba 7080ac_cv_header_stdc=no
d42122a3 7081fi
d6e01aa5 7082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7083fi
d6e01aa5
KL
7084
7085
98418dba
CW
7086fi
7087fi
d6e01aa5
KL
7088{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7089echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7090if test $ac_cv_header_stdc = yes; then
7091
c0d27fcc 7092cat >>confdefs.h <<\_ACEOF
98418dba 7093#define STDC_HEADERS 1
c0d27fcc 7094_ACEOF
d42122a3
DL
7095
7096fi
7097
d6e01aa5
KL
7098{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7099echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7100if test "${ac_cv_header_time+set}" = set; then
503d2be0 7101 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7102else
503d2be0 7103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7104/* confdefs.h. */
7105_ACEOF
7106cat confdefs.h >>conftest.$ac_ext
7107cat >>conftest.$ac_ext <<_ACEOF
7108/* end confdefs.h. */
ba4481b5 7109#include <sys/types.h>
98418dba 7110#include <sys/time.h>
ba4481b5 7111#include <time.h>
503d2be0
AS
7112
7113int
7114main ()
7115{
98418dba
CW
7116if ((struct tm *) 0)
7117return 0;
503d2be0
AS
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122rm -f conftest.$ac_objext
d6e01aa5
KL
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
7128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7129 (eval "$ac_compile") 2>conftest.er1
503d2be0 7130 ac_status=$?
edfaf76d
LK
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
c0d27fcc 7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
98418dba 7139 ac_cv_header_time=yes
ba4481b5 7140else
503d2be0 7141 echo "$as_me: failed program was:" >&5
19650fd6
AS
7142sed 's/^/| /' conftest.$ac_ext >&5
7143
d6e01aa5 7144 ac_cv_header_time=no
ba4481b5 7145fi
d6e01aa5
KL
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7148fi
d6e01aa5
KL
7149{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7150echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7151if test $ac_cv_header_time = yes; then
503d2be0 7152
c0d27fcc 7153cat >>confdefs.h <<\_ACEOF
98418dba 7154#define TIME_WITH_SYS_TIME 1
c0d27fcc 7155_ACEOF
ba4481b5
DL
7156
7157fi
7158
d6e01aa5
KL
7159{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7160echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7161if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7162 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7163else
503d2be0 7164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7165/* confdefs.h. */
7166_ACEOF
7167cat confdefs.h >>conftest.$ac_ext
7168cat >>conftest.$ac_ext <<_ACEOF
7169/* end confdefs.h. */
cd958eb3
MB
7170$ac_includes_default
7171int
7172main ()
7173{
7174#ifndef sys_siglist
d6e01aa5 7175 (void) sys_siglist;
98418dba 7176#endif
503d2be0 7177
cd958eb3
MB
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext
d6e01aa5
KL
7183if { (ac_try="$ac_compile"
7184case "(($ac_try" in
7185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7186 *) ac_try_echo=$ac_try;;
7187esac
7188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7189 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7190 ac_status=$?
edfaf76d
LK
7191 grep -v '^ *+' conftest.er1 >conftest.err
7192 rm -f conftest.er1
7193 cat conftest.err >&5
cd958eb3 7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7195 (exit $ac_status); } && {
7196 test -z "$ac_c_werror_flag" ||
7197 test ! -s conftest.err
7198 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7199 ac_cv_have_decl_sys_siglist=yes
7200else
7201 echo "$as_me: failed program was:" >&5
19650fd6
AS
7202sed 's/^/| /' conftest.$ac_ext >&5
7203
d6e01aa5 7204 ac_cv_have_decl_sys_siglist=no
cd958eb3 7205fi
d6e01aa5
KL
7206
7207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7208fi
d6e01aa5
KL
7209{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7210echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7211if test $ac_cv_have_decl_sys_siglist = yes; then
7212
7213cat >>confdefs.h <<_ACEOF
7214#define HAVE_DECL_SYS_SIGLIST 1
7215_ACEOF
7216
7217
7218else
7219 cat >>confdefs.h <<_ACEOF
7220#define HAVE_DECL_SYS_SIGLIST 0
7221_ACEOF
7222
7223
7224fi
7225
7226
7227if test $ac_cv_have_decl_sys_siglist != yes; then
7228 # For Tru64, at least:
d6e01aa5
KL
7229 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7230echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7231if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
cd958eb3 7240$ac_includes_default
503d2be0
AS
7241int
7242main ()
7243{
cd958eb3 7244#ifndef __sys_siglist
d6e01aa5 7245 (void) __sys_siglist;
cd958eb3
MB
7246#endif
7247
503d2be0
AS
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
d6e01aa5
KL
7253if { (ac_try="$ac_compile"
7254case "(($ac_try" in
7255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7256 *) ac_try_echo=$ac_try;;
7257esac
7258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7259 (eval "$ac_compile") 2>conftest.er1
503d2be0 7260 ac_status=$?
edfaf76d
LK
7261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
c0d27fcc 7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7265 (exit $ac_status); } && {
7266 test -z "$ac_c_werror_flag" ||
7267 test ! -s conftest.err
7268 } && test -s conftest.$ac_objext; then
cd958eb3 7269 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7270else
503d2be0 7271 echo "$as_me: failed program was:" >&5
19650fd6
AS
7272sed 's/^/| /' conftest.$ac_ext >&5
7273
d6e01aa5 7274 ac_cv_have_decl___sys_siglist=no
ba4481b5 7275fi
d6e01aa5
KL
7276
7277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7278fi
d6e01aa5
KL
7279{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7280echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7281if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7282
cd958eb3
MB
7283cat >>confdefs.h <<_ACEOF
7284#define HAVE_DECL___SYS_SIGLIST 1
7285_ACEOF
7286
7287
7288else
7289 cat >>confdefs.h <<_ACEOF
7290#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7291_ACEOF
503d2be0 7292
cd958eb3 7293
ba4481b5
DL
7294fi
7295
cd958eb3
MB
7296
7297 if test $ac_cv_have_decl___sys_siglist = yes; then
7298
7299cat >>confdefs.h <<\_ACEOF
7300#define sys_siglist __sys_siglist
7301_ACEOF
7302
7303 fi
7304fi
d6e01aa5
KL
7305{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7306echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7307if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7308 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7309else
503d2be0 7310 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7311/* confdefs.h. */
7312_ACEOF
7313cat confdefs.h >>conftest.$ac_ext
7314cat >>conftest.$ac_ext <<_ACEOF
7315/* end confdefs.h. */
98418dba
CW
7316#include <sys/types.h>
7317#include <sys/wait.h>
7318#ifndef WEXITSTATUS
d6e01aa5 7319# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7320#endif
7321#ifndef WIFEXITED
7322# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7323#endif
503d2be0
AS
7324
7325int
7326main ()
7327{
98418dba
CW
7328 int s;
7329 wait (&s);
7330 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7331 ;
7332 return 0;
7333}
7334_ACEOF
98418dba 7335rm -f conftest.$ac_objext
d6e01aa5
KL
7336if { (ac_try="$ac_compile"
7337case "(($ac_try" in
7338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7339 *) ac_try_echo=$ac_try;;
7340esac
7341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7342 (eval "$ac_compile") 2>conftest.er1
503d2be0 7343 ac_status=$?
edfaf76d
LK
7344 grep -v '^ *+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
c0d27fcc 7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7348 (exit $ac_status); } && {
7349 test -z "$ac_c_werror_flag" ||
7350 test ! -s conftest.err
7351 } && test -s conftest.$ac_objext; then
98418dba 7352 ac_cv_header_sys_wait_h=yes
ba4481b5 7353else
503d2be0 7354 echo "$as_me: failed program was:" >&5
19650fd6
AS
7355sed 's/^/| /' conftest.$ac_ext >&5
7356
d6e01aa5 7357 ac_cv_header_sys_wait_h=no
ba4481b5 7358fi
d6e01aa5
KL
7359
7360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7361fi
d6e01aa5
KL
7362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7363echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7364if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7365
c0d27fcc 7366cat >>confdefs.h <<\_ACEOF
98418dba 7367#define HAVE_SYS_WAIT_H 1
c0d27fcc 7368_ACEOF
ba4481b5 7369
ba4481b5
DL
7370fi
7371
c0d27fcc 7372
d6e01aa5
KL
7373{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7374echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7375if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7376 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7377else
503d2be0 7378 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
98418dba
CW
7384#ifdef TIME_WITH_SYS_TIME
7385#include <sys/time.h>
7386#include <time.h>
7387#else
7388#ifdef HAVE_SYS_TIME_H
7389#include <sys/time.h>
7390#else
1113b624 7391#include <time.h>
98418dba
CW
7392#endif
7393#endif
7394#ifdef HAVE_UTIME_H
7395#include <utime.h>
7396#endif
503d2be0
AS
7397int
7398main ()
7399{
98418dba 7400static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7401 ;
7402 return 0;
7403}
7404_ACEOF
98418dba 7405rm -f conftest.$ac_objext
d6e01aa5
KL
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
7411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7412 (eval "$ac_compile") 2>conftest.er1
503d2be0 7413 ac_status=$?
edfaf76d
LK
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
c0d27fcc 7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
98418dba 7422 emacs_cv_struct_utimbuf=yes
1113b624 7423else
503d2be0 7424 echo "$as_me: failed program was:" >&5
19650fd6
AS
7425sed 's/^/| /' conftest.$ac_ext >&5
7426
d6e01aa5 7427 emacs_cv_struct_utimbuf=no
1113b624 7428fi
d6e01aa5
KL
7429
7430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7431fi
d6e01aa5
KL
7432{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7433echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7434if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7435
c0d27fcc 7436cat >>confdefs.h <<\_ACEOF
98418dba 7437#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7438_ACEOF
1113b624
PE
7439
7440fi
ba4481b5 7441
d6e01aa5
KL
7442{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7443echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7444if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7445 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7446else
98418dba 7447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7448/* confdefs.h. */
7449_ACEOF
7450cat confdefs.h >>conftest.$ac_ext
7451cat >>conftest.$ac_ext <<_ACEOF
7452/* end confdefs.h. */
7397acc4 7453#include <sys/types.h>
98418dba 7454#include <signal.h>
98418dba 7455
503d2be0
AS
7456int
7457main ()
7458{
d6e01aa5 7459return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7460 ;
7461 return 0;
7462}
7463_ACEOF
98418dba 7464rm -f conftest.$ac_objext
d6e01aa5
KL
7465if { (ac_try="$ac_compile"
7466case "(($ac_try" in
7467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7468 *) ac_try_echo=$ac_try;;
7469esac
7470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7471 (eval "$ac_compile") 2>conftest.er1
503d2be0 7472 ac_status=$?
edfaf76d
LK
7473 grep -v '^ *+' conftest.er1 >conftest.err
7474 rm -f conftest.er1
7475 cat conftest.err >&5
c0d27fcc 7476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7477 (exit $ac_status); } && {
7478 test -z "$ac_c_werror_flag" ||
7479 test ! -s conftest.err
7480 } && test -s conftest.$ac_objext; then
7481 ac_cv_type_signal=int
503d2be0
AS
7482else
7483 echo "$as_me: failed program was:" >&5
19650fd6
AS
7484sed 's/^/| /' conftest.$ac_ext >&5
7485
d6e01aa5 7486 ac_cv_type_signal=void
503d2be0 7487fi
d6e01aa5
KL
7488
7489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7490fi
d6e01aa5
KL
7491{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7492echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7493
c0d27fcc 7494cat >>confdefs.h <<_ACEOF
98418dba 7495#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7496_ACEOF
7497
503d2be0 7498
c0d27fcc 7499
d6e01aa5
KL
7500{ echo "$as_me:$LINENO: checking for speed_t" >&5
7501echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7502if test "${emacs_cv_speed_t+set}" = set; then
7503 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7504else
98418dba 7505 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7506/* confdefs.h. */
7507_ACEOF
7508cat confdefs.h >>conftest.$ac_ext
7509cat >>conftest.$ac_ext <<_ACEOF
7510/* end confdefs.h. */
98418dba 7511#include <termios.h>
98418dba
CW
7512int
7513main ()
7514{
7515speed_t x = 1;
7516 ;
7517 return 0;
7518}
7519_ACEOF
7520rm -f conftest.$ac_objext
d6e01aa5
KL
7521if { (ac_try="$ac_compile"
7522case "(($ac_try" in
7523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7524 *) ac_try_echo=$ac_try;;
7525esac
7526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7527 (eval "$ac_compile") 2>conftest.er1
98418dba 7528 ac_status=$?
edfaf76d
LK
7529 grep -v '^ *+' conftest.er1 >conftest.err
7530 rm -f conftest.er1
7531 cat conftest.err >&5
c0d27fcc 7532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7533 (exit $ac_status); } && {
7534 test -z "$ac_c_werror_flag" ||
7535 test ! -s conftest.err
7536 } && test -s conftest.$ac_objext; then
98418dba
CW
7537 emacs_cv_speed_t=yes
7538else
7539 echo "$as_me: failed program was:" >&5
19650fd6
AS
7540sed 's/^/| /' conftest.$ac_ext >&5
7541
d6e01aa5 7542 emacs_cv_speed_t=no
98418dba 7543fi
d6e01aa5
KL
7544
7545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7546fi
d6e01aa5
KL
7547{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7548echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7549if test $emacs_cv_speed_t = yes; then
b936fae4 7550
c0d27fcc 7551cat >>confdefs.h <<\_ACEOF
98418dba 7552#define HAVE_SPEED_T 1
c0d27fcc 7553_ACEOF
98418dba 7554
7397acc4
DL
7555fi
7556
d6e01aa5
KL
7557{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7558echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7559if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7560 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7561else
503d2be0 7562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
98418dba
CW
7568#ifdef TIME_WITH_SYS_TIME
7569#include <sys/time.h>
7570#include <time.h>
7571#else
7572#ifdef HAVE_SYS_TIME_H
7573#include <sys/time.h>
7574#else
7575#include <time.h>
7576#endif
7577#endif
503d2be0
AS
7578int
7579main ()
7580{
98418dba 7581static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7582 ;
7583 return 0;
7584}
7585_ACEOF
7586rm -f conftest.$ac_objext
d6e01aa5
KL
7587if { (ac_try="$ac_compile"
7588case "(($ac_try" in
7589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7590 *) ac_try_echo=$ac_try;;
7591esac
7592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7593 (eval "$ac_compile") 2>conftest.er1
503d2be0 7594 ac_status=$?
edfaf76d
LK
7595 grep -v '^ *+' conftest.er1 >conftest.err
7596 rm -f conftest.er1
7597 cat conftest.err >&5
c0d27fcc 7598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7599 (exit $ac_status); } && {
7600 test -z "$ac_c_werror_flag" ||
7601 test ! -s conftest.err
7602 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7603 emacs_cv_struct_timeval=yes
7604else
503d2be0 7605 echo "$as_me: failed program was:" >&5
19650fd6
AS
7606sed 's/^/| /' conftest.$ac_ext >&5
7607
d6e01aa5 7608 emacs_cv_struct_timeval=no
7397acc4 7609fi
d6e01aa5
KL
7610
7611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7612fi
d6e01aa5
KL
7613{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7614echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7615HAVE_TIMEVAL=$emacs_cv_struct_timeval
7616if test $emacs_cv_struct_timeval = yes; then
b936fae4 7617
c0d27fcc 7618cat >>confdefs.h <<\_ACEOF
98418dba 7619#define HAVE_TIMEVAL 1
c0d27fcc 7620_ACEOF
7397acc4
DL
7621
7622fi
7623
d6e01aa5
KL
7624{ echo "$as_me:$LINENO: checking for struct exception" >&5
7625echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7626if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7627 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7628else
503d2be0 7629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
98418dba 7635#include <math.h>
503d2be0
AS
7636int
7637main ()
7638{
98418dba 7639static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7640 ;
7641 return 0;
ba4481b5 7642}
503d2be0
AS
7643_ACEOF
7644rm -f conftest.$ac_objext
d6e01aa5
KL
7645if { (ac_try="$ac_compile"
7646case "(($ac_try" in
7647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7648 *) ac_try_echo=$ac_try;;
7649esac
7650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7651 (eval "$ac_compile") 2>conftest.er1
503d2be0 7652 ac_status=$?
edfaf76d
LK
7653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
c0d27fcc 7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
98418dba 7661 emacs_cv_struct_exception=yes
ba4481b5 7662else
503d2be0 7663 echo "$as_me: failed program was:" >&5
19650fd6
AS
7664sed 's/^/| /' conftest.$ac_ext >&5
7665
d6e01aa5 7666 emacs_cv_struct_exception=no
ba4481b5 7667fi
d6e01aa5
KL
7668
7669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7670fi
d6e01aa5
KL
7671{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7672echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7673HAVE_EXCEPTION=$emacs_cv_struct_exception
7674if test $emacs_cv_struct_exception != yes; then
b936fae4 7675
c0d27fcc 7676cat >>confdefs.h <<\_ACEOF
98418dba 7677#define NO_MATHERR 1
c0d27fcc 7678_ACEOF
ba4481b5
DL
7679
7680fi
7681
7862d3a8
AS
7682
7683for ac_header in sys/socket.h
7684do
7685as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7686if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7687 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7688echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7689if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7690 echo $ECHO_N "(cached) $ECHO_C" >&6
7691fi
d6e01aa5
KL
7692ac_res=`eval echo '${'$as_ac_Header'}'`
7693 { echo "$as_me:$LINENO: result: $ac_res" >&5
7694echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7695else
7696 # Is the header compilable?
d6e01aa5
KL
7697{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7698echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7699cat >conftest.$ac_ext <<_ACEOF
7700/* confdefs.h. */
7701_ACEOF
7702cat confdefs.h >>conftest.$ac_ext
7703cat >>conftest.$ac_ext <<_ACEOF
7704/* end confdefs.h. */
7705$ac_includes_default
7706#include <$ac_header>
7707_ACEOF
7708rm -f conftest.$ac_objext
d6e01aa5
KL
7709if { (ac_try="$ac_compile"
7710case "(($ac_try" in
7711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7712 *) ac_try_echo=$ac_try;;
7713esac
7714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7715 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7716 ac_status=$?
edfaf76d
LK
7717 grep -v '^ *+' conftest.er1 >conftest.err
7718 rm -f conftest.er1
7719 cat conftest.err >&5
7862d3a8 7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7721 (exit $ac_status); } && {
7722 test -z "$ac_c_werror_flag" ||
7723 test ! -s conftest.err
7724 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7725 ac_header_compiler=yes
7726else
7727 echo "$as_me: failed program was:" >&5
7728sed 's/^/| /' conftest.$ac_ext >&5
7729
d6e01aa5 7730 ac_header_compiler=no
7862d3a8 7731fi
d6e01aa5
KL
7732
7733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7734{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7735echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7736
7737# Is the header present?
d6e01aa5
KL
7738{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7739echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7740cat >conftest.$ac_ext <<_ACEOF
7741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
7746#include <$ac_header>
7747_ACEOF
d6e01aa5
KL
7748if { (ac_try="$ac_cpp conftest.$ac_ext"
7749case "(($ac_try" in
7750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7751 *) ac_try_echo=$ac_try;;
7752esac
7753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7754 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7755 ac_status=$?
7756 grep -v '^ *+' conftest.er1 >conftest.err
7757 rm -f conftest.er1
7758 cat conftest.err >&5
7759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7760 (exit $ac_status); } >/dev/null && {
7761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7762 test ! -s conftest.err
7763 }; then
7862d3a8
AS
7764 ac_header_preproc=yes
7765else
7766 echo "$as_me: failed program was:" >&5
7767sed 's/^/| /' conftest.$ac_ext >&5
7768
7769 ac_header_preproc=no
7770fi
d6e01aa5 7771
7862d3a8 7772rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
7773{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7774echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7775
7776# So? What about this header?
edfaf76d
LK
7777case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7778 yes:no: )
7862d3a8
AS
7779 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7780echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7781 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7782echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7783 ac_header_preproc=yes
7862d3a8 7784 ;;
edfaf76d 7785 no:yes:* )
7862d3a8
AS
7786 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7787echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7788 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7789echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7790 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7791echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7792 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7793echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7794 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7795echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7796 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7797echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 7798
7862d3a8
AS
7799 ;;
7800esac
d6e01aa5
KL
7801{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7802echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7803if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7804 echo $ECHO_N "(cached) $ECHO_C" >&6
7805else
edfaf76d 7806 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7807fi
d6e01aa5
KL
7808ac_res=`eval echo '${'$as_ac_Header'}'`
7809 { echo "$as_me:$LINENO: result: $ac_res" >&5
7810echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7811
7812fi
7813if test `eval echo '${'$as_ac_Header'}'` = yes; then
7814 cat >>confdefs.h <<_ACEOF
7815#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7816_ACEOF
7817
7818fi
7819
7820done
7821
7822
7823for ac_header in net/if.h
7824do
7825as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7826{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7828if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7829 echo $ECHO_N "(cached) $ECHO_C" >&6
7830else
7831 cat >conftest.$ac_ext <<_ACEOF
7832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
7837$ac_includes_default
7838#if HAVE_SYS_SOCKET_H
7839#include <sys/socket.h>
7840#endif
7841
7842#include <$ac_header>
7843_ACEOF
7844rm -f conftest.$ac_objext
d6e01aa5
KL
7845if { (ac_try="$ac_compile"
7846case "(($ac_try" in
7847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7848 *) ac_try_echo=$ac_try;;
7849esac
7850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7851 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7852 ac_status=$?
edfaf76d
LK
7853 grep -v '^ *+' conftest.er1 >conftest.err
7854 rm -f conftest.er1
7855 cat conftest.err >&5
7862d3a8 7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7857 (exit $ac_status); } && {
7858 test -z "$ac_c_werror_flag" ||
7859 test ! -s conftest.err
7860 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7861 eval "$as_ac_Header=yes"
7862else
7863 echo "$as_me: failed program was:" >&5
7864sed 's/^/| /' conftest.$ac_ext >&5
7865
d6e01aa5 7866 eval "$as_ac_Header=no"
7862d3a8 7867fi
d6e01aa5
KL
7868
7869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7870fi
d6e01aa5
KL
7871ac_res=`eval echo '${'$as_ac_Header'}'`
7872 { echo "$as_me:$LINENO: result: $ac_res" >&5
7873echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7874if test `eval echo '${'$as_ac_Header'}'` = yes; then
7875 cat >>confdefs.h <<_ACEOF
7876#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7877_ACEOF
7878
7879fi
7880
7881done
7882
7883
d6e01aa5
KL
7884{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7885echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7886if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7887 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7888else
503d2be0 7889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
98418dba
CW
7895#include <sys/types.h>
7896#include <time.h>
7397acc4 7897
503d2be0
AS
7898int
7899main ()
7900{
d6e01aa5
KL
7901struct tm tm;
7902 int *p = &tm.tm_sec;
7903 return !p;
503d2be0
AS
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908rm -f conftest.$ac_objext
d6e01aa5
KL
7909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
7914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7915 (eval "$ac_compile") 2>conftest.er1
503d2be0 7916 ac_status=$?
edfaf76d
LK
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
c0d27fcc 7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
35996d22
AS
7925 ac_cv_struct_tm=time.h
7926else
503d2be0 7927 echo "$as_me: failed program was:" >&5
19650fd6
AS
7928sed 's/^/| /' conftest.$ac_ext >&5
7929
d6e01aa5 7930 ac_cv_struct_tm=sys/time.h
7397acc4 7931fi
d6e01aa5
KL
7932
7933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7934fi
d6e01aa5
KL
7935{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7936echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7937if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7938
c0d27fcc 7939cat >>confdefs.h <<\_ACEOF
98418dba 7940#define TM_IN_SYS_TIME 1
c0d27fcc 7941_ACEOF
7397acc4
DL
7942
7943fi
ba4481b5 7944
d6e01aa5
KL
7945{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7946echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7947if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7949else
98418dba 7950 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7951/* confdefs.h. */
7952_ACEOF
7953cat confdefs.h >>conftest.$ac_ext
7954cat >>conftest.$ac_ext <<_ACEOF
7955/* end confdefs.h. */
98418dba
CW
7956#include <sys/types.h>
7957#include <$ac_cv_struct_tm>
ba4481b5 7958
c0d27fcc 7959
98418dba
CW
7960int
7961main ()
7962{
7963static struct tm ac_aggr;
7964if (ac_aggr.tm_zone)
7965return 0;
7966 ;
7967 return 0;
7968}
7969_ACEOF
7970rm -f conftest.$ac_objext
d6e01aa5
KL
7971if { (ac_try="$ac_compile"
7972case "(($ac_try" in
7973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7974 *) ac_try_echo=$ac_try;;
7975esac
7976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7977 (eval "$ac_compile") 2>conftest.er1
98418dba 7978 ac_status=$?
edfaf76d
LK
7979 grep -v '^ *+' conftest.er1 >conftest.err
7980 rm -f conftest.er1
7981 cat conftest.err >&5
c0d27fcc 7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7983 (exit $ac_status); } && {
7984 test -z "$ac_c_werror_flag" ||
7985 test ! -s conftest.err
7986 } && test -s conftest.$ac_objext; then
98418dba 7987 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7988else
98418dba 7989 echo "$as_me: failed program was:" >&5
19650fd6
AS
7990sed 's/^/| /' conftest.$ac_ext >&5
7991
d6e01aa5 7992 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
6bae0ccf
DL
7998#include <sys/types.h>
7999#include <$ac_cv_struct_tm>
8000
8001
8002int
8003main ()
8004{
8005static struct tm ac_aggr;
8006if (sizeof ac_aggr.tm_zone)
8007return 0;
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
d6e01aa5
KL
8013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
8018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8019 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8020 ac_status=$?
edfaf76d
LK
8021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
6bae0ccf 8024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
8029 ac_cv_member_struct_tm_tm_zone=yes
8030else
8031 echo "$as_me: failed program was:" >&5
19650fd6
AS
8032sed 's/^/| /' conftest.$ac_ext >&5
8033
d6e01aa5 8034 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 8035fi
d6e01aa5
KL
8036
8037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8038fi
d6e01aa5
KL
8039
8040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8041fi
d6e01aa5
KL
8042{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
8043echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 8044if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 8045
c0d27fcc 8046cat >>confdefs.h <<_ACEOF
98418dba 8047#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
8048_ACEOF
8049
ba4481b5 8050
98418dba 8051fi
ba4481b5 8052
98418dba 8053if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 8054
c0d27fcc 8055cat >>confdefs.h <<\_ACEOF
98418dba 8056#define HAVE_TM_ZONE 1
c0d27fcc 8057_ACEOF
ba4481b5 8058
ba4481b5 8059else
d6e01aa5
KL
8060 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
8061echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
8062if test "${ac_cv_have_decl_tzname+set}" = set; then
8063 echo $ECHO_N "(cached) $ECHO_C" >&6
8064else
8065 cat >conftest.$ac_ext <<_ACEOF
8066/* confdefs.h. */
8067_ACEOF
8068cat confdefs.h >>conftest.$ac_ext
8069cat >>conftest.$ac_ext <<_ACEOF
8070/* end confdefs.h. */
8071#include <time.h>
8072
8073int
8074main ()
8075{
8076#ifndef tzname
8077 (void) tzname;
8078#endif
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
8085if { (ac_try="$ac_compile"
8086case "(($ac_try" in
8087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8088 *) ac_try_echo=$ac_try;;
8089esac
8090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8091 (eval "$ac_compile") 2>conftest.er1
8092 ac_status=$?
8093 grep -v '^ *+' conftest.er1 >conftest.err
8094 rm -f conftest.er1
8095 cat conftest.err >&5
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } && {
8098 test -z "$ac_c_werror_flag" ||
8099 test ! -s conftest.err
8100 } && test -s conftest.$ac_objext; then
8101 ac_cv_have_decl_tzname=yes
8102else
8103 echo "$as_me: failed program was:" >&5
8104sed 's/^/| /' conftest.$ac_ext >&5
8105
8106 ac_cv_have_decl_tzname=no
8107fi
8108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8110fi
8111{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8112echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8113if test $ac_cv_have_decl_tzname = yes; then
8114
8115cat >>confdefs.h <<_ACEOF
8116#define HAVE_DECL_TZNAME 1
8117_ACEOF
8118
8119
8120else
8121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_DECL_TZNAME 0
8123_ACEOF
8124
8125
8126fi
8127
8128
8129 { echo "$as_me:$LINENO: checking for tzname" >&5
8130echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 8131if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 8132 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8133else
98418dba 8134 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8135/* confdefs.h. */
8136_ACEOF
8137cat confdefs.h >>conftest.$ac_ext
8138cat >>conftest.$ac_ext <<_ACEOF
8139/* end confdefs.h. */
98418dba 8140#include <time.h>
d6e01aa5
KL
8141#if !HAVE_DECL_TZNAME
8142extern char *tzname[];
98418dba
CW
8143#endif
8144
98418dba
CW
8145int
8146main ()
8147{
d6e01aa5 8148return tzname[0][0];
98418dba
CW
8149 ;
8150 return 0;
8151}
8152_ACEOF
8153rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
8154if { (ac_try="$ac_link"
8155case "(($ac_try" in
8156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8157 *) ac_try_echo=$ac_try;;
8158esac
8159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8160 (eval "$ac_link") 2>conftest.er1
98418dba 8161 ac_status=$?
edfaf76d
LK
8162 grep -v '^ *+' conftest.er1 >conftest.err
8163 rm -f conftest.er1
8164 cat conftest.err >&5
c0d27fcc 8165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8166 (exit $ac_status); } && {
8167 test -z "$ac_c_werror_flag" ||
8168 test ! -s conftest.err
8169 } && test -s conftest$ac_exeext &&
8170 $as_test_x conftest$ac_exeext; then
98418dba
CW
8171 ac_cv_var_tzname=yes
8172else
8173 echo "$as_me: failed program was:" >&5
19650fd6
AS
8174sed 's/^/| /' conftest.$ac_ext >&5
8175
d6e01aa5 8176 ac_cv_var_tzname=no
ba4481b5 8177fi
d6e01aa5
KL
8178
8179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8180 conftest$ac_exeext conftest.$ac_ext
98418dba 8181fi
d6e01aa5
KL
8182{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8183echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 8184 if test $ac_cv_var_tzname = yes; then
ba4481b5 8185
c0d27fcc 8186cat >>confdefs.h <<\_ACEOF
98418dba 8187#define HAVE_TZNAME 1
c0d27fcc 8188_ACEOF
503d2be0 8189
98418dba
CW
8190 fi
8191fi
503d2be0 8192
d6e01aa5
KL
8193{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8194echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 8195if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
8196 echo $ECHO_N "(cached) $ECHO_C" >&6
8197else
8198 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
98418dba 8204#include <time.h>
b936fae4 8205
98418dba
CW
8206int
8207main ()
8208{
b936fae4
AS
8209static struct tm ac_aggr;
8210if (ac_aggr.tm_gmtoff)
8211return 0;
98418dba
CW
8212 ;
8213 return 0;
8214}
8215_ACEOF
b936fae4 8216rm -f conftest.$ac_objext
d6e01aa5
KL
8217if { (ac_try="$ac_compile"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
8222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8223 (eval "$ac_compile") 2>conftest.er1
98418dba 8224 ac_status=$?
edfaf76d
LK
8225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
c0d27fcc 8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8229 (exit $ac_status); } && {
8230 test -z "$ac_c_werror_flag" ||
8231 test ! -s conftest.err
8232 } && test -s conftest.$ac_objext; then
b936fae4 8233 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
8234else
8235 echo "$as_me: failed program was:" >&5
19650fd6
AS
8236sed 's/^/| /' conftest.$ac_ext >&5
8237
d6e01aa5 8238 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8239/* confdefs.h. */
8240_ACEOF
8241cat confdefs.h >>conftest.$ac_ext
8242cat >>conftest.$ac_ext <<_ACEOF
8243/* end confdefs.h. */
6bae0ccf
DL
8244#include <time.h>
8245
8799b3e4
CW
8246int
8247main ()
8248{
6bae0ccf
DL
8249static struct tm ac_aggr;
8250if (sizeof ac_aggr.tm_gmtoff)
8251return 0;
8799b3e4
CW
8252 ;
8253 return 0;
8254}
8255_ACEOF
6bae0ccf 8256rm -f conftest.$ac_objext
d6e01aa5
KL
8257if { (ac_try="$ac_compile"
8258case "(($ac_try" in
8259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8260 *) ac_try_echo=$ac_try;;
8261esac
8262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8263 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8264 ac_status=$?
edfaf76d
LK
8265 grep -v '^ *+' conftest.er1 >conftest.err
8266 rm -f conftest.er1
8267 cat conftest.err >&5
c0d27fcc 8268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8269 (exit $ac_status); } && {
8270 test -z "$ac_c_werror_flag" ||
8271 test ! -s conftest.err
8272 } && test -s conftest.$ac_objext; then
6bae0ccf 8273 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8274else
8275 echo "$as_me: failed program was:" >&5
19650fd6
AS
8276sed 's/^/| /' conftest.$ac_ext >&5
8277
d6e01aa5 8278 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8279fi
d6e01aa5
KL
8280
8281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8282fi
d6e01aa5
KL
8283
8284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8285fi
d6e01aa5
KL
8286{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8287echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8288if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8289
8290cat >>confdefs.h <<\_ACEOF
8291#define HAVE_TM_GMTOFF 1
8292_ACEOF
8293
8294fi
8295
d6e01aa5
KL
8296{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8297echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8298if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8302/* confdefs.h. */
8303_ACEOF
8304cat confdefs.h >>conftest.$ac_ext
8305cat >>conftest.$ac_ext <<_ACEOF
8306/* end confdefs.h. */
7862d3a8
AS
8307$ac_includes_default
8308#if HAVE_SYS_SOCKET_H
8309#include <sys/socket.h>
8310#endif
8311#if HAVE_NET_IF_H
96f3a036 8312#include <net/if.h>
7862d3a8 8313#endif
96f3a036
DL
8314
8315int
8316main ()
8317{
8318static struct ifreq ac_aggr;
8319if (ac_aggr.ifr_flags)
8320return 0;
8321 ;
8322 return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext
d6e01aa5
KL
8326if { (ac_try="$ac_compile"
8327case "(($ac_try" in
8328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8329 *) ac_try_echo=$ac_try;;
8330esac
8331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8332 (eval "$ac_compile") 2>conftest.er1
96f3a036 8333 ac_status=$?
edfaf76d
LK
8334 grep -v '^ *+' conftest.er1 >conftest.err
8335 rm -f conftest.er1
8336 cat conftest.err >&5
96f3a036 8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8338 (exit $ac_status); } && {
8339 test -z "$ac_c_werror_flag" ||
8340 test ! -s conftest.err
8341 } && test -s conftest.$ac_objext; then
96f3a036
DL
8342 ac_cv_member_struct_ifreq_ifr_flags=yes
8343else
8344 echo "$as_me: failed program was:" >&5
8345sed 's/^/| /' conftest.$ac_ext >&5
8346
d6e01aa5 8347 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8348/* confdefs.h. */
8349_ACEOF
8350cat confdefs.h >>conftest.$ac_ext
8351cat >>conftest.$ac_ext <<_ACEOF
8352/* end confdefs.h. */
7862d3a8
AS
8353$ac_includes_default
8354#if HAVE_SYS_SOCKET_H
8355#include <sys/socket.h>
8356#endif
8357#if HAVE_NET_IF_H
96f3a036 8358#include <net/if.h>
7862d3a8 8359#endif
96f3a036
DL
8360
8361int
8362main ()
8363{
8364static struct ifreq ac_aggr;
8365if (sizeof ac_aggr.ifr_flags)
8366return 0;
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
d6e01aa5
KL
8372if { (ac_try="$ac_compile"
8373case "(($ac_try" in
8374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8375 *) ac_try_echo=$ac_try;;
8376esac
8377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8378 (eval "$ac_compile") 2>conftest.er1
96f3a036 8379 ac_status=$?
edfaf76d
LK
8380 grep -v '^ *+' conftest.er1 >conftest.err
8381 rm -f conftest.er1
8382 cat conftest.err >&5
96f3a036 8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8384 (exit $ac_status); } && {
8385 test -z "$ac_c_werror_flag" ||
8386 test ! -s conftest.err
8387 } && test -s conftest.$ac_objext; then
96f3a036
DL
8388 ac_cv_member_struct_ifreq_ifr_flags=yes
8389else
8390 echo "$as_me: failed program was:" >&5
8391sed 's/^/| /' conftest.$ac_ext >&5
8392
d6e01aa5 8393 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8394fi
d6e01aa5
KL
8395
8396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8397fi
d6e01aa5
KL
8398
8399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8400fi
d6e01aa5
KL
8401{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8402echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8403if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8404
8405cat >>confdefs.h <<_ACEOF
8406#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8407_ACEOF
8408
8409
8410fi
d6e01aa5
KL
8411{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8412echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8413if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8414 echo $ECHO_N "(cached) $ECHO_C" >&6
8415else
8416 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8417/* confdefs.h. */
8418_ACEOF
8419cat confdefs.h >>conftest.$ac_ext
8420cat >>conftest.$ac_ext <<_ACEOF
8421/* end confdefs.h. */
7862d3a8
AS
8422$ac_includes_default
8423#if HAVE_SYS_SOCKET_H
8424#include <sys/socket.h>
8425#endif
8426#if HAVE_NET_IF_H
96f3a036 8427#include <net/if.h>
7862d3a8 8428#endif
96f3a036
DL
8429
8430int
8431main ()
8432{
8433static struct ifreq ac_aggr;
8434if (ac_aggr.ifr_hwaddr)
8435return 0;
8436 ;
8437 return 0;
8438}
8439_ACEOF
8440rm -f conftest.$ac_objext
d6e01aa5
KL
8441if { (ac_try="$ac_compile"
8442case "(($ac_try" in
8443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8444 *) ac_try_echo=$ac_try;;
8445esac
8446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8447 (eval "$ac_compile") 2>conftest.er1
96f3a036 8448 ac_status=$?
edfaf76d
LK
8449 grep -v '^ *+' conftest.er1 >conftest.err
8450 rm -f conftest.er1
8451 cat conftest.err >&5
96f3a036 8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8453 (exit $ac_status); } && {
8454 test -z "$ac_c_werror_flag" ||
8455 test ! -s conftest.err
8456 } && test -s conftest.$ac_objext; then
96f3a036
DL
8457 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8458else
8459 echo "$as_me: failed program was:" >&5
8460sed 's/^/| /' conftest.$ac_ext >&5
8461
d6e01aa5 8462 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8463/* confdefs.h. */
8464_ACEOF
8465cat confdefs.h >>conftest.$ac_ext
8466cat >>conftest.$ac_ext <<_ACEOF
8467/* end confdefs.h. */
7862d3a8
AS
8468$ac_includes_default
8469#if HAVE_SYS_SOCKET_H
8470#include <sys/socket.h>
8471#endif
8472#if HAVE_NET_IF_H
96f3a036 8473#include <net/if.h>
7862d3a8 8474#endif
96f3a036
DL
8475
8476int
8477main ()
8478{
8479static struct ifreq ac_aggr;
8480if (sizeof ac_aggr.ifr_hwaddr)
8481return 0;
8482 ;
8483 return 0;
8484}
8485_ACEOF
8486rm -f conftest.$ac_objext
d6e01aa5
KL
8487if { (ac_try="$ac_compile"
8488case "(($ac_try" in
8489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8490 *) ac_try_echo=$ac_try;;
8491esac
8492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8493 (eval "$ac_compile") 2>conftest.er1
96f3a036 8494 ac_status=$?
edfaf76d
LK
8495 grep -v '^ *+' conftest.er1 >conftest.err
8496 rm -f conftest.er1
8497 cat conftest.err >&5
96f3a036 8498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8499 (exit $ac_status); } && {
8500 test -z "$ac_c_werror_flag" ||
8501 test ! -s conftest.err
8502 } && test -s conftest.$ac_objext; then
96f3a036
DL
8503 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8504else
8505 echo "$as_me: failed program was:" >&5
8506sed 's/^/| /' conftest.$ac_ext >&5
8507
d6e01aa5 8508 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8509fi
d6e01aa5
KL
8510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8512fi
d6e01aa5
KL
8513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8515fi
d6e01aa5
KL
8516{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8517echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8518if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8519
8520cat >>confdefs.h <<_ACEOF
8521#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8522_ACEOF
8523
8524
8525fi
d6e01aa5
KL
8526{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8527echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8528if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8529 echo $ECHO_N "(cached) $ECHO_C" >&6
8530else
8531 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
7862d3a8
AS
8537$ac_includes_default
8538#if HAVE_SYS_SOCKET_H
8539#include <sys/socket.h>
8540#endif
8541#if HAVE_NET_IF_H
96f3a036 8542#include <net/if.h>
7862d3a8 8543#endif
96f3a036
DL
8544
8545int
8546main ()
8547{
8548static struct ifreq ac_aggr;
8549if (ac_aggr.ifr_netmask)
8550return 0;
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
d6e01aa5
KL
8556if { (ac_try="$ac_compile"
8557case "(($ac_try" in
8558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559 *) ac_try_echo=$ac_try;;
8560esac
8561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8562 (eval "$ac_compile") 2>conftest.er1
96f3a036 8563 ac_status=$?
edfaf76d
LK
8564 grep -v '^ *+' conftest.er1 >conftest.err
8565 rm -f conftest.er1
8566 cat conftest.err >&5
96f3a036 8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8568 (exit $ac_status); } && {
8569 test -z "$ac_c_werror_flag" ||
8570 test ! -s conftest.err
8571 } && test -s conftest.$ac_objext; then
96f3a036
DL
8572 ac_cv_member_struct_ifreq_ifr_netmask=yes
8573else
8574 echo "$as_me: failed program was:" >&5
8575sed 's/^/| /' conftest.$ac_ext >&5
8576
d6e01aa5 8577 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8578/* confdefs.h. */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h. */
7862d3a8
AS
8583$ac_includes_default
8584#if HAVE_SYS_SOCKET_H
8585#include <sys/socket.h>
8586#endif
8587#if HAVE_NET_IF_H
96f3a036 8588#include <net/if.h>
7862d3a8 8589#endif
96f3a036
DL
8590
8591int
8592main ()
8593{
8594static struct ifreq ac_aggr;
8595if (sizeof ac_aggr.ifr_netmask)
8596return 0;
8597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
d6e01aa5
KL
8602if { (ac_try="$ac_compile"
8603case "(($ac_try" in
8604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8605 *) ac_try_echo=$ac_try;;
8606esac
8607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8608 (eval "$ac_compile") 2>conftest.er1
96f3a036 8609 ac_status=$?
edfaf76d
LK
8610 grep -v '^ *+' conftest.er1 >conftest.err
8611 rm -f conftest.er1
8612 cat conftest.err >&5
96f3a036 8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8614 (exit $ac_status); } && {
8615 test -z "$ac_c_werror_flag" ||
8616 test ! -s conftest.err
8617 } && test -s conftest.$ac_objext; then
96f3a036
DL
8618 ac_cv_member_struct_ifreq_ifr_netmask=yes
8619else
8620 echo "$as_me: failed program was:" >&5
8621sed 's/^/| /' conftest.$ac_ext >&5
8622
d6e01aa5 8623 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8624fi
d6e01aa5
KL
8625
8626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8627fi
d6e01aa5
KL
8628
8629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8630fi
d6e01aa5
KL
8631{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8632echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8633if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8634
8635cat >>confdefs.h <<_ACEOF
8636#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8637_ACEOF
8638
8639
8640fi
d6e01aa5
KL
8641{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8642echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8643if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8644 echo $ECHO_N "(cached) $ECHO_C" >&6
8645else
8646 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8647/* confdefs.h. */
8648_ACEOF
8649cat confdefs.h >>conftest.$ac_ext
8650cat >>conftest.$ac_ext <<_ACEOF
8651/* end confdefs.h. */
7862d3a8
AS
8652$ac_includes_default
8653#if HAVE_SYS_SOCKET_H
8654#include <sys/socket.h>
8655#endif
8656#if HAVE_NET_IF_H
96f3a036 8657#include <net/if.h>
7862d3a8 8658#endif
96f3a036
DL
8659
8660int
8661main ()
8662{
8663static struct ifreq ac_aggr;
8664if (ac_aggr.ifr_broadaddr)
8665return 0;
8666 ;
8667 return 0;
8668}
8669_ACEOF
8670rm -f conftest.$ac_objext
d6e01aa5
KL
8671if { (ac_try="$ac_compile"
8672case "(($ac_try" in
8673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8674 *) ac_try_echo=$ac_try;;
8675esac
8676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8677 (eval "$ac_compile") 2>conftest.er1
96f3a036 8678 ac_status=$?
edfaf76d
LK
8679 grep -v '^ *+' conftest.er1 >conftest.err
8680 rm -f conftest.er1
8681 cat conftest.err >&5
96f3a036 8682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8683 (exit $ac_status); } && {
8684 test -z "$ac_c_werror_flag" ||
8685 test ! -s conftest.err
8686 } && test -s conftest.$ac_objext; then
96f3a036
DL
8687 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8688else
8689 echo "$as_me: failed program was:" >&5
8690sed 's/^/| /' conftest.$ac_ext >&5
8691
d6e01aa5 8692 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
7862d3a8
AS
8698$ac_includes_default
8699#if HAVE_SYS_SOCKET_H
8700#include <sys/socket.h>
8701#endif
8702#if HAVE_NET_IF_H
96f3a036 8703#include <net/if.h>
7862d3a8 8704#endif
96f3a036
DL
8705
8706int
8707main ()
8708{
8709static struct ifreq ac_aggr;
8710if (sizeof ac_aggr.ifr_broadaddr)
8711return 0;
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
d6e01aa5
KL
8717if { (ac_try="$ac_compile"
8718case "(($ac_try" in
8719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8720 *) ac_try_echo=$ac_try;;
8721esac
8722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8723 (eval "$ac_compile") 2>conftest.er1
96f3a036 8724 ac_status=$?
edfaf76d
LK
8725 grep -v '^ *+' conftest.er1 >conftest.err
8726 rm -f conftest.er1
8727 cat conftest.err >&5
96f3a036 8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8729 (exit $ac_status); } && {
8730 test -z "$ac_c_werror_flag" ||
8731 test ! -s conftest.err
8732 } && test -s conftest.$ac_objext; then
96f3a036
DL
8733 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8734else
8735 echo "$as_me: failed program was:" >&5
8736sed 's/^/| /' conftest.$ac_ext >&5
8737
d6e01aa5 8738 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8739fi
d6e01aa5
KL
8740
8741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8742fi
d6e01aa5
KL
8743
8744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8745fi
d6e01aa5
KL
8746{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8747echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8748if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8749
8750cat >>confdefs.h <<_ACEOF
8751#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8752_ACEOF
8753
8754
8755fi
d6e01aa5
KL
8756{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8757echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8758if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8759 echo $ECHO_N "(cached) $ECHO_C" >&6
8760else
8761 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8762/* confdefs.h. */
8763_ACEOF
8764cat confdefs.h >>conftest.$ac_ext
8765cat >>conftest.$ac_ext <<_ACEOF
8766/* end confdefs.h. */
7862d3a8
AS
8767$ac_includes_default
8768#if HAVE_SYS_SOCKET_H
8769#include <sys/socket.h>
8770#endif
8771#if HAVE_NET_IF_H
96f3a036 8772#include <net/if.h>
7862d3a8 8773#endif
96f3a036
DL
8774
8775int
8776main ()
8777{
8778static struct ifreq ac_aggr;
8779if (ac_aggr.ifr_addr)
8780return 0;
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785rm -f conftest.$ac_objext
d6e01aa5
KL
8786if { (ac_try="$ac_compile"
8787case "(($ac_try" in
8788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8789 *) ac_try_echo=$ac_try;;
8790esac
8791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8792 (eval "$ac_compile") 2>conftest.er1
96f3a036 8793 ac_status=$?
edfaf76d
LK
8794 grep -v '^ *+' conftest.er1 >conftest.err
8795 rm -f conftest.er1
8796 cat conftest.err >&5
96f3a036 8797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8798 (exit $ac_status); } && {
8799 test -z "$ac_c_werror_flag" ||
8800 test ! -s conftest.err
8801 } && test -s conftest.$ac_objext; then
96f3a036
DL
8802 ac_cv_member_struct_ifreq_ifr_addr=yes
8803else
8804 echo "$as_me: failed program was:" >&5
8805sed 's/^/| /' conftest.$ac_ext >&5
8806
d6e01aa5 8807 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
7862d3a8
AS
8813$ac_includes_default
8814#if HAVE_SYS_SOCKET_H
8815#include <sys/socket.h>
8816#endif
8817#if HAVE_NET_IF_H
96f3a036 8818#include <net/if.h>
7862d3a8 8819#endif
96f3a036
DL
8820
8821int
8822main ()
8823{
8824static struct ifreq ac_aggr;
8825if (sizeof ac_aggr.ifr_addr)
8826return 0;
8827 ;
8828 return 0;
8829}
8830_ACEOF
8831rm -f conftest.$ac_objext
d6e01aa5
KL
8832if { (ac_try="$ac_compile"
8833case "(($ac_try" in
8834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8835 *) ac_try_echo=$ac_try;;
8836esac
8837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8838 (eval "$ac_compile") 2>conftest.er1
96f3a036 8839 ac_status=$?
edfaf76d
LK
8840 grep -v '^ *+' conftest.er1 >conftest.err
8841 rm -f conftest.er1
8842 cat conftest.err >&5
96f3a036 8843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8844 (exit $ac_status); } && {
8845 test -z "$ac_c_werror_flag" ||
8846 test ! -s conftest.err
8847 } && test -s conftest.$ac_objext; then
96f3a036
DL
8848 ac_cv_member_struct_ifreq_ifr_addr=yes
8849else
8850 echo "$as_me: failed program was:" >&5
8851sed 's/^/| /' conftest.$ac_ext >&5
8852
d6e01aa5 8853 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8854fi
d6e01aa5
KL
8855
8856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8857fi
d6e01aa5
KL
8858
8859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8860fi
d6e01aa5
KL
8861{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8862echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8863if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8864
8865cat >>confdefs.h <<_ACEOF
8866#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8867_ACEOF
8868
8869
8870fi
8871
8799b3e4 8872
8799b3e4 8873
d6e01aa5
KL
8874{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8875echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8876if test "$ac_cv_prog_cc_c89" != no; then
8877 { echo "$as_me:$LINENO: result: yes" >&5
8878echo "${ECHO_T}yes" >&6; }
98418dba 8879
c0d27fcc 8880cat >>confdefs.h <<\_ACEOF
98418dba 8881#define PROTOTYPES 1
c0d27fcc
MR
8882_ACEOF
8883
8884
8885cat >>confdefs.h <<\_ACEOF
8886#define __PROTOTYPES 1
8887_ACEOF
98418dba
CW
8888
8889else
d6e01aa5
KL
8890 { echo "$as_me:$LINENO: result: no" >&5
8891echo "${ECHO_T}no" >&6; }
98418dba
CW
8892fi
8893
d6e01aa5
KL
8894{ echo "$as_me:$LINENO: checking for working volatile" >&5
8895echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8896if test "${ac_cv_c_volatile+set}" = set; then
8897 echo $ECHO_N "(cached) $ECHO_C" >&6
8898else
8899 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8900/* confdefs.h. */
8901_ACEOF
8902cat confdefs.h >>conftest.$ac_ext
8903cat >>conftest.$ac_ext <<_ACEOF
8904/* end confdefs.h. */
98418dba 8905
98418dba
CW
8906int
8907main ()
8908{
8909
8910volatile int x;
d6e01aa5
KL
8911int * volatile y = (int *) 0;
8912return !x && !y;
98418dba
CW
8913 ;
8914 return 0;
8915}
8916_ACEOF
8917rm -f conftest.$ac_objext
d6e01aa5
KL
8918if { (ac_try="$ac_compile"
8919case "(($ac_try" in
8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8921 *) ac_try_echo=$ac_try;;
8922esac
8923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8924 (eval "$ac_compile") 2>conftest.er1
98418dba 8925 ac_status=$?
edfaf76d
LK
8926 grep -v '^ *+' conftest.er1 >conftest.err
8927 rm -f conftest.er1
8928 cat conftest.err >&5
c0d27fcc 8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8930 (exit $ac_status); } && {
8931 test -z "$ac_c_werror_flag" ||
8932 test ! -s conftest.err
8933 } && test -s conftest.$ac_objext; then
98418dba
CW
8934 ac_cv_c_volatile=yes
8935else
8936 echo "$as_me: failed program was:" >&5
19650fd6
AS
8937sed 's/^/| /' conftest.$ac_ext >&5
8938
d6e01aa5 8939 ac_cv_c_volatile=no
98418dba 8940fi
d6e01aa5
KL
8941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8943fi
d6e01aa5
KL
8944{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8945echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8946if test $ac_cv_c_volatile = no; then
8947
c0d27fcc 8948cat >>confdefs.h <<\_ACEOF
98418dba 8949#define volatile
c0d27fcc 8950_ACEOF
98418dba
CW
8951
8952fi
8953
d6e01aa5
KL
8954{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8955echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8956if test "${ac_cv_c_const+set}" = set; then
8957 echo $ECHO_N "(cached) $ECHO_C" >&6
8958else
8959 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8960/* confdefs.h. */
8961_ACEOF
8962cat confdefs.h >>conftest.$ac_ext
8963cat >>conftest.$ac_ext <<_ACEOF
8964/* end confdefs.h. */
98418dba 8965
98418dba
CW
8966int
8967main ()
8968{
8969/* FIXME: Include the comments suggested by Paul. */
8970#ifndef __cplusplus
8971 /* Ultrix mips cc rejects this. */
8972 typedef int charset[2];
d6e01aa5 8973 const charset cs;
98418dba 8974 /* SunOS 4.1.1 cc rejects this. */
d6e01aa5
KL
8975 char const *const *pcpcc;
8976 char **ppc;
98418dba
CW
8977 /* NEC SVR4.0.2 mips cc rejects this. */
8978 struct point {int x, y;};
8979 static struct point const zero = {0,0};
8980 /* AIX XL C 1.02.0.0 rejects this.
8981 It does not let you subtract one const X* pointer from another in
8982 an arm of an if-expression whose if-part is not a constant
8983 expression */
8984 const char *g = "string";
d6e01aa5 8985 pcpcc = &g + (g ? g-g : 0);
98418dba 8986 /* HPUX 7.0 cc rejects these. */
d6e01aa5
KL
8987 ++pcpcc;
8988 ppc = (char**) pcpcc;
8989 pcpcc = (char const *const *) ppc;
98418dba
CW
8990 { /* SCO 3.2v4 cc rejects this. */
8991 char *t;
8992 char const *s = 0 ? (char *) 0 : (char const *) 0;
8993
8994 *t++ = 0;
d6e01aa5 8995 if (s) return 0;
98418dba
CW
8996 }
8997 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8998 int x[] = {25, 17};
8999 const int *foo = &x[0];
9000 ++foo;
9001 }
9002 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9003 typedef const int *iptr;
9004 iptr p = 0;
9005 ++p;
9006 }
9007 { /* AIX XL C 1.02.0.0 rejects this saying
9008 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9009 struct s { int j; const int *ap[3]; };
9010 struct s *b; b->j = 5;
9011 }
9012 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9013 const int foo = 10;
d6e01aa5 9014 if (!foo) return 0;
98418dba 9015 }
d6e01aa5 9016 return !cs[0] && !zero.x;
98418dba
CW
9017#endif
9018
9019 ;
9020 return 0;
9021}
9022_ACEOF
9023rm -f conftest.$ac_objext
d6e01aa5
KL
9024if { (ac_try="$ac_compile"
9025case "(($ac_try" in
9026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9027 *) ac_try_echo=$ac_try;;
9028esac
9029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9030 (eval "$ac_compile") 2>conftest.er1
98418dba 9031 ac_status=$?
edfaf76d
LK
9032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
c0d27fcc 9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9036 (exit $ac_status); } && {
9037 test -z "$ac_c_werror_flag" ||
9038 test ! -s conftest.err
9039 } && test -s conftest.$ac_objext; then
98418dba
CW
9040 ac_cv_c_const=yes
9041else
9042 echo "$as_me: failed program was:" >&5
19650fd6
AS
9043sed 's/^/| /' conftest.$ac_ext >&5
9044
d6e01aa5 9045 ac_cv_c_const=no
98418dba 9046fi
d6e01aa5
KL
9047
9048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9049fi
d6e01aa5
KL
9050{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9051echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
9052if test $ac_cv_c_const = no; then
9053
c0d27fcc 9054cat >>confdefs.h <<\_ACEOF
98418dba 9055#define const
c0d27fcc 9056_ACEOF
98418dba
CW
9057
9058fi
9059
d6e01aa5
KL
9060{ echo "$as_me:$LINENO: checking for void * support" >&5
9061echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
9062if test "${emacs_cv_void_star+set}" = set; then
9063 echo $ECHO_N "(cached) $ECHO_C" >&6
9064else
9065 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9066/* confdefs.h. */
9067_ACEOF
9068cat confdefs.h >>conftest.$ac_ext
9069cat >>conftest.$ac_ext <<_ACEOF
9070/* end confdefs.h. */
98418dba 9071
98418dba
CW
9072int
9073main ()
9074{
9075void * foo;
9076 ;
9077 return 0;
9078}
9079_ACEOF
9080rm -f conftest.$ac_objext
d6e01aa5
KL
9081if { (ac_try="$ac_compile"
9082case "(($ac_try" in
9083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9084 *) ac_try_echo=$ac_try;;
9085esac
9086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9087 (eval "$ac_compile") 2>conftest.er1
98418dba 9088 ac_status=$?
edfaf76d
LK
9089 grep -v '^ *+' conftest.er1 >conftest.err
9090 rm -f conftest.er1
9091 cat conftest.err >&5
c0d27fcc 9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9093 (exit $ac_status); } && {
9094 test -z "$ac_c_werror_flag" ||
9095 test ! -s conftest.err
9096 } && test -s conftest.$ac_objext; then
98418dba
CW
9097 emacs_cv_void_star=yes
9098else
9099 echo "$as_me: failed program was:" >&5
19650fd6
AS
9100sed 's/^/| /' conftest.$ac_ext >&5
9101
d6e01aa5 9102 emacs_cv_void_star=no
98418dba 9103fi
d6e01aa5
KL
9104
9105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9106fi
d6e01aa5
KL
9107{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9108echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9109if test $emacs_cv_void_star = yes; then
c0d27fcc 9110 cat >>confdefs.h <<\_ACEOF
98418dba 9111#define POINTER_TYPE void
c0d27fcc 9112_ACEOF
98418dba
CW
9113
9114else
c0d27fcc 9115 cat >>confdefs.h <<\_ACEOF
98418dba 9116#define POINTER_TYPE char
c0d27fcc 9117_ACEOF
98418dba
CW
9118
9119fi
9120
c0d27fcc 9121
4494a266
JD
9122
9123
cd958eb3 9124
d6e01aa5
KL
9125{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9126echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9127set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9128if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9129 echo $ECHO_N "(cached) $ECHO_C" >&6
9130else
c0d27fcc 9131 cat >conftest.make <<\_ACEOF
d6e01aa5 9132SHELL = /bin/sh
98418dba 9133all:
d6e01aa5 9134 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9135_ACEOF
98418dba 9136# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9137case `${MAKE-make} -f conftest.make 2>/dev/null` in
9138 *@@@%%%=?*=@@@%%%*)
9139 eval ac_cv_prog_make_${ac_make}_set=yes;;
9140 *)
9141 eval ac_cv_prog_make_${ac_make}_set=no;;
9142esac
98418dba
CW
9143rm -f conftest.make
9144fi
d6e01aa5
KL
9145if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9146 { echo "$as_me:$LINENO: result: yes" >&5
9147echo "${ECHO_T}yes" >&6; }
98418dba
CW
9148 SET_MAKE=
9149else
d6e01aa5
KL
9150 { echo "$as_me:$LINENO: result: no" >&5
9151echo "${ECHO_T}no" >&6; }
98418dba
CW
9152 SET_MAKE="MAKE=${MAKE-make}"
9153fi
9154
c0d27fcc 9155
d6e01aa5
KL
9156{ echo "$as_me:$LINENO: checking for long file names" >&5
9157echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9158if test "${ac_cv_sys_long_file_names+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161 ac_cv_sys_long_file_names=yes
9162# Test for long file names in all the places we know might matter:
9163# . the current directory, where building will happen
9164# $prefix/lib where we will be installing things
9165# $exec_prefix/lib likewise
98418dba 9166# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9167# /tmp where it might want to write temporary files
9168# /var/tmp likewise
9169# /usr/tmp likewise
d6e01aa5
KL
9170for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9171 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9172 # in the usual case where exec_prefix is '${prefix}'.
9173 case $ac_dir in #(
9174 . | /* | ?:[\\/]*) ;; #(
9175 *) continue;;
9176 esac
9177 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9178 ac_xdir=$ac_dir/cf$$
d6e01aa5 9179 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9180 ac_tf1=$ac_xdir/conftest9012345
9181 ac_tf2=$ac_xdir/conftest9012346
d6e01aa5 9182 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9183 ac_cv_sys_long_file_names=no
d6e01aa5
KL
9184 rm -f -r "$ac_xdir" 2>/dev/null
9185 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9186done
9187fi
d6e01aa5
KL
9188{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9189echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9190if test $ac_cv_sys_long_file_names = yes; then
9191
c0d27fcc 9192cat >>confdefs.h <<\_ACEOF
98418dba 9193#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9194_ACEOF
98418dba
CW
9195
9196fi
9197
c0d27fcc 9198
98418dba
CW
9199#### Choose a window system.
9200
d6e01aa5
KL
9201{ echo "$as_me:$LINENO: checking for X" >&5
9202echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9203
c0d27fcc 9204
d6e01aa5 9205# Check whether --with-x was given.
98418dba 9206if test "${with_x+set}" = set; then
d6e01aa5
KL
9207 withval=$with_x;
9208fi
98418dba 9209
98418dba
CW
9210# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9211if test "x$with_x" = xno; then
9212 # The user explicitly disabled X.
9213 have_x=disabled
9214else
d6e01aa5
KL
9215 case $x_includes,$x_libraries in #(
9216 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9217echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9218 { (exit 1); exit 1; }; };; #(
9219 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9220 echo $ECHO_N "(cached) $ECHO_C" >&6
9221else
9222 # One or both of the vars are not set, and there is no cached value.
9223ac_x_includes=no ac_x_libraries=no
d6e01aa5 9224rm -f -r conftest.dir
98418dba
CW
9225if mkdir conftest.dir; then
9226 cd conftest.dir
c0d27fcc 9227 cat >Imakefile <<'_ACEOF'
d6e01aa5
KL
9228incroot:
9229 @echo incroot='${INCROOT}'
9230usrlibdir:
9231 @echo usrlibdir='${USRLIBDIR}'
9232libdir:
9233 @echo libdir='${LIBDIR}'
9234_ACEOF
9235 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9236 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9237 for ac_var in incroot usrlibdir libdir; do
9238 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9239 done
98418dba
CW
9240 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9241 for ac_extension in a so sl; do
d6e01aa5
KL
9242 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9243 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9244 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9245 fi
9246 done
9247 # Screen out bogus values from the imake configuration. They are
9248 # bogus both because they are the default anyway, and because
9249 # using them would break gcc on systems where it needs fixed includes.
9250 case $ac_im_incroot in
d6e01aa5 9251 /usr/include) ac_x_includes= ;;
98418dba
CW
9252 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9253 esac
9254 case $ac_im_usrlibdir in
9255 /usr/lib | /lib) ;;
9256 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9257 esac
9258 fi
9259 cd ..
d6e01aa5 9260 rm -f -r conftest.dir
98418dba
CW
9261fi
9262
9263# Standard set of common directories for X headers.
9264# Check X11 before X11Rn because it is often a symlink to the current release.
9265ac_x_header_dirs='
9266/usr/X11/include
9267/usr/X11R6/include
9268/usr/X11R5/include
9269/usr/X11R4/include
9270
9271/usr/include/X11
9272/usr/include/X11R6
9273/usr/include/X11R5
9274/usr/include/X11R4
9275
9276/usr/local/X11/include
9277/usr/local/X11R6/include
9278/usr/local/X11R5/include
9279/usr/local/X11R4/include
9280
9281/usr/local/include/X11
9282/usr/local/include/X11R6
9283/usr/local/include/X11R5
9284/usr/local/include/X11R4
9285
9286/usr/X386/include
9287/usr/x386/include
9288/usr/XFree86/include/X11
9289
9290/usr/include
9291/usr/local/include
9292/usr/unsupported/include
9293/usr/athena/include
9294/usr/local/x11r5/include
9295/usr/lpp/Xamples/include
9296
9297/usr/openwin/include
9298/usr/openwin/share/include'
9299
9300if test "$ac_x_includes" = no; then
d6e01aa5 9301 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9302 # First, try using that file with no special directory specified.
9303 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
c3a63088 9309#include <X11/Xlib.h>
98418dba 9310_ACEOF
d6e01aa5
KL
9311if { (ac_try="$ac_cpp conftest.$ac_ext"
9312case "(($ac_try" in
9313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9314 *) ac_try_echo=$ac_try;;
9315esac
9316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9317 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9318 ac_status=$?
6bae0ccf 9319 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9320 rm -f conftest.er1
9321 cat conftest.err >&5
c0d27fcc 9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9323 (exit $ac_status); } >/dev/null && {
9324 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9325 test ! -s conftest.err
9326 }; then
98418dba
CW
9327 # We can compile using X headers with no special include directory.
9328ac_x_includes=
9329else
9330 echo "$as_me: failed program was:" >&5
19650fd6
AS
9331sed 's/^/| /' conftest.$ac_ext >&5
9332
98418dba 9333 for ac_dir in $ac_x_header_dirs; do
c3a63088 9334 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9335 ac_x_includes=$ac_dir
9336 break
9337 fi
9338done
9339fi
d6e01aa5 9340
98418dba
CW
9341rm -f conftest.err conftest.$ac_ext
9342fi # $ac_x_includes = no
9343
9344if test "$ac_x_libraries" = no; then
9345 # Check for the libraries.
9346 # See if we find them without any special options.
9347 # Don't add to $LIBS permanently.
9348 ac_save_LIBS=$LIBS
c3a63088 9349 LIBS="-lX11 $LIBS"
98418dba 9350 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9351/* confdefs.h. */
9352_ACEOF
9353cat confdefs.h >>conftest.$ac_ext
9354cat >>conftest.$ac_ext <<_ACEOF
9355/* end confdefs.h. */
c3a63088 9356#include <X11/Xlib.h>
98418dba
CW
9357int
9358main ()
9359{
c3a63088 9360XrmInitialize ()
98418dba
CW
9361 ;
9362 return 0;
9363}
9364_ACEOF
9365rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9366if { (ac_try="$ac_link"
9367case "(($ac_try" in
9368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9369 *) ac_try_echo=$ac_try;;
9370esac
9371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9372 (eval "$ac_link") 2>conftest.er1
98418dba 9373 ac_status=$?
edfaf76d
LK
9374 grep -v '^ *+' conftest.er1 >conftest.err
9375 rm -f conftest.er1
9376 cat conftest.err >&5
c0d27fcc 9377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9378 (exit $ac_status); } && {
9379 test -z "$ac_c_werror_flag" ||
9380 test ! -s conftest.err
9381 } && test -s conftest$ac_exeext &&
9382 $as_test_x conftest$ac_exeext; then
98418dba
CW
9383 LIBS=$ac_save_LIBS
9384# We can link X programs with no special library path.
9385ac_x_libraries=
9386else
9387 echo "$as_me: failed program was:" >&5
19650fd6
AS
9388sed 's/^/| /' conftest.$ac_ext >&5
9389
d6e01aa5 9390 LIBS=$ac_save_LIBS
98418dba
CW
9391for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9392do
9393 # Don't even attempt the hair of trying to link an X program!
9394 for ac_extension in a so sl; do
d6e01aa5 9395 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9396 ac_x_libraries=$ac_dir
9397 break 2
9398 fi
9399 done
9400done
9401fi
d6e01aa5
KL
9402
9403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9404 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9405fi # $ac_x_libraries = no
9406
d6e01aa5
KL
9407case $ac_x_includes,$ac_x_libraries in #(
9408 no,* | *,no | *\'*)
9409 # Didn't find X, or a directory has "'" in its name.
9410 ac_cv_have_x="have_x=no";; #(
9411 *)
9412 # Record where we found X for the cache.
9413 ac_cv_have_x="have_x=yes\
9414 ac_x_includes='$ac_x_includes'\
9415 ac_x_libraries='$ac_x_libraries'"
9416esac
98418dba 9417fi
d6e01aa5
KL
9418;; #(
9419 *) have_x=yes;;
9420 esac
98418dba
CW
9421 eval "$ac_cv_have_x"
9422fi # $with_x != no
9423
9424if test "$have_x" != yes; then
d6e01aa5
KL
9425 { echo "$as_me:$LINENO: result: $have_x" >&5
9426echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9427 no_x=yes
9428else
9429 # If each of the values was on the command line, it overrides each guess.
9430 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9431 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9432 # Update the cache value to reflect the command line values.
d6e01aa5
KL
9433 ac_cv_have_x="have_x=yes\
9434 ac_x_includes='$x_includes'\
9435 ac_x_libraries='$x_libraries'"
9436 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9437echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9438fi
9439
9440if test "$no_x" = yes; then
9441 window_system=none
9442else
9443 window_system=x11
9444fi
9445
92d1ccf4
AS
9446if test "${x_libraries}" != NONE; then
9447 if test -n "${x_libraries}"; then
9448 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9449 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9450 fi
98418dba 9451 x_default_search_path=""
92d1ccf4
AS
9452 x_search_path=${x_libraries}
9453 if test -z "${x_search_path}"; then
9454 x_search_path=/usr/lib
9455 fi
9456 for x_library in `echo ${x_search_path}: | \
9457 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9458 x_search_path="\
9459${x_library}/X11/%L/%T/%N%C%S:\
9460${x_library}/X11/%l/%T/%N%C%S:\
9461${x_library}/X11/%T/%N%C%S:\
9462${x_library}/X11/%L/%T/%N%S:\
9463${x_library}/X11/%l/%T/%N%S:\
9464${x_library}/X11/%T/%N%S"
9465 if test x"${x_default_search_path}" = x; then
9466 x_default_search_path=${x_search_path}
9467 else
9468 x_default_search_path="${x_search_path}:${x_default_search_path}"
9469 fi
9470 done
9471fi
9472if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9473 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9474fi
9475
9476if test x"${x_includes}" = x; then
9477 bitmapdir=/usr/include/X11/bitmaps
9478else
9479 # accumulate include directories that have X11 bitmap subdirectories
9480 bmd_acc="dummyval"
9481 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9482 if test -d "${bmd}/X11/bitmaps"; then
9483 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9484 fi
9485 if test -d "${bmd}/bitmaps"; then
9486 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9487 fi
9488 done
9489 if test ${bmd_acc} != "dummyval"; then
9490 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9491 fi
9492fi
9493
5d6da11e 9494HAVE_CARBON=no
1d4d5604
YM
9495if test "${with_carbon}" != no; then
9496 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
d6e01aa5
KL
9497 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9498echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9499if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9500 echo $ECHO_N "(cached) $ECHO_C" >&6
9501fi
d6e01aa5
KL
9502{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9503echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9504else
9505 # Is the header compilable?
d6e01aa5
KL
9506{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9507echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9508cat >conftest.$ac_ext <<_ACEOF
9509/* confdefs.h. */
9510_ACEOF
9511cat confdefs.h >>conftest.$ac_ext
9512cat >>conftest.$ac_ext <<_ACEOF
9513/* end confdefs.h. */
9514$ac_includes_default
9515#include <Carbon/Carbon.h>
9516_ACEOF
9517rm -f conftest.$ac_objext
d6e01aa5
KL
9518if { (ac_try="$ac_compile"
9519case "(($ac_try" in
9520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9521 *) ac_try_echo=$ac_try;;
9522esac
9523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9524 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9525 ac_status=$?
edfaf76d
LK
9526 grep -v '^ *+' conftest.er1 >conftest.err
9527 rm -f conftest.er1
9528 cat conftest.err >&5
5d6da11e 9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9530 (exit $ac_status); } && {
9531 test -z "$ac_c_werror_flag" ||
9532 test ! -s conftest.err
9533 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9534 ac_header_compiler=yes
9535else
9536 echo "$as_me: failed program was:" >&5
9537sed 's/^/| /' conftest.$ac_ext >&5
9538
d6e01aa5 9539 ac_header_compiler=no
5d6da11e 9540fi
d6e01aa5
KL
9541
9542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9543{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9544echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9545
9546# Is the header present?
d6e01aa5
KL
9547{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9548echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9549cat >conftest.$ac_ext <<_ACEOF
9550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
9555#include <Carbon/Carbon.h>
9556_ACEOF
d6e01aa5
KL
9557if { (ac_try="$ac_cpp conftest.$ac_ext"
9558case "(($ac_try" in
9559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9560 *) ac_try_echo=$ac_try;;
9561esac
9562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9563 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9564 ac_status=$?
9565 grep -v '^ *+' conftest.er1 >conftest.err
9566 rm -f conftest.er1
9567 cat conftest.err >&5
9568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9569 (exit $ac_status); } >/dev/null && {
9570 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9571 test ! -s conftest.err
9572 }; then
5d6da11e
YM
9573 ac_header_preproc=yes
9574else
9575 echo "$as_me: failed program was:" >&5
9576sed 's/^/| /' conftest.$ac_ext >&5
9577
9578 ac_header_preproc=no
9579fi
d6e01aa5 9580
5d6da11e 9581rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
9582{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9583echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9584
9585# So? What about this header?
edfaf76d
LK
9586case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9587 yes:no: )
5d6da11e
YM
9588 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9589echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9590 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9591echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9592 ac_header_preproc=yes
5d6da11e 9593 ;;
edfaf76d 9594 no:yes:* )
5d6da11e
YM
9595 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9596echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9597 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9598echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9599 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9600echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9601 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9602echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9603 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9604echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9605 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9606echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 9607
5d6da11e
YM
9608 ;;
9609esac
d6e01aa5
KL
9610{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9611echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9612if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9613 echo $ECHO_N "(cached) $ECHO_C" >&6
9614else
9615 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9616fi
d6e01aa5
KL
9617{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9618echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9619
9620fi
9621if test $ac_cv_header_Carbon_Carbon_h = yes; then
9622 HAVE_CARBON=yes
9623fi
9624
9625
1d4d5604
YM
9626fi
9627if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9628 if test "${with_carbon+set}" != set \
9629 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9630 for var in with_x with_x_toolkit with_gtk with_xim \
9631 with_xpm with_jpeg with_tiff with_gif with_png; do
9632 if eval test \"\${$var+set}\" = set; then
9633 HAVE_CARBON=no
9634 break
9635 fi
9636 done
5d6da11e
YM
9637 fi
9638fi
1d4d5604
YM
9639if test "${HAVE_CARBON}" = yes; then
9640 window_system=mac
9641fi
9642
9643case "${window_system}" in
9644 x11 )
9645 HAVE_X_WINDOWS=yes
9646 HAVE_X11=yes
9647 case "${with_x_toolkit}" in
9648 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9649 motif ) USE_X_TOOLKIT=MOTIF ;;
9650 gtk ) with_gtk=yes
9651 USE_X_TOOLKIT=none ;;
9652 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9653 * )
9654 if test x"$with_gtk" = xyes; then
9655 USE_X_TOOLKIT=none
9656 else
9657 USE_X_TOOLKIT=maybe
9658 fi
9659 ;;
1d4d5604
YM
9660 esac
9661 ;;
9662 mac | none )
9663 HAVE_X_WINDOWS=no
9664 HAVE_X11=no
9665 USE_X_TOOLKIT=none
9666 ;;
9667esac
9668
cfe440b8
JD
9669if test "$window_system" = none && test "X$with_x" != "Xno"; then
9670 # Extract the first word of "X", so it can be a program name with args.
9671set dummy X; ac_word=$2
9672{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9674if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9675 echo $ECHO_N "(cached) $ECHO_C" >&6
9676else
9677 if test -n "$HAVE_XSERVER"; then
9678 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9679else
9680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681for as_dir in $PATH
9682do
9683 IFS=$as_save_IFS
9684 test -z "$as_dir" && as_dir=.
9685 for ac_exec_ext in '' $ac_executable_extensions; do
9686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9687 ac_cv_prog_HAVE_XSERVER="true"
9688 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9689 break 2
9690 fi
9691done
9692done
9693IFS=$as_save_IFS
9694
9695 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9696fi
9697fi
9698HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9699if test -n "$HAVE_XSERVER"; then
9700 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9701echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9702else
9703 { echo "$as_me:$LINENO: result: no" >&5
9704echo "${ECHO_T}no" >&6; }
9705fi
9706
9707
9708 if test "$HAVE_XSERVER" = true ||
9709 test -n "$DISPLAY" ||
9710 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9711 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9712were found. You should install the relevant development files for X
9713and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9714sure you have development files for image handling, i.e.
9715tiff, gif, jpeg, png and xpm.
9716If you are sure you want Emacs compiled without X window support, pass
9717 --without-x
9718to configure." >&5
9719echo "$as_me: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9720were found. You should install the relevant development files for X
9721and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9722sure you have development files for image handling, i.e.
9723tiff, gif, jpeg, png and xpm.
9724If you are sure you want Emacs compiled without X window support, pass
9725 --without-x
9726to configure." >&2;}
9727 { (exit 1); exit 1; }; }
9728 fi
9729fi
9730
1d4d5604
YM
9731### If we're using X11, we should use the X menu package.
9732HAVE_MENUS=no
9733case ${HAVE_X11} in
9734 yes ) HAVE_MENUS=yes ;;
9735esac
9736
9737if test "${opsys}" = "hpux9"; then
9738 case "${x_libraries}" in
9739 *X11R4* )
9740 opsysfile="s/hpux9-x11r4.h"
9741 ;;
9742 esac
9743fi
9744
9745if test "${opsys}" = "hpux9shr"; then
9746 case "${x_libraries}" in
9747 *X11R4* )
9748 opsysfile="s/hpux9shxr4.h"
9749 ;;
9750 esac
9751fi
5d6da11e 9752
98418dba
CW
9753### Compute the unexec source name from the object name.
9754UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9755
9756# Do the opsystem or machine files prohibit the use of the GNU malloc?
9757# Assume not, until told otherwise.
9758GNU_MALLOC=yes
9759doug_lea_malloc=yes
d6e01aa5
KL
9760{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9761echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9762if test "${ac_cv_func_malloc_get_state+set}" = set; then
9763 echo $ECHO_N "(cached) $ECHO_C" >&6
9764else
9765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9766/* confdefs.h. */
9767_ACEOF
9768cat confdefs.h >>conftest.$ac_ext
9769cat >>conftest.$ac_ext <<_ACEOF
9770/* end confdefs.h. */
edfaf76d
LK
9771/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9772 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9773#define malloc_get_state innocuous_malloc_get_state
9774
98418dba 9775/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9776 which can conflict with char malloc_get_state (); below.
9777 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9778 <limits.h> exists even on freestanding compilers. */
edfaf76d 9779
19650fd6
AS
9780#ifdef __STDC__
9781# include <limits.h>
9782#else
9783# include <assert.h>
9784#endif
edfaf76d
LK
9785
9786#undef malloc_get_state
9787
d6e01aa5
KL
9788/* Override any GCC internal prototype to avoid an error.
9789 Use char because int might match the return type of a GCC
9790 builtin and then its argument prototype would still apply. */
98418dba
CW
9791#ifdef __cplusplus
9792extern "C"
9793#endif
98418dba 9794char malloc_get_state ();
98418dba
CW
9795/* The GNU C library defines this for functions which it implements
9796 to always fail with ENOSYS. Some functions are actually named
9797 something starting with __ and the normal name is an alias. */
d6e01aa5 9798#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9799choke me
98418dba
CW
9800#endif
9801
19650fd6
AS
9802int
9803main ()
9804{
d6e01aa5 9805return malloc_get_state ();
98418dba
CW
9806 ;
9807 return 0;
9808}
9809_ACEOF
9810rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9811if { (ac_try="$ac_link"
9812case "(($ac_try" in
9813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9814 *) ac_try_echo=$ac_try;;
9815esac
9816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9817 (eval "$ac_link") 2>conftest.er1
98418dba 9818 ac_status=$?
edfaf76d
LK
9819 grep -v '^ *+' conftest.er1 >conftest.err
9820 rm -f conftest.er1
9821 cat conftest.err >&5
c0d27fcc 9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9823 (exit $ac_status); } && {
9824 test -z "$ac_c_werror_flag" ||
9825 test ! -s conftest.err
9826 } && test -s conftest$ac_exeext &&
9827 $as_test_x conftest$ac_exeext; then
98418dba
CW
9828 ac_cv_func_malloc_get_state=yes
9829else
9830 echo "$as_me: failed program was:" >&5
19650fd6
AS
9831sed 's/^/| /' conftest.$ac_ext >&5
9832
d6e01aa5 9833 ac_cv_func_malloc_get_state=no
98418dba 9834fi
d6e01aa5
KL
9835
9836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9837 conftest$ac_exeext conftest.$ac_ext
98418dba 9838fi
d6e01aa5
KL
9839{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9840echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9841if test $ac_cv_func_malloc_get_state = yes; then
9842 :
9843else
9844 doug_lea_malloc=no
9845fi
9846
d6e01aa5
KL
9847{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9848echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9849if test "${ac_cv_func_malloc_set_state+set}" = set; then
9850 echo $ECHO_N "(cached) $ECHO_C" >&6
9851else
9852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9853/* confdefs.h. */
9854_ACEOF
9855cat confdefs.h >>conftest.$ac_ext
9856cat >>conftest.$ac_ext <<_ACEOF
9857/* end confdefs.h. */
edfaf76d
LK
9858/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9859 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9860#define malloc_set_state innocuous_malloc_set_state
9861
98418dba 9862/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9863 which can conflict with char malloc_set_state (); below.
9864 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9865 <limits.h> exists even on freestanding compilers. */
edfaf76d 9866
19650fd6
AS
9867#ifdef __STDC__
9868# include <limits.h>
9869#else
9870# include <assert.h>
9871#endif
edfaf76d
LK
9872
9873#undef malloc_set_state
9874
d6e01aa5
KL
9875/* Override any GCC internal prototype to avoid an error.
9876 Use char because int might match the return type of a GCC
9877 builtin and then its argument prototype would still apply. */
98418dba
CW
9878#ifdef __cplusplus
9879extern "C"
9880#endif
98418dba 9881char malloc_set_state ();
98418dba
CW
9882/* The GNU C library defines this for functions which it implements
9883 to always fail with ENOSYS. Some functions are actually named
9884 something starting with __ and the normal name is an alias. */
d6e01aa5 9885#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9886choke me
98418dba
CW
9887#endif
9888
19650fd6
AS
9889int
9890main ()
9891{
d6e01aa5 9892return malloc_set_state ();
98418dba
CW
9893 ;
9894 return 0;
9895}
9896_ACEOF
9897rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9898if { (ac_try="$ac_link"
9899case "(($ac_try" in
9900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9901 *) ac_try_echo=$ac_try;;
9902esac
9903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9904 (eval "$ac_link") 2>conftest.er1
98418dba 9905 ac_status=$?
edfaf76d
LK
9906 grep -v '^ *+' conftest.er1 >conftest.err
9907 rm -f conftest.er1
9908 cat conftest.err >&5
c0d27fcc 9909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9910 (exit $ac_status); } && {
9911 test -z "$ac_c_werror_flag" ||
9912 test ! -s conftest.err
9913 } && test -s conftest$ac_exeext &&
9914 $as_test_x conftest$ac_exeext; then
98418dba
CW
9915 ac_cv_func_malloc_set_state=yes
9916else
9917 echo "$as_me: failed program was:" >&5
19650fd6
AS
9918sed 's/^/| /' conftest.$ac_ext >&5
9919
d6e01aa5 9920 ac_cv_func_malloc_set_state=no
98418dba 9921fi
d6e01aa5
KL
9922
9923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9924 conftest$ac_exeext conftest.$ac_ext
98418dba 9925fi
d6e01aa5
KL
9926{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9927echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9928if test $ac_cv_func_malloc_set_state = yes; then
9929 :
9930else
9931 doug_lea_malloc=no
9932fi
9933
d6e01aa5
KL
9934{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9935echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9936if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9937 echo $ECHO_N "(cached) $ECHO_C" >&6
9938else
9939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9940/* confdefs.h. */
9941_ACEOF
9942cat confdefs.h >>conftest.$ac_ext
9943cat >>conftest.$ac_ext <<_ACEOF
9944/* end confdefs.h. */
98418dba 9945extern void (* __after_morecore_hook)();
98418dba
CW
9946int
9947main ()
9948{
9949__after_morecore_hook = 0
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9955if { (ac_try="$ac_link"
9956case "(($ac_try" in
9957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9958 *) ac_try_echo=$ac_try;;
9959esac
9960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9961 (eval "$ac_link") 2>conftest.er1
98418dba 9962 ac_status=$?
edfaf76d
LK
9963 grep -v '^ *+' conftest.er1 >conftest.err
9964 rm -f conftest.er1
9965 cat conftest.err >&5
c0d27fcc 9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9967 (exit $ac_status); } && {
9968 test -z "$ac_c_werror_flag" ||
9969 test ! -s conftest.err
9970 } && test -s conftest$ac_exeext &&
9971 $as_test_x conftest$ac_exeext; then
98418dba
CW
9972 emacs_cv_var___after_morecore_hook=yes
9973else
9974 echo "$as_me: failed program was:" >&5
19650fd6
AS
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
d6e01aa5 9977 emacs_cv_var___after_morecore_hook=no
98418dba 9978fi
d6e01aa5
KL
9979
9980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9981 conftest$ac_exeext conftest.$ac_ext
98418dba 9982fi
d6e01aa5
KL
9983{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9984echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9985if test $emacs_cv_var___after_morecore_hook = no; then
9986 doug_lea_malloc=no
9987fi
9988if test "${system_malloc}" = "yes"; then
9989 GNU_MALLOC=no
9990 GNU_MALLOC_reason="
9991 (The GNU allocators don't work with this system configuration.)"
9992fi
9993if test "$doug_lea_malloc" = "yes" ; then
9994 if test "$GNU_MALLOC" = yes ; then
9995 GNU_MALLOC_reason="
9996 (Using Doug Lea's new malloc from the GNU C Library.)"
9997 fi
b936fae4 9998
c0d27fcc 9999cat >>confdefs.h <<\_ACEOF
98418dba 10000#define DOUG_LEA_MALLOC 1
c0d27fcc 10001_ACEOF
98418dba
CW
10002
10003fi
10004
10005if test x"${REL_ALLOC}" = x; then
10006 REL_ALLOC=${GNU_MALLOC}
10007fi
10008
10009
c0d27fcc
MR
10010
10011
10012for ac_header in stdlib.h unistd.h
98418dba
CW
10013do
10014as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
10015if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10016 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10017echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10018if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 10019 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 10020fi
d6e01aa5
KL
10021ac_res=`eval echo '${'$as_ac_Header'}'`
10022 { echo "$as_me:$LINENO: result: $ac_res" >&5
10023echo "${ECHO_T}$ac_res" >&6; }
98418dba 10024else
c0d27fcc 10025 # Is the header compilable?
d6e01aa5
KL
10026{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10027echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 10028cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
98418dba
CW
10034$ac_includes_default
10035#include <$ac_header>
10036_ACEOF
10037rm -f conftest.$ac_objext
d6e01aa5
KL
10038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
10043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10044 (eval "$ac_compile") 2>conftest.er1
98418dba 10045 ac_status=$?
edfaf76d
LK
10046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
c0d27fcc 10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
c0d27fcc 10054 ac_header_compiler=yes
98418dba
CW
10055else
10056 echo "$as_me: failed program was:" >&5
19650fd6
AS
10057sed 's/^/| /' conftest.$ac_ext >&5
10058
d6e01aa5 10059 ac_header_compiler=no
98418dba 10060fi
d6e01aa5
KL
10061
10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10063{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10064echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 10065
c0d27fcc 10066# Is the header present?
d6e01aa5
KL
10067{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10068echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 10069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
98418dba
CW
10075#include <$ac_header>
10076_ACEOF
d6e01aa5
KL
10077if { (ac_try="$ac_cpp conftest.$ac_ext"
10078case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081esac
10082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10083 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10084 ac_status=$?
6bae0ccf 10085 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10086 rm -f conftest.er1
10087 cat conftest.err >&5
c0d27fcc 10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10089 (exit $ac_status); } >/dev/null && {
10090 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 }; then
c0d27fcc 10093 ac_header_preproc=yes
98418dba
CW
10094else
10095 echo "$as_me: failed program was:" >&5
19650fd6
AS
10096sed 's/^/| /' conftest.$ac_ext >&5
10097
c0d27fcc 10098 ac_header_preproc=no
98418dba 10099fi
d6e01aa5 10100
98418dba 10101rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
10102{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10103echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10104
10105# So? What about this header?
edfaf76d
LK
10106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10107 yes:no: )
c0d27fcc
MR
10108 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10109echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10110 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10111echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10112 ac_header_preproc=yes
10113 ;;
10114 no:yes:* )
10115 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10116echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10117 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10118echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10119 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10120echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10121 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10122echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10123 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10124echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10125 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10126echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 10127
19650fd6 10128 ;;
c0d27fcc 10129esac
d6e01aa5
KL
10130{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10131echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10132if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
10134else
edfaf76d 10135 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10136fi
d6e01aa5
KL
10137ac_res=`eval echo '${'$as_ac_Header'}'`
10138 { echo "$as_me:$LINENO: result: $ac_res" >&5
10139echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10140
10141fi
98418dba 10142if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10143 cat >>confdefs.h <<_ACEOF
98418dba 10144#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10145_ACEOF
98418dba
CW
10146
10147fi
c0d27fcc 10148
98418dba
CW
10149done
10150
c0d27fcc 10151
98418dba
CW
10152for ac_func in getpagesize
10153do
10154as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10155{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10156echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10157if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10158 echo $ECHO_N "(cached) $ECHO_C" >&6
10159else
10160 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10161/* confdefs.h. */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h. */
edfaf76d
LK
10166/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10168#define $ac_func innocuous_$ac_func
10169
98418dba 10170/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10171 which can conflict with char $ac_func (); below.
10172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10173 <limits.h> exists even on freestanding compilers. */
edfaf76d 10174
19650fd6
AS
10175#ifdef __STDC__
10176# include <limits.h>
10177#else
10178# include <assert.h>
10179#endif
edfaf76d
LK
10180
10181#undef $ac_func
10182
d6e01aa5
KL
10183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
98418dba
CW
10186#ifdef __cplusplus
10187extern "C"
10188#endif
98418dba 10189char $ac_func ();
98418dba
CW
10190/* The GNU C library defines this for functions which it implements
10191 to always fail with ENOSYS. Some functions are actually named
10192 something starting with __ and the normal name is an alias. */
d6e01aa5 10193#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10194choke me
98418dba
CW
10195#endif
10196
19650fd6
AS
10197int
10198main ()
10199{
d6e01aa5 10200return $ac_func ();
98418dba
CW
10201 ;
10202 return 0;
10203}
10204_ACEOF
10205rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10206if { (ac_try="$ac_link"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
10211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10212 (eval "$ac_link") 2>conftest.er1
98418dba 10213 ac_status=$?
edfaf76d
LK
10214 grep -v '^ *+' conftest.er1 >conftest.err
10215 rm -f conftest.er1
10216 cat conftest.err >&5
c0d27fcc 10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10218 (exit $ac_status); } && {
10219 test -z "$ac_c_werror_flag" ||
10220 test ! -s conftest.err
10221 } && test -s conftest$ac_exeext &&
10222 $as_test_x conftest$ac_exeext; then
98418dba
CW
10223 eval "$as_ac_var=yes"
10224else
10225 echo "$as_me: failed program was:" >&5
19650fd6
AS
10226sed 's/^/| /' conftest.$ac_ext >&5
10227
d6e01aa5 10228 eval "$as_ac_var=no"
98418dba 10229fi
d6e01aa5
KL
10230
10231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10232 conftest$ac_exeext conftest.$ac_ext
98418dba 10233fi
d6e01aa5
KL
10234ac_res=`eval echo '${'$as_ac_var'}'`
10235 { echo "$as_me:$LINENO: result: $ac_res" >&5
10236echo "${ECHO_T}$ac_res" >&6; }
98418dba 10237if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10238 cat >>confdefs.h <<_ACEOF
98418dba 10239#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10240_ACEOF
98418dba
CW
10241
10242fi
10243done
10244
d6e01aa5
KL
10245{ echo "$as_me:$LINENO: checking for working mmap" >&5
10246echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10247if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10248 echo $ECHO_N "(cached) $ECHO_C" >&6
10249else
10250 if test "$cross_compiling" = yes; then
10251 ac_cv_func_mmap_fixed_mapped=no
10252else
10253 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10254/* confdefs.h. */
10255_ACEOF
10256cat confdefs.h >>conftest.$ac_ext
10257cat >>conftest.$ac_ext <<_ACEOF
10258/* end confdefs.h. */
98418dba 10259$ac_includes_default
c0d27fcc
MR
10260/* malloc might have been renamed as rpl_malloc. */
10261#undef malloc
10262
98418dba
CW
10263/* Thanks to Mike Haertel and Jim Avera for this test.
10264 Here is a matrix of mmap possibilities:
10265 mmap private not fixed
10266 mmap private fixed at somewhere currently unmapped
10267 mmap private fixed at somewhere already mapped
10268 mmap shared not fixed
10269 mmap shared fixed at somewhere currently unmapped
10270 mmap shared fixed at somewhere already mapped
10271 For private mappings, we should verify that changes cannot be read()
10272 back from the file, nor mmap's back from the file at a different
10273 address. (There have been systems where private was not correctly
10274 implemented like the infamous i386 svr4.0, and systems where the
10275 VM page cache was not coherent with the file system buffer cache
10276 like early versions of FreeBSD and possibly contemporary NetBSD.)
10277 For shared mappings, we should conversely verify that changes get
c0d27fcc 10278 propagated back to all the places they're supposed to be.
98418dba
CW
10279
10280 Grep wants private fixed already mapped.
10281 The main things grep needs to know about mmap are:
10282 * does it exist and is it safe to write into the mmap'd area
10283 * how to use it (BSD variants) */
10284
10285#include <fcntl.h>
10286#include <sys/mman.h>
10287
d6e01aa5 10288#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10289char *malloc ();
10290#endif
10291
10292/* This mess was copied from the GNU getpagesize.h. */
d6e01aa5 10293#ifndef HAVE_GETPAGESIZE
98418dba 10294/* Assume that all systems that can run configure have sys/param.h. */
d6e01aa5 10295# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10296# define HAVE_SYS_PARAM_H 1
10297# endif
10298
10299# ifdef _SC_PAGESIZE
10300# define getpagesize() sysconf(_SC_PAGESIZE)
10301# else /* no _SC_PAGESIZE */
d6e01aa5 10302# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10303# include <sys/param.h>
10304# ifdef EXEC_PAGESIZE
10305# define getpagesize() EXEC_PAGESIZE
10306# else /* no EXEC_PAGESIZE */
10307# ifdef NBPG
10308# define getpagesize() NBPG * CLSIZE
10309# ifndef CLSIZE
10310# define CLSIZE 1
10311# endif /* no CLSIZE */
10312# else /* no NBPG */
10313# ifdef NBPC
10314# define getpagesize() NBPC
10315# else /* no NBPC */
10316# ifdef PAGESIZE
10317# define getpagesize() PAGESIZE
10318# endif /* PAGESIZE */
10319# endif /* no NBPC */
10320# endif /* no NBPG */
10321# endif /* no EXEC_PAGESIZE */
10322# else /* no HAVE_SYS_PARAM_H */
10323# define getpagesize() 8192 /* punt totally */
10324# endif /* no HAVE_SYS_PARAM_H */
10325# endif /* no _SC_PAGESIZE */
10326
10327#endif /* no HAVE_GETPAGESIZE */
10328
10329int
10330main ()
10331{
10332 char *data, *data2, *data3;
10333 int i, pagesize;
10334 int fd;
10335
10336 pagesize = getpagesize ();
10337
10338 /* First, make a file with some known garbage in it. */
10339 data = (char *) malloc (pagesize);
10340 if (!data)
d6e01aa5 10341 return 1;
98418dba
CW
10342 for (i = 0; i < pagesize; ++i)
10343 *(data + i) = rand ();
10344 umask (0);
10345 fd = creat ("conftest.mmap", 0600);
10346 if (fd < 0)
d6e01aa5 10347 return 1;
98418dba 10348 if (write (fd, data, pagesize) != pagesize)
d6e01aa5 10349 return 1;
98418dba
CW
10350 close (fd);
10351
10352 /* Next, try to mmap the file at a fixed address which already has
10353 something else allocated at it. If we can, also make sure that
10354 we see the same garbage. */
10355 fd = open ("conftest.mmap", O_RDWR);
10356 if (fd < 0)
d6e01aa5 10357 return 1;
98418dba
CW
10358 data2 = (char *) malloc (2 * pagesize);
10359 if (!data2)
d6e01aa5
KL
10360 return 1;
10361 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10362 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10363 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d6e01aa5 10364 return 1;
98418dba
CW
10365 for (i = 0; i < pagesize; ++i)
10366 if (*(data + i) != *(data2 + i))
d6e01aa5 10367 return 1;
98418dba
CW
10368
10369 /* Finally, make sure that changes to the mapped area do not
10370 percolate back to the file as seen by read(). (This is a bug on
10371 some variants of i386 svr4.0.) */
10372 for (i = 0; i < pagesize; ++i)
10373 *(data2 + i) = *(data2 + i) + 1;
10374 data3 = (char *) malloc (pagesize);
10375 if (!data3)
d6e01aa5 10376 return 1;
98418dba 10377 if (read (fd, data3, pagesize) != pagesize)
d6e01aa5 10378 return 1;
98418dba
CW
10379 for (i = 0; i < pagesize; ++i)
10380 if (*(data + i) != *(data3 + i))
d6e01aa5 10381 return 1;
98418dba 10382 close (fd);
d6e01aa5 10383 return 0;
98418dba
CW
10384}
10385_ACEOF
10386rm -f conftest$ac_exeext
d6e01aa5
KL
10387if { (ac_try="$ac_link"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_link") 2>&5
98418dba 10394 ac_status=$?
c0d27fcc 10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
10397 { (case "(($ac_try" in
10398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10399 *) ac_try_echo=$ac_try;;
10400esac
10401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10402 (eval "$ac_try") 2>&5
98418dba 10403 ac_status=$?
c0d27fcc 10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10405 (exit $ac_status); }; }; then
10406 ac_cv_func_mmap_fixed_mapped=yes
10407else
10408 echo "$as_me: program exited with status $ac_status" >&5
10409echo "$as_me: failed program was:" >&5
19650fd6
AS
10410sed 's/^/| /' conftest.$ac_ext >&5
10411
c0d27fcc 10412( exit $ac_status )
98418dba
CW
10413ac_cv_func_mmap_fixed_mapped=no
10414fi
d6e01aa5 10415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10416fi
d6e01aa5
KL
10417
10418
98418dba 10419fi
d6e01aa5
KL
10420{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10421echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10422if test $ac_cv_func_mmap_fixed_mapped = yes; then
10423
c0d27fcc 10424cat >>confdefs.h <<\_ACEOF
98418dba 10425#define HAVE_MMAP 1
c0d27fcc 10426_ACEOF
98418dba
CW
10427
10428fi
10429rm -f conftest.mmap
10430
10431if test $use_mmap_for_buffers = yes; then
10432 REL_ALLOC=no
10433fi
10434
10435LIBS="$libsrc_libs $LIBS"
10436
c0d27fcc 10437
d6e01aa5
KL
10438{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10439echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10440if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10441 echo $ECHO_N "(cached) $ECHO_C" >&6
10442else
10443 ac_check_lib_save_LIBS=$LIBS
10444LIBS="-ldnet $LIBS"
10445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10446/* confdefs.h. */
10447_ACEOF
10448cat confdefs.h >>conftest.$ac_ext
10449cat >>conftest.$ac_ext <<_ACEOF
10450/* end confdefs.h. */
98418dba 10451
d6e01aa5
KL
10452/* Override any GCC internal prototype to avoid an error.
10453 Use char because int might match the return type of a GCC
10454 builtin and then its argument prototype would still apply. */
98418dba
CW
10455#ifdef __cplusplus
10456extern "C"
10457#endif
98418dba 10458char dnet_ntoa ();
98418dba
CW
10459int
10460main ()
10461{
d6e01aa5 10462return dnet_ntoa ();
98418dba
CW
10463 ;
10464 return 0;
10465}
10466_ACEOF
10467rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10468if { (ac_try="$ac_link"
10469case "(($ac_try" in
10470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10471 *) ac_try_echo=$ac_try;;
10472esac
10473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10474 (eval "$ac_link") 2>conftest.er1
98418dba 10475 ac_status=$?
edfaf76d
LK
10476 grep -v '^ *+' conftest.er1 >conftest.err
10477 rm -f conftest.er1
10478 cat conftest.err >&5
c0d27fcc 10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10480 (exit $ac_status); } && {
10481 test -z "$ac_c_werror_flag" ||
10482 test ! -s conftest.err
10483 } && test -s conftest$ac_exeext &&
10484 $as_test_x conftest$ac_exeext; then
98418dba
CW
10485 ac_cv_lib_dnet_dnet_ntoa=yes
10486else
10487 echo "$as_me: failed program was:" >&5
19650fd6
AS
10488sed 's/^/| /' conftest.$ac_ext >&5
10489
d6e01aa5 10490 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10491fi
d6e01aa5
KL
10492
10493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10494 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10495LIBS=$ac_check_lib_save_LIBS
10496fi
d6e01aa5
KL
10497{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10498echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10499if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10500 cat >>confdefs.h <<_ACEOF
98418dba 10501#define HAVE_LIBDNET 1
c0d27fcc 10502_ACEOF
98418dba
CW
10503
10504 LIBS="-ldnet $LIBS"
10505
10506fi
10507
c0d27fcc 10508
d6e01aa5
KL
10509{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10510echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10511if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10512 echo $ECHO_N "(cached) $ECHO_C" >&6
10513else
10514 ac_check_lib_save_LIBS=$LIBS
10515LIBS="-lXbsd $LIBS"
10516cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10517/* confdefs.h. */
10518_ACEOF
10519cat confdefs.h >>conftest.$ac_ext
10520cat >>conftest.$ac_ext <<_ACEOF
10521/* end confdefs.h. */
98418dba 10522
c0d27fcc 10523
98418dba
CW
10524int
10525main ()
10526{
d6e01aa5 10527return main ();
98418dba
CW
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10533if { (ac_try="$ac_link"
10534case "(($ac_try" in
10535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10536 *) ac_try_echo=$ac_try;;
10537esac
10538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10539 (eval "$ac_link") 2>conftest.er1
98418dba 10540 ac_status=$?
edfaf76d
LK
10541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
c0d27fcc 10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest$ac_exeext &&
10549 $as_test_x conftest$ac_exeext; then
98418dba
CW
10550 ac_cv_lib_Xbsd_main=yes
10551else
10552 echo "$as_me: failed program was:" >&5
19650fd6
AS
10553sed 's/^/| /' conftest.$ac_ext >&5
10554
d6e01aa5 10555 ac_cv_lib_Xbsd_main=no
98418dba 10556fi
d6e01aa5
KL
10557
10558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10559 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10560LIBS=$ac_check_lib_save_LIBS
10561fi
d6e01aa5
KL
10562{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10563echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10564if test $ac_cv_lib_Xbsd_main = yes; then
10565 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10566fi
10567
c0d27fcc
MR
10568
10569
d6e01aa5
KL
10570{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10571echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10572if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10573 echo $ECHO_N "(cached) $ECHO_C" >&6
10574else
10575 ac_check_lib_save_LIBS=$LIBS
10576LIBS="-lpthreads $LIBS"
10577cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10578/* confdefs.h. */
10579_ACEOF
10580cat confdefs.h >>conftest.$ac_ext
10581cat >>conftest.$ac_ext <<_ACEOF
10582/* end confdefs.h. */
98418dba 10583
d6e01aa5
KL
10584/* Override any GCC internal prototype to avoid an error.
10585 Use char because int might match the return type of a GCC
10586 builtin and then its argument prototype would still apply. */
98418dba
CW
10587#ifdef __cplusplus
10588extern "C"
10589#endif
98418dba 10590char cma_open ();
98418dba
CW
10591int
10592main ()
10593{
d6e01aa5 10594return cma_open ();
98418dba
CW
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10600if { (ac_try="$ac_link"
10601case "(($ac_try" in
10602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10603 *) ac_try_echo=$ac_try;;
10604esac
10605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10606 (eval "$ac_link") 2>conftest.er1
98418dba 10607 ac_status=$?
edfaf76d
LK
10608 grep -v '^ *+' conftest.er1 >conftest.err
10609 rm -f conftest.er1
10610 cat conftest.err >&5
c0d27fcc 10611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10612 (exit $ac_status); } && {
10613 test -z "$ac_c_werror_flag" ||
10614 test ! -s conftest.err
10615 } && test -s conftest$ac_exeext &&
10616 $as_test_x conftest$ac_exeext; then
98418dba
CW
10617 ac_cv_lib_pthreads_cma_open=yes
10618else
10619 echo "$as_me: failed program was:" >&5
19650fd6
AS
10620sed 's/^/| /' conftest.$ac_ext >&5
10621
d6e01aa5 10622 ac_cv_lib_pthreads_cma_open=no
98418dba 10623fi
d6e01aa5
KL
10624
10625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10626 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10627LIBS=$ac_check_lib_save_LIBS
10628fi
d6e01aa5
KL
10629{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10630echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10631if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10632 cat >>confdefs.h <<_ACEOF
98418dba 10633#define HAVE_LIBPTHREADS 1
c0d27fcc 10634_ACEOF
98418dba
CW
10635
10636 LIBS="-lpthreads $LIBS"
10637
10638fi
10639
c0d27fcc 10640
d6e01aa5
KL
10641{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10642echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10643if test -d /usr/X386/include; then
10644 HAVE_XFREE386=yes
10645 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10646else
10647 HAVE_XFREE386=no
10648fi
d6e01aa5
KL
10649{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10650echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10651
55597d70
DL
10652
10653case ${host_os} in
10654aix*)
d6e01aa5
KL
10655 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10656echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10657if test "${gdb_cv_bigtoc+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
10659else
10660
10661 case $GCC in
10662 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10663 *) gdb_cv_bigtoc=-bbigtoc ;;
10664 esac
10665
10666 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10668/* confdefs.h. */
10669_ACEOF
10670cat confdefs.h >>conftest.$ac_ext
10671cat >>conftest.$ac_ext <<_ACEOF
10672/* end confdefs.h. */
55597d70
DL
10673
10674int
10675main ()
10676{
10677int i;
10678 ;
10679 return 0;
10680}
10681_ACEOF
10682rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10683if { (ac_try="$ac_link"
10684case "(($ac_try" in
10685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10686 *) ac_try_echo=$ac_try;;
10687esac
10688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10689 (eval "$ac_link") 2>conftest.er1
55597d70 10690 ac_status=$?
edfaf76d
LK
10691 grep -v '^ *+' conftest.er1 >conftest.err
10692 rm -f conftest.er1
10693 cat conftest.err >&5
55597d70 10694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10695 (exit $ac_status); } && {
10696 test -z "$ac_c_werror_flag" ||
10697 test ! -s conftest.err
10698 } && test -s conftest$ac_exeext &&
10699 $as_test_x conftest$ac_exeext; then
55597d70
DL
10700 :
10701else
10702 echo "$as_me: failed program was:" >&5
19650fd6
AS
10703sed 's/^/| /' conftest.$ac_ext >&5
10704
d6e01aa5 10705 gdb_cv_bigtoc=
55597d70 10706fi
d6e01aa5
KL
10707
10708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10709 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10710
10711fi
d6e01aa5
KL
10712{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10713echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10714 ;;
10715esac
10716
ae1a998c
RS
10717# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10718# used for the tests that follow. We set them back to REAL_CFLAGS and
10719# REAL_CPPFLAGS later on.
98418dba
CW
10720
10721REAL_CPPFLAGS="$CPPFLAGS"
10722
10723if test "${HAVE_X11}" = "yes"; then
10724 DEFS="$C_SWITCH_X_SITE $DEFS"
10725 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10726 LIBS="$LIBX $LIBS"
10727 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10728 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10729
10730 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10731 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10732 # but it's more convenient here to set LD_RUN_PATH
10733 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10734 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10735 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10736 export LD_RUN_PATH
10737 fi
10738
10739 if test "${opsys}" = "gnu-linux"; then
d6e01aa5
KL
10740 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10741echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
98418dba 10748
98418dba
CW
10749int
10750main ()
10751{
10752XOpenDisplay ("foo");
10753 ;
10754 return 0;
10755}
10756_ACEOF
10757rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10758if { (ac_try="$ac_link"
10759case "(($ac_try" in
10760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10761 *) ac_try_echo=$ac_try;;
10762esac
10763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10764 (eval "$ac_link") 2>conftest.er1
98418dba 10765 ac_status=$?
edfaf76d
LK
10766 grep -v '^ *+' conftest.er1 >conftest.err
10767 rm -f conftest.er1
10768 cat conftest.err >&5
c0d27fcc 10769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10770 (exit $ac_status); } && {
10771 test -z "$ac_c_werror_flag" ||
10772 test ! -s conftest.err
10773 } && test -s conftest$ac_exeext &&
10774 $as_test_x conftest$ac_exeext; then
35996d22 10775 xlinux_first_failure=no
98418dba
CW
10776else
10777 echo "$as_me: failed program was:" >&5
19650fd6
AS
10778sed 's/^/| /' conftest.$ac_ext >&5
10779
d6e01aa5 10780 xlinux_first_failure=yes
98418dba 10781fi
d6e01aa5
KL
10782
10783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10784 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10785 if test "${xlinux_first_failure}" = "yes"; then
10786 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10787 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10788 OLD_CPPFLAGS="$CPPFLAGS"
10789 OLD_LIBS="$LIBS"
10790 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10791 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10792 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10793 LIBS="$LIBS -b i486-linuxaout"
10794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10795/* confdefs.h. */
10796_ACEOF
10797cat confdefs.h >>conftest.$ac_ext
10798cat >>conftest.$ac_ext <<_ACEOF
10799/* end confdefs.h. */
98418dba 10800
98418dba
CW
10801int
10802main ()
10803{
10804XOpenDisplay ("foo");
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10810if { (ac_try="$ac_link"
10811case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
10815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10816 (eval "$ac_link") 2>conftest.er1
98418dba 10817 ac_status=$?
edfaf76d
LK
10818 grep -v '^ *+' conftest.er1 >conftest.err
10819 rm -f conftest.er1
10820 cat conftest.err >&5
c0d27fcc 10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10822 (exit $ac_status); } && {
10823 test -z "$ac_c_werror_flag" ||
10824 test ! -s conftest.err
10825 } && test -s conftest$ac_exeext &&
10826 $as_test_x conftest$ac_exeext; then
98418dba
CW
10827 xlinux_second_failure=no
10828else
10829 echo "$as_me: failed program was:" >&5
19650fd6
AS
10830sed 's/^/| /' conftest.$ac_ext >&5
10831
d6e01aa5 10832 xlinux_second_failure=yes
98418dba 10833fi
d6e01aa5
KL
10834
10835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10836 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10837 if test "${xlinux_second_failure}" = "yes"; then
10838 # If we get the same failure with -b, there is no use adding -b.
10839 # So take it out. This plays safe.
10840 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10841 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10842 CPPFLAGS="$OLD_CPPFLAGS"
10843 LIBS="$OLD_LIBS"
d6e01aa5
KL
10844 { echo "$as_me:$LINENO: result: no" >&5
10845echo "${ECHO_T}no" >&6; }
98418dba 10846 else
d6e01aa5
KL
10847 { echo "$as_me:$LINENO: result: yes" >&5
10848echo "${ECHO_T}yes" >&6; }
98418dba
CW
10849 fi
10850 else
d6e01aa5
KL
10851 { echo "$as_me:$LINENO: result: no" >&5
10852echo "${ECHO_T}no" >&6; }
98418dba
CW
10853 fi
10854 fi
10855
10856 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10857 # header files included from there.
d6e01aa5
KL
10858 { echo "$as_me:$LINENO: checking for Xkb" >&5
10859echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
98418dba
CW
10866#include <X11/Xlib.h>
10867#include <X11/XKBlib.h>
98418dba
CW
10868int
10869main ()
10870{
10871XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10877if { (ac_try="$ac_link"
10878case "(($ac_try" in
10879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880 *) ac_try_echo=$ac_try;;
10881esac
10882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883 (eval "$ac_link") 2>conftest.er1
98418dba 10884 ac_status=$?
edfaf76d
LK
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
c0d27fcc 10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10889 (exit $ac_status); } && {
10890 test -z "$ac_c_werror_flag" ||
10891 test ! -s conftest.err
10892 } && test -s conftest$ac_exeext &&
10893 $as_test_x conftest$ac_exeext; then
98418dba
CW
10894 emacs_xkb=yes
10895else
10896 echo "$as_me: failed program was:" >&5
19650fd6
AS
10897sed 's/^/| /' conftest.$ac_ext >&5
10898
d6e01aa5 10899 emacs_xkb=no
98418dba 10900fi
d6e01aa5
KL
10901
10902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10903 conftest$ac_exeext conftest.$ac_ext
d6e01aa5
KL
10904 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10905echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10906 if test $emacs_xkb = yes; then
b936fae4 10907
c0d27fcc 10908cat >>confdefs.h <<\_ACEOF
98418dba 10909#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10910_ACEOF
98418dba
CW
10911
10912 fi
10913
c0d27fcc
MR
10914
10915
10916
10917
98418dba
CW
10918for ac_func in XrmSetDatabase XScreenResourceString \
10919XScreenNumberOfScreen XSetWMProtocols
10920do
10921as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10922{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10923echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10924if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10925 echo $ECHO_N "(cached) $ECHO_C" >&6
10926else
10927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10928/* confdefs.h. */
10929_ACEOF
10930cat confdefs.h >>conftest.$ac_ext
10931cat >>conftest.$ac_ext <<_ACEOF
10932/* end confdefs.h. */
edfaf76d
LK
10933/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10934 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10935#define $ac_func innocuous_$ac_func
10936
98418dba 10937/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10938 which can conflict with char $ac_func (); below.
10939 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10940 <limits.h> exists even on freestanding compilers. */
edfaf76d 10941
19650fd6
AS
10942#ifdef __STDC__
10943# include <limits.h>
10944#else
10945# include <assert.h>
10946#endif
edfaf76d
LK
10947
10948#undef $ac_func
10949
d6e01aa5
KL
10950/* Override any GCC internal prototype to avoid an error.
10951 Use char because int might match the return type of a GCC
10952 builtin and then its argument prototype would still apply. */
98418dba
CW
10953#ifdef __cplusplus
10954extern "C"
10955#endif
98418dba 10956char $ac_func ();
98418dba
CW
10957/* The GNU C library defines this for functions which it implements
10958 to always fail with ENOSYS. Some functions are actually named
10959 something starting with __ and the normal name is an alias. */
d6e01aa5 10960#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10961choke me
98418dba
CW
10962#endif
10963
19650fd6
AS
10964int
10965main ()
10966{
d6e01aa5 10967return $ac_func ();
98418dba
CW
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10973if { (ac_try="$ac_link"
10974case "(($ac_try" in
10975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10976 *) ac_try_echo=$ac_try;;
10977esac
10978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10979 (eval "$ac_link") 2>conftest.er1
98418dba 10980 ac_status=$?
edfaf76d
LK
10981 grep -v '^ *+' conftest.er1 >conftest.err
10982 rm -f conftest.er1
10983 cat conftest.err >&5
c0d27fcc 10984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10985 (exit $ac_status); } && {
10986 test -z "$ac_c_werror_flag" ||
10987 test ! -s conftest.err
10988 } && test -s conftest$ac_exeext &&
10989 $as_test_x conftest$ac_exeext; then
98418dba
CW
10990 eval "$as_ac_var=yes"
10991else
10992 echo "$as_me: failed program was:" >&5
19650fd6
AS
10993sed 's/^/| /' conftest.$ac_ext >&5
10994
d6e01aa5 10995 eval "$as_ac_var=no"
98418dba 10996fi
d6e01aa5
KL
10997
10998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10999 conftest$ac_exeext conftest.$ac_ext
98418dba 11000fi
d6e01aa5
KL
11001ac_res=`eval echo '${'$as_ac_var'}'`
11002 { echo "$as_me:$LINENO: result: $ac_res" >&5
11003echo "${ECHO_T}$ac_res" >&6; }
98418dba 11004if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11005 cat >>confdefs.h <<_ACEOF
98418dba 11006#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11007_ACEOF
98418dba
CW
11008
11009fi
11010done
11011
11012fi
11013
11014if test "${window_system}" = "x11"; then
d6e01aa5
KL
11015 { echo "$as_me:$LINENO: checking X11 version 6" >&5
11016echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
11017 if test "${emacs_cv_x11_version_6+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11019else
11020 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11021/* confdefs.h. */
11022_ACEOF
11023cat confdefs.h >>conftest.$ac_ext
11024cat >>conftest.$ac_ext <<_ACEOF
11025/* end confdefs.h. */
98418dba 11026#include <X11/Xlib.h>
98418dba
CW
11027int
11028main ()
11029{
11030#if XlibSpecificationRelease < 6
11031fail;
11032#endif
11033
11034 ;
11035 return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11039if { (ac_try="$ac_link"
11040case "(($ac_try" in
11041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11042 *) ac_try_echo=$ac_try;;
11043esac
11044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11045 (eval "$ac_link") 2>conftest.er1
98418dba 11046 ac_status=$?
edfaf76d
LK
11047 grep -v '^ *+' conftest.er1 >conftest.err
11048 rm -f conftest.er1
11049 cat conftest.err >&5
c0d27fcc 11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11051 (exit $ac_status); } && {
11052 test -z "$ac_c_werror_flag" ||
11053 test ! -s conftest.err
11054 } && test -s conftest$ac_exeext &&
11055 $as_test_x conftest$ac_exeext; then
98418dba
CW
11056 emacs_cv_x11_version_6=yes
11057else
11058 echo "$as_me: failed program was:" >&5
19650fd6
AS
11059sed 's/^/| /' conftest.$ac_ext >&5
11060
d6e01aa5 11061 emacs_cv_x11_version_6=no
98418dba 11062fi
d6e01aa5
KL
11063
11064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11065 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11066fi
11067
11068 if test $emacs_cv_x11_version_6 = yes; then
d6e01aa5
KL
11069 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11070echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11071
c0d27fcc 11072cat >>confdefs.h <<\_ACEOF
98418dba 11073#define HAVE_X11R6 1
c0d27fcc 11074_ACEOF
98418dba
CW
11075
11076 else
d6e01aa5
KL
11077 { echo "$as_me:$LINENO: result: before 6" >&5
11078echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11079 fi
11080fi
11081
11082if test "${window_system}" = "x11"; then
d6e01aa5
KL
11083 { echo "$as_me:$LINENO: checking X11 version 5" >&5
11084echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
11085 if test "${emacs_cv_x11_version_5+set}" = set; then
11086 echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11089/* confdefs.h. */
11090_ACEOF
11091cat confdefs.h >>conftest.$ac_ext
11092cat >>conftest.$ac_ext <<_ACEOF
11093/* end confdefs.h. */
98418dba 11094#include <X11/Xlib.h>
98418dba
CW
11095int
11096main ()
11097{
11098#if XlibSpecificationRelease < 5
11099fail;
11100#endif
11101
11102 ;
11103 return 0;
11104}
11105_ACEOF
11106rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11107if { (ac_try="$ac_link"
11108case "(($ac_try" in
11109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11110 *) ac_try_echo=$ac_try;;
11111esac
11112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11113 (eval "$ac_link") 2>conftest.er1
98418dba 11114 ac_status=$?
edfaf76d
LK
11115 grep -v '^ *+' conftest.er1 >conftest.err
11116 rm -f conftest.er1
11117 cat conftest.err >&5
c0d27fcc 11118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11119 (exit $ac_status); } && {
11120 test -z "$ac_c_werror_flag" ||
11121 test ! -s conftest.err
11122 } && test -s conftest$ac_exeext &&
11123 $as_test_x conftest$ac_exeext; then
98418dba
CW
11124 emacs_cv_x11_version_5=yes
11125else
11126 echo "$as_me: failed program was:" >&5
19650fd6
AS
11127sed 's/^/| /' conftest.$ac_ext >&5
11128
d6e01aa5 11129 emacs_cv_x11_version_5=no
98418dba 11130fi
d6e01aa5
KL
11131
11132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11133 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11134fi
11135
11136 if test $emacs_cv_x11_version_5 = yes; then
d6e01aa5
KL
11137 { echo "$as_me:$LINENO: result: 5 or newer" >&5
11138echo "${ECHO_T}5 or newer" >&6; }
98418dba 11139 HAVE_X11R5=yes
b936fae4 11140
c0d27fcc 11141cat >>confdefs.h <<\_ACEOF
98418dba 11142#define HAVE_X11R5 1
c0d27fcc 11143_ACEOF
98418dba
CW
11144
11145 else
11146 HAVE_X11R5=no
d6e01aa5
KL
11147 { echo "$as_me:$LINENO: result: before 5" >&5
11148echo "${ECHO_T}before 5" >&6; }
98418dba
CW
11149 fi
11150fi
11151
0cfc0546
GM
11152### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11153HAVE_RSVG=no
ae0476ed 11154if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546
GM
11155 if test "${with_rsvg}" != "no"; then
11156 if test "X${with_pkg_config_prog}" != X; then
11157 PKG_CONFIG="${with_pkg_config_prog}"
11158 fi
11159
11160 RSVG_REQUIRED=2.0.0
11161 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11162
11163
11164 succeeded=no
11165
11166 if test -z "$PKG_CONFIG"; then
11167 # Extract the first word of "pkg-config", so it can be a program name with args.
11168set dummy pkg-config; ac_word=$2
11169{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11171if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11172 echo $ECHO_N "(cached) $ECHO_C" >&6
11173else
11174 case $PKG_CONFIG in
11175 [\\/]* | ?:[\\/]*)
11176 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11177 ;;
11178 *)
11179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11180for as_dir in $PATH
11181do
11182 IFS=$as_save_IFS
11183 test -z "$as_dir" && as_dir=.
11184 for ac_exec_ext in '' $ac_executable_extensions; do
11185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11186 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11187 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11188 break 2
11189 fi
11190done
11191done
11192IFS=$as_save_IFS
11193
11194 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11195 ;;
11196esac
11197fi
11198PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11199if test -n "$PKG_CONFIG"; then
11200 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11201echo "${ECHO_T}$PKG_CONFIG" >&6; }
11202else
11203 { echo "$as_me:$LINENO: result: no" >&5
11204echo "${ECHO_T}no" >&6; }
11205fi
11206
11207
11208 fi
11209
11210 if test "$PKG_CONFIG" = "no" ; then
11211 :
11212 else
11213 PKG_CONFIG_MIN_VERSION=0.9.0
11214 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11215 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
11216echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
11217
11218 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
11219 { echo "$as_me:$LINENO: result: yes" >&5
11220echo "${ECHO_T}yes" >&6; }
11221 succeeded=yes
11222
11223 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
11224echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
11225 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11226 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
11227echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
11228
11229 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
11230echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
11231 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11232 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
11233echo "${ECHO_T}$RSVG_LIBS" >&6; }
11234 else
11235 { echo "$as_me:$LINENO: result: no" >&5
11236echo "${ECHO_T}no" >&6; }
11237 RSVG_CFLAGS=""
11238 RSVG_LIBS=""
11239 ## If we have a custom action on failure, don't print errors, but
11240 ## do set a variable so people can do so.
11241 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
11242
11243 fi
11244
11245
11246
11247 else
11248 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11249 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11250 fi
11251 fi
11252
11253 if test $succeeded = yes; then
11254 :
11255 else
11256 :
11257 fi
11258
11259
11260
11261
11262 if test ".${RSVG_CFLAGS}" != "."; then
11263 HAVE_RSVG=yes
11264
11265cat >>confdefs.h <<\_ACEOF
11266#define HAVE_RSVG 1
11267_ACEOF
11268
11269 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11270 LIBS="$RSVG_LIBS $LIBS"
11271 fi
11272 fi
11273fi
11274
11275
488dd4c4 11276HAVE_GTK=no
8eeae1c9
JD
11277if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
11278 USE_X_TOOLKIT=none
11279fi
089a966d
GM
11280if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
11281 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 11282 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
11283 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
11284echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
11285 { (exit 1); exit 1; }; };
11286 fi
787eb67d
JD
11287 GLIB_REQUIRED=2.6
11288 GTK_REQUIRED=2.6
488dd4c4
JD
11289 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11290
11291 if test "X${with_pkg_config_prog}" != X; then
11292 PKG_CONFIG="${with_pkg_config_prog}"
11293 fi
11294
11295 succeeded=no
11296
11297 if test -z "$PKG_CONFIG"; then
11298 # Extract the first word of "pkg-config", so it can be a program name with args.
11299set dummy pkg-config; ac_word=$2
d6e01aa5
KL
11300{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11302if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11303 echo $ECHO_N "(cached) $ECHO_C" >&6
11304else
11305 case $PKG_CONFIG in
11306 [\\/]* | ?:[\\/]*)
11307 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11308 ;;
11309 *)
11310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313 IFS=$as_save_IFS
11314 test -z "$as_dir" && as_dir=.
11315 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 11316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11317 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11319 break 2
11320 fi
11321done
11322done
d6e01aa5 11323IFS=$as_save_IFS
488dd4c4
JD
11324
11325 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11326 ;;
11327esac
11328fi
11329PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11330if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
11331 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11332echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11333else
d6e01aa5
KL
11334 { echo "$as_me:$LINENO: result: no" >&5
11335echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11336fi
11337
d6e01aa5 11338
488dd4c4
JD
11339 fi
11340
11341 if test "$PKG_CONFIG" = "no" ; then
089a966d 11342 pkg_check_gtk=no
488dd4c4
JD
11343 else
11344 PKG_CONFIG_MIN_VERSION=0.9.0
11345 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
11346 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11347echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11348
67db6aa2 11349 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
d6e01aa5
KL
11350 { echo "$as_me:$LINENO: result: yes" >&5
11351echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11352 succeeded=yes
11353
d6e01aa5
KL
11354 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11355echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11356 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11357 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11358echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11359
d6e01aa5
KL
11360 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11361echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11362 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11363 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11364echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11365 else
d6e01aa5
KL
11366 { echo "$as_me:$LINENO: result: no" >&5
11367echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11368 GTK_CFLAGS=""
11369 GTK_LIBS=""
11370 ## If we have a custom action on failure, don't print errors, but
11371 ## do set a variable so people can do so.
11372 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11373
488dd4c4
JD
11374 fi
11375
11376
11377
11378 else
11379 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11380 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11381 fi
11382 fi
11383
11384 if test $succeeded = yes; then
089a966d 11385 pkg_check_gtk=yes
488dd4c4 11386 else
089a966d
GM
11387 pkg_check_gtk=no
11388 fi
11389
11390 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11391 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11392echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11393 { (exit 1); exit 1; }; }
11394 fi
089a966d
GM
11395fi
11396
11397
11398if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11399
11400
11401
11402 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11403 CFLAGS="$CFLAGS $GTK_CFLAGS"
11404 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11405 GTK_COMPILES=no
57669b57 11406
8eeae1c9 11407for ac_func in gtk_main
57669b57
JD
11408do
11409as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11410{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11411echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11412if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11413 echo $ECHO_N "(cached) $ECHO_C" >&6
11414else
11415 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
edfaf76d
LK
11421/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11422 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11423#define $ac_func innocuous_$ac_func
11424
57669b57
JD
11425/* System header to define __stub macros and hopefully few prototypes,
11426 which can conflict with char $ac_func (); below.
11427 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11428 <limits.h> exists even on freestanding compilers. */
edfaf76d 11429
57669b57
JD
11430#ifdef __STDC__
11431# include <limits.h>
11432#else
11433# include <assert.h>
11434#endif
edfaf76d
LK
11435
11436#undef $ac_func
11437
ca81d7a0
JD
11438/* Override any GCC internal prototype to avoid an error.
11439 Use char because int might match the return type of a GCC
11440 builtin and then its argument prototype would still apply. */
57669b57
JD
11441#ifdef __cplusplus
11442extern "C"
57669b57 11443#endif
57669b57
JD
11444char $ac_func ();
11445/* The GNU C library defines this for functions which it implements
11446 to always fail with ENOSYS. Some functions are actually named
11447 something starting with __ and the normal name is an alias. */
ca81d7a0 11448#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11449choke me
57669b57
JD
11450#endif
11451
11452int
11453main ()
11454{
ca81d7a0 11455return $ac_func ();
57669b57
JD
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11461if { (ac_try="$ac_link"
11462case "(($ac_try" in
11463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11464 *) ac_try_echo=$ac_try;;
11465esac
11466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11467 (eval "$ac_link") 2>conftest.er1
57669b57 11468 ac_status=$?
edfaf76d
LK
11469 grep -v '^ *+' conftest.er1 >conftest.err
11470 rm -f conftest.er1
11471 cat conftest.err >&5
57669b57 11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11473 (exit $ac_status); } && {
11474 test -z "$ac_c_werror_flag" ||
11475 test ! -s conftest.err
11476 } && test -s conftest$ac_exeext &&
11477 $as_test_x conftest$ac_exeext; then
57669b57
JD
11478 eval "$as_ac_var=yes"
11479else
11480 echo "$as_me: failed program was:" >&5
11481sed 's/^/| /' conftest.$ac_ext >&5
11482
ca81d7a0 11483 eval "$as_ac_var=no"
57669b57 11484fi
ca81d7a0 11485
f053c89f 11486rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11487 conftest$ac_exeext conftest.$ac_ext
57669b57 11488fi
ca81d7a0
JD
11489ac_res=`eval echo '${'$as_ac_var'}'`
11490 { echo "$as_me:$LINENO: result: $ac_res" >&5
11491echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11492if test `eval echo '${'$as_ac_var'}'` = yes; then
11493 cat >>confdefs.h <<_ACEOF
11494#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11495_ACEOF
8eeae1c9 11496 GTK_COMPILES=yes
57669b57
JD
11497fi
11498done
11499
8eeae1c9 11500 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11501 if test "$USE_X_TOOLKIT" != "maybe"; then
11502 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11503echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11504 { (exit 1); exit 1; }; };
089a966d
GM
11505 fi
11506 else
11507 HAVE_GTK=yes
488dd4c4
JD
11508
11509cat >>confdefs.h <<\_ACEOF
11510#define HAVE_GTK 1
11511_ACEOF
11512
089a966d
GM
11513 USE_X_TOOLKIT=none
11514 fi
11515
11516fi
11517
11518
11519if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11520
d0a80c21
JD
11521 if test "$with_toolkit_scroll_bars" != no; then
11522 with_toolkit_scroll_bars=yes
11523 fi
57669b57 11524
c982cf7d 11525 HAVE_GTK_MULTIDISPLAY=no
fa1b1007
KL
11526
11527for ac_func in gdk_display_open
11528do
11529as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11530{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11531echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11532if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11533 echo $ECHO_N "(cached) $ECHO_C" >&6
11534else
11535 cat >conftest.$ac_ext <<_ACEOF
11536/* confdefs.h. */
11537_ACEOF
11538cat confdefs.h >>conftest.$ac_ext
11539cat >>conftest.$ac_ext <<_ACEOF
11540/* end confdefs.h. */
11541/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11542 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11543#define $ac_func innocuous_$ac_func
11544
11545/* System header to define __stub macros and hopefully few prototypes,
11546 which can conflict with char $ac_func (); below.
11547 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11548 <limits.h> exists even on freestanding compilers. */
11549
11550#ifdef __STDC__
11551# include <limits.h>
11552#else
11553# include <assert.h>
11554#endif
11555
11556#undef $ac_func
11557
11558/* Override any GCC internal prototype to avoid an error.
11559 Use char because int might match the return type of a GCC
11560 builtin and then its argument prototype would still apply. */
11561#ifdef __cplusplus
11562extern "C"
11563#endif
11564char $ac_func ();
11565/* The GNU C library defines this for functions which it implements
11566 to always fail with ENOSYS. Some functions are actually named
11567 something starting with __ and the normal name is an alias. */
11568#if defined __stub_$ac_func || defined __stub___$ac_func
11569choke me
11570#endif
11571
11572int
11573main ()
11574{
11575return $ac_func ();
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext conftest$ac_exeext
11581if { (ac_try="$ac_link"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
11586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11587 (eval "$ac_link") 2>conftest.er1
11588 ac_status=$?
11589 grep -v '^ *+' conftest.er1 >conftest.err
11590 rm -f conftest.er1
11591 cat conftest.err >&5
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); } && {
11594 test -z "$ac_c_werror_flag" ||
11595 test ! -s conftest.err
11596 } && test -s conftest$ac_exeext &&
11597 $as_test_x conftest$ac_exeext; then
11598 eval "$as_ac_var=yes"
11599else
11600 echo "$as_me: failed program was:" >&5
11601sed 's/^/| /' conftest.$ac_ext >&5
11602
11603 eval "$as_ac_var=no"
11604fi
11605
11606rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11607 conftest$ac_exeext conftest.$ac_ext
11608fi
11609ac_res=`eval echo '${'$as_ac_var'}'`
11610 { echo "$as_me:$LINENO: result: $ac_res" >&5
11611echo "${ECHO_T}$ac_res" >&6; }
11612if test `eval echo '${'$as_ac_var'}'` = yes; then
11613 cat >>confdefs.h <<_ACEOF
11614#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11615_ACEOF
11616 HAVE_GTK_MULTIDISPLAY=yes
11617fi
11618done
11619
11620 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11621
11622cat >>confdefs.h <<\_ACEOF
11623#define HAVE_GTK_MULTIDISPLAY 1
11624_ACEOF
11625
11626 fi
57669b57 11627
572a3cc2
JD
11628 HAVE_GTK_FILE_SELECTION=no
11629
11630for ac_func in gtk_file_selection_new
11631do
11632as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11633{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11635if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11636 echo $ECHO_N "(cached) $ECHO_C" >&6
11637else
11638 cat >conftest.$ac_ext <<_ACEOF
11639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
edfaf76d
LK
11644/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11645 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11646#define $ac_func innocuous_$ac_func
11647
572a3cc2
JD
11648/* System header to define __stub macros and hopefully few prototypes,
11649 which can conflict with char $ac_func (); below.
11650 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11651 <limits.h> exists even on freestanding compilers. */
edfaf76d 11652
572a3cc2
JD
11653#ifdef __STDC__
11654# include <limits.h>
11655#else
11656# include <assert.h>
11657#endif
edfaf76d
LK
11658
11659#undef $ac_func
11660
d6e01aa5
KL
11661/* Override any GCC internal prototype to avoid an error.
11662 Use char because int might match the return type of a GCC
11663 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11664#ifdef __cplusplus
11665extern "C"
572a3cc2 11666#endif
572a3cc2
JD
11667char $ac_func ();
11668/* The GNU C library defines this for functions which it implements
11669 to always fail with ENOSYS. Some functions are actually named
11670 something starting with __ and the normal name is an alias. */
d6e01aa5 11671#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11672choke me
572a3cc2
JD
11673#endif
11674
11675int
11676main ()
11677{
d6e01aa5 11678return $ac_func ();
572a3cc2
JD
11679 ;
11680 return 0;
11681}
11682_ACEOF
11683rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11684if { (ac_try="$ac_link"
11685case "(($ac_try" in
11686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11687 *) ac_try_echo=$ac_try;;
11688esac
11689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11690 (eval "$ac_link") 2>conftest.er1
572a3cc2 11691 ac_status=$?
edfaf76d
LK
11692 grep -v '^ *+' conftest.er1 >conftest.err
11693 rm -f conftest.er1
11694 cat conftest.err >&5
572a3cc2 11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11696 (exit $ac_status); } && {
11697 test -z "$ac_c_werror_flag" ||
11698 test ! -s conftest.err
11699 } && test -s conftest$ac_exeext &&
11700 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11701 eval "$as_ac_var=yes"
11702else
11703 echo "$as_me: failed program was:" >&5
11704sed 's/^/| /' conftest.$ac_ext >&5
11705
d6e01aa5 11706 eval "$as_ac_var=no"
572a3cc2 11707fi
d6e01aa5
KL
11708
11709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11710 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11711fi
d6e01aa5
KL
11712ac_res=`eval echo '${'$as_ac_var'}'`
11713 { echo "$as_me:$LINENO: result: $ac_res" >&5
11714echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11715if test `eval echo '${'$as_ac_var'}'` = yes; then
11716 cat >>confdefs.h <<_ACEOF
11717#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11718_ACEOF
11719 HAVE_GTK_FILE_SELECTION=yes
11720fi
11721done
11722
11723
11724 HAVE_GTK_FILE_CHOOSER=no
11725
11726for ac_func in gtk_file_chooser_dialog_new
11727do
11728as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11729{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11730echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11731if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11732 echo $ECHO_N "(cached) $ECHO_C" >&6
11733else
11734 cat >conftest.$ac_ext <<_ACEOF
11735/* confdefs.h. */
11736_ACEOF
11737cat confdefs.h >>conftest.$ac_ext
11738cat >>conftest.$ac_ext <<_ACEOF
11739/* end confdefs.h. */
edfaf76d
LK
11740/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11741 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11742#define $ac_func innocuous_$ac_func
11743
572a3cc2
JD
11744/* System header to define __stub macros and hopefully few prototypes,
11745 which can conflict with char $ac_func (); below.
11746 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11747 <limits.h> exists even on freestanding compilers. */
edfaf76d 11748
572a3cc2
JD
11749#ifdef __STDC__
11750# include <limits.h>
11751#else
11752# include <assert.h>
11753#endif
edfaf76d
LK
11754
11755#undef $ac_func
11756
d6e01aa5
KL
11757/* Override any GCC internal prototype to avoid an error.
11758 Use char because int might match the return type of a GCC
11759 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11760#ifdef __cplusplus
11761extern "C"
572a3cc2 11762#endif
572a3cc2
JD
11763char $ac_func ();
11764/* The GNU C library defines this for functions which it implements
11765 to always fail with ENOSYS. Some functions are actually named
11766 something starting with __ and the normal name is an alias. */
d6e01aa5 11767#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11768choke me
572a3cc2
JD
11769#endif
11770
11771int
11772main ()
11773{
d6e01aa5 11774return $ac_func ();
572a3cc2
JD
11775 ;
11776 return 0;
11777}
11778_ACEOF
11779rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11780if { (ac_try="$ac_link"
11781case "(($ac_try" in
11782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11783 *) ac_try_echo=$ac_try;;
11784esac
11785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11786 (eval "$ac_link") 2>conftest.er1
572a3cc2 11787 ac_status=$?
edfaf76d
LK
11788 grep -v '^ *+' conftest.er1 >conftest.err
11789 rm -f conftest.er1
11790 cat conftest.err >&5
572a3cc2 11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11792 (exit $ac_status); } && {
11793 test -z "$ac_c_werror_flag" ||
11794 test ! -s conftest.err
11795 } && test -s conftest$ac_exeext &&
11796 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11797 eval "$as_ac_var=yes"
11798else
11799 echo "$as_me: failed program was:" >&5
11800sed 's/^/| /' conftest.$ac_ext >&5
11801
d6e01aa5 11802 eval "$as_ac_var=no"
572a3cc2 11803fi
d6e01aa5
KL
11804
11805rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11806 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11807fi
d6e01aa5
KL
11808ac_res=`eval echo '${'$as_ac_var'}'`
11809 { echo "$as_me:$LINENO: result: $ac_res" >&5
11810echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11811if test `eval echo '${'$as_ac_var'}'` = yes; then
11812 cat >>confdefs.h <<_ACEOF
11813#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11814_ACEOF
11815 HAVE_GTK_FILE_CHOOSER=yes
11816fi
11817done
11818
11819
11820 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11821 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11822
11823cat >>confdefs.h <<\_ACEOF
11824#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11825_ACEOF
11826
b8bdffbe
JD
11827 fi
11828
11829 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11830 HAVE_GTK_AND_PTHREAD=no
11831
11832for ac_header in pthread.h
11833do
11834as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
11835if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11836 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11837echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11838if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11839 echo $ECHO_N "(cached) $ECHO_C" >&6
11840fi
d6e01aa5
KL
11841ac_res=`eval echo '${'$as_ac_Header'}'`
11842 { echo "$as_me:$LINENO: result: $ac_res" >&5
11843echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11844else
11845 # Is the header compilable?
d6e01aa5
KL
11846{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11847echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11848cat >conftest.$ac_ext <<_ACEOF
11849/* confdefs.h. */
11850_ACEOF
11851cat confdefs.h >>conftest.$ac_ext
11852cat >>conftest.$ac_ext <<_ACEOF
11853/* end confdefs.h. */
11854$ac_includes_default
11855#include <$ac_header>
11856_ACEOF
11857rm -f conftest.$ac_objext
d6e01aa5
KL
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
11863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11864 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11865 ac_status=$?
edfaf76d
LK
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
b8bdffbe 11869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11874 ac_header_compiler=yes
11875else
11876 echo "$as_me: failed program was:" >&5
11877sed 's/^/| /' conftest.$ac_ext >&5
11878
d6e01aa5 11879 ac_header_compiler=no
b8bdffbe 11880fi
b8bdffbe 11881
d6e01aa5
KL
11882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11883{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11884echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11885
11886# Is the header present?
d6e01aa5
KL
11887{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11888echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11889cat >conftest.$ac_ext <<_ACEOF
11890/* confdefs.h. */
11891_ACEOF
11892cat confdefs.h >>conftest.$ac_ext
11893cat >>conftest.$ac_ext <<_ACEOF
11894/* end confdefs.h. */
11895#include <$ac_header>
11896_ACEOF
d6e01aa5
KL
11897if { (ac_try="$ac_cpp conftest.$ac_ext"
11898case "(($ac_try" in
11899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11900 *) ac_try_echo=$ac_try;;
11901esac
11902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11903 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11904 ac_status=$?
11905 grep -v '^ *+' conftest.er1 >conftest.err
11906 rm -f conftest.er1
11907 cat conftest.err >&5
11908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11909 (exit $ac_status); } >/dev/null && {
11910 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11911 test ! -s conftest.err
11912 }; then
b8bdffbe
JD
11913 ac_header_preproc=yes
11914else
11915 echo "$as_me: failed program was:" >&5
11916sed 's/^/| /' conftest.$ac_ext >&5
11917
11918 ac_header_preproc=no
11919fi
d6e01aa5 11920
b8bdffbe 11921rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
11922{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11923echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11924
11925# So? What about this header?
edfaf76d
LK
11926case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11927 yes:no: )
b8bdffbe
JD
11928 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11929echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11930 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11931echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11932 ac_header_preproc=yes
b8bdffbe 11933 ;;
edfaf76d 11934 no:yes:* )
b8bdffbe
JD
11935 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11936echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11937 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11938echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11939 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11940echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11941 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11942echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11943 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11944echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11945 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11946echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 11947
b8bdffbe
JD
11948 ;;
11949esac
d6e01aa5
KL
11950{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11951echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11952if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11953 echo $ECHO_N "(cached) $ECHO_C" >&6
11954else
edfaf76d 11955 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11956fi
d6e01aa5
KL
11957ac_res=`eval echo '${'$as_ac_Header'}'`
11958 { echo "$as_me:$LINENO: result: $ac_res" >&5
11959echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11960
11961fi
11962if test `eval echo '${'$as_ac_Header'}'` = yes; then
11963 cat >>confdefs.h <<_ACEOF
11964#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11965_ACEOF
11966
11967fi
11968
11969done
11970
11971 if test "$ac_cv_header_pthread_h"; then
d6e01aa5
KL
11972 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11973echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11974if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11975 echo $ECHO_N "(cached) $ECHO_C" >&6
11976else
11977 ac_check_lib_save_LIBS=$LIBS
11978LIBS="-lpthread $LIBS"
11979cat >conftest.$ac_ext <<_ACEOF
11980/* confdefs.h. */
11981_ACEOF
11982cat confdefs.h >>conftest.$ac_ext
11983cat >>conftest.$ac_ext <<_ACEOF
11984/* end confdefs.h. */
11985
d6e01aa5
KL
11986/* Override any GCC internal prototype to avoid an error.
11987 Use char because int might match the return type of a GCC
11988 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11989#ifdef __cplusplus
11990extern "C"
11991#endif
b8bdffbe
JD
11992char pthread_self ();
11993int
11994main ()
11995{
d6e01aa5 11996return pthread_self ();
b8bdffbe
JD
11997 ;
11998 return 0;
11999}
12000_ACEOF
12001rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12002if { (ac_try="$ac_link"
12003case "(($ac_try" in
12004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12005 *) ac_try_echo=$ac_try;;
12006esac
12007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12008 (eval "$ac_link") 2>conftest.er1
b8bdffbe 12009 ac_status=$?
edfaf76d
LK
12010 grep -v '^ *+' conftest.er1 >conftest.err
12011 rm -f conftest.er1
12012 cat conftest.err >&5
b8bdffbe 12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12014 (exit $ac_status); } && {
12015 test -z "$ac_c_werror_flag" ||
12016 test ! -s conftest.err
12017 } && test -s conftest$ac_exeext &&
12018 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
12019 ac_cv_lib_pthread_pthread_self=yes
12020else
12021 echo "$as_me: failed program was:" >&5
12022sed 's/^/| /' conftest.$ac_ext >&5
12023
d6e01aa5 12024 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 12025fi
d6e01aa5
KL
12026
12027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12028 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
12029LIBS=$ac_check_lib_save_LIBS
12030fi
d6e01aa5
KL
12031{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
12032echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
12033if test $ac_cv_lib_pthread_pthread_self = yes; then
12034 HAVE_GTK_AND_PTHREAD=yes
12035fi
12036
12037 fi
12038 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
12039 GTK_LIBS="$GTK_LIBS -lpthread"
12040
12041cat >>confdefs.h <<\_ACEOF
12042#define HAVE_GTK_AND_PTHREAD 1
12043_ACEOF
12044
12045 fi
57669b57 12046 fi
488dd4c4
JD
12047fi
12048
9d89ffd0
JD
12049### Link with -lXft if available to work around a bug.
12050HAVE_XFT=maybe
12051if test "${HAVE_GTK}" = "yes"; then
12052 if test "X${with_pkg_config_prog}" != X; then
12053 PKG_CONFIG="${with_pkg_config_prog}"
12054 fi
12055
12056
12057 succeeded=no
12058
12059 if test -z "$PKG_CONFIG"; then
12060 # Extract the first word of "pkg-config", so it can be a program name with args.
12061set dummy pkg-config; ac_word=$2
12062{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12064if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12065 echo $ECHO_N "(cached) $ECHO_C" >&6
12066else
12067 case $PKG_CONFIG in
12068 [\\/]* | ?:[\\/]*)
12069 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12070 ;;
12071 *)
12072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12073for as_dir in $PATH
12074do
12075 IFS=$as_save_IFS
12076 test -z "$as_dir" && as_dir=.
12077 for ac_exec_ext in '' $ac_executable_extensions; do
12078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12079 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12080 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12081 break 2
12082 fi
12083done
12084done
12085IFS=$as_save_IFS
12086
12087 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12088 ;;
12089esac
12090fi
12091PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12092if test -n "$PKG_CONFIG"; then
12093 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12094echo "${ECHO_T}$PKG_CONFIG" >&6; }
12095else
12096 { echo "$as_me:$LINENO: result: no" >&5
12097echo "${ECHO_T}no" >&6; }
12098fi
12099
12100
12101 fi
12102
12103 if test "$PKG_CONFIG" = "no" ; then
12104 HAVE_XFT=no
12105 else
12106 PKG_CONFIG_MIN_VERSION=0.9.0
12107 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12108 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12109echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
12110
12111 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12112 { echo "$as_me:$LINENO: result: yes" >&5
12113echo "${ECHO_T}yes" >&6; }
12114 succeeded=yes
12115
12116 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12117echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 12118 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12119 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12120echo "${ECHO_T}$XFT_CFLAGS" >&6; }
12121
12122 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12123echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 12124 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12125 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12126echo "${ECHO_T}$XFT_LIBS" >&6; }
12127 else
12128 { echo "$as_me:$LINENO: result: no" >&5
12129echo "${ECHO_T}no" >&6; }
12130 XFT_CFLAGS=""
12131 XFT_LIBS=""
12132 ## If we have a custom action on failure, don't print errors, but
12133 ## do set a variable so people can do so.
12134 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12135
12136 fi
12137
12138
12139
12140 else
12141 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12142 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12143 fi
12144 fi
12145
12146 if test $succeeded = yes; then
12147 :
12148 else
12149 HAVE_XFT=no
12150 fi
12151
12152 if test "$HAVE_XFT" != no; then
12153 OLD_CFLAGS="$CPPFLAGS"
f23323c5 12154 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
12155 OLD_LIBS="$LIBS"
12156 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12157 CFLAGS="$CFLAGS $XFT_CFLAGS"
12158 LIBS="$XFT_LIBS $LIBS"
12159 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12160 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12161echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12162if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12163 echo $ECHO_N "(cached) $ECHO_C" >&6
12164fi
12165{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12166echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12167else
12168 # Is the header compilable?
12169{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12170echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
12171cat >conftest.$ac_ext <<_ACEOF
12172/* confdefs.h. */
12173_ACEOF
12174cat confdefs.h >>conftest.$ac_ext
12175cat >>conftest.$ac_ext <<_ACEOF
12176/* end confdefs.h. */
12177$ac_includes_default
12178#include <X11/Xft/Xft.h>
12179_ACEOF
12180rm -f conftest.$ac_objext
12181if { (ac_try="$ac_compile"
12182case "(($ac_try" in
12183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12184 *) ac_try_echo=$ac_try;;
12185esac
12186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12187 (eval "$ac_compile") 2>conftest.er1
12188 ac_status=$?
12189 grep -v '^ *+' conftest.er1 >conftest.err
12190 rm -f conftest.er1
12191 cat conftest.err >&5
12192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193 (exit $ac_status); } && {
12194 test -z "$ac_c_werror_flag" ||
12195 test ! -s conftest.err
12196 } && test -s conftest.$ac_objext; then
12197 ac_header_compiler=yes
12198else
12199 echo "$as_me: failed program was:" >&5
12200sed 's/^/| /' conftest.$ac_ext >&5
12201
12202 ac_header_compiler=no
12203fi
12204
12205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12206{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12207echo "${ECHO_T}$ac_header_compiler" >&6; }
12208
12209# Is the header present?
12210{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12211echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
12212cat >conftest.$ac_ext <<_ACEOF
12213/* confdefs.h. */
12214_ACEOF
12215cat confdefs.h >>conftest.$ac_ext
12216cat >>conftest.$ac_ext <<_ACEOF
12217/* end confdefs.h. */
12218#include <X11/Xft/Xft.h>
12219_ACEOF
12220if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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); } >/dev/null && {
12233 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12234 test ! -s conftest.err
12235 }; then
12236 ac_header_preproc=yes
12237else
12238 echo "$as_me: failed program was:" >&5
12239sed 's/^/| /' conftest.$ac_ext >&5
12240
12241 ac_header_preproc=no
12242fi
12243
12244rm -f conftest.err conftest.$ac_ext
12245{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12246echo "${ECHO_T}$ac_header_preproc" >&6; }
12247
12248# So? What about this header?
12249case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12250 yes:no: )
12251 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12252echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12253 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12254echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12255 ac_header_preproc=yes
12256 ;;
12257 no:yes:* )
12258 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12259echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12260 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12261echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12262 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12263echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12264 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12265echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12266 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12267echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12268 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12269echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
12270
12271 ;;
12272esac
12273{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12274echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12275if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12276 echo $ECHO_N "(cached) $ECHO_C" >&6
12277else
12278 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12279fi
12280{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12281echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12282
12283fi
12284if test $ac_cv_header_X11_Xft_Xft_h = yes; then
12285 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12286echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
12287if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12288 echo $ECHO_N "(cached) $ECHO_C" >&6
12289else
12290 ac_check_lib_save_LIBS=$LIBS
12291LIBS="-lXft $XFT_LIBS $LIBS"
12292cat >conftest.$ac_ext <<_ACEOF
12293/* confdefs.h. */
12294_ACEOF
12295cat confdefs.h >>conftest.$ac_ext
12296cat >>conftest.$ac_ext <<_ACEOF
12297/* end confdefs.h. */
12298
12299/* Override any GCC internal prototype to avoid an error.
12300 Use char because int might match the return type of a GCC
12301 builtin and then its argument prototype would still apply. */
12302#ifdef __cplusplus
12303extern "C"
12304#endif
12305char XftFontOpen ();
12306int
12307main ()
12308{
12309return XftFontOpen ();
12310 ;
12311 return 0;
12312}
12313_ACEOF
12314rm -f conftest.$ac_objext conftest$ac_exeext
12315if { (ac_try="$ac_link"
12316case "(($ac_try" in
12317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12318 *) ac_try_echo=$ac_try;;
12319esac
12320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12321 (eval "$ac_link") 2>conftest.er1
12322 ac_status=$?
12323 grep -v '^ *+' conftest.er1 >conftest.err
12324 rm -f conftest.er1
12325 cat conftest.err >&5
12326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12327 (exit $ac_status); } && {
12328 test -z "$ac_c_werror_flag" ||
12329 test ! -s conftest.err
12330 } && test -s conftest$ac_exeext &&
12331 $as_test_x conftest$ac_exeext; then
12332 ac_cv_lib_Xft_XftFontOpen=yes
12333else
12334 echo "$as_me: failed program was:" >&5
12335sed 's/^/| /' conftest.$ac_ext >&5
12336
12337 ac_cv_lib_Xft_XftFontOpen=no
12338fi
12339
12340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12341 conftest$ac_exeext conftest.$ac_ext
12342LIBS=$ac_check_lib_save_LIBS
12343fi
12344{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12345echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12346if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12347 HAVE_XFT=yes
12348fi
12349
12350fi
12351
12352
12353
12354 if test "${HAVE_XFT}" = "yes"; then
12355
12356cat >>confdefs.h <<\_ACEOF
12357#define HAVE_XFT 1
12358_ACEOF
12359
12360
12361 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12362 else
12363 CFLAGS="$OLD_CPPFLAGS"
12364 CFLAGS="$OLD_CFLAGS"
12365 LIBS="$OLD_LIBS"
12366 fi
12367 fi
12368fi
12369
dba7bae0 12370HAVE_XAW3D=no
3685ba3f 12371if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
dba7bae0
CY
12372 if test x"${HAVE_X11R5}" != xyes; then
12373 USE_X_TOOLKIT=none
12374 else
c982cf7d
JD
12375 if test "$with_xaw3d" != no; then
12376 { echo "$as_me:$LINENO: checking for xaw3d" >&5
dba7bae0 12377echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
c982cf7d 12378 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
12379 echo $ECHO_N "(cached) $ECHO_C" >&6
12380else
12381 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12382/* confdefs.h. */
12383_ACEOF
12384cat confdefs.h >>conftest.$ac_ext
12385cat >>conftest.$ac_ext <<_ACEOF
12386/* end confdefs.h. */
98418dba
CW
12387
12388#include <X11/Intrinsic.h>
dba7bae0 12389#include <X11/Xaw3d/Simple.h>
98418dba
CW
12390int
12391main ()
12392{
12393
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12399if { (ac_try="$ac_link"
12400case "(($ac_try" in
12401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12402 *) ac_try_echo=$ac_try;;
12403esac
12404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12405 (eval "$ac_link") 2>conftest.er1
98418dba 12406 ac_status=$?
edfaf76d
LK
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
c0d27fcc 12410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12411 (exit $ac_status); } && {
12412 test -z "$ac_c_werror_flag" ||
12413 test ! -s conftest.err
12414 } && test -s conftest$ac_exeext &&
12415 $as_test_x conftest$ac_exeext; then
dba7bae0 12416 emacs_cv_xaw3d=yes
98418dba
CW
12417else
12418 echo "$as_me: failed program was:" >&5
19650fd6
AS
12419sed 's/^/| /' conftest.$ac_ext >&5
12420
dba7bae0 12421 emacs_cv_xaw3d=no
98418dba 12422fi
d6e01aa5
KL
12423
12424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12425 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12426fi
12427
c982cf7d
JD
12428 else
12429 emacs_cv_xaw3d=no
12430 fi
dba7bae0
CY
12431 if test $emacs_cv_xaw3d = yes; then
12432 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12433echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
98418dba 12434 USE_X_TOOLKIT=LUCID
dba7bae0
CY
12435 HAVE_XAW3D=yes
12436
12437cat >>confdefs.h <<\_ACEOF
12438#define HAVE_XAW3D 1
12439_ACEOF
12440
98418dba 12441 else
dba7bae0
CY
12442 { echo "$as_me:$LINENO: result: no" >&5
12443echo "${ECHO_T}no" >&6; }
12444 { echo "$as_me:$LINENO: checking for libXaw" >&5
12445echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
12446 if test "${emacs_cv_xaw+set}" = set; then
12447 echo $ECHO_N "(cached) $ECHO_C" >&6
12448else
12449 cat >conftest.$ac_ext <<_ACEOF
12450/* confdefs.h. */
12451_ACEOF
12452cat confdefs.h >>conftest.$ac_ext
12453cat >>conftest.$ac_ext <<_ACEOF
12454/* end confdefs.h. */
12455
12456#include <X11/Intrinsic.h>
12457#include <X11/Xaw/Simple.h>
12458int
12459main ()
12460{
12461
12462 ;
12463 return 0;
12464}
12465_ACEOF
12466rm -f conftest.$ac_objext conftest$ac_exeext
12467if { (ac_try="$ac_link"
12468case "(($ac_try" in
12469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12470 *) ac_try_echo=$ac_try;;
12471esac
12472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12473 (eval "$ac_link") 2>conftest.er1
12474 ac_status=$?
12475 grep -v '^ *+' conftest.er1 >conftest.err
12476 rm -f conftest.er1
12477 cat conftest.err >&5
12478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479 (exit $ac_status); } && {
12480 test -z "$ac_c_werror_flag" ||
12481 test ! -s conftest.err
12482 } && test -s conftest$ac_exeext &&
12483 $as_test_x conftest$ac_exeext; then
12484 emacs_cv_xaw=yes
12485else
12486 echo "$as_me: failed program was:" >&5
12487sed 's/^/| /' conftest.$ac_ext >&5
12488
12489 emacs_cv_xaw=no
12490fi
12491
12492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12493 conftest$ac_exeext conftest.$ac_ext
12494fi
12495
12496 if test $emacs_cv_xaw = yes; then
12497 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12498echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
12499 USE_X_TOOLKIT=LUCID
12500 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
3685ba3f
CY
12501 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12502echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12503 { (exit 1); exit 1; }; }
12504 else
dba7bae0
CY
12505 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
12506echo "${ECHO_T}no; do not use toolkit by default" >&6; }
3685ba3f
CY
12507 USE_X_TOOLKIT=none
12508 fi
98418dba 12509 fi
98418dba
CW
12510 fi
12511fi
12512
12513X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12514
12515if test "${USE_X_TOOLKIT}" != "none"; then
d6e01aa5
KL
12516 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12517echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12518 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12519 echo $ECHO_N "(cached) $ECHO_C" >&6
12520else
12521 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12522/* confdefs.h. */
12523_ACEOF
12524cat confdefs.h >>conftest.$ac_ext
12525cat >>conftest.$ac_ext <<_ACEOF
12526/* end confdefs.h. */
98418dba 12527#include <X11/Intrinsic.h>
98418dba
CW
12528int
12529main ()
12530{
12531#if XtSpecificationRelease < 6
12532fail;
12533#endif
12534
12535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12540if { (ac_try="$ac_link"
12541case "(($ac_try" in
12542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12543 *) ac_try_echo=$ac_try;;
12544esac
12545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12546 (eval "$ac_link") 2>conftest.er1
98418dba 12547 ac_status=$?
edfaf76d
LK
12548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
c0d27fcc 12551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12552 (exit $ac_status); } && {
12553 test -z "$ac_c_werror_flag" ||
12554 test ! -s conftest.err
12555 } && test -s conftest$ac_exeext &&
12556 $as_test_x conftest$ac_exeext; then
98418dba
CW
12557 emacs_cv_x11_toolkit_version_6=yes
12558else
12559 echo "$as_me: failed program was:" >&5
19650fd6
AS
12560sed 's/^/| /' conftest.$ac_ext >&5
12561
d6e01aa5 12562 emacs_cv_x11_toolkit_version_6=no
98418dba 12563fi
d6e01aa5
KL
12564
12565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12566 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12567fi
12568
12569 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12570 if test $emacs_cv_x11_toolkit_version_6 = yes; then
d6e01aa5
KL
12571 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12572echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12573
c0d27fcc 12574cat >>confdefs.h <<\_ACEOF
98418dba 12575#define HAVE_X11XTR6 1
c0d27fcc 12576_ACEOF
98418dba
CW
12577
12578 else
d6e01aa5
KL
12579 { echo "$as_me:$LINENO: result: before 6" >&5
12580echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12581 fi
12582
12583 OLDLIBS="$LIBS"
12584 if test x$HAVE_X11XTR6 = xyes; then
12585 LIBS="-lXt -lSM -lICE $LIBS"
12586 else
12587 LIBS="-lXt $LIBS"
12588 fi
12589
d6e01aa5
KL
12590{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12591echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12592if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12593 echo $ECHO_N "(cached) $ECHO_C" >&6
12594else
12595 ac_check_lib_save_LIBS=$LIBS
12596LIBS="-lXmu $LIBS"
12597cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12598/* confdefs.h. */
12599_ACEOF
12600cat confdefs.h >>conftest.$ac_ext
12601cat >>conftest.$ac_ext <<_ACEOF
12602/* end confdefs.h. */
98418dba 12603
d6e01aa5
KL
12604/* Override any GCC internal prototype to avoid an error.
12605 Use char because int might match the return type of a GCC
12606 builtin and then its argument prototype would still apply. */
98418dba
CW
12607#ifdef __cplusplus
12608extern "C"
12609#endif
98418dba 12610char XmuConvertStandardSelection ();
98418dba
CW
12611int
12612main ()
12613{
d6e01aa5 12614return XmuConvertStandardSelection ();
98418dba
CW
12615 ;
12616 return 0;
12617}
12618_ACEOF
12619rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12620if { (ac_try="$ac_link"
12621case "(($ac_try" in
12622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12623 *) ac_try_echo=$ac_try;;
12624esac
12625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12626 (eval "$ac_link") 2>conftest.er1
98418dba 12627 ac_status=$?
edfaf76d
LK
12628 grep -v '^ *+' conftest.er1 >conftest.err
12629 rm -f conftest.er1
12630 cat conftest.err >&5
c0d27fcc 12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12632 (exit $ac_status); } && {
12633 test -z "$ac_c_werror_flag" ||
12634 test ! -s conftest.err
12635 } && test -s conftest$ac_exeext &&
12636 $as_test_x conftest$ac_exeext; then
98418dba
CW
12637 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12638else
12639 echo "$as_me: failed program was:" >&5
19650fd6
AS
12640sed 's/^/| /' conftest.$ac_ext >&5
12641
d6e01aa5 12642 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12643fi
d6e01aa5
KL
12644
12645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12646 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12647LIBS=$ac_check_lib_save_LIBS
12648fi
d6e01aa5
KL
12649{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12650echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12651if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12652 cat >>confdefs.h <<_ACEOF
98418dba 12653#define HAVE_LIBXMU 1
c0d27fcc 12654_ACEOF
98418dba
CW
12655
12656 LIBS="-lXmu $LIBS"
12657
12658fi
12659
12660 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12661fi
12662
12663# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12664if test "${HAVE_X11}" = "yes"; then
12665 if test "${USE_X_TOOLKIT}" != "none"; then
12666
d6e01aa5
KL
12667{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12668echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12669if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12670 echo $ECHO_N "(cached) $ECHO_C" >&6
12671else
12672 ac_check_lib_save_LIBS=$LIBS
12673LIBS="-lXext $LIBS"
12674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12675/* confdefs.h. */
12676_ACEOF
12677cat confdefs.h >>conftest.$ac_ext
12678cat >>conftest.$ac_ext <<_ACEOF
12679/* end confdefs.h. */
98418dba 12680
d6e01aa5
KL
12681/* Override any GCC internal prototype to avoid an error.
12682 Use char because int might match the return type of a GCC
12683 builtin and then its argument prototype would still apply. */
98418dba
CW
12684#ifdef __cplusplus
12685extern "C"
12686#endif
98418dba 12687char XShapeQueryExtension ();
98418dba
CW
12688int
12689main ()
12690{
d6e01aa5 12691return XShapeQueryExtension ();
98418dba
CW
12692 ;
12693 return 0;
12694}
12695_ACEOF
12696rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12697if { (ac_try="$ac_link"
12698case "(($ac_try" in
12699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12700 *) ac_try_echo=$ac_try;;
12701esac
12702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12703 (eval "$ac_link") 2>conftest.er1
98418dba 12704 ac_status=$?
edfaf76d
LK
12705 grep -v '^ *+' conftest.er1 >conftest.err
12706 rm -f conftest.er1
12707 cat conftest.err >&5
c0d27fcc 12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12709 (exit $ac_status); } && {
12710 test -z "$ac_c_werror_flag" ||
12711 test ! -s conftest.err
12712 } && test -s conftest$ac_exeext &&
12713 $as_test_x conftest$ac_exeext; then
98418dba
CW
12714 ac_cv_lib_Xext_XShapeQueryExtension=yes
12715else
12716 echo "$as_me: failed program was:" >&5
19650fd6
AS
12717sed 's/^/| /' conftest.$ac_ext >&5
12718
d6e01aa5 12719 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12720fi
d6e01aa5
KL
12721
12722rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12723 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12724LIBS=$ac_check_lib_save_LIBS
12725fi
d6e01aa5
KL
12726{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12727echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12728if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12729 cat >>confdefs.h <<_ACEOF
98418dba 12730#define HAVE_LIBXEXT 1
c0d27fcc 12731_ACEOF
98418dba
CW
12732
12733 LIBS="-lXext $LIBS"
12734
12735fi
12736
12737 fi
12738fi
12739
12740if test "${USE_X_TOOLKIT}" = "MOTIF"; then
d6e01aa5
KL
12741 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12742echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12743if test "${emacs_cv_motif_version_2_1+set}" = set; then
12744 echo $ECHO_N "(cached) $ECHO_C" >&6
12745else
12746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12747/* confdefs.h. */
12748_ACEOF
12749cat confdefs.h >>conftest.$ac_ext
12750cat >>conftest.$ac_ext <<_ACEOF
12751/* end confdefs.h. */
98418dba 12752#include <Xm/Xm.h>
98418dba
CW
12753int
12754main ()
12755{
12756#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12757int x = 5;
12758#else
12759Motif version prior to 2.1.
12760#endif
12761 ;
12762 return 0;
12763}
12764_ACEOF
12765rm -f conftest.$ac_objext
d6e01aa5
KL
12766if { (ac_try="$ac_compile"
12767case "(($ac_try" in
12768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12769 *) ac_try_echo=$ac_try;;
12770esac
12771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12772 (eval "$ac_compile") 2>conftest.er1
98418dba 12773 ac_status=$?
edfaf76d
LK
12774 grep -v '^ *+' conftest.er1 >conftest.err
12775 rm -f conftest.er1
12776 cat conftest.err >&5
c0d27fcc 12777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12778 (exit $ac_status); } && {
12779 test -z "$ac_c_werror_flag" ||
12780 test ! -s conftest.err
12781 } && test -s conftest.$ac_objext; then
98418dba
CW
12782 emacs_cv_motif_version_2_1=yes
12783else
12784 echo "$as_me: failed program was:" >&5
19650fd6
AS
12785sed 's/^/| /' conftest.$ac_ext >&5
12786
d6e01aa5 12787 emacs_cv_motif_version_2_1=no
98418dba 12788fi
d6e01aa5
KL
12789
12790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12791fi
d6e01aa5
KL
12792{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12793echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12794 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12795 if test $emacs_cv_motif_version_2_1 = yes; then
12796 HAVE_LIBXP=no
b936fae4 12797
c0d27fcc 12798cat >>confdefs.h <<\_ACEOF
98418dba 12799#define HAVE_MOTIF_2_1 1
c0d27fcc 12800_ACEOF
98418dba 12801
d6e01aa5
KL
12802 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12803echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12804if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12805 echo $ECHO_N "(cached) $ECHO_C" >&6
12806else
12807 ac_check_lib_save_LIBS=$LIBS
12808LIBS="-lXp $LIBS"
12809cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
98418dba 12815
d6e01aa5
KL
12816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
98418dba
CW
12819#ifdef __cplusplus
12820extern "C"
12821#endif
98418dba 12822char XpCreateContext ();
98418dba
CW
12823int
12824main ()
12825{
d6e01aa5 12826return XpCreateContext ();
98418dba
CW
12827 ;
12828 return 0;
12829}
12830_ACEOF
12831rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12832if { (ac_try="$ac_link"
12833case "(($ac_try" in
12834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12835 *) ac_try_echo=$ac_try;;
12836esac
12837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12838 (eval "$ac_link") 2>conftest.er1
98418dba 12839 ac_status=$?
edfaf76d
LK
12840 grep -v '^ *+' conftest.er1 >conftest.err
12841 rm -f conftest.er1
12842 cat conftest.err >&5
c0d27fcc 12843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12844 (exit $ac_status); } && {
12845 test -z "$ac_c_werror_flag" ||
12846 test ! -s conftest.err
12847 } && test -s conftest$ac_exeext &&
12848 $as_test_x conftest$ac_exeext; then
98418dba
CW
12849 ac_cv_lib_Xp_XpCreateContext=yes
12850else
12851 echo "$as_me: failed program was:" >&5
19650fd6
AS
12852sed 's/^/| /' conftest.$ac_ext >&5
12853
d6e01aa5 12854 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12855fi
d6e01aa5
KL
12856
12857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12858 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12859LIBS=$ac_check_lib_save_LIBS
12860fi
d6e01aa5
KL
12861{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12862echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12863if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12864 HAVE_LIBXP=yes
12865fi
503d2be0 12866
98418dba 12867 if test ${HAVE_LIBXP} = yes; then
b936fae4 12868
c0d27fcc 12869cat >>confdefs.h <<\_ACEOF
98418dba 12870#define HAVE_LIBXP 1
c0d27fcc 12871_ACEOF
503d2be0 12872
98418dba 12873 fi
4693dbc9 12874 else
d6e01aa5
KL
12875 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12876echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12877if test "${emacs_cv_lesstif+set}" = set; then
12878 echo $ECHO_N "(cached) $ECHO_C" >&6
12879else
12880 # We put this in CFLAGS temporarily to precede other -I options
12881 # that might be in CFLAGS temporarily.
12882 # We put this in CPPFLAGS where it precedes the other -I options.
12883 OLD_CPPFLAGS=$CPPFLAGS
12884 OLD_CFLAGS=$CFLAGS
12885 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12886 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12887 cat >conftest.$ac_ext <<_ACEOF
12888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
12893#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12894int
12895main ()
12896{
12897int x = 5;
12898 ;
12899 return 0;
12900}
12901_ACEOF
12902rm -f conftest.$ac_objext
d6e01aa5
KL
12903if { (ac_try="$ac_compile"
12904case "(($ac_try" in
12905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12906 *) ac_try_echo=$ac_try;;
12907esac
12908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12909 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12910 ac_status=$?
edfaf76d
LK
12911 grep -v '^ *+' conftest.er1 >conftest.err
12912 rm -f conftest.er1
12913 cat conftest.err >&5
4693dbc9 12914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12915 (exit $ac_status); } && {
12916 test -z "$ac_c_werror_flag" ||
12917 test ! -s conftest.err
12918 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12919 emacs_cv_lesstif=yes
12920else
12921 echo "$as_me: failed program was:" >&5
12922sed 's/^/| /' conftest.$ac_ext >&5
12923
d6e01aa5 12924 emacs_cv_lesstif=no
4693dbc9 12925fi
d6e01aa5
KL
12926
12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12928fi
d6e01aa5
KL
12929{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12930echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12931 if test $emacs_cv_lesstif = yes; then
12932 # Make sure this -I option remains in CPPFLAGS after it is set
12933 # back to REAL_CPPFLAGS.
12934 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12935 # have those other -I options anyway. Ultimately, having this
12936 # directory ultimately in CPPFLAGS will be enough.
12937 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12938 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12939 else
12940 CFLAGS=$OLD_CFLAGS
12941 CPPFLAGS=$OLD_CPPFLAGS
12942 fi
98418dba
CW
12943 fi
12944fi
12945
c0d27fcc
MR
12946
12947
98418dba
CW
12948USE_TOOLKIT_SCROLL_BARS=no
12949if test "${with_toolkit_scroll_bars}" != "no"; then
12950 if test "${USE_X_TOOLKIT}" != "none"; then
12951 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12952 cat >>confdefs.h <<\_ACEOF
98418dba 12953#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12954_ACEOF
98418dba
CW
12955
12956 HAVE_XAW3D=no
12957 USE_TOOLKIT_SCROLL_BARS=yes
12958 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12959 cat >>confdefs.h <<\_ACEOF
98418dba 12960#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12961_ACEOF
98418dba
CW
12962
12963 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12964 fi
488dd4c4
JD
12965 elif test "${HAVE_GTK}" = "yes"; then
12966 cat >>confdefs.h <<\_ACEOF
12967#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12968_ACEOF
12969
12970 USE_TOOLKIT_SCROLL_BARS=yes
12971 elif test "${HAVE_CARBON}" = "yes"; then
12972 cat >>confdefs.h <<\_ACEOF
12973#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12974_ACEOF
12975
12976 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12977 fi
12978fi
12979
abd39b57 12980cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12981/* confdefs.h. */
12982_ACEOF
12983cat confdefs.h >>conftest.$ac_ext
12984cat >>conftest.$ac_ext <<_ACEOF
12985/* end confdefs.h. */
12986
12987 #include <X11/Xlib.h>
12988 #include <X11/Xresource.h>
12989int
12990main ()
12991{
12992XIMProc callback;
12993 ;
12994 return 0;
12995}
12996_ACEOF
12997rm -f conftest.$ac_objext
d6e01aa5
KL
12998if { (ac_try="$ac_compile"
12999case "(($ac_try" in
13000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13001 *) ac_try_echo=$ac_try;;
13002esac
13003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13004 (eval "$ac_compile") 2>conftest.er1
abd39b57 13005 ac_status=$?
edfaf76d
LK
13006 grep -v '^ *+' conftest.er1 >conftest.err
13007 rm -f conftest.er1
13008 cat conftest.err >&5
abd39b57 13009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13010 (exit $ac_status); } && {
13011 test -z "$ac_c_werror_flag" ||
13012 test ! -s conftest.err
13013 } && test -s conftest.$ac_objext; then
abd39b57
AC
13014 HAVE_XIM=yes
13015
13016cat >>confdefs.h <<\_ACEOF
13017#define HAVE_XIM 1
13018_ACEOF
13019
13020else
13021 echo "$as_me: failed program was:" >&5
13022sed 's/^/| /' conftest.$ac_ext >&5
13023
d6e01aa5 13024 HAVE_XIM=no
abd39b57 13025fi
d6e01aa5
KL
13026
13027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 13028
c0d27fcc 13029
98418dba 13030if test "${with_xim}" != "no"; then
b936fae4 13031
c0d27fcc 13032cat >>confdefs.h <<\_ACEOF
98418dba 13033#define USE_XIM 1
c0d27fcc 13034_ACEOF
98418dba 13035
793fa0d7 13036fi
abd39b57
AC
13037
13038
13039if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
13040 late_CFLAGS=$CFLAGS
13041 if test "$GCC" = yes; then
13042 CFLAGS="$CFLAGS --pedantic-errors"
13043 fi
cffcede7 13044 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13045/* confdefs.h. */
13046_ACEOF
13047cat confdefs.h >>conftest.$ac_ext
13048cat >>conftest.$ac_ext <<_ACEOF
13049/* end confdefs.h. */
cffcede7
JD
13050
13051#include <X11/Xlib.h>
13052#include <X11/Xresource.h>
13053int
13054main ()
13055{
13056Display *display;
13057XrmDatabase db;
13058char *res_name;
13059char *res_class;
13060XIMProc callback;
13061XPointer *client_data;
849d80cf
DL
13062#ifndef __GNUC__
13063/* If we're not using GCC, it's probably not XFree86, and this is
13064 probably right, but we can't use something like --pedantic-errors. */
13065extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
13066 char*, XIMProc, XPointer*);
13067#endif
cffcede7
JD
13068(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
13069 client_data);
13070 ;
13071 return 0;
13072}
13073_ACEOF
13074rm -f conftest.$ac_objext
d6e01aa5
KL
13075if { (ac_try="$ac_compile"
13076case "(($ac_try" in
13077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13078 *) ac_try_echo=$ac_try;;
13079esac
13080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13081 (eval "$ac_compile") 2>conftest.er1
cffcede7 13082 ac_status=$?
edfaf76d
LK
13083 grep -v '^ *+' conftest.er1 >conftest.err
13084 rm -f conftest.er1
13085 cat conftest.err >&5
cffcede7 13086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13087 (exit $ac_status); } && {
13088 test -z "$ac_c_werror_flag" ||
13089 test ! -s conftest.err
13090 } && test -s conftest.$ac_objext; then
cffcede7
JD
13091 emacs_cv_arg6_star=yes
13092else
13093 echo "$as_me: failed program was:" >&5
19650fd6
AS
13094sed 's/^/| /' conftest.$ac_ext >&5
13095
d6e01aa5 13096
cffcede7 13097fi
d6e01aa5
KL
13098
13099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
13100
13101 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 13102 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13103#define XRegisterIMInstantiateCallback_arg6 XPointer*
13104_ACEOF
13105
13106 else
f57bd967 13107 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13108#define XRegisterIMInstantiateCallback_arg6 XPointer
13109_ACEOF
13110
13111 fi
849d80cf 13112 CFLAGS=$late_CFLAGS
98418dba
CW
13113fi
13114
13115### Use -lXpm if available, unless `--with-xpm=no'.
13116HAVE_XPM=no
13117if test "${HAVE_X11}" = "yes"; then
13118 if test "${with_xpm}" != "no"; then
c0d27fcc 13119 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
d6e01aa5
KL
13120 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13121echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13122if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13123 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13124fi
d6e01aa5
KL
13125{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13126echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13127else
c0d27fcc 13128 # Is the header compilable?
d6e01aa5
KL
13129{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13130echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13131cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13132/* confdefs.h. */
13133_ACEOF
13134cat confdefs.h >>conftest.$ac_ext
13135cat >>conftest.$ac_ext <<_ACEOF
13136/* end confdefs.h. */
c0d27fcc
MR
13137$ac_includes_default
13138#include <X11/xpm.h>
13139_ACEOF
13140rm -f conftest.$ac_objext
d6e01aa5
KL
13141if { (ac_try="$ac_compile"
13142case "(($ac_try" in
13143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13144 *) ac_try_echo=$ac_try;;
13145esac
13146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13147 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13148 ac_status=$?
edfaf76d
LK
13149 grep -v '^ *+' conftest.er1 >conftest.err
13150 rm -f conftest.er1
13151 cat conftest.err >&5
c0d27fcc 13152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13153 (exit $ac_status); } && {
13154 test -z "$ac_c_werror_flag" ||
13155 test ! -s conftest.err
13156 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13157 ac_header_compiler=yes
13158else
13159 echo "$as_me: failed program was:" >&5
19650fd6
AS
13160sed 's/^/| /' conftest.$ac_ext >&5
13161
d6e01aa5 13162 ac_header_compiler=no
c0d27fcc 13163fi
d6e01aa5
KL
13164
13165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13166{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13167echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13168
13169# Is the header present?
d6e01aa5
KL
13170{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13171echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13172cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13173/* confdefs.h. */
13174_ACEOF
13175cat confdefs.h >>conftest.$ac_ext
13176cat >>conftest.$ac_ext <<_ACEOF
13177/* end confdefs.h. */
98418dba
CW
13178#include <X11/xpm.h>
13179_ACEOF
d6e01aa5
KL
13180if { (ac_try="$ac_cpp conftest.$ac_ext"
13181case "(($ac_try" in
13182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13183 *) ac_try_echo=$ac_try;;
13184esac
13185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13186 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13187 ac_status=$?
6bae0ccf 13188 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13189 rm -f conftest.er1
13190 cat conftest.err >&5
c0d27fcc 13191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13192 (exit $ac_status); } >/dev/null && {
13193 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13194 test ! -s conftest.err
13195 }; then
c0d27fcc 13196 ac_header_preproc=yes
98418dba
CW
13197else
13198 echo "$as_me: failed program was:" >&5
19650fd6
AS
13199sed 's/^/| /' conftest.$ac_ext >&5
13200
c0d27fcc 13201 ac_header_preproc=no
98418dba 13202fi
d6e01aa5 13203
98418dba 13204rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13205{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13206echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13207
13208# So? What about this header?
edfaf76d
LK
13209case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13210 yes:no: )
c0d27fcc
MR
13211 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13212echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13213 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13214echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13215 ac_header_preproc=yes
13216 ;;
13217 no:yes:* )
13218 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13219echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13220 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13221echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13222 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13223echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13224 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13225echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13226 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13227echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13228 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13229echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13230
19650fd6 13231 ;;
c0d27fcc 13232esac
d6e01aa5
KL
13233{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13234echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13235if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13236 echo $ECHO_N "(cached) $ECHO_C" >&6
13237else
13238 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13239fi
d6e01aa5
KL
13240{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13241echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13242
13243fi
98418dba 13244if test $ac_cv_header_X11_xpm_h = yes; then
d6e01aa5
KL
13245 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13246echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13247if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13248 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13249else
98418dba
CW
13250 ac_check_lib_save_LIBS=$LIBS
13251LIBS="-lXpm -lX11 $LIBS"
13252cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13253/* confdefs.h. */
13254_ACEOF
13255cat confdefs.h >>conftest.$ac_ext
13256cat >>conftest.$ac_ext <<_ACEOF
13257/* end confdefs.h. */
98418dba 13258
d6e01aa5
KL
13259/* Override any GCC internal prototype to avoid an error.
13260 Use char because int might match the return type of a GCC
13261 builtin and then its argument prototype would still apply. */
503d2be0
AS
13262#ifdef __cplusplus
13263extern "C"
13264#endif
98418dba 13265char XpmReadFileToPixmap ();
503d2be0
AS
13266int
13267main ()
13268{
d6e01aa5 13269return XpmReadFileToPixmap ();
503d2be0
AS
13270 ;
13271 return 0;
13272}
13273_ACEOF
13274rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13275if { (ac_try="$ac_link"
13276case "(($ac_try" in
13277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13278 *) ac_try_echo=$ac_try;;
13279esac
13280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13281 (eval "$ac_link") 2>conftest.er1
503d2be0 13282 ac_status=$?
edfaf76d
LK
13283 grep -v '^ *+' conftest.er1 >conftest.err
13284 rm -f conftest.er1
13285 cat conftest.err >&5
c0d27fcc 13286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13287 (exit $ac_status); } && {
13288 test -z "$ac_c_werror_flag" ||
13289 test ! -s conftest.err
13290 } && test -s conftest$ac_exeext &&
13291 $as_test_x conftest$ac_exeext; then
98418dba 13292 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13293else
13294 echo "$as_me: failed program was:" >&5
19650fd6
AS
13295sed 's/^/| /' conftest.$ac_ext >&5
13296
d6e01aa5 13297 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13298fi
d6e01aa5
KL
13299
13300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13301 conftest$ac_exeext conftest.$ac_ext
98418dba 13302LIBS=$ac_check_lib_save_LIBS
503d2be0 13303fi
d6e01aa5
KL
13304{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13305echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13306if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13307 HAVE_XPM=yes
ba4481b5
DL
13308fi
13309
98418dba
CW
13310fi
13311
c0d27fcc 13312
98418dba 13313 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13314 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13315echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13316 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13317/* confdefs.h. */
13318_ACEOF
13319cat confdefs.h >>conftest.$ac_ext
13320cat >>conftest.$ac_ext <<_ACEOF
13321/* end confdefs.h. */
98418dba
CW
13322#include "X11/xpm.h"
13323#ifndef XpmReturnAllocPixels
13324no_return_alloc_pixels
503d2be0 13325#endif
ba4481b5 13326
98418dba
CW
13327_ACEOF
13328if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13329 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13330 HAVE_XPM=no
13331else
13332 HAVE_XPM=yes
13333fi
13334rm -f conftest*
ba4481b5 13335
c0d27fcc 13336
98418dba 13337 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13338 { echo "$as_me:$LINENO: result: yes" >&5
13339echo "${ECHO_T}yes" >&6; }
98418dba 13340 else
d6e01aa5
KL
13341 { echo "$as_me:$LINENO: result: no" >&5
13342echo "${ECHO_T}no" >&6; }
98418dba
CW
13343 fi
13344 fi
13345 fi
13346
13347 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13348
c0d27fcc 13349cat >>confdefs.h <<\_ACEOF
98418dba 13350#define HAVE_XPM 1
c0d27fcc 13351_ACEOF
98418dba
CW
13352
13353 fi
13354fi
13355
13356### Use -ljpeg if available, unless `--with-jpeg=no'.
13357HAVE_JPEG=no
13358if test "${HAVE_X11}" = "yes"; then
13359 if test "${with_jpeg}" != "no"; then
c0d27fcc 13360 if test "${ac_cv_header_jerror_h+set}" = set; then
d6e01aa5
KL
13361 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13362echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13363if test "${ac_cv_header_jerror_h+set}" = set; then
13364 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13365fi
d6e01aa5
KL
13366{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13367echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13368else
c0d27fcc 13369 # Is the header compilable?
d6e01aa5
KL
13370{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13371echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13372cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13373/* confdefs.h. */
13374_ACEOF
13375cat confdefs.h >>conftest.$ac_ext
13376cat >>conftest.$ac_ext <<_ACEOF
13377/* end confdefs.h. */
c0d27fcc
MR
13378$ac_includes_default
13379#include <jerror.h>
13380_ACEOF
13381rm -f conftest.$ac_objext
d6e01aa5
KL
13382if { (ac_try="$ac_compile"
13383case "(($ac_try" in
13384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13385 *) ac_try_echo=$ac_try;;
13386esac
13387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13388 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13389 ac_status=$?
edfaf76d
LK
13390 grep -v '^ *+' conftest.er1 >conftest.err
13391 rm -f conftest.er1
13392 cat conftest.err >&5
c0d27fcc 13393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13394 (exit $ac_status); } && {
13395 test -z "$ac_c_werror_flag" ||
13396 test ! -s conftest.err
13397 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13398 ac_header_compiler=yes
13399else
13400 echo "$as_me: failed program was:" >&5
19650fd6
AS
13401sed 's/^/| /' conftest.$ac_ext >&5
13402
d6e01aa5 13403 ac_header_compiler=no
c0d27fcc 13404fi
d6e01aa5
KL
13405
13406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13407{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13408echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13409
13410# Is the header present?
d6e01aa5
KL
13411{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13412echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13413cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13414/* confdefs.h. */
13415_ACEOF
13416cat confdefs.h >>conftest.$ac_ext
13417cat >>conftest.$ac_ext <<_ACEOF
13418/* end confdefs.h. */
98418dba
CW
13419#include <jerror.h>
13420_ACEOF
d6e01aa5
KL
13421if { (ac_try="$ac_cpp conftest.$ac_ext"
13422case "(($ac_try" in
13423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13424 *) ac_try_echo=$ac_try;;
13425esac
13426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13427 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13428 ac_status=$?
6bae0ccf 13429 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13430 rm -f conftest.er1
13431 cat conftest.err >&5
c0d27fcc 13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13433 (exit $ac_status); } >/dev/null && {
13434 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13435 test ! -s conftest.err
13436 }; then
c0d27fcc 13437 ac_header_preproc=yes
ba4481b5 13438else
98418dba 13439 echo "$as_me: failed program was:" >&5
19650fd6
AS
13440sed 's/^/| /' conftest.$ac_ext >&5
13441
c0d27fcc 13442 ac_header_preproc=no
98418dba 13443fi
d6e01aa5 13444
98418dba 13445rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13446{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13447echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13448
13449# So? What about this header?
edfaf76d
LK
13450case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13451 yes:no: )
c0d27fcc
MR
13452 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13453echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13454 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13455echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13456 ac_header_preproc=yes
19650fd6 13457 ;;
edfaf76d 13458 no:yes:* )
c0d27fcc
MR
13459 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13460echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13461 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13462echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13463 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13464echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13465 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13466echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13467 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13468echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13469 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13470echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13471
19650fd6 13472 ;;
c0d27fcc 13473esac
d6e01aa5
KL
13474{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13475echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13476if test "${ac_cv_header_jerror_h+set}" = set; then
13477 echo $ECHO_N "(cached) $ECHO_C" >&6
13478else
13479 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13480fi
d6e01aa5
KL
13481{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13482echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13483
13484fi
98418dba 13485if test $ac_cv_header_jerror_h = yes; then
d6e01aa5
KL
13486 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13487echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13488if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13489 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13490else
98418dba
CW
13491 ac_check_lib_save_LIBS=$LIBS
13492LIBS="-ljpeg $LIBS"
13493cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13494/* confdefs.h. */
13495_ACEOF
13496cat confdefs.h >>conftest.$ac_ext
13497cat >>conftest.$ac_ext <<_ACEOF
13498/* end confdefs.h. */
98418dba 13499
d6e01aa5
KL
13500/* Override any GCC internal prototype to avoid an error.
13501 Use char because int might match the return type of a GCC
13502 builtin and then its argument prototype would still apply. */
98418dba
CW
13503#ifdef __cplusplus
13504extern "C"
13505#endif
98418dba 13506char jpeg_destroy_compress ();
503d2be0
AS
13507int
13508main ()
13509{
d6e01aa5 13510return jpeg_destroy_compress ();
503d2be0
AS
13511 ;
13512 return 0;
13513}
13514_ACEOF
13515rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13516if { (ac_try="$ac_link"
13517case "(($ac_try" in
13518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13519 *) ac_try_echo=$ac_try;;
13520esac
13521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13522 (eval "$ac_link") 2>conftest.er1
503d2be0 13523 ac_status=$?
edfaf76d
LK
13524 grep -v '^ *+' conftest.er1 >conftest.err
13525 rm -f conftest.er1
13526 cat conftest.err >&5
c0d27fcc 13527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13528 (exit $ac_status); } && {
13529 test -z "$ac_c_werror_flag" ||
13530 test ! -s conftest.err
13531 } && test -s conftest$ac_exeext &&
13532 $as_test_x conftest$ac_exeext; then
98418dba 13533 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13534else
503d2be0 13535 echo "$as_me: failed program was:" >&5
19650fd6
AS
13536sed 's/^/| /' conftest.$ac_ext >&5
13537
d6e01aa5 13538 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13539fi
d6e01aa5
KL
13540
13541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13542 conftest$ac_exeext conftest.$ac_ext
98418dba 13543LIBS=$ac_check_lib_save_LIBS
ba4481b5 13544fi
d6e01aa5
KL
13545{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13546echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13547if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13548 HAVE_JPEG=yes
ba4481b5 13549fi
98418dba 13550
ba4481b5 13551fi
98418dba 13552
c0d27fcc 13553
ba4481b5 13554 fi
ba4481b5 13555
c0d27fcc 13556
98418dba 13557 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13558 cat >>confdefs.h <<\_ACEOF
98418dba 13559#define HAVE_JPEG 1
c0d27fcc 13560_ACEOF
98418dba
CW
13561
13562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13563/* confdefs.h. */
13564_ACEOF
13565cat confdefs.h >>conftest.$ac_ext
13566cat >>conftest.$ac_ext <<_ACEOF
13567/* end confdefs.h. */
22044edf 13568#include <jpeglib.h>
98418dba
CW
13569 version=JPEG_LIB_VERSION
13570
13571_ACEOF
13572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13573 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13574 cat >>confdefs.h <<\_ACEOF
98418dba 13575#define HAVE_JPEG 1
c0d27fcc 13576_ACEOF
ba4481b5 13577
98418dba 13578else
c0d27fcc 13579 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13580echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13581 HAVE_JPEG=no
ba4481b5 13582fi
98418dba 13583rm -f conftest*
ba4481b5 13584
98418dba
CW
13585 fi
13586fi
503d2be0 13587
98418dba
CW
13588### Use -lpng if available, unless `--with-png=no'.
13589HAVE_PNG=no
13590if test "${HAVE_X11}" = "yes"; then
13591 if test "${with_png}" != "no"; then
f57bd967
DL
13592 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13593 # in /usr/include/libpng.
13594
13595
13596for ac_header in png.h libpng/png.h
13597do
13598as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
13599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13600 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13601echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13602if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13603 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13604fi
d6e01aa5
KL
13605ac_res=`eval echo '${'$as_ac_Header'}'`
13606 { echo "$as_me:$LINENO: result: $ac_res" >&5
13607echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13608else
c0d27fcc 13609 # Is the header compilable?
d6e01aa5
KL
13610{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13611echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13612cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13613/* confdefs.h. */
13614_ACEOF
13615cat confdefs.h >>conftest.$ac_ext
13616cat >>conftest.$ac_ext <<_ACEOF
13617/* end confdefs.h. */
c0d27fcc 13618$ac_includes_default
f57bd967 13619#include <$ac_header>
c0d27fcc
MR
13620_ACEOF
13621rm -f conftest.$ac_objext
d6e01aa5
KL
13622if { (ac_try="$ac_compile"
13623case "(($ac_try" in
13624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13625 *) ac_try_echo=$ac_try;;
13626esac
13627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13628 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13629 ac_status=$?
edfaf76d
LK
13630 grep -v '^ *+' conftest.er1 >conftest.err
13631 rm -f conftest.er1
13632 cat conftest.err >&5
c0d27fcc 13633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13634 (exit $ac_status); } && {
13635 test -z "$ac_c_werror_flag" ||
13636 test ! -s conftest.err
13637 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13638 ac_header_compiler=yes
13639else
13640 echo "$as_me: failed program was:" >&5
19650fd6
AS
13641sed 's/^/| /' conftest.$ac_ext >&5
13642
d6e01aa5 13643 ac_header_compiler=no
c0d27fcc 13644fi
d6e01aa5
KL
13645
13646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13647{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13648echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13649
13650# Is the header present?
d6e01aa5
KL
13651{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13652echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13653cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13654/* confdefs.h. */
13655_ACEOF
13656cat confdefs.h >>conftest.$ac_ext
13657cat >>conftest.$ac_ext <<_ACEOF
13658/* end confdefs.h. */
f57bd967 13659#include <$ac_header>
503d2be0 13660_ACEOF
d6e01aa5
KL
13661if { (ac_try="$ac_cpp conftest.$ac_ext"
13662case "(($ac_try" in
13663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13664 *) ac_try_echo=$ac_try;;
13665esac
13666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13668 ac_status=$?
6bae0ccf 13669 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13670 rm -f conftest.er1
13671 cat conftest.err >&5
c0d27fcc 13672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13673 (exit $ac_status); } >/dev/null && {
13674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13675 test ! -s conftest.err
13676 }; then
c0d27fcc 13677 ac_header_preproc=yes
503d2be0
AS
13678else
13679 echo "$as_me: failed program was:" >&5
19650fd6
AS
13680sed 's/^/| /' conftest.$ac_ext >&5
13681
c0d27fcc 13682 ac_header_preproc=no
ba4481b5 13683fi
d6e01aa5 13684
503d2be0 13685rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13686{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13687echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13688
13689# So? What about this header?
edfaf76d
LK
13690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13691 yes:no: )
f57bd967
DL
13692 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13693echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13694 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13695echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13696 ac_header_preproc=yes
19650fd6 13697 ;;
edfaf76d 13698 no:yes:* )
f57bd967
DL
13699 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13700echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13701 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13702echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13703 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13704echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13705 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13706echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13708echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13709 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13710echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13711
19650fd6 13712 ;;
c0d27fcc 13713esac
d6e01aa5
KL
13714{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13715echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13716if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13717 echo $ECHO_N "(cached) $ECHO_C" >&6
13718else
edfaf76d 13719 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13720fi
d6e01aa5
KL
13721ac_res=`eval echo '${'$as_ac_Header'}'`
13722 { echo "$as_me:$LINENO: result: $ac_res" >&5
13723echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13724
ba4481b5 13725fi
f57bd967
DL
13726if test `eval echo '${'$as_ac_Header'}'` = yes; then
13727 cat >>confdefs.h <<_ACEOF
13728#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13729_ACEOF
c0d27fcc
MR
13730
13731fi
f57bd967
DL
13732
13733done
13734
13735 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
d6e01aa5
KL
13736 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13737echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13738if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13739 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13740else
98418dba
CW
13741 ac_check_lib_save_LIBS=$LIBS
13742LIBS="-lpng -lz -lm $LIBS"
13743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
98418dba 13749
d6e01aa5
KL
13750/* Override any GCC internal prototype to avoid an error.
13751 Use char because int might match the return type of a GCC
13752 builtin and then its argument prototype would still apply. */
503d2be0
AS
13753#ifdef __cplusplus
13754extern "C"
13755#endif
98418dba 13756char png_get_channels ();
503d2be0
AS
13757int
13758main ()
13759{
d6e01aa5 13760return png_get_channels ();
503d2be0
AS
13761 ;
13762 return 0;
13763}
13764_ACEOF
13765rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13766if { (ac_try="$ac_link"
13767case "(($ac_try" in
13768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13769 *) ac_try_echo=$ac_try;;
13770esac
13771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13772 (eval "$ac_link") 2>conftest.er1
503d2be0 13773 ac_status=$?
edfaf76d
LK
13774 grep -v '^ *+' conftest.er1 >conftest.err
13775 rm -f conftest.er1
13776 cat conftest.err >&5
c0d27fcc 13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13778 (exit $ac_status); } && {
13779 test -z "$ac_c_werror_flag" ||
13780 test ! -s conftest.err
13781 } && test -s conftest$ac_exeext &&
13782 $as_test_x conftest$ac_exeext; then
98418dba 13783 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13784else
98418dba 13785 echo "$as_me: failed program was:" >&5
19650fd6
AS
13786sed 's/^/| /' conftest.$ac_ext >&5
13787
d6e01aa5 13788 ac_cv_lib_png_png_get_channels=no
73b77ee5 13789fi
d6e01aa5
KL
13790
13791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13792 conftest$ac_exeext conftest.$ac_ext
98418dba 13793LIBS=$ac_check_lib_save_LIBS
73b77ee5 13794fi
d6e01aa5
KL
13795{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13796echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13797if test $ac_cv_lib_png_png_get_channels = yes; then
13798 HAVE_PNG=yes
73b77ee5 13799fi
503d2be0 13800
f57bd967 13801 fi
98418dba
CW
13802 fi
13803
13804 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13805
c0d27fcc 13806cat >>confdefs.h <<\_ACEOF
98418dba 13807#define HAVE_PNG 1
c0d27fcc 13808_ACEOF
73b77ee5 13809
98418dba 13810 fi
73b77ee5
GM
13811fi
13812
98418dba
CW
13813### Use -ltiff if available, unless `--with-tiff=no'.
13814HAVE_TIFF=no
13815if test "${HAVE_X11}" = "yes"; then
13816 if test "${with_tiff}" != "no"; then
c0d27fcc 13817 if test "${ac_cv_header_tiffio_h+set}" = set; then
d6e01aa5
KL
13818 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13819echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13820if test "${ac_cv_header_tiffio_h+set}" = set; then
13821 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13822fi
d6e01aa5
KL
13823{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13824echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13825else
c0d27fcc 13826 # Is the header compilable?
d6e01aa5
KL
13827{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13828echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13829cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13830/* confdefs.h. */
13831_ACEOF
13832cat confdefs.h >>conftest.$ac_ext
13833cat >>conftest.$ac_ext <<_ACEOF
13834/* end confdefs.h. */
c0d27fcc
MR
13835$ac_includes_default
13836#include <tiffio.h>
13837_ACEOF
13838rm -f conftest.$ac_objext
d6e01aa5
KL
13839if { (ac_try="$ac_compile"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
13844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13845 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13846 ac_status=$?
edfaf76d
LK
13847 grep -v '^ *+' conftest.er1 >conftest.err
13848 rm -f conftest.er1
13849 cat conftest.err >&5
c0d27fcc 13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13851 (exit $ac_status); } && {
13852 test -z "$ac_c_werror_flag" ||
13853 test ! -s conftest.err
13854 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13855 ac_header_compiler=yes
13856else
13857 echo "$as_me: failed program was:" >&5
19650fd6
AS
13858sed 's/^/| /' conftest.$ac_ext >&5
13859
d6e01aa5 13860 ac_header_compiler=no
c0d27fcc 13861fi
d6e01aa5
KL
13862
13863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13864{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13865echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13866
13867# Is the header present?
d6e01aa5
KL
13868{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13869echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13870cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13871/* confdefs.h. */
13872_ACEOF
13873cat confdefs.h >>conftest.$ac_ext
13874cat >>conftest.$ac_ext <<_ACEOF
13875/* end confdefs.h. */
98418dba
CW
13876#include <tiffio.h>
13877_ACEOF
d6e01aa5
KL
13878if { (ac_try="$ac_cpp conftest.$ac_ext"
13879case "(($ac_try" in
13880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13881 *) ac_try_echo=$ac_try;;
13882esac
13883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13884 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13885 ac_status=$?
6bae0ccf 13886 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13887 rm -f conftest.er1
13888 cat conftest.err >&5
c0d27fcc 13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13890 (exit $ac_status); } >/dev/null && {
13891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13892 test ! -s conftest.err
13893 }; then
c0d27fcc 13894 ac_header_preproc=yes
98418dba
CW
13895else
13896 echo "$as_me: failed program was:" >&5
19650fd6
AS
13897sed 's/^/| /' conftest.$ac_ext >&5
13898
c0d27fcc 13899 ac_header_preproc=no
98418dba 13900fi
d6e01aa5 13901
98418dba 13902rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13903{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13904echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13905
13906# So? What about this header?
edfaf76d
LK
13907case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13908 yes:no: )
c0d27fcc
MR
13909 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13910echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13911 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13912echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13913 ac_header_preproc=yes
19650fd6 13914 ;;
edfaf76d 13915 no:yes:* )
c0d27fcc
MR
13916 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13917echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13918 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13919echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13920 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13921echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13922 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13923echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13924 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13925echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13926 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13927echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13928
19650fd6 13929 ;;
c0d27fcc 13930esac
d6e01aa5
KL
13931{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13932echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13933if test "${ac_cv_header_tiffio_h+set}" = set; then
13934 echo $ECHO_N "(cached) $ECHO_C" >&6
13935else
13936 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13937fi
d6e01aa5
KL
13938{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13939echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13940
13941fi
98418dba
CW
13942if test $ac_cv_header_tiffio_h = yes; then
13943 tifflibs="-lz -lm"
13944 # At least one tiff package requires the jpeg library.
13945 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
d6e01aa5
KL
13946 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13947echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13948if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13949 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13950else
503d2be0 13951 ac_check_lib_save_LIBS=$LIBS
98418dba 13952LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13954/* confdefs.h. */
13955_ACEOF
13956cat confdefs.h >>conftest.$ac_ext
13957cat >>conftest.$ac_ext <<_ACEOF
13958/* end confdefs.h. */
503d2be0 13959
d6e01aa5
KL
13960/* Override any GCC internal prototype to avoid an error.
13961 Use char because int might match the return type of a GCC
13962 builtin and then its argument prototype would still apply. */
503d2be0
AS
13963#ifdef __cplusplus
13964extern "C"
13965#endif
98418dba 13966char TIFFGetVersion ();
503d2be0
AS
13967int
13968main ()
13969{
d6e01aa5 13970return TIFFGetVersion ();
503d2be0
AS
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13976if { (ac_try="$ac_link"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
13981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13982 (eval "$ac_link") 2>conftest.er1
503d2be0 13983 ac_status=$?
edfaf76d
LK
13984 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1
13986 cat conftest.err >&5
c0d27fcc 13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13988 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 } && test -s conftest$ac_exeext &&
13992 $as_test_x conftest$ac_exeext; then
98418dba 13993 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13994else
13995 echo "$as_me: failed program was:" >&5
19650fd6
AS
13996sed 's/^/| /' conftest.$ac_ext >&5
13997
d6e01aa5 13998 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13999fi
d6e01aa5
KL
14000
14001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14002 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14003LIBS=$ac_check_lib_save_LIBS
14004fi
d6e01aa5
KL
14005{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14006echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14007if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14008 HAVE_TIFF=yes
14009fi
14010
14011fi
73b77ee5 14012
c0d27fcc 14013
98418dba
CW
14014 fi
14015
14016 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14017
c0d27fcc 14018cat >>confdefs.h <<\_ACEOF
98418dba 14019#define HAVE_TIFF 1
c0d27fcc 14020_ACEOF
98418dba
CW
14021
14022 fi
73b77ee5
GM
14023fi
14024
9aeb8aaa 14025### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14026HAVE_GIF=no
9aeb8aaa
GM
14027if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14028 if test "${ac_cv_header_gif_lib_h+set}" = set; then
d6e01aa5
KL
14029 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14030echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14031if test "${ac_cv_header_gif_lib_h+set}" = set; then
14032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14033fi
d6e01aa5
KL
14034{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14035echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14036else
c0d27fcc 14037 # Is the header compilable?
d6e01aa5
KL
14038{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14039echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14040cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
c0d27fcc
MR
14046$ac_includes_default
14047#include <gif_lib.h>
14048_ACEOF
14049rm -f conftest.$ac_objext
d6e01aa5
KL
14050if { (ac_try="$ac_compile"
14051case "(($ac_try" in
14052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14053 *) ac_try_echo=$ac_try;;
14054esac
14055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14056 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14057 ac_status=$?
edfaf76d
LK
14058 grep -v '^ *+' conftest.er1 >conftest.err
14059 rm -f conftest.er1
14060 cat conftest.err >&5
c0d27fcc 14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14062 (exit $ac_status); } && {
14063 test -z "$ac_c_werror_flag" ||
14064 test ! -s conftest.err
14065 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14066 ac_header_compiler=yes
14067else
14068 echo "$as_me: failed program was:" >&5
19650fd6
AS
14069sed 's/^/| /' conftest.$ac_ext >&5
14070
d6e01aa5 14071 ac_header_compiler=no
c0d27fcc 14072fi
d6e01aa5
KL
14073
14074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14075{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14076echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14077
14078# Is the header present?
d6e01aa5
KL
14079{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14080echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14081cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14082/* confdefs.h. */
14083_ACEOF
14084cat confdefs.h >>conftest.$ac_ext
14085cat >>conftest.$ac_ext <<_ACEOF
14086/* end confdefs.h. */
98418dba
CW
14087#include <gif_lib.h>
14088_ACEOF
d6e01aa5
KL
14089if { (ac_try="$ac_cpp conftest.$ac_ext"
14090case "(($ac_try" in
14091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14092 *) ac_try_echo=$ac_try;;
14093esac
14094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14096 ac_status=$?
6bae0ccf 14097 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14098 rm -f conftest.er1
14099 cat conftest.err >&5
c0d27fcc 14100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14101 (exit $ac_status); } >/dev/null && {
14102 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14103 test ! -s conftest.err
14104 }; then
c0d27fcc 14105 ac_header_preproc=yes
98418dba
CW
14106else
14107 echo "$as_me: failed program was:" >&5
19650fd6
AS
14108sed 's/^/| /' conftest.$ac_ext >&5
14109
c0d27fcc 14110 ac_header_preproc=no
98418dba 14111fi
d6e01aa5 14112
98418dba 14113rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14114{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14115echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14116
14117# So? What about this header?
edfaf76d
LK
14118case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14119 yes:no: )
c0d27fcc
MR
14120 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14121echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14122 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14123echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14124 ac_header_preproc=yes
19650fd6 14125 ;;
edfaf76d 14126 no:yes:* )
c0d27fcc
MR
14127 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14128echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14129 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14130echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14131 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14132echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14133 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14134echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14135 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14136echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14137 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14138echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14139
19650fd6 14140 ;;
c0d27fcc 14141esac
d6e01aa5
KL
14142{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14143echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14144if test "${ac_cv_header_gif_lib_h+set}" = set; then
14145 echo $ECHO_N "(cached) $ECHO_C" >&6
14146else
14147 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14148fi
d6e01aa5
KL
14149{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14150echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14151
14152fi
98418dba
CW
14153if test $ac_cv_header_gif_lib_h = yes; then
14154 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14155# Earlier versions can crash Emacs.
63175cd2
GM
14156 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14157echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14158if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14159 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14160else
503d2be0 14161 ac_check_lib_save_LIBS=$LIBS
63175cd2 14162LIBS="-lgif $LIBS"
503d2be0 14163cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14164/* confdefs.h. */
14165_ACEOF
14166cat confdefs.h >>conftest.$ac_ext
14167cat >>conftest.$ac_ext <<_ACEOF
14168/* end confdefs.h. */
73b77ee5 14169
d6e01aa5
KL
14170/* Override any GCC internal prototype to avoid an error.
14171 Use char because int might match the return type of a GCC
14172 builtin and then its argument prototype would still apply. */
98418dba
CW
14173#ifdef __cplusplus
14174extern "C"
14175#endif
98418dba 14176char EGifPutExtensionLast ();
503d2be0
AS
14177int
14178main ()
14179{
d6e01aa5 14180return EGifPutExtensionLast ();
503d2be0
AS
14181 ;
14182 return 0;
14183}
14184_ACEOF
14185rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14186if { (ac_try="$ac_link"
14187case "(($ac_try" in
14188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14189 *) ac_try_echo=$ac_try;;
14190esac
14191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14192 (eval "$ac_link") 2>conftest.er1
503d2be0 14193 ac_status=$?
edfaf76d
LK
14194 grep -v '^ *+' conftest.er1 >conftest.err
14195 rm -f conftest.er1
14196 cat conftest.err >&5
c0d27fcc 14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14198 (exit $ac_status); } && {
14199 test -z "$ac_c_werror_flag" ||
14200 test ! -s conftest.err
14201 } && test -s conftest$ac_exeext &&
14202 $as_test_x conftest$ac_exeext; then
63175cd2 14203 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14204else
98418dba 14205 echo "$as_me: failed program was:" >&5
19650fd6
AS
14206sed 's/^/| /' conftest.$ac_ext >&5
14207
63175cd2 14208 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14209fi
d6e01aa5
KL
14210
14211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14212 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14213LIBS=$ac_check_lib_save_LIBS
14214fi
63175cd2
GM
14215{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14216echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14217if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14218 HAVE_GIF=yes
9aeb8aaa 14219else
63175cd2 14220 try_libungif=yes
98418dba
CW
14221fi
14222
14223fi
14224
c0d27fcc 14225
9aeb8aaa
GM
14226
14227 if test "$HAVE_GIF" = yes; then
63175cd2 14228 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14229 fi
14230
63175cd2
GM
14231# If gif_lib.h but no libgif, try libungif.
14232 if test x"$try_libungif" = xyes; then
14233 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14234echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14235if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14236 echo $ECHO_N "(cached) $ECHO_C" >&6
14237else
14238 ac_check_lib_save_LIBS=$LIBS
63175cd2 14239LIBS="-lungif $LIBS"
9aeb8aaa
GM
14240cat >conftest.$ac_ext <<_ACEOF
14241/* confdefs.h. */
14242_ACEOF
14243cat confdefs.h >>conftest.$ac_ext
14244cat >>conftest.$ac_ext <<_ACEOF
14245/* end confdefs.h. */
14246
14247/* Override any GCC internal prototype to avoid an error.
14248 Use char because int might match the return type of a GCC
14249 builtin and then its argument prototype would still apply. */
14250#ifdef __cplusplus
14251extern "C"
14252#endif
14253char EGifPutExtensionLast ();
14254int
14255main ()
14256{
14257return EGifPutExtensionLast ();
14258 ;
14259 return 0;
14260}
14261_ACEOF
14262rm -f conftest.$ac_objext conftest$ac_exeext
14263if { (ac_try="$ac_link"
14264case "(($ac_try" in
14265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14266 *) ac_try_echo=$ac_try;;
14267esac
14268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14269 (eval "$ac_link") 2>conftest.er1
14270 ac_status=$?
14271 grep -v '^ *+' conftest.er1 >conftest.err
14272 rm -f conftest.er1
14273 cat conftest.err >&5
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); } && {
14276 test -z "$ac_c_werror_flag" ||
14277 test ! -s conftest.err
14278 } && test -s conftest$ac_exeext &&
14279 $as_test_x conftest$ac_exeext; then
63175cd2 14280 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14281else
14282 echo "$as_me: failed program was:" >&5
14283sed 's/^/| /' conftest.$ac_ext >&5
14284
63175cd2 14285 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14286fi
14287
9aeb8aaa
GM
14288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14289 conftest$ac_exeext conftest.$ac_ext
14290LIBS=$ac_check_lib_save_LIBS
14291fi
63175cd2
GM
14292{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14293echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14294if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14295 HAVE_GIF=yes
98418dba
CW
14296fi
14297
c0d27fcc 14298
9aeb8aaa
GM
14299 if test "$HAVE_GIF" = yes; then
14300
14301cat >>confdefs.h <<\_ACEOF
63175cd2 14302#define LIBGIF -lungif
9aeb8aaa
GM
14303_ACEOF
14304
63175cd2 14305 ac_gif_lib_name="-lungif"
9aeb8aaa 14306 fi
98418dba
CW
14307 fi
14308
14309 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14310
c0d27fcc 14311cat >>confdefs.h <<\_ACEOF
98418dba 14312#define HAVE_GIF 1
c0d27fcc 14313_ACEOF
98418dba
CW
14314
14315 fi
14316fi
14317
5afbeb22
JD
14318if test "${HAVE_X11}" = "yes"; then
14319 MISSING=""
14320 WITH_NO=""
14321 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14322 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14323 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14324 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14325 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14326 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14327 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14328 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14329 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14330 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14331
14332 if test "X${MISSING}" != X; then
c982cf7d 14333 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14334 $MISSING
86e73516 14335Maybe some development libraries/packages are missing?
5afbeb22
JD
14336If you don't want to link with them give
14337 $WITH_NO
14338as options to configure" >&5
c982cf7d 14339echo "$as_me: error: The following required libraries were not found:
5afbeb22 14340 $MISSING
86e73516 14341Maybe some development libraries/packages are missing?
5afbeb22
JD
14342If you don't want to link with them give
14343 $WITH_NO
14344as options to configure" >&2;}
86e73516 14345 { (exit 1); exit 1; }; }
98418dba
CW
14346 fi
14347fi
14348
79011b82
NR
14349### Use -lgpm if available, unless `--with-gpm=no'.
14350HAVE_GPM=no
14351if test "${with_gpm}" != "no"; then
14352 if test "${ac_cv_header_gpm_h+set}" = set; then
14353 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14354echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14355if test "${ac_cv_header_gpm_h+set}" = set; then
14356 echo $ECHO_N "(cached) $ECHO_C" >&6
14357fi
14358{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14359echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14360else
14361 # Is the header compilable?
14362{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14363echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14364cat >conftest.$ac_ext <<_ACEOF
14365/* confdefs.h. */
14366_ACEOF
14367cat confdefs.h >>conftest.$ac_ext
14368cat >>conftest.$ac_ext <<_ACEOF
14369/* end confdefs.h. */
14370$ac_includes_default
14371#include <gpm.h>
14372_ACEOF
14373rm -f conftest.$ac_objext
14374if { (ac_try="$ac_compile"
14375case "(($ac_try" in
14376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14377 *) ac_try_echo=$ac_try;;
14378esac
14379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14380 (eval "$ac_compile") 2>conftest.er1
14381 ac_status=$?
14382 grep -v '^ *+' conftest.er1 >conftest.err
14383 rm -f conftest.er1
14384 cat conftest.err >&5
14385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14386 (exit $ac_status); } && {
14387 test -z "$ac_c_werror_flag" ||
14388 test ! -s conftest.err
14389 } && test -s conftest.$ac_objext; then
14390 ac_header_compiler=yes
14391else
14392 echo "$as_me: failed program was:" >&5
14393sed 's/^/| /' conftest.$ac_ext >&5
14394
14395 ac_header_compiler=no
14396fi
14397
14398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14399{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14400echo "${ECHO_T}$ac_header_compiler" >&6; }
14401
14402# Is the header present?
14403{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14404echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14405cat >conftest.$ac_ext <<_ACEOF
14406/* confdefs.h. */
14407_ACEOF
14408cat confdefs.h >>conftest.$ac_ext
14409cat >>conftest.$ac_ext <<_ACEOF
14410/* end confdefs.h. */
14411#include <gpm.h>
14412_ACEOF
14413if { (ac_try="$ac_cpp conftest.$ac_ext"
14414case "(($ac_try" in
14415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14416 *) ac_try_echo=$ac_try;;
14417esac
14418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14420 ac_status=$?
14421 grep -v '^ *+' conftest.er1 >conftest.err
14422 rm -f conftest.er1
14423 cat conftest.err >&5
14424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14425 (exit $ac_status); } >/dev/null && {
14426 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14427 test ! -s conftest.err
14428 }; then
14429 ac_header_preproc=yes
14430else
14431 echo "$as_me: failed program was:" >&5
14432sed 's/^/| /' conftest.$ac_ext >&5
14433
14434 ac_header_preproc=no
14435fi
14436
14437rm -f conftest.err conftest.$ac_ext
14438{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14439echo "${ECHO_T}$ac_header_preproc" >&6; }
14440
14441# So? What about this header?
14442case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14443 yes:no: )
14444 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14445echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14446 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14447echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14448 ac_header_preproc=yes
14449 ;;
14450 no:yes:* )
14451 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14452echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14453 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14454echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14455 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14456echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14457 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14458echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14459 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14460echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14461 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14462echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14463
14464 ;;
14465esac
14466{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14467echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14468if test "${ac_cv_header_gpm_h+set}" = set; then
14469 echo $ECHO_N "(cached) $ECHO_C" >&6
14470else
14471 ac_cv_header_gpm_h=$ac_header_preproc
14472fi
14473{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14474echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14475
14476fi
14477if test $ac_cv_header_gpm_h = yes; then
14478 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14479echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14480if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14481 echo $ECHO_N "(cached) $ECHO_C" >&6
14482else
14483 ac_check_lib_save_LIBS=$LIBS
14484LIBS="-lgpm $LIBS"
14485cat >conftest.$ac_ext <<_ACEOF
14486/* confdefs.h. */
14487_ACEOF
14488cat confdefs.h >>conftest.$ac_ext
14489cat >>conftest.$ac_ext <<_ACEOF
14490/* end confdefs.h. */
14491
14492/* Override any GCC internal prototype to avoid an error.
14493 Use char because int might match the return type of a GCC
14494 builtin and then its argument prototype would still apply. */
14495#ifdef __cplusplus
14496extern "C"
14497#endif
14498char Gpm_Open ();
14499int
14500main ()
14501{
14502return Gpm_Open ();
14503 ;
14504 return 0;
14505}
14506_ACEOF
14507rm -f conftest.$ac_objext conftest$ac_exeext
14508if { (ac_try="$ac_link"
14509case "(($ac_try" in
14510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14511 *) ac_try_echo=$ac_try;;
14512esac
14513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14514 (eval "$ac_link") 2>conftest.er1
14515 ac_status=$?
14516 grep -v '^ *+' conftest.er1 >conftest.err
14517 rm -f conftest.er1
14518 cat conftest.err >&5
14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520 (exit $ac_status); } && {
14521 test -z "$ac_c_werror_flag" ||
14522 test ! -s conftest.err
14523 } && test -s conftest$ac_exeext &&
14524 $as_test_x conftest$ac_exeext; then
14525 ac_cv_lib_gpm_Gpm_Open=yes
14526else
14527 echo "$as_me: failed program was:" >&5
14528sed 's/^/| /' conftest.$ac_ext >&5
14529
14530 ac_cv_lib_gpm_Gpm_Open=no
14531fi
14532
14533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14534 conftest$ac_exeext conftest.$ac_ext
14535LIBS=$ac_check_lib_save_LIBS
14536fi
14537{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14538echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14539if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14540 HAVE_GPM=yes
14541fi
14542
14543fi
14544
14545
14546fi
14547
14548if test "${HAVE_GPM}" = "yes"; then
14549
14550cat >>confdefs.h <<\_ACEOF
14551#define HAVE_GPM 1
14552_ACEOF
14553
14554fi
14555
cef11da2 14556if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
d6e01aa5
KL
14557 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14558echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14559if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14560 echo $ECHO_N "(cached) $ECHO_C" >&6
14561fi
d6e01aa5
KL
14562{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14563echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14564else
14565 # Is the header compilable?
d6e01aa5
KL
14566{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14567echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14568cat >conftest.$ac_ext <<_ACEOF
14569/* confdefs.h. */
14570_ACEOF
14571cat confdefs.h >>conftest.$ac_ext
14572cat >>conftest.$ac_ext <<_ACEOF
14573/* end confdefs.h. */
14574$ac_includes_default
14575#include <malloc/malloc.h>
14576_ACEOF
14577rm -f conftest.$ac_objext
d6e01aa5
KL
14578if { (ac_try="$ac_compile"
14579case "(($ac_try" in
14580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14581 *) ac_try_echo=$ac_try;;
14582esac
14583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14584 (eval "$ac_compile") 2>conftest.er1
cef11da2 14585 ac_status=$?
edfaf76d
LK
14586 grep -v '^ *+' conftest.er1 >conftest.err
14587 rm -f conftest.er1
14588 cat conftest.err >&5
cef11da2 14589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14590 (exit $ac_status); } && {
14591 test -z "$ac_c_werror_flag" ||
14592 test ! -s conftest.err
14593 } && test -s conftest.$ac_objext; then
cef11da2
ST
14594 ac_header_compiler=yes
14595else
14596 echo "$as_me: failed program was:" >&5
14597sed 's/^/| /' conftest.$ac_ext >&5
14598
d6e01aa5 14599 ac_header_compiler=no
cef11da2 14600fi
d6e01aa5
KL
14601
14602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14603{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14604echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14605
14606# Is the header present?
d6e01aa5
KL
14607{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14608echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14609cat >conftest.$ac_ext <<_ACEOF
14610/* confdefs.h. */
14611_ACEOF
14612cat confdefs.h >>conftest.$ac_ext
14613cat >>conftest.$ac_ext <<_ACEOF
14614/* end confdefs.h. */
14615#include <malloc/malloc.h>
14616_ACEOF
d6e01aa5
KL
14617if { (ac_try="$ac_cpp conftest.$ac_ext"
14618case "(($ac_try" in
14619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14620 *) ac_try_echo=$ac_try;;
14621esac
14622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14624 ac_status=$?
14625 grep -v '^ *+' conftest.er1 >conftest.err
14626 rm -f conftest.er1
14627 cat conftest.err >&5
14628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14629 (exit $ac_status); } >/dev/null && {
14630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14631 test ! -s conftest.err
14632 }; then
cef11da2
ST
14633 ac_header_preproc=yes
14634else
14635 echo "$as_me: failed program was:" >&5
14636sed 's/^/| /' conftest.$ac_ext >&5
14637
14638 ac_header_preproc=no
14639fi
d6e01aa5 14640
cef11da2 14641rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14642{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14643echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14644
14645# So? What about this header?
edfaf76d
LK
14646case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14647 yes:no: )
cef11da2
ST
14648 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14649echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14650 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14651echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14652 ac_header_preproc=yes
cef11da2 14653 ;;
edfaf76d 14654 no:yes:* )
cef11da2
ST
14655 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14656echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14657 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14658echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14659 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14660echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14661 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14662echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14663 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14664echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14665 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14666echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14667
cef11da2
ST
14668 ;;
14669esac
d6e01aa5
KL
14670{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14671echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14672if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14673 echo $ECHO_N "(cached) $ECHO_C" >&6
14674else
14675 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14676fi
d6e01aa5
KL
14677{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14678echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14679
14680fi
14681if test $ac_cv_header_malloc_malloc_h = yes; then
14682
14683cat >>confdefs.h <<\_ACEOF
14684#define HAVE_MALLOC_MALLOC_H 1
14685_ACEOF
14686
14687fi
14688
14689
14690
5d6da11e 14691### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14692if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14693
c0d27fcc 14694cat >>confdefs.h <<\_ACEOF
e0f712ba 14695#define HAVE_CARBON 1
c0d27fcc 14696_ACEOF
e0f712ba 14697
6a3a24fa
JD
14698 ## Specify the install directory
14699 carbon_appdir=
14700 if test "${carbon_appdir_x}" != ""; then
14701 case ${carbon_appdir_x} in
14702 y | ye | yes) carbon_appdir=/Applications ;;
14703 * ) carbon_appdir=${carbon_appdir_x} ;;
14704 esac
14705 fi
8f417b3b
AS
14706 # We also have mouse menus.
14707 HAVE_MENUS=yes
e0f712ba
AC
14708fi
14709
98418dba
CW
14710### Use session management (-lSM -lICE) if available
14711HAVE_X_SM=no
14712if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14713 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
d6e01aa5
KL
14714 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14715echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14716if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14717 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14718fi
d6e01aa5
KL
14719{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14720echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14721else
c0d27fcc 14722 # Is the header compilable?
d6e01aa5
KL
14723{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14724echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14725cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14726/* confdefs.h. */
14727_ACEOF
14728cat confdefs.h >>conftest.$ac_ext
14729cat >>conftest.$ac_ext <<_ACEOF
14730/* end confdefs.h. */
c0d27fcc
MR
14731$ac_includes_default
14732#include <X11/SM/SMlib.h>
14733_ACEOF
14734rm -f conftest.$ac_objext
d6e01aa5
KL
14735if { (ac_try="$ac_compile"
14736case "(($ac_try" in
14737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14738 *) ac_try_echo=$ac_try;;
14739esac
14740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14741 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14742 ac_status=$?
edfaf76d
LK
14743 grep -v '^ *+' conftest.er1 >conftest.err
14744 rm -f conftest.er1
14745 cat conftest.err >&5
c0d27fcc 14746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14747 (exit $ac_status); } && {
14748 test -z "$ac_c_werror_flag" ||
14749 test ! -s conftest.err
14750 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14751 ac_header_compiler=yes
14752else
14753 echo "$as_me: failed program was:" >&5
19650fd6
AS
14754sed 's/^/| /' conftest.$ac_ext >&5
14755
d6e01aa5 14756 ac_header_compiler=no
c0d27fcc 14757fi
d6e01aa5
KL
14758
14759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14760{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14761echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14762
14763# Is the header present?
d6e01aa5
KL
14764{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14765echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14767/* confdefs.h. */
14768_ACEOF
14769cat confdefs.h >>conftest.$ac_ext
14770cat >>conftest.$ac_ext <<_ACEOF
14771/* end confdefs.h. */
98418dba
CW
14772#include <X11/SM/SMlib.h>
14773_ACEOF
d6e01aa5
KL
14774if { (ac_try="$ac_cpp conftest.$ac_ext"
14775case "(($ac_try" in
14776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14777 *) ac_try_echo=$ac_try;;
14778esac
14779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14780 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14781 ac_status=$?
6bae0ccf 14782 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14783 rm -f conftest.er1
14784 cat conftest.err >&5
c0d27fcc 14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14786 (exit $ac_status); } >/dev/null && {
14787 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14788 test ! -s conftest.err
14789 }; then
c0d27fcc 14790 ac_header_preproc=yes
98418dba
CW
14791else
14792 echo "$as_me: failed program was:" >&5
19650fd6
AS
14793sed 's/^/| /' conftest.$ac_ext >&5
14794
c0d27fcc 14795 ac_header_preproc=no
98418dba 14796fi
d6e01aa5 14797
98418dba 14798rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14799{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14800echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14801
14802# So? What about this header?
edfaf76d
LK
14803case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14804 yes:no: )
c0d27fcc
MR
14805 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14806echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14807 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14808echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14809 ac_header_preproc=yes
19650fd6 14810 ;;
edfaf76d 14811 no:yes:* )
c0d27fcc
MR
14812 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14813echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14814 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14815echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14816 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14817echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14818 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14819echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14820 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14821echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14822 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14823echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14824
19650fd6 14825 ;;
c0d27fcc 14826esac
d6e01aa5
KL
14827{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14828echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14829if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14830 echo $ECHO_N "(cached) $ECHO_C" >&6
14831else
14832 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14833fi
d6e01aa5
KL
14834{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14835echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14836
14837fi
98418dba 14838if test $ac_cv_header_X11_SM_SMlib_h = yes; then
d6e01aa5
KL
14839 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14840echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14841if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14842 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14843else
503d2be0 14844 ac_check_lib_save_LIBS=$LIBS
1660500f 14845LIBS="-lSM -lICE $LIBS"
503d2be0 14846cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14847/* confdefs.h. */
14848_ACEOF
14849cat confdefs.h >>conftest.$ac_ext
14850cat >>conftest.$ac_ext <<_ACEOF
14851/* end confdefs.h. */
503d2be0 14852
d6e01aa5
KL
14853/* Override any GCC internal prototype to avoid an error.
14854 Use char because int might match the return type of a GCC
14855 builtin and then its argument prototype would still apply. */
503d2be0
AS
14856#ifdef __cplusplus
14857extern "C"
14858#endif
98418dba 14859char SmcOpenConnection ();
503d2be0
AS
14860int
14861main ()
14862{
d6e01aa5 14863return SmcOpenConnection ();
503d2be0
AS
14864 ;
14865 return 0;
14866}
14867_ACEOF
14868rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14869if { (ac_try="$ac_link"
14870case "(($ac_try" in
14871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14872 *) ac_try_echo=$ac_try;;
14873esac
14874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14875 (eval "$ac_link") 2>conftest.er1
503d2be0 14876 ac_status=$?
edfaf76d
LK
14877 grep -v '^ *+' conftest.er1 >conftest.err
14878 rm -f conftest.er1
14879 cat conftest.err >&5
c0d27fcc 14880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14881 (exit $ac_status); } && {
14882 test -z "$ac_c_werror_flag" ||
14883 test ! -s conftest.err
14884 } && test -s conftest$ac_exeext &&
14885 $as_test_x conftest$ac_exeext; then
98418dba 14886 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14887else
14888 echo "$as_me: failed program was:" >&5
19650fd6
AS
14889sed 's/^/| /' conftest.$ac_ext >&5
14890
d6e01aa5 14891 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14892fi
d6e01aa5
KL
14893
14894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14895 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14896LIBS=$ac_check_lib_save_LIBS
14897fi
d6e01aa5
KL
14898{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14899echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14900if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14901 HAVE_X_SM=yes
73b77ee5
GM
14902fi
14903
73b77ee5 14904fi
73b77ee5 14905
c0d27fcc
MR
14906
14907
98418dba 14908 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14909
c0d27fcc 14910cat >>confdefs.h <<\_ACEOF
98418dba 14911#define HAVE_X_SM 1
c0d27fcc 14912_ACEOF
73b77ee5 14913
98418dba
CW
14914 case "$LIBS" in
14915 *-lSM*) ;;
14916 *) LIBS="-lSM -lICE $LIBS" ;;
14917 esac
73b77ee5 14918 fi
98418dba 14919fi
73b77ee5 14920
98418dba 14921# If netdb.h doesn't declare h_errno, we must declare it by hand.
d6e01aa5
KL
14922{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14923echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14924if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
14926else
14927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14928/* confdefs.h. */
14929_ACEOF
14930cat confdefs.h >>conftest.$ac_ext
14931cat >>conftest.$ac_ext <<_ACEOF
14932/* end confdefs.h. */
98418dba 14933#include <netdb.h>
503d2be0
AS
14934int
14935main ()
14936{
98418dba 14937return h_errno;
503d2be0
AS
14938 ;
14939 return 0;
14940}
14941_ACEOF
14942rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14943if { (ac_try="$ac_link"
14944case "(($ac_try" in
14945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14946 *) ac_try_echo=$ac_try;;
14947esac
14948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14949 (eval "$ac_link") 2>conftest.er1
503d2be0 14950 ac_status=$?
edfaf76d
LK
14951 grep -v '^ *+' conftest.er1 >conftest.err
14952 rm -f conftest.er1
14953 cat conftest.err >&5
c0d27fcc 14954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14955 (exit $ac_status); } && {
14956 test -z "$ac_c_werror_flag" ||
14957 test ! -s conftest.err
14958 } && test -s conftest$ac_exeext &&
14959 $as_test_x conftest$ac_exeext; then
98418dba 14960 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14961else
503d2be0 14962 echo "$as_me: failed program was:" >&5
19650fd6
AS
14963sed 's/^/| /' conftest.$ac_ext >&5
14964
d6e01aa5 14965 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14966fi
d6e01aa5
KL
14967
14968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14969 conftest$ac_exeext conftest.$ac_ext
98418dba 14970fi
d6e01aa5
KL
14971{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14972echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14973if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14974
c0d27fcc 14975cat >>confdefs.h <<\_ACEOF
98418dba 14976#define HAVE_H_ERRNO 1
c0d27fcc 14977_ACEOF
73b77ee5 14978
98418dba
CW
14979fi
14980
14981# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14982# for constant arguments. Useless!
d6e01aa5
KL
14983{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14984echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14985if test "${ac_cv_working_alloca_h+set}" = set; then
14986 echo $ECHO_N "(cached) $ECHO_C" >&6
14987else
14988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14989/* confdefs.h. */
14990_ACEOF
14991cat confdefs.h >>conftest.$ac_ext
14992cat >>conftest.$ac_ext <<_ACEOF
14993/* end confdefs.h. */
98418dba 14994#include <alloca.h>
503d2be0
AS
14995int
14996main ()
14997{
98418dba 14998char *p = (char *) alloca (2 * sizeof (int));
d6e01aa5 14999 if (p) return 0;
503d2be0
AS
15000 ;
15001 return 0;
15002}
15003_ACEOF
15004rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15005if { (ac_try="$ac_link"
15006case "(($ac_try" in
15007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15008 *) ac_try_echo=$ac_try;;
15009esac
15010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15011 (eval "$ac_link") 2>conftest.er1
503d2be0 15012 ac_status=$?
edfaf76d
LK
15013 grep -v '^ *+' conftest.er1 >conftest.err
15014 rm -f conftest.er1
15015 cat conftest.err >&5
c0d27fcc 15016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15017 (exit $ac_status); } && {
15018 test -z "$ac_c_werror_flag" ||
15019 test ! -s conftest.err
15020 } && test -s conftest$ac_exeext &&
15021 $as_test_x conftest$ac_exeext; then
98418dba 15022 ac_cv_working_alloca_h=yes
73b77ee5 15023else
503d2be0 15024 echo "$as_me: failed program was:" >&5
19650fd6
AS
15025sed 's/^/| /' conftest.$ac_ext >&5
15026
d6e01aa5 15027 ac_cv_working_alloca_h=no
73b77ee5 15028fi
d6e01aa5
KL
15029
15030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15031 conftest$ac_exeext conftest.$ac_ext
98418dba 15032fi
d6e01aa5
KL
15033{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15034echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15035if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15036
c0d27fcc 15037cat >>confdefs.h <<\_ACEOF
98418dba 15038#define HAVE_ALLOCA_H 1
c0d27fcc 15039_ACEOF
98418dba
CW
15040
15041fi
15042
d6e01aa5
KL
15043{ echo "$as_me:$LINENO: checking for alloca" >&5
15044echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15045if test "${ac_cv_func_alloca_works+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
15047else
503d2be0 15048 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15049/* confdefs.h. */
15050_ACEOF
15051cat confdefs.h >>conftest.$ac_ext
15052cat >>conftest.$ac_ext <<_ACEOF
15053/* end confdefs.h. */
98418dba
CW
15054#ifdef __GNUC__
15055# define alloca __builtin_alloca
15056#else
15057# ifdef _MSC_VER
15058# include <malloc.h>
15059# define alloca _alloca
15060# else
d6e01aa5 15061# ifdef HAVE_ALLOCA_H
98418dba
CW
15062# include <alloca.h>
15063# else
15064# ifdef _AIX
15065 #pragma alloca
15066# else
15067# ifndef alloca /* predefined by HP cc +Olibcalls */
15068char *alloca ();
15069# endif
15070# endif
15071# endif
15072# endif
15073#endif
15074
503d2be0
AS
15075int
15076main ()
15077{
98418dba 15078char *p = (char *) alloca (1);
d6e01aa5 15079 if (p) return 0;
503d2be0
AS
15080 ;
15081 return 0;
15082}
15083_ACEOF
15084rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15085if { (ac_try="$ac_link"
15086case "(($ac_try" in
15087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15088 *) ac_try_echo=$ac_try;;
15089esac
15090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15091 (eval "$ac_link") 2>conftest.er1
503d2be0 15092 ac_status=$?
edfaf76d
LK
15093 grep -v '^ *+' conftest.er1 >conftest.err
15094 rm -f conftest.er1
15095 cat conftest.err >&5
c0d27fcc 15096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15097 (exit $ac_status); } && {
15098 test -z "$ac_c_werror_flag" ||
15099 test ! -s conftest.err
15100 } && test -s conftest$ac_exeext &&
15101 $as_test_x conftest$ac_exeext; then
98418dba 15102 ac_cv_func_alloca_works=yes
ac95a621 15103else
503d2be0 15104 echo "$as_me: failed program was:" >&5
19650fd6
AS
15105sed 's/^/| /' conftest.$ac_ext >&5
15106
d6e01aa5 15107 ac_cv_func_alloca_works=no
ac95a621 15108fi
d6e01aa5
KL
15109
15110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15111 conftest$ac_exeext conftest.$ac_ext
98418dba 15112fi
d6e01aa5
KL
15113{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15114echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15115
98418dba
CW
15116if test $ac_cv_func_alloca_works = yes; then
15117
c0d27fcc 15118cat >>confdefs.h <<\_ACEOF
98418dba 15119#define HAVE_ALLOCA 1
c0d27fcc 15120_ACEOF
98418dba
CW
15121
15122else
15123 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15124# that cause trouble. Some versions do not even contain alloca or
15125# contain a buggy version. If you still want to use their alloca,
15126# use ar to extract alloca.o from them instead of compiling alloca.c.
15127
d6e01aa5 15128ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15129
c0d27fcc 15130cat >>confdefs.h <<\_ACEOF
98418dba 15131#define C_ALLOCA 1
c0d27fcc 15132_ACEOF
98418dba 15133
c0d27fcc 15134
d6e01aa5
KL
15135{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15136echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15137if test "${ac_cv_os_cray+set}" = set; then
15138 echo $ECHO_N "(cached) $ECHO_C" >&6
15139else
15140 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15141/* confdefs.h. */
15142_ACEOF
15143cat confdefs.h >>conftest.$ac_ext
15144cat >>conftest.$ac_ext <<_ACEOF
15145/* end confdefs.h. */
d6e01aa5 15146#if defined CRAY && ! defined CRAY2
98418dba
CW
15147webecray
15148#else
15149wenotbecray
15150#endif
15151
15152_ACEOF
15153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15154 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15155 ac_cv_os_cray=yes
15156else
15157 ac_cv_os_cray=no
15158fi
15159rm -f conftest*
ac95a621 15160
98418dba 15161fi
d6e01aa5
KL
15162{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15163echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15164if test $ac_cv_os_cray = yes; then
15165 for ac_func in _getb67 GETB67 getb67; do
15166 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15167{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15169if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15170 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15171else
503d2be0 15172 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15173/* confdefs.h. */
15174_ACEOF
15175cat confdefs.h >>conftest.$ac_ext
15176cat >>conftest.$ac_ext <<_ACEOF
15177/* end confdefs.h. */
edfaf76d
LK
15178/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15180#define $ac_func innocuous_$ac_func
15181
73b77ee5 15182/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15183 which can conflict with char $ac_func (); below.
15184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15185 <limits.h> exists even on freestanding compilers. */
edfaf76d 15186
19650fd6
AS
15187#ifdef __STDC__
15188# include <limits.h>
15189#else
15190# include <assert.h>
15191#endif
edfaf76d
LK
15192
15193#undef $ac_func
15194
d6e01aa5
KL
15195/* Override any GCC internal prototype to avoid an error.
15196 Use char because int might match the return type of a GCC
15197 builtin and then its argument prototype would still apply. */
503d2be0
AS
15198#ifdef __cplusplus
15199extern "C"
15200#endif
503d2be0 15201char $ac_func ();
73b77ee5
GM
15202/* The GNU C library defines this for functions which it implements
15203 to always fail with ENOSYS. Some functions are actually named
15204 something starting with __ and the normal name is an alias. */
d6e01aa5 15205#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15206choke me
73b77ee5
GM
15207#endif
15208
19650fd6
AS
15209int
15210main ()
15211{
d6e01aa5 15212return $ac_func ();
503d2be0
AS
15213 ;
15214 return 0;
15215}
15216_ACEOF
15217rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15218if { (ac_try="$ac_link"
15219case "(($ac_try" in
15220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15221 *) ac_try_echo=$ac_try;;
15222esac
15223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15224 (eval "$ac_link") 2>conftest.er1
503d2be0 15225 ac_status=$?
edfaf76d
LK
15226 grep -v '^ *+' conftest.er1 >conftest.err
15227 rm -f conftest.er1
15228 cat conftest.err >&5
c0d27fcc 15229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15230 (exit $ac_status); } && {
15231 test -z "$ac_c_werror_flag" ||
15232 test ! -s conftest.err
15233 } && test -s conftest$ac_exeext &&
15234 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15235 eval "$as_ac_var=yes"
15236else
15237 echo "$as_me: failed program was:" >&5
19650fd6
AS
15238sed 's/^/| /' conftest.$ac_ext >&5
15239
d6e01aa5 15240 eval "$as_ac_var=no"
503d2be0 15241fi
d6e01aa5
KL
15242
15243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15244 conftest$ac_exeext conftest.$ac_ext
503d2be0 15245fi
d6e01aa5
KL
15246ac_res=`eval echo '${'$as_ac_var'}'`
15247 { echo "$as_me:$LINENO: result: $ac_res" >&5
15248echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15249if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15250
c0d27fcc 15251cat >>confdefs.h <<_ACEOF
98418dba 15252#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15253_ACEOF
98418dba
CW
15254
15255 break
73b77ee5 15256fi
73b77ee5 15257
98418dba 15258 done
73b77ee5
GM
15259fi
15260
d6e01aa5
KL
15261{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15262echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15263if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15264 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15265else
15266 if test "$cross_compiling" = yes; then
15267 ac_cv_c_stack_direction=0
73b77ee5 15268else
503d2be0 15269 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15270/* confdefs.h. */
15271_ACEOF
15272cat confdefs.h >>conftest.$ac_ext
15273cat >>conftest.$ac_ext <<_ACEOF
15274/* end confdefs.h. */
d6e01aa5 15275$ac_includes_default
503d2be0 15276int
98418dba 15277find_stack_direction ()
503d2be0 15278{
98418dba
CW
15279 static char *addr = 0;
15280 auto char dummy;
15281 if (addr == 0)
15282 {
15283 addr = &dummy;
15284 return find_stack_direction ();
15285 }
73b77ee5 15286 else
98418dba
CW
15287 return (&dummy > addr) ? 1 : -1;
15288}
ba4481b5 15289
503d2be0
AS
15290int
15291main ()
15292{
d6e01aa5 15293 return find_stack_direction () < 0;
503d2be0
AS
15294}
15295_ACEOF
98418dba 15296rm -f conftest$ac_exeext
d6e01aa5
KL
15297if { (ac_try="$ac_link"
15298case "(($ac_try" in
15299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15300 *) ac_try_echo=$ac_try;;
15301esac
15302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15303 (eval "$ac_link") 2>&5
503d2be0 15304 ac_status=$?
c0d27fcc 15305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
15307 { (case "(($ac_try" in
15308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15309 *) ac_try_echo=$ac_try;;
15310esac
15311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15312 (eval "$ac_try") 2>&5
503d2be0 15313 ac_status=$?
c0d27fcc 15314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15315 (exit $ac_status); }; }; then
98418dba 15316 ac_cv_c_stack_direction=1
ba4481b5 15317else
98418dba
CW
15318 echo "$as_me: program exited with status $ac_status" >&5
15319echo "$as_me: failed program was:" >&5
19650fd6
AS
15320sed 's/^/| /' conftest.$ac_ext >&5
15321
c0d27fcc 15322( exit $ac_status )
98418dba 15323ac_cv_c_stack_direction=-1
ba4481b5 15324fi
d6e01aa5 15325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15326fi
d6e01aa5
KL
15327
15328
98418dba 15329fi
d6e01aa5
KL
15330{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15331echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15332
c0d27fcc 15333cat >>confdefs.h <<_ACEOF
98418dba 15334#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15335_ACEOF
15336
ba4481b5 15337
ba4481b5
DL
15338fi
15339
c0d27fcc 15340
611adb3e
GM
15341if test x"$ac_cv_func_alloca_works" != xyes; then
15342 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15343echo "$as_me: error: a system implementation of alloca is required " >&2;}
15344 { (exit 1); exit 1; }; }
15345fi
15346
98418dba
CW
15347# fmod, logb, and frexp are found in -lm on most systems.
15348# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15349
d6e01aa5
KL
15350{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15351echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15352if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15353 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15354else
98418dba
CW
15355 ac_check_lib_save_LIBS=$LIBS
15356LIBS="-lm $LIBS"
15357cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15358/* confdefs.h. */
15359_ACEOF
15360cat confdefs.h >>conftest.$ac_ext
15361cat >>conftest.$ac_ext <<_ACEOF
15362/* end confdefs.h. */
ba4481b5 15363
d6e01aa5
KL
15364/* Override any GCC internal prototype to avoid an error.
15365 Use char because int might match the return type of a GCC
15366 builtin and then its argument prototype would still apply. */
98418dba
CW
15367#ifdef __cplusplus
15368extern "C"
15369#endif
98418dba 15370char sqrt ();
503d2be0
AS
15371int
15372main ()
15373{
d6e01aa5 15374return sqrt ();
503d2be0
AS
15375 ;
15376 return 0;
15377}
15378_ACEOF
15379rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15380if { (ac_try="$ac_link"
15381case "(($ac_try" in
15382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15383 *) ac_try_echo=$ac_try;;
15384esac
15385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15386 (eval "$ac_link") 2>conftest.er1
503d2be0 15387 ac_status=$?
edfaf76d
LK
15388 grep -v '^ *+' conftest.er1 >conftest.err
15389 rm -f conftest.er1
15390 cat conftest.err >&5
c0d27fcc 15391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15392 (exit $ac_status); } && {
15393 test -z "$ac_c_werror_flag" ||
15394 test ! -s conftest.err
15395 } && test -s conftest$ac_exeext &&
15396 $as_test_x conftest$ac_exeext; then
98418dba 15397 ac_cv_lib_m_sqrt=yes
ba4481b5 15398else
503d2be0 15399 echo "$as_me: failed program was:" >&5
19650fd6
AS
15400sed 's/^/| /' conftest.$ac_ext >&5
15401
d6e01aa5 15402 ac_cv_lib_m_sqrt=no
ba4481b5 15403fi
d6e01aa5
KL
15404
15405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15406 conftest$ac_exeext conftest.$ac_ext
98418dba 15407LIBS=$ac_check_lib_save_LIBS
ba4481b5 15408fi
d6e01aa5
KL
15409{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15410echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15411if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15412 cat >>confdefs.h <<_ACEOF
98418dba 15413#define HAVE_LIBM 1
c0d27fcc 15414_ACEOF
98418dba
CW
15415
15416 LIBS="-lm $LIBS"
ba4481b5 15417
ba4481b5
DL
15418fi
15419
c0d27fcc 15420
55597d70
DL
15421# Check for mail-locking functions in a "mail" library. Probably this should
15422# have the same check as for liblockfile below.
98418dba 15423
d6e01aa5
KL
15424{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15425echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15426if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15427 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15428else
98418dba
CW
15429 ac_check_lib_save_LIBS=$LIBS
15430LIBS="-lmail $LIBS"
15431cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15432/* confdefs.h. */
15433_ACEOF
15434cat confdefs.h >>conftest.$ac_ext
15435cat >>conftest.$ac_ext <<_ACEOF
15436/* end confdefs.h. */
98418dba 15437
d6e01aa5
KL
15438/* Override any GCC internal prototype to avoid an error.
15439 Use char because int might match the return type of a GCC
15440 builtin and then its argument prototype would still apply. */
98418dba
CW
15441#ifdef __cplusplus
15442extern "C"
15443#endif
98418dba 15444char maillock ();
503d2be0
AS
15445int
15446main ()
15447{
d6e01aa5 15448return maillock ();
503d2be0
AS
15449 ;
15450 return 0;
15451}
15452_ACEOF
15453rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15454if { (ac_try="$ac_link"
15455case "(($ac_try" in
15456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15457 *) ac_try_echo=$ac_try;;
15458esac
15459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15460 (eval "$ac_link") 2>conftest.er1
503d2be0 15461 ac_status=$?
edfaf76d
LK
15462 grep -v '^ *+' conftest.er1 >conftest.err
15463 rm -f conftest.er1
15464 cat conftest.err >&5
c0d27fcc 15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15466 (exit $ac_status); } && {
15467 test -z "$ac_c_werror_flag" ||
15468 test ! -s conftest.err
15469 } && test -s conftest$ac_exeext &&
15470 $as_test_x conftest$ac_exeext; then
98418dba 15471 ac_cv_lib_mail_maillock=yes
ba4481b5 15472else
503d2be0 15473 echo "$as_me: failed program was:" >&5
19650fd6
AS
15474sed 's/^/| /' conftest.$ac_ext >&5
15475
d6e01aa5 15476 ac_cv_lib_mail_maillock=no
ba4481b5 15477fi
d6e01aa5
KL
15478
15479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15480 conftest$ac_exeext conftest.$ac_ext
98418dba 15481LIBS=$ac_check_lib_save_LIBS
ba4481b5 15482fi
d6e01aa5
KL
15483{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15484echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15485if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15486 cat >>confdefs.h <<_ACEOF
98418dba 15487#define HAVE_LIBMAIL 1
c0d27fcc 15488_ACEOF
ba4481b5 15489
98418dba 15490 LIBS="-lmail $LIBS"
ba4481b5 15491
98418dba 15492fi
ba4481b5 15493
c0d27fcc 15494
d6e01aa5
KL
15495{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15496echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15497if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15498 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15499else
503d2be0 15500 ac_check_lib_save_LIBS=$LIBS
98418dba 15501LIBS="-llockfile $LIBS"
503d2be0 15502cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15503/* confdefs.h. */
15504_ACEOF
15505cat confdefs.h >>conftest.$ac_ext
15506cat >>conftest.$ac_ext <<_ACEOF
15507/* end confdefs.h. */
503d2be0 15508
d6e01aa5
KL
15509/* Override any GCC internal prototype to avoid an error.
15510 Use char because int might match the return type of a GCC
15511 builtin and then its argument prototype would still apply. */
503d2be0
AS
15512#ifdef __cplusplus
15513extern "C"
15514#endif
98418dba 15515char maillock ();
503d2be0
AS
15516int
15517main ()
15518{
d6e01aa5 15519return maillock ();
503d2be0
AS
15520 ;
15521 return 0;
15522}
15523_ACEOF
15524rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15525if { (ac_try="$ac_link"
15526case "(($ac_try" in
15527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15528 *) ac_try_echo=$ac_try;;
15529esac
15530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15531 (eval "$ac_link") 2>conftest.er1
503d2be0 15532 ac_status=$?
edfaf76d
LK
15533 grep -v '^ *+' conftest.er1 >conftest.err
15534 rm -f conftest.er1
15535 cat conftest.err >&5
c0d27fcc 15536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15537 (exit $ac_status); } && {
15538 test -z "$ac_c_werror_flag" ||
15539 test ! -s conftest.err
15540 } && test -s conftest$ac_exeext &&
15541 $as_test_x conftest$ac_exeext; then
98418dba 15542 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15543else
15544 echo "$as_me: failed program was:" >&5
19650fd6
AS
15545sed 's/^/| /' conftest.$ac_ext >&5
15546
d6e01aa5 15547 ac_cv_lib_lockfile_maillock=no
98418dba 15548fi
d6e01aa5
KL
15549
15550rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15551 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15552LIBS=$ac_check_lib_save_LIBS
15553fi
d6e01aa5
KL
15554{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15555echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15556if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15557 cat >>confdefs.h <<_ACEOF
98418dba 15558#define HAVE_LIBLOCKFILE 1
c0d27fcc 15559_ACEOF
98418dba
CW
15560
15561 LIBS="-llockfile $LIBS"
15562
15563fi
15564
15565# If we have the shared liblockfile, assume we must use it for mail
15566# locking (e.g. Debian). If we couldn't link against liblockfile
15567# (no liblockfile.a installed), ensure that we don't need to.
15568if test "$ac_cv_lib_lockfile_maillock" = no; then
15569 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15570set dummy liblockfile.so; ac_word=$2
d6e01aa5
KL
15571{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15572echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15573if test "${ac_cv_prog_liblockfile+set}" = set; then
15574 echo $ECHO_N "(cached) $ECHO_C" >&6
15575else
15576 if test -n "$liblockfile"; then
15577 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15578else
c0d27fcc 15579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15580as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15581for as_dir in $as_dummy
c0d27fcc
MR
15582do
15583 IFS=$as_save_IFS
15584 test -z "$as_dir" && as_dir=.
15585 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 15586 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15587 ac_cv_prog_liblockfile="yes"
15588 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15589 break 2
15590 fi
15591done
98418dba 15592done
d6e01aa5 15593IFS=$as_save_IFS
98418dba
CW
15594
15595 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15596fi
503d2be0 15597fi
98418dba
CW
15598liblockfile=$ac_cv_prog_liblockfile
15599if test -n "$liblockfile"; then
d6e01aa5
KL
15600 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15601echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15602else
d6e01aa5
KL
15603 { echo "$as_me:$LINENO: result: no" >&5
15604echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15605fi
15606
d6e01aa5 15607
98418dba 15608 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15609 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15610This probably means that movemail could lose mail.
15611There may be a \`development' package to install containing liblockfile." >&5
15612echo "$as_me: error: Shared liblockfile found but can't link against it.
15613This probably means that movemail could lose mail.
15614There may be a \`development' package to install containing liblockfile." >&2;}
15615 { (exit 1); exit 1; }; }
98418dba 15616 else :
55597d70 15617 fi
98418dba 15618fi
503d2be0 15619
98418dba
CW
15620for ac_func in touchlock
15621do
15622as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15623{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15624echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15625if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15626 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15627else
98418dba 15628 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15629/* confdefs.h. */
15630_ACEOF
15631cat confdefs.h >>conftest.$ac_ext
15632cat >>conftest.$ac_ext <<_ACEOF
15633/* end confdefs.h. */
edfaf76d
LK
15634/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15635 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15636#define $ac_func innocuous_$ac_func
15637
98418dba 15638/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15639 which can conflict with char $ac_func (); below.
15640 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15641 <limits.h> exists even on freestanding compilers. */
edfaf76d 15642
19650fd6
AS
15643#ifdef __STDC__
15644# include <limits.h>
15645#else
15646# include <assert.h>
15647#endif
edfaf76d
LK
15648
15649#undef $ac_func
15650
d6e01aa5
KL
15651/* Override any GCC internal prototype to avoid an error.
15652 Use char because int might match the return type of a GCC
15653 builtin and then its argument prototype would still apply. */
503d2be0
AS
15654#ifdef __cplusplus
15655extern "C"
15656#endif
98418dba 15657char $ac_func ();
98418dba
CW
15658/* The GNU C library defines this for functions which it implements
15659 to always fail with ENOSYS. Some functions are actually named
15660 something starting with __ and the normal name is an alias. */
d6e01aa5 15661#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15662choke me
cd958eb3
MB
15663#endif
15664
19650fd6
AS
15665int
15666main ()
15667{
d6e01aa5 15668return $ac_func ();
503d2be0
AS
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15674if { (ac_try="$ac_link"
15675case "(($ac_try" in
15676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15677 *) ac_try_echo=$ac_try;;
15678esac
15679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15680 (eval "$ac_link") 2>conftest.er1
503d2be0 15681 ac_status=$?
edfaf76d
LK
15682 grep -v '^ *+' conftest.er1 >conftest.err
15683 rm -f conftest.er1
15684 cat conftest.err >&5
c0d27fcc 15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15686 (exit $ac_status); } && {
15687 test -z "$ac_c_werror_flag" ||
15688 test ! -s conftest.err
15689 } && test -s conftest$ac_exeext &&
15690 $as_test_x conftest$ac_exeext; then
98418dba 15691 eval "$as_ac_var=yes"
503d2be0
AS
15692else
15693 echo "$as_me: failed program was:" >&5
19650fd6
AS
15694sed 's/^/| /' conftest.$ac_ext >&5
15695
d6e01aa5 15696 eval "$as_ac_var=no"
503d2be0 15697fi
d6e01aa5
KL
15698
15699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15700 conftest$ac_exeext conftest.$ac_ext
503d2be0 15701fi
d6e01aa5
KL
15702ac_res=`eval echo '${'$as_ac_var'}'`
15703 { echo "$as_me:$LINENO: result: $ac_res" >&5
15704echo "${ECHO_T}$ac_res" >&6; }
98418dba 15705if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15706 cat >>confdefs.h <<_ACEOF
98418dba 15707#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15708_ACEOF
457b792c 15709
457b792c 15710fi
98418dba 15711done
457b792c 15712
c0d27fcc 15713
98418dba
CW
15714for ac_header in maillock.h
15715do
15716as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15717if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15718 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15719echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15720if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15721 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15722fi
d6e01aa5
KL
15723ac_res=`eval echo '${'$as_ac_Header'}'`
15724 { echo "$as_me:$LINENO: result: $ac_res" >&5
15725echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15726else
c0d27fcc 15727 # Is the header compilable?
d6e01aa5
KL
15728{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15729echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15730cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15731/* confdefs.h. */
15732_ACEOF
15733cat confdefs.h >>conftest.$ac_ext
15734cat >>conftest.$ac_ext <<_ACEOF
15735/* end confdefs.h. */
c0d27fcc
MR
15736$ac_includes_default
15737#include <$ac_header>
15738_ACEOF
15739rm -f conftest.$ac_objext
d6e01aa5
KL
15740if { (ac_try="$ac_compile"
15741case "(($ac_try" in
15742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15743 *) ac_try_echo=$ac_try;;
15744esac
15745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15746 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15747 ac_status=$?
edfaf76d
LK
15748 grep -v '^ *+' conftest.er1 >conftest.err
15749 rm -f conftest.er1
15750 cat conftest.err >&5
c0d27fcc 15751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15752 (exit $ac_status); } && {
15753 test -z "$ac_c_werror_flag" ||
15754 test ! -s conftest.err
15755 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15756 ac_header_compiler=yes
15757else
15758 echo "$as_me: failed program was:" >&5
19650fd6
AS
15759sed 's/^/| /' conftest.$ac_ext >&5
15760
d6e01aa5 15761 ac_header_compiler=no
c0d27fcc 15762fi
d6e01aa5
KL
15763
15764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15765{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15766echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15767
15768# Is the header present?
d6e01aa5
KL
15769{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15770echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15771cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15772/* confdefs.h. */
15773_ACEOF
15774cat confdefs.h >>conftest.$ac_ext
15775cat >>conftest.$ac_ext <<_ACEOF
15776/* end confdefs.h. */
98418dba 15777#include <$ac_header>
503d2be0 15778_ACEOF
d6e01aa5
KL
15779if { (ac_try="$ac_cpp conftest.$ac_ext"
15780case "(($ac_try" in
15781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15782 *) ac_try_echo=$ac_try;;
15783esac
15784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15785 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15786 ac_status=$?
6bae0ccf 15787 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15788 rm -f conftest.er1
15789 cat conftest.err >&5
c0d27fcc 15790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15791 (exit $ac_status); } >/dev/null && {
15792 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15793 test ! -s conftest.err
15794 }; then
c0d27fcc 15795 ac_header_preproc=yes
98418dba
CW
15796else
15797 echo "$as_me: failed program was:" >&5
19650fd6
AS
15798sed 's/^/| /' conftest.$ac_ext >&5
15799
c0d27fcc 15800 ac_header_preproc=no
503d2be0 15801fi
d6e01aa5 15802
98418dba 15803rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15804{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15805echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15806
15807# So? What about this header?
edfaf76d
LK
15808case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15809 yes:no: )
c0d27fcc
MR
15810 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15811echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15812 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15813echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15814 ac_header_preproc=yes
19650fd6 15815 ;;
edfaf76d 15816 no:yes:* )
c0d27fcc
MR
15817 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15818echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15819 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15820echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15821 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15822echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15823 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15824echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15825 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15826echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15827 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15828echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15829
19650fd6 15830 ;;
c0d27fcc 15831esac
d6e01aa5
KL
15832{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15833echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15834if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15835 echo $ECHO_N "(cached) $ECHO_C" >&6
15836else
edfaf76d 15837 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15838fi
d6e01aa5
KL
15839ac_res=`eval echo '${'$as_ac_Header'}'`
15840 { echo "$as_me:$LINENO: result: $ac_res" >&5
15841echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15842
15843fi
98418dba 15844if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15845 cat >>confdefs.h <<_ACEOF
98418dba 15846#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15847_ACEOF
48d4b120 15848
ba4481b5 15849fi
c0d27fcc 15850
98418dba
CW
15851done
15852
c0d27fcc
MR
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
22044edf
DL
15908
15909
c0d27fcc 15910
b0e44248
RB
15911
15912
973a76b1
DL
15913
15914
15915
cd958eb3 15916
25ca0bca 15917
ea92fc9f 15918
e2fcf543 15919
190956b3 15920
c0d27fcc
MR
15921
15922
98418dba 15923for ac_func in gethostname getdomainname dup2 \
e2fcf543 15924rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
15925random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
15926strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15927utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15928__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15929sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15930gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15931memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15932do
15933as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15934{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15935echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15936if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15937 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15938else
503d2be0 15939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15940/* confdefs.h. */
15941_ACEOF
15942cat confdefs.h >>conftest.$ac_ext
15943cat >>conftest.$ac_ext <<_ACEOF
15944/* end confdefs.h. */
edfaf76d
LK
15945/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15946 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15947#define $ac_func innocuous_$ac_func
15948
98418dba 15949/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15950 which can conflict with char $ac_func (); below.
15951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15952 <limits.h> exists even on freestanding compilers. */
edfaf76d 15953
19650fd6
AS
15954#ifdef __STDC__
15955# include <limits.h>
15956#else
15957# include <assert.h>
15958#endif
edfaf76d
LK
15959
15960#undef $ac_func
15961
d6e01aa5
KL
15962/* Override any GCC internal prototype to avoid an error.
15963 Use char because int might match the return type of a GCC
15964 builtin and then its argument prototype would still apply. */
503d2be0
AS
15965#ifdef __cplusplus
15966extern "C"
15967#endif
98418dba 15968char $ac_func ();
98418dba
CW
15969/* The GNU C library defines this for functions which it implements
15970 to always fail with ENOSYS. Some functions are actually named
15971 something starting with __ and the normal name is an alias. */
d6e01aa5 15972#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15973choke me
98418dba
CW
15974#endif
15975
19650fd6
AS
15976int
15977main ()
15978{
d6e01aa5 15979return $ac_func ();
503d2be0
AS
15980 ;
15981 return 0;
15982}
15983_ACEOF
15984rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15985if { (ac_try="$ac_link"
15986case "(($ac_try" in
15987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15988 *) ac_try_echo=$ac_try;;
15989esac
15990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15991 (eval "$ac_link") 2>conftest.er1
503d2be0 15992 ac_status=$?
edfaf76d
LK
15993 grep -v '^ *+' conftest.er1 >conftest.err
15994 rm -f conftest.er1
15995 cat conftest.err >&5
c0d27fcc 15996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15997 (exit $ac_status); } && {
15998 test -z "$ac_c_werror_flag" ||
15999 test ! -s conftest.err
16000 } && test -s conftest$ac_exeext &&
16001 $as_test_x conftest$ac_exeext; then
98418dba 16002 eval "$as_ac_var=yes"
503d2be0
AS
16003else
16004 echo "$as_me: failed program was:" >&5
19650fd6
AS
16005sed 's/^/| /' conftest.$ac_ext >&5
16006
d6e01aa5 16007 eval "$as_ac_var=no"
503d2be0 16008fi
d6e01aa5
KL
16009
16010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16011 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16012fi
d6e01aa5
KL
16013ac_res=`eval echo '${'$as_ac_var'}'`
16014 { echo "$as_me:$LINENO: result: $ac_res" >&5
16015echo "${ECHO_T}$ac_res" >&6; }
98418dba 16016if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16017 cat >>confdefs.h <<_ACEOF
98418dba 16018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16019_ACEOF
ba4481b5 16020
ba4481b5 16021fi
98418dba 16022done
ba4481b5 16023
c0d27fcc
MR
16024
16025
98418dba
CW
16026for ac_header in sys/un.h
16027do
16028as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
16029if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16030 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16031echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16032if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16033 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16034fi
d6e01aa5
KL
16035ac_res=`eval echo '${'$as_ac_Header'}'`
16036 { echo "$as_me:$LINENO: result: $ac_res" >&5
16037echo "${ECHO_T}$ac_res" >&6; }
98418dba 16038else
c0d27fcc 16039 # Is the header compilable?
d6e01aa5
KL
16040{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16041echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
c0d27fcc
MR
16048$ac_includes_default
16049#include <$ac_header>
16050_ACEOF
16051rm -f conftest.$ac_objext
d6e01aa5
KL
16052if { (ac_try="$ac_compile"
16053case "(($ac_try" in
16054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16055 *) ac_try_echo=$ac_try;;
16056esac
16057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16058 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16059 ac_status=$?
edfaf76d
LK
16060 grep -v '^ *+' conftest.er1 >conftest.err
16061 rm -f conftest.er1
16062 cat conftest.err >&5
c0d27fcc 16063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16064 (exit $ac_status); } && {
16065 test -z "$ac_c_werror_flag" ||
16066 test ! -s conftest.err
16067 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16068 ac_header_compiler=yes
16069else
16070 echo "$as_me: failed program was:" >&5
19650fd6
AS
16071sed 's/^/| /' conftest.$ac_ext >&5
16072
d6e01aa5 16073 ac_header_compiler=no
c0d27fcc 16074fi
d6e01aa5
KL
16075
16076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16078echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16079
16080# Is the header present?
d6e01aa5
KL
16081{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16082echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16084/* confdefs.h. */
16085_ACEOF
16086cat confdefs.h >>conftest.$ac_ext
16087cat >>conftest.$ac_ext <<_ACEOF
16088/* end confdefs.h. */
98418dba 16089#include <$ac_header>
503d2be0 16090_ACEOF
d6e01aa5
KL
16091if { (ac_try="$ac_cpp conftest.$ac_ext"
16092case "(($ac_try" in
16093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16094 *) ac_try_echo=$ac_try;;
16095esac
16096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16098 ac_status=$?
6bae0ccf 16099 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16100 rm -f conftest.er1
16101 cat conftest.err >&5
c0d27fcc 16102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16103 (exit $ac_status); } >/dev/null && {
16104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16105 test ! -s conftest.err
16106 }; then
c0d27fcc 16107 ac_header_preproc=yes
ba4481b5 16108else
503d2be0 16109 echo "$as_me: failed program was:" >&5
19650fd6
AS
16110sed 's/^/| /' conftest.$ac_ext >&5
16111
c0d27fcc 16112 ac_header_preproc=no
ba4481b5 16113fi
d6e01aa5 16114
503d2be0 16115rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16117echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16118
16119# So? What about this header?
edfaf76d
LK
16120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16121 yes:no: )
c0d27fcc
MR
16122 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16123echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16124 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16125echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16126 ac_header_preproc=yes
19650fd6 16127 ;;
edfaf76d 16128 no:yes:* )
c0d27fcc
MR
16129 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16130echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16131 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16132echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16133 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16134echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16135 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16136echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16137 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16138echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16139 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16140echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16141
19650fd6 16142 ;;
c0d27fcc 16143esac
d6e01aa5
KL
16144{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16146if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16147 echo $ECHO_N "(cached) $ECHO_C" >&6
16148else
edfaf76d 16149 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16150fi
d6e01aa5
KL
16151ac_res=`eval echo '${'$as_ac_Header'}'`
16152 { echo "$as_me:$LINENO: result: $ac_res" >&5
16153echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16154
16155fi
925c2f3f 16156if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16157 cat >>confdefs.h <<_ACEOF
925c2f3f 16158#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16159_ACEOF
503d2be0 16160
925c2f3f 16161fi
c0d27fcc 16162
925c2f3f
EZ
16163done
16164
c0d27fcc
MR
16165
16166
16167
edfaf76d 16168
d6e01aa5
KL
16169
16170for ac_header in $ac_header_list
925c2f3f
EZ
16171do
16172as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
16173if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16174 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16175echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16176if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16177 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16178fi
d6e01aa5
KL
16179ac_res=`eval echo '${'$as_ac_Header'}'`
16180 { echo "$as_me:$LINENO: result: $ac_res" >&5
16181echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16182else
c0d27fcc 16183 # Is the header compilable?
d6e01aa5
KL
16184{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16185echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16186cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16187/* confdefs.h. */
16188_ACEOF
16189cat confdefs.h >>conftest.$ac_ext
16190cat >>conftest.$ac_ext <<_ACEOF
16191/* end confdefs.h. */
c0d27fcc
MR
16192$ac_includes_default
16193#include <$ac_header>
16194_ACEOF
16195rm -f conftest.$ac_objext
d6e01aa5
KL
16196if { (ac_try="$ac_compile"
16197case "(($ac_try" in
16198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16199 *) ac_try_echo=$ac_try;;
16200esac
16201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16202 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16203 ac_status=$?
edfaf76d
LK
16204 grep -v '^ *+' conftest.er1 >conftest.err
16205 rm -f conftest.er1
16206 cat conftest.err >&5
c0d27fcc 16207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16208 (exit $ac_status); } && {
16209 test -z "$ac_c_werror_flag" ||
16210 test ! -s conftest.err
16211 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16212 ac_header_compiler=yes
16213else
16214 echo "$as_me: failed program was:" >&5
19650fd6
AS
16215sed 's/^/| /' conftest.$ac_ext >&5
16216
d6e01aa5 16217 ac_header_compiler=no
c0d27fcc 16218fi
d6e01aa5
KL
16219
16220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16222echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16223
16224# Is the header present?
d6e01aa5
KL
16225{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16226echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16228/* confdefs.h. */
16229_ACEOF
16230cat confdefs.h >>conftest.$ac_ext
16231cat >>conftest.$ac_ext <<_ACEOF
16232/* end confdefs.h. */
98418dba 16233#include <$ac_header>
503d2be0 16234_ACEOF
d6e01aa5
KL
16235if { (ac_try="$ac_cpp conftest.$ac_ext"
16236case "(($ac_try" in
16237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16238 *) ac_try_echo=$ac_try;;
16239esac
16240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16241 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16242 ac_status=$?
6bae0ccf 16243 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16244 rm -f conftest.er1
16245 cat conftest.err >&5
c0d27fcc 16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16247 (exit $ac_status); } >/dev/null && {
16248 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16249 test ! -s conftest.err
16250 }; then
c0d27fcc 16251 ac_header_preproc=yes
98418dba
CW
16252else
16253 echo "$as_me: failed program was:" >&5
19650fd6
AS
16254sed 's/^/| /' conftest.$ac_ext >&5
16255
c0d27fcc 16256 ac_header_preproc=no
98418dba 16257fi
d6e01aa5 16258
98418dba 16259rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16260{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16261echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16262
16263# So? What about this header?
edfaf76d
LK
16264case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16265 yes:no: )
c0d27fcc
MR
16266 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16267echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16268 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16269echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16270 ac_header_preproc=yes
19650fd6 16271 ;;
edfaf76d 16272 no:yes:* )
c0d27fcc
MR
16273 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16274echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16275 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16276echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16277 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16278echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16279 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16280echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16281 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16282echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16283 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16284echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16285
19650fd6 16286 ;;
c0d27fcc 16287esac
d6e01aa5
KL
16288{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16289echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16290if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16291 echo $ECHO_N "(cached) $ECHO_C" >&6
16292else
edfaf76d 16293 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16294fi
d6e01aa5
KL
16295ac_res=`eval echo '${'$as_ac_Header'}'`
16296 { echo "$as_me:$LINENO: result: $ac_res" >&5
16297echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16298
16299fi
98418dba 16300if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16301 cat >>confdefs.h <<_ACEOF
98418dba 16302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16303_ACEOF
98418dba
CW
16304
16305fi
c0d27fcc 16306
98418dba
CW
16307done
16308
c0d27fcc 16309
d6e01aa5
KL
16310
16311
16312
16313
16314
16315
16316
16317for ac_func in $ac_func_list
98418dba
CW
16318do
16319as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16320{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16321echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16322if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16323 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16324else
98418dba 16325 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16326/* confdefs.h. */
16327_ACEOF
16328cat confdefs.h >>conftest.$ac_ext
16329cat >>conftest.$ac_ext <<_ACEOF
16330/* end confdefs.h. */
edfaf76d
LK
16331/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16332 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16333#define $ac_func innocuous_$ac_func
16334
98418dba 16335/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16336 which can conflict with char $ac_func (); below.
16337 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16338 <limits.h> exists even on freestanding compilers. */
edfaf76d 16339
19650fd6
AS
16340#ifdef __STDC__
16341# include <limits.h>
16342#else
16343# include <assert.h>
16344#endif
edfaf76d
LK
16345
16346#undef $ac_func
16347
d6e01aa5
KL
16348/* Override any GCC internal prototype to avoid an error.
16349 Use char because int might match the return type of a GCC
16350 builtin and then its argument prototype would still apply. */
503d2be0
AS
16351#ifdef __cplusplus
16352extern "C"
16353#endif
98418dba 16354char $ac_func ();
98418dba
CW
16355/* The GNU C library defines this for functions which it implements
16356 to always fail with ENOSYS. Some functions are actually named
16357 something starting with __ and the normal name is an alias. */
d6e01aa5 16358#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16359choke me
98418dba
CW
16360#endif
16361
19650fd6
AS
16362int
16363main ()
16364{
d6e01aa5 16365return $ac_func ();
503d2be0
AS
16366 ;
16367 return 0;
16368}
16369_ACEOF
16370rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16371if { (ac_try="$ac_link"
16372case "(($ac_try" in
16373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16374 *) ac_try_echo=$ac_try;;
16375esac
16376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16377 (eval "$ac_link") 2>conftest.er1
503d2be0 16378 ac_status=$?
edfaf76d
LK
16379 grep -v '^ *+' conftest.er1 >conftest.err
16380 rm -f conftest.er1
16381 cat conftest.err >&5
c0d27fcc 16382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16383 (exit $ac_status); } && {
16384 test -z "$ac_c_werror_flag" ||
16385 test ! -s conftest.err
16386 } && test -s conftest$ac_exeext &&
16387 $as_test_x conftest$ac_exeext; then
98418dba 16388 eval "$as_ac_var=yes"
503d2be0
AS
16389else
16390 echo "$as_me: failed program was:" >&5
19650fd6
AS
16391sed 's/^/| /' conftest.$ac_ext >&5
16392
d6e01aa5 16393 eval "$as_ac_var=no"
503d2be0 16394fi
d6e01aa5
KL
16395
16396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16397 conftest$ac_exeext conftest.$ac_ext
ffe36136 16398fi
d6e01aa5
KL
16399ac_res=`eval echo '${'$as_ac_var'}'`
16400 { echo "$as_me:$LINENO: result: $ac_res" >&5
16401echo "${ECHO_T}$ac_res" >&6; }
98418dba 16402if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16403 cat >>confdefs.h <<_ACEOF
98418dba 16404#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16405_ACEOF
ffe36136 16406
ba4481b5 16407fi
98418dba 16408done
ba4481b5 16409
d6e01aa5
KL
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426{ echo "$as_me:$LINENO: checking for working mktime" >&5
16427echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16428if test "${ac_cv_func_working_mktime+set}" = set; then
16429 echo $ECHO_N "(cached) $ECHO_C" >&6
16430else
16431 if test "$cross_compiling" = yes; then
16432 ac_cv_func_working_mktime=no
16433else
16434 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16435/* confdefs.h. */
16436_ACEOF
16437cat confdefs.h >>conftest.$ac_ext
16438cat >>conftest.$ac_ext <<_ACEOF
16439/* end confdefs.h. */
98418dba 16440/* Test program from Paul Eggert and Tony Leneis. */
d6e01aa5 16441#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16442# include <sys/time.h>
16443# include <time.h>
16444#else
d6e01aa5 16445# ifdef HAVE_SYS_TIME_H
98418dba
CW
16446# include <sys/time.h>
16447# else
16448# include <time.h>
16449# endif
16450#endif
ba4481b5 16451
d6e01aa5 16452#include <stdlib.h>
edfaf76d 16453
d6e01aa5 16454#ifdef HAVE_UNISTD_H
98418dba
CW
16455# include <unistd.h>
16456#endif
ba4481b5 16457
d6e01aa5 16458#ifndef HAVE_ALARM
98418dba
CW
16459# define alarm(X) /* empty */
16460#endif
df645f7c 16461
98418dba
CW
16462/* Work around redefinition to rpl_putenv by other config tests. */
16463#undef putenv
df645f7c 16464
98418dba 16465static time_t time_t_max;
edfaf76d 16466static time_t time_t_min;
df645f7c 16467
98418dba 16468/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16469static char *tz_strings[] = {
16470 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16471 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16472};
16473#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16474
d6e01aa5 16475/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16476 Based on a problem report from Andreas Jaeger. */
d6e01aa5 16477static int
98418dba
CW
16478spring_forward_gap ()
16479{
16480 /* glibc (up to about 1998-10-07) failed this test. */
16481 struct tm tm;
16482
16483 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16484 instead of "TZ=America/Vancouver" in order to detect the bug even
16485 on systems that don't support the Olson extension, or don't have the
16486 full zoneinfo tables installed. */
16487 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16488
16489 tm.tm_year = 98;
16490 tm.tm_mon = 3;
16491 tm.tm_mday = 5;
16492 tm.tm_hour = 2;
16493 tm.tm_min = 0;
16494 tm.tm_sec = 0;
16495 tm.tm_isdst = -1;
d6e01aa5 16496 return mktime (&tm) != (time_t) -1;
98418dba
CW
16497}
16498
d6e01aa5 16499static int
edfaf76d 16500mktime_test1 (now)
98418dba
CW
16501 time_t now;
16502{
16503 struct tm *lt;
d6e01aa5 16504 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16505}
16506
d6e01aa5 16507static int
edfaf76d
LK
16508mktime_test (now)
16509 time_t now;
16510{
d6e01aa5
KL
16511 return (mktime_test1 (now)
16512 && mktime_test1 ((time_t) (time_t_max - now))
16513 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16514}
16515
d6e01aa5 16516static int
98418dba
CW
16517irix_6_4_bug ()
16518{
16519 /* Based on code from Ariel Faigon. */
16520 struct tm tm;
16521 tm.tm_year = 96;
16522 tm.tm_mon = 3;
16523 tm.tm_mday = 0;
16524 tm.tm_hour = 0;
16525 tm.tm_min = 0;
16526 tm.tm_sec = 0;
16527 tm.tm_isdst = -1;
16528 mktime (&tm);
d6e01aa5 16529 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16530}
16531
d6e01aa5 16532static int
98418dba
CW
16533bigtime_test (j)
16534 int j;
16535{
16536 struct tm tm;
16537 time_t now;
16538 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16539 now = mktime (&tm);
16540 if (now != (time_t) -1)
16541 {
16542 struct tm *lt = localtime (&now);
16543 if (! (lt
16544 && lt->tm_year == tm.tm_year
16545 && lt->tm_mon == tm.tm_mon
16546 && lt->tm_mday == tm.tm_mday
16547 && lt->tm_hour == tm.tm_hour
16548 && lt->tm_min == tm.tm_min
16549 && lt->tm_sec == tm.tm_sec
16550 && lt->tm_yday == tm.tm_yday
16551 && lt->tm_wday == tm.tm_wday
16552 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16553 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
d6e01aa5 16554 return 0;
98418dba 16555 }
d6e01aa5
KL
16556 return 1;
16557}
16558
16559static int
16560year_2050_test ()
16561{
16562 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16563 ignoring leap seconds. */
16564 unsigned long int answer = 2527315200UL;
16565
16566 struct tm tm;
16567 time_t t;
16568 tm.tm_year = 2050 - 1900;
16569 tm.tm_mon = 2 - 1;
16570 tm.tm_mday = 1;
16571 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16572 tm.tm_isdst = -1;
16573
16574 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16575 instead of "TZ=America/Vancouver" in order to detect the bug even
16576 on systems that don't support the Olson extension, or don't have the
16577 full zoneinfo tables installed. */
16578 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16579
16580 t = mktime (&tm);
16581
16582 /* Check that the result is either a failure, or close enough
16583 to the correct answer that we can assume the discrepancy is
16584 due to leap seconds. */
16585 return (t == (time_t) -1
16586 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16587}
16588
16589int
16590main ()
16591{
16592 time_t t, delta;
16593 int i, j;
16594
16595 /* This test makes some buggy mktime implementations loop.
16596 Give up after 60 seconds; a mktime slower than that
16597 isn't worth using anyway. */
16598 alarm (60);
16599
16600 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16601 continue;
16602 time_t_max--;
edfaf76d
LK
16603 if ((time_t) -1 < 0)
16604 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16605 continue;
98418dba
CW
16606 delta = time_t_max / 997; /* a suitable prime number */
16607 for (i = 0; i < N_STRINGS; i++)
16608 {
16609 if (tz_strings[i])
16610 putenv (tz_strings[i]);
503d2be0 16611
98418dba 16612 for (t = 0; t <= time_t_max - delta; t += delta)
d6e01aa5
KL
16613 if (! mktime_test (t))
16614 return 1;
16615 if (! (mktime_test ((time_t) 1)
16616 && mktime_test ((time_t) (60 * 60))
16617 && mktime_test ((time_t) (60 * 60 * 24))))
16618 return 1;
98418dba
CW
16619
16620 for (j = 1; 0 < j; j *= 2)
d6e01aa5
KL
16621 if (! bigtime_test (j))
16622 return 1;
16623 if (! bigtime_test (j - 1))
16624 return 1;
98418dba 16625 }
d6e01aa5 16626 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16627}
16628_ACEOF
98418dba 16629rm -f conftest$ac_exeext
d6e01aa5
KL
16630if { (ac_try="$ac_link"
16631case "(($ac_try" in
16632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16633 *) ac_try_echo=$ac_try;;
16634esac
16635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16636 (eval "$ac_link") 2>&5
503d2be0 16637 ac_status=$?
c0d27fcc 16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
16640 { (case "(($ac_try" in
16641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16642 *) ac_try_echo=$ac_try;;
16643esac
16644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16645 (eval "$ac_try") 2>&5
503d2be0 16646 ac_status=$?
c0d27fcc 16647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16648 (exit $ac_status); }; }; then
98418dba 16649 ac_cv_func_working_mktime=yes
503d2be0 16650else
98418dba
CW
16651 echo "$as_me: program exited with status $ac_status" >&5
16652echo "$as_me: failed program was:" >&5
19650fd6
AS
16653sed 's/^/| /' conftest.$ac_ext >&5
16654
c0d27fcc 16655( exit $ac_status )
98418dba 16656ac_cv_func_working_mktime=no
503d2be0 16657fi
d6e01aa5 16658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16659fi
d6e01aa5
KL
16660
16661
ba4481b5 16662fi
d6e01aa5
KL
16663{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16664echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16665if test $ac_cv_func_working_mktime = no; then
d6e01aa5 16666 case " $LIBOBJS " in
edfaf76d 16667 *" mktime.$ac_objext "* ) ;;
d6e01aa5
KL
16668 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16669 ;;
edfaf76d
LK
16670esac
16671
ba4481b5
DL
16672fi
16673
98418dba 16674if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16675
c0d27fcc 16676cat >>confdefs.h <<\_ACEOF
98418dba 16677#define BROKEN_MKTIME 1
c0d27fcc 16678_ACEOF
ba4481b5 16679
ba4481b5 16680fi
503d2be0 16681
98418dba
CW
16682ac_have_func=no # yes means we've found a way to get the load average.
16683
6bae0ccf
DL
16684# Make sure getloadavg.c is where it belongs, at configure-time.
16685test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16686 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16687echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16688 { (exit 1); exit 1; }; }
16689
98418dba
CW
16690ac_save_LIBS=$LIBS
16691
16692# Check for getloadavg, but be sure not to touch the cache variable.
d6e01aa5
KL
16693({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16694echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16695if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16696 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16697else
503d2be0 16698 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16699/* confdefs.h. */
16700_ACEOF
16701cat confdefs.h >>conftest.$ac_ext
16702cat >>conftest.$ac_ext <<_ACEOF
16703/* end confdefs.h. */
edfaf76d
LK
16704/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16705 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16706#define getloadavg innocuous_getloadavg
16707
98418dba 16708/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16709 which can conflict with char getloadavg (); below.
16710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16711 <limits.h> exists even on freestanding compilers. */
edfaf76d 16712
19650fd6
AS
16713#ifdef __STDC__
16714# include <limits.h>
16715#else
16716# include <assert.h>
16717#endif
edfaf76d
LK
16718
16719#undef getloadavg
16720
d6e01aa5
KL
16721/* Override any GCC internal prototype to avoid an error.
16722 Use char because int might match the return type of a GCC
16723 builtin and then its argument prototype would still apply. */
503d2be0
AS
16724#ifdef __cplusplus
16725extern "C"
16726#endif
98418dba 16727char getloadavg ();
98418dba
CW
16728/* The GNU C library defines this for functions which it implements
16729 to always fail with ENOSYS. Some functions are actually named
16730 something starting with __ and the normal name is an alias. */
d6e01aa5 16731#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16732choke me
cd958eb3
MB
16733#endif
16734
19650fd6
AS
16735int
16736main ()
16737{
d6e01aa5 16738return getloadavg ();
503d2be0
AS
16739 ;
16740 return 0;
16741}
16742_ACEOF
16743rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16744if { (ac_try="$ac_link"
16745case "(($ac_try" in
16746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16747 *) ac_try_echo=$ac_try;;
16748esac
16749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16750 (eval "$ac_link") 2>conftest.er1
503d2be0 16751 ac_status=$?
edfaf76d
LK
16752 grep -v '^ *+' conftest.er1 >conftest.err
16753 rm -f conftest.er1
16754 cat conftest.err >&5
c0d27fcc 16755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16756 (exit $ac_status); } && {
16757 test -z "$ac_c_werror_flag" ||
16758 test ! -s conftest.err
16759 } && test -s conftest$ac_exeext &&
16760 $as_test_x conftest$ac_exeext; then
98418dba 16761 ac_cv_func_getloadavg=yes
503d2be0
AS
16762else
16763 echo "$as_me: failed program was:" >&5
19650fd6
AS
16764sed 's/^/| /' conftest.$ac_ext >&5
16765
d6e01aa5 16766 ac_cv_func_getloadavg=no
503d2be0 16767fi
d6e01aa5
KL
16768
16769rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16770 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16771fi
d6e01aa5
KL
16772{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16773echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16774if test $ac_cv_func_getloadavg = yes; then
16775 exit 0
16776else
16777 exit 1
ba4481b5 16778fi
98418dba 16779) && ac_have_func=yes
ba4481b5 16780
98418dba 16781# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16782
98418dba
CW
16783for ac_func in pstat_getdynamic
16784do
16785as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16786{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16787echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16788if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16789 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16790else
503d2be0 16791 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16792/* confdefs.h. */
16793_ACEOF
16794cat confdefs.h >>conftest.$ac_ext
16795cat >>conftest.$ac_ext <<_ACEOF
16796/* end confdefs.h. */
edfaf76d
LK
16797/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16798 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16799#define $ac_func innocuous_$ac_func
16800
98418dba 16801/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16802 which can conflict with char $ac_func (); below.
16803 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16804 <limits.h> exists even on freestanding compilers. */
edfaf76d 16805
19650fd6
AS
16806#ifdef __STDC__
16807# include <limits.h>
16808#else
16809# include <assert.h>
16810#endif
edfaf76d
LK
16811
16812#undef $ac_func
16813
d6e01aa5
KL
16814/* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
503d2be0
AS
16817#ifdef __cplusplus
16818extern "C"
16819#endif
98418dba 16820char $ac_func ();
98418dba
CW
16821/* The GNU C library defines this for functions which it implements
16822 to always fail with ENOSYS. Some functions are actually named
16823 something starting with __ and the normal name is an alias. */
d6e01aa5 16824#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16825choke me
98418dba
CW
16826#endif
16827
19650fd6
AS
16828int
16829main ()
16830{
d6e01aa5 16831return $ac_func ();
98418dba
CW
16832 ;
16833 return 0;
16834}
f21fadcc 16835_ACEOF
98418dba 16836rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16837if { (ac_try="$ac_link"
16838case "(($ac_try" in
16839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16840 *) ac_try_echo=$ac_try;;
16841esac
16842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16843 (eval "$ac_link") 2>conftest.er1
f21fadcc 16844 ac_status=$?
edfaf76d
LK
16845 grep -v '^ *+' conftest.er1 >conftest.err
16846 rm -f conftest.er1
16847 cat conftest.err >&5
c0d27fcc 16848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16849 (exit $ac_status); } && {
16850 test -z "$ac_c_werror_flag" ||
16851 test ! -s conftest.err
16852 } && test -s conftest$ac_exeext &&
16853 $as_test_x conftest$ac_exeext; then
98418dba 16854 eval "$as_ac_var=yes"
f21fadcc
JD
16855else
16856 echo "$as_me: failed program was:" >&5
19650fd6
AS
16857sed 's/^/| /' conftest.$ac_ext >&5
16858
d6e01aa5 16859 eval "$as_ac_var=no"
f21fadcc 16860fi
d6e01aa5
KL
16861
16862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16863 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16864fi
d6e01aa5
KL
16865ac_res=`eval echo '${'$as_ac_var'}'`
16866 { echo "$as_me:$LINENO: result: $ac_res" >&5
16867echo "${ECHO_T}$ac_res" >&6; }
98418dba 16868if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16869 cat >>confdefs.h <<_ACEOF
98418dba 16870#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16871_ACEOF
98418dba
CW
16872
16873fi
16874done
16875
c0d27fcc 16876
98418dba
CW
16877# Solaris has libkstat which does not require root.
16878
d6e01aa5
KL
16879{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16880echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16881if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16882 echo $ECHO_N "(cached) $ECHO_C" >&6
16883else
16884 ac_check_lib_save_LIBS=$LIBS
98418dba 16885LIBS="-lkstat $LIBS"
f21fadcc 16886cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16887/* confdefs.h. */
16888_ACEOF
16889cat confdefs.h >>conftest.$ac_ext
16890cat >>conftest.$ac_ext <<_ACEOF
16891/* end confdefs.h. */
f21fadcc 16892
d6e01aa5
KL
16893/* Override any GCC internal prototype to avoid an error.
16894 Use char because int might match the return type of a GCC
16895 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16896#ifdef __cplusplus
16897extern "C"
16898#endif
98418dba 16899char kstat_open ();
f21fadcc
JD
16900int
16901main ()
16902{
d6e01aa5 16903return kstat_open ();
f21fadcc
JD
16904 ;
16905 return 0;
16906}
16907_ACEOF
16908rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16909if { (ac_try="$ac_link"
16910case "(($ac_try" in
16911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16912 *) ac_try_echo=$ac_try;;
16913esac
16914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16915 (eval "$ac_link") 2>conftest.er1
f21fadcc 16916 ac_status=$?
edfaf76d
LK
16917 grep -v '^ *+' conftest.er1 >conftest.err
16918 rm -f conftest.er1
16919 cat conftest.err >&5
c0d27fcc 16920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16921 (exit $ac_status); } && {
16922 test -z "$ac_c_werror_flag" ||
16923 test ! -s conftest.err
16924 } && test -s conftest$ac_exeext &&
16925 $as_test_x conftest$ac_exeext; then
98418dba 16926 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16927else
16928 echo "$as_me: failed program was:" >&5
19650fd6
AS
16929sed 's/^/| /' conftest.$ac_ext >&5
16930
d6e01aa5 16931 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16932fi
d6e01aa5
KL
16933
16934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16935 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16936LIBS=$ac_check_lib_save_LIBS
16937fi
d6e01aa5
KL
16938{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16939echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16940if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16941 cat >>confdefs.h <<_ACEOF
98418dba 16942#define HAVE_LIBKSTAT 1
c0d27fcc 16943_ACEOF
f21fadcc 16944
98418dba 16945 LIBS="-lkstat $LIBS"
f21fadcc 16946
f21fadcc
JD
16947fi
16948
98418dba
CW
16949test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16950
16951# Some systems with -lutil have (and need) -lkvm as well, some do not.
16952# On Solaris, -lkvm requires nlist from -lelf, so check that first
16953# to get the right answer into the cache.
16954# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16955if test $ac_have_func = no; then
d6e01aa5
KL
16956 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16957echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16958if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16959 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16960else
98418dba
CW
16961 ac_check_lib_save_LIBS=$LIBS
16962LIBS="-lelf $LIBS"
16963cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16964/* confdefs.h. */
16965_ACEOF
16966cat confdefs.h >>conftest.$ac_ext
16967cat >>conftest.$ac_ext <<_ACEOF
16968/* end confdefs.h. */
98418dba 16969
d6e01aa5
KL
16970/* Override any GCC internal prototype to avoid an error.
16971 Use char because int might match the return type of a GCC
16972 builtin and then its argument prototype would still apply. */
98418dba
CW
16973#ifdef __cplusplus
16974extern "C"
16975#endif
98418dba 16976char elf_begin ();
503d2be0
AS
16977int
16978main ()
16979{
d6e01aa5 16980return elf_begin ();
503d2be0
AS
16981 ;
16982 return 0;
16983}
16984_ACEOF
16985rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16986if { (ac_try="$ac_link"
16987case "(($ac_try" in
16988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16989 *) ac_try_echo=$ac_try;;
16990esac
16991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16992 (eval "$ac_link") 2>conftest.er1
503d2be0 16993 ac_status=$?
edfaf76d
LK
16994 grep -v '^ *+' conftest.er1 >conftest.err
16995 rm -f conftest.er1
16996 cat conftest.err >&5
c0d27fcc 16997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16998 (exit $ac_status); } && {
16999 test -z "$ac_c_werror_flag" ||
17000 test ! -s conftest.err
17001 } && test -s conftest$ac_exeext &&
17002 $as_test_x conftest$ac_exeext; then
98418dba 17003 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17004else
503d2be0 17005 echo "$as_me: failed program was:" >&5
19650fd6
AS
17006sed 's/^/| /' conftest.$ac_ext >&5
17007
d6e01aa5 17008 ac_cv_lib_elf_elf_begin=no
ba4481b5 17009fi
d6e01aa5
KL
17010
17011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17012 conftest$ac_exeext conftest.$ac_ext
98418dba 17013LIBS=$ac_check_lib_save_LIBS
ba4481b5 17014fi
d6e01aa5
KL
17015{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17016echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17017if test $ac_cv_lib_elf_elf_begin = yes; then
17018 LIBS="-lelf $LIBS"
ba4481b5
DL
17019fi
17020
98418dba
CW
17021fi
17022if test $ac_have_func = no; then
d6e01aa5
KL
17023 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17024echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17025if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17026 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17027else
98418dba
CW
17028 ac_check_lib_save_LIBS=$LIBS
17029LIBS="-lkvm $LIBS"
17030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17031/* confdefs.h. */
17032_ACEOF
17033cat confdefs.h >>conftest.$ac_ext
17034cat >>conftest.$ac_ext <<_ACEOF
17035/* end confdefs.h. */
98418dba 17036
d6e01aa5
KL
17037/* Override any GCC internal prototype to avoid an error.
17038 Use char because int might match the return type of a GCC
17039 builtin and then its argument prototype would still apply. */
98418dba
CW
17040#ifdef __cplusplus
17041extern "C"
17042#endif
98418dba 17043char kvm_open ();
503d2be0
AS
17044int
17045main ()
17046{
d6e01aa5 17047return kvm_open ();
503d2be0
AS
17048 ;
17049 return 0;
17050}
17051_ACEOF
17052rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17053if { (ac_try="$ac_link"
17054case "(($ac_try" in
17055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17056 *) ac_try_echo=$ac_try;;
17057esac
17058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17059 (eval "$ac_link") 2>conftest.er1
503d2be0 17060 ac_status=$?
edfaf76d
LK
17061 grep -v '^ *+' conftest.er1 >conftest.err
17062 rm -f conftest.er1
17063 cat conftest.err >&5
c0d27fcc 17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17065 (exit $ac_status); } && {
17066 test -z "$ac_c_werror_flag" ||
17067 test ! -s conftest.err
17068 } && test -s conftest$ac_exeext &&
17069 $as_test_x conftest$ac_exeext; then
98418dba 17070 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17071else
17072 echo "$as_me: failed program was:" >&5
19650fd6
AS
17073sed 's/^/| /' conftest.$ac_ext >&5
17074
d6e01aa5 17075 ac_cv_lib_kvm_kvm_open=no
503d2be0 17076fi
d6e01aa5
KL
17077
17078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17079 conftest$ac_exeext conftest.$ac_ext
98418dba 17080LIBS=$ac_check_lib_save_LIBS
503d2be0 17081fi
d6e01aa5
KL
17082{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17083echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17084if test $ac_cv_lib_kvm_kvm_open = yes; then
17085 LIBS="-lkvm $LIBS"
ba4481b5
DL
17086fi
17087
98418dba 17088 # Check for the 4.4BSD definition of getloadavg.
d6e01aa5
KL
17089 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17090echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17091if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17092 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17093else
98418dba
CW
17094 ac_check_lib_save_LIBS=$LIBS
17095LIBS="-lutil $LIBS"
17096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17097/* confdefs.h. */
17098_ACEOF
17099cat confdefs.h >>conftest.$ac_ext
17100cat >>conftest.$ac_ext <<_ACEOF
17101/* end confdefs.h. */
98418dba 17102
d6e01aa5
KL
17103/* Override any GCC internal prototype to avoid an error.
17104 Use char because int might match the return type of a GCC
17105 builtin and then its argument prototype would still apply. */
98418dba
CW
17106#ifdef __cplusplus
17107extern "C"
17108#endif
98418dba 17109char getloadavg ();
503d2be0
AS
17110int
17111main ()
17112{
d6e01aa5 17113return getloadavg ();
503d2be0
AS
17114 ;
17115 return 0;
17116}
17117_ACEOF
17118rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17119if { (ac_try="$ac_link"
17120case "(($ac_try" in
17121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17122 *) ac_try_echo=$ac_try;;
17123esac
17124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17125 (eval "$ac_link") 2>conftest.er1
503d2be0 17126 ac_status=$?
edfaf76d
LK
17127 grep -v '^ *+' conftest.er1 >conftest.err
17128 rm -f conftest.er1
17129 cat conftest.err >&5
c0d27fcc 17130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17131 (exit $ac_status); } && {
17132 test -z "$ac_c_werror_flag" ||
17133 test ! -s conftest.err
17134 } && test -s conftest$ac_exeext &&
17135 $as_test_x conftest$ac_exeext; then
35996d22
AS
17136 ac_cv_lib_util_getloadavg=yes
17137else
503d2be0 17138 echo "$as_me: failed program was:" >&5
19650fd6
AS
17139sed 's/^/| /' conftest.$ac_ext >&5
17140
d6e01aa5 17141 ac_cv_lib_util_getloadavg=no
ba4481b5 17142fi
d6e01aa5
KL
17143
17144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17145 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17146LIBS=$ac_check_lib_save_LIBS
17147fi
d6e01aa5
KL
17148{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17149echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17150if test $ac_cv_lib_util_getloadavg = yes; then
17151 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17152fi
503d2be0 17153
98418dba 17154fi
ba4481b5 17155
98418dba
CW
17156if test $ac_have_func = no; then
17157 # There is a commonly available library for RS/6000 AIX.
17158 # Since it is not a standard part of AIX, it might be installed locally.
17159 ac_getloadavg_LIBS=$LIBS
17160 LIBS="-L/usr/local/lib $LIBS"
d6e01aa5
KL
17161 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17162echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17163if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17164 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17165else
98418dba
CW
17166 ac_check_lib_save_LIBS=$LIBS
17167LIBS="-lgetloadavg $LIBS"
17168cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17169/* confdefs.h. */
17170_ACEOF
17171cat confdefs.h >>conftest.$ac_ext
17172cat >>conftest.$ac_ext <<_ACEOF
17173/* end confdefs.h. */
ba4481b5 17174
d6e01aa5
KL
17175/* Override any GCC internal prototype to avoid an error.
17176 Use char because int might match the return type of a GCC
17177 builtin and then its argument prototype would still apply. */
98418dba
CW
17178#ifdef __cplusplus
17179extern "C"
17180#endif
98418dba 17181char getloadavg ();
98418dba
CW
17182int
17183main ()
17184{
d6e01aa5 17185return getloadavg ();
98418dba
CW
17186 ;
17187 return 0;
17188}
503d2be0 17189_ACEOF
98418dba 17190rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17191if { (ac_try="$ac_link"
17192case "(($ac_try" in
17193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17194 *) ac_try_echo=$ac_try;;
17195esac
17196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17197 (eval "$ac_link") 2>conftest.er1
98418dba 17198 ac_status=$?
edfaf76d
LK
17199 grep -v '^ *+' conftest.er1 >conftest.err
17200 rm -f conftest.er1
17201 cat conftest.err >&5
c0d27fcc 17202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17203 (exit $ac_status); } && {
17204 test -z "$ac_c_werror_flag" ||
17205 test ! -s conftest.err
17206 } && test -s conftest$ac_exeext &&
17207 $as_test_x conftest$ac_exeext; then
98418dba 17208 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17209else
98418dba 17210 echo "$as_me: failed program was:" >&5
19650fd6
AS
17211sed 's/^/| /' conftest.$ac_ext >&5
17212
d6e01aa5 17213 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17214fi
d6e01aa5
KL
17215
17216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17217 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17218LIBS=$ac_check_lib_save_LIBS
17219fi
d6e01aa5
KL
17220{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17221echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17222if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17223 LIBS="-lgetloadavg $LIBS"
17224else
17225 LIBS=$ac_getloadavg_LIBS
ba4481b5 17226fi
ba4481b5
DL
17227
17228fi
98418dba
CW
17229
17230# Make sure it is really in the library, if we think we found it,
17231# otherwise set up the replacement function.
17232
17233for ac_func in getloadavg
17234do
17235as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17236{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17237echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17238if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17240else
503d2be0 17241 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
edfaf76d
LK
17247/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17248 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17249#define $ac_func innocuous_$ac_func
17250
ba4481b5 17251/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17252 which can conflict with char $ac_func (); below.
17253 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17254 <limits.h> exists even on freestanding compilers. */
edfaf76d 17255
19650fd6
AS
17256#ifdef __STDC__
17257# include <limits.h>
17258#else
17259# include <assert.h>
17260#endif
edfaf76d
LK
17261
17262#undef $ac_func
17263
d6e01aa5
KL
17264/* Override any GCC internal prototype to avoid an error.
17265 Use char because int might match the return type of a GCC
17266 builtin and then its argument prototype would still apply. */
503d2be0
AS
17267#ifdef __cplusplus
17268extern "C"
17269#endif
503d2be0 17270char $ac_func ();
ba4481b5
DL
17271/* The GNU C library defines this for functions which it implements
17272 to always fail with ENOSYS. Some functions are actually named
17273 something starting with __ and the normal name is an alias. */
d6e01aa5 17274#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17275choke me
cd958eb3
MB
17276#endif
17277
19650fd6
AS
17278int
17279main ()
17280{
d6e01aa5 17281return $ac_func ();
503d2be0
AS
17282 ;
17283 return 0;
17284}
17285_ACEOF
17286rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17287if { (ac_try="$ac_link"
17288case "(($ac_try" in
17289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17290 *) ac_try_echo=$ac_try;;
17291esac
17292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17293 (eval "$ac_link") 2>conftest.er1
503d2be0 17294 ac_status=$?
edfaf76d
LK
17295 grep -v '^ *+' conftest.er1 >conftest.err
17296 rm -f conftest.er1
17297 cat conftest.err >&5
c0d27fcc 17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17299 (exit $ac_status); } && {
17300 test -z "$ac_c_werror_flag" ||
17301 test ! -s conftest.err
17302 } && test -s conftest$ac_exeext &&
17303 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17304 eval "$as_ac_var=yes"
17305else
17306 echo "$as_me: failed program was:" >&5
19650fd6
AS
17307sed 's/^/| /' conftest.$ac_ext >&5
17308
d6e01aa5 17309 eval "$as_ac_var=no"
503d2be0 17310fi
d6e01aa5
KL
17311
17312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17313 conftest$ac_exeext conftest.$ac_ext
503d2be0 17314fi
d6e01aa5
KL
17315ac_res=`eval echo '${'$as_ac_var'}'`
17316 { echo "$as_me:$LINENO: result: $ac_res" >&5
17317echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17318if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17319 cat >>confdefs.h <<_ACEOF
98418dba 17320#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17321_ACEOF
503d2be0 17322
98418dba 17323else
d6e01aa5 17324 case " $LIBOBJS " in
edfaf76d 17325 *" getloadavg.$ac_objext "* ) ;;
d6e01aa5
KL
17326 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17327 ;;
edfaf76d
LK
17328esac
17329
ba4481b5 17330
c0d27fcc 17331cat >>confdefs.h <<\_ACEOF
98418dba 17332#define C_GETLOADAVG 1
c0d27fcc 17333_ACEOF
ba4481b5 17334
98418dba
CW
17335# Figure out what our getloadavg.c needs.
17336ac_have_func=no
c0d27fcc 17337if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
d6e01aa5
KL
17338 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17339echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17340if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17341 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17342fi
d6e01aa5
KL
17343{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17344echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17345else
c0d27fcc 17346 # Is the header compilable?
d6e01aa5
KL
17347{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17348echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17349cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17350/* confdefs.h. */
17351_ACEOF
17352cat confdefs.h >>conftest.$ac_ext
17353cat >>conftest.$ac_ext <<_ACEOF
17354/* end confdefs.h. */
c0d27fcc
MR
17355$ac_includes_default
17356#include <sys/dg_sys_info.h>
17357_ACEOF
17358rm -f conftest.$ac_objext
d6e01aa5
KL
17359if { (ac_try="$ac_compile"
17360case "(($ac_try" in
17361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17362 *) ac_try_echo=$ac_try;;
17363esac
17364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17365 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17366 ac_status=$?
edfaf76d
LK
17367 grep -v '^ *+' conftest.er1 >conftest.err
17368 rm -f conftest.er1
17369 cat conftest.err >&5
c0d27fcc 17370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17371 (exit $ac_status); } && {
17372 test -z "$ac_c_werror_flag" ||
17373 test ! -s conftest.err
17374 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17375 ac_header_compiler=yes
17376else
17377 echo "$as_me: failed program was:" >&5
19650fd6
AS
17378sed 's/^/| /' conftest.$ac_ext >&5
17379
d6e01aa5 17380 ac_header_compiler=no
c0d27fcc 17381fi
d6e01aa5
KL
17382
17383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17384{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17385echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17386
17387# Is the header present?
d6e01aa5
KL
17388{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17389echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17390cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17391/* confdefs.h. */
17392_ACEOF
17393cat confdefs.h >>conftest.$ac_ext
17394cat >>conftest.$ac_ext <<_ACEOF
17395/* end confdefs.h. */
98418dba
CW
17396#include <sys/dg_sys_info.h>
17397_ACEOF
d6e01aa5
KL
17398if { (ac_try="$ac_cpp conftest.$ac_ext"
17399case "(($ac_try" in
17400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17401 *) ac_try_echo=$ac_try;;
17402esac
17403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17404 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17405 ac_status=$?
6bae0ccf 17406 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17407 rm -f conftest.er1
17408 cat conftest.err >&5
c0d27fcc 17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17410 (exit $ac_status); } >/dev/null && {
17411 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17412 test ! -s conftest.err
17413 }; then
c0d27fcc 17414 ac_header_preproc=yes
98418dba
CW
17415else
17416 echo "$as_me: failed program was:" >&5
19650fd6
AS
17417sed 's/^/| /' conftest.$ac_ext >&5
17418
c0d27fcc 17419 ac_header_preproc=no
ba4481b5 17420fi
d6e01aa5 17421
98418dba 17422rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17423{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17424echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17425
17426# So? What about this header?
edfaf76d
LK
17427case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17428 yes:no: )
c0d27fcc
MR
17429 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17430echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17431 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17432echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17433 ac_header_preproc=yes
19650fd6 17434 ;;
edfaf76d 17435 no:yes:* )
c0d27fcc
MR
17436 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17437echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17438 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17439echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17440 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17441echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17442 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17443echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17444 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17445echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17446 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17447echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17448
19650fd6 17449 ;;
c0d27fcc 17450esac
d6e01aa5
KL
17451{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17452echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17453if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17454 echo $ECHO_N "(cached) $ECHO_C" >&6
17455else
17456 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17457fi
d6e01aa5
KL
17458{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17459echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17460
17461fi
98418dba
CW
17462if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17463 ac_have_func=yes
ba4481b5 17464
c0d27fcc 17465cat >>confdefs.h <<\_ACEOF
98418dba 17466#define DGUX 1
c0d27fcc
MR
17467_ACEOF
17468
503d2be0 17469
d6e01aa5
KL
17470{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17471echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17472if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17473 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17474else
503d2be0 17475 ac_check_lib_save_LIBS=$LIBS
98418dba 17476LIBS="-ldgc $LIBS"
503d2be0 17477cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17478/* confdefs.h. */
17479_ACEOF
17480cat confdefs.h >>conftest.$ac_ext
17481cat >>conftest.$ac_ext <<_ACEOF
17482/* end confdefs.h. */
503d2be0 17483
d6e01aa5
KL
17484/* Override any GCC internal prototype to avoid an error.
17485 Use char because int might match the return type of a GCC
17486 builtin and then its argument prototype would still apply. */
503d2be0
AS
17487#ifdef __cplusplus
17488extern "C"
17489#endif
98418dba 17490char dg_sys_info ();
503d2be0
AS
17491int
17492main ()
17493{
d6e01aa5 17494return dg_sys_info ();
503d2be0
AS
17495 ;
17496 return 0;
17497}
17498_ACEOF
17499rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17500if { (ac_try="$ac_link"
17501case "(($ac_try" in
17502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17503 *) ac_try_echo=$ac_try;;
17504esac
17505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17506 (eval "$ac_link") 2>conftest.er1
503d2be0 17507 ac_status=$?
edfaf76d
LK
17508 grep -v '^ *+' conftest.er1 >conftest.err
17509 rm -f conftest.er1
17510 cat conftest.err >&5
c0d27fcc 17511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17512 (exit $ac_status); } && {
17513 test -z "$ac_c_werror_flag" ||
17514 test ! -s conftest.err
17515 } && test -s conftest$ac_exeext &&
17516 $as_test_x conftest$ac_exeext; then
98418dba 17517 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17518else
17519 echo "$as_me: failed program was:" >&5
19650fd6
AS
17520sed 's/^/| /' conftest.$ac_ext >&5
17521
d6e01aa5 17522 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17523fi
d6e01aa5
KL
17524
17525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17526 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17527LIBS=$ac_check_lib_save_LIBS
17528fi
d6e01aa5
KL
17529{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17530echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17531if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17532 cat >>confdefs.h <<_ACEOF
98418dba 17533#define HAVE_LIBDGC 1
c0d27fcc 17534_ACEOF
ba4481b5 17535
98418dba 17536 LIBS="-ldgc $LIBS"
ba4481b5 17537
ba4481b5
DL
17538fi
17539
98418dba 17540fi
503d2be0 17541
c0d27fcc
MR
17542
17543
17544if test "${ac_cv_header_locale_h+set}" = set; then
d6e01aa5
KL
17545 { echo "$as_me:$LINENO: checking for locale.h" >&5
17546echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17547if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17548 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17549fi
d6e01aa5
KL
17550{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17551echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17552else
c0d27fcc 17553 # Is the header compilable?
d6e01aa5
KL
17554{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17555echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17557/* confdefs.h. */
17558_ACEOF
17559cat confdefs.h >>conftest.$ac_ext
17560cat >>conftest.$ac_ext <<_ACEOF
17561/* end confdefs.h. */
c0d27fcc
MR
17562$ac_includes_default
17563#include <locale.h>
17564_ACEOF
17565rm -f conftest.$ac_objext
d6e01aa5
KL
17566if { (ac_try="$ac_compile"
17567case "(($ac_try" in
17568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17569 *) ac_try_echo=$ac_try;;
17570esac
17571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17572 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17573 ac_status=$?
edfaf76d
LK
17574 grep -v '^ *+' conftest.er1 >conftest.err
17575 rm -f conftest.er1
17576 cat conftest.err >&5
c0d27fcc 17577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17578 (exit $ac_status); } && {
17579 test -z "$ac_c_werror_flag" ||
17580 test ! -s conftest.err
17581 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17582 ac_header_compiler=yes
17583else
17584 echo "$as_me: failed program was:" >&5
19650fd6
AS
17585sed 's/^/| /' conftest.$ac_ext >&5
17586
d6e01aa5 17587 ac_header_compiler=no
c0d27fcc 17588fi
d6e01aa5
KL
17589
17590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17591{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17592echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17593
17594# Is the header present?
d6e01aa5
KL
17595{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17596echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17597cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17598/* confdefs.h. */
17599_ACEOF
17600cat confdefs.h >>conftest.$ac_ext
17601cat >>conftest.$ac_ext <<_ACEOF
17602/* end confdefs.h. */
98418dba 17603#include <locale.h>
503d2be0 17604_ACEOF
d6e01aa5
KL
17605if { (ac_try="$ac_cpp conftest.$ac_ext"
17606case "(($ac_try" in
17607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17608 *) ac_try_echo=$ac_try;;
17609esac
17610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17611 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17612 ac_status=$?
6bae0ccf 17613 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17614 rm -f conftest.er1
17615 cat conftest.err >&5
c0d27fcc 17616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17617 (exit $ac_status); } >/dev/null && {
17618 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17619 test ! -s conftest.err
17620 }; then
c0d27fcc 17621 ac_header_preproc=yes
98418dba
CW
17622else
17623 echo "$as_me: failed program was:" >&5
19650fd6
AS
17624sed 's/^/| /' conftest.$ac_ext >&5
17625
c0d27fcc 17626 ac_header_preproc=no
ba4481b5 17627fi
d6e01aa5 17628
98418dba 17629rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17630{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17631echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17632
17633# So? What about this header?
edfaf76d
LK
17634case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17635 yes:no: )
c0d27fcc
MR
17636 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17637echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17638 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17639echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17640 ac_header_preproc=yes
19650fd6 17641 ;;
edfaf76d 17642 no:yes:* )
c0d27fcc
MR
17643 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17644echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17645 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17646echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17647 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17648echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17649 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17650echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17651 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17652echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17653 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17654echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17655
19650fd6 17656 ;;
c0d27fcc 17657esac
d6e01aa5
KL
17658{ echo "$as_me:$LINENO: checking for locale.h" >&5
17659echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17660if test "${ac_cv_header_locale_h+set}" = set; then
17661 echo $ECHO_N "(cached) $ECHO_C" >&6
17662else
17663 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17664fi
d6e01aa5
KL
17665{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17666echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17667
c0d27fcc
MR
17668fi
17669
17670
17671
98418dba 17672for ac_func in setlocale
ba4481b5 17673do
503d2be0 17674as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17675{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17676echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17677if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17678 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17679else
503d2be0 17680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17681/* confdefs.h. */
17682_ACEOF
17683cat confdefs.h >>conftest.$ac_ext
17684cat >>conftest.$ac_ext <<_ACEOF
17685/* end confdefs.h. */
edfaf76d
LK
17686/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17687 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17688#define $ac_func innocuous_$ac_func
17689
ba4481b5 17690/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17691 which can conflict with char $ac_func (); below.
17692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17693 <limits.h> exists even on freestanding compilers. */
edfaf76d 17694
19650fd6
AS
17695#ifdef __STDC__
17696# include <limits.h>
17697#else
17698# include <assert.h>
17699#endif
edfaf76d
LK
17700
17701#undef $ac_func
17702
d6e01aa5
KL
17703/* Override any GCC internal prototype to avoid an error.
17704 Use char because int might match the return type of a GCC
17705 builtin and then its argument prototype would still apply. */
503d2be0
AS
17706#ifdef __cplusplus
17707extern "C"
17708#endif
503d2be0 17709char $ac_func ();
ba4481b5
DL
17710/* The GNU C library defines this for functions which it implements
17711 to always fail with ENOSYS. Some functions are actually named
17712 something starting with __ and the normal name is an alias. */
d6e01aa5 17713#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17714choke me
ba4481b5
DL
17715#endif
17716
19650fd6
AS
17717int
17718main ()
17719{
d6e01aa5 17720return $ac_func ();
503d2be0
AS
17721 ;
17722 return 0;
17723}
17724_ACEOF
17725rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17726if { (ac_try="$ac_link"
17727case "(($ac_try" in
17728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17729 *) ac_try_echo=$ac_try;;
17730esac
17731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17732 (eval "$ac_link") 2>conftest.er1
503d2be0 17733 ac_status=$?
edfaf76d
LK
17734 grep -v '^ *+' conftest.er1 >conftest.err
17735 rm -f conftest.er1
17736 cat conftest.err >&5
c0d27fcc 17737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17738 (exit $ac_status); } && {
17739 test -z "$ac_c_werror_flag" ||
17740 test ! -s conftest.err
17741 } && test -s conftest$ac_exeext &&
17742 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17743 eval "$as_ac_var=yes"
17744else
17745 echo "$as_me: failed program was:" >&5
19650fd6
AS
17746sed 's/^/| /' conftest.$ac_ext >&5
17747
d6e01aa5 17748 eval "$as_ac_var=no"
503d2be0 17749fi
d6e01aa5
KL
17750
17751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17752 conftest$ac_exeext conftest.$ac_ext
503d2be0 17753fi
d6e01aa5
KL
17754ac_res=`eval echo '${'$as_ac_var'}'`
17755 { echo "$as_me:$LINENO: result: $ac_res" >&5
17756echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17757if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17758 cat >>confdefs.h <<_ACEOF
503d2be0 17759#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17760_ACEOF
ba4481b5 17761
ba4481b5
DL
17762fi
17763done
17764
c0d27fcc 17765
98418dba
CW
17766# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17767# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17768# Irix 4.0.5F has the header but not the library.
17769if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17770 ac_have_func=yes
17771
c0d27fcc 17772cat >>confdefs.h <<\_ACEOF
98418dba 17773#define SVR4 1
c0d27fcc 17774_ACEOF
98418dba
CW
17775
17776fi
17777
17778if test $ac_have_func = no; then
c0d27fcc 17779 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
d6e01aa5
KL
17780 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17781echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17782if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17783 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17784fi
d6e01aa5
KL
17785{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17786echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17787else
c0d27fcc 17788 # Is the header compilable?
d6e01aa5
KL
17789{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17790echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17791cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17792/* confdefs.h. */
17793_ACEOF
17794cat confdefs.h >>conftest.$ac_ext
17795cat >>conftest.$ac_ext <<_ACEOF
17796/* end confdefs.h. */
c0d27fcc
MR
17797$ac_includes_default
17798#include <inq_stats/cpustats.h>
17799_ACEOF
17800rm -f conftest.$ac_objext
d6e01aa5
KL
17801if { (ac_try="$ac_compile"
17802case "(($ac_try" in
17803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17804 *) ac_try_echo=$ac_try;;
17805esac
17806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17807 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17808 ac_status=$?
edfaf76d
LK
17809 grep -v '^ *+' conftest.er1 >conftest.err
17810 rm -f conftest.er1
17811 cat conftest.err >&5
c0d27fcc 17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17813 (exit $ac_status); } && {
17814 test -z "$ac_c_werror_flag" ||
17815 test ! -s conftest.err
17816 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17817 ac_header_compiler=yes
17818else
17819 echo "$as_me: failed program was:" >&5
19650fd6
AS
17820sed 's/^/| /' conftest.$ac_ext >&5
17821
d6e01aa5 17822 ac_header_compiler=no
c0d27fcc 17823fi
d6e01aa5
KL
17824
17825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17826{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17827echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17828
17829# Is the header present?
d6e01aa5
KL
17830{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17831echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17832cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17833/* confdefs.h. */
17834_ACEOF
17835cat confdefs.h >>conftest.$ac_ext
17836cat >>conftest.$ac_ext <<_ACEOF
17837/* end confdefs.h. */
98418dba 17838#include <inq_stats/cpustats.h>
503d2be0 17839_ACEOF
d6e01aa5
KL
17840if { (ac_try="$ac_cpp conftest.$ac_ext"
17841case "(($ac_try" in
17842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17843 *) ac_try_echo=$ac_try;;
17844esac
17845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17846 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17847 ac_status=$?
6bae0ccf 17848 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17849 rm -f conftest.er1
17850 cat conftest.err >&5
c0d27fcc 17851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17852 (exit $ac_status); } >/dev/null && {
17853 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17854 test ! -s conftest.err
17855 }; then
c0d27fcc 17856 ac_header_preproc=yes
503d2be0
AS
17857else
17858 echo "$as_me: failed program was:" >&5
19650fd6
AS
17859sed 's/^/| /' conftest.$ac_ext >&5
17860
c0d27fcc 17861 ac_header_preproc=no
ba4481b5 17862fi
d6e01aa5 17863
503d2be0 17864rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17865{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17866echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17867
17868# So? What about this header?
edfaf76d
LK
17869case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17870 yes:no: )
c0d27fcc
MR
17871 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17872echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17873 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17874echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17875 ac_header_preproc=yes
19650fd6 17876 ;;
edfaf76d 17877 no:yes:* )
c0d27fcc
MR
17878 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17879echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17880 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17881echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17882 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17883echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17884 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17885echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17886 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17887echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17888 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17889echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17890
19650fd6 17891 ;;
c0d27fcc 17892esac
d6e01aa5
KL
17893{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17894echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17895if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17896 echo $ECHO_N "(cached) $ECHO_C" >&6
17897else
17898 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17899fi
d6e01aa5
KL
17900{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17901echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17902
17903fi
98418dba
CW
17904if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17905 ac_have_func=yes
ba4481b5 17906
c0d27fcc 17907cat >>confdefs.h <<\_ACEOF
98418dba 17908#define UMAX 1
c0d27fcc 17909_ACEOF
98418dba 17910
c0d27fcc
MR
17911
17912cat >>confdefs.h <<\_ACEOF
98418dba 17913#define UMAX4_3 1
c0d27fcc 17914_ACEOF
98418dba
CW
17915
17916fi
17917
c0d27fcc 17918
98418dba
CW
17919fi
17920
17921if test $ac_have_func = no; then
c0d27fcc 17922 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
d6e01aa5
KL
17923 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17924echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17925if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17926 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17927fi
d6e01aa5
KL
17928{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17929echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17930else
c0d27fcc 17931 # Is the header compilable?
d6e01aa5
KL
17932{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17933echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17934cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17935/* confdefs.h. */
17936_ACEOF
17937cat confdefs.h >>conftest.$ac_ext
17938cat >>conftest.$ac_ext <<_ACEOF
17939/* end confdefs.h. */
c0d27fcc
MR
17940$ac_includes_default
17941#include <sys/cpustats.h>
17942_ACEOF
17943rm -f conftest.$ac_objext
d6e01aa5
KL
17944if { (ac_try="$ac_compile"
17945case "(($ac_try" in
17946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17947 *) ac_try_echo=$ac_try;;
17948esac
17949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17950 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17951 ac_status=$?
edfaf76d
LK
17952 grep -v '^ *+' conftest.er1 >conftest.err
17953 rm -f conftest.er1
17954 cat conftest.err >&5
c0d27fcc 17955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17956 (exit $ac_status); } && {
17957 test -z "$ac_c_werror_flag" ||
17958 test ! -s conftest.err
17959 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17960 ac_header_compiler=yes
17961else
17962 echo "$as_me: failed program was:" >&5
19650fd6
AS
17963sed 's/^/| /' conftest.$ac_ext >&5
17964
d6e01aa5 17965 ac_header_compiler=no
c0d27fcc 17966fi
d6e01aa5
KL
17967
17968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17969{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17970echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17971
17972# Is the header present?
d6e01aa5
KL
17973{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17974echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17975cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17976/* confdefs.h. */
17977_ACEOF
17978cat confdefs.h >>conftest.$ac_ext
17979cat >>conftest.$ac_ext <<_ACEOF
17980/* end confdefs.h. */
98418dba
CW
17981#include <sys/cpustats.h>
17982_ACEOF
d6e01aa5
KL
17983if { (ac_try="$ac_cpp conftest.$ac_ext"
17984case "(($ac_try" in
17985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17986 *) ac_try_echo=$ac_try;;
17987esac
17988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17989 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17990 ac_status=$?
6bae0ccf 17991 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17992 rm -f conftest.er1
17993 cat conftest.err >&5
c0d27fcc 17994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17995 (exit $ac_status); } >/dev/null && {
17996 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17997 test ! -s conftest.err
17998 }; then
c0d27fcc 17999 ac_header_preproc=yes
98418dba
CW
18000else
18001 echo "$as_me: failed program was:" >&5
19650fd6
AS
18002sed 's/^/| /' conftest.$ac_ext >&5
18003
c0d27fcc 18004 ac_header_preproc=no
98418dba 18005fi
d6e01aa5 18006
98418dba 18007rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18008{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18009echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18010
18011# So? What about this header?
edfaf76d
LK
18012case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18013 yes:no: )
c0d27fcc
MR
18014 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18015echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18016 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18017echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18018 ac_header_preproc=yes
19650fd6 18019 ;;
edfaf76d 18020 no:yes:* )
c0d27fcc
MR
18021 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18022echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18023 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18024echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18025 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18026echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18027 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18028echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18029 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18030echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18031 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18032echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18033
19650fd6 18034 ;;
c0d27fcc 18035esac
d6e01aa5
KL
18036{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18037echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18038if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18039 echo $ECHO_N "(cached) $ECHO_C" >&6
18040else
18041 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18042fi
d6e01aa5
KL
18043{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18044echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18045
18046fi
98418dba 18047if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18048 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18049#define UMAX 1
c0d27fcc 18050_ACEOF
ba4481b5 18051
98418dba
CW
18052fi
18053
c0d27fcc 18054
98418dba
CW
18055fi
18056
18057if test $ac_have_func = no; then
18058
18059for ac_header in mach/mach.h
2c9dccc9
PJ
18060do
18061as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18062if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18063 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18064echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18065if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18066 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18067fi
d6e01aa5
KL
18068ac_res=`eval echo '${'$as_ac_Header'}'`
18069 { echo "$as_me:$LINENO: result: $ac_res" >&5
18070echo "${ECHO_T}$ac_res" >&6; }
98418dba 18071else
c0d27fcc 18072 # Is the header compilable?
d6e01aa5
KL
18073{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18074echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18075cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18076/* confdefs.h. */
18077_ACEOF
18078cat confdefs.h >>conftest.$ac_ext
18079cat >>conftest.$ac_ext <<_ACEOF
18080/* end confdefs.h. */
c0d27fcc
MR
18081$ac_includes_default
18082#include <$ac_header>
18083_ACEOF
18084rm -f conftest.$ac_objext
d6e01aa5
KL
18085if { (ac_try="$ac_compile"
18086case "(($ac_try" in
18087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18088 *) ac_try_echo=$ac_try;;
18089esac
18090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18091 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18092 ac_status=$?
edfaf76d
LK
18093 grep -v '^ *+' conftest.er1 >conftest.err
18094 rm -f conftest.er1
18095 cat conftest.err >&5
c0d27fcc 18096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18097 (exit $ac_status); } && {
18098 test -z "$ac_c_werror_flag" ||
18099 test ! -s conftest.err
18100 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18101 ac_header_compiler=yes
18102else
18103 echo "$as_me: failed program was:" >&5
19650fd6
AS
18104sed 's/^/| /' conftest.$ac_ext >&5
18105
d6e01aa5 18106 ac_header_compiler=no
c0d27fcc 18107fi
d6e01aa5
KL
18108
18109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18110{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18111echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18112
18113# Is the header present?
d6e01aa5
KL
18114{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18115echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18116cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18117/* confdefs.h. */
18118_ACEOF
18119cat confdefs.h >>conftest.$ac_ext
18120cat >>conftest.$ac_ext <<_ACEOF
18121/* end confdefs.h. */
2c9dccc9
PJ
18122#include <$ac_header>
18123_ACEOF
d6e01aa5
KL
18124if { (ac_try="$ac_cpp conftest.$ac_ext"
18125case "(($ac_try" in
18126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18127 *) ac_try_echo=$ac_try;;
18128esac
18129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18130 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18131 ac_status=$?
6bae0ccf 18132 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18133 rm -f conftest.er1
18134 cat conftest.err >&5
c0d27fcc 18135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18136 (exit $ac_status); } >/dev/null && {
18137 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18138 test ! -s conftest.err
18139 }; then
c0d27fcc
MR
18140 ac_header_preproc=yes
18141else
18142 echo "$as_me: failed program was:" >&5
19650fd6
AS
18143sed 's/^/| /' conftest.$ac_ext >&5
18144
c0d27fcc
MR
18145 ac_header_preproc=no
18146fi
d6e01aa5 18147
c0d27fcc 18148rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18149{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18150echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18151
18152# So? What about this header?
edfaf76d
LK
18153case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18154 yes:no: )
c0d27fcc
MR
18155 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18156echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18157 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18158echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18159 ac_header_preproc=yes
19650fd6 18160 ;;
edfaf76d 18161 no:yes:* )
c0d27fcc
MR
18162 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18163echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18164 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18165echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18166 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18167echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18168 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18169echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18170 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18171echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18172 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18173echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18174
19650fd6 18175 ;;
c0d27fcc 18176esac
d6e01aa5
KL
18177{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18178echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18179if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18180 echo $ECHO_N "(cached) $ECHO_C" >&6
18181else
edfaf76d 18182 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18183fi
d6e01aa5
KL
18184ac_res=`eval echo '${'$as_ac_Header'}'`
18185 { echo "$as_me:$LINENO: result: $ac_res" >&5
18186echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18187
18188fi
18189if test `eval echo '${'$as_ac_Header'}'` = yes; then
18190 cat >>confdefs.h <<_ACEOF
18191#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18192_ACEOF
18193
18194fi
18195
18196done
18197
18198fi
18199
18200
18201for ac_header in nlist.h
18202do
18203as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18204if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18205 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18206echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18207if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18208 echo $ECHO_N "(cached) $ECHO_C" >&6
18209fi
d6e01aa5
KL
18210ac_res=`eval echo '${'$as_ac_Header'}'`
18211 { echo "$as_me:$LINENO: result: $ac_res" >&5
18212echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18213else
18214 # Is the header compilable?
d6e01aa5
KL
18215{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18216echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18217cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18218/* confdefs.h. */
18219_ACEOF
18220cat confdefs.h >>conftest.$ac_ext
18221cat >>conftest.$ac_ext <<_ACEOF
18222/* end confdefs.h. */
c0d27fcc
MR
18223$ac_includes_default
18224#include <$ac_header>
18225_ACEOF
18226rm -f conftest.$ac_objext
d6e01aa5
KL
18227if { (ac_try="$ac_compile"
18228case "(($ac_try" in
18229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18230 *) ac_try_echo=$ac_try;;
18231esac
18232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18233 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18234 ac_status=$?
edfaf76d
LK
18235 grep -v '^ *+' conftest.er1 >conftest.err
18236 rm -f conftest.er1
18237 cat conftest.err >&5
c0d27fcc 18238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18239 (exit $ac_status); } && {
18240 test -z "$ac_c_werror_flag" ||
18241 test ! -s conftest.err
18242 } && test -s conftest.$ac_objext; then
c0d27fcc 18243 ac_header_compiler=yes
2c9dccc9
PJ
18244else
18245 echo "$as_me: failed program was:" >&5
19650fd6
AS
18246sed 's/^/| /' conftest.$ac_ext >&5
18247
d6e01aa5 18248 ac_header_compiler=no
98418dba 18249fi
d6e01aa5
KL
18250
18251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18252{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18253echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18254
c0d27fcc 18255# Is the header present?
d6e01aa5
KL
18256{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18257echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18258cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18259/* confdefs.h. */
18260_ACEOF
18261cat confdefs.h >>conftest.$ac_ext
18262cat >>conftest.$ac_ext <<_ACEOF
18263/* end confdefs.h. */
503d2be0
AS
18264#include <$ac_header>
18265_ACEOF
d6e01aa5
KL
18266if { (ac_try="$ac_cpp conftest.$ac_ext"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
18271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18272 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18273 ac_status=$?
6bae0ccf 18274 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18275 rm -f conftest.er1
18276 cat conftest.err >&5
c0d27fcc 18277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18278 (exit $ac_status); } >/dev/null && {
18279 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 }; then
c0d27fcc 18282 ac_header_preproc=yes
503d2be0
AS
18283else
18284 echo "$as_me: failed program was:" >&5
19650fd6
AS
18285sed 's/^/| /' conftest.$ac_ext >&5
18286
c0d27fcc 18287 ac_header_preproc=no
b5de8dc0 18288fi
d6e01aa5 18289
503d2be0 18290rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18291{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18292echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18293
18294# So? What about this header?
edfaf76d
LK
18295case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18296 yes:no: )
c0d27fcc
MR
18297 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18298echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18299 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18300echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18301 ac_header_preproc=yes
19650fd6 18302 ;;
edfaf76d 18303 no:yes:* )
c0d27fcc
MR
18304 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18305echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18306 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18307echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18308 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18309echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18310 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18311echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18312 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18313echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18314 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18315echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18316
19650fd6 18317 ;;
c0d27fcc 18318esac
d6e01aa5
KL
18319{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18320echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18321if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18322 echo $ECHO_N "(cached) $ECHO_C" >&6
18323else
edfaf76d 18324 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18325fi
d6e01aa5
KL
18326ac_res=`eval echo '${'$as_ac_Header'}'`
18327 { echo "$as_me:$LINENO: result: $ac_res" >&5
18328echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18329
18330fi
98418dba 18331if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18332 cat >>confdefs.h <<_ACEOF
98418dba 18333#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18334_ACEOF
d6e01aa5
KL
18335 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18336echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18337if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18338 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18339else
503d2be0 18340 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18341/* confdefs.h. */
18342_ACEOF
18343cat confdefs.h >>conftest.$ac_ext
18344cat >>conftest.$ac_ext <<_ACEOF
18345/* end confdefs.h. */
98418dba 18346#include <nlist.h>
b5de8dc0 18347
503d2be0
AS
18348int
18349main ()
18350{
98418dba
CW
18351static struct nlist ac_aggr;
18352if (ac_aggr.n_un.n_name)
18353return 0;
503d2be0
AS
18354 ;
18355 return 0;
18356}
18357_ACEOF
98418dba 18358rm -f conftest.$ac_objext
d6e01aa5
KL
18359if { (ac_try="$ac_compile"
18360case "(($ac_try" in
18361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18362 *) ac_try_echo=$ac_try;;
18363esac
18364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18365 (eval "$ac_compile") 2>conftest.er1
503d2be0 18366 ac_status=$?
edfaf76d
LK
18367 grep -v '^ *+' conftest.er1 >conftest.err
18368 rm -f conftest.er1
18369 cat conftest.err >&5
c0d27fcc 18370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18371 (exit $ac_status); } && {
18372 test -z "$ac_c_werror_flag" ||
18373 test ! -s conftest.err
18374 } && test -s conftest.$ac_objext; then
edfaf76d 18375 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18376else
18377 echo "$as_me: failed program was:" >&5
19650fd6
AS
18378sed 's/^/| /' conftest.$ac_ext >&5
18379
d6e01aa5 18380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18381/* confdefs.h. */
18382_ACEOF
18383cat confdefs.h >>conftest.$ac_ext
18384cat >>conftest.$ac_ext <<_ACEOF
18385/* end confdefs.h. */
6bae0ccf
DL
18386#include <nlist.h>
18387
18388int
18389main ()
18390{
18391static struct nlist ac_aggr;
18392if (sizeof ac_aggr.n_un.n_name)
18393return 0;
18394 ;
18395 return 0;
18396}
18397_ACEOF
18398rm -f conftest.$ac_objext
d6e01aa5
KL
18399if { (ac_try="$ac_compile"
18400case "(($ac_try" in
18401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18402 *) ac_try_echo=$ac_try;;
18403esac
18404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18405 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18406 ac_status=$?
edfaf76d
LK
18407 grep -v '^ *+' conftest.er1 >conftest.err
18408 rm -f conftest.er1
18409 cat conftest.err >&5
6bae0ccf 18410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18411 (exit $ac_status); } && {
18412 test -z "$ac_c_werror_flag" ||
18413 test ! -s conftest.err
18414 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18415 ac_cv_member_struct_nlist_n_un_n_name=yes
18416else
18417 echo "$as_me: failed program was:" >&5
19650fd6
AS
18418sed 's/^/| /' conftest.$ac_ext >&5
18419
d6e01aa5 18420 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18421fi
d6e01aa5
KL
18422
18423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18424fi
d6e01aa5
KL
18425
18426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18427fi
d6e01aa5
KL
18428{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18429echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18430if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18431
c0d27fcc 18432cat >>confdefs.h <<_ACEOF
98418dba 18433#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18434_ACEOF
b5de8dc0 18435
c0d27fcc
MR
18436
18437cat >>confdefs.h <<\_ACEOF
98418dba 18438#define NLIST_NAME_UNION 1
c0d27fcc 18439_ACEOF
b5de8dc0 18440
98418dba 18441fi
b5de8dc0 18442
c0d27fcc 18443
98418dba 18444fi
c0d27fcc 18445
98418dba 18446done
b5de8dc0 18447
98418dba
CW
18448fi
18449done
b5de8dc0 18450
c0d27fcc 18451
98418dba 18452# Some definitions of getloadavg require that the program be installed setgid.
d6e01aa5
KL
18453{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18454echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18455if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18456 echo $ECHO_N "(cached) $ECHO_C" >&6
18457else
18458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18459/* confdefs.h. */
18460_ACEOF
18461cat confdefs.h >>conftest.$ac_ext
18462cat >>conftest.$ac_ext <<_ACEOF
18463/* end confdefs.h. */
6bae0ccf 18464#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18465#ifdef LDAV_PRIVILEGED
18466Yowza Am I SETGID yet
18467#endif
18468_ACEOF
18469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18470 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18471 ac_cv_func_getloadavg_setgid=yes
18472else
18473 ac_cv_func_getloadavg_setgid=no
18474fi
18475rm -f conftest*
b5de8dc0 18476
98418dba 18477fi
d6e01aa5
KL
18478{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18479echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18480if test $ac_cv_func_getloadavg_setgid = yes; then
18481 NEED_SETGID=true
b5de8dc0 18482
c0d27fcc 18483cat >>confdefs.h <<\_ACEOF
98418dba 18484#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18485_ACEOF
98418dba 18486
b5de8dc0 18487else
98418dba 18488 NEED_SETGID=false
b5de8dc0 18489fi
98418dba
CW
18490
18491if test $ac_cv_func_getloadavg_setgid = yes; then
d6e01aa5
KL
18492 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18493echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18494if test "${ac_cv_group_kmem+set}" = set; then
18495 echo $ECHO_N "(cached) $ECHO_C" >&6
18496else
18497 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18498 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18499 # If we got an error (system does not support symlinks), try without -L.
18500 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18501 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18502 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18503 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18504 / /s/.* //;p;'`
18505
b5de8dc0 18506fi
d6e01aa5
KL
18507{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18508echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18509 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18510fi
98418dba
CW
18511if test "x$ac_save_LIBS" = x; then
18512 GETLOADAVG_LIBS=$LIBS
18513else
18514 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18515fi
98418dba 18516LIBS=$ac_save_LIBS
b5de8dc0 18517
c0d27fcc
MR
18518
18519
d6e01aa5
KL
18520{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18521echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18522if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18523 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18524else
b936fae4 18525 while :; do
503d2be0 18526 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18527/* confdefs.h. */
18528_ACEOF
18529cat confdefs.h >>conftest.$ac_ext
18530cat >>conftest.$ac_ext <<_ACEOF
18531/* end confdefs.h. */
c982cf7d 18532#include <stdio.h>
503d2be0
AS
18533int
18534main ()
18535{
c982cf7d 18536return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18537 ;
18538 return 0;
18539}
18540_ACEOF
d6e01aa5
KL
18541rm -f conftest.$ac_objext conftest$ac_exeext
18542if { (ac_try="$ac_link"
18543case "(($ac_try" in
18544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18545 *) ac_try_echo=$ac_try;;
18546esac
18547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18548 (eval "$ac_link") 2>conftest.er1
b936fae4 18549 ac_status=$?
edfaf76d
LK
18550 grep -v '^ *+' conftest.er1 >conftest.err
18551 rm -f conftest.er1
18552 cat conftest.err >&5
c0d27fcc 18553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18554 (exit $ac_status); } && {
18555 test -z "$ac_c_werror_flag" ||
18556 test ! -s conftest.err
18557 } && test -s conftest$ac_exeext &&
18558 $as_test_x conftest$ac_exeext; then
18559 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18560else
18561 echo "$as_me: failed program was:" >&5
19650fd6
AS
18562sed 's/^/| /' conftest.$ac_ext >&5
18563
d6e01aa5 18564
b936fae4 18565fi
d6e01aa5
KL
18566
18567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18568 conftest$ac_exeext conftest.$ac_ext
b936fae4 18569 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18570/* confdefs.h. */
18571_ACEOF
18572cat confdefs.h >>conftest.$ac_ext
18573cat >>conftest.$ac_ext <<_ACEOF
18574/* end confdefs.h. */
b936fae4 18575#define _LARGEFILE_SOURCE 1
c982cf7d 18576#include <stdio.h>
b936fae4
AS
18577int
18578main ()
18579{
c982cf7d 18580return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18581 ;
18582 return 0;
18583}
18584_ACEOF
d6e01aa5
KL
18585rm -f conftest.$ac_objext conftest$ac_exeext
18586if { (ac_try="$ac_link"
18587case "(($ac_try" in
18588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18589 *) ac_try_echo=$ac_try;;
18590esac
18591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18592 (eval "$ac_link") 2>conftest.er1
b936fae4 18593 ac_status=$?
edfaf76d
LK
18594 grep -v '^ *+' conftest.er1 >conftest.err
18595 rm -f conftest.er1
18596 cat conftest.err >&5
c0d27fcc 18597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18598 (exit $ac_status); } && {
18599 test -z "$ac_c_werror_flag" ||
18600 test ! -s conftest.err
18601 } && test -s conftest$ac_exeext &&
18602 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18603 ac_cv_sys_largefile_source=1; break
18604else
18605 echo "$as_me: failed program was:" >&5
19650fd6
AS
18606sed 's/^/| /' conftest.$ac_ext >&5
18607
d6e01aa5 18608
b936fae4 18609fi
d6e01aa5
KL
18610
18611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18612 conftest$ac_exeext conftest.$ac_ext
18613 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18614 break
18615done
18616fi
d6e01aa5
KL
18617{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18618echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18619case $ac_cv_sys_largefile_source in #(
18620 no | unknown) ;;
18621 *)
c0d27fcc 18622cat >>confdefs.h <<_ACEOF
b936fae4 18623#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18624_ACEOF
d6e01aa5
KL
18625;;
18626esac
b936fae4 18627rm -f conftest*
4c343001 18628
b936fae4
AS
18629# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18630# in glibc 2.1.3, but that breaks too many other things.
18631# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
d6e01aa5 18632if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18633
c0d27fcc 18634cat >>confdefs.h <<\_ACEOF
b936fae4 18635#define HAVE_FSEEKO 1
c0d27fcc 18636_ACEOF
b936fae4 18637
4c343001
DL
18638fi
18639
c0d27fcc 18640
52dbaac8
PE
18641# Configure getopt.
18642# getopt.m4 serial 10
18643
18644# The getopt module assume you want GNU getopt, with getopt_long etc,
18645# rather than vanilla POSIX getopt. This means your your code should
18646# always include <getopt.h> for the getopt prototypes.
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658# Prerequisites of lib/getopt*.
18659
18660
18661
10a3b1a1 18662
52dbaac8
PE
18663 GETOPT_H=
18664
18665for ac_header in getopt.h
18666do
18667as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18669 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18671if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18672 echo $ECHO_N "(cached) $ECHO_C" >&6
18673fi
d6e01aa5
KL
18674ac_res=`eval echo '${'$as_ac_Header'}'`
18675 { echo "$as_me:$LINENO: result: $ac_res" >&5
18676echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18677else
18678 # Is the header compilable?
d6e01aa5
KL
18679{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18680echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18681cat >conftest.$ac_ext <<_ACEOF
18682/* confdefs.h. */
18683_ACEOF
18684cat confdefs.h >>conftest.$ac_ext
18685cat >>conftest.$ac_ext <<_ACEOF
18686/* end confdefs.h. */
18687$ac_includes_default
18688#include <$ac_header>
18689_ACEOF
18690rm -f conftest.$ac_objext
d6e01aa5
KL
18691if { (ac_try="$ac_compile"
18692case "(($ac_try" in
18693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18694 *) ac_try_echo=$ac_try;;
18695esac
18696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18697 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18698 ac_status=$?
18699 grep -v '^ *+' conftest.er1 >conftest.err
18700 rm -f conftest.er1
18701 cat conftest.err >&5
18702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18703 (exit $ac_status); } && {
18704 test -z "$ac_c_werror_flag" ||
18705 test ! -s conftest.err
18706 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18707 ac_header_compiler=yes
18708else
18709 echo "$as_me: failed program was:" >&5
18710sed 's/^/| /' conftest.$ac_ext >&5
18711
d6e01aa5 18712 ac_header_compiler=no
52dbaac8 18713fi
d6e01aa5
KL
18714
18715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18717echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18718
18719# Is the header present?
d6e01aa5
KL
18720{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18721echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18722cat >conftest.$ac_ext <<_ACEOF
18723/* confdefs.h. */
18724_ACEOF
18725cat confdefs.h >>conftest.$ac_ext
18726cat >>conftest.$ac_ext <<_ACEOF
18727/* end confdefs.h. */
18728#include <$ac_header>
18729_ACEOF
d6e01aa5
KL
18730if { (ac_try="$ac_cpp conftest.$ac_ext"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18737 ac_status=$?
18738 grep -v '^ *+' conftest.er1 >conftest.err
18739 rm -f conftest.er1
18740 cat conftest.err >&5
18741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18742 (exit $ac_status); } >/dev/null && {
18743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 }; then
52dbaac8
PE
18746 ac_header_preproc=yes
18747else
18748 echo "$as_me: failed program was:" >&5
18749sed 's/^/| /' conftest.$ac_ext >&5
18750
18751 ac_header_preproc=no
18752fi
d6e01aa5 18753
52dbaac8 18754rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18755{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18756echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18757
18758# So? What about this header?
18759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18760 yes:no: )
18761 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18762echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18763 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18764echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18765 ac_header_preproc=yes
18766 ;;
18767 no:yes:* )
18768 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18769echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18770 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18771echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18772 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18773echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18774 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18775echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18776 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18777echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18778 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18779echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18780
52dbaac8
PE
18781 ;;
18782esac
d6e01aa5
KL
18783{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18784echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18785if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18787else
18788 eval "$as_ac_Header=\$ac_header_preproc"
18789fi
d6e01aa5
KL
18790ac_res=`eval echo '${'$as_ac_Header'}'`
18791 { echo "$as_me:$LINENO: result: $ac_res" >&5
18792echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18793
18794fi
18795if test `eval echo '${'$as_ac_Header'}'` = yes; then
18796 cat >>confdefs.h <<_ACEOF
18797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18798_ACEOF
18799
18800else
18801 GETOPT_H=getopt.h
18802fi
18803
18804done
18805
18806 if test -z "$GETOPT_H"; then
18807
18808for ac_func in getopt_long_only
18809do
18810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18814 echo $ECHO_N "(cached) $ECHO_C" >&6
18815else
18816 cat >conftest.$ac_ext <<_ACEOF
18817/* confdefs.h. */
18818_ACEOF
18819cat confdefs.h >>conftest.$ac_ext
18820cat >>conftest.$ac_ext <<_ACEOF
18821/* end confdefs.h. */
18822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18824#define $ac_func innocuous_$ac_func
18825
18826/* System header to define __stub macros and hopefully few prototypes,
18827 which can conflict with char $ac_func (); below.
18828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18829 <limits.h> exists even on freestanding compilers. */
18830
18831#ifdef __STDC__
18832# include <limits.h>
18833#else
18834# include <assert.h>
18835#endif
18836
18837#undef $ac_func
18838
d6e01aa5
KL
18839/* Override any GCC internal prototype to avoid an error.
18840 Use char because int might match the return type of a GCC
18841 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18842#ifdef __cplusplus
18843extern "C"
52dbaac8 18844#endif
52dbaac8
PE
18845char $ac_func ();
18846/* The GNU C library defines this for functions which it implements
18847 to always fail with ENOSYS. Some functions are actually named
18848 something starting with __ and the normal name is an alias. */
d6e01aa5 18849#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18850choke me
52dbaac8
PE
18851#endif
18852
18853int
18854main ()
18855{
d6e01aa5 18856return $ac_func ();
52dbaac8
PE
18857 ;
18858 return 0;
18859}
18860_ACEOF
18861rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18862if { (ac_try="$ac_link"
18863case "(($ac_try" in
18864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18865 *) ac_try_echo=$ac_try;;
18866esac
18867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18868 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18869 ac_status=$?
18870 grep -v '^ *+' conftest.er1 >conftest.err
18871 rm -f conftest.er1
18872 cat conftest.err >&5
18873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18874 (exit $ac_status); } && {
18875 test -z "$ac_c_werror_flag" ||
18876 test ! -s conftest.err
18877 } && test -s conftest$ac_exeext &&
18878 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18879 eval "$as_ac_var=yes"
18880else
18881 echo "$as_me: failed program was:" >&5
18882sed 's/^/| /' conftest.$ac_ext >&5
18883
d6e01aa5 18884 eval "$as_ac_var=no"
52dbaac8 18885fi
d6e01aa5
KL
18886
18887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18888 conftest$ac_exeext conftest.$ac_ext
18889fi
d6e01aa5
KL
18890ac_res=`eval echo '${'$as_ac_var'}'`
18891 { echo "$as_me:$LINENO: result: $ac_res" >&5
18892echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18893if test `eval echo '${'$as_ac_var'}'` = yes; then
18894 cat >>confdefs.h <<_ACEOF
18895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18896_ACEOF
18897
18898else
18899 GETOPT_H=getopt.h
18900fi
18901done
18902
18903 fi
18904
18905 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18906 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18907echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18908if test "${ac_cv_have_decl_optreset+set}" = set; then
18909 echo $ECHO_N "(cached) $ECHO_C" >&6
18910else
18911 cat >conftest.$ac_ext <<_ACEOF
18912/* confdefs.h. */
18913_ACEOF
18914cat confdefs.h >>conftest.$ac_ext
18915cat >>conftest.$ac_ext <<_ACEOF
18916/* end confdefs.h. */
18917#include <getopt.h>
18918
18919int
18920main ()
18921{
18922#ifndef optreset
d6e01aa5 18923 (void) optreset;
52dbaac8
PE
18924#endif
18925
18926 ;
18927 return 0;
18928}
18929_ACEOF
18930rm -f conftest.$ac_objext
d6e01aa5
KL
18931if { (ac_try="$ac_compile"
18932case "(($ac_try" in
18933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18934 *) ac_try_echo=$ac_try;;
18935esac
18936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18937 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18938 ac_status=$?
18939 grep -v '^ *+' conftest.er1 >conftest.err
18940 rm -f conftest.er1
18941 cat conftest.err >&5
18942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18943 (exit $ac_status); } && {
18944 test -z "$ac_c_werror_flag" ||
18945 test ! -s conftest.err
18946 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18947 ac_cv_have_decl_optreset=yes
18948else
18949 echo "$as_me: failed program was:" >&5
18950sed 's/^/| /' conftest.$ac_ext >&5
18951
d6e01aa5 18952 ac_cv_have_decl_optreset=no
52dbaac8 18953fi
d6e01aa5
KL
18954
18955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18956fi
d6e01aa5
KL
18957{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18958echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18959if test $ac_cv_have_decl_optreset = yes; then
18960 GETOPT_H=getopt.h
18961fi
18962
18963 fi
18964
18965 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18966 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18967echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18968if test "${gl_cv_func_gnu_getopt+set}" = set; then
18969 echo $ECHO_N "(cached) $ECHO_C" >&6
18970else
18971 if test "$cross_compiling" = yes; then
d6e01aa5
KL
18972 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18973echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18974if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18975 echo $ECHO_N "(cached) $ECHO_C" >&6
18976else
18977 cat >conftest.$ac_ext <<_ACEOF
18978/* confdefs.h. */
18979_ACEOF
18980cat confdefs.h >>conftest.$ac_ext
18981cat >>conftest.$ac_ext <<_ACEOF
18982/* end confdefs.h. */
18983#include <getopt.h>
18984
18985int
18986main ()
18987{
18988#ifndef getopt_clip
d6e01aa5 18989 (void) getopt_clip;
52dbaac8
PE
18990#endif
18991
18992 ;
18993 return 0;
18994}
18995_ACEOF
18996rm -f conftest.$ac_objext
d6e01aa5
KL
18997if { (ac_try="$ac_compile"
18998case "(($ac_try" in
18999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19000 *) ac_try_echo=$ac_try;;
19001esac
19002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19003 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19004 ac_status=$?
19005 grep -v '^ *+' conftest.er1 >conftest.err
19006 rm -f conftest.er1
19007 cat conftest.err >&5
19008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19009 (exit $ac_status); } && {
19010 test -z "$ac_c_werror_flag" ||
19011 test ! -s conftest.err
19012 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19013 ac_cv_have_decl_getopt_clip=yes
19014else
19015 echo "$as_me: failed program was:" >&5
19016sed 's/^/| /' conftest.$ac_ext >&5
19017
d6e01aa5 19018 ac_cv_have_decl_getopt_clip=no
52dbaac8 19019fi
d6e01aa5
KL
19020
19021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19022fi
d6e01aa5
KL
19023{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19024echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19025if test $ac_cv_have_decl_getopt_clip = yes; then
19026 gl_cv_func_gnu_getopt=no
19027else
19028 gl_cv_func_gnu_getopt=yes
19029fi
19030
19031else
19032 cat >conftest.$ac_ext <<_ACEOF
19033/* confdefs.h. */
19034_ACEOF
19035cat confdefs.h >>conftest.$ac_ext
19036cat >>conftest.$ac_ext <<_ACEOF
19037/* end confdefs.h. */
19038#include <getopt.h>
19039int
19040main ()
19041{
19042
19043 char *myargv[3];
19044 myargv[0] = "conftest";
19045 myargv[1] = "-+";
19046 myargv[2] = 0;
19047 return getopt (2, myargv, "+a") != '?';
19048
19049 ;
19050 return 0;
19051}
19052_ACEOF
19053rm -f conftest$ac_exeext
d6e01aa5
KL
19054if { (ac_try="$ac_link"
19055case "(($ac_try" in
19056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19057 *) ac_try_echo=$ac_try;;
19058esac
19059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19060 (eval "$ac_link") 2>&5
52dbaac8
PE
19061 ac_status=$?
19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
19064 { (case "(($ac_try" in
19065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19066 *) ac_try_echo=$ac_try;;
19067esac
19068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19069 (eval "$ac_try") 2>&5
52dbaac8
PE
19070 ac_status=$?
19071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19072 (exit $ac_status); }; }; then
19073 gl_cv_func_gnu_getopt=yes
19074else
19075 echo "$as_me: program exited with status $ac_status" >&5
19076echo "$as_me: failed program was:" >&5
19077sed 's/^/| /' conftest.$ac_ext >&5
19078
19079( exit $ac_status )
19080gl_cv_func_gnu_getopt=no
19081fi
d6e01aa5 19082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19083fi
d6e01aa5
KL
19084
19085
52dbaac8 19086fi
d6e01aa5
KL
19087{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19088echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19089 if test "$gl_cv_func_gnu_getopt" = "no"; then
19090 GETOPT_H=getopt.h
19091 fi
19092 fi
19093
19094
19095
19096 if test -n "$GETOPT_H"; then
19097
19098
19099 GETOPT_H=getopt.h
19100
19101cat >>confdefs.h <<\_ACEOF
19102#define __GETOPT_PREFIX rpl_
19103_ACEOF
19104
19105
19106
19107 :
19108 GETOPTOBJS='getopt.o getopt1.o'
19109
19110fi
19111
19112
19113
19114
d6e01aa5
KL
19115{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19116echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19117if test "${ac_cv_func_getpgrp_void+set}" = set; then
19118 echo $ECHO_N "(cached) $ECHO_C" >&6
19119else
19120 # Use it with a single arg.
19121cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19122/* confdefs.h. */
19123_ACEOF
19124cat confdefs.h >>conftest.$ac_ext
19125cat >>conftest.$ac_ext <<_ACEOF
19126/* end confdefs.h. */
cd958eb3
MB
19127$ac_includes_default
19128int
19129main ()
19130{
19131getpgrp (0);
19132 ;
19133 return 0;
19134}
19135_ACEOF
19136rm -f conftest.$ac_objext
d6e01aa5
KL
19137if { (ac_try="$ac_compile"
19138case "(($ac_try" in
19139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19140 *) ac_try_echo=$ac_try;;
19141esac
19142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19143 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19144 ac_status=$?
edfaf76d
LK
19145 grep -v '^ *+' conftest.er1 >conftest.err
19146 rm -f conftest.er1
19147 cat conftest.err >&5
cd958eb3 19148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19149 (exit $ac_status); } && {
19150 test -z "$ac_c_werror_flag" ||
19151 test ! -s conftest.err
19152 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19153 ac_cv_func_getpgrp_void=no
19154else
19155 echo "$as_me: failed program was:" >&5
19650fd6
AS
19156sed 's/^/| /' conftest.$ac_ext >&5
19157
d6e01aa5 19158 ac_cv_func_getpgrp_void=yes
cd958eb3 19159fi
d6e01aa5
KL
19160
19161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19162
19163fi
d6e01aa5
KL
19164{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19165echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19166if test $ac_cv_func_getpgrp_void = yes; then
19167
19168cat >>confdefs.h <<\_ACEOF
19169#define GETPGRP_VOID 1
19170_ACEOF
19171
19172fi
19173
19174
973a76b1
DL
19175
19176for ac_func in strftime
19177do
19178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19179{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19181if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19182 echo $ECHO_N "(cached) $ECHO_C" >&6
19183else
19184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19185/* confdefs.h. */
19186_ACEOF
19187cat confdefs.h >>conftest.$ac_ext
19188cat >>conftest.$ac_ext <<_ACEOF
19189/* end confdefs.h. */
edfaf76d
LK
19190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19192#define $ac_func innocuous_$ac_func
19193
973a76b1 19194/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19195 which can conflict with char $ac_func (); below.
19196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19197 <limits.h> exists even on freestanding compilers. */
edfaf76d 19198
19650fd6
AS
19199#ifdef __STDC__
19200# include <limits.h>
19201#else
19202# include <assert.h>
19203#endif
edfaf76d
LK
19204
19205#undef $ac_func
19206
d6e01aa5
KL
19207/* Override any GCC internal prototype to avoid an error.
19208 Use char because int might match the return type of a GCC
19209 builtin and then its argument prototype would still apply. */
973a76b1
DL
19210#ifdef __cplusplus
19211extern "C"
973a76b1 19212#endif
973a76b1
DL
19213char $ac_func ();
19214/* The GNU C library defines this for functions which it implements
19215 to always fail with ENOSYS. Some functions are actually named
19216 something starting with __ and the normal name is an alias. */
d6e01aa5 19217#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19218choke me
973a76b1
DL
19219#endif
19220
19650fd6
AS
19221int
19222main ()
19223{
d6e01aa5 19224return $ac_func ();
973a76b1
DL
19225 ;
19226 return 0;
19227}
19228_ACEOF
19229rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19230if { (ac_try="$ac_link"
19231case "(($ac_try" in
19232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19233 *) ac_try_echo=$ac_try;;
19234esac
19235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19236 (eval "$ac_link") 2>conftest.er1
973a76b1 19237 ac_status=$?
edfaf76d
LK
19238 grep -v '^ *+' conftest.er1 >conftest.err
19239 rm -f conftest.er1
19240 cat conftest.err >&5
973a76b1 19241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19242 (exit $ac_status); } && {
19243 test -z "$ac_c_werror_flag" ||
19244 test ! -s conftest.err
19245 } && test -s conftest$ac_exeext &&
19246 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19247 eval "$as_ac_var=yes"
19248else
19249 echo "$as_me: failed program was:" >&5
19650fd6
AS
19250sed 's/^/| /' conftest.$ac_ext >&5
19251
d6e01aa5 19252 eval "$as_ac_var=no"
973a76b1 19253fi
d6e01aa5
KL
19254
19255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19256 conftest$ac_exeext conftest.$ac_ext
973a76b1 19257fi
d6e01aa5
KL
19258ac_res=`eval echo '${'$as_ac_var'}'`
19259 { echo "$as_me:$LINENO: result: $ac_res" >&5
19260echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19261if test `eval echo '${'$as_ac_var'}'` = yes; then
19262 cat >>confdefs.h <<_ACEOF
19263#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19264_ACEOF
19265
19266else
19267 # strftime is in -lintl on SCO UNIX.
d6e01aa5
KL
19268{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19269echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19270if test "${ac_cv_lib_intl_strftime+set}" = set; then
19271 echo $ECHO_N "(cached) $ECHO_C" >&6
19272else
19273 ac_check_lib_save_LIBS=$LIBS
19274LIBS="-lintl $LIBS"
19275cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19276/* confdefs.h. */
19277_ACEOF
19278cat confdefs.h >>conftest.$ac_ext
19279cat >>conftest.$ac_ext <<_ACEOF
19280/* end confdefs.h. */
973a76b1 19281
d6e01aa5
KL
19282/* Override any GCC internal prototype to avoid an error.
19283 Use char because int might match the return type of a GCC
19284 builtin and then its argument prototype would still apply. */
973a76b1
DL
19285#ifdef __cplusplus
19286extern "C"
19287#endif
973a76b1
DL
19288char strftime ();
19289int
19290main ()
19291{
d6e01aa5 19292return strftime ();
973a76b1
DL
19293 ;
19294 return 0;
19295}
19296_ACEOF
19297rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19298if { (ac_try="$ac_link"
19299case "(($ac_try" in
19300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19301 *) ac_try_echo=$ac_try;;
19302esac
19303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19304 (eval "$ac_link") 2>conftest.er1
973a76b1 19305 ac_status=$?
edfaf76d
LK
19306 grep -v '^ *+' conftest.er1 >conftest.err
19307 rm -f conftest.er1
19308 cat conftest.err >&5
973a76b1 19309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19310 (exit $ac_status); } && {
19311 test -z "$ac_c_werror_flag" ||
19312 test ! -s conftest.err
19313 } && test -s conftest$ac_exeext &&
19314 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19315 ac_cv_lib_intl_strftime=yes
19316else
19317 echo "$as_me: failed program was:" >&5
19650fd6
AS
19318sed 's/^/| /' conftest.$ac_ext >&5
19319
d6e01aa5 19320 ac_cv_lib_intl_strftime=no
973a76b1 19321fi
d6e01aa5
KL
19322
19323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19324 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19325LIBS=$ac_check_lib_save_LIBS
19326fi
d6e01aa5
KL
19327{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19328echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19329if test $ac_cv_lib_intl_strftime = yes; then
19330 cat >>confdefs.h <<\_ACEOF
19331#define HAVE_STRFTIME 1
19332_ACEOF
19333
19334LIBS="-lintl $LIBS"
19335fi
19336
19337fi
19338done
19339
19340
b936fae4
AS
19341# UNIX98 PTYs.
19342
19343for ac_func in grantpt
503d2be0
AS
19344do
19345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19346{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19348if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19349 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19350else
503d2be0 19351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19352/* confdefs.h. */
19353_ACEOF
19354cat confdefs.h >>conftest.$ac_ext
19355cat >>conftest.$ac_ext <<_ACEOF
19356/* end confdefs.h. */
edfaf76d
LK
19357/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19358 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19359#define $ac_func innocuous_$ac_func
19360
503d2be0 19361/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19362 which can conflict with char $ac_func (); below.
19363 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19364 <limits.h> exists even on freestanding compilers. */
edfaf76d 19365
19650fd6
AS
19366#ifdef __STDC__
19367# include <limits.h>
19368#else
19369# include <assert.h>
19370#endif
edfaf76d
LK
19371
19372#undef $ac_func
19373
d6e01aa5
KL
19374/* Override any GCC internal prototype to avoid an error.
19375 Use char because int might match the return type of a GCC
19376 builtin and then its argument prototype would still apply. */
503d2be0
AS
19377#ifdef __cplusplus
19378extern "C"
19379#endif
503d2be0 19380char $ac_func ();
503d2be0
AS
19381/* The GNU C library defines this for functions which it implements
19382 to always fail with ENOSYS. Some functions are actually named
19383 something starting with __ and the normal name is an alias. */
d6e01aa5 19384#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19385choke me
503d2be0 19386#endif
4c343001 19387
19650fd6
AS
19388int
19389main ()
19390{
d6e01aa5 19391return $ac_func ();
503d2be0
AS
19392 ;
19393 return 0;
19394}
19395_ACEOF
19396rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19397if { (ac_try="$ac_link"
19398case "(($ac_try" in
19399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19400 *) ac_try_echo=$ac_try;;
19401esac
19402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19403 (eval "$ac_link") 2>conftest.er1
503d2be0 19404 ac_status=$?
edfaf76d
LK
19405 grep -v '^ *+' conftest.er1 >conftest.err
19406 rm -f conftest.er1
19407 cat conftest.err >&5
c0d27fcc 19408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19409 (exit $ac_status); } && {
19410 test -z "$ac_c_werror_flag" ||
19411 test ! -s conftest.err
19412 } && test -s conftest$ac_exeext &&
19413 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19414 eval "$as_ac_var=yes"
19415else
19416 echo "$as_me: failed program was:" >&5
19650fd6
AS
19417sed 's/^/| /' conftest.$ac_ext >&5
19418
d6e01aa5 19419 eval "$as_ac_var=no"
503d2be0 19420fi
d6e01aa5
KL
19421
19422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19423 conftest$ac_exeext conftest.$ac_ext
503d2be0 19424fi
d6e01aa5
KL
19425ac_res=`eval echo '${'$as_ac_var'}'`
19426 { echo "$as_me:$LINENO: result: $ac_res" >&5
19427echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19428if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19429 cat >>confdefs.h <<_ACEOF
503d2be0 19430#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19431_ACEOF
4c343001
DL
19432
19433fi
503d2be0
AS
19434done
19435
c0d27fcc 19436
b936fae4 19437# PTY-related GNU extensions.
4c343001 19438
b936fae4
AS
19439for ac_func in getpt
19440do
19441as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19442{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19443echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19444if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19445 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19446else
b936fae4 19447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19448/* confdefs.h. */
19449_ACEOF
19450cat confdefs.h >>conftest.$ac_ext
19451cat >>conftest.$ac_ext <<_ACEOF
19452/* end confdefs.h. */
edfaf76d
LK
19453/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19454 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19455#define $ac_func innocuous_$ac_func
19456
087121cc 19457/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19458 which can conflict with char $ac_func (); below.
19459 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19460 <limits.h> exists even on freestanding compilers. */
edfaf76d 19461
19650fd6
AS
19462#ifdef __STDC__
19463# include <limits.h>
19464#else
19465# include <assert.h>
19466#endif
edfaf76d
LK
19467
19468#undef $ac_func
19469
d6e01aa5
KL
19470/* Override any GCC internal prototype to avoid an error.
19471 Use char because int might match the return type of a GCC
19472 builtin and then its argument prototype would still apply. */
503d2be0
AS
19473#ifdef __cplusplus
19474extern "C"
19475#endif
503d2be0 19476char $ac_func ();
087121cc
GM
19477/* The GNU C library defines this for functions which it implements
19478 to always fail with ENOSYS. Some functions are actually named
19479 something starting with __ and the normal name is an alias. */
d6e01aa5 19480#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19481choke me
087121cc
GM
19482#endif
19483
19650fd6
AS
19484int
19485main ()
19486{
d6e01aa5 19487return $ac_func ();
503d2be0
AS
19488 ;
19489 return 0;
19490}
19491_ACEOF
19492rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19493if { (ac_try="$ac_link"
19494case "(($ac_try" in
19495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19496 *) ac_try_echo=$ac_try;;
19497esac
19498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19499 (eval "$ac_link") 2>conftest.er1
503d2be0 19500 ac_status=$?
edfaf76d
LK
19501 grep -v '^ *+' conftest.er1 >conftest.err
19502 rm -f conftest.er1
19503 cat conftest.err >&5
c0d27fcc 19504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19505 (exit $ac_status); } && {
19506 test -z "$ac_c_werror_flag" ||
19507 test ! -s conftest.err
19508 } && test -s conftest$ac_exeext &&
19509 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19510 eval "$as_ac_var=yes"
19511else
19512 echo "$as_me: failed program was:" >&5
19650fd6
AS
19513sed 's/^/| /' conftest.$ac_ext >&5
19514
d6e01aa5 19515 eval "$as_ac_var=no"
503d2be0 19516fi
d6e01aa5
KL
19517
19518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19519 conftest$ac_exeext conftest.$ac_ext
503d2be0 19520fi
d6e01aa5
KL
19521ac_res=`eval echo '${'$as_ac_var'}'`
19522 { echo "$as_me:$LINENO: result: $ac_res" >&5
19523echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19524if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19525 cat >>confdefs.h <<_ACEOF
503d2be0 19526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19527_ACEOF
087121cc 19528
087121cc
GM
19529fi
19530done
19531
c0d27fcc 19532
ba4481b5
DL
19533# Check this now, so that we will NOT find the above functions in ncurses.
19534# That is because we have not set up to link ncurses in lib-src.
19535# It's better to believe a function is not available
19536# than to expect to find it in ncurses.
503d2be0 19537
d6e01aa5
KL
19538{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19539echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19540if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19541 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19542else
503d2be0 19543 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19544LIBS="-lncurses $LIBS"
503d2be0 19545cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19546/* confdefs.h. */
19547_ACEOF
19548cat confdefs.h >>conftest.$ac_ext
19549cat >>conftest.$ac_ext <<_ACEOF
19550/* end confdefs.h. */
503d2be0 19551
d6e01aa5
KL
19552/* Override any GCC internal prototype to avoid an error.
19553 Use char because int might match the return type of a GCC
19554 builtin and then its argument prototype would still apply. */
503d2be0
AS
19555#ifdef __cplusplus
19556extern "C"
19557#endif
503d2be0
AS
19558char tparm ();
19559int
19560main ()
19561{
d6e01aa5 19562return tparm ();
503d2be0
AS
19563 ;
19564 return 0;
19565}
19566_ACEOF
19567rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19568if { (ac_try="$ac_link"
19569case "(($ac_try" in
19570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19571 *) ac_try_echo=$ac_try;;
19572esac
19573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19574 (eval "$ac_link") 2>conftest.er1
503d2be0 19575 ac_status=$?
edfaf76d
LK
19576 grep -v '^ *+' conftest.er1 >conftest.err
19577 rm -f conftest.er1
19578 cat conftest.err >&5
c0d27fcc 19579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19580 (exit $ac_status); } && {
19581 test -z "$ac_c_werror_flag" ||
19582 test ! -s conftest.err
19583 } && test -s conftest$ac_exeext &&
19584 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19585 ac_cv_lib_ncurses_tparm=yes
19586else
19587 echo "$as_me: failed program was:" >&5
19650fd6
AS
19588sed 's/^/| /' conftest.$ac_ext >&5
19589
d6e01aa5 19590 ac_cv_lib_ncurses_tparm=no
503d2be0 19591fi
d6e01aa5
KL
19592
19593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19594 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19595LIBS=$ac_check_lib_save_LIBS
19596fi
d6e01aa5
KL
19597{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19598echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19599if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19600 cat >>confdefs.h <<_ACEOF
503d2be0 19601#define HAVE_LIBNCURSES 1
c0d27fcc 19602_ACEOF
ba4481b5
DL
19603
19604 LIBS="-lncurses $LIBS"
19605
ba4481b5
DL
19606fi
19607
c0d27fcc 19608
84e70f78
KR
19609# Do we need the Hesiod library to provide the support routines?
19610if test "$with_hesiod" = yes ; then
19611 # Don't set $LIBS here -- see comments above.
19612 resolv=no
d6e01aa5
KL
19613 { echo "$as_me:$LINENO: checking for res_send" >&5
19614echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19615if test "${ac_cv_func_res_send+set}" = set; then
19616 echo $ECHO_N "(cached) $ECHO_C" >&6
19617else
19618 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19619/* confdefs.h. */
19620_ACEOF
19621cat confdefs.h >>conftest.$ac_ext
19622cat >>conftest.$ac_ext <<_ACEOF
19623/* end confdefs.h. */
edfaf76d
LK
19624/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19625 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19626#define res_send innocuous_res_send
19627
84e70f78 19628/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19629 which can conflict with char res_send (); below.
19630 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19631 <limits.h> exists even on freestanding compilers. */
edfaf76d 19632
19650fd6
AS
19633#ifdef __STDC__
19634# include <limits.h>
19635#else
19636# include <assert.h>
19637#endif
edfaf76d
LK
19638
19639#undef res_send
19640
d6e01aa5
KL
19641/* Override any GCC internal prototype to avoid an error.
19642 Use char because int might match the return type of a GCC
19643 builtin and then its argument prototype would still apply. */
84e70f78
KR
19644#ifdef __cplusplus
19645extern "C"
19646#endif
84e70f78 19647char res_send ();
84e70f78
KR
19648/* The GNU C library defines this for functions which it implements
19649 to always fail with ENOSYS. Some functions are actually named
19650 something starting with __ and the normal name is an alias. */
d6e01aa5 19651#if defined __stub_res_send || defined __stub___res_send
84e70f78 19652choke me
cd958eb3
MB
19653#endif
19654
19650fd6
AS
19655int
19656main ()
19657{
d6e01aa5 19658return res_send ();
84e70f78
KR
19659 ;
19660 return 0;
19661}
19662_ACEOF
19663rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19664if { (ac_try="$ac_link"
19665case "(($ac_try" in
19666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19667 *) ac_try_echo=$ac_try;;
19668esac
19669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19670 (eval "$ac_link") 2>conftest.er1
84e70f78 19671 ac_status=$?
edfaf76d
LK
19672 grep -v '^ *+' conftest.er1 >conftest.err
19673 rm -f conftest.er1
19674 cat conftest.err >&5
c0d27fcc 19675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19676 (exit $ac_status); } && {
19677 test -z "$ac_c_werror_flag" ||
19678 test ! -s conftest.err
19679 } && test -s conftest$ac_exeext &&
19680 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19681 ac_cv_func_res_send=yes
19682else
19683 echo "$as_me: failed program was:" >&5
19650fd6
AS
19684sed 's/^/| /' conftest.$ac_ext >&5
19685
d6e01aa5 19686 ac_cv_func_res_send=no
84e70f78 19687fi
d6e01aa5
KL
19688
19689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19690 conftest$ac_exeext conftest.$ac_ext
84e70f78 19691fi
d6e01aa5
KL
19692{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19693echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19694if test $ac_cv_func_res_send = yes; then
19695 :
19696else
d6e01aa5
KL
19697 { echo "$as_me:$LINENO: checking for __res_send" >&5
19698echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19699if test "${ac_cv_func___res_send+set}" = set; then
19700 echo $ECHO_N "(cached) $ECHO_C" >&6
19701else
19702 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
edfaf76d
LK
19708/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19709 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19710#define __res_send innocuous___res_send
19711
84e70f78 19712/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19713 which can conflict with char __res_send (); below.
19714 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19715 <limits.h> exists even on freestanding compilers. */
edfaf76d 19716
19650fd6
AS
19717#ifdef __STDC__
19718# include <limits.h>
19719#else
19720# include <assert.h>
19721#endif
edfaf76d
LK
19722
19723#undef __res_send
19724
d6e01aa5
KL
19725/* Override any GCC internal prototype to avoid an error.
19726 Use char because int might match the return type of a GCC
19727 builtin and then its argument prototype would still apply. */
84e70f78
KR
19728#ifdef __cplusplus
19729extern "C"
19730#endif
84e70f78 19731char __res_send ();
84e70f78
KR
19732/* The GNU C library defines this for functions which it implements
19733 to always fail with ENOSYS. Some functions are actually named
19734 something starting with __ and the normal name is an alias. */
d6e01aa5 19735#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19736choke me
84e70f78
KR
19737#endif
19738
19650fd6
AS
19739int
19740main ()
19741{
d6e01aa5 19742return __res_send ();
84e70f78
KR
19743 ;
19744 return 0;
19745}
19746_ACEOF
19747rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19748if { (ac_try="$ac_link"
19749case "(($ac_try" in
19750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19751 *) ac_try_echo=$ac_try;;
19752esac
19753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19754 (eval "$ac_link") 2>conftest.er1
84e70f78 19755 ac_status=$?
edfaf76d
LK
19756 grep -v '^ *+' conftest.er1 >conftest.err
19757 rm -f conftest.er1
19758 cat conftest.err >&5
c0d27fcc 19759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19760 (exit $ac_status); } && {
19761 test -z "$ac_c_werror_flag" ||
19762 test ! -s conftest.err
19763 } && test -s conftest$ac_exeext &&
19764 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19765 ac_cv_func___res_send=yes
19766else
19767 echo "$as_me: failed program was:" >&5
19650fd6
AS
19768sed 's/^/| /' conftest.$ac_ext >&5
19769
d6e01aa5 19770 ac_cv_func___res_send=no
84e70f78 19771fi
d6e01aa5
KL
19772
19773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19774 conftest$ac_exeext conftest.$ac_ext
84e70f78 19775fi
d6e01aa5
KL
19776{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19777echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19778if test $ac_cv_func___res_send = yes; then
19779 :
19780else
d6e01aa5
KL
19781 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19782echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19783if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19784 echo $ECHO_N "(cached) $ECHO_C" >&6
19785else
19786 ac_check_lib_save_LIBS=$LIBS
19787LIBS="-lresolv $LIBS"
19788cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
84e70f78 19794
d6e01aa5
KL
19795/* Override any GCC internal prototype to avoid an error.
19796 Use char because int might match the return type of a GCC
19797 builtin and then its argument prototype would still apply. */
84e70f78
KR
19798#ifdef __cplusplus
19799extern "C"
19800#endif
84e70f78
KR
19801char res_send ();
19802int
19803main ()
19804{
d6e01aa5 19805return res_send ();
84e70f78
KR
19806 ;
19807 return 0;
19808}
19809_ACEOF
19810rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19811if { (ac_try="$ac_link"
19812case "(($ac_try" in
19813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19814 *) ac_try_echo=$ac_try;;
19815esac
19816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19817 (eval "$ac_link") 2>conftest.er1
84e70f78 19818 ac_status=$?
edfaf76d
LK
19819 grep -v '^ *+' conftest.er1 >conftest.err
19820 rm -f conftest.er1
19821 cat conftest.err >&5
c0d27fcc 19822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19823 (exit $ac_status); } && {
19824 test -z "$ac_c_werror_flag" ||
19825 test ! -s conftest.err
19826 } && test -s conftest$ac_exeext &&
19827 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19828 ac_cv_lib_resolv_res_send=yes
19829else
19830 echo "$as_me: failed program was:" >&5
19650fd6
AS
19831sed 's/^/| /' conftest.$ac_ext >&5
19832
d6e01aa5 19833 ac_cv_lib_resolv_res_send=no
84e70f78 19834fi
d6e01aa5
KL
19835
19836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19837 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19838LIBS=$ac_check_lib_save_LIBS
19839fi
d6e01aa5
KL
19840{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19841echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19842if test $ac_cv_lib_resolv_res_send = yes; then
19843 resolv=yes
19844else
d6e01aa5
KL
19845 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19846echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19847if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19848 echo $ECHO_N "(cached) $ECHO_C" >&6
19849else
19850 ac_check_lib_save_LIBS=$LIBS
19851LIBS="-lresolv $LIBS"
19852cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19853/* confdefs.h. */
19854_ACEOF
19855cat confdefs.h >>conftest.$ac_ext
19856cat >>conftest.$ac_ext <<_ACEOF
19857/* end confdefs.h. */
84e70f78 19858
d6e01aa5
KL
19859/* Override any GCC internal prototype to avoid an error.
19860 Use char because int might match the return type of a GCC
19861 builtin and then its argument prototype would still apply. */
84e70f78
KR
19862#ifdef __cplusplus
19863extern "C"
19864#endif
84e70f78
KR
19865char __res_send ();
19866int
19867main ()
19868{
d6e01aa5 19869return __res_send ();
84e70f78
KR
19870 ;
19871 return 0;
19872}
19873_ACEOF
19874rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19875if { (ac_try="$ac_link"
19876case "(($ac_try" in
19877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19878 *) ac_try_echo=$ac_try;;
19879esac
19880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19881 (eval "$ac_link") 2>conftest.er1
84e70f78 19882 ac_status=$?
edfaf76d
LK
19883 grep -v '^ *+' conftest.er1 >conftest.err
19884 rm -f conftest.er1
19885 cat conftest.err >&5
c0d27fcc 19886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19887 (exit $ac_status); } && {
19888 test -z "$ac_c_werror_flag" ||
19889 test ! -s conftest.err
19890 } && test -s conftest$ac_exeext &&
19891 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19892 ac_cv_lib_resolv___res_send=yes
19893else
19894 echo "$as_me: failed program was:" >&5
19650fd6
AS
19895sed 's/^/| /' conftest.$ac_ext >&5
19896
d6e01aa5 19897 ac_cv_lib_resolv___res_send=no
84e70f78 19898fi
d6e01aa5
KL
19899
19900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19901 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19902LIBS=$ac_check_lib_save_LIBS
19903fi
d6e01aa5
KL
19904{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19905echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19906if test $ac_cv_lib_resolv___res_send = yes; then
19907 resolv=yes
19908fi
19909
19910fi
19911
19912fi
19913
19914fi
19915
19916 if test "$resolv" = yes ; then
19917 RESOLVLIB=-lresolv
b936fae4 19918
c0d27fcc 19919cat >>confdefs.h <<\_ACEOF
84e70f78 19920#define HAVE_LIBRESOLV 1
c0d27fcc 19921_ACEOF
84e70f78
KR
19922
19923 else
19924 RESOLVLIB=
19925 fi
d6e01aa5
KL
19926 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19927echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19928if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19929 echo $ECHO_N "(cached) $ECHO_C" >&6
19930else
19931 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19932/* confdefs.h. */
19933_ACEOF
19934cat confdefs.h >>conftest.$ac_ext
19935cat >>conftest.$ac_ext <<_ACEOF
19936/* end confdefs.h. */
edfaf76d
LK
19937/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19939#define hes_getmailhost innocuous_hes_getmailhost
19940
84e70f78 19941/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19942 which can conflict with char hes_getmailhost (); below.
19943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19944 <limits.h> exists even on freestanding compilers. */
edfaf76d 19945
19650fd6
AS
19946#ifdef __STDC__
19947# include <limits.h>
19948#else
19949# include <assert.h>
19950#endif
edfaf76d
LK
19951
19952#undef hes_getmailhost
19953
d6e01aa5
KL
19954/* Override any GCC internal prototype to avoid an error.
19955 Use char because int might match the return type of a GCC
19956 builtin and then its argument prototype would still apply. */
84e70f78
KR
19957#ifdef __cplusplus
19958extern "C"
19959#endif
84e70f78 19960char hes_getmailhost ();
84e70f78
KR
19961/* The GNU C library defines this for functions which it implements
19962 to always fail with ENOSYS. Some functions are actually named
19963 something starting with __ and the normal name is an alias. */
d6e01aa5 19964#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19965choke me
cd958eb3
MB
19966#endif
19967
19650fd6
AS
19968int
19969main ()
19970{
d6e01aa5 19971return hes_getmailhost ();
84e70f78
KR
19972 ;
19973 return 0;
19974}
19975_ACEOF
19976rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19977if { (ac_try="$ac_link"
19978case "(($ac_try" in
19979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19980 *) ac_try_echo=$ac_try;;
19981esac
19982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19983 (eval "$ac_link") 2>conftest.er1
84e70f78 19984 ac_status=$?
edfaf76d
LK
19985 grep -v '^ *+' conftest.er1 >conftest.err
19986 rm -f conftest.er1
19987 cat conftest.err >&5
c0d27fcc 19988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19989 (exit $ac_status); } && {
19990 test -z "$ac_c_werror_flag" ||
19991 test ! -s conftest.err
19992 } && test -s conftest$ac_exeext &&
19993 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19994 ac_cv_func_hes_getmailhost=yes
19995else
19996 echo "$as_me: failed program was:" >&5
19650fd6
AS
19997sed 's/^/| /' conftest.$ac_ext >&5
19998
d6e01aa5 19999 ac_cv_func_hes_getmailhost=no
84e70f78 20000fi
d6e01aa5
KL
20001
20002rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20003 conftest$ac_exeext conftest.$ac_ext
84e70f78 20004fi
d6e01aa5
KL
20005{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20006echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20007if test $ac_cv_func_hes_getmailhost = yes; then
20008 :
20009else
d6e01aa5
KL
20010 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20011echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20012if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20013 echo $ECHO_N "(cached) $ECHO_C" >&6
20014else
20015 ac_check_lib_save_LIBS=$LIBS
20016LIBS="-lhesiod $RESOLVLIB $LIBS"
20017cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20018/* confdefs.h. */
20019_ACEOF
20020cat confdefs.h >>conftest.$ac_ext
20021cat >>conftest.$ac_ext <<_ACEOF
20022/* end confdefs.h. */
84e70f78 20023
d6e01aa5
KL
20024/* Override any GCC internal prototype to avoid an error.
20025 Use char because int might match the return type of a GCC
20026 builtin and then its argument prototype would still apply. */
84e70f78
KR
20027#ifdef __cplusplus
20028extern "C"
20029#endif
84e70f78
KR
20030char hes_getmailhost ();
20031int
20032main ()
20033{
d6e01aa5 20034return hes_getmailhost ();
84e70f78
KR
20035 ;
20036 return 0;
20037}
20038_ACEOF
20039rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20040if { (ac_try="$ac_link"
20041case "(($ac_try" in
20042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20043 *) ac_try_echo=$ac_try;;
20044esac
20045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20046 (eval "$ac_link") 2>conftest.er1
84e70f78 20047 ac_status=$?
edfaf76d
LK
20048 grep -v '^ *+' conftest.er1 >conftest.err
20049 rm -f conftest.er1
20050 cat conftest.err >&5
c0d27fcc 20051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20052 (exit $ac_status); } && {
20053 test -z "$ac_c_werror_flag" ||
20054 test ! -s conftest.err
20055 } && test -s conftest$ac_exeext &&
20056 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20057 ac_cv_lib_hesiod_hes_getmailhost=yes
20058else
20059 echo "$as_me: failed program was:" >&5
19650fd6
AS
20060sed 's/^/| /' conftest.$ac_ext >&5
20061
d6e01aa5 20062 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20063fi
d6e01aa5
KL
20064
20065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20066 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20067LIBS=$ac_check_lib_save_LIBS
20068fi
d6e01aa5
KL
20069{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20070echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20071if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20072
c0d27fcc 20073cat >>confdefs.h <<\_ACEOF
84e70f78 20074#define HAVE_LIBHESIOD 1
c0d27fcc 20075_ACEOF
84e70f78
KR
20076
20077else
20078 :
20079fi
20080
20081fi
20082
20083fi
20084
a21616bd
KR
20085# These tell us which Kerberos-related libraries to use.
20086if test "${with_kerberos+set}" = set; then
503d2be0 20087
d6e01aa5
KL
20088{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20089echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20090if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20091 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20092else
503d2be0 20093 ac_check_lib_save_LIBS=$LIBS
a21616bd 20094LIBS="-lcom_err $LIBS"
503d2be0 20095cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20096/* confdefs.h. */
20097_ACEOF
20098cat confdefs.h >>conftest.$ac_ext
20099cat >>conftest.$ac_ext <<_ACEOF
20100/* end confdefs.h. */
503d2be0 20101
d6e01aa5
KL
20102/* Override any GCC internal prototype to avoid an error.
20103 Use char because int might match the return type of a GCC
20104 builtin and then its argument prototype would still apply. */
503d2be0
AS
20105#ifdef __cplusplus
20106extern "C"
20107#endif
503d2be0
AS
20108char com_err ();
20109int
20110main ()
20111{
d6e01aa5 20112return com_err ();
503d2be0
AS
20113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20118if { (ac_try="$ac_link"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
20123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20124 (eval "$ac_link") 2>conftest.er1
503d2be0 20125 ac_status=$?
edfaf76d
LK
20126 grep -v '^ *+' conftest.er1 >conftest.err
20127 rm -f conftest.er1
20128 cat conftest.err >&5
c0d27fcc 20129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20130 (exit $ac_status); } && {
20131 test -z "$ac_c_werror_flag" ||
20132 test ! -s conftest.err
20133 } && test -s conftest$ac_exeext &&
20134 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20135 ac_cv_lib_com_err_com_err=yes
20136else
20137 echo "$as_me: failed program was:" >&5
19650fd6
AS
20138sed 's/^/| /' conftest.$ac_ext >&5
20139
d6e01aa5 20140 ac_cv_lib_com_err_com_err=no
503d2be0 20141fi
d6e01aa5
KL
20142
20143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20144 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20145LIBS=$ac_check_lib_save_LIBS
20146fi
d6e01aa5
KL
20147{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20148echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20149if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20150 cat >>confdefs.h <<_ACEOF
503d2be0 20151#define HAVE_LIBCOM_ERR 1
c0d27fcc 20152_ACEOF
a21616bd
KR
20153
20154 LIBS="-lcom_err $LIBS"
20155
a21616bd
KR
20156fi
20157
c0d27fcc 20158
d6e01aa5
KL
20159{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20160echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20161if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20162 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20163else
503d2be0 20164 ac_check_lib_save_LIBS=$LIBS
a21616bd 20165LIBS="-lk5crypto $LIBS"
503d2be0 20166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20167/* confdefs.h. */
20168_ACEOF
20169cat confdefs.h >>conftest.$ac_ext
20170cat >>conftest.$ac_ext <<_ACEOF
20171/* end confdefs.h. */
503d2be0 20172
d6e01aa5
KL
20173/* Override any GCC internal prototype to avoid an error.
20174 Use char because int might match the return type of a GCC
20175 builtin and then its argument prototype would still apply. */
503d2be0
AS
20176#ifdef __cplusplus
20177extern "C"
20178#endif
503d2be0
AS
20179char mit_des_cbc_encrypt ();
20180int
20181main ()
20182{
d6e01aa5 20183return mit_des_cbc_encrypt ();
503d2be0
AS
20184 ;
20185 return 0;
20186}
20187_ACEOF
20188rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20189if { (ac_try="$ac_link"
20190case "(($ac_try" in
20191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20192 *) ac_try_echo=$ac_try;;
20193esac
20194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20195 (eval "$ac_link") 2>conftest.er1
503d2be0 20196 ac_status=$?
edfaf76d
LK
20197 grep -v '^ *+' conftest.er1 >conftest.err
20198 rm -f conftest.er1
20199 cat conftest.err >&5
c0d27fcc 20200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20201 (exit $ac_status); } && {
20202 test -z "$ac_c_werror_flag" ||
20203 test ! -s conftest.err
20204 } && test -s conftest$ac_exeext &&
20205 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20206 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20207else
20208 echo "$as_me: failed program was:" >&5
19650fd6
AS
20209sed 's/^/| /' conftest.$ac_ext >&5
20210
d6e01aa5 20211 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20212fi
d6e01aa5
KL
20213
20214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20215 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20216LIBS=$ac_check_lib_save_LIBS
20217fi
d6e01aa5
KL
20218{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20219echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20220if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20221 cat >>confdefs.h <<_ACEOF
503d2be0 20222#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20223_ACEOF
a21616bd
KR
20224
20225 LIBS="-lk5crypto $LIBS"
20226
a21616bd
KR
20227fi
20228
c0d27fcc 20229
d6e01aa5
KL
20230{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20231echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20232if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20233 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20234else
503d2be0 20235 ac_check_lib_save_LIBS=$LIBS
a21616bd 20236LIBS="-lcrypto $LIBS"
503d2be0 20237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20238/* confdefs.h. */
20239_ACEOF
20240cat confdefs.h >>conftest.$ac_ext
20241cat >>conftest.$ac_ext <<_ACEOF
20242/* end confdefs.h. */
503d2be0 20243
d6e01aa5
KL
20244/* Override any GCC internal prototype to avoid an error.
20245 Use char because int might match the return type of a GCC
20246 builtin and then its argument prototype would still apply. */
503d2be0
AS
20247#ifdef __cplusplus
20248extern "C"
20249#endif
503d2be0
AS
20250char mit_des_cbc_encrypt ();
20251int
20252main ()
20253{
d6e01aa5 20254return mit_des_cbc_encrypt ();
503d2be0
AS
20255 ;
20256 return 0;
20257}
20258_ACEOF
20259rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20260if { (ac_try="$ac_link"
20261case "(($ac_try" in
20262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20263 *) ac_try_echo=$ac_try;;
20264esac
20265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20266 (eval "$ac_link") 2>conftest.er1
503d2be0 20267 ac_status=$?
edfaf76d
LK
20268 grep -v '^ *+' conftest.er1 >conftest.err
20269 rm -f conftest.er1
20270 cat conftest.err >&5
c0d27fcc 20271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20272 (exit $ac_status); } && {
20273 test -z "$ac_c_werror_flag" ||
20274 test ! -s conftest.err
20275 } && test -s conftest$ac_exeext &&
20276 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20277 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20278else
20279 echo "$as_me: failed program was:" >&5
19650fd6
AS
20280sed 's/^/| /' conftest.$ac_ext >&5
20281
d6e01aa5 20282 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20283fi
d6e01aa5
KL
20284
20285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20286 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20287LIBS=$ac_check_lib_save_LIBS
20288fi
d6e01aa5
KL
20289{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20290echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20291if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20292 cat >>confdefs.h <<_ACEOF
503d2be0 20293#define HAVE_LIBCRYPTO 1
c0d27fcc 20294_ACEOF
a21616bd
KR
20295
20296 LIBS="-lcrypto $LIBS"
20297
a21616bd
KR
20298fi
20299
c0d27fcc 20300
d6e01aa5
KL
20301{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20302echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20303if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20304 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20305else
503d2be0 20306 ac_check_lib_save_LIBS=$LIBS
a21616bd 20307LIBS="-lkrb5 $LIBS"
503d2be0 20308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20309/* confdefs.h. */
20310_ACEOF
20311cat confdefs.h >>conftest.$ac_ext
20312cat >>conftest.$ac_ext <<_ACEOF
20313/* end confdefs.h. */
a21616bd 20314
d6e01aa5
KL
20315/* Override any GCC internal prototype to avoid an error.
20316 Use char because int might match the return type of a GCC
20317 builtin and then its argument prototype would still apply. */
503d2be0
AS
20318#ifdef __cplusplus
20319extern "C"
20320#endif
503d2be0
AS
20321char krb5_init_context ();
20322int
20323main ()
20324{
d6e01aa5 20325return krb5_init_context ();
503d2be0
AS
20326 ;
20327 return 0;
20328}
20329_ACEOF
20330rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20331if { (ac_try="$ac_link"
20332case "(($ac_try" in
20333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20334 *) ac_try_echo=$ac_try;;
20335esac
20336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20337 (eval "$ac_link") 2>conftest.er1
503d2be0 20338 ac_status=$?
edfaf76d
LK
20339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
c0d27fcc 20342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20343 (exit $ac_status); } && {
20344 test -z "$ac_c_werror_flag" ||
20345 test ! -s conftest.err
20346 } && test -s conftest$ac_exeext &&
20347 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20348 ac_cv_lib_krb5_krb5_init_context=yes
20349else
20350 echo "$as_me: failed program was:" >&5
19650fd6
AS
20351sed 's/^/| /' conftest.$ac_ext >&5
20352
d6e01aa5 20353 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20354fi
d6e01aa5
KL
20355
20356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20357 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20358LIBS=$ac_check_lib_save_LIBS
20359fi
d6e01aa5
KL
20360{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20361echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20362if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20363 cat >>confdefs.h <<_ACEOF
503d2be0 20364#define HAVE_LIBKRB5 1
c0d27fcc 20365_ACEOF
a21616bd
KR
20366
20367 LIBS="-lkrb5 $LIBS"
20368
a21616bd
KR
20369fi
20370
20371 if test "${with_kerberos5+set}" != set; then
503d2be0 20372
d6e01aa5
KL
20373{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20374echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20375if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20376 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20377else
503d2be0 20378 ac_check_lib_save_LIBS=$LIBS
a21616bd 20379LIBS="-ldes425 $LIBS"
503d2be0 20380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20381/* confdefs.h. */
20382_ACEOF
20383cat confdefs.h >>conftest.$ac_ext
20384cat >>conftest.$ac_ext <<_ACEOF
20385/* end confdefs.h. */
503d2be0 20386
d6e01aa5
KL
20387/* Override any GCC internal prototype to avoid an error.
20388 Use char because int might match the return type of a GCC
20389 builtin and then its argument prototype would still apply. */
503d2be0
AS
20390#ifdef __cplusplus
20391extern "C"
20392#endif
503d2be0
AS
20393char des_cbc_encrypt ();
20394int
20395main ()
20396{
d6e01aa5 20397return des_cbc_encrypt ();
503d2be0
AS
20398 ;
20399 return 0;
20400}
20401_ACEOF
20402rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20403if { (ac_try="$ac_link"
20404case "(($ac_try" in
20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20406 *) ac_try_echo=$ac_try;;
20407esac
20408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20409 (eval "$ac_link") 2>conftest.er1
503d2be0 20410 ac_status=$?
edfaf76d
LK
20411 grep -v '^ *+' conftest.er1 >conftest.err
20412 rm -f conftest.er1
20413 cat conftest.err >&5
c0d27fcc 20414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20415 (exit $ac_status); } && {
20416 test -z "$ac_c_werror_flag" ||
20417 test ! -s conftest.err
20418 } && test -s conftest$ac_exeext &&
20419 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20420 ac_cv_lib_des425_des_cbc_encrypt=yes
20421else
20422 echo "$as_me: failed program was:" >&5
19650fd6
AS
20423sed 's/^/| /' conftest.$ac_ext >&5
20424
d6e01aa5 20425 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20426fi
d6e01aa5
KL
20427
20428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20429 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20430LIBS=$ac_check_lib_save_LIBS
20431fi
d6e01aa5
KL
20432{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20433echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20434if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20435 cat >>confdefs.h <<_ACEOF
503d2be0 20436#define HAVE_LIBDES425 1
c0d27fcc 20437_ACEOF
a21616bd
KR
20438
20439 LIBS="-ldes425 $LIBS"
20440
20441else
503d2be0 20442
d6e01aa5
KL
20443{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20444echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20445if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20446 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20447else
503d2be0 20448 ac_check_lib_save_LIBS=$LIBS
a21616bd 20449LIBS="-ldes $LIBS"
503d2be0 20450cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20451/* confdefs.h. */
20452_ACEOF
20453cat confdefs.h >>conftest.$ac_ext
20454cat >>conftest.$ac_ext <<_ACEOF
20455/* end confdefs.h. */
503d2be0 20456
d6e01aa5
KL
20457/* Override any GCC internal prototype to avoid an error.
20458 Use char because int might match the return type of a GCC
20459 builtin and then its argument prototype would still apply. */
503d2be0
AS
20460#ifdef __cplusplus
20461extern "C"
20462#endif
503d2be0
AS
20463char des_cbc_encrypt ();
20464int
20465main ()
20466{
d6e01aa5 20467return des_cbc_encrypt ();
503d2be0
AS
20468 ;
20469 return 0;
20470}
20471_ACEOF
20472rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20473if { (ac_try="$ac_link"
20474case "(($ac_try" in
20475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20476 *) ac_try_echo=$ac_try;;
20477esac
20478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20479 (eval "$ac_link") 2>conftest.er1
503d2be0 20480 ac_status=$?
edfaf76d
LK
20481 grep -v '^ *+' conftest.er1 >conftest.err
20482 rm -f conftest.er1
20483 cat conftest.err >&5
c0d27fcc 20484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20485 (exit $ac_status); } && {
20486 test -z "$ac_c_werror_flag" ||
20487 test ! -s conftest.err
20488 } && test -s conftest$ac_exeext &&
20489 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20490 ac_cv_lib_des_des_cbc_encrypt=yes
20491else
20492 echo "$as_me: failed program was:" >&5
19650fd6
AS
20493sed 's/^/| /' conftest.$ac_ext >&5
20494
d6e01aa5 20495 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20496fi
d6e01aa5
KL
20497
20498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20499 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20500LIBS=$ac_check_lib_save_LIBS
20501fi
d6e01aa5
KL
20502{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20503echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20504if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20505 cat >>confdefs.h <<_ACEOF
503d2be0 20506#define HAVE_LIBDES 1
c0d27fcc 20507_ACEOF
a21616bd
KR
20508
20509 LIBS="-ldes $LIBS"
20510
a21616bd
KR
20511fi
20512
20513fi
20514
c0d27fcc 20515
d6e01aa5
KL
20516{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20517echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20518if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20519 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20520else
503d2be0 20521 ac_check_lib_save_LIBS=$LIBS
a21616bd 20522LIBS="-lkrb4 $LIBS"
503d2be0 20523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20524/* confdefs.h. */
20525_ACEOF
20526cat confdefs.h >>conftest.$ac_ext
20527cat >>conftest.$ac_ext <<_ACEOF
20528/* end confdefs.h. */
503d2be0 20529
d6e01aa5
KL
20530/* Override any GCC internal prototype to avoid an error.
20531 Use char because int might match the return type of a GCC
20532 builtin and then its argument prototype would still apply. */
503d2be0
AS
20533#ifdef __cplusplus
20534extern "C"
20535#endif
503d2be0
AS
20536char krb_get_cred ();
20537int
20538main ()
20539{
d6e01aa5 20540return krb_get_cred ();
503d2be0
AS
20541 ;
20542 return 0;
20543}
20544_ACEOF
20545rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20546if { (ac_try="$ac_link"
20547case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
20551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20552 (eval "$ac_link") 2>conftest.er1
503d2be0 20553 ac_status=$?
edfaf76d
LK
20554 grep -v '^ *+' conftest.er1 >conftest.err
20555 rm -f conftest.er1
20556 cat conftest.err >&5
c0d27fcc 20557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20558 (exit $ac_status); } && {
20559 test -z "$ac_c_werror_flag" ||
20560 test ! -s conftest.err
20561 } && test -s conftest$ac_exeext &&
20562 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20563 ac_cv_lib_krb4_krb_get_cred=yes
20564else
20565 echo "$as_me: failed program was:" >&5
19650fd6
AS
20566sed 's/^/| /' conftest.$ac_ext >&5
20567
d6e01aa5 20568 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20569fi
d6e01aa5
KL
20570
20571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20572 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20573LIBS=$ac_check_lib_save_LIBS
20574fi
d6e01aa5
KL
20575{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20576echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20577if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20578 cat >>confdefs.h <<_ACEOF
503d2be0 20579#define HAVE_LIBKRB4 1
c0d27fcc 20580_ACEOF
a21616bd
KR
20581
20582 LIBS="-lkrb4 $LIBS"
20583
20584else
503d2be0 20585
d6e01aa5
KL
20586{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20587echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20588if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20589 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20590else
503d2be0 20591 ac_check_lib_save_LIBS=$LIBS
a21616bd 20592LIBS="-lkrb $LIBS"
503d2be0 20593cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
503d2be0 20599
d6e01aa5
KL
20600/* Override any GCC internal prototype to avoid an error.
20601 Use char because int might match the return type of a GCC
20602 builtin and then its argument prototype would still apply. */
503d2be0
AS
20603#ifdef __cplusplus
20604extern "C"
20605#endif
503d2be0
AS
20606char krb_get_cred ();
20607int
20608main ()
20609{
d6e01aa5 20610return krb_get_cred ();
503d2be0
AS
20611 ;
20612 return 0;
20613}
20614_ACEOF
20615rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20616if { (ac_try="$ac_link"
20617case "(($ac_try" in
20618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20619 *) ac_try_echo=$ac_try;;
20620esac
20621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20622 (eval "$ac_link") 2>conftest.er1
503d2be0 20623 ac_status=$?
edfaf76d
LK
20624 grep -v '^ *+' conftest.er1 >conftest.err
20625 rm -f conftest.er1
20626 cat conftest.err >&5
c0d27fcc 20627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20628 (exit $ac_status); } && {
20629 test -z "$ac_c_werror_flag" ||
20630 test ! -s conftest.err
20631 } && test -s conftest$ac_exeext &&
20632 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20633 ac_cv_lib_krb_krb_get_cred=yes
20634else
20635 echo "$as_me: failed program was:" >&5
19650fd6
AS
20636sed 's/^/| /' conftest.$ac_ext >&5
20637
d6e01aa5 20638 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20639fi
d6e01aa5
KL
20640
20641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20642 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20643LIBS=$ac_check_lib_save_LIBS
20644fi
d6e01aa5
KL
20645{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20646echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20647if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20648 cat >>confdefs.h <<_ACEOF
503d2be0 20649#define HAVE_LIBKRB 1
c0d27fcc 20650_ACEOF
a21616bd
KR
20651
20652 LIBS="-lkrb $LIBS"
20653
a21616bd
KR
20654fi
20655
20656fi
20657
20658 fi
20659
20660 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20661
20662for ac_header in krb5.h
a21616bd 20663do
503d2be0 20664as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20665if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20666 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20669 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20670fi
d6e01aa5
KL
20671ac_res=`eval echo '${'$as_ac_Header'}'`
20672 { echo "$as_me:$LINENO: result: $ac_res" >&5
20673echo "${ECHO_T}$ac_res" >&6; }
98418dba 20674else
c0d27fcc 20675 # Is the header compilable?
d6e01aa5
KL
20676{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20677echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 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. */
c0d27fcc
MR
20684$ac_includes_default
20685#include <$ac_header>
20686_ACEOF
20687rm -f conftest.$ac_objext
d6e01aa5
KL
20688if { (ac_try="$ac_compile"
20689case "(($ac_try" in
20690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20691 *) ac_try_echo=$ac_try;;
20692esac
20693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20694 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20695 ac_status=$?
edfaf76d
LK
20696 grep -v '^ *+' conftest.er1 >conftest.err
20697 rm -f conftest.er1
20698 cat conftest.err >&5
c0d27fcc 20699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20700 (exit $ac_status); } && {
20701 test -z "$ac_c_werror_flag" ||
20702 test ! -s conftest.err
20703 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20704 ac_header_compiler=yes
20705else
20706 echo "$as_me: failed program was:" >&5
19650fd6
AS
20707sed 's/^/| /' conftest.$ac_ext >&5
20708
d6e01aa5 20709 ac_header_compiler=no
c0d27fcc 20710fi
d6e01aa5
KL
20711
20712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20713{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20714echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20715
20716# Is the header present?
d6e01aa5
KL
20717{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20718echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20720/* confdefs.h. */
20721_ACEOF
20722cat confdefs.h >>conftest.$ac_ext
20723cat >>conftest.$ac_ext <<_ACEOF
20724/* end confdefs.h. */
503d2be0
AS
20725#include <$ac_header>
20726_ACEOF
d6e01aa5
KL
20727if { (ac_try="$ac_cpp conftest.$ac_ext"
20728case "(($ac_try" in
20729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20730 *) ac_try_echo=$ac_try;;
20731esac
20732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20734 ac_status=$?
6bae0ccf 20735 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20736 rm -f conftest.er1
20737 cat conftest.err >&5
c0d27fcc 20738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20739 (exit $ac_status); } >/dev/null && {
20740 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20741 test ! -s conftest.err
20742 }; then
c0d27fcc 20743 ac_header_preproc=yes
503d2be0
AS
20744else
20745 echo "$as_me: failed program was:" >&5
19650fd6
AS
20746sed 's/^/| /' conftest.$ac_ext >&5
20747
c0d27fcc 20748 ac_header_preproc=no
a21616bd 20749fi
d6e01aa5 20750
503d2be0 20751rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20752{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20753echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20754
20755# So? What about this header?
edfaf76d
LK
20756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20757 yes:no: )
c0d27fcc
MR
20758 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20759echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20761echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20762 ac_header_preproc=yes
19650fd6 20763 ;;
edfaf76d 20764 no:yes:* )
c0d27fcc
MR
20765 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20766echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20767 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20768echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20769 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20770echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20771 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20772echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20774echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20775 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20776echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20777
19650fd6 20778 ;;
c0d27fcc 20779esac
d6e01aa5
KL
20780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20783 echo $ECHO_N "(cached) $ECHO_C" >&6
20784else
edfaf76d 20785 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20786fi
d6e01aa5
KL
20787ac_res=`eval echo '${'$as_ac_Header'}'`
20788 { echo "$as_me:$LINENO: result: $ac_res" >&5
20789echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20790
20791fi
503d2be0 20792if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20793 cat >>confdefs.h <<_ACEOF
503d2be0 20794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20795_ACEOF
503d2be0 20796
a21616bd 20797fi
c0d27fcc 20798
a21616bd
KR
20799done
20800
20801 else
503d2be0
AS
20802
20803for ac_header in des.h
a21616bd 20804do
503d2be0 20805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20806if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20807 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20808echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20809if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20810 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20811fi
d6e01aa5
KL
20812ac_res=`eval echo '${'$as_ac_Header'}'`
20813 { echo "$as_me:$LINENO: result: $ac_res" >&5
20814echo "${ECHO_T}$ac_res" >&6; }
98418dba 20815else
c0d27fcc 20816 # Is the header compilable?
d6e01aa5
KL
20817{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20818echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20820/* confdefs.h. */
20821_ACEOF
20822cat confdefs.h >>conftest.$ac_ext
20823cat >>conftest.$ac_ext <<_ACEOF
20824/* end confdefs.h. */
c0d27fcc
MR
20825$ac_includes_default
20826#include <$ac_header>
20827_ACEOF
20828rm -f conftest.$ac_objext
d6e01aa5
KL
20829if { (ac_try="$ac_compile"
20830case "(($ac_try" in
20831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20832 *) ac_try_echo=$ac_try;;
20833esac
20834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20835 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20836 ac_status=$?
edfaf76d
LK
20837 grep -v '^ *+' conftest.er1 >conftest.err
20838 rm -f conftest.er1
20839 cat conftest.err >&5
c0d27fcc 20840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20841 (exit $ac_status); } && {
20842 test -z "$ac_c_werror_flag" ||
20843 test ! -s conftest.err
20844 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20845 ac_header_compiler=yes
20846else
20847 echo "$as_me: failed program was:" >&5
19650fd6
AS
20848sed 's/^/| /' conftest.$ac_ext >&5
20849
d6e01aa5 20850 ac_header_compiler=no
c0d27fcc 20851fi
d6e01aa5
KL
20852
20853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20854{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20855echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20856
20857# Is the header present?
d6e01aa5
KL
20858{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20859echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20860cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20861/* confdefs.h. */
20862_ACEOF
20863cat confdefs.h >>conftest.$ac_ext
20864cat >>conftest.$ac_ext <<_ACEOF
20865/* end confdefs.h. */
503d2be0
AS
20866#include <$ac_header>
20867_ACEOF
d6e01aa5
KL
20868if { (ac_try="$ac_cpp conftest.$ac_ext"
20869case "(($ac_try" in
20870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20871 *) ac_try_echo=$ac_try;;
20872esac
20873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20874 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20875 ac_status=$?
6bae0ccf 20876 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20877 rm -f conftest.er1
20878 cat conftest.err >&5
c0d27fcc 20879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20880 (exit $ac_status); } >/dev/null && {
20881 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20882 test ! -s conftest.err
20883 }; then
c0d27fcc 20884 ac_header_preproc=yes
503d2be0
AS
20885else
20886 echo "$as_me: failed program was:" >&5
19650fd6
AS
20887sed 's/^/| /' conftest.$ac_ext >&5
20888
c0d27fcc 20889 ac_header_preproc=no
a21616bd 20890fi
d6e01aa5 20891
503d2be0 20892rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20893{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20894echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20895
20896# So? What about this header?
edfaf76d
LK
20897case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20898 yes:no: )
c0d27fcc
MR
20899 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20900echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20901 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20902echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20903 ac_header_preproc=yes
19650fd6 20904 ;;
edfaf76d 20905 no:yes:* )
c0d27fcc
MR
20906 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20907echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20908 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20909echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20910 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20911echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20912 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20913echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20914 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20915echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20916 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20917echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20918
19650fd6 20919 ;;
c0d27fcc 20920esac
d6e01aa5
KL
20921{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20922echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20923if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20924 echo $ECHO_N "(cached) $ECHO_C" >&6
20925else
edfaf76d 20926 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20927fi
d6e01aa5
KL
20928ac_res=`eval echo '${'$as_ac_Header'}'`
20929 { echo "$as_me:$LINENO: result: $ac_res" >&5
20930echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20931
20932fi
503d2be0 20933if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20934 cat >>confdefs.h <<_ACEOF
503d2be0 20935#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20936_ACEOF
503d2be0 20937
a21616bd 20938else
503d2be0
AS
20939
20940for ac_header in kerberosIV/des.h
a21616bd 20941do
503d2be0 20942as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20943if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20944 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20945echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20946if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20947 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20948fi
d6e01aa5
KL
20949ac_res=`eval echo '${'$as_ac_Header'}'`
20950 { echo "$as_me:$LINENO: result: $ac_res" >&5
20951echo "${ECHO_T}$ac_res" >&6; }
98418dba 20952else
c0d27fcc 20953 # Is the header compilable?
d6e01aa5
KL
20954{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20955echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20956cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20957/* confdefs.h. */
20958_ACEOF
20959cat confdefs.h >>conftest.$ac_ext
20960cat >>conftest.$ac_ext <<_ACEOF
20961/* end confdefs.h. */
c0d27fcc
MR
20962$ac_includes_default
20963#include <$ac_header>
20964_ACEOF
20965rm -f conftest.$ac_objext
d6e01aa5
KL
20966if { (ac_try="$ac_compile"
20967case "(($ac_try" in
20968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20969 *) ac_try_echo=$ac_try;;
20970esac
20971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20972 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20973 ac_status=$?
edfaf76d
LK
20974 grep -v '^ *+' conftest.er1 >conftest.err
20975 rm -f conftest.er1
20976 cat conftest.err >&5
c0d27fcc 20977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20978 (exit $ac_status); } && {
20979 test -z "$ac_c_werror_flag" ||
20980 test ! -s conftest.err
20981 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20982 ac_header_compiler=yes
20983else
20984 echo "$as_me: failed program was:" >&5
19650fd6
AS
20985sed 's/^/| /' conftest.$ac_ext >&5
20986
d6e01aa5 20987 ac_header_compiler=no
c0d27fcc 20988fi
d6e01aa5
KL
20989
20990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20991{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20992echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20993
20994# Is the header present?
d6e01aa5
KL
20995{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20996echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20997cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20998/* confdefs.h. */
20999_ACEOF
21000cat confdefs.h >>conftest.$ac_ext
21001cat >>conftest.$ac_ext <<_ACEOF
21002/* end confdefs.h. */
503d2be0
AS
21003#include <$ac_header>
21004_ACEOF
d6e01aa5
KL
21005if { (ac_try="$ac_cpp conftest.$ac_ext"
21006case "(($ac_try" in
21007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21008 *) ac_try_echo=$ac_try;;
21009esac
21010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21011 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21012 ac_status=$?
6bae0ccf 21013 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21014 rm -f conftest.er1
21015 cat conftest.err >&5
c0d27fcc 21016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21017 (exit $ac_status); } >/dev/null && {
21018 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21019 test ! -s conftest.err
21020 }; then
c0d27fcc 21021 ac_header_preproc=yes
503d2be0
AS
21022else
21023 echo "$as_me: failed program was:" >&5
19650fd6
AS
21024sed 's/^/| /' conftest.$ac_ext >&5
21025
c0d27fcc 21026 ac_header_preproc=no
a21616bd 21027fi
d6e01aa5 21028
503d2be0 21029rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21030{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21031echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21032
21033# So? What about this header?
edfaf76d
LK
21034case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21035 yes:no: )
c0d27fcc
MR
21036 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21037echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21038 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21039echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21040 ac_header_preproc=yes
19650fd6 21041 ;;
edfaf76d 21042 no:yes:* )
c0d27fcc
MR
21043 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21044echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21045 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21046echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21047 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21048echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21049 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21050echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21051 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21052echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21053 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21054echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21055
19650fd6 21056 ;;
c0d27fcc 21057esac
d6e01aa5
KL
21058{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21059echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21060if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21061 echo $ECHO_N "(cached) $ECHO_C" >&6
21062else
edfaf76d 21063 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21064fi
d6e01aa5
KL
21065ac_res=`eval echo '${'$as_ac_Header'}'`
21066 { echo "$as_me:$LINENO: result: $ac_res" >&5
21067echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21068
21069fi
503d2be0 21070if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21071 cat >>confdefs.h <<_ACEOF
503d2be0 21072#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21073_ACEOF
503d2be0 21074
a21616bd 21075else
503d2be0
AS
21076
21077for ac_header in kerberos/des.h
a21616bd 21078do
503d2be0 21079as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21080if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21081 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21082echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21083if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21084 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21085fi
d6e01aa5
KL
21086ac_res=`eval echo '${'$as_ac_Header'}'`
21087 { echo "$as_me:$LINENO: result: $ac_res" >&5
21088echo "${ECHO_T}$ac_res" >&6; }
98418dba 21089else
c0d27fcc 21090 # Is the header compilable?
d6e01aa5
KL
21091{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21092echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21093cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21094/* confdefs.h. */
21095_ACEOF
21096cat confdefs.h >>conftest.$ac_ext
21097cat >>conftest.$ac_ext <<_ACEOF
21098/* end confdefs.h. */
c0d27fcc
MR
21099$ac_includes_default
21100#include <$ac_header>
21101_ACEOF
21102rm -f conftest.$ac_objext
d6e01aa5
KL
21103if { (ac_try="$ac_compile"
21104case "(($ac_try" in
21105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21106 *) ac_try_echo=$ac_try;;
21107esac
21108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21109 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21110 ac_status=$?
edfaf76d
LK
21111 grep -v '^ *+' conftest.er1 >conftest.err
21112 rm -f conftest.er1
21113 cat conftest.err >&5
c0d27fcc 21114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21115 (exit $ac_status); } && {
21116 test -z "$ac_c_werror_flag" ||
21117 test ! -s conftest.err
21118 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21119 ac_header_compiler=yes
21120else
21121 echo "$as_me: failed program was:" >&5
19650fd6
AS
21122sed 's/^/| /' conftest.$ac_ext >&5
21123
d6e01aa5 21124 ac_header_compiler=no
c0d27fcc 21125fi
d6e01aa5
KL
21126
21127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21128{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21129echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21130
21131# Is the header present?
d6e01aa5
KL
21132{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21133echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21134cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21135/* confdefs.h. */
21136_ACEOF
21137cat confdefs.h >>conftest.$ac_ext
21138cat >>conftest.$ac_ext <<_ACEOF
21139/* end confdefs.h. */
503d2be0
AS
21140#include <$ac_header>
21141_ACEOF
d6e01aa5
KL
21142if { (ac_try="$ac_cpp conftest.$ac_ext"
21143case "(($ac_try" in
21144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21145 *) ac_try_echo=$ac_try;;
21146esac
21147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21148 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21149 ac_status=$?
6bae0ccf 21150 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21151 rm -f conftest.er1
21152 cat conftest.err >&5
c0d27fcc 21153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21154 (exit $ac_status); } >/dev/null && {
21155 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21156 test ! -s conftest.err
21157 }; then
c0d27fcc 21158 ac_header_preproc=yes
503d2be0
AS
21159else
21160 echo "$as_me: failed program was:" >&5
19650fd6
AS
21161sed 's/^/| /' conftest.$ac_ext >&5
21162
c0d27fcc 21163 ac_header_preproc=no
a21616bd 21164fi
d6e01aa5 21165
503d2be0 21166rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21167{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21168echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21169
21170# So? What about this header?
edfaf76d
LK
21171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21172 yes:no: )
c0d27fcc
MR
21173 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21174echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21175 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21176echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21177 ac_header_preproc=yes
19650fd6 21178 ;;
edfaf76d 21179 no:yes:* )
c0d27fcc
MR
21180 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21181echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21182 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21183echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21184 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21185echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21186 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21187echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21188 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21189echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21190 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21191echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21192
19650fd6 21193 ;;
c0d27fcc 21194esac
d6e01aa5
KL
21195{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21196echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21197if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21198 echo $ECHO_N "(cached) $ECHO_C" >&6
21199else
edfaf76d 21200 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21201fi
d6e01aa5
KL
21202ac_res=`eval echo '${'$as_ac_Header'}'`
21203 { echo "$as_me:$LINENO: result: $ac_res" >&5
21204echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21205
21206fi
503d2be0 21207if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21208 cat >>confdefs.h <<_ACEOF
503d2be0 21209#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21210_ACEOF
a21616bd
KR
21211
21212fi
c0d27fcc 21213
a21616bd
KR
21214done
21215
98418dba 21216fi
c0d27fcc 21217
925c2f3f
EZ
21218done
21219
98418dba 21220fi
c0d27fcc 21221
925c2f3f 21222done
98418dba 21223
c0d27fcc 21224
925c2f3f
EZ
21225for ac_header in krb.h
21226do
21227as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21229 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21232 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21233fi
d6e01aa5
KL
21234ac_res=`eval echo '${'$as_ac_Header'}'`
21235 { echo "$as_me:$LINENO: result: $ac_res" >&5
21236echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21237else
21238 # Is the header compilable?
d6e01aa5
KL
21239{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21240echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21242/* confdefs.h. */
21243_ACEOF
21244cat confdefs.h >>conftest.$ac_ext
21245cat >>conftest.$ac_ext <<_ACEOF
21246/* end confdefs.h. */
c0d27fcc
MR
21247$ac_includes_default
21248#include <$ac_header>
21249_ACEOF
21250rm -f conftest.$ac_objext
d6e01aa5
KL
21251if { (ac_try="$ac_compile"
21252case "(($ac_try" in
21253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21254 *) ac_try_echo=$ac_try;;
21255esac
21256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21257 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21258 ac_status=$?
edfaf76d
LK
21259 grep -v '^ *+' conftest.er1 >conftest.err
21260 rm -f conftest.er1
21261 cat conftest.err >&5
c0d27fcc 21262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21263 (exit $ac_status); } && {
21264 test -z "$ac_c_werror_flag" ||
21265 test ! -s conftest.err
21266 } && test -s conftest.$ac_objext; then
c0d27fcc 21267 ac_header_compiler=yes
925c2f3f 21268else
c0d27fcc 21269 echo "$as_me: failed program was:" >&5
19650fd6
AS
21270sed 's/^/| /' conftest.$ac_ext >&5
21271
d6e01aa5 21272 ac_header_compiler=no
c0d27fcc 21273fi
d6e01aa5
KL
21274
21275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21276{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21277echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21278
21279# Is the header present?
d6e01aa5
KL
21280{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21281echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21282cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21283/* confdefs.h. */
21284_ACEOF
21285cat confdefs.h >>conftest.$ac_ext
21286cat >>conftest.$ac_ext <<_ACEOF
21287/* end confdefs.h. */
503d2be0
AS
21288#include <$ac_header>
21289_ACEOF
d6e01aa5
KL
21290if { (ac_try="$ac_cpp conftest.$ac_ext"
21291case "(($ac_try" in
21292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21293 *) ac_try_echo=$ac_try;;
21294esac
21295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21296 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21297 ac_status=$?
6bae0ccf 21298 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21299 rm -f conftest.er1
21300 cat conftest.err >&5
c0d27fcc 21301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21302 (exit $ac_status); } >/dev/null && {
21303 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21304 test ! -s conftest.err
21305 }; then
c0d27fcc 21306 ac_header_preproc=yes
503d2be0
AS
21307else
21308 echo "$as_me: failed program was:" >&5
19650fd6
AS
21309sed 's/^/| /' conftest.$ac_ext >&5
21310
c0d27fcc 21311 ac_header_preproc=no
a21616bd 21312fi
d6e01aa5 21313
503d2be0 21314rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21315{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21316echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21317
21318# So? What about this header?
edfaf76d
LK
21319case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21320 yes:no: )
c0d27fcc
MR
21321 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21322echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21323 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21324echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21325 ac_header_preproc=yes
19650fd6 21326 ;;
edfaf76d 21327 no:yes:* )
c0d27fcc
MR
21328 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21329echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21330 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21331echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21332 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21333echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21334 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21335echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21336 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21337echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21338 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21339echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21340
19650fd6 21341 ;;
c0d27fcc 21342esac
d6e01aa5
KL
21343{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21345if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21346 echo $ECHO_N "(cached) $ECHO_C" >&6
21347else
edfaf76d 21348 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21349fi
d6e01aa5
KL
21350ac_res=`eval echo '${'$as_ac_Header'}'`
21351 { echo "$as_me:$LINENO: result: $ac_res" >&5
21352echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21353
21354fi
503d2be0 21355if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21356 cat >>confdefs.h <<_ACEOF
503d2be0 21357#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21358_ACEOF
503d2be0 21359
a21616bd 21360else
503d2be0
AS
21361
21362for ac_header in kerberosIV/krb.h
a21616bd 21363do
503d2be0 21364as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21365if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21366 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21368if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21369 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21370fi
d6e01aa5
KL
21371ac_res=`eval echo '${'$as_ac_Header'}'`
21372 { echo "$as_me:$LINENO: result: $ac_res" >&5
21373echo "${ECHO_T}$ac_res" >&6; }
98418dba 21374else
c0d27fcc 21375 # Is the header compilable?
d6e01aa5
KL
21376{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21377echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21378cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
c0d27fcc
MR
21384$ac_includes_default
21385#include <$ac_header>
21386_ACEOF
21387rm -f conftest.$ac_objext
d6e01aa5
KL
21388if { (ac_try="$ac_compile"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
21393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21394 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21395 ac_status=$?
edfaf76d
LK
21396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
c0d27fcc 21399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21404 ac_header_compiler=yes
21405else
21406 echo "$as_me: failed program was:" >&5
19650fd6
AS
21407sed 's/^/| /' conftest.$ac_ext >&5
21408
d6e01aa5 21409 ac_header_compiler=no
c0d27fcc 21410fi
d6e01aa5
KL
21411
21412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21413{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21414echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21415
21416# Is the header present?
d6e01aa5
KL
21417{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21418echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21419cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21420/* confdefs.h. */
21421_ACEOF
21422cat confdefs.h >>conftest.$ac_ext
21423cat >>conftest.$ac_ext <<_ACEOF
21424/* end confdefs.h. */
503d2be0
AS
21425#include <$ac_header>
21426_ACEOF
d6e01aa5
KL
21427if { (ac_try="$ac_cpp conftest.$ac_ext"
21428case "(($ac_try" in
21429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21430 *) ac_try_echo=$ac_try;;
21431esac
21432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21433 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21434 ac_status=$?
6bae0ccf 21435 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21436 rm -f conftest.er1
21437 cat conftest.err >&5
c0d27fcc 21438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21439 (exit $ac_status); } >/dev/null && {
21440 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21441 test ! -s conftest.err
21442 }; then
c0d27fcc 21443 ac_header_preproc=yes
503d2be0
AS
21444else
21445 echo "$as_me: failed program was:" >&5
19650fd6
AS
21446sed 's/^/| /' conftest.$ac_ext >&5
21447
c0d27fcc 21448 ac_header_preproc=no
a21616bd 21449fi
d6e01aa5 21450
503d2be0 21451rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21452{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21453echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21454
21455# So? What about this header?
edfaf76d
LK
21456case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21457 yes:no: )
c0d27fcc
MR
21458 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21459echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21460 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21461echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21462 ac_header_preproc=yes
19650fd6 21463 ;;
edfaf76d 21464 no:yes:* )
c0d27fcc
MR
21465 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21466echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21467 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21468echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21469 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21470echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21471 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21472echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21473 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21474echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21475 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21476echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21477
19650fd6 21478 ;;
c0d27fcc 21479esac
d6e01aa5
KL
21480{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21482if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21483 echo $ECHO_N "(cached) $ECHO_C" >&6
21484else
edfaf76d 21485 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21486fi
d6e01aa5
KL
21487ac_res=`eval echo '${'$as_ac_Header'}'`
21488 { echo "$as_me:$LINENO: result: $ac_res" >&5
21489echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21490
21491fi
503d2be0 21492if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21493 cat >>confdefs.h <<_ACEOF
503d2be0 21494#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21495_ACEOF
503d2be0 21496
a21616bd 21497else
503d2be0
AS
21498
21499for ac_header in kerberos/krb.h
a21616bd 21500do
503d2be0 21501as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21502if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21503 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21505if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21506 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21507fi
d6e01aa5
KL
21508ac_res=`eval echo '${'$as_ac_Header'}'`
21509 { echo "$as_me:$LINENO: result: $ac_res" >&5
21510echo "${ECHO_T}$ac_res" >&6; }
98418dba 21511else
c0d27fcc 21512 # Is the header compilable?
d6e01aa5
KL
21513{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21514echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21516/* confdefs.h. */
21517_ACEOF
21518cat confdefs.h >>conftest.$ac_ext
21519cat >>conftest.$ac_ext <<_ACEOF
21520/* end confdefs.h. */
c0d27fcc
MR
21521$ac_includes_default
21522#include <$ac_header>
21523_ACEOF
21524rm -f conftest.$ac_objext
d6e01aa5
KL
21525if { (ac_try="$ac_compile"
21526case "(($ac_try" in
21527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21528 *) ac_try_echo=$ac_try;;
21529esac
21530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21531 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21532 ac_status=$?
edfaf76d
LK
21533 grep -v '^ *+' conftest.er1 >conftest.err
21534 rm -f conftest.er1
21535 cat conftest.err >&5
c0d27fcc 21536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21537 (exit $ac_status); } && {
21538 test -z "$ac_c_werror_flag" ||
21539 test ! -s conftest.err
21540 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21541 ac_header_compiler=yes
21542else
21543 echo "$as_me: failed program was:" >&5
19650fd6
AS
21544sed 's/^/| /' conftest.$ac_ext >&5
21545
d6e01aa5 21546 ac_header_compiler=no
c0d27fcc 21547fi
d6e01aa5
KL
21548
21549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21550{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21551echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21552
21553# Is the header present?
d6e01aa5
KL
21554{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21555echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21557/* confdefs.h. */
21558_ACEOF
21559cat confdefs.h >>conftest.$ac_ext
21560cat >>conftest.$ac_ext <<_ACEOF
21561/* end confdefs.h. */
503d2be0
AS
21562#include <$ac_header>
21563_ACEOF
d6e01aa5
KL
21564if { (ac_try="$ac_cpp conftest.$ac_ext"
21565case "(($ac_try" in
21566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21567 *) ac_try_echo=$ac_try;;
21568esac
21569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21571 ac_status=$?
6bae0ccf 21572 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21573 rm -f conftest.er1
21574 cat conftest.err >&5
c0d27fcc 21575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21576 (exit $ac_status); } >/dev/null && {
21577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21578 test ! -s conftest.err
21579 }; then
c0d27fcc 21580 ac_header_preproc=yes
503d2be0
AS
21581else
21582 echo "$as_me: failed program was:" >&5
19650fd6
AS
21583sed 's/^/| /' conftest.$ac_ext >&5
21584
c0d27fcc 21585 ac_header_preproc=no
a21616bd 21586fi
d6e01aa5 21587
503d2be0 21588rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21589{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21590echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21591
21592# So? What about this header?
edfaf76d
LK
21593case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21594 yes:no: )
35996d22
AS
21595 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21596echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21597 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21598echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21599 ac_header_preproc=yes
19650fd6 21600 ;;
edfaf76d 21601 no:yes:* )
c0d27fcc
MR
21602 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21603echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21604 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21605echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21606 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21607echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21608 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21609echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21610 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21611echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21612 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21613echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21614
19650fd6 21615 ;;
c0d27fcc 21616esac
d6e01aa5
KL
21617{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21618echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21619if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21620 echo $ECHO_N "(cached) $ECHO_C" >&6
21621else
edfaf76d 21622 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21623fi
d6e01aa5
KL
21624ac_res=`eval echo '${'$as_ac_Header'}'`
21625 { echo "$as_me:$LINENO: result: $ac_res" >&5
21626echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21627
21628fi
503d2be0 21629if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21630 cat >>confdefs.h <<_ACEOF
503d2be0 21631#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21632_ACEOF
503d2be0 21633
a21616bd 21634fi
c0d27fcc 21635
a21616bd
KR
21636done
21637
21638fi
c0d27fcc 21639
a21616bd
KR
21640done
21641
21642fi
c0d27fcc 21643
a21616bd
KR
21644done
21645
21646 fi
503d2be0
AS
21647
21648for ac_header in com_err.h
a21616bd 21649do
503d2be0 21650as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21651if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21652 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21653echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21655 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21656fi
d6e01aa5
KL
21657ac_res=`eval echo '${'$as_ac_Header'}'`
21658 { echo "$as_me:$LINENO: result: $ac_res" >&5
21659echo "${ECHO_T}$ac_res" >&6; }
98418dba 21660else
c0d27fcc 21661 # Is the header compilable?
d6e01aa5
KL
21662{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21663echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21664cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21665/* confdefs.h. */
21666_ACEOF
21667cat confdefs.h >>conftest.$ac_ext
21668cat >>conftest.$ac_ext <<_ACEOF
21669/* end confdefs.h. */
c0d27fcc
MR
21670$ac_includes_default
21671#include <$ac_header>
21672_ACEOF
21673rm -f conftest.$ac_objext
d6e01aa5
KL
21674if { (ac_try="$ac_compile"
21675case "(($ac_try" in
21676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21677 *) ac_try_echo=$ac_try;;
21678esac
21679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21680 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21681 ac_status=$?
21682 grep -v '^ *+' conftest.er1 >conftest.err
21683 rm -f conftest.er1
21684 cat conftest.err >&5
21685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21686 (exit $ac_status); } && {
21687 test -z "$ac_c_werror_flag" ||
21688 test ! -s conftest.err
21689 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21690 ac_header_compiler=yes
21691else
21692 echo "$as_me: failed program was:" >&5
19650fd6
AS
21693sed 's/^/| /' conftest.$ac_ext >&5
21694
d6e01aa5 21695 ac_header_compiler=no
c0d27fcc 21696fi
d6e01aa5
KL
21697
21698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21699{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21700echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21701
21702# Is the header present?
d6e01aa5
KL
21703{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21704echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21705cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21706/* confdefs.h. */
21707_ACEOF
21708cat confdefs.h >>conftest.$ac_ext
21709cat >>conftest.$ac_ext <<_ACEOF
21710/* end confdefs.h. */
503d2be0
AS
21711#include <$ac_header>
21712_ACEOF
d6e01aa5
KL
21713if { (ac_try="$ac_cpp conftest.$ac_ext"
21714case "(($ac_try" in
21715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21716 *) ac_try_echo=$ac_try;;
21717esac
21718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21719 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21720 ac_status=$?
6bae0ccf 21721 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21722 rm -f conftest.er1
21723 cat conftest.err >&5
c0d27fcc 21724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21725 (exit $ac_status); } >/dev/null && {
21726 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21727 test ! -s conftest.err
21728 }; then
c0d27fcc 21729 ac_header_preproc=yes
503d2be0
AS
21730else
21731 echo "$as_me: failed program was:" >&5
19650fd6
AS
21732sed 's/^/| /' conftest.$ac_ext >&5
21733
c0d27fcc 21734 ac_header_preproc=no
a21616bd 21735fi
d6e01aa5 21736
503d2be0 21737rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21738{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21739echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21740
21741# So? What about this header?
edfaf76d
LK
21742case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21743 yes:no: )
c0d27fcc
MR
21744 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21745echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21746 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21747echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21748 ac_header_preproc=yes
19650fd6 21749 ;;
edfaf76d 21750 no:yes:* )
c0d27fcc
MR
21751 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21752echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21753 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21754echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21755 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21756echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21757 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21758echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21759 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21760echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21761 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21762echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21763
19650fd6 21764 ;;
c0d27fcc 21765esac
d6e01aa5
KL
21766{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21767echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21768if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21769 echo $ECHO_N "(cached) $ECHO_C" >&6
21770else
edfaf76d 21771 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21772fi
d6e01aa5
KL
21773ac_res=`eval echo '${'$as_ac_Header'}'`
21774 { echo "$as_me:$LINENO: result: $ac_res" >&5
21775echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21776
21777fi
503d2be0 21778if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21779 cat >>confdefs.h <<_ACEOF
503d2be0 21780#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21781_ACEOF
503d2be0 21782
a21616bd 21783fi
c0d27fcc 21784
a21616bd
KR
21785done
21786
21787fi
21788
ba4481b5
DL
21789# Solaris requires -lintl if you want strerror (which calls dgettext)
21790# to return localized messages.
503d2be0 21791
d6e01aa5
KL
21792{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21793echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21794if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21795 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21796else
503d2be0 21797 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21798LIBS="-lintl $LIBS"
503d2be0 21799cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21800/* confdefs.h. */
21801_ACEOF
21802cat confdefs.h >>conftest.$ac_ext
21803cat >>conftest.$ac_ext <<_ACEOF
21804/* end confdefs.h. */
503d2be0 21805
d6e01aa5
KL
21806/* Override any GCC internal prototype to avoid an error.
21807 Use char because int might match the return type of a GCC
21808 builtin and then its argument prototype would still apply. */
503d2be0
AS
21809#ifdef __cplusplus
21810extern "C"
21811#endif
503d2be0
AS
21812char dgettext ();
21813int
21814main ()
21815{
d6e01aa5 21816return dgettext ();
503d2be0
AS
21817 ;
21818 return 0;
21819}
21820_ACEOF
21821rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21822if { (ac_try="$ac_link"
21823case "(($ac_try" in
21824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825 *) ac_try_echo=$ac_try;;
21826esac
21827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21828 (eval "$ac_link") 2>conftest.er1
503d2be0 21829 ac_status=$?
edfaf76d
LK
21830 grep -v '^ *+' conftest.er1 >conftest.err
21831 rm -f conftest.er1
21832 cat conftest.err >&5
c0d27fcc 21833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21834 (exit $ac_status); } && {
21835 test -z "$ac_c_werror_flag" ||
21836 test ! -s conftest.err
21837 } && test -s conftest$ac_exeext &&
21838 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21839 ac_cv_lib_intl_dgettext=yes
21840else
21841 echo "$as_me: failed program was:" >&5
19650fd6
AS
21842sed 's/^/| /' conftest.$ac_ext >&5
21843
d6e01aa5 21844 ac_cv_lib_intl_dgettext=no
503d2be0 21845fi
d6e01aa5
KL
21846
21847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21848 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21849LIBS=$ac_check_lib_save_LIBS
21850fi
d6e01aa5
KL
21851{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21852echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21853if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21854 cat >>confdefs.h <<_ACEOF
503d2be0 21855#define HAVE_LIBINTL 1
c0d27fcc 21856_ACEOF
ba4481b5
DL
21857
21858 LIBS="-lintl $LIBS"
21859
ba4481b5
DL
21860fi
21861
c0d27fcc 21862
d6e01aa5
KL
21863{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21864echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21865if test "${emacs_cv_localtime_cache+set}" = set; then
21866 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21867else
21868 if test x$ac_cv_func_tzset = xyes; then
21869if test "$cross_compiling" = yes; then
21870 # If we have tzset, assume the worst when cross-compiling.
21871emacs_cv_localtime_cache=yes
21872else
503d2be0 21873 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21874/* confdefs.h. */
21875_ACEOF
21876cat confdefs.h >>conftest.$ac_ext
21877cat >>conftest.$ac_ext <<_ACEOF
21878/* end confdefs.h. */
ba4481b5 21879#include <time.h>
ba4481b5
DL
21880extern char **environ;
21881unset_TZ ()
21882{
21883 char **from, **to;
21884 for (to = from = environ; (*to = *from); from++)
21885 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21886 to++;
21887}
21888char TZ_GMT0[] = "TZ=GMT0";
21889char TZ_PST8[] = "TZ=PST8";
21890main()
21891{
21892 time_t now = time ((time_t *) 0);
21893 int hour_GMT0, hour_unset;
21894 if (putenv (TZ_GMT0) != 0)
21895 exit (1);
21896 hour_GMT0 = localtime (&now)->tm_hour;
21897 unset_TZ ();
21898 hour_unset = localtime (&now)->tm_hour;
21899 if (putenv (TZ_PST8) != 0)
21900 exit (1);
21901 if (localtime (&now)->tm_hour == hour_GMT0)
21902 exit (1);
21903 unset_TZ ();
21904 if (localtime (&now)->tm_hour != hour_unset)
21905 exit (1);
21906 exit (0);
21907}
503d2be0
AS
21908_ACEOF
21909rm -f conftest$ac_exeext
d6e01aa5
KL
21910if { (ac_try="$ac_link"
21911case "(($ac_try" in
21912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21913 *) ac_try_echo=$ac_try;;
21914esac
21915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21916 (eval "$ac_link") 2>&5
503d2be0 21917 ac_status=$?
c0d27fcc 21918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
21920 { (case "(($ac_try" in
21921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21922 *) ac_try_echo=$ac_try;;
21923esac
21924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21925 (eval "$ac_try") 2>&5
503d2be0 21926 ac_status=$?
c0d27fcc 21927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21928 (exit $ac_status); }; }; then
ba4481b5
DL
21929 emacs_cv_localtime_cache=no
21930else
503d2be0
AS
21931 echo "$as_me: program exited with status $ac_status" >&5
21932echo "$as_me: failed program was:" >&5
19650fd6
AS
21933sed 's/^/| /' conftest.$ac_ext >&5
21934
c0d27fcc 21935( exit $ac_status )
503d2be0 21936emacs_cv_localtime_cache=yes
ba4481b5 21937fi
d6e01aa5 21938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21939fi
d6e01aa5
KL
21940
21941
ba4481b5
DL
21942else
21943 # If we lack tzset, report that localtime does not cache TZ,
21944 # since we can't invalidate the cache if we don't have tzset.
21945 emacs_cv_localtime_cache=no
21946fi
21947fi
d6e01aa5
KL
21948{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21949echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21950if test $emacs_cv_localtime_cache = yes; then
b936fae4 21951
c0d27fcc 21952cat >>confdefs.h <<\_ACEOF
ba4481b5 21953#define LOCALTIME_CACHE 1
c0d27fcc 21954_ACEOF
ba4481b5
DL
21955
21956fi
21957
21958if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21959
21960for ac_func in gettimeofday
48d4b120 21961do
503d2be0 21962as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
21963{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21964echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21965if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21966 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21967else
503d2be0 21968 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21969/* confdefs.h. */
21970_ACEOF
21971cat confdefs.h >>conftest.$ac_ext
21972cat >>conftest.$ac_ext <<_ACEOF
21973/* end confdefs.h. */
edfaf76d
LK
21974/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21976#define $ac_func innocuous_$ac_func
21977
48d4b120 21978/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21979 which can conflict with char $ac_func (); below.
21980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21981 <limits.h> exists even on freestanding compilers. */
edfaf76d 21982
19650fd6
AS
21983#ifdef __STDC__
21984# include <limits.h>
21985#else
21986# include <assert.h>
21987#endif
edfaf76d
LK
21988
21989#undef $ac_func
21990
d6e01aa5
KL
21991/* Override any GCC internal prototype to avoid an error.
21992 Use char because int might match the return type of a GCC
21993 builtin and then its argument prototype would still apply. */
503d2be0
AS
21994#ifdef __cplusplus
21995extern "C"
21996#endif
503d2be0 21997char $ac_func ();
48d4b120
DL
21998/* The GNU C library defines this for functions which it implements
21999 to always fail with ENOSYS. Some functions are actually named
22000 something starting with __ and the normal name is an alias. */
d6e01aa5 22001#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22002choke me
cd958eb3
MB
22003#endif
22004
19650fd6
AS
22005int
22006main ()
22007{
d6e01aa5 22008return $ac_func ();
503d2be0
AS
22009 ;
22010 return 0;
22011}
22012_ACEOF
22013rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22014if { (ac_try="$ac_link"
22015case "(($ac_try" in
22016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22017 *) ac_try_echo=$ac_try;;
22018esac
22019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22020 (eval "$ac_link") 2>conftest.er1
503d2be0 22021 ac_status=$?
edfaf76d
LK
22022 grep -v '^ *+' conftest.er1 >conftest.err
22023 rm -f conftest.er1
22024 cat conftest.err >&5
c0d27fcc 22025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22026 (exit $ac_status); } && {
22027 test -z "$ac_c_werror_flag" ||
22028 test ! -s conftest.err
22029 } && test -s conftest$ac_exeext &&
22030 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22031 eval "$as_ac_var=yes"
22032else
22033 echo "$as_me: failed program was:" >&5
19650fd6
AS
22034sed 's/^/| /' conftest.$ac_ext >&5
22035
d6e01aa5 22036 eval "$as_ac_var=no"
503d2be0 22037fi
d6e01aa5
KL
22038
22039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22040 conftest$ac_exeext conftest.$ac_ext
503d2be0 22041fi
d6e01aa5
KL
22042ac_res=`eval echo '${'$as_ac_var'}'`
22043 { echo "$as_me:$LINENO: result: $ac_res" >&5
22044echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22045if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22046 cat >>confdefs.h <<_ACEOF
503d2be0 22047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22048_ACEOF
48d4b120 22049
48d4b120
DL
22050fi
22051done
22052
b936fae4 22053 if test $ac_cv_func_gettimeofday = yes; then
d6e01aa5
KL
22054 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22055echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22056if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22057 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22058else
503d2be0 22059 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22060/* confdefs.h. */
22061_ACEOF
22062cat confdefs.h >>conftest.$ac_ext
22063cat >>conftest.$ac_ext <<_ACEOF
22064/* end confdefs.h. */
ba4481b5 22065
a3f08d9e
DL
22066#ifdef TIME_WITH_SYS_TIME
22067#include <sys/time.h>
22068#include <time.h>
22069#else
22070#ifdef HAVE_SYS_TIME_H
22071#include <sys/time.h>
22072#else
22073#include <time.h>
22074#endif
22075#endif
503d2be0
AS
22076int
22077main ()
22078{
a3f08d9e 22079struct timeval time;
b936fae4 22080 gettimeofday (&time, 0);
503d2be0
AS
22081 ;
22082 return 0;
22083}
22084_ACEOF
22085rm -f conftest.$ac_objext
d6e01aa5
KL
22086if { (ac_try="$ac_compile"
22087case "(($ac_try" in
22088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22089 *) ac_try_echo=$ac_try;;
22090esac
22091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22092 (eval "$ac_compile") 2>conftest.er1
503d2be0 22093 ac_status=$?
edfaf76d
LK
22094 grep -v '^ *+' conftest.er1 >conftest.err
22095 rm -f conftest.er1
22096 cat conftest.err >&5
c0d27fcc 22097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22098 (exit $ac_status); } && {
22099 test -z "$ac_c_werror_flag" ||
22100 test ! -s conftest.err
22101 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22102 emacs_cv_gettimeofday_two_arguments=yes
22103else
503d2be0 22104 echo "$as_me: failed program was:" >&5
19650fd6
AS
22105sed 's/^/| /' conftest.$ac_ext >&5
22106
d6e01aa5 22107 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22108fi
d6e01aa5
KL
22109
22110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22111fi
d6e01aa5
KL
22112{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22113echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22114 if test $emacs_cv_gettimeofday_two_arguments = no; then
22115
c0d27fcc 22116cat >>confdefs.h <<\_ACEOF
ba4481b5 22117#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22118_ACEOF
ba4481b5 22119
b936fae4 22120 fi
ba4481b5
DL
22121 fi
22122fi
22123
22124ok_so_far=yes
d6e01aa5
KL
22125{ echo "$as_me:$LINENO: checking for socket" >&5
22126echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22127if test "${ac_cv_func_socket+set}" = set; then
22128 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22129else
503d2be0 22130 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22131/* confdefs.h. */
22132_ACEOF
22133cat confdefs.h >>conftest.$ac_ext
22134cat >>conftest.$ac_ext <<_ACEOF
22135/* end confdefs.h. */
edfaf76d
LK
22136/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22137 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22138#define socket innocuous_socket
22139
ba4481b5 22140/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22141 which can conflict with char socket (); below.
22142 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22143 <limits.h> exists even on freestanding compilers. */
edfaf76d 22144
19650fd6
AS
22145#ifdef __STDC__
22146# include <limits.h>
22147#else
22148# include <assert.h>
22149#endif
edfaf76d
LK
22150
22151#undef socket
22152
d6e01aa5
KL
22153/* Override any GCC internal prototype to avoid an error.
22154 Use char because int might match the return type of a GCC
22155 builtin and then its argument prototype would still apply. */
503d2be0
AS
22156#ifdef __cplusplus
22157extern "C"
22158#endif
503d2be0 22159char socket ();
ba4481b5
DL
22160/* The GNU C library defines this for functions which it implements
22161 to always fail with ENOSYS. Some functions are actually named
22162 something starting with __ and the normal name is an alias. */
d6e01aa5 22163#if defined __stub_socket || defined __stub___socket
ba4481b5 22164choke me
cd958eb3
MB
22165#endif
22166
19650fd6
AS
22167int
22168main ()
22169{
d6e01aa5 22170return socket ();
503d2be0
AS
22171 ;
22172 return 0;
22173}
22174_ACEOF
22175rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22176if { (ac_try="$ac_link"
22177case "(($ac_try" in
22178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22179 *) ac_try_echo=$ac_try;;
22180esac
22181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22182 (eval "$ac_link") 2>conftest.er1
503d2be0 22183 ac_status=$?
edfaf76d
LK
22184 grep -v '^ *+' conftest.er1 >conftest.err
22185 rm -f conftest.er1
22186 cat conftest.err >&5
c0d27fcc 22187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22188 (exit $ac_status); } && {
22189 test -z "$ac_c_werror_flag" ||
22190 test ! -s conftest.err
22191 } && test -s conftest$ac_exeext &&
22192 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22193 ac_cv_func_socket=yes
22194else
22195 echo "$as_me: failed program was:" >&5
19650fd6
AS
22196sed 's/^/| /' conftest.$ac_ext >&5
22197
d6e01aa5 22198 ac_cv_func_socket=no
503d2be0 22199fi
d6e01aa5
KL
22200
22201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22202 conftest$ac_exeext conftest.$ac_ext
503d2be0 22203fi
d6e01aa5
KL
22204{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22205echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22206if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22207 :
22208else
503d2be0 22209 ok_so_far=no
ba4481b5
DL
22210fi
22211
22212if test $ok_so_far = yes; then
c0d27fcc 22213 if test "${ac_cv_header_netinet_in_h+set}" = set; then
d6e01aa5
KL
22214 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22215echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22216if test "${ac_cv_header_netinet_in_h+set}" = set; then
22217 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22218fi
d6e01aa5
KL
22219{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22220echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22221else
c0d27fcc 22222 # Is the header compilable?
d6e01aa5
KL
22223{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22224echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22225cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22226/* confdefs.h. */
22227_ACEOF
22228cat confdefs.h >>conftest.$ac_ext
22229cat >>conftest.$ac_ext <<_ACEOF
22230/* end confdefs.h. */
c0d27fcc
MR
22231$ac_includes_default
22232#include <netinet/in.h>
22233_ACEOF
22234rm -f conftest.$ac_objext
d6e01aa5
KL
22235if { (ac_try="$ac_compile"
22236case "(($ac_try" in
22237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22238 *) ac_try_echo=$ac_try;;
22239esac
22240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22241 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22242 ac_status=$?
edfaf76d
LK
22243 grep -v '^ *+' conftest.er1 >conftest.err
22244 rm -f conftest.er1
22245 cat conftest.err >&5
c0d27fcc 22246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22247 (exit $ac_status); } && {
22248 test -z "$ac_c_werror_flag" ||
22249 test ! -s conftest.err
22250 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22251 ac_header_compiler=yes
22252else
22253 echo "$as_me: failed program was:" >&5
19650fd6
AS
22254sed 's/^/| /' conftest.$ac_ext >&5
22255
d6e01aa5 22256 ac_header_compiler=no
c0d27fcc 22257fi
d6e01aa5
KL
22258
22259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22260{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22261echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22262
22263# Is the header present?
d6e01aa5
KL
22264{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22265echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22266cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22267/* confdefs.h. */
22268_ACEOF
22269cat confdefs.h >>conftest.$ac_ext
22270cat >>conftest.$ac_ext <<_ACEOF
22271/* end confdefs.h. */
ba4481b5 22272#include <netinet/in.h>
503d2be0 22273_ACEOF
d6e01aa5
KL
22274if { (ac_try="$ac_cpp conftest.$ac_ext"
22275case "(($ac_try" in
22276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22277 *) ac_try_echo=$ac_try;;
22278esac
22279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22280 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22281 ac_status=$?
6bae0ccf 22282 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22283 rm -f conftest.er1
22284 cat conftest.err >&5
c0d27fcc 22285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22286 (exit $ac_status); } >/dev/null && {
22287 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22288 test ! -s conftest.err
22289 }; then
c0d27fcc 22290 ac_header_preproc=yes
ba4481b5 22291else
503d2be0 22292 echo "$as_me: failed program was:" >&5
19650fd6
AS
22293sed 's/^/| /' conftest.$ac_ext >&5
22294
c0d27fcc 22295 ac_header_preproc=no
ba4481b5 22296fi
d6e01aa5 22297
503d2be0 22298rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22299{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22300echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22301
22302# So? What about this header?
edfaf76d
LK
22303case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22304 yes:no: )
c0d27fcc
MR
22305 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22306echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22307 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22308echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22309 ac_header_preproc=yes
19650fd6 22310 ;;
edfaf76d 22311 no:yes:* )
c0d27fcc
MR
22312 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22313echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22314 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22315echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22316 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22317echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22318 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22319echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22320 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22321echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22322 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22323echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22324
19650fd6 22325 ;;
c0d27fcc 22326esac
d6e01aa5
KL
22327{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22328echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22329if test "${ac_cv_header_netinet_in_h+set}" = set; then
22330 echo $ECHO_N "(cached) $ECHO_C" >&6
22331else
22332 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22333fi
d6e01aa5
KL
22334{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22335echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22336
22337fi
503d2be0 22338if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22339 :
22340else
503d2be0 22341 ok_so_far=no
ba4481b5
DL
22342fi
22343
c0d27fcc 22344
ba4481b5
DL
22345fi
22346if test $ok_so_far = yes; then
c0d27fcc 22347 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
d6e01aa5
KL
22348 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22349echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22350if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22351 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22352fi
d6e01aa5
KL
22353{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22354echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22355else
c0d27fcc 22356 # Is the header compilable?
d6e01aa5
KL
22357{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22358echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22359cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22360/* confdefs.h. */
22361_ACEOF
22362cat confdefs.h >>conftest.$ac_ext
22363cat >>conftest.$ac_ext <<_ACEOF
22364/* end confdefs.h. */
c0d27fcc
MR
22365$ac_includes_default
22366#include <arpa/inet.h>
22367_ACEOF
22368rm -f conftest.$ac_objext
d6e01aa5
KL
22369if { (ac_try="$ac_compile"
22370case "(($ac_try" in
22371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22372 *) ac_try_echo=$ac_try;;
22373esac
22374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22375 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22376 ac_status=$?
edfaf76d
LK
22377 grep -v '^ *+' conftest.er1 >conftest.err
22378 rm -f conftest.er1
22379 cat conftest.err >&5
c0d27fcc 22380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22381 (exit $ac_status); } && {
22382 test -z "$ac_c_werror_flag" ||
22383 test ! -s conftest.err
22384 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22385 ac_header_compiler=yes
22386else
22387 echo "$as_me: failed program was:" >&5
19650fd6
AS
22388sed 's/^/| /' conftest.$ac_ext >&5
22389
d6e01aa5 22390 ac_header_compiler=no
c0d27fcc 22391fi
d6e01aa5
KL
22392
22393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22394{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22395echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22396
22397# Is the header present?
d6e01aa5
KL
22398{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22399echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22400cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22401/* confdefs.h. */
22402_ACEOF
22403cat confdefs.h >>conftest.$ac_ext
22404cat >>conftest.$ac_ext <<_ACEOF
22405/* end confdefs.h. */
ba4481b5 22406#include <arpa/inet.h>
503d2be0 22407_ACEOF
d6e01aa5
KL
22408if { (ac_try="$ac_cpp conftest.$ac_ext"
22409case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
22413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22414 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22415 ac_status=$?
6bae0ccf 22416 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22417 rm -f conftest.er1
22418 cat conftest.err >&5
c0d27fcc 22419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22420 (exit $ac_status); } >/dev/null && {
22421 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22422 test ! -s conftest.err
22423 }; then
c0d27fcc 22424 ac_header_preproc=yes
ba4481b5 22425else
503d2be0 22426 echo "$as_me: failed program was:" >&5
19650fd6
AS
22427sed 's/^/| /' conftest.$ac_ext >&5
22428
c0d27fcc 22429 ac_header_preproc=no
ba4481b5 22430fi
d6e01aa5 22431
503d2be0 22432rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22433{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22434echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22435
22436# So? What about this header?
edfaf76d
LK
22437case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22438 yes:no: )
c0d27fcc
MR
22439 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22440echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22441 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22442echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22443 ac_header_preproc=yes
19650fd6 22444 ;;
edfaf76d 22445 no:yes:* )
c0d27fcc
MR
22446 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22447echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22448 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22449echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22450 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22451echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22452 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22453echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22454 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22455echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22456 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22457echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22458
19650fd6 22459 ;;
c0d27fcc 22460esac
d6e01aa5
KL
22461{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22462echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22463if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22464 echo $ECHO_N "(cached) $ECHO_C" >&6
22465else
22466 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22467fi
d6e01aa5
KL
22468{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22469echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22470
22471fi
503d2be0 22472if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22473 :
22474else
503d2be0 22475 ok_so_far=no
ba4481b5
DL
22476fi
22477
c0d27fcc 22478
ba4481b5
DL
22479fi
22480if test $ok_so_far = yes; then
b936fae4 22481
c0d27fcc 22482cat >>confdefs.h <<\_ACEOF
ba4481b5 22483#define HAVE_INET_SOCKETS 1
c0d27fcc 22484_ACEOF
ba4481b5
DL
22485
22486fi
22487
2d2b6695 22488
7862d3a8 22489for ac_header in sys/ioctl.h
2d2b6695
KS
22490do
22491as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22492if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22493 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22494echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22495if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22496 echo $ECHO_N "(cached) $ECHO_C" >&6
22497fi
d6e01aa5
KL
22498ac_res=`eval echo '${'$as_ac_Header'}'`
22499 { echo "$as_me:$LINENO: result: $ac_res" >&5
22500echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22501else
22502 # Is the header compilable?
d6e01aa5
KL
22503{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22504echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22505cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22506/* confdefs.h. */
22507_ACEOF
22508cat confdefs.h >>conftest.$ac_ext
22509cat >>conftest.$ac_ext <<_ACEOF
22510/* end confdefs.h. */
22511$ac_includes_default
22512#include <$ac_header>
22513_ACEOF
22514rm -f conftest.$ac_objext
d6e01aa5
KL
22515if { (ac_try="$ac_compile"
22516case "(($ac_try" in
22517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22518 *) ac_try_echo=$ac_try;;
22519esac
22520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22521 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22522 ac_status=$?
edfaf76d
LK
22523 grep -v '^ *+' conftest.er1 >conftest.err
22524 rm -f conftest.er1
22525 cat conftest.err >&5
2d2b6695 22526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22527 (exit $ac_status); } && {
22528 test -z "$ac_c_werror_flag" ||
22529 test ! -s conftest.err
22530 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22531 ac_header_compiler=yes
22532else
22533 echo "$as_me: failed program was:" >&5
22534sed 's/^/| /' conftest.$ac_ext >&5
22535
d6e01aa5 22536 ac_header_compiler=no
2d2b6695 22537fi
d6e01aa5
KL
22538
22539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22540{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22541echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22542
22543# Is the header present?
d6e01aa5
KL
22544{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22545echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22546cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22547/* confdefs.h. */
22548_ACEOF
22549cat confdefs.h >>conftest.$ac_ext
22550cat >>conftest.$ac_ext <<_ACEOF
22551/* end confdefs.h. */
22552#include <$ac_header>
22553_ACEOF
d6e01aa5
KL
22554if { (ac_try="$ac_cpp conftest.$ac_ext"
22555case "(($ac_try" in
22556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22557 *) ac_try_echo=$ac_try;;
22558esac
22559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22560 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22561 ac_status=$?
22562 grep -v '^ *+' conftest.er1 >conftest.err
22563 rm -f conftest.er1
22564 cat conftest.err >&5
22565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22566 (exit $ac_status); } >/dev/null && {
22567 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22568 test ! -s conftest.err
22569 }; then
2d2b6695
KS
22570 ac_header_preproc=yes
22571else
22572 echo "$as_me: failed program was:" >&5
22573sed 's/^/| /' conftest.$ac_ext >&5
22574
22575 ac_header_preproc=no
22576fi
d6e01aa5 22577
2d2b6695 22578rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22579{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22580echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22581
22582# So? What about this header?
edfaf76d
LK
22583case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22584 yes:no: )
2d2b6695
KS
22585 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22586echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22587 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22588echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22589 ac_header_preproc=yes
2d2b6695 22590 ;;
edfaf76d 22591 no:yes:* )
2d2b6695
KS
22592 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22593echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22594 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22595echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22596 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22597echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22598 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22599echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22600 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22601echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22602 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22603echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22604
2d2b6695
KS
22605 ;;
22606esac
d6e01aa5
KL
22607{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22610 echo $ECHO_N "(cached) $ECHO_C" >&6
22611else
edfaf76d 22612 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22613fi
d6e01aa5
KL
22614ac_res=`eval echo '${'$as_ac_Header'}'`
22615 { echo "$as_me:$LINENO: result: $ac_res" >&5
22616echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22617
22618fi
22619if test `eval echo '${'$as_ac_Header'}'` = yes; then
22620 cat >>confdefs.h <<_ACEOF
22621#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22622_ACEOF
22623
22624fi
22625
22626done
22627
22628
ba4481b5 22629if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22630
c0d27fcc 22631cat >>confdefs.h <<\_ACEOF
ba4481b5 22632#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22633_ACEOF
ba4481b5
DL
22634
22635fi
22636
d6e01aa5
KL
22637{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22638echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22639if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
d6e01aa5
KL
22640 { echo "$as_me:$LINENO: result: yes" >&5
22641echo "${ECHO_T}yes" >&6; }
b936fae4 22642
c0d27fcc 22643cat >>confdefs.h <<\_ACEOF
3d9fec71 22644#define HAVE_DEV_PTMX 1
c0d27fcc 22645_ACEOF
3d9fec71
DL
22646
22647else
d6e01aa5
KL
22648 { echo "$as_me:$LINENO: result: no" >&5
22649echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22650fi
22651
d6e01aa5
KL
22652{ echo "$as_me:$LINENO: checking for pid_t" >&5
22653echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22654if test "${ac_cv_type_pid_t+set}" = set; then
22655 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22656else
503d2be0 22657 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22658/* confdefs.h. */
22659_ACEOF
22660cat confdefs.h >>conftest.$ac_ext
22661cat >>conftest.$ac_ext <<_ACEOF
22662/* end confdefs.h. */
503d2be0 22663$ac_includes_default
d6e01aa5 22664typedef pid_t ac__type_new_;
503d2be0
AS
22665int
22666main ()
22667{
d6e01aa5 22668if ((ac__type_new_ *) 0)
503d2be0 22669 return 0;
d6e01aa5 22670if (sizeof (ac__type_new_))
503d2be0
AS
22671 return 0;
22672 ;
22673 return 0;
22674}
22675_ACEOF
22676rm -f conftest.$ac_objext
d6e01aa5
KL
22677if { (ac_try="$ac_compile"
22678case "(($ac_try" in
22679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22680 *) ac_try_echo=$ac_try;;
22681esac
22682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22683 (eval "$ac_compile") 2>conftest.er1
503d2be0 22684 ac_status=$?
edfaf76d
LK
22685 grep -v '^ *+' conftest.er1 >conftest.err
22686 rm -f conftest.er1
22687 cat conftest.err >&5
c0d27fcc 22688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22689 (exit $ac_status); } && {
22690 test -z "$ac_c_werror_flag" ||
22691 test ! -s conftest.err
22692 } && test -s conftest.$ac_objext; then
647847ea
DL
22693 ac_cv_type_pid_t=yes
22694else
503d2be0 22695 echo "$as_me: failed program was:" >&5
19650fd6
AS
22696sed 's/^/| /' conftest.$ac_ext >&5
22697
d6e01aa5 22698 ac_cv_type_pid_t=no
647847ea 22699fi
d6e01aa5
KL
22700
22701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22702fi
d6e01aa5
KL
22703{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22704echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22705if test $ac_cv_type_pid_t = yes; then
22706 :
22707else
22708
c0d27fcc 22709cat >>confdefs.h <<_ACEOF
647847ea 22710#define pid_t int
c0d27fcc 22711_ACEOF
647847ea
DL
22712
22713fi
22714
c0d27fcc 22715
d6e01aa5 22716for ac_header in vfork.h
503d2be0
AS
22717do
22718as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22719if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22720 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22722if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22723 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22724fi
d6e01aa5
KL
22725ac_res=`eval echo '${'$as_ac_Header'}'`
22726 { echo "$as_me:$LINENO: result: $ac_res" >&5
22727echo "${ECHO_T}$ac_res" >&6; }
98418dba 22728else
c0d27fcc 22729 # Is the header compilable?
d6e01aa5
KL
22730{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22731echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22732cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22733/* confdefs.h. */
22734_ACEOF
22735cat confdefs.h >>conftest.$ac_ext
22736cat >>conftest.$ac_ext <<_ACEOF
22737/* end confdefs.h. */
c0d27fcc
MR
22738$ac_includes_default
22739#include <$ac_header>
22740_ACEOF
22741rm -f conftest.$ac_objext
d6e01aa5
KL
22742if { (ac_try="$ac_compile"
22743case "(($ac_try" in
22744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22745 *) ac_try_echo=$ac_try;;
22746esac
22747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22748 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22749 ac_status=$?
edfaf76d
LK
22750 grep -v '^ *+' conftest.er1 >conftest.err
22751 rm -f conftest.er1
22752 cat conftest.err >&5
c0d27fcc 22753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22754 (exit $ac_status); } && {
22755 test -z "$ac_c_werror_flag" ||
22756 test ! -s conftest.err
22757 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22758 ac_header_compiler=yes
22759else
22760 echo "$as_me: failed program was:" >&5
19650fd6
AS
22761sed 's/^/| /' conftest.$ac_ext >&5
22762
d6e01aa5 22763 ac_header_compiler=no
c0d27fcc 22764fi
d6e01aa5
KL
22765
22766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22767{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22768echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22769
22770# Is the header present?
d6e01aa5
KL
22771{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22772echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22773cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22774/* confdefs.h. */
22775_ACEOF
22776cat confdefs.h >>conftest.$ac_ext
22777cat >>conftest.$ac_ext <<_ACEOF
22778/* end confdefs.h. */
503d2be0
AS
22779#include <$ac_header>
22780_ACEOF
d6e01aa5
KL
22781if { (ac_try="$ac_cpp conftest.$ac_ext"
22782case "(($ac_try" in
22783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22784 *) ac_try_echo=$ac_try;;
22785esac
22786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22787 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22788 ac_status=$?
6bae0ccf 22789 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22790 rm -f conftest.er1
22791 cat conftest.err >&5
c0d27fcc 22792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22793 (exit $ac_status); } >/dev/null && {
22794 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22795 test ! -s conftest.err
22796 }; then
c0d27fcc 22797 ac_header_preproc=yes
647847ea 22798else
503d2be0 22799 echo "$as_me: failed program was:" >&5
19650fd6
AS
22800sed 's/^/| /' conftest.$ac_ext >&5
22801
c0d27fcc 22802 ac_header_preproc=no
647847ea 22803fi
d6e01aa5 22804
503d2be0 22805rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22806{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22807echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22808
22809# So? What about this header?
edfaf76d
LK
22810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22811 yes:no: )
c0d27fcc
MR
22812 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22813echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22815echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22816 ac_header_preproc=yes
19650fd6 22817 ;;
edfaf76d 22818 no:yes:* )
c0d27fcc
MR
22819 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22820echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22821 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22822echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22823 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22824echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22825 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22826echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22827 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22828echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22829 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22830echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22831
19650fd6 22832 ;;
c0d27fcc 22833esac
d6e01aa5
KL
22834{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22835echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22836if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22837 echo $ECHO_N "(cached) $ECHO_C" >&6
22838else
edfaf76d 22839 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22840fi
d6e01aa5
KL
22841ac_res=`eval echo '${'$as_ac_Header'}'`
22842 { echo "$as_me:$LINENO: result: $ac_res" >&5
22843echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22844
22845fi
503d2be0 22846if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22847 cat >>confdefs.h <<_ACEOF
503d2be0 22848#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22849_ACEOF
647847ea 22850
73b77ee5 22851fi
c0d27fcc 22852
503d2be0 22853done
73b77ee5 22854
c0d27fcc
MR
22855
22856
503d2be0
AS
22857for ac_func in fork vfork
22858do
22859as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
22860{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22861echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22862if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22863 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22864else
503d2be0 22865 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22866/* confdefs.h. */
22867_ACEOF
22868cat confdefs.h >>conftest.$ac_ext
22869cat >>conftest.$ac_ext <<_ACEOF
22870/* end confdefs.h. */
edfaf76d
LK
22871/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22873#define $ac_func innocuous_$ac_func
22874
fa0b693c 22875/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22876 which can conflict with char $ac_func (); below.
22877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22878 <limits.h> exists even on freestanding compilers. */
edfaf76d 22879
19650fd6
AS
22880#ifdef __STDC__
22881# include <limits.h>
22882#else
22883# include <assert.h>
22884#endif
edfaf76d
LK
22885
22886#undef $ac_func
22887
d6e01aa5
KL
22888/* Override any GCC internal prototype to avoid an error.
22889 Use char because int might match the return type of a GCC
22890 builtin and then its argument prototype would still apply. */
503d2be0
AS
22891#ifdef __cplusplus
22892extern "C"
22893#endif
503d2be0 22894char $ac_func ();
fa0b693c
GM
22895/* The GNU C library defines this for functions which it implements
22896 to always fail with ENOSYS. Some functions are actually named
22897 something starting with __ and the normal name is an alias. */
d6e01aa5 22898#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22899choke me
fa0b693c
GM
22900#endif
22901
19650fd6
AS
22902int
22903main ()
22904{
d6e01aa5 22905return $ac_func ();
503d2be0
AS
22906 ;
22907 return 0;
22908}
22909_ACEOF
22910rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22911if { (ac_try="$ac_link"
22912case "(($ac_try" in
22913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22914 *) ac_try_echo=$ac_try;;
22915esac
22916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22917 (eval "$ac_link") 2>conftest.er1
503d2be0 22918 ac_status=$?
edfaf76d
LK
22919 grep -v '^ *+' conftest.er1 >conftest.err
22920 rm -f conftest.er1
22921 cat conftest.err >&5
c0d27fcc 22922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22923 (exit $ac_status); } && {
22924 test -z "$ac_c_werror_flag" ||
22925 test ! -s conftest.err
22926 } && test -s conftest$ac_exeext &&
22927 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22928 eval "$as_ac_var=yes"
22929else
22930 echo "$as_me: failed program was:" >&5
19650fd6
AS
22931sed 's/^/| /' conftest.$ac_ext >&5
22932
d6e01aa5 22933 eval "$as_ac_var=no"
503d2be0 22934fi
d6e01aa5
KL
22935
22936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22937 conftest$ac_exeext conftest.$ac_ext
503d2be0 22938fi
d6e01aa5
KL
22939ac_res=`eval echo '${'$as_ac_var'}'`
22940 { echo "$as_me:$LINENO: result: $ac_res" >&5
22941echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22942if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22943 cat >>confdefs.h <<_ACEOF
503d2be0 22944#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22945_ACEOF
503d2be0 22946
fa0b693c 22947fi
503d2be0 22948done
fa0b693c 22949
503d2be0 22950if test "x$ac_cv_func_fork" = xyes; then
d6e01aa5
KL
22951 { echo "$as_me:$LINENO: checking for working fork" >&5
22952echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22953if test "${ac_cv_func_fork_works+set}" = set; then
22954 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22955else
503d2be0
AS
22956 if test "$cross_compiling" = yes; then
22957 ac_cv_func_fork_works=cross
22958else
22959 cat >conftest.$ac_ext <<_ACEOF
c3a63088
KL
22960/* confdefs.h. */
22961_ACEOF
22962cat confdefs.h >>conftest.$ac_ext
22963cat >>conftest.$ac_ext <<_ACEOF
22964/* end confdefs.h. */
22965$ac_includes_default
22966int
22967main ()
22968{
22969
22970 /* By Ruediger Kuhlmann. */
d6e01aa5 22971 return fork () < 0;
c3a63088
KL
22972
22973 ;
22974 return 0;
22975}
503d2be0
AS
22976_ACEOF
22977rm -f conftest$ac_exeext
d6e01aa5
KL
22978if { (ac_try="$ac_link"
22979case "(($ac_try" in
22980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22981 *) ac_try_echo=$ac_try;;
22982esac
22983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22984 (eval "$ac_link") 2>&5
503d2be0 22985 ac_status=$?
c0d27fcc 22986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
22988 { (case "(($ac_try" in
22989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22990 *) ac_try_echo=$ac_try;;
22991esac
22992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22993 (eval "$ac_try") 2>&5
503d2be0 22994 ac_status=$?
c0d27fcc 22995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22996 (exit $ac_status); }; }; then
22997 ac_cv_func_fork_works=yes
22998else
22999 echo "$as_me: program exited with status $ac_status" >&5
23000echo "$as_me: failed program was:" >&5
19650fd6
AS
23001sed 's/^/| /' conftest.$ac_ext >&5
23002
c0d27fcc 23003( exit $ac_status )
503d2be0
AS
23004ac_cv_func_fork_works=no
23005fi
d6e01aa5 23006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23007fi
d6e01aa5
KL
23008
23009
503d2be0 23010fi
d6e01aa5
KL
23011{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23012echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23013
6bae0ccf
DL
23014else
23015 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23016fi
23017if test "x$ac_cv_func_fork_works" = xcross; then
23018 case $host in
23019 *-*-amigaos* | *-*-msdosdjgpp*)
23020 # Override, as these systems have only a dummy fork() stub
23021 ac_cv_func_fork_works=no
23022 ;;
23023 *)
23024 ac_cv_func_fork_works=yes
23025 ;;
23026 esac
c0d27fcc
MR
23027 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23028echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23029fi
73b77ee5 23030ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23031if test "x$ac_cv_func_vfork" = xyes; then
d6e01aa5
KL
23032 { echo "$as_me:$LINENO: checking for working vfork" >&5
23033echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23034if test "${ac_cv_func_vfork_works+set}" = set; then
23035 echo $ECHO_N "(cached) $ECHO_C" >&6
23036else
23037 if test "$cross_compiling" = yes; then
23038 ac_cv_func_vfork_works=cross
fa0b693c 23039else
503d2be0 23040 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23041/* confdefs.h. */
23042_ACEOF
23043cat confdefs.h >>conftest.$ac_ext
23044cat >>conftest.$ac_ext <<_ACEOF
23045/* end confdefs.h. */
73b77ee5 23046/* Thanks to Paul Eggert for this test. */
d6e01aa5 23047$ac_includes_default
19650fd6 23048#include <sys/wait.h>
d6e01aa5 23049#ifdef HAVE_VFORK_H
503d2be0 23050# include <vfork.h>
73b77ee5
GM
23051#endif
23052/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23053 argument registers are propagated back to the parent. The compiler
23054 is told about this with #include <vfork.h>, but some compilers
23055 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23056 static variable whose address is put into a register that is
23057 clobbered by the vfork. */
19650fd6 23058static void
fa0b693c 23059#ifdef __cplusplus
73b77ee5 23060sparc_address_test (int arg)
503d2be0 23061# else
73b77ee5 23062sparc_address_test (arg) int arg;
fa0b693c 23063#endif
fa0b693c 23064{
73b77ee5
GM
23065 static pid_t child;
23066 if (!child) {
23067 child = vfork ();
23068 if (child < 0) {
23069 perror ("vfork");
23070 _exit(2);
23071 }
23072 if (!child) {
23073 arg = getpid();
23074 write(-1, "", 0);
23075 _exit (arg);
23076 }
23077 }
23078}
503d2be0
AS
23079
23080int
23081main ()
23082{
73b77ee5
GM
23083 pid_t parent = getpid ();
23084 pid_t child;
fa0b693c 23085
19650fd6 23086 sparc_address_test (0);
fa0b693c 23087
73b77ee5 23088 child = vfork ();
fa0b693c 23089
73b77ee5 23090 if (child == 0) {
503d2be0
AS
23091 /* Here is another test for sparc vfork register problems. This
23092 test uses lots of local variables, at least as many local
23093 variables as main has allocated so far including compiler
23094 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23095 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23096 reuse the register of parent for one of the local variables,
23097 since it will think that parent can't possibly be used any more
23098 in this routine. Assigning to the local variable will thus
23099 munge parent in the parent process. */
73b77ee5
GM
23100 pid_t
23101 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23102 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23103 /* Convince the compiler that p..p7 are live; otherwise, it might
23104 use the same hardware register for all 8 local variables. */
23105 if (p != p1 || p != p2 || p != p3 || p != p4
23106 || p != p5 || p != p6 || p != p7)
23107 _exit(1);
fa0b693c 23108
503d2be0
AS
23109 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23110 from child file descriptors. If the child closes a descriptor
23111 before it execs or exits, this munges the parent's descriptor
23112 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23113 _exit(close(fileno(stdout)) != 0);
23114 } else {
23115 int status;
23116 struct stat st;
23117
23118 while (wait(&status) != child)
23119 ;
d6e01aa5 23120 return (
73b77ee5
GM
23121 /* Was there some problem with vforking? */
23122 child < 0
23123
23124 /* Did the child fail? (This shouldn't happen.) */
23125 || status
23126
23127 /* Did the vfork/compiler bug occur? */
23128 || parent != getpid()
fa0b693c 23129
73b77ee5
GM
23130 /* Did the file descriptor bug occur? */
23131 || fstat(fileno(stdout), &st) != 0
23132 );
23133 }
23134}
503d2be0
AS
23135_ACEOF
23136rm -f conftest$ac_exeext
d6e01aa5
KL
23137if { (ac_try="$ac_link"
23138case "(($ac_try" in
23139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23140 *) ac_try_echo=$ac_try;;
23141esac
23142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23143 (eval "$ac_link") 2>&5
503d2be0 23144 ac_status=$?
c0d27fcc 23145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23146 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
23147 { (case "(($ac_try" in
23148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23149 *) ac_try_echo=$ac_try;;
23150esac
23151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23152 (eval "$ac_try") 2>&5
503d2be0 23153 ac_status=$?
c0d27fcc 23154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23155 (exit $ac_status); }; }; then
73b77ee5 23156 ac_cv_func_vfork_works=yes
fa0b693c 23157else
503d2be0
AS
23158 echo "$as_me: program exited with status $ac_status" >&5
23159echo "$as_me: failed program was:" >&5
19650fd6
AS
23160sed 's/^/| /' conftest.$ac_ext >&5
23161
c0d27fcc 23162( exit $ac_status )
503d2be0
AS
23163ac_cv_func_vfork_works=no
23164fi
d6e01aa5 23165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23166fi
d6e01aa5
KL
23167
23168
fa0b693c 23169fi
d6e01aa5
KL
23170{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23171echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23172
503d2be0
AS
23173fi;
23174if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23175 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23176 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23177echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23178fi
23179
503d2be0
AS
23180if test "x$ac_cv_func_vfork_works" = xyes; then
23181
c0d27fcc 23182cat >>confdefs.h <<\_ACEOF
503d2be0 23183#define HAVE_WORKING_VFORK 1
c0d27fcc 23184_ACEOF
503d2be0
AS
23185
23186else
23187
c0d27fcc 23188cat >>confdefs.h <<\_ACEOF
73b77ee5 23189#define vfork fork
c0d27fcc 23190_ACEOF
fa0b693c
GM
23191
23192fi
503d2be0
AS
23193if test "x$ac_cv_func_fork_works" = xyes; then
23194
c0d27fcc 23195cat >>confdefs.h <<\_ACEOF
503d2be0 23196#define HAVE_WORKING_FORK 1
c0d27fcc 23197_ACEOF
fa0b693c 23198
503d2be0 23199fi
647847ea 23200
c0d27fcc 23201
d6e01aa5
KL
23202{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23203echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23204if test "${emacs_cv_langinfo_codeset+set}" = set; then
23205 echo $ECHO_N "(cached) $ECHO_C" >&6
23206else
23207 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23208/* confdefs.h. */
23209_ACEOF
23210cat confdefs.h >>conftest.$ac_ext
23211cat >>conftest.$ac_ext <<_ACEOF
23212/* end confdefs.h. */
6a3a24fa
JD
23213#include <langinfo.h>
23214int
23215main ()
23216{
23217char* cs = nl_langinfo(CODESET);
23218 ;
23219 return 0;
23220}
23221_ACEOF
23222rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
23223if { (ac_try="$ac_link"
23224case "(($ac_try" in
23225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23226 *) ac_try_echo=$ac_try;;
23227esac
23228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23229 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23230 ac_status=$?
edfaf76d
LK
23231 grep -v '^ *+' conftest.er1 >conftest.err
23232 rm -f conftest.er1
23233 cat conftest.err >&5
6a3a24fa 23234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23235 (exit $ac_status); } && {
23236 test -z "$ac_c_werror_flag" ||
23237 test ! -s conftest.err
23238 } && test -s conftest$ac_exeext &&
23239 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23240 emacs_cv_langinfo_codeset=yes
23241else
23242 echo "$as_me: failed program was:" >&5
19650fd6
AS
23243sed 's/^/| /' conftest.$ac_ext >&5
23244
d6e01aa5 23245 emacs_cv_langinfo_codeset=no
6a3a24fa 23246fi
d6e01aa5
KL
23247
23248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23249 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23250
23251fi
d6e01aa5
KL
23252{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23253echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23254if test $emacs_cv_langinfo_codeset = yes; then
23255
23256cat >>confdefs.h <<\_ACEOF
23257#define HAVE_LANGINFO_CODESET 1
23258_ACEOF
23259
23260fi
23261
d6e01aa5
KL
23262{ echo "$as_me:$LINENO: checking for size_t" >&5
23263echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23264if test "${ac_cv_type_size_t+set}" = set; then
23265 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23266else
503d2be0 23267 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23268/* confdefs.h. */
23269_ACEOF
23270cat confdefs.h >>conftest.$ac_ext
23271cat >>conftest.$ac_ext <<_ACEOF
23272/* end confdefs.h. */
503d2be0 23273$ac_includes_default
d6e01aa5 23274typedef size_t ac__type_new_;
503d2be0
AS
23275int
23276main ()
23277{
d6e01aa5 23278if ((ac__type_new_ *) 0)
503d2be0 23279 return 0;
d6e01aa5 23280if (sizeof (ac__type_new_))
503d2be0
AS
23281 return 0;
23282 ;
23283 return 0;
23284}
23285_ACEOF
23286rm -f conftest.$ac_objext
d6e01aa5
KL
23287if { (ac_try="$ac_compile"
23288case "(($ac_try" in
23289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23290 *) ac_try_echo=$ac_try;;
23291esac
23292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23293 (eval "$ac_compile") 2>conftest.er1
503d2be0 23294 ac_status=$?
edfaf76d
LK
23295 grep -v '^ *+' conftest.er1 >conftest.err
23296 rm -f conftest.er1
23297 cat conftest.err >&5
c0d27fcc 23298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23299 (exit $ac_status); } && {
23300 test -z "$ac_c_werror_flag" ||
23301 test ! -s conftest.err
23302 } && test -s conftest.$ac_objext; then
8730a8da
DL
23303 ac_cv_type_size_t=yes
23304else
503d2be0 23305 echo "$as_me: failed program was:" >&5
19650fd6
AS
23306sed 's/^/| /' conftest.$ac_ext >&5
23307
d6e01aa5 23308 ac_cv_type_size_t=no
8730a8da 23309fi
d6e01aa5
KL
23310
23311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23312fi
d6e01aa5
KL
23313{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23314echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23315if test $ac_cv_type_size_t = yes; then
503d2be0 23316
c0d27fcc
MR
23317cat >>confdefs.h <<_ACEOF
23318#define HAVE_SIZE_T 1
23319_ACEOF
23320
8730a8da
DL
23321
23322fi
23323
c0d27fcc 23324
d6e01aa5
KL
23325{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23326echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23327if test "${ac_cv_type_mbstate_t+set}" = set; then
23328 echo $ECHO_N "(cached) $ECHO_C" >&6
23329else
23330 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23331/* confdefs.h. */
23332_ACEOF
23333cat confdefs.h >>conftest.$ac_ext
23334cat >>conftest.$ac_ext <<_ACEOF
23335/* end confdefs.h. */
973a76b1
DL
23336$ac_includes_default
23337# include <wchar.h>
23338int
23339main ()
23340{
23341mbstate_t x; return sizeof x;
23342 ;
23343 return 0;
23344}
23345_ACEOF
23346rm -f conftest.$ac_objext
d6e01aa5
KL
23347if { (ac_try="$ac_compile"
23348case "(($ac_try" in
23349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23350 *) ac_try_echo=$ac_try;;
23351esac
23352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23353 (eval "$ac_compile") 2>conftest.er1
973a76b1 23354 ac_status=$?
edfaf76d
LK
23355 grep -v '^ *+' conftest.er1 >conftest.err
23356 rm -f conftest.er1
23357 cat conftest.err >&5
973a76b1 23358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23359 (exit $ac_status); } && {
23360 test -z "$ac_c_werror_flag" ||
23361 test ! -s conftest.err
23362 } && test -s conftest.$ac_objext; then
973a76b1
DL
23363 ac_cv_type_mbstate_t=yes
23364else
23365 echo "$as_me: failed program was:" >&5
19650fd6
AS
23366sed 's/^/| /' conftest.$ac_ext >&5
23367
d6e01aa5 23368 ac_cv_type_mbstate_t=no
973a76b1 23369fi
d6e01aa5
KL
23370
23371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23372fi
d6e01aa5
KL
23373{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23374echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23375 if test $ac_cv_type_mbstate_t = yes; then
23376
23377cat >>confdefs.h <<\_ACEOF
23378#define HAVE_MBSTATE_T 1
23379_ACEOF
23380
23381 else
23382
23383cat >>confdefs.h <<\_ACEOF
23384#define mbstate_t int
23385_ACEOF
23386
23387 fi
23388
d6e01aa5
KL
23389{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23390echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23391if test "${emacs_cv_c_restrict+set}" = set; then
23392 echo $ECHO_N "(cached) $ECHO_C" >&6
23393else
23394 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23395/* confdefs.h. */
23396_ACEOF
23397cat confdefs.h >>conftest.$ac_ext
23398cat >>conftest.$ac_ext <<_ACEOF
23399/* end confdefs.h. */
22044edf
DL
23400void fred (int *restrict x);
23401int
23402main ()
23403{
b936fae4 23404
22044edf
DL
23405 ;
23406 return 0;
23407}
c0d27fcc 23408_ACEOF
22044edf 23409rm -f conftest.$ac_objext
d6e01aa5
KL
23410if { (ac_try="$ac_compile"
23411case "(($ac_try" in
23412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23413 *) ac_try_echo=$ac_try;;
23414esac
23415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23416 (eval "$ac_compile") 2>conftest.er1
22044edf 23417 ac_status=$?
edfaf76d
LK
23418 grep -v '^ *+' conftest.er1 >conftest.err
23419 rm -f conftest.er1
23420 cat conftest.err >&5
22044edf 23421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23422 (exit $ac_status); } && {
23423 test -z "$ac_c_werror_flag" ||
23424 test ! -s conftest.err
23425 } && test -s conftest.$ac_objext; then
22044edf
DL
23426 emacs_cv_c_restrict=yes
23427else
23428 echo "$as_me: failed program was:" >&5
19650fd6
AS
23429sed 's/^/| /' conftest.$ac_ext >&5
23430
d6e01aa5 23431 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23432/* confdefs.h. */
23433_ACEOF
23434cat confdefs.h >>conftest.$ac_ext
23435cat >>conftest.$ac_ext <<_ACEOF
23436/* end confdefs.h. */
22044edf
DL
23437void fred (int *__restrict x);
23438int
23439main ()
23440{
c0d27fcc 23441
22044edf
DL
23442 ;
23443 return 0;
23444}
c0d27fcc 23445_ACEOF
22044edf 23446rm -f conftest.$ac_objext
d6e01aa5
KL
23447if { (ac_try="$ac_compile"
23448case "(($ac_try" in
23449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23450 *) ac_try_echo=$ac_try;;
23451esac
23452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23453 (eval "$ac_compile") 2>conftest.er1
22044edf 23454 ac_status=$?
edfaf76d
LK
23455 grep -v '^ *+' conftest.er1 >conftest.err
23456 rm -f conftest.er1
23457 cat conftest.err >&5
22044edf 23458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23459 (exit $ac_status); } && {
23460 test -z "$ac_c_werror_flag" ||
23461 test ! -s conftest.err
23462 } && test -s conftest.$ac_objext; then
22044edf
DL
23463 emacs_cv_c_restrict=__restrict
23464else
23465 echo "$as_me: failed program was:" >&5
19650fd6
AS
23466sed 's/^/| /' conftest.$ac_ext >&5
23467
d6e01aa5 23468 emacs_cv_c_restrict=no
ba4481b5 23469fi
d6e01aa5
KL
23470
23471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23472fi
d6e01aa5
KL
23473
23474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23475fi
d6e01aa5
KL
23476{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23477echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23478case "$emacs_cv_c_restrict" in
23479 yes) emacs_restrict=restrict;;
23480 no) emacs_restrict="";;
23481 *) emacs_restrict="$emacs_cv_c_restrict";;
23482esac
23483if test "$emacs_restrict" != __restrict; then
b936fae4 23484
22044edf
DL
23485cat >>confdefs.h <<_ACEOF
23486#define __restrict $emacs_restrict
c0d27fcc 23487_ACEOF
ba4481b5
DL
23488
23489fi
ba4481b5 23490
d6e01aa5
KL
23491{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23492echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23493if test "${emacs_cv_c_restrict_arr+set}" = set; then
23494 echo $ECHO_N "(cached) $ECHO_C" >&6
23495else
23496 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23497/* confdefs.h. */
23498_ACEOF
23499cat confdefs.h >>conftest.$ac_ext
23500cat >>conftest.$ac_ext <<_ACEOF
23501/* end confdefs.h. */
22044edf
DL
23502void fred (int x[__restrict]);
23503int
23504main ()
23505{
b936fae4 23506
22044edf
DL
23507 ;
23508 return 0;
23509}
c0d27fcc 23510_ACEOF
22044edf 23511rm -f conftest.$ac_objext
d6e01aa5
KL
23512if { (ac_try="$ac_compile"
23513case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
23517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23518 (eval "$ac_compile") 2>conftest.er1
22044edf 23519 ac_status=$?
edfaf76d
LK
23520 grep -v '^ *+' conftest.er1 >conftest.err
23521 rm -f conftest.er1
23522 cat conftest.err >&5
22044edf 23523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23524 (exit $ac_status); } && {
23525 test -z "$ac_c_werror_flag" ||
23526 test ! -s conftest.err
23527 } && test -s conftest.$ac_objext; then
22044edf
DL
23528 emacs_cv_c_restrict_arr=yes
23529else
23530 echo "$as_me: failed program was:" >&5
19650fd6
AS
23531sed 's/^/| /' conftest.$ac_ext >&5
23532
d6e01aa5 23533 emacs_cv_c_restrict_arr=no
ba4481b5 23534fi
d6e01aa5
KL
23535
23536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23537fi
d6e01aa5
KL
23538{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23539echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23540if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23541
c0d27fcc 23542cat >>confdefs.h <<\_ACEOF
22044edf 23543#define __restrict_arr __restrict
c0d27fcc 23544_ACEOF
ba4481b5 23545
ba4481b5
DL
23546fi
23547
c0d27fcc 23548
c0d27fcc 23549
22044edf
DL
23550# Set up the CFLAGS for real compilation, so we can substitute it.
23551CFLAGS="$REAL_CFLAGS"
23552CPPFLAGS="$REAL_CPPFLAGS"
23553
23554#### Find out which version of Emacs this is.
23555version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23556 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23557if test x"${version}" = x; then
23558 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23559echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23560 { (exit 1); exit 1; }; }
23561fi
23562
23563### Specify what sort of things we'll be editing into Makefile and config.h.
23564### Use configuration here uncanonicalized to avoid exceeding size limits.
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
6a3a24fa 23597
22044edf
DL
23598
23599
23600cat >>confdefs.h <<_ACEOF
23601#define EMACS_CONFIGURATION "${canonical}"
23602_ACEOF
23603
23604
23605cat >>confdefs.h <<_ACEOF
23606#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23607_ACEOF
23608
23609
23610cat >>confdefs.h <<_ACEOF
23611#define config_machfile "${machfile}"
23612_ACEOF
23613
23614
23615cat >>confdefs.h <<_ACEOF
23616#define config_opsysfile "${opsysfile}"
23617_ACEOF
23618
23619
23620cat >>confdefs.h <<_ACEOF
23621#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23622_ACEOF
23623
23624
23625cat >>confdefs.h <<_ACEOF
23626#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23627_ACEOF
23628
23629
23630cat >>confdefs.h <<_ACEOF
23631#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23632_ACEOF
23633
23634
23635cat >>confdefs.h <<_ACEOF
23636#define UNEXEC_SRC ${UNEXEC_SRC}
23637_ACEOF
23638
23639
23640if test "${HAVE_X_WINDOWS}" = "yes" ; then
23641
23642cat >>confdefs.h <<\_ACEOF
23643#define HAVE_X_WINDOWS 1
23644_ACEOF
23645
23646fi
23647if test "${USE_X_TOOLKIT}" != "none" ; then
23648
23649cat >>confdefs.h <<\_ACEOF
23650#define USE_X_TOOLKIT 1
23651_ACEOF
23652
23653fi
23654if test "${HAVE_X11}" = "yes" ; then
23655
23656cat >>confdefs.h <<\_ACEOF
23657#define HAVE_X11 1
23658_ACEOF
23659
23660fi
23661if test "${HAVE_XFREE386}" = "yes" ; then
23662
23663cat >>confdefs.h <<\_ACEOF
23664#define HAVE_XFREE386 1
23665_ACEOF
23666
23667fi
23668if test "${HAVE_MENUS}" = "yes" ; then
23669
23670cat >>confdefs.h <<\_ACEOF
23671#define HAVE_MENUS 1
23672_ACEOF
23673
23674fi
23675if test "${GNU_MALLOC}" = "yes" ; then
23676
23677cat >>confdefs.h <<\_ACEOF
23678#define GNU_MALLOC 1
23679_ACEOF
23680
23681fi
23682if test "${REL_ALLOC}" = "yes" ; then
23683
23684cat >>confdefs.h <<\_ACEOF
23685#define REL_ALLOC 1
23686_ACEOF
23687
23688fi
23689
23690
23691
c0d27fcc
MR
23692
23693
5afbeb22 23694
ba4481b5 23695#### Report on what we decided to do.
488dd4c4
JD
23696#### Report GTK as a toolkit, even if it doesn't use Xt.
23697#### It makes printing result more understandable as using GTK sets
23698#### toolkit_scroll_bars to yes by default.
23699if test "${HAVE_GTK}" = "yes"; then
23700 USE_X_TOOLKIT=GTK
23701fi
23702
ba4481b5
DL
23703echo "
23704Configured for \`${canonical}'.
23705
23706 Where should the build process find the source code? ${srcdir}
23707 What operating system and machine description files should Emacs use?
23708 \`${opsysfile}' and \`${machfile}'
23709 What compiler should emacs be built with? ${CC} ${CFLAGS}
23710 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23711 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23712 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23713 What window system should Emacs use? ${window_system}
8e967cf7 23714 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23715
23716if test -n "${x_includes}"; then
23717echo " Where do we find X Windows header files? ${x_includes}"
23718else
23719echo " Where do we find X Windows header files? Standard dirs"
23720fi
23721if test -n "${x_libraries}"; then
23722echo " Where do we find X Windows libraries? ${x_libraries}"
23723else
23724echo " Where do we find X Windows libraries? Standard dirs"
23725fi
23726
23727echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23728echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23729echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23730echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23731echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23732echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 23733echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 23734echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
23735echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23736echo
23737
d0098f13
JD
23738if test $USE_XASSERTS = yes; then
23739 echo " Compiling with asserts turned on."
d0098f13
JD
23740 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23741 echo
23742fi
05cf15c6 23743
a2d3b5bd
JD
23744if test "$USE_X_TOOLKIT" = GTK; then
23745 case "$canonical" in
23746 *cygwin*)
23747 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23748 will probably get a crash on startup. If this happens, please use another
23749 toolkit for Emacs. See etc/PROBLEMS for more information."
23750 ;;
23751 esac
23752fi
23753
05cf15c6 23754
05cf15c6 23755
ba4481b5
DL
23756# Remove any trailing slashes in these variables.
23757test "${prefix}" != NONE &&
23758 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23759test "${exec_prefix}" != NONE &&
23760 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23761
d0e9bfd2
GM
23762## Check if the C preprocessor will convert `..' to `. .'. If so, set
23763## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23764## from Makefile.c can correctly provide the arg `-traditional' to the
23765## C preprocessor.
23766
503d2be0 23767cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23768/* confdefs.h. */
23769_ACEOF
23770cat confdefs.h >>conftest.$ac_ext
23771cat >>conftest.$ac_ext <<_ACEOF
23772/* end confdefs.h. */
d0e9bfd2 23773yes..yes
503d2be0 23774_ACEOF
d0e9bfd2 23775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23776 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23777 CPP_NEED_TRADITIONAL=no
23778else
d0e9bfd2
GM
23779 CPP_NEED_TRADITIONAL=yes
23780fi
23781rm -f conftest*
23782
c0d27fcc 23783
f657c21b 23784ac_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
23785
23786ac_config_commands="$ac_config_commands default"
23787
503d2be0 23788cat >confcache <<\_ACEOF
ba4481b5
DL
23789# This file is a shell script that caches the results of configure
23790# tests run on this system so they can be shared between configure
503d2be0
AS
23791# scripts and configure runs, see configure's option --config-cache.
23792# It is not useful on other systems. If it contains results you don't
23793# want to keep, you may remove or edit it.
ba4481b5 23794#
503d2be0
AS
23795# config.status only pays attention to the cache file if you give it
23796# the --recheck option to rerun configure.
ba4481b5 23797#
6bae0ccf 23798# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23799# loading this file, other *unset* `ac_cv_foo' will be assigned the
23800# following values.
23801
23802_ACEOF
23803
ba4481b5
DL
23804# The following way of writing the cache mishandles newlines in values,
23805# but we know of no workaround that is simple, portable, and efficient.
d6e01aa5 23806# So, we kill variables containing newlines.
ba4481b5
DL
23807# Ultrix sh set writes to stderr and can't be redirected directly,
23808# and sets the high bit in the cache file unless we assign to the vars.
d6e01aa5
KL
23809(
23810 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23811 eval ac_val=\$$ac_var
23812 case $ac_val in #(
23813 *${as_nl}*)
23814 case $ac_var in #(
23815 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23816echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23817 esac
23818 case $ac_var in #(
23819 _ | IFS | as_nl) ;; #(
23820 *) $as_unset $ac_var ;;
23821 esac ;;
23822 esac
23823 done
23824
503d2be0 23825 (set) 2>&1 |
d6e01aa5
KL
23826 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23827 *${as_nl}ac_space=\ *)
503d2be0
AS
23828 # `set' does not quote correctly, so add quotes (double-quote
23829 # substitution turns \\\\ into \\, and sed turns \\ into \).
23830 sed -n \
edfaf76d
LK
23831 "s/'/'\\\\''/g;
23832 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
d6e01aa5 23833 ;; #(
503d2be0
AS
23834 *)
23835 # `set' quotes correctly as required by POSIX, so do not add quotes.
d6e01aa5 23836 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23837 ;;
d6e01aa5
KL
23838 esac |
23839 sort
23840) |
503d2be0 23841 sed '
d6e01aa5 23842 /^ac_cv_env_/b end
503d2be0 23843 t clear
d6e01aa5 23844 :clear
503d2be0
AS
23845 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23846 t end
d6e01aa5
KL
23847 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23848 :end' >>confcache
23849if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23850 if test -w "$cache_file"; then
23851 test "x$cache_file" != "x/dev/null" &&
23852 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23853echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23854 cat confcache >$cache_file
ba4481b5 23855 else
d6e01aa5
KL
23856 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23857echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23858 fi
23859fi
23860rm -f confcache
23861
ba4481b5
DL
23862test "x$prefix" = xNONE && prefix=$ac_default_prefix
23863# Let make expand exec_prefix.
23864test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23865
ba4481b5
DL
23866DEFS=-DHAVE_CONFIG_H
23867
6bae0ccf
DL
23868ac_libobjs=
23869ac_ltlibobjs=
23870for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23871 # 1. Remove the extension, and $U if already installed.
d6e01aa5
KL
23872 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23873 ac_i=`echo "$ac_i" | sed "$ac_script"`
23874 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23875 # will be set to the directory where LIBOBJS objects are built.
23876 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23877 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23878done
23879LIBOBJS=$ac_libobjs
23880
23881LTLIBOBJS=$ac_ltlibobjs
23882
23883
c0d27fcc 23884
ba4481b5 23885: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23886ac_clean_files_save=$ac_clean_files
23887ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23888{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23889echo "$as_me: creating $CONFIG_STATUS" >&6;}
23890cat >$CONFIG_STATUS <<_ACEOF
23891#! $SHELL
c0d27fcc 23892# Generated by $as_me.
ba4481b5 23893# Run this file to recreate the current configuration.
ba4481b5 23894# Compiler output produced by configure, useful for debugging
503d2be0 23895# configure, is in config.log if it exists.
ba4481b5 23896
503d2be0 23897debug=false
19650fd6
AS
23898ac_cs_recheck=false
23899ac_cs_silent=false
503d2be0 23900SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23901_ACEOF
23902
23903cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23904## --------------------- ##
23905## M4sh Initialization. ##
23906## --------------------- ##
23907
d6e01aa5
KL
23908# Be more Bourne compatible
23909DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23910if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23911 emulate sh
23912 NULLCMD=:
6bae0ccf
DL
23913 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23914 # is contrary to our usage. Disable this feature.
23915 alias -g '${1+"$@"}'='"$@"'
d6e01aa5
KL
23916 setopt NO_GLOB_SUBST
23917else
23918 case `(set -o) 2>/dev/null` in
23919 *posix*) set -o posix ;;
23920esac
23921
23922fi
23923
23924
23925
23926
23927# PATH needs CR
23928# Avoid depending upon Character Ranges.
23929as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23930as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23931as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23932as_cr_digits='0123456789'
23933as_cr_alnum=$as_cr_Letters$as_cr_digits
23934
23935# The user is always right.
23936if test "${PATH_SEPARATOR+set}" != set; then
23937 echo "#! /bin/sh" >conf$$.sh
23938 echo "exit 0" >>conf$$.sh
23939 chmod +x conf$$.sh
23940 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23941 PATH_SEPARATOR=';'
23942 else
23943 PATH_SEPARATOR=:
23944 fi
23945 rm -f conf$$.sh
503d2be0
AS
23946fi
23947
c0d27fcc 23948# Support unset when possible.
edfaf76d 23949if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23950 as_unset=unset
23951else
23952 as_unset=false
23953fi
23954
6bae0ccf 23955
d6e01aa5
KL
23956# IFS
23957# We need space, tab and new line, in precisely that order. Quoting is
23958# there to prevent editors from complaining about space-tab.
23959# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23960# splitting by setting IFS to empty value.)
23961as_nl='
23962'
23963IFS=" "" $as_nl"
23964
23965# Find who we are. Look in the path if we contain no directory separator.
23966case $0 in
23967 *[\\/]* ) as_myself=$0 ;;
23968 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23969for as_dir in $PATH
23970do
23971 IFS=$as_save_IFS
23972 test -z "$as_dir" && as_dir=.
23973 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23974done
23975IFS=$as_save_IFS
23976
23977 ;;
23978esac
23979# We did not find ourselves, most probably we were run as `sh COMMAND'
23980# in which case we are not to be found in the path.
23981if test "x$as_myself" = x; then
23982 as_myself=$0
23983fi
23984if test ! -f "$as_myself"; then
23985 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23986 { (exit 1); exit 1; }
23987fi
23988
6bae0ccf 23989# Work around bugs in pre-3.0 UWIN ksh.
d6e01aa5
KL
23990for as_var in ENV MAIL MAILPATH
23991do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23992done
6bae0ccf
DL
23993PS1='$ '
23994PS2='> '
23995PS4='+ '
23996
23997# NLS nuisances.
19650fd6
AS
23998for as_var in \
23999 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24000 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24001 LC_TELEPHONE LC_TIME
6bae0ccf 24002do
edfaf76d 24003 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24004 eval $as_var=C; export $as_var
24005 else
d6e01aa5 24006 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24007 fi
24008done
24009
24010# Required to use basename.
d6e01aa5
KL
24011if expr a : '\(a\)' >/dev/null 2>&1 &&
24012 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24013 as_expr=expr
24014else
24015 as_expr=false
24016fi
24017
d6e01aa5 24018if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24019 as_basename=basename
24020else
24021 as_basename=false
24022fi
c0d27fcc
MR
24023
24024
503d2be0 24025# Name of the executable.
d6e01aa5 24026as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24027$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24028 X"$0" : 'X\(//\)$' \| \
d6e01aa5 24029 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24030echo X/"$0" |
d6e01aa5
KL
24031 sed '/^.*\/\([^/][^/]*\)\/*$/{
24032 s//\1/
24033 q
24034 }
24035 /^X\/\(\/\/\)$/{
24036 s//\1/
24037 q
24038 }
24039 /^X\/\(\/\).*/{
24040 s//\1/
24041 q
24042 }
24043 s/.*/./; q'`
c0d27fcc 24044
d6e01aa5
KL
24045# CDPATH.
24046$as_unset CDPATH
c0d27fcc
MR
24047
24048
c0d27fcc 24049
c0d27fcc
MR
24050 as_lineno_1=$LINENO
24051 as_lineno_2=$LINENO
c0d27fcc 24052 test "x$as_lineno_1" != "x$as_lineno_2" &&
d6e01aa5 24053 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24054
24055 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24056 # uniformly replaced by the line number. The first 'sed' inserts a
d6e01aa5
KL
24057 # line-number line after each line using $LINENO; the second 'sed'
24058 # does the real work. The second script uses 'N' to pair each
24059 # line-number line with the line containing $LINENO, and appends
24060 # trailing '-' during substitution so that $LINENO is not a special
24061 # case at line end.
c0d27fcc 24062 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
d6e01aa5
KL
24063 # scripts with optimization help from Paolo Bonzini. Blame Lee
24064 # E. McMahon (1931-1989) for sed's syntax. :-)
24065 sed -n '
24066 p
24067 /[$]LINENO/=
24068 ' <$as_myself |
c0d27fcc 24069 sed '
d6e01aa5
KL
24070 s/[$]LINENO.*/&-/
24071 t lineno
24072 b
24073 :lineno
c0d27fcc 24074 N
d6e01aa5
KL
24075 :loop
24076 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24077 t loop
d6e01aa5 24078 s/-\n.*//
c0d27fcc 24079 ' >$as_me.lineno &&
d6e01aa5
KL
24080 chmod +x "$as_me.lineno" ||
24081 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24082 { (exit 1); exit 1; }; }
24083
24084 # Don't try to exec as it changes $[0], causing all sort of problems
24085 # (the dirname of $[0] is not the place where we might find the
d6e01aa5
KL
24086 # original and so on. Autoconf is especially sensitive to this).
24087 . "./$as_me.lineno"
c0d27fcc
MR
24088 # Exit status is that of the last command.
24089 exit
24090}
24091
24092
d6e01aa5
KL
24093if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24094 as_dirname=dirname
24095else
24096 as_dirname=false
24097fi
24098
24099ECHO_C= ECHO_N= ECHO_T=
24100case `echo -n x` in
24101-n*)
24102 case `echo 'x\c'` in
24103 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24104 *) ECHO_C='\c';;
24105 esac;;
24106*)
24107 ECHO_N='-n';;
c0d27fcc 24108esac
503d2be0 24109
d6e01aa5
KL
24110if expr a : '\(a\)' >/dev/null 2>&1 &&
24111 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24112 as_expr=expr
24113else
24114 as_expr=false
24115fi
24116
24117rm -f conf$$ conf$$.exe conf$$.file
d6e01aa5
KL
24118if test -d conf$$.dir; then
24119 rm -f conf$$.dir/conf$$.file
24120else
24121 rm -f conf$$.dir
24122 mkdir conf$$.dir
24123fi
503d2be0
AS
24124echo >conf$$.file
24125if ln -s conf$$.file conf$$ 2>/dev/null; then
d6e01aa5
KL
24126 as_ln_s='ln -s'
24127 # ... but there are two gotchas:
24128 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24129 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24130 # In both cases, we have to default to `cp -p'.
24131 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24132 as_ln_s='cp -p'
503d2be0
AS
24133elif ln conf$$.file conf$$ 2>/dev/null; then
24134 as_ln_s=ln
24135else
24136 as_ln_s='cp -p'
24137fi
d6e01aa5
KL
24138rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24139rmdir conf$$.dir 2>/dev/null
503d2be0 24140
6bae0ccf
DL
24141if mkdir -p . 2>/dev/null; then
24142 as_mkdir_p=:
24143else
edfaf76d 24144 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24145 as_mkdir_p=false
24146fi
24147
d6e01aa5
KL
24148if test -x / >/dev/null 2>&1; then
24149 as_test_x='test -x'
24150else
24151 if ls -dL / >/dev/null 2>&1; then
24152 as_ls_L_option=L
24153 else
24154 as_ls_L_option=
24155 fi
24156 as_test_x='
24157 eval sh -c '\''
24158 if test -d "$1"; then
24159 test -d "$1/.";
24160 else
24161 case $1 in
24162 -*)set "./$1";;
24163 esac;
24164 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24165 ???[sx]*):;;*)false;;esac;fi
24166 '\'' sh
24167 '
24168fi
24169as_executable_p=$as_test_x
503d2be0 24170
c0d27fcc 24171# Sed expression to map a string onto a valid CPP name.
edfaf76d 24172as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24173
24174# Sed expression to map a string onto a valid variable name.
edfaf76d 24175as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24176
503d2be0 24177
503d2be0
AS
24178exec 6>&1
24179
d6e01aa5 24180# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24181# report actual input values of CONFIG_FILES etc. instead of their
d6e01aa5
KL
24182# values after options handling.
24183ac_log="
c0d27fcc 24184This file was extended by $as_me, which was
d6e01aa5 24185generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24186
24187 CONFIG_FILES = $CONFIG_FILES
24188 CONFIG_HEADERS = $CONFIG_HEADERS
24189 CONFIG_LINKS = $CONFIG_LINKS
24190 CONFIG_COMMANDS = $CONFIG_COMMANDS
24191 $ $0 $@
24192
d6e01aa5
KL
24193on `(hostname || uname -n) 2>/dev/null | sed 1q`
24194"
24195
503d2be0
AS
24196_ACEOF
24197
d6e01aa5 24198cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24199# Files that config.status was made for.
d6e01aa5
KL
24200config_files="$ac_config_files"
24201config_headers="$ac_config_headers"
24202config_commands="$ac_config_commands"
503d2be0 24203
d6e01aa5 24204_ACEOF
503d2be0 24205
c0d27fcc 24206cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24207ac_cs_usage="\
24208\`$as_me' instantiates files from templates according to the
24209current configuration.
24210
24211Usage: $0 [OPTIONS] [FILE]...
24212
24213 -h, --help print this help, then exit
d6e01aa5 24214 -V, --version print version number and configuration settings, then exit
19650fd6 24215 -q, --quiet do not print progress messages
503d2be0
AS
24216 -d, --debug don't remove temporary files
24217 --recheck update $as_me by reconfiguring in the same conditions
24218 --file=FILE[:TEMPLATE]
edfaf76d 24219 instantiate the configuration file FILE
503d2be0 24220 --header=FILE[:TEMPLATE]
edfaf76d 24221 instantiate the configuration header FILE
503d2be0
AS
24222
24223Configuration files:
24224$config_files
24225
24226Configuration headers:
24227$config_headers
24228
24229Configuration commands:
24230$config_commands
24231
24232Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24233
d6e01aa5 24234_ACEOF
c0d27fcc 24235cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24236ac_cs_version="\\
24237config.status
d6e01aa5
KL
24238configured by $0, generated by GNU Autoconf 2.61,
24239 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24240
d6e01aa5 24241Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24242This config.status script is free software; the Free Software Foundation
24243gives unlimited permission to copy, distribute and modify it."
d6e01aa5
KL
24244
24245ac_pwd='$ac_pwd'
24246srcdir='$srcdir'
24247INSTALL='$INSTALL'
c0d27fcc 24248_ACEOF
503d2be0 24249
c0d27fcc 24250cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24251# If no file are specified by the user, then we need to provide default
24252# value. By we need to know if files were specified by the user.
24253ac_need_defaults=:
24254while test $# != 0
ba4481b5 24255do
503d2be0
AS
24256 case $1 in
24257 --*=*)
d6e01aa5
KL
24258 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24259 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24260 ac_shift=:
24261 ;;
d6e01aa5 24262 *)
6bae0ccf
DL
24263 ac_option=$1
24264 ac_optarg=$2
24265 ac_shift=shift
503d2be0 24266 ;;
503d2be0
AS
24267 esac
24268
6bae0ccf 24269 case $ac_option in
503d2be0 24270 # Handling of the options.
19650fd6
AS
24271 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24272 ac_cs_recheck=: ;;
d6e01aa5
KL
24273 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24274 echo "$ac_cs_version"; exit ;;
24275 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24276 debug=: ;;
24277 --file | --fil | --fi | --f )
6bae0ccf
DL
24278 $ac_shift
24279 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24280 ac_need_defaults=false;;
24281 --header | --heade | --head | --hea )
6bae0ccf
DL
24282 $ac_shift
24283 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24284 ac_need_defaults=false;;
d6e01aa5
KL
24285 --he | --h)
24286 # Conflict between --help and --header
24287 { echo "$as_me: error: ambiguous option: $1
24288Try \`$0 --help' for more information." >&2
24289 { (exit 1); exit 1; }; };;
24290 --help | --hel | -h )
24291 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24292 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24293 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24294 ac_cs_silent=: ;;
503d2be0
AS
24295
24296 # This is an error.
d6e01aa5
KL
24297 -*) { echo "$as_me: error: unrecognized option: $1
24298Try \`$0 --help' for more information." >&2
503d2be0
AS
24299 { (exit 1); exit 1; }; } ;;
24300
d6e01aa5
KL
24301 *) ac_config_targets="$ac_config_targets $1"
24302 ac_need_defaults=false ;;
503d2be0 24303
ba4481b5 24304 esac
503d2be0 24305 shift
ba4481b5
DL
24306done
24307
19650fd6
AS
24308ac_configure_extra_args=
24309
24310if $ac_cs_silent; then
24311 exec 6>/dev/null
24312 ac_configure_extra_args="$ac_configure_extra_args --silent"
24313fi
24314
24315_ACEOF
24316cat >>$CONFIG_STATUS <<_ACEOF
24317if \$ac_cs_recheck; then
d6e01aa5
KL
24318 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24319 CONFIG_SHELL=$SHELL
24320 export CONFIG_SHELL
24321 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24322fi
24323
503d2be0 24324_ACEOF
d6e01aa5
KL
24325cat >>$CONFIG_STATUS <<\_ACEOF
24326exec 5>>config.log
24327{
24328 echo
24329 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24330## Running $as_me. ##
24331_ASBOX
24332 echo "$ac_log"
24333} >&5
ba4481b5 24334
d6e01aa5 24335_ACEOF
c0d27fcc 24336cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24337#
d6e01aa5 24338# INIT-COMMANDS
503d2be0 24339#
503d2be0
AS
24340GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24341
c0d27fcc
MR
24342_ACEOF
24343
c0d27fcc 24344cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24345
24346# Handling of arguments.
503d2be0
AS
24347for ac_config_target in $ac_config_targets
24348do
d6e01aa5
KL
24349 case $ac_config_target in
24350 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24351 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24352 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24353 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24354 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24355 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24356 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24357 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
d6e01aa5 24358 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24359 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
d6e01aa5 24360 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
d6e01aa5
KL
24361 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24362 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24363
c0d27fcc 24364 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24365echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24366 { (exit 1); exit 1; }; };;
24367 esac
ba4481b5 24368done
503d2be0 24369
d6e01aa5 24370
503d2be0
AS
24371# If the user did not use the arguments to specify the items to instantiate,
24372# then the envvar interface is used. Set only those that are not.
24373# We use the long form for the default assignment because of an extremely
24374# bizarre bug on SunOS 4.1.3.
24375if $ac_need_defaults; then
24376 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24377 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24378 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24379fi
503d2be0 24380
19650fd6 24381# Have a temporary directory for convenience. Make it in the build tree
d6e01aa5 24382# simply because there is no reason against having it here, and in addition,
19650fd6 24383# creating and moving files from /tmp can sometimes cause problems.
d6e01aa5
KL
24384# Hook for its removal unless debugging.
24385# Note that there is a small window in which the directory will not be cleaned:
24386# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24387$debug ||
24388{
d6e01aa5
KL
24389 tmp=
24390 trap 'exit_status=$?
24391 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24392' 0
503d2be0
AS
24393 trap '{ (exit 1); exit 1; }' 1 2 13 15
24394}
503d2be0 24395# Create a (secure) tmp directory for tmp files.
19650fd6 24396
503d2be0 24397{
d6e01aa5 24398 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24399 test -n "$tmp" && test -d "$tmp"
24400} ||
24401{
d6e01aa5
KL
24402 tmp=./conf$$-$RANDOM
24403 (umask 077 && mkdir "$tmp")
503d2be0
AS
24404} ||
24405{
19650fd6 24406 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24407 { (exit 1); exit 1; }
24408}
24409
503d2be0 24410#
d6e01aa5 24411# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24412#
24413
24414# No need to generate the scripts if there are no CONFIG_FILES.
24415# This happens for instance when ./config.status config.h
d6e01aa5
KL
24416if test -n "$CONFIG_FILES"; then
24417
24418_ACEOF
24419
24420
24421
24422ac_delim='%!_!# '
24423for ac_last_try in false false false false false :; do
24424 cat >conf$$subs.sed <<_ACEOF
24425SHELL!$SHELL$ac_delim
24426PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24427PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24428PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24429PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24430PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24431PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24432exec_prefix!$exec_prefix$ac_delim
24433prefix!$prefix$ac_delim
24434program_transform_name!$program_transform_name$ac_delim
24435bindir!$bindir$ac_delim
24436sbindir!$sbindir$ac_delim
24437libexecdir!$libexecdir$ac_delim
24438datarootdir!$datarootdir$ac_delim
24439datadir!$datadir$ac_delim
24440sysconfdir!$sysconfdir$ac_delim
24441sharedstatedir!$sharedstatedir$ac_delim
24442localstatedir!$localstatedir$ac_delim
24443includedir!$includedir$ac_delim
24444oldincludedir!$oldincludedir$ac_delim
24445docdir!$docdir$ac_delim
24446infodir!$infodir$ac_delim
24447htmldir!$htmldir$ac_delim
24448dvidir!$dvidir$ac_delim
24449pdfdir!$pdfdir$ac_delim
24450psdir!$psdir$ac_delim
24451libdir!$libdir$ac_delim
24452localedir!$localedir$ac_delim
24453mandir!$mandir$ac_delim
24454DEFS!$DEFS$ac_delim
24455ECHO_C!$ECHO_C$ac_delim
24456ECHO_N!$ECHO_N$ac_delim
24457ECHO_T!$ECHO_T$ac_delim
24458LIBS!$LIBS$ac_delim
24459build_alias!$build_alias$ac_delim
24460host_alias!$host_alias$ac_delim
24461target_alias!$target_alias$ac_delim
24462MAINT!$MAINT$ac_delim
24463build!$build$ac_delim
24464build_cpu!$build_cpu$ac_delim
24465build_vendor!$build_vendor$ac_delim
24466build_os!$build_os$ac_delim
24467host!$host$ac_delim
24468host_cpu!$host_cpu$ac_delim
24469host_vendor!$host_vendor$ac_delim
24470host_os!$host_os$ac_delim
24471CC!$CC$ac_delim
24472CFLAGS!$CFLAGS$ac_delim
24473LDFLAGS!$LDFLAGS$ac_delim
24474CPPFLAGS!$CPPFLAGS$ac_delim
24475ac_ct_CC!$ac_ct_CC$ac_delim
24476EXEEXT!$EXEEXT$ac_delim
24477OBJEXT!$OBJEXT$ac_delim
24478CPP!$CPP$ac_delim
24479GREP!$GREP$ac_delim
24480EGREP!$EGREP$ac_delim
24481LN_S!$LN_S$ac_delim
24482INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24483INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24484INSTALL_DATA!$INSTALL_DATA$ac_delim
24485RANLIB!$RANLIB$ac_delim
24486INSTALL_INFO!$INSTALL_INFO$ac_delim
24487GZIP_PROG!$GZIP_PROG$ac_delim
c982cf7d 24488MAKEINFO!$MAKEINFO$ac_delim
d6e01aa5
KL
24489LIBSOUND!$LIBSOUND$ac_delim
24490PKG_CONFIG!$PKG_CONFIG$ac_delim
24491ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24492ALSA_LIBS!$ALSA_LIBS$ac_delim
24493CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24494SET_MAKE!$SET_MAKE$ac_delim
24495XMKMF!$XMKMF$ac_delim
cfe440b8 24496HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24497RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24498RSVG_LIBS!$RSVG_LIBS$ac_delim
d6e01aa5
KL
24499GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24500GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
24501XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24502XFT_LIBS!$XFT_LIBS$ac_delim
d6e01aa5
KL
24503ALLOCA!$ALLOCA$ac_delim
24504liblockfile!$liblockfile$ac_delim
24505LIBOBJS!$LIBOBJS$ac_delim
24506NEED_SETGID!$NEED_SETGID$ac_delim
24507KMEM_GROUP!$KMEM_GROUP$ac_delim
24508GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24509GETOPT_H!$GETOPT_H$ac_delim
24510GETOPTOBJS!$GETOPTOBJS$ac_delim
24511version!$version$ac_delim
24512configuration!$configuration$ac_delim
24513canonical!$canonical$ac_delim
24514srcdir!$srcdir$ac_delim
24515lispdir!$lispdir$ac_delim
24516locallisppath!$locallisppath$ac_delim
24517lisppath!$lisppath$ac_delim
24518x_default_search_path!$x_default_search_path$ac_delim
24519etcdir!$etcdir$ac_delim
24520archlibdir!$archlibdir$ac_delim
24521bitmapdir!$bitmapdir$ac_delim
d6e01aa5
KL
24522_ACEOF
24523
24524 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24525 break
24526 elif $ac_last_try; then
24527 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24528echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24529 { (exit 1); exit 1; }; }
24530 else
24531 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24532 fi
d6e01aa5
KL
24533done
24534
24535ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24536if test -n "$ac_eof"; then
24537 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24538 ac_eof=`expr $ac_eof + 1`
24539fi
24540
24541cat >>$CONFIG_STATUS <<_ACEOF
24542cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24543/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24544_ACEOF
24545sed '
24546s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24547s/^/s,@/; s/!/@,|#_!!_#|/
24548:n
24549t n
24550s/'"$ac_delim"'$/,g/; t
24551s/$/\\/; p
24552N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24553' >>$CONFIG_STATUS <conf$$subs.sed
24554rm -f conf$$subs.sed
24555cat >>$CONFIG_STATUS <<_ACEOF
24556CEOF$ac_eof
24557_ACEOF
24558
ba4481b5 24559
d6e01aa5
KL
24560ac_delim='%!_!# '
24561for ac_last_try in false false false false false :; do
24562 cat >conf$$subs.sed <<_ACEOF
c982cf7d 24563gamedir!$gamedir$ac_delim
0cfc0546
GM
24564gameuser!$gameuser$ac_delim
24565c_switch_system!$c_switch_system$ac_delim
cfe440b8 24566c_switch_machine!$c_switch_machine$ac_delim
9d89ffd0
JD
24567LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24568LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
d6e01aa5
KL
24569C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24570X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24571machfile!$machfile$ac_delim
24572opsysfile!$opsysfile$ac_delim
24573carbon_appdir!$carbon_appdir$ac_delim
24574LTLIBOBJS!$LTLIBOBJS$ac_delim
c0d27fcc 24575_ACEOF
d6e01aa5 24576
c982cf7d 24577 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
d6e01aa5
KL
24578 break
24579 elif $ac_last_try; then
24580 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24581echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24582 { (exit 1); exit 1; }; }
24583 else
24584 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24585 fi
24586done
24587
24588ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24589if test -n "$ac_eof"; then
24590 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24591 ac_eof=`expr $ac_eof + 1`
24592fi
24593
24594cat >>$CONFIG_STATUS <<_ACEOF
24595cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24596/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24597_ACEOF
24598sed '
24599s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24600s/^/s,@/; s/!/@,|#_!!_#|/
24601:n
24602t n
24603s/'"$ac_delim"'$/,g/; t
24604s/$/\\/; p
24605N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24606' >>$CONFIG_STATUS <conf$$subs.sed
24607rm -f conf$$subs.sed
24608cat >>$CONFIG_STATUS <<_ACEOF
24609:end
24610s/|#_!!_#|//g
24611CEOF$ac_eof
24612_ACEOF
24613
24614
24615# VPATH may cause trouble with some makes, so we remove $(srcdir),
24616# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24617# trailing colons and then remove the whole line if VPATH becomes empty
24618# (actually we leave an empty line to preserve line numbers).
24619if test "x$srcdir" = x.; then
24620 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24621s/:*\$(srcdir):*/:/
24622s/:*\${srcdir}:*/:/
24623s/:*@srcdir@:*/:/
24624s/^\([^=]*=[ ]*\):*/\1/
24625s/:*$//
24626s/^[^=]*=[ ]*$//
24627}'
24628fi
24629
c0d27fcc 24630cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24631fi # test -n "$CONFIG_FILES"
24632
24633
24634for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24635do
24636 case $ac_tag in
24637 :[FHLC]) ac_mode=$ac_tag; continue;;
24638 esac
24639 case $ac_mode$ac_tag in
24640 :[FHL]*:*);;
24641 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24642echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24643 { (exit 1); exit 1; }; };;
24644 :[FH]-) ac_tag=-:-;;
24645 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
ba4481b5 24646 esac
d6e01aa5
KL
24647 ac_save_IFS=$IFS
24648 IFS=:
24649 set x $ac_tag
24650 IFS=$ac_save_IFS
24651 shift
24652 ac_file=$1
24653 shift
24654
24655 case $ac_mode in
24656 :L) ac_source=$1;;
24657 :[FH])
24658 ac_file_inputs=
24659 for ac_f
24660 do
24661 case $ac_f in
24662 -) ac_f="$tmp/stdin";;
24663 *) # Look for the file first in the build tree, then in the source tree
24664 # (if the path is not absolute). The absolute path cannot be DOS-style,
24665 # because $ac_f cannot contain `:'.
24666 test -f "$ac_f" ||
24667 case $ac_f in
24668 [\\/$]*) false;;
24669 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24670 esac ||
24671 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24672echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24673 { (exit 1); exit 1; }; };;
24674 esac
24675 ac_file_inputs="$ac_file_inputs $ac_f"
24676 done
ba4481b5 24677
d6e01aa5
KL
24678 # Let's still pretend it is `configure' which instantiates (i.e., don't
24679 # use $as_me), people would be surprised to read:
24680 # /* config.h. Generated by config.status. */
24681 configure_input="Generated from "`IFS=:
24682 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24683 if test x"$ac_file" != x-; then
24684 configure_input="$ac_file. $configure_input"
24685 { echo "$as_me:$LINENO: creating $ac_file" >&5
24686echo "$as_me: creating $ac_file" >&6;}
24687 fi
24688
24689 case $ac_tag in
24690 *:-:* | *:-) cat >"$tmp/stdin";;
24691 esac
24692 ;;
ba4481b5
DL
24693 esac
24694
d6e01aa5 24695 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24696$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24697 X"$ac_file" : 'X\(//\)[^/]' \| \
24698 X"$ac_file" : 'X\(//\)$' \| \
d6e01aa5 24699 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24700echo X"$ac_file" |
d6e01aa5
KL
24701 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24702 s//\1/
24703 q
24704 }
24705 /^X\(\/\/\)[^/].*/{
24706 s//\1/
24707 q
24708 }
24709 /^X\(\/\/\)$/{
24710 s//\1/
24711 q
24712 }
24713 /^X\(\/\).*/{
24714 s//\1/
24715 q
24716 }
24717 s/.*/./; q'`
24718 { as_dir="$ac_dir"
24719 case $as_dir in #(
24720 -*) as_dir=./$as_dir;;
24721 esac
24722 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24723 as_dirs=
d6e01aa5
KL
24724 while :; do
24725 case $as_dir in #(
24726 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24727 *) as_qdir=$as_dir;;
24728 esac
24729 as_dirs="'$as_qdir' $as_dirs"
24730 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24731$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24732 X"$as_dir" : 'X\(//\)[^/]' \| \
24733 X"$as_dir" : 'X\(//\)$' \| \
d6e01aa5 24734 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24735echo X"$as_dir" |
d6e01aa5
KL
24736 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24737 s//\1/
24738 q
24739 }
24740 /^X\(\/\/\)[^/].*/{
24741 s//\1/
24742 q
24743 }
24744 /^X\(\/\/\)$/{
24745 s//\1/
24746 q
24747 }
24748 /^X\(\/\).*/{
24749 s//\1/
24750 q
24751 }
24752 s/.*/./; q'`
24753 test -d "$as_dir" && break
6bae0ccf 24754 done
d6e01aa5
KL
24755 test -z "$as_dirs" || eval "mkdir $as_dirs"
24756 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24757echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24758 { (exit 1); exit 1; }; }; }
c0d27fcc 24759 ac_builddir=.
98418dba 24760
d6e01aa5
KL
24761case "$ac_dir" in
24762.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24763*)
c0d27fcc 24764 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
24765 # A ".." for each directory in $ac_dir_suffix.
24766 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24767 case $ac_top_builddir_sub in
24768 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24769 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24770 esac ;;
24771esac
24772ac_abs_top_builddir=$ac_pwd
24773ac_abs_builddir=$ac_pwd$ac_dir_suffix
24774# for backward compatibility:
24775ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24776
24777case $srcdir in
d6e01aa5 24778 .) # We are building in place.
c0d27fcc 24779 ac_srcdir=.
d6e01aa5
KL
24780 ac_top_srcdir=$ac_top_builddir_sub
24781 ac_abs_top_srcdir=$ac_pwd ;;
24782 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24783 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
24784 ac_top_srcdir=$srcdir
24785 ac_abs_top_srcdir=$srcdir ;;
24786 *) # Relative name.
24787 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24788 ac_top_srcdir=$ac_top_build_prefix$srcdir
24789 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24790esac
d6e01aa5 24791ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24792
c0d27fcc 24793
d6e01aa5
KL
24794 case $ac_mode in
24795 :F)
24796 #
24797 # CONFIG_FILE
24798 #
ba4481b5 24799
503d2be0
AS
24800 case $INSTALL in
24801 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
d6e01aa5 24802 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24803 esac
d6e01aa5 24804_ACEOF
ba4481b5 24805
d6e01aa5
KL
24806cat >>$CONFIG_STATUS <<\_ACEOF
24807# If the template does not know about datarootdir, expand it.
24808# FIXME: This hack should be removed a few years after 2.60.
24809ac_datarootdir_hack=; ac_datarootdir_seen=
8ae52ca6 24810
d6e01aa5
KL
24811case `sed -n '/datarootdir/ {
24812 p
24813 q
24814}
24815/@datadir@/p
24816/@docdir@/p
24817/@infodir@/p
24818/@localedir@/p
24819/@mandir@/p
24820' $ac_file_inputs` in
24821*datarootdir*) ac_datarootdir_seen=yes;;
24822*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24823 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24824echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24825_ACEOF
24826cat >>$CONFIG_STATUS <<_ACEOF
24827 ac_datarootdir_hack='
24828 s&@datadir@&$datadir&g
24829 s&@docdir@&$docdir&g
24830 s&@infodir@&$infodir&g
24831 s&@localedir@&$localedir&g
24832 s&@mandir@&$mandir&g
24833 s&\\\${datarootdir}&$datarootdir&g' ;;
24834esac
c0d27fcc 24835_ACEOF
d6e01aa5
KL
24836
24837# Neutralize VPATH when `$srcdir' = `.'.
24838# Shell code in configure.ac might set extrasub.
24839# FIXME: do we really want to maintain this feature?
c0d27fcc 24840cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24841 sed "$ac_vpsub
24842$extrasub
c0d27fcc
MR
24843_ACEOF
24844cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24845:t
24846/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
d6e01aa5
KL
24847s&@configure_input@&$configure_input&;t t
24848s&@top_builddir@&$ac_top_builddir_sub&;t t
24849s&@srcdir@&$ac_srcdir&;t t
24850s&@abs_srcdir@&$ac_abs_srcdir&;t t
24851s&@top_srcdir@&$ac_top_srcdir&;t t
24852s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24853s&@builddir@&$ac_builddir&;t t
24854s&@abs_builddir@&$ac_abs_builddir&;t t
24855s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24856s&@INSTALL@&$ac_INSTALL&;t t
24857$ac_datarootdir_hack
24858" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24859
24860test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24861 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24862 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24863 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24864which seems to be undefined. Please make sure it is defined." >&5
24865echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24866which seems to be undefined. Please make sure it is defined." >&2;}
24867
24868 rm -f "$tmp/stdin"
503d2be0 24869 case $ac_file in
d6e01aa5
KL
24870 -) cat "$tmp/out"; rm -f "$tmp/out";;
24871 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24872 esac
d6e01aa5
KL
24873 ;;
24874 :H)
24875 #
24876 # CONFIG_HEADER
24877 #
24878_ACEOF
24879
24880# Transform confdefs.h into a sed script `conftest.defines', that
24881# substitutes the proper values into config.h.in to produce config.h.
24882rm -f conftest.defines conftest.tail
24883# First, append a space to every undef/define line, to ease matching.
24884echo 's/$/ /' >conftest.defines
24885# Then, protect against being on the right side of a sed subst, or in
24886# an unquoted here document, in config.status. If some macros were
24887# called several times there might be several #defines for the same
24888# symbol, which is useless. But do not sort them, since the last
24889# AC_DEFINE must be honored.
24890ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24891# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24892# NAME is the cpp macro being defined, VALUE is the value it is being given.
24893# PARAMS is the parameter list in the macro definition--in most cases, it's
24894# just an empty string.
24895ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24896ac_dB='\\)[ (].*,\\1define\\2'
24897ac_dC=' '
24898ac_dD=' ,'
24899
24900uniq confdefs.h |
24901 sed -n '
24902 t rset
24903 :rset
24904 s/^[ ]*#[ ]*define[ ][ ]*//
24905 t ok
24906 d
24907 :ok
24908 s/[\\&,]/\\&/g
24909 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24910 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24911 ' >>conftest.defines
24912
24913# Remove the space that was appended to ease matching.
24914# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24915# example, in the case of _POSIX_SOURCE, which is predefined and required
24916# on some systems where configure will not decide to define it.
d6e01aa5
KL
24917# (The regexp can be short, since the line contains either #define or #undef.)
24918echo 's/ $//
24919s,^[ #]*u.*,/* & */,' >>conftest.defines
24920
24921# Break up conftest.defines:
24922ac_max_sed_lines=50
24923
24924# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24925# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24926# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24927# et cetera.
24928ac_in='$ac_file_inputs'
24929ac_out='"$tmp/out1"'
24930ac_nxt='"$tmp/out2"'
24931
24932while :
503d2be0 24933do
d6e01aa5
KL
24934 # Write a here document:
24935 cat >>$CONFIG_STATUS <<_ACEOF
24936 # First, check the format of the line:
24937 cat >"\$tmp/defines.sed" <<\\CEOF
24938/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24939/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24940b
24941:def
24942_ACEOF
24943 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24944 echo 'CEOF
d6e01aa5
KL
24945 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24946 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24947 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24948 grep . conftest.tail >/dev/null || break
503d2be0
AS
24949 rm -f conftest.defines
24950 mv conftest.tail conftest.defines
24951done
d6e01aa5 24952rm -f conftest.defines conftest.tail
503d2be0 24953
d6e01aa5 24954echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24955cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24956 if test x"$ac_file" != x-; then
d6e01aa5
KL
24957 echo "/* $configure_input */" >"$tmp/config.h"
24958 cat "$ac_result" >>"$tmp/config.h"
24959 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24960 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24961echo "$as_me: $ac_file is unchanged" >&6;}
24962 else
503d2be0 24963 rm -f $ac_file
d6e01aa5 24964 mv "$tmp/config.h" $ac_file
ba4481b5 24965 fi
503d2be0 24966 else
d6e01aa5
KL
24967 echo "/* $configure_input */"
24968 cat "$ac_result"
ba4481b5 24969 fi
d6e01aa5
KL
24970 rm -f "$tmp/out12"
24971 ;;
edfaf76d 24972
d6e01aa5
KL
24973 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24974echo "$as_me: executing $ac_file commands" >&6;}
24975 ;;
24976 esac
ba4481b5 24977
c0d27fcc 24978
d6e01aa5
KL
24979 case $ac_file$ac_mode in
24980 "default":C)
ba4481b5
DL
24981
24982### Make the necessary directories, if they don't exist.
24983for dir in etc lisp ; do
24984 test -d ${dir} || mkdir ${dir}
24985done
24986
24987# Build src/Makefile from ${srcdir}/src/Makefile.c
24988# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24989# This must be done after src/config.h is built, since we rely on that file.
24990
24991# Now get this: Some word that is part of the ${srcdir} directory name
24992# or the ${configuration} value might, just might, happen to be an
24993# identifier like `sun4' or `i386' or something, and be predefined by
24994# the C preprocessor to some helpful value like 1, or maybe the empty
24995# string. Needless to say consequent macro substitutions are less
24996# than conducive to the makefile finding the correct directory.
24997undefs="`echo $top_srcdir $configuration $canonical |
24998sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24999 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25000`"
25001
25002echo creating src/epaths.h
4aa6b955 25003${MAKE-make} epaths-force
ba4481b5 25004
1c203d4c
DL
25005# As of 2000-11-19, newest development versions of GNU cpp preprocess
25006# `..' to `. .' unless invoked with -traditional
25007
d0e9bfd2 25008if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25009 CPPFLAGS="$CPPFLAGS -traditional"
25010fi
25011
ba4481b5
DL
25012echo creating lib-src/Makefile
25013( cd lib-src
25014 rm -f junk.c junk1.c junk2.c
25015 sed -e '/start of cpp stuff/q' \
25016 < Makefile.c > junk1.c
25017 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25018 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25019 < Makefile.c > junk.c
503d2be0 25020 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25021 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25022 cat junk1.c junk2.c > Makefile.new
25023 rm -f junk.c junk1.c junk2.c
25024 chmod 444 Makefile.new
25025 mv -f Makefile.new Makefile
25026)
25027
25028echo creating src/Makefile
25029( cd src
25030 rm -f junk.c junk1.c junk2.c
25031 sed -e '/start of cpp stuff/q' \
25032 < Makefile.c > junk1.c
25033 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25034 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25035 < Makefile.c > junk.c
503d2be0 25036 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25037 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25038 cat junk1.c junk2.c > Makefile.new
25039 rm -f junk.c junk1.c junk2.c
25040 chmod 444 Makefile.new
25041 mv -f Makefile.new Makefile
25042)
25043
503d2be0 25044if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25045 echo creating src/.gdbinit
503d2be0 25046 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25047fi
25048
25049# This is how we know whether to re-run configure in certain cases.
25050touch src/config.stamp
25051
503d2be0 25052 ;;
d6e01aa5 25053
503d2be0 25054 esac
d6e01aa5 25055done # for ac_tag
503d2be0 25056
ba4481b5 25057
503d2be0 25058{ (exit 0); exit 0; }
c0d27fcc 25059_ACEOF
ba4481b5 25060chmod +x $CONFIG_STATUS
503d2be0
AS
25061ac_clean_files=$ac_clean_files_save
25062
c0d27fcc 25063
503d2be0
AS
25064# configure is writing to config.log, and then calls config.status.
25065# config.status does its own redirection, appending to config.log.
25066# Unfortunately, on DOS this fails, as config.log is still kept open
25067# by configure, so config.status won't be able to write to it; its
25068# output is simply discarded. So we exec the FD to /dev/null,
25069# effectively closing config.log, so it can be properly (re)opened and
25070# appended to by config.status. When coming back to configure, we
25071# need to make the FD available again.
25072if test "$no_create" != yes; then
25073 ac_cs_success=:
19650fd6
AS
25074 ac_config_status_args=
25075 test "$silent" = yes &&
25076 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25077 exec 5>/dev/null
19650fd6 25078 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25079 exec 5>>config.log
25080 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25081 # would make configure fail if this is the last instruction.
25082 $ac_cs_success || { (exit 1); exit 1; }
25083fi
f5f47add 25084
c0d27fcc 25085