(sync from trunk 2008-01-25)
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
f053c89f 3# Generated by GNU Autoconf 2.61.
ba4481b5 4#
ca81d7a0 5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 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
f053c89f
CY
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+"$@"}'='"$@"'
ca81d7a0
JD
21 setopt NO_GLOB_SUBST
22else
f053c89f
CY
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
503d2be0 27fi
f053c89f
CY
28
29
503d2be0 30
ca81d7a0
JD
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
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
ca81d7a0
JD
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.
ca81d7a0
JD
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
ca81d7a0 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
ca81d7a0
JD
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
ca81d7a0 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.
ca81d7a0 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
ca81d7a0 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
ca81d7a0
JD
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
ca81d7a0
JD
150# CDPATH.
151$as_unset CDPATH
8eeae1c9 152
8eeae1c9 153
ca81d7a0
JD
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
8eeae1c9
JD
159fi
160
ca81d7a0
JD
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}
8eeae1c9 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
8eeae1c9 185
ca81d7a0
JD
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 221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
f053c89f 222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
c0d27fcc
MR
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
ca81d7a0 226 case $as_dir in
c0d27fcc 227 /*)
ca81d7a0
JD
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
ca81d7a0
JD
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
f053c89f
CY
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
ca81d7a0 252fi
f053c89f 253
ca81d7a0
JD
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
ca81d7a0
JD
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
f053c89f
CY
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
ca81d7a0 273fi
f053c89f 274
ca81d7a0
JD
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(
8eeae1c9
JD
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
330 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0
JD
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") || {
7cc04609
DN
415 echo No shell found that supports shell functions.
416 echo Please tell autoconf@gnu.org about your system,
417 echo including any error possibly output before this
418 echo message
ca81d7a0
JD
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
ca81d7a0
JD
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
ca81d7a0
JD
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 '
ca81d7a0
JD
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
ca81d7a0
JD
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
ca81d7a0 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
ca81d7a0 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
ca81d7a0
JD
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
ca81d7a0
JD
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
ca81d7a0
JD
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
ca81d7a0
JD
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
ca81d7a0
JD
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
ca81d7a0
JD
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
f053c89f
CY
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
ca81d7a0 523else
f053c89f
CY
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 '
ca81d7a0 541fi
f053c89f 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
ca81d7a0 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
ca81d7a0 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
ca81d7a0 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>
f053c89f 584#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
585# include <sys/types.h>
586#endif
f053c89f 587#ifdef HAVE_SYS_STAT_H
503d2be0
AS
588# include <sys/stat.h>
589#endif
f053c89f 590#ifdef STDC_HEADERS
503d2be0
AS
591# include <stdlib.h>
592# include <stddef.h>
593#else
f053c89f 594# ifdef HAVE_STDLIB_H
503d2be0
AS
595# include <stdlib.h>
596# endif
597#endif
f053c89f
CY
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
f053c89f 604#ifdef HAVE_STRINGS_H
503d2be0
AS
605# include <strings.h>
606#endif
f053c89f 607#ifdef HAVE_INTTYPES_H
503d2be0 608# include <inttypes.h>
ca81d7a0 609#endif
f053c89f 610#ifdef HAVE_STDINT_H
ca81d7a0 611# include <stdint.h>
503d2be0 612#endif
f053c89f 613#ifdef HAVE_UNISTD_H
503d2be0
AS
614# include <unistd.h>
615#endif"
ba4481b5 616
f053c89f
CY
617ac_header_list=
618ac_func_list=
ca81d7a0
JD
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
682LIBSOUND
683PKG_CONFIG
684ALSA_CFLAGS
685ALSA_LIBS
ca81d7a0
JD
686CFLAGS_SOUND
687SET_MAKE
688XMKMF
689GTK_CFLAGS
690GTK_LIBS
9d89ffd0
JD
691XFT_CFLAGS
692XFT_LIBS
ca81d7a0
JD
693ALLOCA
694liblockfile
695LIBOBJS
696NEED_SETGID
697KMEM_GROUP
698GETLOADAVG_LIBS
699GETOPT_H
700GETOPTOBJS
701version
702configuration
703canonical
704srcdir
705lispdir
706locallisppath
707lisppath
708x_default_search_path
709etcdir
710archlibdir
711bitmapdir
712gamedir
713gameuser
714c_switch_system
715c_switch_machine
716LD_SWITCH_X_SITE
717LD_SWITCH_X_SITE_AUX
718C_SWITCH_X_SITE
719X_TOOLKIT_TYPE
720machfile
721opsysfile
722carbon_appdir
723LTLIBOBJS'
6bae0ccf 724ac_subst_files=''
ca81d7a0
JD
725 ac_precious_vars='build_alias
726host_alias
727target_alias
728CC
729CFLAGS
730LDFLAGS
f053c89f 731LIBS
ca81d7a0
JD
732CPPFLAGS
733CPP
734XMKMF'
735
c0d27fcc 736
ba4481b5 737# Initialize some variables set by options.
503d2be0
AS
738ac_init_help=
739ac_init_version=false
ba4481b5
DL
740# The variables have the same names as the options, with
741# dashes changed to underlines.
503d2be0 742cache_file=/dev/null
ba4481b5 743exec_prefix=NONE
ba4481b5 744no_create=
ba4481b5
DL
745no_recursion=
746prefix=NONE
747program_prefix=NONE
748program_suffix=NONE
749program_transform_name=s,x,x,
750silent=
751site=
752srcdir=
ba4481b5
DL
753verbose=
754x_includes=NONE
755x_libraries=NONE
503d2be0
AS
756
757# Installation directory options.
758# These are left unexpanded so users can "make install exec_prefix=/foo"
759# and all the variables that are supposed to be based on exec_prefix
760# by default will actually change.
761# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 762# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
763bindir='${exec_prefix}/bin'
764sbindir='${exec_prefix}/sbin'
765libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
766datarootdir='${prefix}/share'
767datadir='${datarootdir}'
ba4481b5
DL
768sysconfdir='${prefix}/etc'
769sharedstatedir='${prefix}/com'
770localstatedir='${prefix}/var'
ba4481b5
DL
771includedir='${prefix}/include'
772oldincludedir='/usr/include'
ca81d7a0
JD
773docdir='${datarootdir}/doc/${PACKAGE}'
774infodir='${datarootdir}/info'
775htmldir='${docdir}'
776dvidir='${docdir}'
777pdfdir='${docdir}'
778psdir='${docdir}'
779libdir='${exec_prefix}/lib'
780localedir='${datarootdir}/locale'
781mandir='${datarootdir}/man'
ba4481b5 782
ba4481b5 783ac_prev=
ca81d7a0 784ac_dashdash=
ba4481b5
DL
785for ac_option
786do
ba4481b5
DL
787 # If the previous option needs an argument, assign it.
788 if test -n "$ac_prev"; then
ca81d7a0 789 eval $ac_prev=\$ac_option
ba4481b5
DL
790 ac_prev=
791 continue
792 fi
793
ca81d7a0
JD
794 case $ac_option in
795 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
796 *) ac_optarg=yes ;;
797 esac
ba4481b5
DL
798
799 # Accept the important Cygnus configure options, so we can diagnose typos.
800
ca81d7a0
JD
801 case $ac_dashdash$ac_option in
802 --)
803 ac_dashdash=yes ;;
ba4481b5
DL
804
805 -bindir | --bindir | --bindi | --bind | --bin | --bi)
806 ac_prev=bindir ;;
807 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 808 bindir=$ac_optarg ;;
ba4481b5
DL
809
810 -build | --build | --buil | --bui | --bu)
503d2be0 811 ac_prev=build_alias ;;
ba4481b5 812 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 813 build_alias=$ac_optarg ;;
ba4481b5
DL
814
815 -cache-file | --cache-file | --cache-fil | --cache-fi \
816 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
817 ac_prev=cache_file ;;
818 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
819 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
820 cache_file=$ac_optarg ;;
821
822 --config-cache | -C)
823 cache_file=config.cache ;;
ba4481b5 824
ca81d7a0 825 -datadir | --datadir | --datadi | --datad)
ba4481b5 826 ac_prev=datadir ;;
ca81d7a0 827 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 828 datadir=$ac_optarg ;;
ba4481b5 829
ca81d7a0
JD
830 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
831 | --dataroo | --dataro | --datar)
832 ac_prev=datarootdir ;;
833 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
834 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
835 datarootdir=$ac_optarg ;;
836
ba4481b5 837 -disable-* | --disable-*)
503d2be0 838 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 839 # Reject names that are not valid shell variable names.
f053c89f 840 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
841 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
842 { (exit 1); exit 1; }; }
f053c89f 843 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
844 eval enable_$ac_feature=no ;;
845
846 -docdir | --docdir | --docdi | --doc | --do)
847 ac_prev=docdir ;;
848 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
849 docdir=$ac_optarg ;;
850
851 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
852 ac_prev=dvidir ;;
853 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
854 dvidir=$ac_optarg ;;
ba4481b5
DL
855
856 -enable-* | --enable-*)
503d2be0 857 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 858 # Reject names that are not valid shell variable names.
f053c89f 859 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
860 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
861 { (exit 1); exit 1; }; }
f053c89f 862 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 863 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
864
865 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
866 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
867 | --exec | --exe | --ex)
868 ac_prev=exec_prefix ;;
869 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
870 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
871 | --exec=* | --exe=* | --ex=*)
503d2be0 872 exec_prefix=$ac_optarg ;;
ba4481b5
DL
873
874 -gas | --gas | --ga | --g)
875 # Obsolete; use --with-gas.
876 with_gas=yes ;;
877
503d2be0
AS
878 -help | --help | --hel | --he | -h)
879 ac_init_help=long ;;
880 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
881 ac_init_help=recursive ;;
882 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
883 ac_init_help=short ;;
ba4481b5
DL
884
885 -host | --host | --hos | --ho)
503d2be0 886 ac_prev=host_alias ;;
ba4481b5 887 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 888 host_alias=$ac_optarg ;;
ba4481b5 889
ca81d7a0
JD
890 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
891 ac_prev=htmldir ;;
892 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
893 | --ht=*)
894 htmldir=$ac_optarg ;;
895
ba4481b5
DL
896 -includedir | --includedir | --includedi | --included | --include \
897 | --includ | --inclu | --incl | --inc)
898 ac_prev=includedir ;;
899 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
900 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 901 includedir=$ac_optarg ;;
ba4481b5
DL
902
903 -infodir | --infodir | --infodi | --infod | --info | --inf)
904 ac_prev=infodir ;;
905 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 906 infodir=$ac_optarg ;;
ba4481b5
DL
907
908 -libdir | --libdir | --libdi | --libd)
909 ac_prev=libdir ;;
910 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 911 libdir=$ac_optarg ;;
ba4481b5
DL
912
913 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
914 | --libexe | --libex | --libe)
915 ac_prev=libexecdir ;;
916 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
917 | --libexe=* | --libex=* | --libe=*)
503d2be0 918 libexecdir=$ac_optarg ;;
ba4481b5 919
ca81d7a0
JD
920 -localedir | --localedir | --localedi | --localed | --locale)
921 ac_prev=localedir ;;
922 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
923 localedir=$ac_optarg ;;
924
ba4481b5 925 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 926 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
927 ac_prev=localstatedir ;;
928 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 929 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 930 localstatedir=$ac_optarg ;;
ba4481b5
DL
931
932 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
933 ac_prev=mandir ;;
934 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 935 mandir=$ac_optarg ;;
ba4481b5
DL
936
937 -nfp | --nfp | --nf)
938 # Obsolete; use --without-fp.
939 with_fp=no ;;
940
941 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 942 | --no-cr | --no-c | -n)
ba4481b5
DL
943 no_create=yes ;;
944
945 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
946 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
947 no_recursion=yes ;;
948
949 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
950 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
951 | --oldin | --oldi | --old | --ol | --o)
952 ac_prev=oldincludedir ;;
953 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
954 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
955 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 956 oldincludedir=$ac_optarg ;;
ba4481b5
DL
957
958 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
959 ac_prev=prefix ;;
960 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 961 prefix=$ac_optarg ;;
ba4481b5
DL
962
963 -program-prefix | --program-prefix | --program-prefi | --program-pref \
964 | --program-pre | --program-pr | --program-p)
965 ac_prev=program_prefix ;;
966 -program-prefix=* | --program-prefix=* | --program-prefi=* \
967 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 968 program_prefix=$ac_optarg ;;
ba4481b5
DL
969
970 -program-suffix | --program-suffix | --program-suffi | --program-suff \
971 | --program-suf | --program-su | --program-s)
972 ac_prev=program_suffix ;;
973 -program-suffix=* | --program-suffix=* | --program-suffi=* \
974 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 975 program_suffix=$ac_optarg ;;
ba4481b5
DL
976
977 -program-transform-name | --program-transform-name \
978 | --program-transform-nam | --program-transform-na \
979 | --program-transform-n | --program-transform- \
980 | --program-transform | --program-transfor \
981 | --program-transfo | --program-transf \
982 | --program-trans | --program-tran \
983 | --progr-tra | --program-tr | --program-t)
984 ac_prev=program_transform_name ;;
985 -program-transform-name=* | --program-transform-name=* \
986 | --program-transform-nam=* | --program-transform-na=* \
987 | --program-transform-n=* | --program-transform-=* \
988 | --program-transform=* | --program-transfor=* \
989 | --program-transfo=* | --program-transf=* \
990 | --program-trans=* | --program-tran=* \
991 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 992 program_transform_name=$ac_optarg ;;
ba4481b5 993
ca81d7a0
JD
994 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
995 ac_prev=pdfdir ;;
996 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
997 pdfdir=$ac_optarg ;;
998
999 -psdir | --psdir | --psdi | --psd | --ps)
1000 ac_prev=psdir ;;
1001 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1002 psdir=$ac_optarg ;;
1003
ba4481b5
DL
1004 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1005 | -silent | --silent | --silen | --sile | --sil)
1006 silent=yes ;;
1007
1008 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1009 ac_prev=sbindir ;;
1010 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1011 | --sbi=* | --sb=*)
503d2be0 1012 sbindir=$ac_optarg ;;
ba4481b5
DL
1013
1014 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1015 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1016 | --sharedst | --shareds | --shared | --share | --shar \
1017 | --sha | --sh)
1018 ac_prev=sharedstatedir ;;
1019 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1020 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1021 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1022 | --sha=* | --sh=*)
503d2be0 1023 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1024
1025 -site | --site | --sit)
1026 ac_prev=site ;;
1027 -site=* | --site=* | --sit=*)
503d2be0 1028 site=$ac_optarg ;;
ba4481b5
DL
1029
1030 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1031 ac_prev=srcdir ;;
1032 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1033 srcdir=$ac_optarg ;;
ba4481b5
DL
1034
1035 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1036 | --syscon | --sysco | --sysc | --sys | --sy)
1037 ac_prev=sysconfdir ;;
1038 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1039 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1040 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1041
1042 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1043 ac_prev=target_alias ;;
ba4481b5 1044 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1045 target_alias=$ac_optarg ;;
ba4481b5
DL
1046
1047 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1048 verbose=yes ;;
1049
503d2be0
AS
1050 -version | --version | --versio | --versi | --vers | -V)
1051 ac_init_version=: ;;
ba4481b5
DL
1052
1053 -with-* | --with-*)
503d2be0 1054 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1055 # Reject names that are not valid shell variable names.
f053c89f 1056 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1057 { echo "$as_me: error: invalid package name: $ac_package" >&2
1058 { (exit 1); exit 1; }; }
f053c89f 1059 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1060 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1061
1062 -without-* | --without-*)
503d2be0 1063 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1064 # Reject names that are not valid shell variable names.
f053c89f 1065 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1066 { echo "$as_me: error: invalid package name: $ac_package" >&2
1067 { (exit 1); exit 1; }; }
f053c89f 1068 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1069 eval with_$ac_package=no ;;
ba4481b5
DL
1070
1071 --x)
1072 # Obsolete; use --with-x.
1073 with_x=yes ;;
1074
1075 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1076 | --x-incl | --x-inc | --x-in | --x-i)
1077 ac_prev=x_includes ;;
1078 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1079 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1080 x_includes=$ac_optarg ;;
ba4481b5
DL
1081
1082 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1083 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1084 ac_prev=x_libraries ;;
1085 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1086 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1087 x_libraries=$ac_optarg ;;
ba4481b5 1088
503d2be0
AS
1089 -*) { echo "$as_me: error: unrecognized option: $ac_option
1090Try \`$0 --help' for more information." >&2
1091 { (exit 1); exit 1; }; }
ba4481b5
DL
1092 ;;
1093
503d2be0
AS
1094 *=*)
1095 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1096 # Reject names that are not valid shell variable names.
1097 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1098 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1099 { (exit 1); exit 1; }; }
ca81d7a0 1100 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1101 export $ac_envvar ;;
1102
ba4481b5 1103 *)
503d2be0
AS
1104 # FIXME: should be removed in autoconf 3.0.
1105 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1106 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1107 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1108 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1109 ;;
1110
1111 esac
1112done
1113
1114if test -n "$ac_prev"; then
503d2be0
AS
1115 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1116 { echo "$as_me: error: missing argument to $ac_option" >&2
1117 { (exit 1); exit 1; }; }
ba4481b5 1118fi
ba4481b5 1119
ca81d7a0
JD
1120# Be sure to have absolute directory names.
1121for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1122 datadir sysconfdir sharedstatedir localstatedir includedir \
1123 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1124 libdir localedir mandir
4b411bfe 1125do
ca81d7a0 1126 eval ac_val=\$$ac_var
4b411bfe 1127 case $ac_val in
ca81d7a0
JD
1128 [\\/$]* | ?:[\\/]* ) continue;;
1129 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1130 esac
ca81d7a0
JD
1131 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1132 { (exit 1); exit 1; }; }
ba4481b5
DL
1133done
1134
503d2be0
AS
1135# There might be people who depend on the old broken behavior: `$host'
1136# used to hold the argument of --host etc.
c0d27fcc 1137# FIXME: To remove some day.
503d2be0
AS
1138build=$build_alias
1139host=$host_alias
1140target=$target_alias
1141
c0d27fcc 1142# FIXME: To remove some day.
503d2be0
AS
1143if test "x$host_alias" != x; then
1144 if test "x$build_alias" = x; then
1145 cross_compiling=maybe
1146 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1147 If a cross compiler is detected then cross compile mode will be used." >&2
1148 elif test "x$build_alias" != "x$host_alias"; then
1149 cross_compiling=yes
1150 fi
1151fi
ba4481b5 1152
503d2be0
AS
1153ac_tool_prefix=
1154test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1155
503d2be0 1156test "$silent" = yes && exec 6>/dev/null
ba4481b5 1157
c0d27fcc 1158
ca81d7a0
JD
1159ac_pwd=`pwd` && test -n "$ac_pwd" &&
1160ac_ls_di=`ls -di .` &&
1161ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1162 { echo "$as_me: error: Working directory cannot be determined" >&2
1163 { (exit 1); exit 1; }; }
1164test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1165 { echo "$as_me: error: pwd does not report name of working directory" >&2
1166 { (exit 1); exit 1; }; }
1167
1168
ba4481b5
DL
1169# Find the source files, if location was not specified.
1170if test -z "$srcdir"; then
1171 ac_srcdir_defaulted=yes
ca81d7a0
JD
1172 # Try the directory containing this script, then the parent directory.
1173 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1174$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1175 X"$0" : 'X\(//\)[^/]' \| \
1176 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1177 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1178echo X"$0" |
ca81d7a0
JD
1179 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1180 s//\1/
1181 q
1182 }
1183 /^X\(\/\/\)[^/].*/{
1184 s//\1/
1185 q
1186 }
1187 /^X\(\/\/\)$/{
1188 s//\1/
1189 q
1190 }
1191 /^X\(\/\).*/{
1192 s//\1/
1193 q
1194 }
1195 s/.*/./; q'`
ba4481b5 1196 srcdir=$ac_confdir
ca81d7a0 1197 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1198 srcdir=..
1199 fi
1200else
1201 ac_srcdir_defaulted=no
1202fi
ca81d7a0
JD
1203if test ! -r "$srcdir/$ac_unique_file"; then
1204 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1205 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1206 { (exit 1); exit 1; }; }
ba4481b5 1207fi
ca81d7a0
JD
1208ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1209ac_abs_confdir=`(
1210 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1211 { (exit 1); exit 1; }; }
ca81d7a0
JD
1212 pwd)`
1213# When building in place, set srcdir=.
1214if test "$ac_abs_confdir" = "$ac_pwd"; then
1215 srcdir=.
1216fi
1217# Remove unnecessary trailing slashes from srcdir.
1218# Double slashes in file names in object file debugging info
1219# mess up M-x gdb in Emacs.
1220case $srcdir in
1221*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1222esac
1223for ac_var in $ac_precious_vars; do
1224 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1225 eval ac_env_${ac_var}_value=\$${ac_var}
1226 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1227 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1228done
503d2be0
AS
1229
1230#
1231# Report the --help message.
1232#
1233if test "$ac_init_help" = "long"; then
1234 # Omit some internal or obsolete options to make the list less imposing.
1235 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1236 cat <<_ACEOF
503d2be0
AS
1237\`configure' configures this package to adapt to many kinds of systems.
1238
1239Usage: $0 [OPTION]... [VAR=VALUE]...
1240
1241To assign environment variables (e.g., CC, CFLAGS...), specify them as
1242VAR=VALUE. See below for descriptions of some of the useful variables.
1243
1244Defaults for the options are specified in brackets.
1245
1246Configuration:
1247 -h, --help display this help and exit
1248 --help=short display options specific to this package
1249 --help=recursive display the short help of all the included packages
1250 -V, --version display version information and exit
1251 -q, --quiet, --silent do not print \`checking...' messages
1252 --cache-file=FILE cache test results in FILE [disabled]
1253 -C, --config-cache alias for \`--cache-file=config.cache'
1254 -n, --no-create do not create output files
1255 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1256
503d2be0
AS
1257Installation directories:
1258 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1259 [$ac_default_prefix]
503d2be0 1260 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1261 [PREFIX]
503d2be0
AS
1262
1263By default, \`make install' will install all the files in
1264\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1265an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1266for instance \`--prefix=\$HOME'.
1267
1268For better control, use the options below.
1269
1270Fine tuning of the installation directories:
1271 --bindir=DIR user executables [EPREFIX/bin]
1272 --sbindir=DIR system admin executables [EPREFIX/sbin]
1273 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1274 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1275 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1276 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1277 --libdir=DIR object code libraries [EPREFIX/lib]
1278 --includedir=DIR C header files [PREFIX/include]
1279 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1280 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1281 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1282 --infodir=DIR info documentation [DATAROOTDIR/info]
1283 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1284 --mandir=DIR man documentation [DATAROOTDIR/man]
1285 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1286 --htmldir=DIR html documentation [DOCDIR]
1287 --dvidir=DIR dvi documentation [DOCDIR]
1288 --pdfdir=DIR pdf documentation [DOCDIR]
1289 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1290_ACEOF
503d2be0 1291
c0d27fcc 1292 cat <<\_ACEOF
503d2be0 1293
ba5da88a
PJ
1294Program names:
1295 --program-prefix=PREFIX prepend PREFIX to installed program names
1296 --program-suffix=SUFFIX append SUFFIX to installed program names
1297 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1298
503d2be0
AS
1299X features:
1300 --x-includes=DIR X include files are in DIR
1301 --x-libraries=DIR X library files are in DIR
1302
1303System types:
1304 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1305 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1306_ACEOF
503d2be0
AS
1307fi
1308
1309if test -n "$ac_init_help"; then
1310
c0d27fcc 1311 cat <<\_ACEOF
503d2be0
AS
1312
1313Optional Features:
1314 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1315 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
1316 --enable-carbon-app[=DIR] [DIR=/Application]
1317 specify install directory for Emacs.app on Mac OS X
d0098f13 1318 --enable-asserts compile code with asserts enabled
19650fd6
AS
1319 --enable-maintainer-mode enable make rules and dependencies not useful
1320 (and sometimes confusing) to the casual installer
9adfabc2
LK
1321 --enable-locallisppath=PATH
1322 directories Emacs should search for lisp files
1323 specific to this site
503d2be0
AS
1324 --disable-largefile omit support for large files
1325
1326Optional Packages:
1327 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1328 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1329 --without-gcc don't use GCC to compile Emacs if GCC is found
1330 --without-pop don't support POP mail retrieval with movemail
1331 --with-kerberos support Kerberos-authenticated POP
1332 --with-kerberos5 support Kerberos version 5 authenticated POP
1333 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1334 --without-sound don't compile with sound support
488dd4c4
JD
1335 --with-x-toolkit=KIT use an X toolkit
1336 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
1337 --with-xpm use -lXpm for displaying XPM images
1338 --with-jpeg use -ljpeg for displaying JPEG images
1339 --with-tiff use -ltiff for displaying TIFF images
1340 --with-gif use -lungif for displaying GIF images
1341 --with-png use -lpng for displaying PNG images
488dd4c4
JD
1342 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1343 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1344 --without-toolkit-scroll-bars
cc227489
MB
1345 don't use Motif or Xaw3d scroll bars
1346 --without-xim don't use X11 XIM
e0f712ba 1347 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1348 --with-x use the X Window System
1349
1350Some influential environment variables:
1351 CC C compiler command
1352 CFLAGS C compiler flags
1353 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1354 nonstandard directory <lib dir>
f053c89f 1355 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1356 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1357 you have headers in a nonstandard directory <include dir>
503d2be0 1358 CPP C preprocessor
ca81d7a0 1359 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1360
1361Use these variables to override the choices made by `configure' or to help
1362it to find libraries and programs with nonstandard names/locations.
1363
c0d27fcc 1364_ACEOF
ca81d7a0 1365ac_status=$?
503d2be0
AS
1366fi
1367
1368if test "$ac_init_help" = "recursive"; then
1369 # If there are subdirs, report their specific --help.
c0d27fcc 1370 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1371 test -d "$ac_dir" || continue
c0d27fcc
MR
1372 ac_builddir=.
1373
ca81d7a0
JD
1374case "$ac_dir" in
1375.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1376*)
c0d27fcc 1377 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1378 # A ".." for each directory in $ac_dir_suffix.
1379 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1380 case $ac_top_builddir_sub in
1381 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1382 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1383 esac ;;
1384esac
1385ac_abs_top_builddir=$ac_pwd
1386ac_abs_builddir=$ac_pwd$ac_dir_suffix
1387# for backward compatibility:
1388ac_top_builddir=$ac_top_build_prefix
503d2be0 1389
c0d27fcc 1390case $srcdir in
ca81d7a0 1391 .) # We are building in place.
c0d27fcc 1392 ac_srcdir=.
ca81d7a0
JD
1393 ac_top_srcdir=$ac_top_builddir_sub
1394 ac_abs_top_srcdir=$ac_pwd ;;
1395 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1396 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1397 ac_top_srcdir=$srcdir
1398 ac_abs_top_srcdir=$srcdir ;;
1399 *) # Relative name.
1400 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1401 ac_top_srcdir=$ac_top_build_prefix$srcdir
1402 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1403esac
ca81d7a0
JD
1404ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1405
1406 cd "$ac_dir" || { ac_status=$?; continue; }
1407 # Check for guested configure.
1408 if test -f "$ac_srcdir/configure.gnu"; then
1409 echo &&
1410 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1411 elif test -f "$ac_srcdir/configure"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1414 else
c0d27fcc 1415 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1416 fi || ac_status=$?
1417 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1418 done
1419fi
1420
ca81d7a0 1421test -n "$ac_init_help" && exit $ac_status
503d2be0 1422if $ac_init_version; then
c0d27fcc 1423 cat <<\_ACEOF
ca81d7a0 1424configure
f053c89f 1425generated by GNU Autoconf 2.61
503d2be0 1426
ca81d7a0 1427Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 14282002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1429This configure script is free software; the Free Software Foundation
1430gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1431_ACEOF
ca81d7a0 1432 exit
503d2be0 1433fi
ca81d7a0 1434cat >config.log <<_ACEOF
503d2be0
AS
1435This file contains any messages produced by compilers while
1436running configure, to aid debugging if configure makes a mistake.
1437
1438It was created by $as_me, which was
f053c89f 1439generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1440
1441 $ $0 $@
1442
c0d27fcc 1443_ACEOF
ca81d7a0 1444exec 5>>config.log
503d2be0
AS
1445{
1446cat <<_ASUNAME
c0d27fcc
MR
1447## --------- ##
1448## Platform. ##
1449## --------- ##
503d2be0
AS
1450
1451hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1452uname -m = `(uname -m) 2>/dev/null || echo unknown`
1453uname -r = `(uname -r) 2>/dev/null || echo unknown`
1454uname -s = `(uname -s) 2>/dev/null || echo unknown`
1455uname -v = `(uname -v) 2>/dev/null || echo unknown`
1456
1457/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1458/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1459
1460/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1461/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1462/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1463/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1464/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1465/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1466/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1467
925c2f3f 1468_ASUNAME
c0d27fcc
MR
1469
1470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1471for as_dir in $PATH
1472do
1473 IFS=$as_save_IFS
1474 test -z "$as_dir" && as_dir=.
1475 echo "PATH: $as_dir"
1476done
ca81d7a0 1477IFS=$as_save_IFS
c0d27fcc 1478
503d2be0
AS
1479} >&5
1480
c0d27fcc
MR
1481cat >&5 <<_ACEOF
1482
1483
1484## ----------- ##
1485## Core tests. ##
1486## ----------- ##
1487
1488_ACEOF
503d2be0 1489
503d2be0
AS
1490
1491# Keep a trace of the command line.
1492# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1493# Strip out --silent because we don't want to record it for future runs.
503d2be0 1494# Also quote any args containing shell meta-characters.
19650fd6 1495# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1496ac_configure_args=
19650fd6
AS
1497ac_configure_args0=
1498ac_configure_args1=
19650fd6
AS
1499ac_must_keep_next=false
1500for ac_pass in 1 2
503d2be0 1501do
19650fd6
AS
1502 for ac_arg
1503 do
1504 case $ac_arg in
1505 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1507 | -silent | --silent | --silen | --sile | --sil)
1508 continue ;;
ca81d7a0 1509 *\'*)
19650fd6
AS
1510 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1511 esac
1512 case $ac_pass in
1513 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1514 2)
1515 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1516 if test $ac_must_keep_next = true; then
edfaf76d 1517 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1518 else
edfaf76d
LK
1519 case $ac_arg in
1520 *=* | --config-cache | -C | -disable-* | --disable-* \
1521 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1522 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1523 | -with-* | --with-* | -without-* | --without-* | --x)
1524 case "$ac_configure_args0 " in
1525 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1526 esac
1527 ;;
1528 -* ) ac_must_keep_next=true ;;
1529 esac
19650fd6 1530 fi
ca81d7a0 1531 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1532 ;;
1533 esac
1534 done
503d2be0 1535done
19650fd6
AS
1536$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1537$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1538
1539# When interrupted or exit'd, cleanup temporary files, and complete
1540# config.log. We remove comments because anyway the quotes in there
1541# would cause problems or look ugly.
ca81d7a0
JD
1542# WARNING: Use '\'' to represent an apostrophe within the trap.
1543# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1544trap 'exit_status=$?
1545 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1546 {
1547 echo
6bae0ccf 1548
c0d27fcc
MR
1549 cat <<\_ASBOX
1550## ---------------- ##
1551## Cache variables. ##
1552## ---------------- ##
1553_ASBOX
1554 echo
1555 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1556(
1557 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1558 eval ac_val=\$$ac_var
1559 case $ac_val in #(
1560 *${as_nl}*)
1561 case $ac_var in #(
1562 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1563echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1564 esac
1565 case $ac_var in #(
1566 _ | IFS | as_nl) ;; #(
1567 *) $as_unset $ac_var ;;
1568 esac ;;
1569 esac
1570 done
503d2be0 1571 (set) 2>&1 |
ca81d7a0
JD
1572 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1573 *${as_nl}ac_space=\ *)
503d2be0 1574 sed -n \
ca81d7a0
JD
1575 "s/'\''/'\''\\\\'\'''\''/g;
1576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1577 ;; #(
503d2be0 1578 *)
ca81d7a0 1579 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1580 ;;
ca81d7a0
JD
1581 esac |
1582 sort
1583)
c0d27fcc 1584 echo
6bae0ccf
DL
1585
1586 cat <<\_ASBOX
1587## ----------------- ##
1588## Output variables. ##
1589## ----------------- ##
1590_ASBOX
1591 echo
1592 for ac_var in $ac_subst_vars
1593 do
ca81d7a0
JD
1594 eval ac_val=\$$ac_var
1595 case $ac_val in
1596 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1597 esac
1598 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1599 done | sort
1600 echo
1601
1602 if test -n "$ac_subst_files"; then
1603 cat <<\_ASBOX
ca81d7a0
JD
1604## ------------------- ##
1605## File substitutions. ##
1606## ------------------- ##
6bae0ccf
DL
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_files
1610 do
ca81d7a0
JD
1611 eval ac_val=\$$ac_var
1612 case $ac_val in
1613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1614 esac
1615 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1616 done | sort
1617 echo
1618 fi
1619
c0d27fcc
MR
1620 if test -s confdefs.h; then
1621 cat <<\_ASBOX
1622## ----------- ##
1623## confdefs.h. ##
1624## ----------- ##
1625_ASBOX
1626 echo
ca81d7a0 1627 cat confdefs.h
c0d27fcc
MR
1628 echo
1629 fi
1630 test "$ac_signal" != 0 &&
1631 echo "$as_me: caught signal $ac_signal"
1632 echo "$as_me: exit $exit_status"
1633 } >&5
ca81d7a0
JD
1634 rm -f core *.core core.conftest.* &&
1635 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1636 exit $exit_status
ca81d7a0 1637' 0
503d2be0
AS
1638for ac_signal in 1 2 13 15; do
1639 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1640done
1641ac_signal=0
1642
1643# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1644rm -f -r conftest* confdefs.h
ba4481b5 1645
c0d27fcc
MR
1646# Predefined preprocessor variables.
1647
1648cat >>confdefs.h <<_ACEOF
1649#define PACKAGE_NAME "$PACKAGE_NAME"
1650_ACEOF
1651
1652
1653cat >>confdefs.h <<_ACEOF
1654#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1655_ACEOF
1656
1657
1658cat >>confdefs.h <<_ACEOF
1659#define PACKAGE_VERSION "$PACKAGE_VERSION"
1660_ACEOF
1661
1662
1663cat >>confdefs.h <<_ACEOF
1664#define PACKAGE_STRING "$PACKAGE_STRING"
1665_ACEOF
1666
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1670_ACEOF
1671
1672
503d2be0 1673# Let the site file select an alternate cache file if it wants to.
ba4481b5 1674# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1675if test -n "$CONFIG_SITE"; then
1676 set x "$CONFIG_SITE"
1677elif test "x$prefix" != xNONE; then
1678 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1679else
1680 set x "$ac_default_prefix/share/config.site" \
1681 "$ac_default_prefix/etc/config.site"
ba4481b5 1682fi
ca81d7a0
JD
1683shift
1684for ac_site_file
1685do
ba4481b5 1686 if test -r "$ac_site_file"; then
c0d27fcc 1687 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1688echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1689 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1690 . "$ac_site_file"
1691 fi
1692done
1693
1694if test -r "$cache_file"; then
503d2be0
AS
1695 # Some versions of bash will fail to source /dev/null (special
1696 # files actually), so we avoid doing that.
1697 if test -f "$cache_file"; then
c0d27fcc 1698 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1699echo "$as_me: loading cache $cache_file" >&6;}
1700 case $cache_file in
ca81d7a0
JD
1701 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1702 *) . "./$cache_file";;
503d2be0
AS
1703 esac
1704 fi
ba4481b5 1705else
c0d27fcc 1706 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1707echo "$as_me: creating cache $cache_file" >&6;}
1708 >$cache_file
1709fi
1710
f053c89f
CY
1711ac_header_list="$ac_header_list sys/time.h"
1712ac_header_list="$ac_header_list unistd.h"
1713ac_func_list="$ac_func_list alarm"
503d2be0
AS
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
ca81d7a0 1717for ac_var in $ac_precious_vars; do
503d2be0
AS
1718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1722 case $ac_old_set,$ac_new_set in
1723 set,)
c0d27fcc 1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
c0d27fcc 1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1737echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1739echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1740 ac_cache_corrupted=:
503d2be0
AS
1741 fi;;
1742 esac
c0d27fcc 1743 # Pass precious variables to config.status.
503d2be0
AS
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
ca81d7a0 1746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
c0d27fcc 1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
ba4481b5
DL
1761fi
1762
c0d27fcc
MR
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
ba4481b5 1778
ca81d7a0
JD
1779ac_ext=c
1780ac_cpp='$CPP $CPPFLAGS'
1781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1783ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1784
4b411bfe 1785
ca81d7a0 1786ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1787
c0d27fcc 1788
ba5da88a 1789test "$program_prefix" != NONE &&
ca81d7a0 1790 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1791# Use a double $ so make ignores it.
1792test "$program_suffix" != NONE &&
ca81d7a0 1793 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1794# Double any \ or $. echo might interpret backslashes.
1795# By default was `s,x,x', remove it if useless.
1796cat <<\_ACEOF >conftest.sed
1797s/[\\$]/&&/g;s/;s,x,x,$//
1798_ACEOF
1799program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1800rm -f conftest.sed
ba5da88a 1801
c0d27fcc 1802
ba4481b5
DL
1803lispdir='${datadir}/emacs/${version}/lisp'
1804locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1805'${datadir}/emacs/site-lisp'
1806lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1807etcdir='${datadir}/emacs/${version}/etc'
1808archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1809docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1810gamedir='${localstatedir}/games/emacs'
98418dba
CW
1811
1812gameuser=games
1813
c0d27fcc 1814
ca81d7a0 1815# Check whether --with-gcc was given.
ba4481b5 1816if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1817 withval=$with_gcc;
1818fi
503d2be0 1819
ba4481b5 1820
ca81d7a0 1821# Check whether --with-pop was given.
ba4481b5 1822if test "${with_pop+set}" = set; then
ca81d7a0 1823 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1824 cat >>confdefs.h <<\_ACEOF
ba4481b5 1825#define MAIL_USE_POP 1
c0d27fcc 1826_ACEOF
ba4481b5 1827
243cf185
DL
1828else :
1829fi
3d9fec71 1830else
c0d27fcc 1831 cat >>confdefs.h <<\_ACEOF
3d9fec71 1832#define MAIL_USE_POP 1
c0d27fcc 1833_ACEOF
3d9fec71 1834
ca81d7a0
JD
1835fi
1836
ba4481b5 1837
c0d27fcc 1838
ca81d7a0 1839# Check whether --with-kerberos was given.
a21616bd 1840if test "${with_kerberos+set}" = set; then
54e6585f
CY
1841 withval=$with_kerberos; if test "$withval" = yes; then
1842 cat >>confdefs.h <<\_ACEOF
a21616bd 1843#define KERBEROS 1
c0d27fcc 1844_ACEOF
a21616bd 1845
ca81d7a0 1846fi
54e6585f 1847fi
ca81d7a0 1848
a21616bd 1849
c0d27fcc 1850
ca81d7a0 1851# Check whether --with-kerberos5 was given.
a21616bd 1852if test "${with_kerberos5+set}" = set; then
ca81d7a0 1853 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1854 if test "${with_kerberos+set}" != set; then
1855 with_kerberos=yes
c0d27fcc 1856 cat >>confdefs.h <<\_ACEOF
a21616bd 1857#define KERBEROS 1
c0d27fcc 1858_ACEOF
a21616bd
KR
1859
1860 fi
b936fae4 1861
c0d27fcc 1862cat >>confdefs.h <<\_ACEOF
a21616bd 1863#define KERBEROS5 1
c0d27fcc 1864_ACEOF
a21616bd 1865
ca81d7a0 1866fi
54e6585f 1867fi
b936fae4 1868
4b411bfe 1869
ca81d7a0
JD
1870# Check whether --with-hesiod was given.
1871if test "${with_hesiod+set}" = set; then
54e6585f
CY
1872 withval=$with_hesiod; if test "$withval" = yes; then
1873
c0d27fcc 1874cat >>confdefs.h <<\_ACEOF
ba4481b5 1875#define HESIOD 1
c0d27fcc 1876_ACEOF
ba4481b5 1877
ca81d7a0 1878fi
54e6585f 1879fi
ca81d7a0 1880
ba4481b5 1881
c0d27fcc 1882
ca81d7a0 1883# Check whether --with-sound was given.
2c9dccc9 1884if test "${with_sound+set}" = set; then
ca81d7a0
JD
1885 withval=$with_sound;
1886fi
2c9dccc9 1887
2c9dccc9 1888
c0d27fcc 1889
ca81d7a0 1890# Check whether --with-x-toolkit was given.
ba4481b5 1891if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1892 withval=$with_x_toolkit; case "${withval}" in
ba4481b5
DL
1893 y | ye | yes ) val=athena ;;
1894 n | no ) val=no ;;
1895 l | lu | luc | luci | lucid ) val=lucid ;;
1896 a | at | ath | athe | athen | athena ) val=athena ;;
1897 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1898 g | gt | gtk ) val=gtk ;;
ba4481b5 1899 * )
c0d27fcc 1900{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1901this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1902Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1903echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1904this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1905Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1906 { (exit 1); exit 1; }; }
ba4481b5
DL
1907 ;;
1908 esac
1909 with_x_toolkit=$val
1910
ca81d7a0 1911fi
8eeae1c9 1912
ca81d7a0
JD
1913
1914# Check whether --with-xpm was given.
ba4481b5 1915if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1916 withval=$with_xpm;
1917fi
503d2be0 1918
ba4481b5 1919
ca81d7a0 1920# Check whether --with-jpeg was given.
ba4481b5 1921if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1922 withval=$with_jpeg;
1923fi
503d2be0 1924
ba4481b5 1925
ca81d7a0 1926# Check whether --with-tiff was given.
ba4481b5 1927if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1928 withval=$with_tiff;
1929fi
503d2be0 1930
ba4481b5 1931
ca81d7a0 1932# Check whether --with-gif was given.
ba4481b5 1933if test "${with_gif+set}" = set; then
ca81d7a0
JD
1934 withval=$with_gif;
1935fi
503d2be0 1936
ba4481b5 1937
ca81d7a0 1938# Check whether --with-png was given.
ba4481b5 1939if test "${with_png+set}" = set; then
ca81d7a0
JD
1940 withval=$with_png;
1941fi
503d2be0 1942
ba4481b5 1943
ca81d7a0 1944# Check whether --with-gtk was given.
488dd4c4 1945if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1946 withval=$with_gtk;
1947fi
488dd4c4 1948
488dd4c4 1949
ca81d7a0 1950# Check whether --with-pkg-config-prog was given.
488dd4c4 1951if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1952 withval=$with_pkg_config_prog;
1953fi
488dd4c4 1954
488dd4c4 1955
ca81d7a0 1956# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1957if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1958 withval=$with_toolkit_scroll_bars;
1959fi
503d2be0 1960
ba4481b5 1961
ca81d7a0 1962# Check whether --with-xim was given.
1d36487c 1963if test "${with_xim+set}" = set; then
ca81d7a0
JD
1964 withval=$with_xim;
1965fi
1d36487c 1966
ba4481b5 1967
ca81d7a0 1968# Check whether --with-carbon was given.
e0f712ba 1969if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1970 withval=$with_carbon;
1971fi
e0f712ba 1972
ca81d7a0 1973# Check whether --enable-carbon-app was given.
6a3a24fa 1974if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1975 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1976fi
1977
e0f712ba 1978
ca81d7a0 1979# Check whether --enable-asserts was given.
d0098f13 1980if test "${enable_asserts+set}" = set; then
ca81d7a0 1981 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1982else
1983 USE_XASSERTS=no
ca81d7a0 1984fi
8eeae1c9 1985
ca81d7a0
JD
1986
1987# Check whether --enable-maintainer-mode was given.
19650fd6 1988if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1989 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1990else
1991 USE_MAINTAINER_MODE=no
ca81d7a0
JD
1992fi
1993
19650fd6
AS
1994if test $USE_MAINTAINER_MODE = yes; then
1995 MAINT=
1996else
1997 MAINT=#
1998fi
1999
2000
ca81d7a0 2001# Check whether --enable-locallisppath was given.
9adfabc2 2002if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2003 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2004 locallisppath=
2005elif test "${enableval}" != "yes"; then
2006 locallisppath=${enableval}
2007fi
ca81d7a0
JD
2008fi
2009
9adfabc2 2010
ba4481b5 2011#### Make srcdir absolute, if it isn't already. It's important to
17494071 2012#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2013#### give you automounter prefixes, which can go away. We do all this
2014#### so Emacs can find its files when run uninstalled.
17494071
GM
2015## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2016unset CDPATH
ba4481b5
DL
2017case "${srcdir}" in
2018 /* ) ;;
2019 . )
2020 ## We may be able to use the $PWD environment variable to make this
2021 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2022 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2023 ## but that tested only for a well-formed and valid PWD,
2024 ## it did not object when PWD was well-formed and valid but just wrong.
2025 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2026 then
2027 srcdir="$PWD"
2028 else
2029 srcdir="`(cd ${srcdir}; pwd)`"
2030 fi
2031 ;;
2032 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2033esac
2034
2035#### Check if the source directory already has a configured system in it.
2036if test `pwd` != `(cd ${srcdir} && pwd)` \
2037 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2038 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2039 as a build directory right now; it has been configured in its own
2040 right. To configure in another directory as well, you MUST
2041 use GNU make. If you do not have GNU make, then you must
2042 now do \`make distclean' in ${srcdir},
2043 and then run $0 again." >&5
2044echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2045 as a build directory right now; it has been configured in its own
2046 right. To configure in another directory as well, you MUST
2047 use GNU make. If you do not have GNU make, then you must
2048 now do \`make distclean' in ${srcdir},
503d2be0 2049 and then run $0 again." >&2;}
ba4481b5
DL
2050fi
2051
2052#### Given the configuration name, set machfile and opsysfile to the
2053#### names of the m/*.h and s/*.h files we should use.
2054
2055### Canonicalize the configuration name.
2056
2057ac_aux_dir=
ca81d7a0
JD
2058for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2059 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2060 ac_aux_dir=$ac_dir
2061 ac_install_sh="$ac_aux_dir/install-sh -c"
2062 break
ca81d7a0 2063 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2064 ac_aux_dir=$ac_dir
2065 ac_install_sh="$ac_aux_dir/install.sh -c"
2066 break
ca81d7a0 2067 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2068 ac_aux_dir=$ac_dir
2069 ac_install_sh="$ac_aux_dir/shtool install -c"
2070 break
ba4481b5
DL
2071 fi
2072done
2073if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2074 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2075echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2076 { (exit 1); exit 1; }; }
ba4481b5 2077fi
ca81d7a0
JD
2078
2079# These three variables are undocumented and unsupported,
2080# and are intended to be withdrawn in a future Autoconf release.
2081# They can cause serious problems if a builder's source tree is in a directory
2082# whose full name contains unusual characters.
2083ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2084ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2085ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2086
ba4481b5
DL
2087
2088# Make sure we can run config.sub.
ca81d7a0
JD
2089$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2090 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2091echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2092 { (exit 1); exit 1; }; }
2093
ca81d7a0
JD
2094{ echo "$as_me:$LINENO: checking build system type" >&5
2095echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2096if test "${ac_cv_build+set}" = set; then
2097 echo $ECHO_N "(cached) $ECHO_C" >&6
2098else
ca81d7a0
JD
2099 ac_build_alias=$build_alias
2100test "x$ac_build_alias" = x &&
2101 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2102test "x$ac_build_alias" = x &&
c0d27fcc 2103 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2104echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2105 { (exit 1); exit 1; }; }
ca81d7a0
JD
2106ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2107 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2108echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2109 { (exit 1); exit 1; }; }
2110
2111fi
ca81d7a0
JD
2112{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2113echo "${ECHO_T}$ac_cv_build" >&6; }
2114case $ac_cv_build in
2115*-*-*) ;;
2116*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2117echo "$as_me: error: invalid value of canonical build" >&2;}
2118 { (exit 1); exit 1; }; };;
2119esac
503d2be0 2120build=$ac_cv_build
ca81d7a0
JD
2121ac_save_IFS=$IFS; IFS='-'
2122set x $ac_cv_build
2123shift
2124build_cpu=$1
2125build_vendor=$2
2126shift; shift
2127# Remember, the first character of IFS is used to create $*,
2128# except with old shells:
2129build_os=$*
2130IFS=$ac_save_IFS
2131case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2132
2133
2134{ echo "$as_me:$LINENO: checking host system type" >&5
2135echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2136if test "${ac_cv_host+set}" = set; then
2137 echo $ECHO_N "(cached) $ECHO_C" >&6
2138else
ca81d7a0
JD
2139 if test "x$host_alias" = x; then
2140 ac_cv_host=$ac_cv_build
2141else
2142 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2143 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2144echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2145 { (exit 1); exit 1; }; }
ca81d7a0 2146fi
503d2be0
AS
2147
2148fi
ca81d7a0
JD
2149{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2150echo "${ECHO_T}$ac_cv_host" >&6; }
2151case $ac_cv_host in
2152*-*-*) ;;
2153*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2154echo "$as_me: error: invalid value of canonical host" >&2;}
2155 { (exit 1); exit 1; }; };;
2156esac
503d2be0 2157host=$ac_cv_host
ca81d7a0
JD
2158ac_save_IFS=$IFS; IFS='-'
2159set x $ac_cv_host
2160shift
2161host_cpu=$1
2162host_vendor=$2
2163shift; shift
2164# Remember, the first character of IFS is used to create $*,
2165# except with old shells:
2166host_os=$*
2167IFS=$ac_save_IFS
2168case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2169
c0d27fcc 2170
ba4481b5 2171canonical=$host
531a3336 2172configuration=${host_alias-$host}
ba4481b5 2173
c0d27fcc 2174
22044edf 2175
ba4481b5
DL
2176### If you add support for a new configuration, add code to this
2177### switch statement to recognize your configuration name and select
2178### the appropriate operating system and machine description files.
2179
2180### You would hope that you could choose an m/*.h file pretty much
2181### based on the machine portion of the configuration name, and an s-
2182### file based on the operating system portion. However, it turns out
2183### that each m/*.h file is pretty manufacturer-specific - for
2184### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2185### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2186### machines. So we basically have to have a special case for each
2187### configuration name.
2188###
2189### As far as handling version numbers on operating systems is
2190### concerned, make sure things will fail in a fixable way. If
2191### /etc/MACHINES doesn't say anything about version numbers, be
2192### prepared to handle anything reasonably. If version numbers
2193### matter, be sure /etc/MACHINES says something about it.
2194###
2195### Eric Raymond says we should accept strings like "sysvr4" to mean
2196### "System V Release 4"; he writes, "The old convention encouraged
2197### confusion between `system' and `release' levels'."
2198
2199machine='' opsys='' unported=no
2200case "${canonical}" in
2201
1096bcc0
GM
2202 ## FreeBSD ports
2203 *-*-freebsd* )
2204 opsys=freebsd
2205 case "${canonical}" in
2206 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2207 arm*-*-freebsd*) machine=arm ;;
ec8fcb10
YM
2208 ia64-*-freebsd*) machine=ia64 ;;
2209 sparc64-*-freebsd*) machine=sparc ;;
2210 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2211 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2212 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2213 esac
2214 ;;
2215
ce1b7801
GM
2216 ## FreeBSD kernel + glibc based userland
2217 *-*-kfreebsd*gnu* )
2218 opsys=gnu-kfreebsd
2219 case "${canonical}" in
2220 alpha*-*-kfreebsd*) machine=alpha ;;
2221 ia64-*-kfreebsd*) machine=ia64 ;;
2222 sparc64-*-kfreebsd*) machine=sparc ;;
2223 powerpc-*-kfreebsd*) machine=macppc ;;
2224 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2225 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2226 esac
2227 ;;
2228
ba4481b5
DL
2229 ## NetBSD ports
2230 *-*-netbsd* )
2231 opsys=netbsd
dd038e26 2232 if test -f /usr/lib/crti.o; then
f57bd967
DL
2233
2234cat >>confdefs.h <<\_ACEOF
2235#define HAVE_CRTIN
dd038e26
AS
2236_ACEOF
2237
2238 fi
2239
ba4481b5
DL
2240 case "${canonical}" in
2241 alpha*-*-netbsd*) machine=alpha ;;
2242 i[3456]86-*-netbsd*) machine=intel386 ;;
2243 m68k-*-netbsd*)
2244 # This is somewhat bogus.
2245 machine=hp9000s300 ;;
ba4481b5 2246 mips-*-netbsd*) machine=pmax ;;
2df636f4 2247 mipsel-*-netbsd*) machine=pmax ;;
97836269 2248 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2249 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2250 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2251 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2252 vax-*-netbsd*) machine=vax ;;
2df636f4 2253 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2254 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2255 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2256 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2257 esac
2258 ;;
2259
2260 ## OpenBSD ports
2261 *-*-openbsd* )
2262 opsys=openbsd
2263 case "${canonical}" in
2264 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2265 arm-*-openbsd*) machine=arm ;;
2266 hppa-*-openbsd*) machine=hp9000s300 ;;
2267 i386-*-openbsd*) machine=intel386 ;;
2268 m68k-*-openbsd*) machine=hp9000s300 ;;
2269 m88k-*-openbsd*) machine=aviion ;;
2270 mips64-*-openbsd*) machine=mips64 ;;
2271 powerpc-*-openbsd*) machine=macppc ;;
2272 sh-*-openbsd*) machine=sh3el ;;
2273 sparc*-*-openbsd*) machine=sparc ;;
2274 vax-*-openbsd*) machine=vax ;;
2275 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2276 esac
2277 ;;
2278
10a3b1a1
EZ
2279 ## LynxOS ports
2280 *-*-lynxos* )
2281 opsys=lynxos
2282 case "${canonical}" in
2283 i[3456]86-*-lynxos*) machine=intel386 ;;
2284 powerpc-*-lynxos*) machine=powerpc ;;
2285 esac
2286 ;;
2287
ba4481b5
DL
2288 ## Acorn RISCiX:
2289 arm-acorn-riscix1.1* )
2290 machine=acorn opsys=riscix1-1
2291 ;;
2292 arm-acorn-riscix1.2* | arm-acorn-riscix )
2293 ## This name is riscix12 instead of riscix1.2
2294 ## to avoid a file name conflict on MSDOS.
2295 machine=acorn opsys=riscix12
2296 ;;
2297
2298 ## BSDI ports
2299 *-*-bsdi* )
2300 opsys=bsdi
2301 case "${canonical}" in
2302 i[345]86-*-bsdi*) machine=intel386 ;;
2303 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2304 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2305 esac
2306 case "${canonical}" in
2307 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2308 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2309 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2310 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2311 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2312 esac
2313 ;;
2314
2315 ## Alliant machines
2316 ## Strictly speaking, we need the version of the alliant operating
2317 ## system to choose the right machine file, but currently the
2318 ## configuration name doesn't tell us enough to choose the right
2319 ## one; we need to give alliants their own operating system name to
2320 ## do this right. When someone cares, they can help us.
2321 fx80-alliant-* )
2322 machine=alliant4 opsys=bsd4-2
2323 ;;
2324 i860-alliant-* )
2325 machine=alliant-2800 opsys=bsd4-3
2326 ;;
2327
2328 ## Alpha (DEC) machines.
2329 alpha*-dec-osf* )
2330 machine=alpha opsys=osf1
2331 # This is needed to find X11R6.1 libraries for certain tests.
2332 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2333 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2334 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2335 # due to non-traditional preprocessing with the current compiler
2336 # defaults. OSF 4 can also have that compiler version, and there
2337 # seems always to have been a usable /usr/bin/cpp.
2338 NON_GNU_CPP=/usr/bin/cpp
ca512671 2339 case "${canonical}" in
a55b799a 2340 alpha*-dec-osf[5-9]*)
bb17930d 2341 opsys=osf5-0 ;;
ca512671 2342 esac
ba4481b5
DL
2343 ;;
2344
2345 alpha*-*-linux-gnu* )
2346 machine=alpha opsys=gnu-linux
2347 ;;
2348
c4bb2108
DL
2349 arm*-*-linux-gnu* )
2350 machine=arm opsys=gnu-linux
2351 ;;
2352
ba4481b5
DL
2353 ## Altos 3068
2354 m68*-altos-sysv* )
2355 machine=altos opsys=usg5-2
2356 ;;
2357
2358 ## Amdahl UTS
2359 580-amdahl-sysv* )
2360 machine=amdahl opsys=usg5-2-2
2361 ;;
2362
2363 ## Apollo, Domain/OS
2364 m68*-apollo-* )
2365 machine=apollo opsys=bsd4-3
2366 ;;
2367
040c474e
CY
2368 ## Apple Darwin / Mac OS X
2369 *-apple-darwin* )
2370 case "${canonical}" in
2371 i[3456]86-* ) machine=intel386 ;;
2372 powerpc-* ) machine=powermac ;;
2373 * ) unported=yes ;;
2374 esac
2375 opsys=darwin
2376 # Define CPP as follows to make autoconf work correctly.
2377 CPP="${CC-cc} -E -no-cpp-precomp"
2378 # Use fink packages if available.
2379 if test -d /sw/include && test -d /sw/lib; then
2380 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2381 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2382 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2383 fi
2384 ;;
2385
ba4481b5
DL
2386 ## AT&T 3b2, 3b5, 3b15, 3b20
2387 we32k-att-sysv* )
2388 machine=att3b opsys=usg5-2-2
2389 ;;
2390
2391 ## AT&T 3b1 - The Mighty Unix PC!
2392 m68*-att-sysv* )
2393 machine=7300 opsys=usg5-2-2
2394 ;;
2395
2396 ## Bull dpx20
2397 rs6000-bull-bosx* )
2398 machine=ibmrs6000 opsys=aix3-2
2399 ;;
2400
2401 ## Bull dpx2
2402 m68*-bull-sysv3* )
2403 machine=dpx2 opsys=usg5-3
2404 ;;
2405
2406 ## Bull sps7
2407 m68*-bull-sysv2* )
2408 machine=sps7 opsys=usg5-2
2409 ;;
2410
2411 ## CCI 5/32, 6/32 -- see "Tahoe".
2412
2413 ## Celerity
2414 ## I don't know what configuration name to use for this; config.sub
2415 ## doesn't seem to know anything about it. Hey, Celerity users, get
2416 ## in touch with us!
2417 celerity-celerity-bsd* )
2418 machine=celerity opsys=bsd4-2
2419 ;;
2420
2421 ## Clipper
2422 ## What operating systems does this chip run that Emacs has been
2423 ## tested on?
2424 clipper-* )
2425 machine=clipper
2426 ## We'll use the catch-all code at the bottom to guess the
2427 ## operating system.
2428 ;;
2429
df645f7c
AS
2430 ## Compaq Nonstop
2431 mips-compaq-nonstopux* )
2432 machine=nonstopux opsys=nonstopux
2433 ;;
2434
ba4481b5
DL
2435 ## Convex
2436 *-convex-bsd* | *-convex-convexos* )
2437 machine=convex opsys=bsd4-3
2438 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2439 NON_GNU_CPP="cc -E -P"
2440 ;;
2441
2442 ## Cubix QBx/386
2443 i[3456]86-cubix-sysv* )
2444 machine=intel386 opsys=usg5-3
2445 ;;
2446
2447 ## Cydra 5
2448 cydra*-cydrome-sysv* )
2449 machine=cydra5 opsys=usg5-3
2450 ;;
2451
2452 ## Data General AViiON Machines
2453 ## DG changed naming conventions with the release of 5.4.4.10, they
2454 ## dropped the initial 5.4 but left the intervening R. Because of the
2455 ## R this shouldn't conflict with older versions of the OS (which I
2456 ## think were named like dgux4.*). In addition, DG new AViiONs series
2457 ## uses either Motorola M88k or Intel Pentium CPUs.
2458 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2459 machine=aviion opsys=dgux4
2460 ;;
2461 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2462 ## This name is dgux5-4-3 instead of dgux5-4r3
2463 ## to avoid a file name conflict on MSDOS.
2464 machine=aviion opsys=dgux5-4-3
2465 ;;
2466 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2467 machine=aviion opsys=dgux5-4r2
2468 ;;
2469 m88k-dg-dgux* )
2470 machine=aviion opsys=dgux
2471 ;;
2472
2473 ## Data General AViiON Intel (x86) Machines
2474 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2475 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2476 i[345]86-dg-dguxR4* )
2477 machine=aviion-intel opsys=dgux4
2478 ;;
2479
2480 ## DECstations
2481 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2482 machine=pmax opsys=bsd4-2
2483 ;;
2484 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2485 machine=pmax opsys=bsd4-3
2486 ;;
2487 mips-dec-ultrix* )
2488 machine=pmax opsys=ultrix4-3
2489 ;;
2490 mips-dec-osf* )
2491 machine=pmax opsys=osf1
2492 ;;
2493 mips-dec-mach_bsd4.3* )
2494 machine=pmax opsys=mach-bsd4-3
2495 ;;
2496
cd890796
JD
2497 ## Motorola Delta machines
2498 m68k-motorola-sysv* | m68000-motorola-sysv* )
2499 machine=delta opsys=usg5-3
2500 if test -z "`type gnucc | grep 'not found'`"
2501 then
2502 if test -s /etc/167config
2503 then CC="gnucc -m68040"
2504 else CC="gnucc -m68881"
2505 fi
2506 else
2507 if test -z "`type gcc | grep 'not found'`"
2508 then CC=gcc
2509 else CC=cc
2510 fi
2511 fi
2512 ;;
ba4481b5
DL
2513 m88k-motorola-sysv4* )
2514 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2515 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2516 # I hope there are not other 4.0 versions for this machine
2517 # which really need usg5-4 instead.
2518 machine=delta88k opsys=usg5-4-2
2519 ;;
2520 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2521 machine=delta88k opsys=usg5-3
2522 ;;
2523
2524 ## Dual machines
2525 m68*-dual-sysv* )
2526 machine=dual opsys=usg5-2
2527 ;;
2528 m68*-dual-uniplus* )
2529 machine=dual opsys=unipl5-2
2530 ;;
2531
2532 ## Elxsi 6400
2533 elxsi-elxsi-sysv* )
2534 machine=elxsi opsys=usg5-2
2535 ;;
2536
2537 ## Encore machines
2538 ns16k-encore-bsd* )
2539 machine=ns16000 opsys=umax
2540 ;;
2541
65171e3a
DL
2542 ## The GEC 63 - apparently, this port isn't really finished yet.
2543 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2544
2545 ## Gould Power Node and NP1
2546 pn-gould-bsd4.2* )
2547 machine=gould opsys=bsd4-2
2548 ;;
2549 pn-gould-bsd4.3* )
2550 machine=gould opsys=bsd4-3
2551 ;;
2552 np1-gould-bsd* )
2553 machine=gould-np1 opsys=bsd4-3
2554 ;;
2555
2556 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2557 ## as far as Emacs is concerned).
2558 m88k-harris-cxux* )
2559 # Build needs to be different on 7.0 and later releases
2560 case "`uname -r`" in
2561 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2562 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2563 esac
2564 NON_GNU_CPP="/lib/cpp"
2565 ;;
2566 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2567 m68k-harris-cxux* )
2568 machine=nh3000 opsys=cxux
2569 ;;
2570 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2571 powerpc-harris-powerunix )
2572 machine=nh6000 opsys=powerunix
2573 NON_GNU_CPP="cc -Xo -E -P"
2574 ;;
6fbb6db1
GM
2575 ## SR2001/SR2201 running HI-UX/MPP
2576 hppa1.1-hitachi-hiuxmpp* )
2577 machine=sr2k opsys=hiuxmpp
2578 ;;
2579 hppa1.1-hitachi-hiuxwe2* )
2580 machine=sr2k opsys=hiuxwe2
2581 ;;
ba4481b5
DL
2582 ## Honeywell XPS100
2583 xps*-honeywell-sysv* )
2584 machine=xps100 opsys=usg5-2
2585 ;;
2586
2587 ## HP 9000 series 200 or 300
2588 m68*-hp-bsd* )
2589 machine=hp9000s300 opsys=bsd4-3
2590 ;;
2591 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2592 m68*-hp-hpux* )
2593 case "`uname -r`" in
2594 ## Someone's system reports A.B8.05 for this.
2595 ## I wonder what other possibilities there are.
2596 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2597 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2598 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2599 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2600 *) machine=hp9000s300 opsys=hpux ;;
2601 esac
2602 ;;
2603
6fbb6db1
GM
2604 ## HP 9000 series 700 and 800, running HP/UX
2605 hppa*-hp-hpux7* )
2606 machine=hp800 opsys=hpux
2607 ;;
2608 hppa*-hp-hpux8* )
2609 machine=hp800 opsys=hpux8
2610 ;;
2611 hppa*-hp-hpux9shr* )
2612 machine=hp800 opsys=hpux9shr
2613 ;;
2614 hppa*-hp-hpux9* )
2615 machine=hp800 opsys=hpux9
2616 ;;
2617 hppa*-hp-hpux10.2* )
2618 machine=hp800 opsys=hpux10-20
2619 ;;
2620 hppa*-hp-hpux10* )
2621 machine=hp800 opsys=hpux10
2622 ;;
2623 hppa*-hp-hpux1[1-9]* )
2624 machine=hp800 opsys=hpux11
2625 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2626 ;;
2627
13aadc96
CY
2628 hppa*-*-linux-gnu* )
2629 machine=hp800 opsys=gnu-linux
2630 ;;
2631
6fbb6db1
GM
2632 ## HP 9000 series 700 and 800, running HP/UX
2633 hppa*-hp-hpux* )
2634 ## Cross-compilation? Nah!
2635 case "`uname -r`" in
2636 ## Someone's system reports A.B8.05 for this.
2637 ## I wonder what other possibilities there are.
2638 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2639 *.08.* ) machine=hp800 opsys=hpux8 ;;
2640 *.09.* ) machine=hp800 opsys=hpux9 ;;
2641 *) machine=hp800 opsys=hpux10 ;;
2642 esac
2643 ;;
13aadc96
CY
2644 hppa*-*-nextstep* )
2645 machine=hp800 opsys=nextstep
2646 ;;
2647
ba4481b5
DL
2648 ## Orion machines
2649 orion-orion-bsd* )
2650 machine=orion opsys=bsd4-2
2651 ;;
2652 clipper-orion-bsd* )
2653 machine=orion105 opsys=bsd4-2
2654 ;;
2655
2656 ## IBM machines
2657 i[3456]86-ibm-aix1.1* )
2658 machine=ibmps2-aix opsys=usg5-2-2
2659 ;;
2660 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2661 machine=ibmps2-aix opsys=usg5-3
2662 ;;
2663 i370-ibm-aix*)
2664 machine=ibm370aix opsys=usg5-3
2665 ;;
55597d70 2666 s390-*-linux-gnu* )
138f0859
GM
2667 machine=ibms390 opsys=gnu-linux
2668 ;;
bcdb1378
EZ
2669 s390x-*-linux-gnu* )
2670 machine=ibms390x opsys=gnu-linux
2671 ;;
ba4481b5
DL
2672 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2673 machine=ibmrs6000 opsys=aix3-1
2674 ;;
2675 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2676 machine=ibmrs6000 opsys=aix3-2-5
2677 ;;
2678 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2679 machine=ibmrs6000 opsys=aix4-1
2680 ;;
2681 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2682 machine=ibmrs6000 opsys=aix4-2
2683 ;;
67bf991b
CY
2684 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2685 machine=ibmrs6000 opsys=aix4-2
2686 ;;
55597d70 2687 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2688 machine=ibmrs6000 opsys=aix4-2
2689 ;;
ba4481b5
DL
2690 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2691 machine=ibmrs6000 opsys=aix4
2692 ;;
2693 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2694 machine=ibmrs6000 opsys=aix4-1
2695 ;;
2696 rs6000-ibm-aix* | powerpc-ibm-aix* )
2697 machine=ibmrs6000 opsys=aix3-2
2698 ;;
2699 romp-ibm-bsd4.3* )
2700 machine=ibmrt opsys=bsd4-3
2701 ;;
2702 romp-ibm-bsd4.2* )
2703 machine=ibmrt opsys=bsd4-2
2704 ;;
2705 romp-ibm-aos4.3* )
2706 machine=ibmrt opsys=bsd4-3
2707 ;;
2708 romp-ibm-aos4.2* )
2709 machine=ibmrt opsys=bsd4-2
2710 ;;
2711 romp-ibm-aos* )
2712 machine=ibmrt opsys=bsd4-3
2713 ;;
2714 romp-ibm-bsd* )
2715 machine=ibmrt opsys=bsd4-3
2716 ;;
2717 romp-ibm-aix* )
2718 machine=ibmrt-aix opsys=usg5-2-2
2719 ;;
2720
2721 ## Integrated Solutions `Optimum V'
2722 m68*-isi-bsd4.2* )
2723 machine=isi-ov opsys=bsd4-2
2724 ;;
2725 m68*-isi-bsd4.3* )
2726 machine=isi-ov opsys=bsd4-3
2727 ;;
2728
2729 ## Intel 386 machines where we do care about the manufacturer
2730 i[3456]86-intsys-sysv* )
2731 machine=is386 opsys=usg5-2-2
2732 ;;
2733
2734 ## Prime EXL
2735 i[3456]86-prime-sysv* )
2736 machine=i386 opsys=usg5-3
2737 ;;
2738
2739 ## Sequent Symmetry running Dynix
2740 i[3456]86-sequent-bsd* )
2741 machine=symmetry opsys=bsd4-3
2742 ;;
2743
2744 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2745 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2746 machine=sequent-ptx opsys=ptx4
2747 NON_GNU_CPP=/lib/cpp
2748 ;;
2749
2750 ## Sequent Symmetry running DYNIX/ptx
2751 ## Use the old cpp rather than the newer ANSI one.
2752 i[3456]86-sequent-ptx* )
2753 machine=sequent-ptx opsys=ptx
2754 NON_GNU_CPP="/lib/cpp"
2755 ;;
2756
2757 ## ncr machine running svr4.3.
2758 i[3456]86-ncr-sysv4.3 )
2759 machine=ncr386 opsys=usg5-4-3
2760 ;;
2761
2762 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2763 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2764 i[3456]86-ncr-sysv* )
2765 machine=ncr386 opsys=usg5-4-2
2766 ;;
2767
2768 ## Intel Paragon OSF/1
2769 i860-intel-osf1* )
2770 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2771 ;;
2772
2773 ## Intel 860
2774 i860-*-sysv4* )
2775 machine=i860 opsys=usg5-4
2776 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2777 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2778 ;;
2779
c76e04a8
GM
2780 ## Macintosh PowerPC
2781 powerpc*-*-linux-gnu* )
2782 machine=macppc opsys=gnu-linux
2783 ;;
2784
ba4481b5
DL
2785 ## Masscomp machines
2786 m68*-masscomp-rtu* )
2787 machine=masscomp opsys=rtu
2788 ;;
2789
2790 ## Megatest machines
2791 m68*-megatest-bsd* )
2792 machine=mega68 opsys=bsd4-2
2793 ;;
2794
2795 ## Workstations sold by MIPS
2796 ## This is not necessarily all workstations using the MIPS processor -
2797 ## Irises are produced by SGI, and DECstations by DEC.
2798
2799 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2800 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2801 ## it gives for choosing between the alternatives seems to be "Use
2802 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2803 ## the BSD world." I'll assume that these are instructions for
2804 ## handling two odd situations, and that every other situation
2805 ## should use mips.h and usg5-2-2, they being listed first.
2806 mips-mips-usg* )
2807 machine=mips4
2808 ## Fall through to the general code at the bottom to decide on the OS.
2809 ;;
2810 mips-mips-riscos4* )
2811 machine=mips4 opsys=bsd4-3
2812 NON_GNU_CC="cc -systype bsd43"
2813 NON_GNU_CPP="cc -systype bsd43 -E"
2814 ;;
2815 mips-mips-riscos5* )
2816 machine=mips4 opsys=riscos5
2817 NON_GNU_CC="cc -systype bsd43"
2818 NON_GNU_CPP="cc -systype bsd43 -E"
2819 ;;
2820 mips-mips-bsd* )
2821 machine=mips opsys=bsd4-3
2822 ;;
2823 mips-mips-* )
2824 machine=mips opsys=usg5-2-2
2825 ;;
2826
2827 ## NeXT
2828 m68*-next-* | m68k-*-nextstep* )
2829 machine=m68k opsys=nextstep
2830 ;;
2831
2832 ## The complete machine from National Semiconductor
2833 ns32k-ns-genix* )
2834 machine=ns32000 opsys=usg5-2
2835 ;;
2836
2837 ## NCR machines
2838 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2839 machine=tower32 opsys=usg5-2-2
2840 ;;
2841 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2842 machine=tower32v3 opsys=usg5-3
2843 ;;
2844
2845 ## NEC EWS4800
2846 mips-nec-sysv4*)
2847 machine=ews4800 opsys=ux4800
2848 ;;
2849
2850 ## Nixdorf Targon 31
2851 m68*-nixdorf-sysv* )
2852 machine=targon31 opsys=usg5-2-2
2853 ;;
2854
2855 ## Nu (TI or LMI)
2856 m68*-nu-sysv* )
2857 machine=nu opsys=usg5-2
2858 ;;
2859
2860 ## Plexus
2861 m68*-plexus-sysv* )
2862 machine=plexus opsys=usg5-2
2863 ;;
2864
ba4481b5
DL
2865 ## Pyramid machines
2866 ## I don't really have any idea what sort of processor the Pyramid has,
2867 ## so I'm assuming it is its own architecture.
2868 pyramid-pyramid-bsd* )
2869 machine=pyramid opsys=bsd4-2
2870 ;;
2871
2872 ## Sequent Balance
2873 ns32k-sequent-bsd4.2* )
2874 machine=sequent opsys=bsd4-2
2875 ;;
2876 ns32k-sequent-bsd4.3* )
2877 machine=sequent opsys=bsd4-3
2878 ;;
2879
2880 ## Siemens Nixdorf
2881 mips-siemens-sysv* | mips-sni-sysv*)
2882 machine=mips-siemens opsys=usg5-4
2883 NON_GNU_CC=/usr/ccs/bin/cc
2884 NON_GNU_CPP=/usr/ccs/lib/cpp
2885 ;;
2886
2887 ## Silicon Graphics machines
2888 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2889 m68*-sgi-iris3.5* )
2890 machine=irist opsys=iris3-5
2891 ;;
2892 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2893 machine=irist opsys=iris3-6
2894 ;;
2895 ## Iris 4D
2896 mips-sgi-irix3* )
2897 machine=iris4d opsys=irix3-3
2898 ;;
2899 mips-sgi-irix4* )
2900 machine=iris4d opsys=irix4-0
2901 ;;
2902 mips-sgi-irix6.5 )
2903 machine=iris4d opsys=irix6-5
946173ad
DL
2904 # Without defining _LANGUAGE_C, things get masked out in the headers
2905 # so that, for instance, grepping for `free' in stdlib.h fails and
2906 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2907 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2908 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2909 ;;
2910 mips-sgi-irix6* )
2911 machine=iris4d opsys=irix6-0
c4bb2108 2912 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2913 # but presumably it does no harm.
2914 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2915 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2916 NON_GCC_TEST_OPTIONS=-32
2917 ;;
2918 mips-sgi-irix5.[01]* )
2919 machine=iris4d opsys=irix5-0
2920 ;;
2921 mips-sgi-irix5* | mips-sgi-irix* )
2922 machine=iris4d opsys=irix5-2
2923 ;;
2924
2925 ## SONY machines
2926 m68*-sony-bsd4.2* )
2927 machine=news opsys=bsd4-2
2928 ;;
2929 m68*-sony-bsd4.3* )
2930 machine=news opsys=bsd4-3
2931 ;;
2932 m68*-sony-newsos3* | m68*-sony-news3*)
2933 machine=news opsys=bsd4-3
2934 ;;
2935 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2936 machine=news-risc opsys=bsd4-3
2937 ;;
2938 mips-sony-newsos6* )
2939 machine=news-r6 opsys=newsos6
2940 ;;
2941 mips-sony-news* )
2942 machine=news-risc opsys=newsos5
2943 ;;
2944
2945 ## Stride
2946 m68*-stride-sysv* )
2947 machine=stride opsys=usg5-2
2948 ;;
2949
2950 ## Suns
2951 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2952 machine=sparc opsys=gnu-linux
2953 ;;
2954
d054101f 2955 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2956 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2957 | rs6000-*-solaris2*)
2958 case "${canonical}" in
2959 m68*-sunos1* ) machine=sun1 ;;
2960 m68*-sunos2* ) machine=sun2 ;;
2961 m68* ) machine=sun3 ;;
2962 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2963 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2964 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2965 powerpcle* ) machine=powerpcle ;;
2966 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2967 sparc* ) machine=sparc ;;
2968 * ) unported=yes ;;
2969 esac
2970 case "${canonical}" in
2971 ## The Sun386 didn't get past 4.0.
2972 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2973 *-sunos4.0* ) opsys=sunos4-0 ;;
2974 *-sunos4.1.[3-9]*noshare )
2975 ## This name is sunos413 instead of sunos4-1-3
2976 ## to avoid a file name conflict on MSDOS.
2977 opsys=sunos413
2978 NON_GNU_CPP=/usr/lib/cpp
2979 NON_GCC_TEST_OPTIONS=-Bstatic
2980 GCC_TEST_OPTIONS=-static
2981 ;;
2982 *-sunos4.1.[3-9]* | *-sunos4shr*)
2983 opsys=sunos4shr
2984 NON_GNU_CPP=/usr/lib/cpp
2985 ;;
2986 *-sunos4* | *-sunos )
2987 opsys=sunos4-1
2988 NON_GCC_TEST_OPTIONS=-Bstatic
2989 GCC_TEST_OPTIONS=-static
2990 ;;
2991 *-sunos5.3* | *-solaris2.3* )
2992 opsys=sol2-3
2993 NON_GNU_CPP=/usr/ccs/lib/cpp
2994 ;;
2995 *-sunos5.4* | *-solaris2.4* )
2996 opsys=sol2-4
2997 NON_GNU_CPP=/usr/ccs/lib/cpp
2998 RANLIB="ar -ts"
2999 ;;
3000 *-sunos5.5* | *-solaris2.5* )
3001 opsys=sol2-5
3002 NON_GNU_CPP=/usr/ccs/lib/cpp
3003 RANLIB="ar -ts"
3004 ;;
8e967cf7
MR
3005 *-sunos5.6* | *-solaris2.6* )
3006 opsys=sol2-6
3007 NON_GNU_CPP=/usr/ccs/lib/cpp
3008 RANLIB="ar -ts"
3009 ;;
ba4481b5 3010 *-sunos5* | *-solaris* )
9e71690e 3011 opsys=sol2-6
3685ba3f
CY
3012## FIXME: make this into a proper fix that checks the compiler type,
3013## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now?
d23b7a3f
GM
3014 if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then
3015 ## -Xs prevents spurious whitespace.
3016 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs"
3017 else
3018 NON_GNU_CPP=/usr/ccs/lib/cpp
3019 fi
ba4481b5
DL
3020 ;;
3021 * ) opsys=bsd4-2 ;;
3022 esac
3023 ## Watch out for a compiler that we know will not work.
3024 case "${canonical}" in
3025 *-solaris* | *-sunos5* )
3026 if [ "x$CC" = x/usr/ucb/cc ]; then
3027 ## /usr/ucb/cc doesn't work;
3028 ## we should find some other compiler that does work.
3029 unset CC
3030 fi
3031 ;;
3032 *) ;;
3033 esac
3034 ;;
3035 sparc-*-nextstep* )
3036 machine=sparc opsys=nextstep
3037 ;;
3038
3039 ## Tadpole 68k
3040 m68*-tadpole-sysv* )
3041 machine=tad68k opsys=usg5-3
3042 ;;
3043
3044 ## Tahoe machines
3045 tahoe-tahoe-bsd4.2* )
3046 machine=tahoe opsys=bsd4-2
3047 ;;
3048 tahoe-tahoe-bsd4.3* )
3049 machine=tahoe opsys=bsd4-3
3050 ;;
3051
3052 ## Tandem Integrity S2
3053 mips-tandem-sysv* )
3054 machine=tandem-s2 opsys=usg5-3
3055 ;;
3056
3057 ## Tektronix XD88
3058 m88k-tektronix-sysv3* )
3059 machine=tekxd88 opsys=usg5-3
3060 ;;
3061
3062 ## Tektronix 16000 box (6130?)
3063 ns16k-tektronix-bsd* )
3064 machine=ns16000 opsys=bsd4-2
3065 ;;
3066 ## Tektronix 4300
3067 ## src/m/tek4300.h hints that this is a m68k machine.
3068 m68*-tektronix-bsd* )
3069 machine=tek4300 opsys=bsd4-3
3070 ;;
3071
3072 ## Titan P2 or P3
3073 ## We seem to have lost the machine-description file titan.h!
3074 titan-titan-sysv* )
3075 machine=titan opsys=usg5-3
3076 ;;
3077
3078 ## Ustation E30 (SS5E)
3079 m68*-unisys-uniplus* )
3080 machine=ustation opsystem=unipl5-2
3081 ;;
3082
3083 ## Vaxen.
3084 vax-dec-* )
3085 machine=vax
3086 case "${canonical}" in
3087 *-bsd4.1* ) opsys=bsd4-1 ;;
3088 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3089 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3090 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3091 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3092 *-vms* ) opsys=vms ;;
3093 * ) unported=yes
3094 esac
3095 ;;
3096
3097 ## Whitechapel MG1
3098 ns16k-whitechapel-* )
3099 machine=mg1
3100 ## We don't know what sort of OS runs on these; we'll let the
3101 ## operating system guessing code below try.
3102 ;;
3103
3104 ## Wicat
3105 m68*-wicat-sysv* )
3106 machine=wicat opsys=usg5-2
3107 ;;
3108
f4988be7
GM
3109 ## IA-64
3110 ia64*-*-linux* )
3111 machine=ia64 opsys=gnu-linux
3112 ;;
3113
ba4481b5
DL
3114 ## Intel 386 machines where we don't care about the manufacturer
3115 i[3456]86-*-* )
3116 machine=intel386
3117 case "${canonical}" in
c60ee5e7 3118 *-cygwin ) opsys=cygwin ;;
eae54018 3119 *-darwin* ) opsys=darwin
23fd4483
ST
3120 CPP="${CC-cc} -E -no-cpp-precomp"
3121 ;;
ba4481b5
DL
3122 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3123 *-isc2.2* ) opsys=isc2-2 ;;
3124 *-isc4.0* ) opsys=isc4-0 ;;
3125 *-isc4.* ) opsys=isc4-1
3126 GCC_TEST_OPTIONS=-posix
3127 NON_GCC_TEST_OPTIONS=-Xp
3128 ;;
3129 *-isc* ) opsys=isc3-0 ;;
3130 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3131 *-esix* ) opsys=esix ;;
3132 *-xenix* ) opsys=xenix ;;
3133 *-linux-gnu* ) opsys=gnu-linux ;;
3134 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3135 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3136 NON_GNU_CPP=/lib/cpp
3137 # Prevent -belf from being passed to $CPP.
3138 # /lib/cpp does not accept it.
3139 OVERRIDE_CPPFLAGS=" "
3140 ;;
3141 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3142 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3143 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3144 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3145 *-nextstep* ) opsys=nextstep ;;
3146 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3147 esac
3148 ;;
3149
3150 ## m68k Linux-based GNU system
3151 m68k-*-linux-gnu* )
3152 machine=m68k opsys=gnu-linux
3153 ;;
3154
3155 ## Mips Linux-based GNU system
cd958eb3 3156 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3157 machine=mips opsys=gnu-linux
3158 ;;
3159
3160 ## UXP/DS
3161 sparc-fujitsu-sysv4* )
3162 machine=sparc opsys=uxpds
3163 NON_GNU_CPP=/usr/ccs/lib/cpp
3164 RANLIB="ar -ts"
3165 ;;
3166
3167 ## UXP/V
3168 f301-fujitsu-uxpv4.1)
3169 machine=f301 opsys=uxpv
3170 ;;
3171
598a2813
AS
3172 ## AMD x86-64 Linux-based GNU system
3173 x86_64-*-linux-gnu* )
24b01ec4 3174 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3175 ;;
3176
94218e27 3177 ## Tensilica Xtensa Linux-based GNU system
7cc04609 3178 xtensa*-*-linux-* )
94218e27
DN
3179 machine=xtensa opsys=gnu-linux
3180 ;;
3181
ba4481b5
DL
3182 * )
3183 unported=yes
3184 ;;
3185esac
3186
3187### If the code above didn't choose an operating system, just choose
3188### an operating system based on the configuration name. You really
3189### only want to use this when you have no idea what the right
3190### operating system is; if you know what operating systems a machine
3191### runs, it's cleaner to make it explicit in the case statement
3192### above.
3193if test x"${opsys}" = x; then
3194 case "${canonical}" in
3195 *-gnu* ) opsys=gnu ;;
3196 *-bsd4.[01] ) opsys=bsd4-1 ;;
3197 *-bsd4.2 ) opsys=bsd4-2 ;;
3198 *-bsd4.3 ) opsys=bsd4-3 ;;
3199 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3200 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3201 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3202 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3203 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3204 *-sysv5uw* ) opsys=unixware ;;
3205 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3206 *-sysv4.1* | *-sysvr4.1* )
3207 NON_GNU_CPP=/usr/lib/cpp
3208 opsys=usg5-4 ;;
3209 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3210 if [ x$NON_GNU_CPP = x ]; then
3211 if [ -f /usr/ccs/lib/cpp ]; then
3212 NON_GNU_CPP=/usr/ccs/lib/cpp
3213 else
3214 NON_GNU_CPP=/lib/cpp
3215 fi
3216 fi
3217 opsys=usg5-4-2 ;;
3218 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3219 * )
3220 unported=yes
3221 ;;
3222 esac
3223fi
3224
1d202fc4
DN
3225### Tests for sytems that we beleive are obsolete and should be desupported.
3226
3227case "${machine}" in
3228 pmax | hp9000s300 | ibm370aix | ncr386 | ews4800 | mips-siemens | powerpcle | tandem-s2 )
3229 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
3230 echo "and it is planned to be desupported in the next version of Emacs"
3231 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
3232 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
3233 echo "exit 33 line. After that you can run configure again and 'complete' the build."
3234 exit 33
3235 ;;
3236esac
3237
3238case "${opsys}" in
dbdbca09 3239 bsd386 | bsdos2-1 | bsdos2 | bsdos3 | bsdos4 | bsd4-1 | bsd4-2 | bsd4-3 | usg5-0 | usg5-2-2 | usg5-2 | usg5-3 | ultrix4-3 | 386bsd | hpux | hpux8 | hpux9 | hpux9shr | hpux10 | aix3-1 | aix3-2-5 | aix3-2 | aix4-1 | nextstep | ux4800 | uxpds | uxpv )
1d202fc4
DN
3240 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
3241 echo "and it is planned to be desupported in the next version of Emacs"
3242 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
3243 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
3244 echo "'exit 44' line. After that you can run 'configure' again and complete the build."
3245 exit 44
3246 ;;
3247esac
3248
c0d27fcc 3249
22044edf 3250
ba4481b5 3251if test $unported = yes; then
c0d27fcc 3252 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3253Check \`etc/MACHINES' for recognized configuration names." >&5
3254echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3255Check \`etc/MACHINES' for recognized configuration names." >&2;}
3256 { (exit 1); exit 1; }; }
ba4481b5
DL
3257fi
3258
3259machfile="m/${machine}.h"
3260opsysfile="s/${opsys}.h"
3261
c0d27fcc 3262
ba4481b5
DL
3263#### Choose a compiler.
3264test -n "$CC" && cc_specified=yes
3265
3266# Save the value of CFLAGS that the user specified.
3267SPECIFIED_CFLAGS="$CFLAGS"
3268
3269case ${with_gcc} in
3270 "yes" ) CC="gcc" GCC=yes ;;
3271 "no" ) : ${CC=cc} ;;
503d2be0
AS
3272 * )
3273esac
3274ac_ext=c
3275ac_cpp='$CPP $CPPFLAGS'
3276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3278ac_compiler_gnu=$ac_cv_c_compiler_gnu
3279if test -n "$ac_tool_prefix"; then
3280 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3281set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3284if test "${ac_cv_prog_CC+set}" = set; then
3285 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3286else
3287 if test -n "$CC"; then
3288 ac_cv_prog_CC="$CC" # Let the user override the test.
3289else
c0d27fcc
MR
3290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3291for as_dir in $PATH
3292do
3293 IFS=$as_save_IFS
3294 test -z "$as_dir" && as_dir=.
3295 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3297 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3299 break 2
3300 fi
3301done
503d2be0 3302done
ca81d7a0 3303IFS=$as_save_IFS
503d2be0 3304
ba4481b5
DL
3305fi
3306fi
503d2be0 3307CC=$ac_cv_prog_CC
ba4481b5 3308if test -n "$CC"; then
ca81d7a0
JD
3309 { echo "$as_me:$LINENO: result: $CC" >&5
3310echo "${ECHO_T}$CC" >&6; }
503d2be0 3311else
ca81d7a0
JD
3312 { echo "$as_me:$LINENO: result: no" >&5
3313echo "${ECHO_T}no" >&6; }
503d2be0
AS
3314fi
3315
ca81d7a0 3316
503d2be0
AS
3317fi
3318if test -z "$ac_cv_prog_CC"; then
3319 ac_ct_CC=$CC
3320 # Extract the first word of "gcc", so it can be a program name with args.
3321set dummy gcc; ac_word=$2
ca81d7a0
JD
3322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3324if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
3326else
3327 if test -n "$ac_ct_CC"; then
3328 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3329else
c0d27fcc
MR
3330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3337 ac_cv_prog_ac_ct_CC="gcc"
3338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3339 break 2
3340 fi
3341done
503d2be0 3342done
ca81d7a0 3343IFS=$as_save_IFS
503d2be0
AS
3344
3345fi
3346fi
3347ac_ct_CC=$ac_cv_prog_ac_ct_CC
3348if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3349 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3350echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3351else
ca81d7a0
JD
3352 { echo "$as_me:$LINENO: result: no" >&5
3353echo "${ECHO_T}no" >&6; }
503d2be0
AS
3354fi
3355
ca81d7a0
JD
3356 if test "x$ac_ct_CC" = x; then
3357 CC=""
3358 else
3359 case $cross_compiling:$ac_tool_warned in
3360yes:)
3361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3362whose name does not start with the host triplet. If you think this
3363configuration is useful to you, please write to autoconf@gnu.org." >&5
3364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3365whose name does not start with the host triplet. If you think this
3366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3367ac_tool_warned=yes ;;
3368esac
3369 CC=$ac_ct_CC
3370 fi
503d2be0
AS
3371else
3372 CC="$ac_cv_prog_CC"
ba4481b5
DL
3373fi
3374
3375if test -z "$CC"; then
ca81d7a0
JD
3376 if test -n "$ac_tool_prefix"; then
3377 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3378set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3381if test "${ac_cv_prog_CC+set}" = set; then
3382 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3383else
3384 if test -n "$CC"; then
3385 ac_cv_prog_CC="$CC" # Let the user override the test.
3386else
c0d27fcc
MR
3387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
3392 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3393 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3394 ac_cv_prog_CC="${ac_tool_prefix}cc"
3395 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3396 break 2
3397 fi
3398done
503d2be0 3399done
ca81d7a0 3400IFS=$as_save_IFS
503d2be0
AS
3401
3402fi
3403fi
3404CC=$ac_cv_prog_CC
3405if test -n "$CC"; then
ca81d7a0
JD
3406 { echo "$as_me:$LINENO: result: $CC" >&5
3407echo "${ECHO_T}$CC" >&6; }
4b411bfe 3408else
ca81d7a0
JD
3409 { echo "$as_me:$LINENO: result: no" >&5
3410echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3411fi
3412
4b411bfe 3413
ca81d7a0 3414 fi
503d2be0
AS
3415fi
3416if test -z "$CC"; then
3417 # Extract the first word of "cc", so it can be a program name with args.
3418set dummy cc; ac_word=$2
ca81d7a0
JD
3419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3421if test "${ac_cv_prog_CC+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
3423else
3424 if test -n "$CC"; then
3425 ac_cv_prog_CC="$CC" # Let the user override the test.
3426else
3427 ac_prog_rejected=no
c0d27fcc
MR
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
3433 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3434 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3435 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3436 ac_prog_rejected=yes
3437 continue
3438 fi
3439 ac_cv_prog_CC="cc"
3440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3441 break 2
3442 fi
3443done
503d2be0 3444done
ca81d7a0 3445IFS=$as_save_IFS
503d2be0 3446
ba4481b5
DL
3447if test $ac_prog_rejected = yes; then
3448 # We found a bogon in the path, so make sure we never use it.
3449 set dummy $ac_cv_prog_CC
3450 shift
503d2be0 3451 if test $# != 0; then
ba4481b5
DL
3452 # We chose a different compiler from the bogus one.
3453 # However, it has the same basename, so the bogon will be chosen
3454 # first if we set CC to just the basename; use the full file name.
3455 shift
6bae0ccf 3456 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3457 fi
3458fi
3459fi
3460fi
503d2be0 3461CC=$ac_cv_prog_CC
ba4481b5 3462if test -n "$CC"; then
ca81d7a0
JD
3463 { echo "$as_me:$LINENO: result: $CC" >&5
3464echo "${ECHO_T}$CC" >&6; }
ba4481b5 3465else
ca81d7a0
JD
3466 { echo "$as_me:$LINENO: result: no" >&5
3467echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3468fi
3469
ca81d7a0 3470
503d2be0
AS
3471fi
3472if test -z "$CC"; then
3473 if test -n "$ac_tool_prefix"; then
ca81d7a0 3474 for ac_prog in cl.exe
503d2be0
AS
3475 do
3476 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3477set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3480if test "${ac_cv_prog_CC+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3482else
3483 if test -n "$CC"; then
3484 ac_cv_prog_CC="$CC" # Let the user override the test.
3485else
c0d27fcc
MR
3486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3487for as_dir in $PATH
3488do
3489 IFS=$as_save_IFS
3490 test -z "$as_dir" && as_dir=.
3491 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3493 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3495 break 2
3496 fi
3497done
503d2be0 3498done
ca81d7a0 3499IFS=$as_save_IFS
503d2be0 3500
c4bb2108
DL
3501fi
3502fi
503d2be0 3503CC=$ac_cv_prog_CC
c4bb2108 3504if test -n "$CC"; then
ca81d7a0
JD
3505 { echo "$as_me:$LINENO: result: $CC" >&5
3506echo "${ECHO_T}$CC" >&6; }
c4bb2108 3507else
ca81d7a0
JD
3508 { echo "$as_me:$LINENO: result: no" >&5
3509echo "${ECHO_T}no" >&6; }
503d2be0
AS
3510fi
3511
ca81d7a0 3512
503d2be0
AS
3513 test -n "$CC" && break
3514 done
3515fi
3516if test -z "$CC"; then
3517 ac_ct_CC=$CC
ca81d7a0 3518 for ac_prog in cl.exe
503d2be0
AS
3519do
3520 # Extract the first word of "$ac_prog", so it can be a program name with args.
3521set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3522{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3523echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3524if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3525 echo $ECHO_N "(cached) $ECHO_C" >&6
3526else
3527 if test -n "$ac_ct_CC"; then
3528 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3529else
c0d27fcc
MR
3530as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3531for as_dir in $PATH
3532do
3533 IFS=$as_save_IFS
3534 test -z "$as_dir" && as_dir=.
3535 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3537 ac_cv_prog_ac_ct_CC="$ac_prog"
3538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3539 break 2
3540 fi
3541done
503d2be0 3542done
ca81d7a0 3543IFS=$as_save_IFS
503d2be0 3544
c4bb2108 3545fi
503d2be0
AS
3546fi
3547ac_ct_CC=$ac_cv_prog_ac_ct_CC
3548if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3549 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3550echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3551else
ca81d7a0
JD
3552 { echo "$as_me:$LINENO: result: no" >&5
3553echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3554fi
3555
ca81d7a0 3556
503d2be0
AS
3557 test -n "$ac_ct_CC" && break
3558done
ba4481b5 3559
ca81d7a0
JD
3560 if test "x$ac_ct_CC" = x; then
3561 CC=""
3562 else
3563 case $cross_compiling:$ac_tool_warned in
3564yes:)
3565{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3566whose name does not start with the host triplet. If you think this
3567configuration is useful to you, please write to autoconf@gnu.org." >&5
3568echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3569whose name does not start with the host triplet. If you think this
3570configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3571ac_tool_warned=yes ;;
3572esac
3573 CC=$ac_ct_CC
3574 fi
503d2be0
AS
3575fi
3576
3577fi
ba4481b5 3578
c0d27fcc 3579
19650fd6
AS
3580test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3581See \`config.log' for more details." >&5
3582echo "$as_me: error: no acceptable C compiler found in \$PATH
3583See \`config.log' for more details." >&2;}
503d2be0 3584 { (exit 1); exit 1; }; }
c4bb2108 3585
503d2be0 3586# Provide some information about the compiler.
ca81d7a0 3587echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3588ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3589{ (ac_try="$ac_compiler --version >&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 --version >&5") 2>&5
503d2be0 3596 ac_status=$?
c0d27fcc 3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3598 (exit $ac_status); }
ca81d7a0
JD
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 3608 (exit $ac_status); }
ca81d7a0
JD
3609{ (ac_try="$ac_compiler -V >&5"
3610case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
3614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3615 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3616 ac_status=$?
c0d27fcc 3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3618 (exit $ac_status); }
3619
3620cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3621/* confdefs.h. */
3622_ACEOF
3623cat confdefs.h >>conftest.$ac_ext
3624cat >>conftest.$ac_ext <<_ACEOF
3625/* end confdefs.h. */
c4bb2108 3626
503d2be0
AS
3627int
3628main ()
3629{
3630
3631 ;
3632 return 0;
3633}
3634_ACEOF
3635ac_clean_files_save=$ac_clean_files
19650fd6 3636ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3637# Try to create an executable without -o first, disregard a.out.
3638# It will help us diagnose broken compilers, and finding out an intuition
3639# of exeext.
ca81d7a0
JD
3640{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3641echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3642ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3643#
3644# List of possible output files, starting from the most likely.
3645# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3646# only as a last resort. b.out is created by i960 compilers.
3647ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3648#
3649# The IRIX 6 linker writes into existing files which may not be
3650# executable, retaining their permissions. Remove them first so a
3651# subsequent execution test works.
3652ac_rmfiles=
3653for ac_file in $ac_files
3654do
3655 case $ac_file in
3656 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3657 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3658 esac
3659done
3660rm -f $ac_rmfiles
3661
3662if { (ac_try="$ac_link_default"
3663case "(($ac_try" in
3664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3665 *) ac_try_echo=$ac_try;;
3666esac
3667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3668 (eval "$ac_link_default") 2>&5
503d2be0 3669 ac_status=$?
c0d27fcc 3670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3671 (exit $ac_status); }; then
ca81d7a0
JD
3672 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3673# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3674# in a Makefile. We should not override ac_cv_exeext if it was cached,
3675# so that the user can short-circuit this test for compilers unknown to
3676# Autoconf.
f053c89f 3677for ac_file in $ac_files ''
19650fd6 3678do
6bae0ccf 3679 test -f "$ac_file" || continue
503d2be0 3680 case $ac_file in
ca81d7a0 3681 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3682 ;;
19650fd6 3683 [ab].out )
edfaf76d
LK
3684 # We found the default executable, but exeext='' is most
3685 # certainly right.
3686 break;;
19650fd6 3687 *.* )
ca81d7a0
JD
3688 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3689 then :; else
3690 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3691 fi
3692 # We set ac_cv_exeext here because the later test for it is not
3693 # safe: cross compilers may not add the suffix if given an `-o'
3694 # argument, so we may need to know it at that point already.
3695 # Even if this section looks crufty: it has the advantage of
3696 # actually working.
edfaf76d 3697 break;;
19650fd6 3698 * )
edfaf76d 3699 break;;
503d2be0
AS
3700 esac
3701done
ca81d7a0
JD
3702test "$ac_cv_exeext" = no && ac_cv_exeext=
3703
503d2be0 3704else
f053c89f
CY
3705 ac_file=''
3706fi
3707
3708{ echo "$as_me:$LINENO: result: $ac_file" >&5
3709echo "${ECHO_T}$ac_file" >&6; }
3710if test -z "$ac_file"; then
503d2be0 3711 echo "$as_me: failed program was:" >&5
19650fd6
AS
3712sed 's/^/| /' conftest.$ac_ext >&5
3713
6bae0ccf 3714{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3715See \`config.log' for more details." >&5
6bae0ccf 3716echo "$as_me: error: C compiler cannot create executables
19650fd6 3717See \`config.log' for more details." >&2;}
503d2be0
AS
3718 { (exit 77); exit 77; }; }
3719fi
3720
3721ac_exeext=$ac_cv_exeext
503d2be0 3722
ca81d7a0 3723# Check that the compiler produces executables we can run. If not, either
503d2be0 3724# the compiler is broken, or we cross compile.
ca81d7a0
JD
3725{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3726echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3727# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3728# If not cross compiling, check that we can run a simple program.
3729if test "$cross_compiling" != yes; then
3730 if { ac_try='./$ac_file'
ca81d7a0
JD
3731 { (case "(($ac_try" in
3732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3733 *) ac_try_echo=$ac_try;;
3734esac
3735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3736 (eval "$ac_try") 2>&5
503d2be0 3737 ac_status=$?
c0d27fcc 3738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3739 (exit $ac_status); }; }; then
3740 cross_compiling=no
ba4481b5 3741 else
503d2be0
AS
3742 if test "$cross_compiling" = maybe; then
3743 cross_compiling=yes
3744 else
c0d27fcc 3745 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3746If you meant to cross compile, use \`--host'.
3747See \`config.log' for more details." >&5
503d2be0 3748echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3749If you meant to cross compile, use \`--host'.
3750See \`config.log' for more details." >&2;}
503d2be0
AS
3751 { (exit 1); exit 1; }; }
3752 fi
ba4481b5 3753 fi
503d2be0 3754fi
ca81d7a0
JD
3755{ echo "$as_me:$LINENO: result: yes" >&5
3756echo "${ECHO_T}yes" >&6; }
503d2be0 3757
19650fd6 3758rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3759ac_clean_files=$ac_clean_files_save
ca81d7a0 3760# Check that the compiler produces executables we can run. If not, either
503d2be0 3761# the compiler is broken, or we cross compile.
ca81d7a0
JD
3762{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3763echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3764{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3765echo "${ECHO_T}$cross_compiling" >&6; }
3766
3767{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3768echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3769if { (ac_try="$ac_link"
3770case "(($ac_try" in
3771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3772 *) ac_try_echo=$ac_try;;
3773esac
3774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3775 (eval "$ac_link") 2>&5
503d2be0 3776 ac_status=$?
c0d27fcc 3777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3778 (exit $ac_status); }; then
3779 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3780# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3781# work properly (i.e., refer to `conftest.exe'), while it won't with
3782# `rm'.
6bae0ccf
DL
3783for ac_file in conftest.exe conftest conftest.*; do
3784 test -f "$ac_file" || continue
503d2be0 3785 case $ac_file in
ca81d7a0 3786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3787 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3788 break;;
503d2be0
AS
3789 * ) break;;
3790 esac
3791done
ba4481b5 3792else
19650fd6
AS
3793 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3794See \`config.log' for more details." >&5
3795echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3796See \`config.log' for more details." >&2;}
503d2be0 3797 { (exit 1); exit 1; }; }
ba4481b5 3798fi
ba4481b5 3799
503d2be0 3800rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3801{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3802echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3803
503d2be0
AS
3804rm -f conftest.$ac_ext
3805EXEEXT=$ac_cv_exeext
3806ac_exeext=$EXEEXT
ca81d7a0
JD
3807{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3808echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3809if test "${ac_cv_objext+set}" = set; then
3810 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3811else
503d2be0 3812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3813/* confdefs.h. */
3814_ACEOF
3815cat confdefs.h >>conftest.$ac_ext
3816cat >>conftest.$ac_ext <<_ACEOF
3817/* end confdefs.h. */
ba4481b5 3818
503d2be0
AS
3819int
3820main ()
3821{
ba4481b5 3822
503d2be0
AS
3823 ;
3824 return 0;
3825}
3826_ACEOF
3827rm -f conftest.o conftest.obj
ca81d7a0
JD
3828if { (ac_try="$ac_compile"
3829case "(($ac_try" in
3830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3831 *) ac_try_echo=$ac_try;;
3832esac
3833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3834 (eval "$ac_compile") 2>&5
503d2be0 3835 ac_status=$?
c0d27fcc 3836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3837 (exit $ac_status); }; then
ca81d7a0
JD
3838 for ac_file in conftest.o conftest.obj conftest.*; do
3839 test -f "$ac_file" || continue;
503d2be0 3840 case $ac_file in
ca81d7a0 3841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3842 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3843 break;;
3844 esac
3845done
c4bb2108 3846else
503d2be0 3847 echo "$as_me: failed program was:" >&5
19650fd6
AS
3848sed 's/^/| /' conftest.$ac_ext >&5
3849
3850{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3851See \`config.log' for more details." >&5
3852echo "$as_me: error: cannot compute suffix of object files: cannot compile
3853See \`config.log' for more details." >&2;}
503d2be0 3854 { (exit 1); exit 1; }; }
c4bb2108
DL
3855fi
3856
503d2be0
AS
3857rm -f conftest.$ac_cv_objext conftest.$ac_ext
3858fi
ca81d7a0
JD
3859{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3860echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3861OBJEXT=$ac_cv_objext
3862ac_objext=$OBJEXT
ca81d7a0
JD
3863{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3864echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3865if test "${ac_cv_c_compiler_gnu+set}" = set; then
3866 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3867else
503d2be0 3868 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3869/* confdefs.h. */
3870_ACEOF
3871cat confdefs.h >>conftest.$ac_ext
3872cat >>conftest.$ac_ext <<_ACEOF
3873/* end confdefs.h. */
503d2be0
AS
3874
3875int
3876main ()
3877{
3878#ifndef __GNUC__
3879 choke me
3880#endif
3881
3882 ;
3883 return 0;
3884}
3885_ACEOF
3886rm -f conftest.$ac_objext
ca81d7a0
JD
3887if { (ac_try="$ac_compile"
3888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
3892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3893 (eval "$ac_compile") 2>conftest.er1
503d2be0 3894 ac_status=$?
edfaf76d
LK
3895 grep -v '^ *+' conftest.er1 >conftest.err
3896 rm -f conftest.er1
3897 cat conftest.err >&5
c0d27fcc 3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3899 (exit $ac_status); } && {
3900 test -z "$ac_c_werror_flag" ||
3901 test ! -s conftest.err
3902 } && test -s conftest.$ac_objext; then
503d2be0
AS
3903 ac_compiler_gnu=yes
3904else
3905 echo "$as_me: failed program was:" >&5
19650fd6
AS
3906sed 's/^/| /' conftest.$ac_ext >&5
3907
ca81d7a0 3908 ac_compiler_gnu=no
503d2be0 3909fi
ca81d7a0
JD
3910
3911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3912ac_cv_c_compiler_gnu=$ac_compiler_gnu
3913
3914fi
ca81d7a0
JD
3915{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3916echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3917GCC=`test $ac_compiler_gnu = yes && echo yes`
3918ac_test_CFLAGS=${CFLAGS+set}
3919ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3920{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3921echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3922if test "${ac_cv_prog_cc_g+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
3924else
ca81d7a0
JD
3925 ac_save_c_werror_flag=$ac_c_werror_flag
3926 ac_c_werror_flag=yes
3927 ac_cv_prog_cc_g=no
3928 CFLAGS="-g"
3929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3930/* confdefs.h. */
3931_ACEOF
3932cat confdefs.h >>conftest.$ac_ext
3933cat >>conftest.$ac_ext <<_ACEOF
3934/* end confdefs.h. */
503d2be0
AS
3935
3936int
3937main ()
3938{
3939
3940 ;
3941 return 0;
3942}
3943_ACEOF
3944rm -f conftest.$ac_objext
ca81d7a0
JD
3945if { (ac_try="$ac_compile"
3946case "(($ac_try" in
3947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3948 *) ac_try_echo=$ac_try;;
3949esac
3950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3951 (eval "$ac_compile") 2>conftest.er1
503d2be0 3952 ac_status=$?
edfaf76d
LK
3953 grep -v '^ *+' conftest.er1 >conftest.err
3954 rm -f conftest.er1
3955 cat conftest.err >&5
c0d27fcc 3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3957 (exit $ac_status); } && {
3958 test -z "$ac_c_werror_flag" ||
3959 test ! -s conftest.err
3960 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3961 ac_cv_prog_cc_g=yes
3962else
503d2be0 3963 echo "$as_me: failed program was:" >&5
19650fd6
AS
3964sed 's/^/| /' conftest.$ac_ext >&5
3965
ca81d7a0
JD
3966 CFLAGS=""
3967 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3968/* confdefs.h. */
3969_ACEOF
3970cat confdefs.h >>conftest.$ac_ext
3971cat >>conftest.$ac_ext <<_ACEOF
3972/* end confdefs.h. */
edfaf76d 3973
6bae0ccf
DL
3974int
3975main ()
3976{
ca81d7a0 3977
6bae0ccf
DL
3978 ;
3979 return 0;
3980}
3981_ACEOF
ca81d7a0
JD
3982rm -f conftest.$ac_objext
3983if { (ac_try="$ac_compile"
3984case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
3988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3989 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3990 ac_status=$?
edfaf76d
LK
3991 grep -v '^ *+' conftest.er1 >conftest.err
3992 rm -f conftest.er1
3993 cat conftest.err >&5
6bae0ccf 3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3995 (exit $ac_status); } && {
3996 test -z "$ac_c_werror_flag" ||
3997 test ! -s conftest.err
3998 } && test -s conftest.$ac_objext; then
ca81d7a0 3999 :
6bae0ccf
DL
4000else
4001 echo "$as_me: failed program was:" >&5
19650fd6
AS
4002sed 's/^/| /' conftest.$ac_ext >&5
4003
ca81d7a0
JD
4004 ac_c_werror_flag=$ac_save_c_werror_flag
4005 CFLAGS="-g"
4006 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 4007/* confdefs.h. */
19650fd6
AS
4008_ACEOF
4009cat confdefs.h >>conftest.$ac_ext
4010cat >>conftest.$ac_ext <<_ACEOF
4011/* end confdefs.h. */
ca81d7a0 4012
503d2be0
AS
4013int
4014main ()
4015{
ca81d7a0 4016
503d2be0
AS
4017 ;
4018 return 0;
4019}
4020_ACEOF
4021rm -f conftest.$ac_objext
ca81d7a0
JD
4022if { (ac_try="$ac_compile"
4023case "(($ac_try" in
4024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4025 *) ac_try_echo=$ac_try;;
4026esac
4027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4028 (eval "$ac_compile") 2>conftest.er1
503d2be0 4029 ac_status=$?
edfaf76d
LK
4030 grep -v '^ *+' conftest.er1 >conftest.err
4031 rm -f conftest.er1
4032 cat conftest.err >&5
c0d27fcc 4033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4034 (exit $ac_status); } && {
4035 test -z "$ac_c_werror_flag" ||
4036 test ! -s conftest.err
4037 } && test -s conftest.$ac_objext; then
ca81d7a0 4038 ac_cv_prog_cc_g=yes
503d2be0
AS
4039else
4040 echo "$as_me: failed program was:" >&5
19650fd6
AS
4041sed 's/^/| /' conftest.$ac_ext >&5
4042
ca81d7a0 4043
8eeae1c9 4044fi
ca81d7a0
JD
4045
4046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4047fi
4048
4049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4050fi
4051
4052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4053 ac_c_werror_flag=$ac_save_c_werror_flag
4054fi
4055{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4056echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4057if test "$ac_test_CFLAGS" = set; then
4058 CFLAGS=$ac_save_CFLAGS
4059elif test $ac_cv_prog_cc_g = yes; then
4060 if test "$GCC" = yes; then
4061 CFLAGS="-g -O2"
4062 else
4063 CFLAGS="-g"
4064 fi
4065else
4066 if test "$GCC" = yes; then
4067 CFLAGS="-O2"
4068 else
4069 CFLAGS=
4070 fi
4071fi
4072{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4073echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4074if test "${ac_cv_prog_cc_c89+set}" = set; then
4075 echo $ECHO_N "(cached) $ECHO_C" >&6
4076else
4077 ac_cv_prog_cc_c89=no
4078ac_save_CC=$CC
4079cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4080/* confdefs.h. */
4081_ACEOF
4082cat confdefs.h >>conftest.$ac_ext
4083cat >>conftest.$ac_ext <<_ACEOF
4084/* end confdefs.h. */
ca81d7a0
JD
4085#include <stdarg.h>
4086#include <stdio.h>
4087#include <sys/types.h>
4088#include <sys/stat.h>
4089/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4090struct buf { int x; };
4091FILE * (*rcsopen) (struct buf *, struct stat *, int);
4092static char *e (p, i)
4093 char **p;
4094 int i;
4095{
4096 return p[i];
4097}
4098static char *f (char * (*g) (char **, int), char **p, ...)
4099{
4100 char *s;
4101 va_list v;
4102 va_start (v,p);
4103 s = g (p, va_arg (v,int));
4104 va_end (v);
4105 return s;
4106}
4107
4108/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4109 function prototypes and stuff, but not '\xHH' hex character constants.
4110 These don't provoke an error unfortunately, instead are silently treated
4111 as 'x'. The following induces an error, until -std is added to get
4112 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4113 array size at least. It's necessary to write '\x00'==0 to get something
4114 that's true only with -std. */
4115int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4116
4117/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4118 inside strings and character constants. */
4119#define FOO(x) 'x'
4120int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4121
4122int test (int i, double x);
4123struct s1 {int (*f) (int a);};
4124struct s2 {int (*f) (double a);};
4125int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4126int argc;
4127char **argv;
503d2be0
AS
4128int
4129main ()
4130{
ca81d7a0 4131return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4132 ;
4133 return 0;
4134}
4135_ACEOF
ca81d7a0
JD
4136for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4137 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4138do
4139 CC="$ac_save_CC $ac_arg"
4140 rm -f conftest.$ac_objext
4141if { (ac_try="$ac_compile"
4142case "(($ac_try" in
4143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4144 *) ac_try_echo=$ac_try;;
4145esac
4146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4147 (eval "$ac_compile") 2>conftest.er1
503d2be0 4148 ac_status=$?
edfaf76d
LK
4149 grep -v '^ *+' conftest.er1 >conftest.err
4150 rm -f conftest.er1
4151 cat conftest.err >&5
c0d27fcc 4152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4153 (exit $ac_status); } && {
4154 test -z "$ac_c_werror_flag" ||
4155 test ! -s conftest.err
4156 } && test -s conftest.$ac_objext; then
ca81d7a0 4157 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4158else
4159 echo "$as_me: failed program was:" >&5
19650fd6
AS
4160sed 's/^/| /' conftest.$ac_ext >&5
4161
ca81d7a0 4162
503d2be0 4163fi
ca81d7a0
JD
4164
4165rm -f core conftest.err conftest.$ac_objext
4166 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4167done
ca81d7a0
JD
4168rm -f conftest.$ac_ext
4169CC=$ac_save_CC
4170
503d2be0 4171fi
ca81d7a0
JD
4172# AC_CACHE_VAL
4173case "x$ac_cv_prog_cc_c89" in
4174 x)
4175 { echo "$as_me:$LINENO: result: none needed" >&5
4176echo "${ECHO_T}none needed" >&6; } ;;
4177 xno)
4178 { echo "$as_me:$LINENO: result: unsupported" >&5
4179echo "${ECHO_T}unsupported" >&6; } ;;
4180 *)
4181 CC="$CC $ac_cv_prog_cc_c89"
4182 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4183echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4184esac
ba4481b5 4185
19650fd6 4186
503d2be0
AS
4187ac_ext=c
4188ac_cpp='$CPP $CPPFLAGS'
4189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4191ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4192
c0d27fcc 4193
ba4481b5
DL
4194# On Suns, sometimes $CPP names a directory.
4195if test -n "$CPP" && test -d "$CPP"; then
4196 CPP=
4197fi
4198
4199#### Some systems specify a CPP to use unless we are using GCC.
4200#### Now that we know whether we are using GCC, we can decide whether
4201#### to use that one.
4202if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4203then
4204 CPP="$NON_GNU_CPP"
4205fi
4206
4207#### Some systems specify a CC to use unless we are using GCC.
4208#### Now that we know whether we are using GCC, we can decide whether
4209#### to use that one.
4210if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4211 test x$cc_specified != xyes
4212then
4213 CC="$NON_GNU_CC"
4214fi
4215
4216if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4217then
4218 CC="$CC $GCC_TEST_OPTIONS"
4219fi
4220
4221if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4222then
4223 CC="$CC $NON_GCC_TEST_OPTIONS"
4224fi
4225
e143ad11
AS
4226
4227ac_ext=c
4228ac_cpp='$CPP $CPPFLAGS'
4229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4231ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4232{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4233echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4234# On Suns, sometimes $CPP names a directory.
4235if test -n "$CPP" && test -d "$CPP"; then
4236 CPP=
4237fi
4238if test -z "$CPP"; then
4239 if test "${ac_cv_prog_CPP+set}" = set; then
4240 echo $ECHO_N "(cached) $ECHO_C" >&6
4241else
4242 # Double quotes because CPP needs to be expanded
4243 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4244 do
4245 ac_preproc_ok=false
4246for ac_c_preproc_warn_flag in '' yes
4247do
4248 # Use a header file that comes with gcc, so configuring glibc
4249 # with a fresh cross-compiler works.
4250 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4251 # <limits.h> exists even on freestanding compilers.
4252 # On the NeXT, cc -E runs the code through the compiler's parser,
4253 # not just through cpp. "Syntax error" is here to catch this case.
4254 cat >conftest.$ac_ext <<_ACEOF
4255/* confdefs.h. */
4256_ACEOF
4257cat confdefs.h >>conftest.$ac_ext
4258cat >>conftest.$ac_ext <<_ACEOF
4259/* end confdefs.h. */
4260#ifdef __STDC__
4261# include <limits.h>
4262#else
4263# include <assert.h>
4264#endif
4265 Syntax error
4266_ACEOF
ca81d7a0
JD
4267if { (ac_try="$ac_cpp conftest.$ac_ext"
4268case "(($ac_try" in
4269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4270 *) ac_try_echo=$ac_try;;
4271esac
4272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4273 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4274 ac_status=$?
4275 grep -v '^ *+' conftest.er1 >conftest.err
4276 rm -f conftest.er1
4277 cat conftest.err >&5
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4279 (exit $ac_status); } >/dev/null && {
4280 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4281 test ! -s conftest.err
4282 }; then
e143ad11
AS
4283 :
4284else
4285 echo "$as_me: failed program was:" >&5
4286sed 's/^/| /' conftest.$ac_ext >&5
4287
4288 # Broken: fails on valid input.
4289continue
4290fi
ca81d7a0 4291
e143ad11
AS
4292rm -f conftest.err conftest.$ac_ext
4293
ca81d7a0 4294 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4295 # can be detected and how.
4296 cat >conftest.$ac_ext <<_ACEOF
4297/* confdefs.h. */
4298_ACEOF
4299cat confdefs.h >>conftest.$ac_ext
4300cat >>conftest.$ac_ext <<_ACEOF
4301/* end confdefs.h. */
4302#include <ac_nonexistent.h>
4303_ACEOF
ca81d7a0
JD
4304if { (ac_try="$ac_cpp conftest.$ac_ext"
4305case "(($ac_try" in
4306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4307 *) ac_try_echo=$ac_try;;
4308esac
4309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4310 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4311 ac_status=$?
4312 grep -v '^ *+' conftest.er1 >conftest.err
4313 rm -f conftest.er1
4314 cat conftest.err >&5
4315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4316 (exit $ac_status); } >/dev/null && {
4317 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4318 test ! -s conftest.err
4319 }; then
e143ad11
AS
4320 # Broken: success on invalid input.
4321continue
4322else
4323 echo "$as_me: failed program was:" >&5
4324sed 's/^/| /' conftest.$ac_ext >&5
4325
4326 # Passes both tests.
4327ac_preproc_ok=:
4328break
4329fi
ca81d7a0 4330
e143ad11
AS
4331rm -f conftest.err conftest.$ac_ext
4332
4333done
4334# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4335rm -f conftest.err conftest.$ac_ext
4336if $ac_preproc_ok; then
4337 break
4338fi
4339
4340 done
4341 ac_cv_prog_CPP=$CPP
4342
4343fi
4344 CPP=$ac_cv_prog_CPP
4345else
4346 ac_cv_prog_CPP=$CPP
4347fi
ca81d7a0
JD
4348{ echo "$as_me:$LINENO: result: $CPP" >&5
4349echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4350ac_preproc_ok=false
4351for ac_c_preproc_warn_flag in '' yes
4352do
4353 # Use a header file that comes with gcc, so configuring glibc
4354 # with a fresh cross-compiler works.
4355 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4356 # <limits.h> exists even on freestanding compilers.
4357 # On the NeXT, cc -E runs the code through the compiler's parser,
4358 # not just through cpp. "Syntax error" is here to catch this case.
4359 cat >conftest.$ac_ext <<_ACEOF
4360/* confdefs.h. */
4361_ACEOF
4362cat confdefs.h >>conftest.$ac_ext
4363cat >>conftest.$ac_ext <<_ACEOF
4364/* end confdefs.h. */
4365#ifdef __STDC__
4366# include <limits.h>
4367#else
4368# include <assert.h>
4369#endif
4370 Syntax error
4371_ACEOF
ca81d7a0
JD
4372if { (ac_try="$ac_cpp conftest.$ac_ext"
4373case "(($ac_try" in
4374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4375 *) ac_try_echo=$ac_try;;
4376esac
4377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4378 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4379 ac_status=$?
4380 grep -v '^ *+' conftest.er1 >conftest.err
4381 rm -f conftest.er1
4382 cat conftest.err >&5
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4384 (exit $ac_status); } >/dev/null && {
4385 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4386 test ! -s conftest.err
4387 }; then
e143ad11
AS
4388 :
4389else
4390 echo "$as_me: failed program was:" >&5
4391sed 's/^/| /' conftest.$ac_ext >&5
4392
4393 # Broken: fails on valid input.
4394continue
4395fi
ca81d7a0 4396
e143ad11
AS
4397rm -f conftest.err conftest.$ac_ext
4398
ca81d7a0 4399 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4400 # can be detected and how.
4401 cat >conftest.$ac_ext <<_ACEOF
4402/* confdefs.h. */
4403_ACEOF
4404cat confdefs.h >>conftest.$ac_ext
4405cat >>conftest.$ac_ext <<_ACEOF
4406/* end confdefs.h. */
4407#include <ac_nonexistent.h>
4408_ACEOF
ca81d7a0
JD
4409if { (ac_try="$ac_cpp conftest.$ac_ext"
4410case "(($ac_try" in
4411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4412 *) ac_try_echo=$ac_try;;
4413esac
4414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4415 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4416 ac_status=$?
4417 grep -v '^ *+' conftest.er1 >conftest.err
4418 rm -f conftest.er1
4419 cat conftest.err >&5
4420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4421 (exit $ac_status); } >/dev/null && {
4422 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4423 test ! -s conftest.err
4424 }; then
e143ad11
AS
4425 # Broken: success on invalid input.
4426continue
4427else
4428 echo "$as_me: failed program was:" >&5
4429sed 's/^/| /' conftest.$ac_ext >&5
4430
4431 # Passes both tests.
4432ac_preproc_ok=:
4433break
4434fi
ca81d7a0 4435
e143ad11
AS
4436rm -f conftest.err conftest.$ac_ext
4437
4438done
4439# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4440rm -f conftest.err conftest.$ac_ext
4441if $ac_preproc_ok; then
4442 :
4443else
4444 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4445See \`config.log' for more details." >&5
4446echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4447See \`config.log' for more details." >&2;}
4448 { (exit 1); exit 1; }; }
4449fi
4450
4451ac_ext=c
4452ac_cpp='$CPP $CPPFLAGS'
4453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4455ac_compiler_gnu=$ac_cv_c_compiler_gnu
4456
4457
ca81d7a0
JD
4458{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4459echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4460if test "${ac_cv_path_GREP+set}" = set; then
4461 echo $ECHO_N "(cached) $ECHO_C" >&6
4462else
4463 # Extract the first word of "grep ggrep" to use in msg output
4464if test -z "$GREP"; then
4465set dummy grep ggrep; ac_prog_name=$2
4466if test "${ac_cv_path_GREP+set}" = set; then
4467 echo $ECHO_N "(cached) $ECHO_C" >&6
4468else
4469 ac_path_GREP_found=false
4470# Loop through the user's path and test for each of PROGNAME-LIST
4471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4473do
4474 IFS=$as_save_IFS
4475 test -z "$as_dir" && as_dir=.
4476 for ac_prog in grep ggrep; do
4477 for ac_exec_ext in '' $ac_executable_extensions; do
4478 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4479 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4480 # Check for GNU ac_path_GREP and select it if it is found.
4481 # Check for GNU $ac_path_GREP
4482case `"$ac_path_GREP" --version 2>&1` in
4483*GNU*)
4484 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4485*)
4486 ac_count=0
4487 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4488 while :
4489 do
4490 cat "conftest.in" "conftest.in" >"conftest.tmp"
4491 mv "conftest.tmp" "conftest.in"
4492 cp "conftest.in" "conftest.nl"
4493 echo 'GREP' >> "conftest.nl"
4494 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4495 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4496 ac_count=`expr $ac_count + 1`
4497 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4498 # Best one so far, save it but keep looking for a better one
4499 ac_cv_path_GREP="$ac_path_GREP"
4500 ac_path_GREP_max=$ac_count
4501 fi
4502 # 10*(2^10) chars as input seems more than enough
4503 test $ac_count -gt 10 && break
4504 done
4505 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4506esac
4507
4508
4509 $ac_path_GREP_found && break 3
4510 done
4511done
4512
4513done
4514IFS=$as_save_IFS
4515
4516
4517fi
4518
4519GREP="$ac_cv_path_GREP"
4520if test -z "$GREP"; then
4521 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4522echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4523 { (exit 1); exit 1; }; }
4524fi
4525
4526else
4527 ac_cv_path_GREP=$GREP
4528fi
4529
4530
4531fi
4532{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4533echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4534 GREP="$ac_cv_path_GREP"
4535
4536
4537{ echo "$as_me:$LINENO: checking for egrep" >&5
4538echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4539if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4540 echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
ca81d7a0
JD
4542 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4543 then ac_cv_path_EGREP="$GREP -E"
4544 else
4545 # Extract the first word of "egrep" to use in msg output
4546if test -z "$EGREP"; then
4547set dummy egrep; ac_prog_name=$2
4548if test "${ac_cv_path_EGREP+set}" = set; then
4549 echo $ECHO_N "(cached) $ECHO_C" >&6
4550else
4551 ac_path_EGREP_found=false
4552# Loop through the user's path and test for each of PROGNAME-LIST
4553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_prog in egrep; do
4559 for ac_exec_ext in '' $ac_executable_extensions; do
4560 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4561 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4562 # Check for GNU ac_path_EGREP and select it if it is found.
4563 # Check for GNU $ac_path_EGREP
4564case `"$ac_path_EGREP" --version 2>&1` in
4565*GNU*)
4566 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4567*)
4568 ac_count=0
4569 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4570 while :
4571 do
4572 cat "conftest.in" "conftest.in" >"conftest.tmp"
4573 mv "conftest.tmp" "conftest.in"
4574 cp "conftest.in" "conftest.nl"
4575 echo 'EGREP' >> "conftest.nl"
4576 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578 ac_count=`expr $ac_count + 1`
4579 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4580 # Best one so far, save it but keep looking for a better one
4581 ac_cv_path_EGREP="$ac_path_EGREP"
4582 ac_path_EGREP_max=$ac_count
e143ad11 4583 fi
ca81d7a0
JD
4584 # 10*(2^10) chars as input seems more than enough
4585 test $ac_count -gt 10 && break
4586 done
4587 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590
4591 $ac_path_EGREP_found && break 3
4592 done
4593done
4594
4595done
4596IFS=$as_save_IFS
4597
4598
4599fi
4600
4601EGREP="$ac_cv_path_EGREP"
4602if test -z "$EGREP"; then
4603 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4604echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4605 { (exit 1); exit 1; }; }
4606fi
4607
4608else
4609 ac_cv_path_EGREP=$EGREP
4610fi
4611
4612
4613 fi
8eeae1c9 4614fi
ca81d7a0
JD
4615{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4616echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4617 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4618
4619
4620
ca81d7a0
JD
4621{ echo "$as_me:$LINENO: checking for AIX" >&5
4622echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4623cat >conftest.$ac_ext <<_ACEOF
4624/* confdefs.h. */
4625_ACEOF
4626cat confdefs.h >>conftest.$ac_ext
4627cat >>conftest.$ac_ext <<_ACEOF
4628/* end confdefs.h. */
4629#ifdef _AIX
4630 yes
4631#endif
4632
4633_ACEOF
4634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4635 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4636 { echo "$as_me:$LINENO: result: yes" >&5
4637echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4638cat >>confdefs.h <<\_ACEOF
4639#define _ALL_SOURCE 1
4640_ACEOF
4641
4642else
ca81d7a0
JD
4643 { echo "$as_me:$LINENO: result: no" >&5
4644echo "${ECHO_T}no" >&6; }
e143ad11
AS
4645fi
4646rm -f conftest*
4647
4648
4649
4650cat >>confdefs.h <<\_ACEOF
4651#define _GNU_SOURCE 1
4652_ACEOF
4653
4654
4655
01abe918 4656### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4657{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4658echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4659SAVE_CFLAGS="$CFLAGS"
4660CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4661cat >conftest.$ac_ext <<_ACEOF
4662/* confdefs.h. */
4663_ACEOF
4664cat confdefs.h >>conftest.$ac_ext
4665cat >>conftest.$ac_ext <<_ACEOF
4666/* end confdefs.h. */
4667
4668int
4669main ()
4670{
4671
4672 ;
4673 return 0;
4674}
4675_ACEOF
4676rm -f conftest.$ac_objext
ca81d7a0
JD
4677if { (ac_try="$ac_compile"
4678case "(($ac_try" in
4679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4680 *) ac_try_echo=$ac_try;;
4681esac
4682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4683 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4684 ac_status=$?
4685 grep -v '^ *+' conftest.er1 >conftest.err
4686 rm -f conftest.er1
4687 cat conftest.err >&5
4688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4689 (exit $ac_status); } && {
4690 test -z "$ac_c_werror_flag" ||
4691 test ! -s conftest.err
4692 } && test -s conftest.$ac_objext; then
01abe918
CY
4693 has_option=yes
4694else
4695 echo "$as_me: failed program was:" >&5
4696sed 's/^/| /' conftest.$ac_ext >&5
4697
ca81d7a0 4698 has_option=no
01abe918 4699fi
ca81d7a0
JD
4700
4701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4702if test $has_option = yes; then
4703 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4704fi
ca81d7a0
JD
4705{ echo "$as_me:$LINENO: result: $has_option" >&5
4706echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4707CFLAGS="$SAVE_CFLAGS"
4708unset has_option
4709unset SAVE_CFLAGS
4710
6a3a24fa 4711#### Some other nice autoconf tests.
ba4481b5 4712
ca81d7a0
JD
4713{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4714echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4715LN_S=$as_ln_s
4716if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4717 { echo "$as_me:$LINENO: result: yes" >&5
4718echo "${ECHO_T}yes" >&6; }
ba4481b5 4719else
ca81d7a0
JD
4720 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4721echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4722fi
4723
503d2be0
AS
4724ac_ext=c
4725ac_cpp='$CPP $CPPFLAGS'
4726ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4727ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4728ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4729{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4730echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4731# On Suns, sometimes $CPP names a directory.
4732if test -n "$CPP" && test -d "$CPP"; then
4733 CPP=
4734fi
4735if test -z "$CPP"; then
503d2be0
AS
4736 if test "${ac_cv_prog_CPP+set}" = set; then
4737 echo $ECHO_N "(cached) $ECHO_C" >&6
4738else
4739 # Double quotes because CPP needs to be expanded
4740 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4741 do
4742 ac_preproc_ok=false
4743for ac_c_preproc_warn_flag in '' yes
4744do
4745 # Use a header file that comes with gcc, so configuring glibc
4746 # with a fresh cross-compiler works.
19650fd6
AS
4747 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4748 # <limits.h> exists even on freestanding compilers.
ba4481b5 4749 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4750 # not just through cpp. "Syntax error" is here to catch this case.
4751 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4752/* confdefs.h. */
4753_ACEOF
4754cat confdefs.h >>conftest.$ac_ext
4755cat >>conftest.$ac_ext <<_ACEOF
4756/* end confdefs.h. */
4757#ifdef __STDC__
4758# include <limits.h>
4759#else
4760# include <assert.h>
4761#endif
edfaf76d 4762 Syntax error
503d2be0 4763_ACEOF
ca81d7a0
JD
4764if { (ac_try="$ac_cpp conftest.$ac_ext"
4765case "(($ac_try" in
4766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4767 *) ac_try_echo=$ac_try;;
4768esac
4769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4771 ac_status=$?
6bae0ccf 4772 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4773 rm -f conftest.er1
4774 cat conftest.err >&5
c0d27fcc 4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4776 (exit $ac_status); } >/dev/null && {
4777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4778 test ! -s conftest.err
4779 }; then
ba4481b5
DL
4780 :
4781else
503d2be0 4782 echo "$as_me: failed program was:" >&5
19650fd6
AS
4783sed 's/^/| /' conftest.$ac_ext >&5
4784
503d2be0
AS
4785 # Broken: fails on valid input.
4786continue
4787fi
ca81d7a0 4788
503d2be0
AS
4789rm -f conftest.err conftest.$ac_ext
4790
ca81d7a0 4791 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4792 # can be detected and how.
4793 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4794/* confdefs.h. */
4795_ACEOF
4796cat confdefs.h >>conftest.$ac_ext
4797cat >>conftest.$ac_ext <<_ACEOF
4798/* end confdefs.h. */
503d2be0
AS
4799#include <ac_nonexistent.h>
4800_ACEOF
ca81d7a0
JD
4801if { (ac_try="$ac_cpp conftest.$ac_ext"
4802case "(($ac_try" in
4803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4804 *) ac_try_echo=$ac_try;;
4805esac
4806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4808 ac_status=$?
6bae0ccf 4809 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4810 rm -f conftest.er1
4811 cat conftest.err >&5
c0d27fcc 4812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4813 (exit $ac_status); } >/dev/null && {
4814 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4815 test ! -s conftest.err
4816 }; then
503d2be0
AS
4817 # Broken: success on invalid input.
4818continue
c4bb2108 4819else
503d2be0 4820 echo "$as_me: failed program was:" >&5
19650fd6
AS
4821sed 's/^/| /' conftest.$ac_ext >&5
4822
503d2be0
AS
4823 # Passes both tests.
4824ac_preproc_ok=:
4825break
4826fi
ca81d7a0 4827
503d2be0
AS
4828rm -f conftest.err conftest.$ac_ext
4829
4830done
4831# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4832rm -f conftest.err conftest.$ac_ext
4833if $ac_preproc_ok; then
4834 break
4835fi
4836
4837 done
4838 ac_cv_prog_CPP=$CPP
4839
4840fi
4841 CPP=$ac_cv_prog_CPP
4842else
4843 ac_cv_prog_CPP=$CPP
4844fi
ca81d7a0
JD
4845{ echo "$as_me:$LINENO: result: $CPP" >&5
4846echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4847ac_preproc_ok=false
4848for ac_c_preproc_warn_flag in '' yes
4849do
4850 # Use a header file that comes with gcc, so configuring glibc
4851 # with a fresh cross-compiler works.
19650fd6
AS
4852 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4853 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4854 # On the NeXT, cc -E runs the code through the compiler's parser,
4855 # not just through cpp. "Syntax error" is here to catch this case.
4856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4857/* confdefs.h. */
4858_ACEOF
4859cat confdefs.h >>conftest.$ac_ext
4860cat >>conftest.$ac_ext <<_ACEOF
4861/* end confdefs.h. */
4862#ifdef __STDC__
4863# include <limits.h>
4864#else
4865# include <assert.h>
4866#endif
edfaf76d 4867 Syntax error
503d2be0 4868_ACEOF
ca81d7a0
JD
4869if { (ac_try="$ac_cpp conftest.$ac_ext"
4870case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
4874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4875 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4876 ac_status=$?
6bae0ccf 4877 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4878 rm -f conftest.er1
4879 cat conftest.err >&5
c0d27fcc 4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4881 (exit $ac_status); } >/dev/null && {
4882 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4883 test ! -s conftest.err
4884 }; then
ba4481b5
DL
4885 :
4886else
503d2be0 4887 echo "$as_me: failed program was:" >&5
19650fd6
AS
4888sed 's/^/| /' conftest.$ac_ext >&5
4889
503d2be0
AS
4890 # Broken: fails on valid input.
4891continue
4892fi
ca81d7a0 4893
503d2be0
AS
4894rm -f conftest.err conftest.$ac_ext
4895
ca81d7a0 4896 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4897 # can be detected and how.
4898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4899/* confdefs.h. */
4900_ACEOF
4901cat confdefs.h >>conftest.$ac_ext
4902cat >>conftest.$ac_ext <<_ACEOF
4903/* end confdefs.h. */
503d2be0
AS
4904#include <ac_nonexistent.h>
4905_ACEOF
ca81d7a0
JD
4906if { (ac_try="$ac_cpp conftest.$ac_ext"
4907case "(($ac_try" in
4908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4909 *) ac_try_echo=$ac_try;;
4910esac
4911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4912 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4913 ac_status=$?
6bae0ccf 4914 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4915 rm -f conftest.er1
4916 cat conftest.err >&5
c0d27fcc 4917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4918 (exit $ac_status); } >/dev/null && {
4919 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4920 test ! -s conftest.err
4921 }; then
503d2be0
AS
4922 # Broken: success on invalid input.
4923continue
4924else
4925 echo "$as_me: failed program was:" >&5
19650fd6
AS
4926sed 's/^/| /' conftest.$ac_ext >&5
4927
503d2be0
AS
4928 # Passes both tests.
4929ac_preproc_ok=:
4930break
ba4481b5 4931fi
ca81d7a0 4932
503d2be0
AS
4933rm -f conftest.err conftest.$ac_ext
4934
4935done
4936# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4937rm -f conftest.err conftest.$ac_ext
4938if $ac_preproc_ok; then
4939 :
ba4481b5 4940else
19650fd6
AS
4941 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4942See \`config.log' for more details." >&5
4943echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4944See \`config.log' for more details." >&2;}
503d2be0 4945 { (exit 1); exit 1; }; }
ba4481b5 4946fi
503d2be0
AS
4947
4948ac_ext=c
4949ac_cpp='$CPP $CPPFLAGS'
4950ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4951ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4952ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4953
4954# Find a good install program. We prefer a C program (faster),
4955# so one script is as good as another. But avoid the broken or
4956# incompatible versions:
4957# SysV /etc/install, /usr/sbin/install
4958# SunOS /usr/etc/install
4959# IRIX /sbin/install
4960# AIX /bin/install
503d2be0 4961# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4962# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4963# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4964# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4965# OS/2's system install, which has a completely different semantic
ba4481b5 4966# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4967{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4968echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4969if test -z "$INSTALL"; then
503d2be0
AS
4970if test "${ac_cv_path_install+set}" = set; then
4971 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4972else
c0d27fcc
MR
4973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in $PATH
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
4978 # Account for people who put trailing slashes in PATH elements.
4979case $as_dir/ in
4980 ./ | .// | /cC/* | \
4981 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4982 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4983 /usr/ucb/* ) ;;
4984 *)
4985 # OSF1 and SCO ODT 3.0 have their own names for install.
4986 # Don't use installbsd from OSF since it installs stuff as root
4987 # by default.
4988 for ac_prog in ginstall scoinst install; do
4989 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4990 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4991 if test $ac_prog = install &&
4992 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4993 # AIX install. It has an incompatible calling convention.
4994 :
4995 elif test $ac_prog = install &&
4996 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4997 # program-specific install script used by HP pwplus--don't use.
4998 :
4999 else
5000 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5001 break 3
5002 fi
5003 fi
ba4481b5 5004 done
c0d27fcc
MR
5005 done
5006 ;;
5007esac
5008done
ca81d7a0 5009IFS=$as_save_IFS
c0d27fcc 5010
ba4481b5
DL
5011
5012fi
5013 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5014 INSTALL=$ac_cv_path_install
ba4481b5 5015 else
ca81d7a0
JD
5016 # As a last resort, use the slow shell script. Don't cache a
5017 # value for INSTALL within a source directory, because that will
ba4481b5 5018 # break other packages using the cache if that directory is
ca81d7a0 5019 # removed, or if the value is a relative name.
503d2be0 5020 INSTALL=$ac_install_sh
ba4481b5
DL
5021 fi
5022fi
ca81d7a0
JD
5023{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5024echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5025
5026# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5027# It thinks the first close brace ends the variable substitution.
5028test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5029
503d2be0 5030test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5031
ba4481b5
DL
5032test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5033
c0d27fcc
MR
5034if test "x$RANLIB" = x; then
5035 if test -n "$ac_tool_prefix"; then
5036 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5037set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5038{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5040if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5041 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5042else
5043 if test -n "$RANLIB"; then
5044 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5045else
c0d27fcc
MR
5046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5047for as_dir in $PATH
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
5051 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5053 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5055 break 2
5056 fi
5057done
503d2be0 5058done
ca81d7a0 5059IFS=$as_save_IFS
503d2be0 5060
7397acc4
DL
5061fi
5062fi
503d2be0 5063RANLIB=$ac_cv_prog_RANLIB
7397acc4 5064if test -n "$RANLIB"; then
ca81d7a0
JD
5065 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5066echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5067else
ca81d7a0
JD
5068 { echo "$as_me:$LINENO: result: no" >&5
5069echo "${ECHO_T}no" >&6; }
503d2be0
AS
5070fi
5071
ca81d7a0 5072
503d2be0
AS
5073fi
5074if test -z "$ac_cv_prog_RANLIB"; then
5075 ac_ct_RANLIB=$RANLIB
5076 # Extract the first word of "ranlib", so it can be a program name with args.
5077set dummy ranlib; ac_word=$2
ca81d7a0
JD
5078{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5079echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5080if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5081 echo $ECHO_N "(cached) $ECHO_C" >&6
5082else
5083 if test -n "$ac_ct_RANLIB"; then
5084 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5085else
c0d27fcc
MR
5086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5087for as_dir in $PATH
5088do
5089 IFS=$as_save_IFS
5090 test -z "$as_dir" && as_dir=.
5091 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5093 ac_cv_prog_ac_ct_RANLIB="ranlib"
5094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5095 break 2
5096 fi
5097done
503d2be0 5098done
ca81d7a0 5099IFS=$as_save_IFS
503d2be0 5100
503d2be0
AS
5101fi
5102fi
5103ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5104if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5105 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5106echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5107else
ca81d7a0
JD
5108 { echo "$as_me:$LINENO: result: no" >&5
5109echo "${ECHO_T}no" >&6; }
503d2be0
AS
5110fi
5111
ca81d7a0
JD
5112 if test "x$ac_ct_RANLIB" = x; then
5113 RANLIB=":"
5114 else
5115 case $cross_compiling:$ac_tool_warned in
5116yes:)
5117{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5118whose name does not start with the host triplet. If you think this
5119configuration is useful to you, please write to autoconf@gnu.org." >&5
5120echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5121whose name does not start with the host triplet. If you think this
5122configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5123ac_tool_warned=yes ;;
5124esac
5125 RANLIB=$ac_ct_RANLIB
5126 fi
7397acc4 5127else
503d2be0 5128 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5129fi
5130
5131fi
9e71690e
DK
5132# Extract the first word of "install-info", so it can be a program name with args.
5133set dummy install-info; ac_word=$2
ca81d7a0
JD
5134{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5135echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5136if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5137 echo $ECHO_N "(cached) $ECHO_C" >&6
5138else
5139 case $INSTALL_INFO in
5140 [\\/]* | ?:[\\/]*)
5141 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5142 ;;
5143 *)
5144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145for as_dir in $PATH
5146do
5147 IFS=$as_save_IFS
5148 test -z "$as_dir" && as_dir=.
5149 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5151 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5152 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5153 break 2
5154 fi
5155done
5156done
ca81d7a0 5157IFS=$as_save_IFS
9e71690e
DK
5158
5159 ;;
5160esac
5161fi
5162INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5163if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5164 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5165echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5166else
ca81d7a0
JD
5167 { echo "$as_me:$LINENO: result: no" >&5
5168echo "${ECHO_T}no" >&6; }
9e71690e
DK
5169fi
5170
ca81d7a0 5171
9e71690e
DK
5172# Extract the first word of "install-info", so it can be a program name with args.
5173set dummy install-info; ac_word=$2
ca81d7a0
JD
5174{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5175echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5176if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5177 echo $ECHO_N "(cached) $ECHO_C" >&6
5178else
5179 case $INSTALL_INFO in
5180 [\\/]* | ?:[\\/]*)
5181 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5182 ;;
5183 *)
5184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5185for as_dir in /usr/sbin
5186do
5187 IFS=$as_save_IFS
5188 test -z "$as_dir" && as_dir=.
5189 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5190 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5191 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5192 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5193 break 2
5194 fi
5195done
5196done
ca81d7a0 5197IFS=$as_save_IFS
9e71690e
DK
5198
5199 ;;
5200esac
5201fi
5202INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5203if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5204 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5205echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5206else
ca81d7a0
JD
5207 { echo "$as_me:$LINENO: result: no" >&5
5208echo "${ECHO_T}no" >&6; }
9e71690e
DK
5209fi
5210
ca81d7a0 5211
9e71690e
DK
5212# Extract the first word of "install-info", so it can be a program name with args.
5213set dummy install-info; ac_word=$2
ca81d7a0
JD
5214{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5216if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5217 echo $ECHO_N "(cached) $ECHO_C" >&6
5218else
5219 case $INSTALL_INFO in
5220 [\\/]* | ?:[\\/]*)
5221 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5222 ;;
5223 *)
5224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225for as_dir in /sbin
5226do
5227 IFS=$as_save_IFS
5228 test -z "$as_dir" && as_dir=.
5229 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5231 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5232 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5233 break 2
5234 fi
5235done
5236done
ca81d7a0 5237IFS=$as_save_IFS
9e71690e
DK
5238
5239 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5240 ;;
5241esac
5242fi
5243INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5244if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5245 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5246echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5247else
ca81d7a0
JD
5248 { echo "$as_me:$LINENO: result: no" >&5
5249echo "${ECHO_T}no" >&6; }
9e71690e
DK
5250fi
5251
ca81d7a0 5252
8ae52ca6
RF
5253# Extract the first word of "gzip", so it can be a program name with args.
5254set dummy gzip; ac_word=$2
ca81d7a0
JD
5255{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5257if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5258 echo $ECHO_N "(cached) $ECHO_C" >&6
5259else
46e35e9f 5260 case $GZIP_PROG in
8ae52ca6 5261 [\\/]* | ?:[\\/]*)
46e35e9f 5262 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5263 ;;
5264 *)
5265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266for as_dir in $PATH
5267do
5268 IFS=$as_save_IFS
5269 test -z "$as_dir" && as_dir=.
5270 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5271 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5272 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5273 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5274 break 2
5275 fi
5276done
5277done
ca81d7a0 5278IFS=$as_save_IFS
8ae52ca6
RF
5279
5280 ;;
5281esac
5282fi
46e35e9f 5283GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5284if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5285 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5286echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5287else
ca81d7a0
JD
5288 { echo "$as_me:$LINENO: result: no" >&5
5289echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5290fi
5291
ba4481b5 5292
c0d27fcc 5293
ca81d7a0 5294
8e967cf7
MR
5295if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5296then
5297 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5298fi
5299
5300if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5301then
5302 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5303fi
5304
c0d27fcc 5305
fe239f0f 5306late_LDFLAGS=$LDFLAGS
4af002d6 5307if test "$GCC" = yes; then
fe239f0f
AS
5308 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5309else
5310 LDFLAGS="$LDFLAGS -znocombreloc"
5311fi
5312
ca81d7a0
JD
5313{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5314echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5315cat >conftest.$ac_ext <<_ACEOF
5316main(){return 0;}
5317_ACEOF
5318rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5319if { (ac_try="$ac_link"
5320case "(($ac_try" in
5321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5322 *) ac_try_echo=$ac_try;;
5323esac
5324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5325 (eval "$ac_link") 2>conftest.er1
fe239f0f 5326 ac_status=$?
edfaf76d
LK
5327 grep -v '^ *+' conftest.er1 >conftest.err
5328 rm -f conftest.er1
5329 cat conftest.err >&5
fe239f0f 5330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5331 (exit $ac_status); } && {
5332 test -z "$ac_c_werror_flag" ||
5333 test ! -s conftest.err
5334 } && test -s conftest$ac_exeext &&
5335 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5336 { echo "$as_me:$LINENO: result: yes" >&5
5337echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5338else
5339 echo "$as_me: failed program was:" >&5
5340sed 's/^/| /' conftest.$ac_ext >&5
5341
ca81d7a0
JD
5342 LDFLAGS=$late_LDFLAGS
5343 { echo "$as_me:$LINENO: result: no" >&5
5344echo "${ECHO_T}no" >&6; }
fe239f0f 5345fi
ca81d7a0 5346
f053c89f 5347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5348 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5349
3b33a005
DL
5350#### Extract some information from the operating system and machine files.
5351
c0d27fcc 5352{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5353 - which libraries the lib-src programs will want, and
503d2be0
AS
5354 - whether the GNU malloc routines are usable..." >&5
5355echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5356 - which libraries the lib-src programs will want, and
503d2be0 5357 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5358
5359### First figure out CFLAGS (which we use for running the compiler here)
5360### and REAL_CFLAGS (which we use for real compilation).
5361### The two are the same except on a few systems, where they are made
5362### different to work around various lossages. For example,
5363### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5364### as implying static linking.
5365
5366### If the CFLAGS env var is specified, we use that value
5367### instead of the default.
5368
5369### It's not important that this name contain the PID; you can't run
5370### two configures in the same directory and have anything work
5371### anyway.
5372tempcname="conftest.c"
5373
5374echo '
5375#include "'${srcdir}'/src/'${opsysfile}'"
5376#include "'${srcdir}'/src/'${machfile}'"
5377#ifndef LIBS_MACHINE
5378#define LIBS_MACHINE
5379#endif
5380#ifndef LIBS_SYSTEM
5381#define LIBS_SYSTEM
5382#endif
5383#ifndef C_SWITCH_SYSTEM
5384#define C_SWITCH_SYSTEM
5385#endif
5386#ifndef C_SWITCH_MACHINE
5387#define C_SWITCH_MACHINE
5388#endif
5389configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5390configure___ c_switch_system=C_SWITCH_SYSTEM
5391configure___ c_switch_machine=C_SWITCH_MACHINE
5392
5393#ifndef LIB_X11_LIB
5394#define LIB_X11_LIB -lX11
5395#endif
5396
5397#ifndef LIBX11_MACHINE
5398#define LIBX11_MACHINE
5399#endif
5400
5401#ifndef LIBX11_SYSTEM
5402#define LIBX11_SYSTEM
5403#endif
5404configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5405
5406#ifdef UNEXEC
5407configure___ unexec=UNEXEC
5408#else
5409configure___ unexec=unexec.o
5410#endif
5411
5412#ifdef SYSTEM_MALLOC
5413configure___ system_malloc=yes
5414#else
5415configure___ system_malloc=no
5416#endif
5417
ef9e4345
GM
5418#ifdef USE_MMAP_FOR_BUFFERS
5419configure___ use_mmap_for_buffers=yes
73b77ee5 5420#else
ef9e4345 5421configure___ use_mmap_for_buffers=no
73b77ee5
GM
5422#endif
5423
3b33a005
DL
5424#ifndef C_DEBUG_SWITCH
5425#define C_DEBUG_SWITCH -g
5426#endif
5427
5428#ifndef C_OPTIMIZE_SWITCH
5429#ifdef __GNUC__
5430#define C_OPTIMIZE_SWITCH -O2
5431#else
5432#define C_OPTIMIZE_SWITCH -O
5433#endif
5434#endif
5435
01abe918
CY
5436#ifndef C_WARNINGS_SWITCH
5437#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5438#endif
5439
3b33a005
DL
5440#ifndef LD_SWITCH_MACHINE
5441#define LD_SWITCH_MACHINE
5442#endif
5443
5444#ifndef LD_SWITCH_SYSTEM
5445#define LD_SWITCH_SYSTEM
5446#endif
5447
5448#ifndef LD_SWITCH_X_SITE_AUX
5449#define LD_SWITCH_X_SITE_AUX
503d2be0 5450#endif
3b33a005
DL
5451
5452configure___ ld_switch_system=LD_SWITCH_SYSTEM
5453configure___ ld_switch_machine=LD_SWITCH_MACHINE
5454
5455#ifdef THIS_IS_CONFIGURE
5456
5457/* Get the CFLAGS for tests in configure. */
5458#ifdef __GNUC__
5459configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5460#else
5461configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5462#endif
5463
5464#else /* not THIS_IS_CONFIGURE */
5465
5466/* Get the CFLAGS for real compilation. */
5467#ifdef __GNUC__
01abe918 5468configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5469#else
5470configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5471#endif
5472
5473#endif /* not THIS_IS_CONFIGURE */
5474' > ${tempcname}
5475
5476# The value of CPP is a quoted variable reference, so we need to do this
5477# to get its actual value...
5478CPP=`eval "echo $CPP"`
5479eval `${CPP} -Isrc ${tempcname} \
5480 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5481if test "x$SPECIFIED_CFLAGS" = x; then
5482 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5483 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5484else
5485 REAL_CFLAGS="$CFLAGS"
5486fi
5487rm ${tempcname}
5488
5489ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5490
5491### Make sure subsequent tests use flags consistent with the build flags.
5492
5493if test x"${OVERRIDE_CPPFLAGS}" != x; then
5494 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5495else
5496 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5497fi
5498
6bae0ccf
DL
5499
5500
ca81d7a0 5501# Check whether --enable-largefile was given.
f4988be7 5502if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5503 enableval=$enable_largefile;
5504fi
f4988be7 5505
503d2be0 5506if test "$enable_largefile" != no; then
f4988be7 5507
ca81d7a0
JD
5508 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5509echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5510if test "${ac_cv_sys_largefile_CC+set}" = set; then
5511 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5512else
f4988be7 5513 ac_cv_sys_largefile_CC=no
503d2be0
AS
5514 if test "$GCC" != yes; then
5515 ac_save_CC=$CC
5516 while :; do
ca81d7a0
JD
5517 # IRIX 6.2 and later do not support large files by default,
5518 # so use the C compiler's -n32 option if that helps.
edfaf76d 5519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5520/* confdefs.h. */
5521_ACEOF
5522cat confdefs.h >>conftest.$ac_ext
5523cat >>conftest.$ac_ext <<_ACEOF
5524/* end confdefs.h. */
f4988be7 5525#include <sys/types.h>
503d2be0
AS
5526 /* Check that off_t can represent 2**63 - 1 correctly.
5527 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5528 since some C++ compilers masquerading as C compilers
5529 incorrectly reject 9223372036854775807. */
5530#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5531 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5532 && LARGE_OFF_T % 2147483647 == 1)
5533 ? 1 : -1];
5534int
5535main ()
5536{
f4988be7 5537
503d2be0
AS
5538 ;
5539 return 0;
5540}
5541_ACEOF
ca81d7a0
JD
5542 rm -f conftest.$ac_objext
5543if { (ac_try="$ac_compile"
5544case "(($ac_try" in
5545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5546 *) ac_try_echo=$ac_try;;
5547esac
5548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5549 (eval "$ac_compile") 2>conftest.er1
503d2be0 5550 ac_status=$?
edfaf76d
LK
5551 grep -v '^ *+' conftest.er1 >conftest.err
5552 rm -f conftest.er1
5553 cat conftest.err >&5
c0d27fcc 5554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5555 (exit $ac_status); } && {
5556 test -z "$ac_c_werror_flag" ||
5557 test ! -s conftest.err
5558 } && test -s conftest.$ac_objext; then
503d2be0 5559 break
b192d653 5560else
503d2be0 5561 echo "$as_me: failed program was:" >&5
19650fd6
AS
5562sed 's/^/| /' conftest.$ac_ext >&5
5563
ca81d7a0 5564
503d2be0 5565fi
ca81d7a0
JD
5566
5567rm -f core conftest.err conftest.$ac_objext
5568 CC="$CC -n32"
5569 rm -f conftest.$ac_objext
5570if { (ac_try="$ac_compile"
5571case "(($ac_try" in
5572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5573 *) ac_try_echo=$ac_try;;
5574esac
5575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5576 (eval "$ac_compile") 2>conftest.er1
503d2be0 5577 ac_status=$?
edfaf76d
LK
5578 grep -v '^ *+' conftest.er1 >conftest.err
5579 rm -f conftest.er1
5580 cat conftest.err >&5
c0d27fcc 5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5582 (exit $ac_status); } && {
5583 test -z "$ac_c_werror_flag" ||
5584 test ! -s conftest.err
5585 } && test -s conftest.$ac_objext; then
503d2be0
AS
5586 ac_cv_sys_largefile_CC=' -n32'; break
5587else
5588 echo "$as_me: failed program was:" >&5
19650fd6
AS
5589sed 's/^/| /' conftest.$ac_ext >&5
5590
ca81d7a0 5591
503d2be0 5592fi
ca81d7a0
JD
5593
5594rm -f core conftest.err conftest.$ac_objext
edfaf76d 5595 break
503d2be0
AS
5596 done
5597 CC=$ac_save_CC
5598 rm -f conftest.$ac_ext
5599 fi
b192d653 5600fi
ca81d7a0
JD
5601{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5602echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5603 if test "$ac_cv_sys_largefile_CC" != no; then
5604 CC=$CC$ac_cv_sys_largefile_CC
5605 fi
b192d653 5606
ca81d7a0
JD
5607 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5608echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5609if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5610 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5611else
503d2be0 5612 while :; do
503d2be0 5613 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5614/* confdefs.h. */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h. */
f4988be7 5619#include <sys/types.h>
503d2be0
AS
5620 /* Check that off_t can represent 2**63 - 1 correctly.
5621 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5622 since some C++ compilers masquerading as C compilers
5623 incorrectly reject 9223372036854775807. */
5624#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5625 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5626 && LARGE_OFF_T % 2147483647 == 1)
5627 ? 1 : -1];
5628int
5629main ()
5630{
f4988be7 5631
503d2be0
AS
5632 ;
5633 return 0;
5634}
5635_ACEOF
5636rm -f conftest.$ac_objext
ca81d7a0
JD
5637if { (ac_try="$ac_compile"
5638case "(($ac_try" in
5639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5640 *) ac_try_echo=$ac_try;;
5641esac
5642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5643 (eval "$ac_compile") 2>conftest.er1
503d2be0 5644 ac_status=$?
edfaf76d
LK
5645 grep -v '^ *+' conftest.er1 >conftest.err
5646 rm -f conftest.er1
5647 cat conftest.err >&5
c0d27fcc 5648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5649 (exit $ac_status); } && {
5650 test -z "$ac_c_werror_flag" ||
5651 test ! -s conftest.err
5652 } && test -s conftest.$ac_objext; then
5653 ac_cv_sys_file_offset_bits=no; break
f4988be7 5654else
503d2be0 5655 echo "$as_me: failed program was:" >&5
19650fd6
AS
5656sed 's/^/| /' conftest.$ac_ext >&5
5657
ca81d7a0 5658
503d2be0 5659fi
ca81d7a0
JD
5660
5661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5663/* confdefs.h. */
5664_ACEOF
5665cat confdefs.h >>conftest.$ac_ext
5666cat >>conftest.$ac_ext <<_ACEOF
5667/* end confdefs.h. */
f4988be7
GM
5668#define _FILE_OFFSET_BITS 64
5669#include <sys/types.h>
503d2be0
AS
5670 /* Check that off_t can represent 2**63 - 1 correctly.
5671 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5672 since some C++ compilers masquerading as C compilers
5673 incorrectly reject 9223372036854775807. */
5674#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5675 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5676 && LARGE_OFF_T % 2147483647 == 1)
5677 ? 1 : -1];
5678int
5679main ()
5680{
5681
5682 ;
5683 return 0;
5684}
5685_ACEOF
5686rm -f conftest.$ac_objext
ca81d7a0
JD
5687if { (ac_try="$ac_compile"
5688case "(($ac_try" in
5689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5690 *) ac_try_echo=$ac_try;;
5691esac
5692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5693 (eval "$ac_compile") 2>conftest.er1
503d2be0 5694 ac_status=$?
edfaf76d
LK
5695 grep -v '^ *+' conftest.er1 >conftest.err
5696 rm -f conftest.er1
5697 cat conftest.err >&5
c0d27fcc 5698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5699 (exit $ac_status); } && {
5700 test -z "$ac_c_werror_flag" ||
5701 test ! -s conftest.err
5702 } && test -s conftest.$ac_objext; then
503d2be0
AS
5703 ac_cv_sys_file_offset_bits=64; break
5704else
5705 echo "$as_me: failed program was:" >&5
19650fd6
AS
5706sed 's/^/| /' conftest.$ac_ext >&5
5707
ca81d7a0 5708
503d2be0 5709fi
ca81d7a0
JD
5710
5711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5712 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5713 break
5714done
ba4481b5 5715fi
ca81d7a0
JD
5716{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5717echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5718case $ac_cv_sys_file_offset_bits in #(
5719 no | unknown) ;;
5720 *)
c0d27fcc 5721cat >>confdefs.h <<_ACEOF
f4988be7 5722#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5723_ACEOF
f053c89f
CY
5724;;
5725esac
503d2be0 5726rm -f conftest*
f053c89f
CY
5727 if test $ac_cv_sys_file_offset_bits = unknown; then
5728 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5729echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5730if test "${ac_cv_sys_large_files+set}" = set; then
5731 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5732else
503d2be0 5733 while :; do
503d2be0 5734 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5735/* confdefs.h. */
5736_ACEOF
5737cat confdefs.h >>conftest.$ac_ext
5738cat >>conftest.$ac_ext <<_ACEOF
5739/* end confdefs.h. */
503d2be0
AS
5740#include <sys/types.h>
5741 /* Check that off_t can represent 2**63 - 1 correctly.
5742 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5743 since some C++ compilers masquerading as C compilers
5744 incorrectly reject 9223372036854775807. */
5745#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5746 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5747 && LARGE_OFF_T % 2147483647 == 1)
5748 ? 1 : -1];
5749int
5750main ()
5751{
ba4481b5 5752
503d2be0
AS
5753 ;
5754 return 0;
5755}
5756_ACEOF
5757rm -f conftest.$ac_objext
ca81d7a0
JD
5758if { (ac_try="$ac_compile"
5759case "(($ac_try" in
5760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5761 *) ac_try_echo=$ac_try;;
5762esac
5763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5764 (eval "$ac_compile") 2>conftest.er1
503d2be0 5765 ac_status=$?
edfaf76d
LK
5766 grep -v '^ *+' conftest.er1 >conftest.err
5767 rm -f conftest.er1
5768 cat conftest.err >&5
c0d27fcc 5769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5770 (exit $ac_status); } && {
5771 test -z "$ac_c_werror_flag" ||
5772 test ! -s conftest.err
5773 } && test -s conftest.$ac_objext; then
5774 ac_cv_sys_large_files=no; break
ba4481b5 5775else
503d2be0 5776 echo "$as_me: failed program was:" >&5
19650fd6
AS
5777sed 's/^/| /' conftest.$ac_ext >&5
5778
ca81d7a0 5779
503d2be0 5780fi
ca81d7a0
JD
5781
5782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5784/* confdefs.h. */
5785_ACEOF
5786cat confdefs.h >>conftest.$ac_ext
5787cat >>conftest.$ac_ext <<_ACEOF
5788/* end confdefs.h. */
f4988be7 5789#define _LARGE_FILES 1
503d2be0
AS
5790#include <sys/types.h>
5791 /* Check that off_t can represent 2**63 - 1 correctly.
5792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5793 since some C++ compilers masquerading as C compilers
5794 incorrectly reject 9223372036854775807. */
5795#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5797 && LARGE_OFF_T % 2147483647 == 1)
5798 ? 1 : -1];
5799int
5800main ()
5801{
f4988be7 5802
503d2be0
AS
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
ca81d7a0
JD
5808if { (ac_try="$ac_compile"
5809case "(($ac_try" in
5810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811 *) ac_try_echo=$ac_try;;
5812esac
5813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5814 (eval "$ac_compile") 2>conftest.er1
503d2be0 5815 ac_status=$?
edfaf76d
LK
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
c0d27fcc 5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5820 (exit $ac_status); } && {
5821 test -z "$ac_c_werror_flag" ||
5822 test ! -s conftest.err
5823 } && test -s conftest.$ac_objext; then
503d2be0
AS
5824 ac_cv_sys_large_files=1; break
5825else
5826 echo "$as_me: failed program was:" >&5
19650fd6
AS
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
ca81d7a0 5829
503d2be0 5830fi
ca81d7a0
JD
5831
5832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5833 ac_cv_sys_large_files=unknown
503d2be0
AS
5834 break
5835done
ba4481b5 5836fi
ca81d7a0
JD
5837{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5838echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5839case $ac_cv_sys_large_files in #(
5840 no | unknown) ;;
5841 *)
c0d27fcc 5842cat >>confdefs.h <<_ACEOF
f4988be7 5843#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5844_ACEOF
f053c89f
CY
5845;;
5846esac
503d2be0 5847rm -f conftest*
f053c89f 5848 fi
503d2be0 5849fi
ba4481b5 5850
c0d27fcc 5851
439f58ee 5852
bc5d9888
CY
5853### The standard library on x86-64 GNU/Linux distributions can
5854### be located in either /usr/lib64 or /usr/lib.
5855case "${canonical}" in
eddedb15 5856 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5857 if test -d /usr/lib64; then
5858
5859cat >>confdefs.h <<\_ACEOF
5860#define HAVE_X86_64_LIB64_DIR 1
5861_ACEOF
5862
5863fi
5864esac
5865
439f58ee
JD
5866
5867
5868
2c9dccc9
PJ
5869if test "${with_sound}" != "no"; then
5870 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5871 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5872echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5873if test "${ac_cv_header_stdc+set}" = set; then
5874 echo $ECHO_N "(cached) $ECHO_C" >&6
5875else
5876 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5877/* confdefs.h. */
5878_ACEOF
5879cat confdefs.h >>conftest.$ac_ext
5880cat >>conftest.$ac_ext <<_ACEOF
5881/* end confdefs.h. */
c0d27fcc
MR
5882#include <stdlib.h>
5883#include <stdarg.h>
5884#include <string.h>
5885#include <float.h>
98418dba 5886
19650fd6
AS
5887int
5888main ()
5889{
5890
5891 ;
5892 return 0;
5893}
c0d27fcc 5894_ACEOF
19650fd6 5895rm -f conftest.$ac_objext
ca81d7a0
JD
5896if { (ac_try="$ac_compile"
5897case "(($ac_try" in
5898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5899 *) ac_try_echo=$ac_try;;
5900esac
5901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5902 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5903 ac_status=$?
edfaf76d
LK
5904 grep -v '^ *+' conftest.er1 >conftest.err
5905 rm -f conftest.er1
5906 cat conftest.err >&5
cd958eb3 5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5908 (exit $ac_status); } && {
5909 test -z "$ac_c_werror_flag" ||
5910 test ! -s conftest.err
5911 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5912 ac_cv_header_stdc=yes
5913else
5914 echo "$as_me: failed program was:" >&5
19650fd6
AS
5915sed 's/^/| /' conftest.$ac_ext >&5
5916
ca81d7a0 5917 ac_cv_header_stdc=no
c0d27fcc 5918fi
ca81d7a0
JD
5919
5920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5921
5922if test $ac_cv_header_stdc = yes; then
5923 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5924 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5925/* confdefs.h. */
5926_ACEOF
5927cat confdefs.h >>conftest.$ac_ext
5928cat >>conftest.$ac_ext <<_ACEOF
5929/* end confdefs.h. */
c0d27fcc
MR
5930#include <string.h>
5931
5932_ACEOF
5933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5934 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5935 :
5936else
5937 ac_cv_header_stdc=no
5938fi
5939rm -f conftest*
5940
5941fi
5942
5943if test $ac_cv_header_stdc = yes; then
5944 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5945 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5946/* confdefs.h. */
5947_ACEOF
5948cat confdefs.h >>conftest.$ac_ext
5949cat >>conftest.$ac_ext <<_ACEOF
5950/* end confdefs.h. */
c0d27fcc
MR
5951#include <stdlib.h>
5952
5953_ACEOF
5954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5955 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5956 :
5957else
5958 ac_cv_header_stdc=no
5959fi
5960rm -f conftest*
5961
5962fi
5963
5964if test $ac_cv_header_stdc = yes; then
5965 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5966 if test "$cross_compiling" = yes; then
5967 :
5968else
5969 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5970/* confdefs.h. */
5971_ACEOF
5972cat confdefs.h >>conftest.$ac_ext
5973cat >>conftest.$ac_ext <<_ACEOF
5974/* end confdefs.h. */
c0d27fcc 5975#include <ctype.h>
ca81d7a0 5976#include <stdlib.h>
c0d27fcc
MR
5977#if ((' ' & 0x0FF) == 0x020)
5978# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5979# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5980#else
19650fd6 5981# define ISLOWER(c) \
edfaf76d
LK
5982 (('a' <= (c) && (c) <= 'i') \
5983 || ('j' <= (c) && (c) <= 'r') \
5984 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5985# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5986#endif
5987
5988#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5989int
5990main ()
5991{
5992 int i;
5993 for (i = 0; i < 256; i++)
5994 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5995 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
5996 return 2;
5997 return 0;
c0d27fcc
MR
5998}
5999_ACEOF
6000rm -f conftest$ac_exeext
ca81d7a0
JD
6001if { (ac_try="$ac_link"
6002case "(($ac_try" in
6003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6004 *) ac_try_echo=$ac_try;;
6005esac
6006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6007 (eval "$ac_link") 2>&5
c0d27fcc
MR
6008 ac_status=$?
6009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6011 { (case "(($ac_try" in
6012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6013 *) ac_try_echo=$ac_try;;
6014esac
6015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6016 (eval "$ac_try") 2>&5
c0d27fcc
MR
6017 ac_status=$?
6018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6019 (exit $ac_status); }; }; then
6020 :
6021else
6022 echo "$as_me: program exited with status $ac_status" >&5
6023echo "$as_me: failed program was:" >&5
19650fd6
AS
6024sed 's/^/| /' conftest.$ac_ext >&5
6025
c0d27fcc
MR
6026( exit $ac_status )
6027ac_cv_header_stdc=no
6028fi
ca81d7a0 6029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6030fi
ca81d7a0
JD
6031
6032
c0d27fcc
MR
6033fi
6034fi
ca81d7a0
JD
6035{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6036echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6037if test $ac_cv_header_stdc = yes; then
6038
6039cat >>confdefs.h <<\_ACEOF
6040#define STDC_HEADERS 1
6041_ACEOF
6042
6043fi
6044
6045# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6056 inttypes.h stdint.h unistd.h
98418dba
CW
6057do
6058as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6059{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6060echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6061if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6062 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6063else
925c2f3f 6064 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6065/* confdefs.h. */
6066_ACEOF
6067cat confdefs.h >>conftest.$ac_ext
6068cat >>conftest.$ac_ext <<_ACEOF
6069/* end confdefs.h. */
c0d27fcc
MR
6070$ac_includes_default
6071
6072#include <$ac_header>
6073_ACEOF
6074rm -f conftest.$ac_objext
ca81d7a0
JD
6075if { (ac_try="$ac_compile"
6076case "(($ac_try" in
6077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6078 *) ac_try_echo=$ac_try;;
6079esac
6080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6081 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6082 ac_status=$?
edfaf76d
LK
6083 grep -v '^ *+' conftest.er1 >conftest.err
6084 rm -f conftest.er1
6085 cat conftest.err >&5
c0d27fcc 6086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6087 (exit $ac_status); } && {
6088 test -z "$ac_c_werror_flag" ||
6089 test ! -s conftest.err
6090 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6091 eval "$as_ac_Header=yes"
6092else
6093 echo "$as_me: failed program was:" >&5
19650fd6
AS
6094sed 's/^/| /' conftest.$ac_ext >&5
6095
ca81d7a0 6096 eval "$as_ac_Header=no"
c0d27fcc 6097fi
ca81d7a0
JD
6098
6099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6100fi
ca81d7a0
JD
6101ac_res=`eval echo '${'$as_ac_Header'}'`
6102 { echo "$as_me:$LINENO: result: $ac_res" >&5
6103echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6104if test `eval echo '${'$as_ac_Header'}'` = yes; then
6105 cat >>confdefs.h <<_ACEOF
6106#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6107_ACEOF
6108
6109fi
6110
6111done
6112
6113
6114
6115
6116
6117for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6118do
6119as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6120if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6121 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6122echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6123if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6125fi
ca81d7a0
JD
6126ac_res=`eval echo '${'$as_ac_Header'}'`
6127 { echo "$as_me:$LINENO: result: $ac_res" >&5
6128echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6129else
6130 # Is the header compilable?
ca81d7a0
JD
6131{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6132echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6133cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6134/* confdefs.h. */
6135_ACEOF
6136cat confdefs.h >>conftest.$ac_ext
6137cat >>conftest.$ac_ext <<_ACEOF
6138/* end confdefs.h. */
c0d27fcc 6139$ac_includes_default
98418dba 6140#include <$ac_header>
503d2be0 6141_ACEOF
c0d27fcc 6142rm -f conftest.$ac_objext
ca81d7a0
JD
6143if { (ac_try="$ac_compile"
6144case "(($ac_try" in
6145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6146 *) ac_try_echo=$ac_try;;
6147esac
6148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6149 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6150 ac_status=$?
edfaf76d
LK
6151 grep -v '^ *+' conftest.er1 >conftest.err
6152 rm -f conftest.er1
6153 cat conftest.err >&5
c0d27fcc 6154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6155 (exit $ac_status); } && {
6156 test -z "$ac_c_werror_flag" ||
6157 test ! -s conftest.err
6158 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6159 ac_header_compiler=yes
6160else
6161 echo "$as_me: failed program was:" >&5
19650fd6
AS
6162sed 's/^/| /' conftest.$ac_ext >&5
6163
ca81d7a0 6164 ac_header_compiler=no
c0d27fcc 6165fi
ca81d7a0
JD
6166
6167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6168{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6169echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6170
6171# Is the header present?
ca81d7a0
JD
6172{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6173echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6174cat >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#include <$ac_header>
6181_ACEOF
ca81d7a0
JD
6182if { (ac_try="$ac_cpp conftest.$ac_ext"
6183case "(($ac_try" in
6184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6185 *) ac_try_echo=$ac_try;;
6186esac
6187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6188 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6189 ac_status=$?
6bae0ccf 6190 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6191 rm -f conftest.er1
6192 cat conftest.err >&5
c0d27fcc 6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6194 (exit $ac_status); } >/dev/null && {
6195 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6196 test ! -s conftest.err
6197 }; then
c0d27fcc 6198 ac_header_preproc=yes
f4988be7 6199else
503d2be0 6200 echo "$as_me: failed program was:" >&5
19650fd6
AS
6201sed 's/^/| /' conftest.$ac_ext >&5
6202
c0d27fcc 6203 ac_header_preproc=no
f4988be7 6204fi
ca81d7a0 6205
98418dba 6206rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6207{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6208echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6209
6210# So? What about this header?
edfaf76d
LK
6211case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6212 yes:no: )
c0d27fcc
MR
6213 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6214echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6215 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6216echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6217 ac_header_preproc=yes
19650fd6 6218 ;;
edfaf76d 6219 no:yes:* )
c0d27fcc
MR
6220 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6221echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6222 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6223echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6224 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6225echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6226 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6227echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6229echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6230 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6231echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6232
19650fd6 6233 ;;
c0d27fcc 6234esac
ca81d7a0
JD
6235{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6236echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6237if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6238 echo $ECHO_N "(cached) $ECHO_C" >&6
6239else
edfaf76d 6240 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6241fi
ca81d7a0
JD
6242ac_res=`eval echo '${'$as_ac_Header'}'`
6243 { echo "$as_me:$LINENO: result: $ac_res" >&5
6244echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6245
6246fi
98418dba 6247if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6248 cat >>confdefs.h <<_ACEOF
98418dba 6249#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6250_ACEOF
f4988be7
GM
6251
6252fi
c0d27fcc 6253
98418dba
CW
6254done
6255
6256 # Emulation library used on NetBSD.
ca81d7a0
JD
6257 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6258echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6259if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6260 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6261else
98418dba
CW
6262 ac_check_lib_save_LIBS=$LIBS
6263LIBS="-lossaudio $LIBS"
6264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6265/* confdefs.h. */
6266_ACEOF
6267cat confdefs.h >>conftest.$ac_ext
6268cat >>conftest.$ac_ext <<_ACEOF
6269/* end confdefs.h. */
98418dba 6270
ca81d7a0
JD
6271/* Override any GCC internal prototype to avoid an error.
6272 Use char because int might match the return type of a GCC
6273 builtin and then its argument prototype would still apply. */
98418dba
CW
6274#ifdef __cplusplus
6275extern "C"
f4988be7 6276#endif
98418dba 6277char _oss_ioctl ();
503d2be0
AS
6278int
6279main ()
6280{
ca81d7a0 6281return _oss_ioctl ();
503d2be0
AS
6282 ;
6283 return 0;
6284}
6285_ACEOF
98418dba 6286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6287if { (ac_try="$ac_link"
6288case "(($ac_try" in
6289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6290 *) ac_try_echo=$ac_try;;
6291esac
6292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6293 (eval "$ac_link") 2>conftest.er1
503d2be0 6294 ac_status=$?
edfaf76d
LK
6295 grep -v '^ *+' conftest.er1 >conftest.err
6296 rm -f conftest.er1
6297 cat conftest.err >&5
c0d27fcc 6298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6299 (exit $ac_status); } && {
6300 test -z "$ac_c_werror_flag" ||
6301 test ! -s conftest.err
6302 } && test -s conftest$ac_exeext &&
6303 $as_test_x conftest$ac_exeext; then
98418dba 6304 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6305else
503d2be0 6306 echo "$as_me: failed program was:" >&5
19650fd6
AS
6307sed 's/^/| /' conftest.$ac_ext >&5
6308
ca81d7a0 6309 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6310fi
ca81d7a0 6311
f053c89f 6312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6313 conftest$ac_exeext conftest.$ac_ext
98418dba 6314LIBS=$ac_check_lib_save_LIBS
f4988be7 6315fi
ca81d7a0
JD
6316{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6317echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6318if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6319 LIBSOUND=-lossaudio
6320else
6321 LIBSOUND=
6322fi
6323
c0d27fcc 6324
439f58ee
JD
6325
6326 ALSA_REQUIRED=1.0.0
6327 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6328 if test "X${with_pkg_config_prog}" != X; then
6329 PKG_CONFIG="${with_pkg_config_prog}"
6330 fi
6331
6332 succeeded=no
6333
6334 if test -z "$PKG_CONFIG"; then
6335 # Extract the first word of "pkg-config", so it can be a program name with args.
6336set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6339if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6340 echo $ECHO_N "(cached) $ECHO_C" >&6
6341else
6342 case $PKG_CONFIG in
6343 [\\/]* | ?:[\\/]*)
6344 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6345 ;;
6346 *)
6347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350 IFS=$as_save_IFS
6351 test -z "$as_dir" && as_dir=.
6352 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6354 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6356 break 2
6357 fi
6358done
6359done
ca81d7a0 6360IFS=$as_save_IFS
439f58ee
JD
6361
6362 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6363 ;;
6364esac
6365fi
6366PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6367if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6368 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6369echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6370else
ca81d7a0
JD
6371 { echo "$as_me:$LINENO: result: no" >&5
6372echo "${ECHO_T}no" >&6; }
439f58ee
JD
6373fi
6374
ca81d7a0 6375
439f58ee
JD
6376 fi
6377
6378 if test "$PKG_CONFIG" = "no" ; then
6379 HAVE_ALSA=no
6380 else
6381 PKG_CONFIG_MIN_VERSION=0.9.0
6382 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6383 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6384echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6385
67db6aa2 6386 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6387 { echo "$as_me:$LINENO: result: yes" >&5
6388echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6389 succeeded=yes
6390
ca81d7a0
JD
6391 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6392echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6393 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6394 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6395echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6396
ca81d7a0
JD
6397 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6398echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6399 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6400 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6401echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6402 else
ca81d7a0
JD
6403 { echo "$as_me:$LINENO: result: no" >&5
6404echo "${ECHO_T}no" >&6; }
439f58ee
JD
6405 ALSA_CFLAGS=""
6406 ALSA_LIBS=""
6407 ## If we have a custom action on failure, don't print errors, but
6408 ## do set a variable so people can do so.
6409 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6410
6411 fi
6412
6413
6414
6415 else
6416 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6417 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6418 fi
6419 fi
6420
6421 if test $succeeded = yes; then
6422 HAVE_ALSA=yes
6423 else
6424 HAVE_ALSA=no
6425 fi
6426
6427 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6428 SAVE_CFLAGS="$CFLAGS"
6429 SAVE_LDFLAGS="$LDFLAGS"
6430 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6431 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6432 cat >conftest.$ac_ext <<_ACEOF
6433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
6438#include <asoundlib.h>
6439int
6440main ()
6441{
6442snd_lib_error_set_handler (0);
6443 ;
6444 return 0;
6445}
6446_ACEOF
6447rm -f conftest.$ac_objext
6448if { (ac_try="$ac_compile"
6449case "(($ac_try" in
6450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6451 *) ac_try_echo=$ac_try;;
6452esac
6453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6454 (eval "$ac_compile") 2>conftest.er1
6455 ac_status=$?
6456 grep -v '^ *+' conftest.er1 >conftest.err
6457 rm -f conftest.er1
6458 cat conftest.err >&5
6459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6460 (exit $ac_status); } && {
6461 test -z "$ac_c_werror_flag" ||
6462 test ! -s conftest.err
6463 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6464 emacs_alsa_normal=yes
6465else
6466 echo "$as_me: failed program was:" >&5
6467sed 's/^/| /' conftest.$ac_ext >&5
6468
6469 emacs_alsa_normal=no
6470fi
6471
6472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6473 if test "$emacs_alsa_normal" != yes; then
6474 cat >conftest.$ac_ext <<_ACEOF
6475/* confdefs.h. */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h. */
6480#include <alsa/asoundlib.h>
6481int
6482main ()
6483{
6484snd_lib_error_set_handler (0);
6485 ;
6486 return 0;
6487}
6488_ACEOF
6489rm -f conftest.$ac_objext
6490if { (ac_try="$ac_compile"
6491case "(($ac_try" in
6492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6493 *) ac_try_echo=$ac_try;;
6494esac
6495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6496 (eval "$ac_compile") 2>conftest.er1
6497 ac_status=$?
6498 grep -v '^ *+' conftest.er1 >conftest.err
6499 rm -f conftest.er1
6500 cat conftest.err >&5
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6502 (exit $ac_status); } && {
6503 test -z "$ac_c_werror_flag" ||
6504 test ! -s conftest.err
6505 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6506 emacs_alsa_subdir=yes
6507else
6508 echo "$as_me: failed program was:" >&5
6509sed 's/^/| /' conftest.$ac_ext >&5
6510
6511 emacs_alsa_subdir=no
6512fi
6513
6514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515 if test "$emacs_alsa_subdir" != yes; then
6516 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6517echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6518 { (exit 1); exit 1; }; }
6519 fi
6520 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6521 fi
6522
6523 CFLAGS="$SAVE_CFLAGS"
6524 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6525 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6526 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6527
6528cat >>confdefs.h <<\_ACEOF
6529#define HAVE_ALSA 1
6530_ACEOF
6531
6532 fi
6533
f4988be7 6534fi
c0d27fcc
MR
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
22044edf
DL
6553
6554
973a76b1 6555
cffcede7 6556
551ffc27 6557
226e2359 6558
c0d27fcc 6559
f4988be7 6560
98418dba
CW
6561for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6562 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6563 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6564 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6565 sys/utsname.h pwd.h
98418dba
CW
6566do
6567as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6568if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6569 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6570echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6571if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6572 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6573fi
ca81d7a0
JD
6574ac_res=`eval echo '${'$as_ac_Header'}'`
6575 { echo "$as_me:$LINENO: result: $ac_res" >&5
6576echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6577else
c0d27fcc 6578 # Is the header compilable?
ca81d7a0
JD
6579{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6580echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6581cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6582/* confdefs.h. */
6583_ACEOF
6584cat confdefs.h >>conftest.$ac_ext
6585cat >>conftest.$ac_ext <<_ACEOF
6586/* end confdefs.h. */
c0d27fcc
MR
6587$ac_includes_default
6588#include <$ac_header>
6589_ACEOF
6590rm -f conftest.$ac_objext
ca81d7a0
JD
6591if { (ac_try="$ac_compile"
6592case "(($ac_try" in
6593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6594 *) ac_try_echo=$ac_try;;
6595esac
6596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6597 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6598 ac_status=$?
edfaf76d
LK
6599 grep -v '^ *+' conftest.er1 >conftest.err
6600 rm -f conftest.er1
6601 cat conftest.err >&5
c0d27fcc 6602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6603 (exit $ac_status); } && {
6604 test -z "$ac_c_werror_flag" ||
6605 test ! -s conftest.err
6606 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6607 ac_header_compiler=yes
6608else
6609 echo "$as_me: failed program was:" >&5
19650fd6
AS
6610sed 's/^/| /' conftest.$ac_ext >&5
6611
ca81d7a0 6612 ac_header_compiler=no
c0d27fcc 6613fi
ca81d7a0
JD
6614
6615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6616{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6617echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6618
6619# Is the header present?
ca81d7a0
JD
6620{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6621echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6622cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6623/* confdefs.h. */
6624_ACEOF
6625cat confdefs.h >>conftest.$ac_ext
6626cat >>conftest.$ac_ext <<_ACEOF
6627/* end confdefs.h. */
98418dba 6628#include <$ac_header>
503d2be0 6629_ACEOF
ca81d7a0
JD
6630if { (ac_try="$ac_cpp conftest.$ac_ext"
6631case "(($ac_try" in
6632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6633 *) ac_try_echo=$ac_try;;
6634esac
6635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6637 ac_status=$?
6bae0ccf 6638 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6639 rm -f conftest.er1
6640 cat conftest.err >&5
c0d27fcc 6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6642 (exit $ac_status); } >/dev/null && {
6643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6644 test ! -s conftest.err
6645 }; then
c0d27fcc 6646 ac_header_preproc=yes
34ec9ebe 6647else
503d2be0 6648 echo "$as_me: failed program was:" >&5
19650fd6
AS
6649sed 's/^/| /' conftest.$ac_ext >&5
6650
c0d27fcc 6651 ac_header_preproc=no
34ec9ebe 6652fi
ca81d7a0 6653
98418dba 6654rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6655{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6656echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6657
6658# So? What about this header?
edfaf76d
LK
6659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6660 yes:no: )
c0d27fcc
MR
6661 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6662echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6663 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6664echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6665 ac_header_preproc=yes
19650fd6 6666 ;;
edfaf76d 6667 no:yes:* )
c0d27fcc
MR
6668 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6669echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6670 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6671echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6672 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6673echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6674 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6675echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6676 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6677echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6678 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6679echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6680
19650fd6 6681 ;;
c0d27fcc 6682esac
ca81d7a0
JD
6683{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6684echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6685if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6686 echo $ECHO_N "(cached) $ECHO_C" >&6
6687else
edfaf76d 6688 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6689fi
ca81d7a0
JD
6690ac_res=`eval echo '${'$as_ac_Header'}'`
6691 { echo "$as_me:$LINENO: result: $ac_res" >&5
6692echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6693
6694fi
98418dba 6695if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6696 cat >>confdefs.h <<_ACEOF
98418dba 6697#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6698_ACEOF
34ec9ebe 6699
98418dba 6700fi
c0d27fcc 6701
98418dba
CW
6702done
6703
22044edf 6704
ca81d7a0
JD
6705{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6706echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6707cat >conftest.$ac_ext <<_ACEOF
6708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
6713#include <sys/personality.h>
6714int
6715main ()
6716{
6717personality (PER_LINUX32)
6718 ;
6719 return 0;
6720}
6721_ACEOF
6722rm -f conftest.$ac_objext
ca81d7a0
JD
6723if { (ac_try="$ac_compile"
6724case "(($ac_try" in
6725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6726 *) ac_try_echo=$ac_try;;
6727esac
6728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6729 (eval "$ac_compile") 2>conftest.er1
f17e308a 6730 ac_status=$?
edfaf76d
LK
6731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
f17e308a 6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6735 (exit $ac_status); } && {
6736 test -z "$ac_c_werror_flag" ||
6737 test ! -s conftest.err
6738 } && test -s conftest.$ac_objext; then
f17e308a
JD
6739 emacs_cv_personality_linux32=yes
6740else
6741 echo "$as_me: failed program was:" >&5
6742sed 's/^/| /' conftest.$ac_ext >&5
6743
ca81d7a0 6744 emacs_cv_personality_linux32=no
f17e308a 6745fi
ca81d7a0
JD
6746
6747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6748{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6749echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6750
6751if test $emacs_cv_personality_linux32 = yes; then
6752
6753cat >>confdefs.h <<\_ACEOF
6754#define HAVE_PERSONALITY_LINUX32 1
6755_ACEOF
6756
6757fi
6758
6759
22044edf
DL
6760for ac_header in term.h
6761do
6762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6763{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6764echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6765if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6766 echo $ECHO_N "(cached) $ECHO_C" >&6
6767else
6768 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6769/* confdefs.h. */
6770_ACEOF
6771cat confdefs.h >>conftest.$ac_ext
6772cat >>conftest.$ac_ext <<_ACEOF
6773/* end confdefs.h. */
22044edf
DL
6774#include <$ac_header>
6775_ACEOF
ca81d7a0
JD
6776if { (ac_try="$ac_cpp conftest.$ac_ext"
6777case "(($ac_try" in
6778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6779 *) ac_try_echo=$ac_try;;
6780esac
6781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6782 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6783 ac_status=$?
6784 grep -v '^ *+' conftest.er1 >conftest.err
6785 rm -f conftest.er1
6786 cat conftest.err >&5
6787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6788 (exit $ac_status); } >/dev/null && {
6789 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6790 test ! -s conftest.err
6791 }; then
22044edf
DL
6792 eval "$as_ac_Header=yes"
6793else
6794 echo "$as_me: failed program was:" >&5
19650fd6
AS
6795sed 's/^/| /' conftest.$ac_ext >&5
6796
22044edf
DL
6797 eval "$as_ac_Header=no"
6798fi
ca81d7a0 6799
22044edf
DL
6800rm -f conftest.err conftest.$ac_ext
6801fi
ca81d7a0
JD
6802ac_res=`eval echo '${'$as_ac_Header'}'`
6803 { echo "$as_me:$LINENO: result: $ac_res" >&5
6804echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6805if test `eval echo '${'$as_ac_Header'}'` = yes; then
6806 cat >>confdefs.h <<_ACEOF
6807#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6808_ACEOF
6809
6810fi
6811
6812done
6813
ca81d7a0
JD
6814{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6815echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6816if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6817 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6818else
503d2be0 6819 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6820/* confdefs.h. */
6821_ACEOF
6822cat confdefs.h >>conftest.$ac_ext
6823cat >>conftest.$ac_ext <<_ACEOF
6824/* end confdefs.h. */
98418dba
CW
6825#include <stdlib.h>
6826#include <stdarg.h>
6827#include <string.h>
6828#include <float.h>
6829
19650fd6
AS
6830int
6831main ()
6832{
6833
6834 ;
6835 return 0;
6836}
98418dba 6837_ACEOF
19650fd6 6838rm -f conftest.$ac_objext
ca81d7a0
JD
6839if { (ac_try="$ac_compile"
6840case "(($ac_try" in
6841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6842 *) ac_try_echo=$ac_try;;
6843esac
6844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6845 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6846 ac_status=$?
edfaf76d
LK
6847 grep -v '^ *+' conftest.er1 >conftest.err
6848 rm -f conftest.er1
6849 cat conftest.err >&5
cd958eb3 6850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6851 (exit $ac_status); } && {
6852 test -z "$ac_c_werror_flag" ||
6853 test ! -s conftest.err
6854 } && test -s conftest.$ac_objext; then
98418dba 6855 ac_cv_header_stdc=yes
ba4481b5 6856else
503d2be0 6857 echo "$as_me: failed program was:" >&5
19650fd6
AS
6858sed 's/^/| /' conftest.$ac_ext >&5
6859
ca81d7a0 6860 ac_cv_header_stdc=no
ba4481b5 6861fi
ca81d7a0
JD
6862
6863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6864
6865if test $ac_cv_header_stdc = yes; then
6866 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
98418dba
CW
6873#include <string.h>
6874
6875_ACEOF
6876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6877 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6878 :
6879else
6880 ac_cv_header_stdc=no
ba4481b5 6881fi
98418dba 6882rm -f conftest*
ba4481b5
DL
6883
6884fi
6885
98418dba
CW
6886if test $ac_cv_header_stdc = yes; then
6887 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6888 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6889/* confdefs.h. */
6890_ACEOF
6891cat confdefs.h >>conftest.$ac_ext
6892cat >>conftest.$ac_ext <<_ACEOF
6893/* end confdefs.h. */
98418dba
CW
6894#include <stdlib.h>
6895
6896_ACEOF
6897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6898 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6899 :
6900else
6901 ac_cv_header_stdc=no
6902fi
6903rm -f conftest*
6904
6905fi
6906
6907if test $ac_cv_header_stdc = yes; then
6908 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6909 if test "$cross_compiling" = yes; then
6910 :
d42122a3 6911else
503d2be0 6912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6913/* confdefs.h. */
6914_ACEOF
6915cat confdefs.h >>conftest.$ac_ext
6916cat >>conftest.$ac_ext <<_ACEOF
6917/* end confdefs.h. */
98418dba 6918#include <ctype.h>
ca81d7a0 6919#include <stdlib.h>
98418dba
CW
6920#if ((' ' & 0x0FF) == 0x020)
6921# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6922# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6923#else
19650fd6 6924# define ISLOWER(c) \
edfaf76d
LK
6925 (('a' <= (c) && (c) <= 'i') \
6926 || ('j' <= (c) && (c) <= 'r') \
6927 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6928# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6929#endif
6930
6931#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6932int
6933main ()
6934{
98418dba
CW
6935 int i;
6936 for (i = 0; i < 256; i++)
6937 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6938 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6939 return 2;
6940 return 0;
503d2be0
AS
6941}
6942_ACEOF
98418dba 6943rm -f conftest$ac_exeext
ca81d7a0
JD
6944if { (ac_try="$ac_link"
6945case "(($ac_try" in
6946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6947 *) ac_try_echo=$ac_try;;
6948esac
6949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6950 (eval "$ac_link") 2>&5
503d2be0 6951 ac_status=$?
c0d27fcc 6952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6954 { (case "(($ac_try" in
6955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6956 *) ac_try_echo=$ac_try;;
6957esac
6958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6959 (eval "$ac_try") 2>&5
503d2be0 6960 ac_status=$?
c0d27fcc 6961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6962 (exit $ac_status); }; }; then
98418dba 6963 :
d42122a3 6964else
98418dba
CW
6965 echo "$as_me: program exited with status $ac_status" >&5
6966echo "$as_me: failed program was:" >&5
19650fd6
AS
6967sed 's/^/| /' conftest.$ac_ext >&5
6968
c0d27fcc 6969( exit $ac_status )
98418dba 6970ac_cv_header_stdc=no
d42122a3 6971fi
ca81d7a0 6972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6973fi
ca81d7a0
JD
6974
6975
98418dba
CW
6976fi
6977fi
ca81d7a0
JD
6978{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6979echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6980if test $ac_cv_header_stdc = yes; then
6981
c0d27fcc 6982cat >>confdefs.h <<\_ACEOF
98418dba 6983#define STDC_HEADERS 1
c0d27fcc 6984_ACEOF
d42122a3
DL
6985
6986fi
6987
ca81d7a0
JD
6988{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6989echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6990if test "${ac_cv_header_time+set}" = set; then
503d2be0 6991 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6992else
503d2be0 6993 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6994/* confdefs.h. */
6995_ACEOF
6996cat confdefs.h >>conftest.$ac_ext
6997cat >>conftest.$ac_ext <<_ACEOF
6998/* end confdefs.h. */
ba4481b5 6999#include <sys/types.h>
98418dba 7000#include <sys/time.h>
ba4481b5 7001#include <time.h>
503d2be0
AS
7002
7003int
7004main ()
7005{
98418dba
CW
7006if ((struct tm *) 0)
7007return 0;
503d2be0
AS
7008 ;
7009 return 0;
7010}
7011_ACEOF
7012rm -f conftest.$ac_objext
ca81d7a0
JD
7013if { (ac_try="$ac_compile"
7014case "(($ac_try" in
7015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7016 *) ac_try_echo=$ac_try;;
7017esac
7018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7019 (eval "$ac_compile") 2>conftest.er1
503d2be0 7020 ac_status=$?
edfaf76d
LK
7021 grep -v '^ *+' conftest.er1 >conftest.err
7022 rm -f conftest.er1
7023 cat conftest.err >&5
c0d27fcc 7024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7025 (exit $ac_status); } && {
7026 test -z "$ac_c_werror_flag" ||
7027 test ! -s conftest.err
7028 } && test -s conftest.$ac_objext; then
98418dba 7029 ac_cv_header_time=yes
ba4481b5 7030else
503d2be0 7031 echo "$as_me: failed program was:" >&5
19650fd6
AS
7032sed 's/^/| /' conftest.$ac_ext >&5
7033
ca81d7a0 7034 ac_cv_header_time=no
ba4481b5 7035fi
ca81d7a0
JD
7036
7037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7038fi
ca81d7a0
JD
7039{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7040echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7041if test $ac_cv_header_time = yes; then
503d2be0 7042
c0d27fcc 7043cat >>confdefs.h <<\_ACEOF
98418dba 7044#define TIME_WITH_SYS_TIME 1
c0d27fcc 7045_ACEOF
ba4481b5
DL
7046
7047fi
7048
ca81d7a0
JD
7049{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7050echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7051if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7052 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7053else
503d2be0 7054 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7055/* confdefs.h. */
7056_ACEOF
7057cat confdefs.h >>conftest.$ac_ext
7058cat >>conftest.$ac_ext <<_ACEOF
7059/* end confdefs.h. */
cd958eb3
MB
7060$ac_includes_default
7061int
7062main ()
7063{
7064#ifndef sys_siglist
f053c89f 7065 (void) sys_siglist;
98418dba 7066#endif
503d2be0 7067
cd958eb3
MB
7068 ;
7069 return 0;
7070}
7071_ACEOF
7072rm -f conftest.$ac_objext
ca81d7a0
JD
7073if { (ac_try="$ac_compile"
7074case "(($ac_try" in
7075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7076 *) ac_try_echo=$ac_try;;
7077esac
7078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7079 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7080 ac_status=$?
edfaf76d
LK
7081 grep -v '^ *+' conftest.er1 >conftest.err
7082 rm -f conftest.er1
7083 cat conftest.err >&5
cd958eb3 7084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7085 (exit $ac_status); } && {
7086 test -z "$ac_c_werror_flag" ||
7087 test ! -s conftest.err
7088 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7089 ac_cv_have_decl_sys_siglist=yes
7090else
7091 echo "$as_me: failed program was:" >&5
19650fd6
AS
7092sed 's/^/| /' conftest.$ac_ext >&5
7093
ca81d7a0 7094 ac_cv_have_decl_sys_siglist=no
cd958eb3 7095fi
ca81d7a0
JD
7096
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7098fi
ca81d7a0
JD
7099{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7100echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7101if test $ac_cv_have_decl_sys_siglist = yes; then
7102
7103cat >>confdefs.h <<_ACEOF
7104#define HAVE_DECL_SYS_SIGLIST 1
7105_ACEOF
7106
7107
7108else
7109 cat >>confdefs.h <<_ACEOF
7110#define HAVE_DECL_SYS_SIGLIST 0
7111_ACEOF
7112
7113
7114fi
7115
7116
7117if test $ac_cv_have_decl_sys_siglist != yes; then
7118 # For Tru64, at least:
ca81d7a0
JD
7119 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7120echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7121if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7123else
7124 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7125/* confdefs.h. */
7126_ACEOF
7127cat confdefs.h >>conftest.$ac_ext
7128cat >>conftest.$ac_ext <<_ACEOF
7129/* end confdefs.h. */
cd958eb3 7130$ac_includes_default
503d2be0
AS
7131int
7132main ()
7133{
cd958eb3 7134#ifndef __sys_siglist
f053c89f 7135 (void) __sys_siglist;
cd958eb3
MB
7136#endif
7137
503d2be0
AS
7138 ;
7139 return 0;
7140}
7141_ACEOF
7142rm -f conftest.$ac_objext
ca81d7a0
JD
7143if { (ac_try="$ac_compile"
7144case "(($ac_try" in
7145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7146 *) ac_try_echo=$ac_try;;
7147esac
7148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7149 (eval "$ac_compile") 2>conftest.er1
503d2be0 7150 ac_status=$?
edfaf76d
LK
7151 grep -v '^ *+' conftest.er1 >conftest.err
7152 rm -f conftest.er1
7153 cat conftest.err >&5
c0d27fcc 7154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7155 (exit $ac_status); } && {
7156 test -z "$ac_c_werror_flag" ||
7157 test ! -s conftest.err
7158 } && test -s conftest.$ac_objext; then
cd958eb3 7159 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7160else
503d2be0 7161 echo "$as_me: failed program was:" >&5
19650fd6
AS
7162sed 's/^/| /' conftest.$ac_ext >&5
7163
ca81d7a0 7164 ac_cv_have_decl___sys_siglist=no
ba4481b5 7165fi
ca81d7a0
JD
7166
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7168fi
ca81d7a0
JD
7169{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7170echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7171if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7172
cd958eb3
MB
7173cat >>confdefs.h <<_ACEOF
7174#define HAVE_DECL___SYS_SIGLIST 1
7175_ACEOF
7176
7177
7178else
7179 cat >>confdefs.h <<_ACEOF
7180#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7181_ACEOF
503d2be0 7182
cd958eb3 7183
ba4481b5
DL
7184fi
7185
cd958eb3
MB
7186
7187 if test $ac_cv_have_decl___sys_siglist = yes; then
7188
7189cat >>confdefs.h <<\_ACEOF
7190#define sys_siglist __sys_siglist
7191_ACEOF
7192
7193 fi
7194fi
ca81d7a0
JD
7195{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7196echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7197if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7198 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7199else
503d2be0 7200 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7201/* confdefs.h. */
7202_ACEOF
7203cat confdefs.h >>conftest.$ac_ext
7204cat >>conftest.$ac_ext <<_ACEOF
7205/* end confdefs.h. */
98418dba
CW
7206#include <sys/types.h>
7207#include <sys/wait.h>
7208#ifndef WEXITSTATUS
ca81d7a0 7209# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7210#endif
7211#ifndef WIFEXITED
7212# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7213#endif
503d2be0
AS
7214
7215int
7216main ()
7217{
98418dba
CW
7218 int s;
7219 wait (&s);
7220 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7221 ;
7222 return 0;
7223}
7224_ACEOF
98418dba 7225rm -f conftest.$ac_objext
ca81d7a0
JD
7226if { (ac_try="$ac_compile"
7227case "(($ac_try" in
7228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7229 *) ac_try_echo=$ac_try;;
7230esac
7231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7232 (eval "$ac_compile") 2>conftest.er1
503d2be0 7233 ac_status=$?
edfaf76d
LK
7234 grep -v '^ *+' conftest.er1 >conftest.err
7235 rm -f conftest.er1
7236 cat conftest.err >&5
c0d27fcc 7237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7238 (exit $ac_status); } && {
7239 test -z "$ac_c_werror_flag" ||
7240 test ! -s conftest.err
7241 } && test -s conftest.$ac_objext; then
98418dba 7242 ac_cv_header_sys_wait_h=yes
ba4481b5 7243else
503d2be0 7244 echo "$as_me: failed program was:" >&5
19650fd6
AS
7245sed 's/^/| /' conftest.$ac_ext >&5
7246
ca81d7a0 7247 ac_cv_header_sys_wait_h=no
ba4481b5 7248fi
ca81d7a0
JD
7249
7250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7251fi
ca81d7a0
JD
7252{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7253echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7254if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7255
c0d27fcc 7256cat >>confdefs.h <<\_ACEOF
98418dba 7257#define HAVE_SYS_WAIT_H 1
c0d27fcc 7258_ACEOF
ba4481b5 7259
ba4481b5
DL
7260fi
7261
c0d27fcc 7262
ca81d7a0
JD
7263{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7264echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7265if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7266 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7267else
503d2be0 7268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
98418dba
CW
7274#ifdef TIME_WITH_SYS_TIME
7275#include <sys/time.h>
7276#include <time.h>
7277#else
7278#ifdef HAVE_SYS_TIME_H
7279#include <sys/time.h>
7280#else
1113b624 7281#include <time.h>
98418dba
CW
7282#endif
7283#endif
7284#ifdef HAVE_UTIME_H
7285#include <utime.h>
7286#endif
503d2be0
AS
7287int
7288main ()
7289{
98418dba 7290static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7291 ;
7292 return 0;
7293}
7294_ACEOF
98418dba 7295rm -f conftest.$ac_objext
ca81d7a0
JD
7296if { (ac_try="$ac_compile"
7297case "(($ac_try" in
7298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7299 *) ac_try_echo=$ac_try;;
7300esac
7301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7302 (eval "$ac_compile") 2>conftest.er1
503d2be0 7303 ac_status=$?
edfaf76d
LK
7304 grep -v '^ *+' conftest.er1 >conftest.err
7305 rm -f conftest.er1
7306 cat conftest.err >&5
c0d27fcc 7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7308 (exit $ac_status); } && {
7309 test -z "$ac_c_werror_flag" ||
7310 test ! -s conftest.err
7311 } && test -s conftest.$ac_objext; then
98418dba 7312 emacs_cv_struct_utimbuf=yes
1113b624 7313else
503d2be0 7314 echo "$as_me: failed program was:" >&5
19650fd6
AS
7315sed 's/^/| /' conftest.$ac_ext >&5
7316
ca81d7a0 7317 emacs_cv_struct_utimbuf=no
1113b624 7318fi
ca81d7a0
JD
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7321fi
ca81d7a0
JD
7322{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7323echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7324if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7325
c0d27fcc 7326cat >>confdefs.h <<\_ACEOF
98418dba 7327#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7328_ACEOF
1113b624
PE
7329
7330fi
ba4481b5 7331
ca81d7a0
JD
7332{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7333echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7334if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7335 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7336else
98418dba 7337 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7338/* confdefs.h. */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h. */
7397acc4 7343#include <sys/types.h>
98418dba 7344#include <signal.h>
98418dba 7345
503d2be0
AS
7346int
7347main ()
7348{
ca81d7a0 7349return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7350 ;
7351 return 0;
7352}
7353_ACEOF
98418dba 7354rm -f conftest.$ac_objext
ca81d7a0
JD
7355if { (ac_try="$ac_compile"
7356case "(($ac_try" in
7357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7358 *) ac_try_echo=$ac_try;;
7359esac
7360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7361 (eval "$ac_compile") 2>conftest.er1
503d2be0 7362 ac_status=$?
edfaf76d
LK
7363 grep -v '^ *+' conftest.er1 >conftest.err
7364 rm -f conftest.er1
7365 cat conftest.err >&5
c0d27fcc 7366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7367 (exit $ac_status); } && {
7368 test -z "$ac_c_werror_flag" ||
7369 test ! -s conftest.err
7370 } && test -s conftest.$ac_objext; then
ca81d7a0 7371 ac_cv_type_signal=int
503d2be0
AS
7372else
7373 echo "$as_me: failed program was:" >&5
19650fd6
AS
7374sed 's/^/| /' conftest.$ac_ext >&5
7375
ca81d7a0 7376 ac_cv_type_signal=void
503d2be0 7377fi
ca81d7a0
JD
7378
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7380fi
ca81d7a0
JD
7381{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7382echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7383
c0d27fcc 7384cat >>confdefs.h <<_ACEOF
98418dba 7385#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7386_ACEOF
7387
503d2be0 7388
c0d27fcc 7389
ca81d7a0
JD
7390{ echo "$as_me:$LINENO: checking for speed_t" >&5
7391echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7392if test "${emacs_cv_speed_t+set}" = set; then
7393 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7394else
98418dba 7395 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7396/* confdefs.h. */
7397_ACEOF
7398cat confdefs.h >>conftest.$ac_ext
7399cat >>conftest.$ac_ext <<_ACEOF
7400/* end confdefs.h. */
98418dba 7401#include <termios.h>
98418dba
CW
7402int
7403main ()
7404{
7405speed_t x = 1;
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
ca81d7a0
JD
7411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
7416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7417 (eval "$ac_compile") 2>conftest.er1
98418dba 7418 ac_status=$?
edfaf76d
LK
7419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
c0d27fcc 7422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
98418dba
CW
7427 emacs_cv_speed_t=yes
7428else
7429 echo "$as_me: failed program was:" >&5
19650fd6
AS
7430sed 's/^/| /' conftest.$ac_ext >&5
7431
ca81d7a0 7432 emacs_cv_speed_t=no
98418dba 7433fi
ca81d7a0
JD
7434
7435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7436fi
ca81d7a0
JD
7437{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7438echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7439if test $emacs_cv_speed_t = yes; then
b936fae4 7440
c0d27fcc 7441cat >>confdefs.h <<\_ACEOF
98418dba 7442#define HAVE_SPEED_T 1
c0d27fcc 7443_ACEOF
98418dba 7444
7397acc4
DL
7445fi
7446
ca81d7a0
JD
7447{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7448echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7449if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7450 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7451else
503d2be0 7452 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7453/* confdefs.h. */
7454_ACEOF
7455cat confdefs.h >>conftest.$ac_ext
7456cat >>conftest.$ac_ext <<_ACEOF
7457/* end confdefs.h. */
98418dba
CW
7458#ifdef TIME_WITH_SYS_TIME
7459#include <sys/time.h>
7460#include <time.h>
7461#else
7462#ifdef HAVE_SYS_TIME_H
7463#include <sys/time.h>
7464#else
7465#include <time.h>
7466#endif
7467#endif
503d2be0
AS
7468int
7469main ()
7470{
98418dba 7471static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
ca81d7a0
JD
7477if { (ac_try="$ac_compile"
7478case "(($ac_try" in
7479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7480 *) ac_try_echo=$ac_try;;
7481esac
7482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7483 (eval "$ac_compile") 2>conftest.er1
503d2be0 7484 ac_status=$?
edfaf76d
LK
7485 grep -v '^ *+' conftest.er1 >conftest.err
7486 rm -f conftest.er1
7487 cat conftest.err >&5
c0d27fcc 7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7489 (exit $ac_status); } && {
7490 test -z "$ac_c_werror_flag" ||
7491 test ! -s conftest.err
7492 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7493 emacs_cv_struct_timeval=yes
7494else
503d2be0 7495 echo "$as_me: failed program was:" >&5
19650fd6
AS
7496sed 's/^/| /' conftest.$ac_ext >&5
7497
ca81d7a0 7498 emacs_cv_struct_timeval=no
7397acc4 7499fi
ca81d7a0
JD
7500
7501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7502fi
ca81d7a0
JD
7503{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7504echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7505HAVE_TIMEVAL=$emacs_cv_struct_timeval
7506if test $emacs_cv_struct_timeval = yes; then
b936fae4 7507
c0d27fcc 7508cat >>confdefs.h <<\_ACEOF
98418dba 7509#define HAVE_TIMEVAL 1
c0d27fcc 7510_ACEOF
7397acc4
DL
7511
7512fi
7513
ca81d7a0
JD
7514{ echo "$as_me:$LINENO: checking for struct exception" >&5
7515echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7516if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7517 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7518else
503d2be0 7519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7520/* confdefs.h. */
7521_ACEOF
7522cat confdefs.h >>conftest.$ac_ext
7523cat >>conftest.$ac_ext <<_ACEOF
7524/* end confdefs.h. */
98418dba 7525#include <math.h>
503d2be0
AS
7526int
7527main ()
7528{
98418dba 7529static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7530 ;
7531 return 0;
ba4481b5 7532}
503d2be0
AS
7533_ACEOF
7534rm -f conftest.$ac_objext
ca81d7a0
JD
7535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
7540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7541 (eval "$ac_compile") 2>conftest.er1
503d2be0 7542 ac_status=$?
edfaf76d
LK
7543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
c0d27fcc 7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
98418dba 7551 emacs_cv_struct_exception=yes
ba4481b5 7552else
503d2be0 7553 echo "$as_me: failed program was:" >&5
19650fd6
AS
7554sed 's/^/| /' conftest.$ac_ext >&5
7555
ca81d7a0 7556 emacs_cv_struct_exception=no
ba4481b5 7557fi
ca81d7a0
JD
7558
7559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7560fi
ca81d7a0
JD
7561{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7562echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7563HAVE_EXCEPTION=$emacs_cv_struct_exception
7564if test $emacs_cv_struct_exception != yes; then
b936fae4 7565
c0d27fcc 7566cat >>confdefs.h <<\_ACEOF
98418dba 7567#define NO_MATHERR 1
c0d27fcc 7568_ACEOF
ba4481b5
DL
7569
7570fi
7571
7862d3a8
AS
7572
7573for ac_header in sys/socket.h
7574do
7575as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7576if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7577 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7578echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7579if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7581fi
ca81d7a0
JD
7582ac_res=`eval echo '${'$as_ac_Header'}'`
7583 { echo "$as_me:$LINENO: result: $ac_res" >&5
7584echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7585else
7586 # Is the header compilable?
ca81d7a0
JD
7587{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7588echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7589cat >conftest.$ac_ext <<_ACEOF
7590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
7595$ac_includes_default
7596#include <$ac_header>
7597_ACEOF
7598rm -f conftest.$ac_objext
ca81d7a0
JD
7599if { (ac_try="$ac_compile"
7600case "(($ac_try" in
7601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602 *) ac_try_echo=$ac_try;;
7603esac
7604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7605 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7606 ac_status=$?
edfaf76d
LK
7607 grep -v '^ *+' conftest.er1 >conftest.err
7608 rm -f conftest.er1
7609 cat conftest.err >&5
7862d3a8 7610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7611 (exit $ac_status); } && {
7612 test -z "$ac_c_werror_flag" ||
7613 test ! -s conftest.err
7614 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7615 ac_header_compiler=yes
7616else
7617 echo "$as_me: failed program was:" >&5
7618sed 's/^/| /' conftest.$ac_ext >&5
7619
ca81d7a0 7620 ac_header_compiler=no
7862d3a8 7621fi
ca81d7a0
JD
7622
7623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7624{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7625echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7626
7627# Is the header present?
ca81d7a0
JD
7628{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7629echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7630cat >conftest.$ac_ext <<_ACEOF
7631/* confdefs.h. */
7632_ACEOF
7633cat confdefs.h >>conftest.$ac_ext
7634cat >>conftest.$ac_ext <<_ACEOF
7635/* end confdefs.h. */
7636#include <$ac_header>
7637_ACEOF
ca81d7a0
JD
7638if { (ac_try="$ac_cpp conftest.$ac_ext"
7639case "(($ac_try" in
7640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7641 *) ac_try_echo=$ac_try;;
7642esac
7643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7644 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7645 ac_status=$?
7646 grep -v '^ *+' conftest.er1 >conftest.err
7647 rm -f conftest.er1
7648 cat conftest.err >&5
7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7650 (exit $ac_status); } >/dev/null && {
7651 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7652 test ! -s conftest.err
7653 }; then
7862d3a8
AS
7654 ac_header_preproc=yes
7655else
7656 echo "$as_me: failed program was:" >&5
7657sed 's/^/| /' conftest.$ac_ext >&5
7658
7659 ac_header_preproc=no
7660fi
ca81d7a0 7661
7862d3a8 7662rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7663{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7664echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7665
7666# So? What about this header?
edfaf76d
LK
7667case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7668 yes:no: )
7862d3a8
AS
7669 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7670echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7671 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7672echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7673 ac_header_preproc=yes
7862d3a8 7674 ;;
edfaf76d 7675 no:yes:* )
7862d3a8
AS
7676 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7677echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7678 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7679echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7680 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7681echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7682 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7683echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7684 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7685echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7686 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7687echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7688
7862d3a8
AS
7689 ;;
7690esac
ca81d7a0
JD
7691{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7692echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7693if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7694 echo $ECHO_N "(cached) $ECHO_C" >&6
7695else
edfaf76d 7696 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7697fi
ca81d7a0
JD
7698ac_res=`eval echo '${'$as_ac_Header'}'`
7699 { echo "$as_me:$LINENO: result: $ac_res" >&5
7700echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7701
7702fi
7703if test `eval echo '${'$as_ac_Header'}'` = yes; then
7704 cat >>confdefs.h <<_ACEOF
7705#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7706_ACEOF
7707
7708fi
7709
7710done
7711
7712
7713for ac_header in net/if.h
7714do
7715as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7716{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7717echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7718if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7719 echo $ECHO_N "(cached) $ECHO_C" >&6
7720else
7721 cat >conftest.$ac_ext <<_ACEOF
7722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
7727$ac_includes_default
7728#if HAVE_SYS_SOCKET_H
7729#include <sys/socket.h>
7730#endif
7731
7732#include <$ac_header>
7733_ACEOF
7734rm -f conftest.$ac_objext
ca81d7a0
JD
7735if { (ac_try="$ac_compile"
7736case "(($ac_try" in
7737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7738 *) ac_try_echo=$ac_try;;
7739esac
7740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7741 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7742 ac_status=$?
edfaf76d
LK
7743 grep -v '^ *+' conftest.er1 >conftest.err
7744 rm -f conftest.er1
7745 cat conftest.err >&5
7862d3a8 7746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7747 (exit $ac_status); } && {
7748 test -z "$ac_c_werror_flag" ||
7749 test ! -s conftest.err
7750 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7751 eval "$as_ac_Header=yes"
7752else
7753 echo "$as_me: failed program was:" >&5
7754sed 's/^/| /' conftest.$ac_ext >&5
7755
ca81d7a0 7756 eval "$as_ac_Header=no"
7862d3a8 7757fi
ca81d7a0
JD
7758
7759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7760fi
ca81d7a0
JD
7761ac_res=`eval echo '${'$as_ac_Header'}'`
7762 { echo "$as_me:$LINENO: result: $ac_res" >&5
7763echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7764if test `eval echo '${'$as_ac_Header'}'` = yes; then
7765 cat >>confdefs.h <<_ACEOF
7766#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7767_ACEOF
7768
7769fi
7770
7771done
7772
7773
ca81d7a0
JD
7774{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7775echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7776if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7777 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7778else
503d2be0 7779 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
98418dba
CW
7785#include <sys/types.h>
7786#include <time.h>
7397acc4 7787
503d2be0
AS
7788int
7789main ()
7790{
f053c89f
CY
7791struct tm tm;
7792 int *p = &tm.tm_sec;
7793 return !p;
503d2be0
AS
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798rm -f conftest.$ac_objext
ca81d7a0
JD
7799if { (ac_try="$ac_compile"
7800case "(($ac_try" in
7801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7802 *) ac_try_echo=$ac_try;;
7803esac
7804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7805 (eval "$ac_compile") 2>conftest.er1
503d2be0 7806 ac_status=$?
edfaf76d
LK
7807 grep -v '^ *+' conftest.er1 >conftest.err
7808 rm -f conftest.er1
7809 cat conftest.err >&5
c0d27fcc 7810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7811 (exit $ac_status); } && {
7812 test -z "$ac_c_werror_flag" ||
7813 test ! -s conftest.err
7814 } && test -s conftest.$ac_objext; then
35996d22
AS
7815 ac_cv_struct_tm=time.h
7816else
503d2be0 7817 echo "$as_me: failed program was:" >&5
19650fd6
AS
7818sed 's/^/| /' conftest.$ac_ext >&5
7819
ca81d7a0 7820 ac_cv_struct_tm=sys/time.h
7397acc4 7821fi
ca81d7a0
JD
7822
7823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7824fi
ca81d7a0
JD
7825{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7826echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7827if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7828
c0d27fcc 7829cat >>confdefs.h <<\_ACEOF
98418dba 7830#define TM_IN_SYS_TIME 1
c0d27fcc 7831_ACEOF
7397acc4
DL
7832
7833fi
ba4481b5 7834
ca81d7a0
JD
7835{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7836echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7837if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7838 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7839else
98418dba 7840 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7841/* confdefs.h. */
7842_ACEOF
7843cat confdefs.h >>conftest.$ac_ext
7844cat >>conftest.$ac_ext <<_ACEOF
7845/* end confdefs.h. */
98418dba
CW
7846#include <sys/types.h>
7847#include <$ac_cv_struct_tm>
ba4481b5 7848
c0d27fcc 7849
98418dba
CW
7850int
7851main ()
7852{
7853static struct tm ac_aggr;
7854if (ac_aggr.tm_zone)
7855return 0;
7856 ;
7857 return 0;
7858}
7859_ACEOF
7860rm -f conftest.$ac_objext
ca81d7a0
JD
7861if { (ac_try="$ac_compile"
7862case "(($ac_try" in
7863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7864 *) ac_try_echo=$ac_try;;
7865esac
7866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7867 (eval "$ac_compile") 2>conftest.er1
98418dba 7868 ac_status=$?
edfaf76d
LK
7869 grep -v '^ *+' conftest.er1 >conftest.err
7870 rm -f conftest.er1
7871 cat conftest.err >&5
c0d27fcc 7872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7873 (exit $ac_status); } && {
7874 test -z "$ac_c_werror_flag" ||
7875 test ! -s conftest.err
7876 } && test -s conftest.$ac_objext; then
98418dba 7877 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7878else
98418dba 7879 echo "$as_me: failed program was:" >&5
19650fd6
AS
7880sed 's/^/| /' conftest.$ac_ext >&5
7881
ca81d7a0 7882 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7883/* confdefs.h. */
7884_ACEOF
7885cat confdefs.h >>conftest.$ac_ext
7886cat >>conftest.$ac_ext <<_ACEOF
7887/* end confdefs.h. */
6bae0ccf
DL
7888#include <sys/types.h>
7889#include <$ac_cv_struct_tm>
7890
7891
7892int
7893main ()
7894{
7895static struct tm ac_aggr;
7896if (sizeof ac_aggr.tm_zone)
7897return 0;
7898 ;
7899 return 0;
7900}
7901_ACEOF
7902rm -f conftest.$ac_objext
ca81d7a0
JD
7903if { (ac_try="$ac_compile"
7904case "(($ac_try" in
7905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7906 *) ac_try_echo=$ac_try;;
7907esac
7908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7909 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7910 ac_status=$?
edfaf76d
LK
7911 grep -v '^ *+' conftest.er1 >conftest.err
7912 rm -f conftest.er1
7913 cat conftest.err >&5
6bae0ccf 7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7915 (exit $ac_status); } && {
7916 test -z "$ac_c_werror_flag" ||
7917 test ! -s conftest.err
7918 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7919 ac_cv_member_struct_tm_tm_zone=yes
7920else
7921 echo "$as_me: failed program was:" >&5
19650fd6
AS
7922sed 's/^/| /' conftest.$ac_ext >&5
7923
ca81d7a0 7924 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7925fi
ca81d7a0
JD
7926
7927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7928fi
ca81d7a0
JD
7929
7930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7931fi
ca81d7a0
JD
7932{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7933echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7934if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7935
c0d27fcc 7936cat >>confdefs.h <<_ACEOF
98418dba 7937#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7938_ACEOF
7939
ba4481b5 7940
98418dba 7941fi
ba4481b5 7942
98418dba 7943if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7944
c0d27fcc 7945cat >>confdefs.h <<\_ACEOF
98418dba 7946#define HAVE_TM_ZONE 1
c0d27fcc 7947_ACEOF
ba4481b5 7948
ba4481b5 7949else
ca81d7a0
JD
7950 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7951echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7952if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7953 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7954else
98418dba 7955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7956/* confdefs.h. */
7957_ACEOF
7958cat confdefs.h >>conftest.$ac_ext
7959cat >>conftest.$ac_ext <<_ACEOF
7960/* end confdefs.h. */
98418dba 7961#include <time.h>
98418dba 7962
98418dba
CW
7963int
7964main ()
7965{
ca81d7a0 7966#ifndef tzname
f053c89f 7967 (void) tzname;
ca81d7a0
JD
7968#endif
7969
98418dba
CW
7970 ;
7971 return 0;
7972}
7973_ACEOF
ca81d7a0
JD
7974rm -f conftest.$ac_objext
7975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
7980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7981 (eval "$ac_compile") 2>conftest.er1
98418dba 7982 ac_status=$?
edfaf76d
LK
7983 grep -v '^ *+' conftest.er1 >conftest.err
7984 rm -f conftest.er1
7985 cat conftest.err >&5
c0d27fcc 7986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7987 (exit $ac_status); } && {
7988 test -z "$ac_c_werror_flag" ||
7989 test ! -s conftest.err
7990 } && test -s conftest.$ac_objext; then
ca81d7a0 7991 ac_cv_have_decl_tzname=yes
98418dba
CW
7992else
7993 echo "$as_me: failed program was:" >&5
19650fd6
AS
7994sed 's/^/| /' conftest.$ac_ext >&5
7995
ca81d7a0 7996 ac_cv_have_decl_tzname=no
ba4481b5 7997fi
ca81d7a0
JD
7998
7999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8000fi
ca81d7a0
JD
8001{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8002echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8003if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 8004
ca81d7a0
JD
8005cat >>confdefs.h <<_ACEOF
8006#define HAVE_DECL_TZNAME 1
c0d27fcc 8007_ACEOF
503d2be0 8008
ca81d7a0
JD
8009
8010else
8011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_DECL_TZNAME 0
8013_ACEOF
8014
8015
98418dba 8016fi
503d2be0 8017
ca81d7a0
JD
8018
8019 { echo "$as_me:$LINENO: checking for tzname" >&5
8020echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
8021if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
8022 echo $ECHO_N "(cached) $ECHO_C" >&6
8023else
8024 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8025/* confdefs.h. */
8026_ACEOF
8027cat confdefs.h >>conftest.$ac_ext
8028cat >>conftest.$ac_ext <<_ACEOF
8029/* end confdefs.h. */
98418dba 8030#include <time.h>
ca81d7a0
JD
8031#if !HAVE_DECL_TZNAME
8032extern char *tzname[];
8033#endif
b936fae4 8034
98418dba
CW
8035int
8036main ()
8037{
ca81d7a0 8038return tzname[0][0];
98418dba
CW
8039 ;
8040 return 0;
8041}
8042_ACEOF
ca81d7a0
JD
8043rm -f conftest.$ac_objext conftest$ac_exeext
8044if { (ac_try="$ac_link"
8045case "(($ac_try" in
8046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8047 *) ac_try_echo=$ac_try;;
8048esac
8049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8050 (eval "$ac_link") 2>conftest.er1
98418dba 8051 ac_status=$?
edfaf76d
LK
8052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
c0d27fcc 8055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8056 (exit $ac_status); } && {
8057 test -z "$ac_c_werror_flag" ||
8058 test ! -s conftest.err
8059 } && test -s conftest$ac_exeext &&
8060 $as_test_x conftest$ac_exeext; then
ca81d7a0 8061 ac_cv_var_tzname=yes
98418dba
CW
8062else
8063 echo "$as_me: failed program was:" >&5
19650fd6
AS
8064sed 's/^/| /' conftest.$ac_ext >&5
8065
ca81d7a0
JD
8066 ac_cv_var_tzname=no
8067fi
6bae0ccf 8068
f053c89f 8069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
ca81d7a0
JD
8070 conftest$ac_exeext conftest.$ac_ext
8071fi
8072{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8073echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
8074 if test $ac_cv_var_tzname = yes; then
8075
8076cat >>confdefs.h <<\_ACEOF
8077#define HAVE_TZNAME 1
8078_ACEOF
8079
8080 fi
8081fi
8082
8083{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8084echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
8085if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
8086 echo $ECHO_N "(cached) $ECHO_C" >&6
8087else
8088 cat >conftest.$ac_ext <<_ACEOF
8089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
8094#include <time.h>
8095
8096int
8097main ()
8098{
8099static struct tm ac_aggr;
8100if (ac_aggr.tm_gmtoff)
8101return 0;
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext
8107if { (ac_try="$ac_compile"
8108case "(($ac_try" in
8109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8110 *) ac_try_echo=$ac_try;;
8111esac
8112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8113 (eval "$ac_compile") 2>conftest.er1
8114 ac_status=$?
8115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
8118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
8123 ac_cv_member_struct_tm_tm_gmtoff=yes
8124else
8125 echo "$as_me: failed program was:" >&5
8126sed 's/^/| /' conftest.$ac_ext >&5
8127
8128 cat >conftest.$ac_ext <<_ACEOF
8129/* confdefs.h. */
8130_ACEOF
8131cat confdefs.h >>conftest.$ac_ext
8132cat >>conftest.$ac_ext <<_ACEOF
8133/* end confdefs.h. */
8134#include <time.h>
8135
8136int
8137main ()
8138{
8139static struct tm ac_aggr;
8140if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8141return 0;
8799b3e4
CW
8142 ;
8143 return 0;
8144}
8145_ACEOF
6bae0ccf 8146rm -f conftest.$ac_objext
ca81d7a0
JD
8147if { (ac_try="$ac_compile"
8148case "(($ac_try" in
8149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8150 *) ac_try_echo=$ac_try;;
8151esac
8152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8153 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8154 ac_status=$?
edfaf76d
LK
8155 grep -v '^ *+' conftest.er1 >conftest.err
8156 rm -f conftest.er1
8157 cat conftest.err >&5
c0d27fcc 8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8159 (exit $ac_status); } && {
8160 test -z "$ac_c_werror_flag" ||
8161 test ! -s conftest.err
8162 } && test -s conftest.$ac_objext; then
6bae0ccf 8163 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8164else
8165 echo "$as_me: failed program was:" >&5
19650fd6
AS
8166sed 's/^/| /' conftest.$ac_ext >&5
8167
ca81d7a0 8168 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8169fi
ca81d7a0
JD
8170
8171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8172fi
ca81d7a0
JD
8173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8175fi
ca81d7a0
JD
8176{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8177echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8178if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8179
8180cat >>confdefs.h <<\_ACEOF
8181#define HAVE_TM_GMTOFF 1
8182_ACEOF
8183
8184fi
8185
ca81d7a0
JD
8186{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8187echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8188if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8189 echo $ECHO_N "(cached) $ECHO_C" >&6
8190else
8191 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8192/* confdefs.h. */
8193_ACEOF
8194cat confdefs.h >>conftest.$ac_ext
8195cat >>conftest.$ac_ext <<_ACEOF
8196/* end confdefs.h. */
7862d3a8
AS
8197$ac_includes_default
8198#if HAVE_SYS_SOCKET_H
8199#include <sys/socket.h>
8200#endif
8201#if HAVE_NET_IF_H
96f3a036 8202#include <net/if.h>
7862d3a8 8203#endif
96f3a036
DL
8204
8205int
8206main ()
8207{
8208static struct ifreq ac_aggr;
8209if (ac_aggr.ifr_flags)
8210return 0;
8211 ;
8212 return 0;
8213}
8214_ACEOF
8215rm -f conftest.$ac_objext
ca81d7a0
JD
8216if { (ac_try="$ac_compile"
8217case "(($ac_try" in
8218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8219 *) ac_try_echo=$ac_try;;
8220esac
8221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8222 (eval "$ac_compile") 2>conftest.er1
96f3a036 8223 ac_status=$?
edfaf76d
LK
8224 grep -v '^ *+' conftest.er1 >conftest.err
8225 rm -f conftest.er1
8226 cat conftest.err >&5
96f3a036 8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8228 (exit $ac_status); } && {
8229 test -z "$ac_c_werror_flag" ||
8230 test ! -s conftest.err
8231 } && test -s conftest.$ac_objext; then
96f3a036
DL
8232 ac_cv_member_struct_ifreq_ifr_flags=yes
8233else
8234 echo "$as_me: failed program was:" >&5
8235sed 's/^/| /' conftest.$ac_ext >&5
8236
ca81d7a0 8237 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8238/* confdefs.h. */
8239_ACEOF
8240cat confdefs.h >>conftest.$ac_ext
8241cat >>conftest.$ac_ext <<_ACEOF
8242/* end confdefs.h. */
7862d3a8
AS
8243$ac_includes_default
8244#if HAVE_SYS_SOCKET_H
8245#include <sys/socket.h>
8246#endif
8247#if HAVE_NET_IF_H
96f3a036 8248#include <net/if.h>
7862d3a8 8249#endif
96f3a036
DL
8250
8251int
8252main ()
8253{
8254static struct ifreq ac_aggr;
8255if (sizeof ac_aggr.ifr_flags)
8256return 0;
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
ca81d7a0
JD
8262if { (ac_try="$ac_compile"
8263case "(($ac_try" in
8264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8265 *) ac_try_echo=$ac_try;;
8266esac
8267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8268 (eval "$ac_compile") 2>conftest.er1
96f3a036 8269 ac_status=$?
edfaf76d
LK
8270 grep -v '^ *+' conftest.er1 >conftest.err
8271 rm -f conftest.er1
8272 cat conftest.err >&5
96f3a036 8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8274 (exit $ac_status); } && {
8275 test -z "$ac_c_werror_flag" ||
8276 test ! -s conftest.err
8277 } && test -s conftest.$ac_objext; then
96f3a036
DL
8278 ac_cv_member_struct_ifreq_ifr_flags=yes
8279else
8280 echo "$as_me: failed program was:" >&5
8281sed 's/^/| /' conftest.$ac_ext >&5
8282
ca81d7a0 8283 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8284fi
ca81d7a0
JD
8285
8286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8287fi
ca81d7a0
JD
8288
8289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8290fi
ca81d7a0
JD
8291{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8292echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8293if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8294
8295cat >>confdefs.h <<_ACEOF
8296#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8297_ACEOF
8298
8299
8300fi
ca81d7a0
JD
8301{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8302echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8303if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8304 echo $ECHO_N "(cached) $ECHO_C" >&6
8305else
8306 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8307/* confdefs.h. */
8308_ACEOF
8309cat confdefs.h >>conftest.$ac_ext
8310cat >>conftest.$ac_ext <<_ACEOF
8311/* end confdefs.h. */
7862d3a8
AS
8312$ac_includes_default
8313#if HAVE_SYS_SOCKET_H
8314#include <sys/socket.h>
8315#endif
8316#if HAVE_NET_IF_H
96f3a036 8317#include <net/if.h>
7862d3a8 8318#endif
96f3a036
DL
8319
8320int
8321main ()
8322{
8323static struct ifreq ac_aggr;
8324if (ac_aggr.ifr_hwaddr)
8325return 0;
8326 ;
8327 return 0;
8328}
8329_ACEOF
8330rm -f conftest.$ac_objext
ca81d7a0
JD
8331if { (ac_try="$ac_compile"
8332case "(($ac_try" in
8333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8334 *) ac_try_echo=$ac_try;;
8335esac
8336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8337 (eval "$ac_compile") 2>conftest.er1
96f3a036 8338 ac_status=$?
edfaf76d
LK
8339 grep -v '^ *+' conftest.er1 >conftest.err
8340 rm -f conftest.er1
8341 cat conftest.err >&5
96f3a036 8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8343 (exit $ac_status); } && {
8344 test -z "$ac_c_werror_flag" ||
8345 test ! -s conftest.err
8346 } && test -s conftest.$ac_objext; then
96f3a036
DL
8347 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8348else
8349 echo "$as_me: failed program was:" >&5
8350sed 's/^/| /' conftest.$ac_ext >&5
8351
ca81d7a0 8352 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8353/* confdefs.h. */
8354_ACEOF
8355cat confdefs.h >>conftest.$ac_ext
8356cat >>conftest.$ac_ext <<_ACEOF
8357/* end confdefs.h. */
7862d3a8
AS
8358$ac_includes_default
8359#if HAVE_SYS_SOCKET_H
8360#include <sys/socket.h>
8361#endif
8362#if HAVE_NET_IF_H
96f3a036 8363#include <net/if.h>
7862d3a8 8364#endif
96f3a036
DL
8365
8366int
8367main ()
8368{
8369static struct ifreq ac_aggr;
8370if (sizeof ac_aggr.ifr_hwaddr)
8371return 0;
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext
ca81d7a0
JD
8377if { (ac_try="$ac_compile"
8378case "(($ac_try" in
8379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8380 *) ac_try_echo=$ac_try;;
8381esac
8382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8383 (eval "$ac_compile") 2>conftest.er1
96f3a036 8384 ac_status=$?
edfaf76d
LK
8385 grep -v '^ *+' conftest.er1 >conftest.err
8386 rm -f conftest.er1
8387 cat conftest.err >&5
96f3a036 8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8389 (exit $ac_status); } && {
8390 test -z "$ac_c_werror_flag" ||
8391 test ! -s conftest.err
8392 } && test -s conftest.$ac_objext; then
96f3a036
DL
8393 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8394else
8395 echo "$as_me: failed program was:" >&5
8396sed 's/^/| /' conftest.$ac_ext >&5
8397
ca81d7a0 8398 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8399fi
ca81d7a0
JD
8400
8401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8402fi
ca81d7a0
JD
8403
8404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8405fi
ca81d7a0
JD
8406{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8407echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8408if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8409
8410cat >>confdefs.h <<_ACEOF
8411#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8412_ACEOF
8413
8414
8415fi
ca81d7a0
JD
8416{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8417echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8418if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8419 echo $ECHO_N "(cached) $ECHO_C" >&6
8420else
8421 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8422/* confdefs.h. */
8423_ACEOF
8424cat confdefs.h >>conftest.$ac_ext
8425cat >>conftest.$ac_ext <<_ACEOF
8426/* end confdefs.h. */
7862d3a8
AS
8427$ac_includes_default
8428#if HAVE_SYS_SOCKET_H
8429#include <sys/socket.h>
8430#endif
8431#if HAVE_NET_IF_H
96f3a036 8432#include <net/if.h>
7862d3a8 8433#endif
96f3a036
DL
8434
8435int
8436main ()
8437{
8438static struct ifreq ac_aggr;
8439if (ac_aggr.ifr_netmask)
8440return 0;
8441 ;
8442 return 0;
8443}
8444_ACEOF
8445rm -f conftest.$ac_objext
ca81d7a0
JD
8446if { (ac_try="$ac_compile"
8447case "(($ac_try" in
8448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8449 *) ac_try_echo=$ac_try;;
8450esac
8451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8452 (eval "$ac_compile") 2>conftest.er1
96f3a036 8453 ac_status=$?
edfaf76d
LK
8454 grep -v '^ *+' conftest.er1 >conftest.err
8455 rm -f conftest.er1
8456 cat conftest.err >&5
96f3a036 8457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8458 (exit $ac_status); } && {
8459 test -z "$ac_c_werror_flag" ||
8460 test ! -s conftest.err
8461 } && test -s conftest.$ac_objext; then
96f3a036
DL
8462 ac_cv_member_struct_ifreq_ifr_netmask=yes
8463else
8464 echo "$as_me: failed program was:" >&5
8465sed 's/^/| /' conftest.$ac_ext >&5
8466
ca81d7a0 8467 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
7862d3a8
AS
8473$ac_includes_default
8474#if HAVE_SYS_SOCKET_H
8475#include <sys/socket.h>
8476#endif
8477#if HAVE_NET_IF_H
96f3a036 8478#include <net/if.h>
7862d3a8 8479#endif
96f3a036
DL
8480
8481int
8482main ()
8483{
8484static struct ifreq ac_aggr;
8485if (sizeof ac_aggr.ifr_netmask)
8486return 0;
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491rm -f conftest.$ac_objext
ca81d7a0
JD
8492if { (ac_try="$ac_compile"
8493case "(($ac_try" in
8494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8495 *) ac_try_echo=$ac_try;;
8496esac
8497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8498 (eval "$ac_compile") 2>conftest.er1
96f3a036 8499 ac_status=$?
edfaf76d
LK
8500 grep -v '^ *+' conftest.er1 >conftest.err
8501 rm -f conftest.er1
8502 cat conftest.err >&5
96f3a036 8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8504 (exit $ac_status); } && {
8505 test -z "$ac_c_werror_flag" ||
8506 test ! -s conftest.err
8507 } && test -s conftest.$ac_objext; then
96f3a036
DL
8508 ac_cv_member_struct_ifreq_ifr_netmask=yes
8509else
8510 echo "$as_me: failed program was:" >&5
8511sed 's/^/| /' conftest.$ac_ext >&5
8512
ca81d7a0 8513 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8514fi
ca81d7a0
JD
8515
8516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8517fi
ca81d7a0
JD
8518
8519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8520fi
ca81d7a0
JD
8521{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8522echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8523if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8524
8525cat >>confdefs.h <<_ACEOF
8526#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8527_ACEOF
8528
8529
8530fi
ca81d7a0
JD
8531{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8532echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8533if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8534 echo $ECHO_N "(cached) $ECHO_C" >&6
8535else
8536 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8537/* confdefs.h. */
8538_ACEOF
8539cat confdefs.h >>conftest.$ac_ext
8540cat >>conftest.$ac_ext <<_ACEOF
8541/* end confdefs.h. */
7862d3a8
AS
8542$ac_includes_default
8543#if HAVE_SYS_SOCKET_H
8544#include <sys/socket.h>
8545#endif
8546#if HAVE_NET_IF_H
96f3a036 8547#include <net/if.h>
7862d3a8 8548#endif
96f3a036
DL
8549
8550int
8551main ()
8552{
8553static struct ifreq ac_aggr;
8554if (ac_aggr.ifr_broadaddr)
8555return 0;
8556 ;
8557 return 0;
8558}
8559_ACEOF
8560rm -f conftest.$ac_objext
ca81d7a0
JD
8561if { (ac_try="$ac_compile"
8562case "(($ac_try" in
8563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8564 *) ac_try_echo=$ac_try;;
8565esac
8566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8567 (eval "$ac_compile") 2>conftest.er1
96f3a036 8568 ac_status=$?
edfaf76d
LK
8569 grep -v '^ *+' conftest.er1 >conftest.err
8570 rm -f conftest.er1
8571 cat conftest.err >&5
96f3a036 8572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8573 (exit $ac_status); } && {
8574 test -z "$ac_c_werror_flag" ||
8575 test ! -s conftest.err
8576 } && test -s conftest.$ac_objext; then
96f3a036
DL
8577 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8578else
8579 echo "$as_me: failed program was:" >&5
8580sed 's/^/| /' conftest.$ac_ext >&5
8581
ca81d7a0 8582 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8583/* confdefs.h. */
8584_ACEOF
8585cat confdefs.h >>conftest.$ac_ext
8586cat >>conftest.$ac_ext <<_ACEOF
8587/* end confdefs.h. */
7862d3a8
AS
8588$ac_includes_default
8589#if HAVE_SYS_SOCKET_H
8590#include <sys/socket.h>
8591#endif
8592#if HAVE_NET_IF_H
96f3a036 8593#include <net/if.h>
7862d3a8 8594#endif
96f3a036
DL
8595
8596int
8597main ()
8598{
8599static struct ifreq ac_aggr;
8600if (sizeof ac_aggr.ifr_broadaddr)
8601return 0;
8602 ;
8603 return 0;
8604}
8605_ACEOF
8606rm -f conftest.$ac_objext
ca81d7a0
JD
8607if { (ac_try="$ac_compile"
8608case "(($ac_try" in
8609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8610 *) ac_try_echo=$ac_try;;
8611esac
8612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8613 (eval "$ac_compile") 2>conftest.er1
96f3a036 8614 ac_status=$?
edfaf76d
LK
8615 grep -v '^ *+' conftest.er1 >conftest.err
8616 rm -f conftest.er1
8617 cat conftest.err >&5
96f3a036 8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8619 (exit $ac_status); } && {
8620 test -z "$ac_c_werror_flag" ||
8621 test ! -s conftest.err
8622 } && test -s conftest.$ac_objext; then
96f3a036
DL
8623 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8624else
8625 echo "$as_me: failed program was:" >&5
8626sed 's/^/| /' conftest.$ac_ext >&5
8627
ca81d7a0 8628 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8629fi
ca81d7a0
JD
8630
8631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8632fi
ca81d7a0
JD
8633
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8635fi
ca81d7a0
JD
8636{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8637echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8638if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8639
8640cat >>confdefs.h <<_ACEOF
8641#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8642_ACEOF
8643
8644
8645fi
ca81d7a0
JD
8646{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8647echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8648if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8649 echo $ECHO_N "(cached) $ECHO_C" >&6
8650else
8651 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
7862d3a8
AS
8657$ac_includes_default
8658#if HAVE_SYS_SOCKET_H
8659#include <sys/socket.h>
8660#endif
8661#if HAVE_NET_IF_H
96f3a036 8662#include <net/if.h>
7862d3a8 8663#endif
96f3a036
DL
8664
8665int
8666main ()
8667{
8668static struct ifreq ac_aggr;
8669if (ac_aggr.ifr_addr)
8670return 0;
8671 ;
8672 return 0;
8673}
8674_ACEOF
8675rm -f conftest.$ac_objext
ca81d7a0
JD
8676if { (ac_try="$ac_compile"
8677case "(($ac_try" in
8678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8679 *) ac_try_echo=$ac_try;;
8680esac
8681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8682 (eval "$ac_compile") 2>conftest.er1
96f3a036 8683 ac_status=$?
edfaf76d
LK
8684 grep -v '^ *+' conftest.er1 >conftest.err
8685 rm -f conftest.er1
8686 cat conftest.err >&5
96f3a036 8687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8688 (exit $ac_status); } && {
8689 test -z "$ac_c_werror_flag" ||
8690 test ! -s conftest.err
8691 } && test -s conftest.$ac_objext; then
96f3a036
DL
8692 ac_cv_member_struct_ifreq_ifr_addr=yes
8693else
8694 echo "$as_me: failed program was:" >&5
8695sed 's/^/| /' conftest.$ac_ext >&5
8696
ca81d7a0 8697 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8698/* confdefs.h. */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h. */
7862d3a8
AS
8703$ac_includes_default
8704#if HAVE_SYS_SOCKET_H
8705#include <sys/socket.h>
8706#endif
8707#if HAVE_NET_IF_H
96f3a036 8708#include <net/if.h>
7862d3a8 8709#endif
96f3a036
DL
8710
8711int
8712main ()
8713{
8714static struct ifreq ac_aggr;
8715if (sizeof ac_aggr.ifr_addr)
8716return 0;
8717 ;
8718 return 0;
8719}
8720_ACEOF
8721rm -f conftest.$ac_objext
ca81d7a0
JD
8722if { (ac_try="$ac_compile"
8723case "(($ac_try" in
8724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8725 *) ac_try_echo=$ac_try;;
8726esac
8727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8728 (eval "$ac_compile") 2>conftest.er1
96f3a036 8729 ac_status=$?
edfaf76d
LK
8730 grep -v '^ *+' conftest.er1 >conftest.err
8731 rm -f conftest.er1
8732 cat conftest.err >&5
96f3a036 8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8734 (exit $ac_status); } && {
8735 test -z "$ac_c_werror_flag" ||
8736 test ! -s conftest.err
8737 } && test -s conftest.$ac_objext; then
96f3a036
DL
8738 ac_cv_member_struct_ifreq_ifr_addr=yes
8739else
8740 echo "$as_me: failed program was:" >&5
8741sed 's/^/| /' conftest.$ac_ext >&5
8742
ca81d7a0 8743 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8744fi
ca81d7a0
JD
8745
8746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8747fi
ca81d7a0
JD
8748
8749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8750fi
ca81d7a0
JD
8751{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8752echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8753if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8754
8755cat >>confdefs.h <<_ACEOF
8756#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8757_ACEOF
8758
8759
8760fi
8761
8799b3e4 8762
8799b3e4 8763
ca81d7a0
JD
8764{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8765echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8766if test "$ac_cv_prog_cc_c89" != no; then
8767 { echo "$as_me:$LINENO: result: yes" >&5
8768echo "${ECHO_T}yes" >&6; }
98418dba 8769
c0d27fcc 8770cat >>confdefs.h <<\_ACEOF
98418dba 8771#define PROTOTYPES 1
c0d27fcc
MR
8772_ACEOF
8773
8774
8775cat >>confdefs.h <<\_ACEOF
8776#define __PROTOTYPES 1
8777_ACEOF
98418dba
CW
8778
8779else
ca81d7a0
JD
8780 { echo "$as_me:$LINENO: result: no" >&5
8781echo "${ECHO_T}no" >&6; }
98418dba
CW
8782fi
8783
ca81d7a0
JD
8784{ echo "$as_me:$LINENO: checking for working volatile" >&5
8785echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8786if test "${ac_cv_c_volatile+set}" = set; then
8787 echo $ECHO_N "(cached) $ECHO_C" >&6
8788else
8789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8790/* confdefs.h. */
8791_ACEOF
8792cat confdefs.h >>conftest.$ac_ext
8793cat >>conftest.$ac_ext <<_ACEOF
8794/* end confdefs.h. */
98418dba 8795
98418dba
CW
8796int
8797main ()
8798{
8799
8800volatile int x;
ca81d7a0
JD
8801int * volatile y = (int *) 0;
8802return !x && !y;
98418dba
CW
8803 ;
8804 return 0;
8805}
8806_ACEOF
8807rm -f conftest.$ac_objext
ca81d7a0
JD
8808if { (ac_try="$ac_compile"
8809case "(($ac_try" in
8810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8811 *) ac_try_echo=$ac_try;;
8812esac
8813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8814 (eval "$ac_compile") 2>conftest.er1
98418dba 8815 ac_status=$?
edfaf76d
LK
8816 grep -v '^ *+' conftest.er1 >conftest.err
8817 rm -f conftest.er1
8818 cat conftest.err >&5
c0d27fcc 8819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8820 (exit $ac_status); } && {
8821 test -z "$ac_c_werror_flag" ||
8822 test ! -s conftest.err
8823 } && test -s conftest.$ac_objext; then
98418dba
CW
8824 ac_cv_c_volatile=yes
8825else
8826 echo "$as_me: failed program was:" >&5
19650fd6
AS
8827sed 's/^/| /' conftest.$ac_ext >&5
8828
ca81d7a0 8829 ac_cv_c_volatile=no
98418dba 8830fi
ca81d7a0
JD
8831
8832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8833fi
ca81d7a0
JD
8834{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8835echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8836if test $ac_cv_c_volatile = no; then
8837
c0d27fcc 8838cat >>confdefs.h <<\_ACEOF
98418dba 8839#define volatile
c0d27fcc 8840_ACEOF
98418dba
CW
8841
8842fi
8843
ca81d7a0
JD
8844{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8845echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8846if test "${ac_cv_c_const+set}" = set; then
8847 echo $ECHO_N "(cached) $ECHO_C" >&6
8848else
8849 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8850/* confdefs.h. */
8851_ACEOF
8852cat confdefs.h >>conftest.$ac_ext
8853cat >>conftest.$ac_ext <<_ACEOF
8854/* end confdefs.h. */
98418dba 8855
98418dba
CW
8856int
8857main ()
8858{
8859/* FIXME: Include the comments suggested by Paul. */
8860#ifndef __cplusplus
8861 /* Ultrix mips cc rejects this. */
8862 typedef int charset[2];
f053c89f 8863 const charset cs;
98418dba 8864 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8865 char const *const *pcpcc;
8866 char **ppc;
98418dba
CW
8867 /* NEC SVR4.0.2 mips cc rejects this. */
8868 struct point {int x, y;};
8869 static struct point const zero = {0,0};
8870 /* AIX XL C 1.02.0.0 rejects this.
8871 It does not let you subtract one const X* pointer from another in
8872 an arm of an if-expression whose if-part is not a constant
8873 expression */
8874 const char *g = "string";
f053c89f 8875 pcpcc = &g + (g ? g-g : 0);
98418dba 8876 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8877 ++pcpcc;
8878 ppc = (char**) pcpcc;
8879 pcpcc = (char const *const *) ppc;
98418dba
CW
8880 { /* SCO 3.2v4 cc rejects this. */
8881 char *t;
8882 char const *s = 0 ? (char *) 0 : (char const *) 0;
8883
8884 *t++ = 0;
ca81d7a0 8885 if (s) return 0;
98418dba
CW
8886 }
8887 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8888 int x[] = {25, 17};
8889 const int *foo = &x[0];
8890 ++foo;
8891 }
8892 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8893 typedef const int *iptr;
8894 iptr p = 0;
8895 ++p;
8896 }
8897 { /* AIX XL C 1.02.0.0 rejects this saying
8898 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8899 struct s { int j; const int *ap[3]; };
8900 struct s *b; b->j = 5;
8901 }
8902 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8903 const int foo = 10;
ca81d7a0 8904 if (!foo) return 0;
98418dba 8905 }
f053c89f 8906 return !cs[0] && !zero.x;
98418dba
CW
8907#endif
8908
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext
ca81d7a0
JD
8914if { (ac_try="$ac_compile"
8915case "(($ac_try" in
8916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8917 *) ac_try_echo=$ac_try;;
8918esac
8919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8920 (eval "$ac_compile") 2>conftest.er1
98418dba 8921 ac_status=$?
edfaf76d
LK
8922 grep -v '^ *+' conftest.er1 >conftest.err
8923 rm -f conftest.er1
8924 cat conftest.err >&5
c0d27fcc 8925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8926 (exit $ac_status); } && {
8927 test -z "$ac_c_werror_flag" ||
8928 test ! -s conftest.err
8929 } && test -s conftest.$ac_objext; then
98418dba
CW
8930 ac_cv_c_const=yes
8931else
8932 echo "$as_me: failed program was:" >&5
19650fd6
AS
8933sed 's/^/| /' conftest.$ac_ext >&5
8934
ca81d7a0 8935 ac_cv_c_const=no
98418dba 8936fi
ca81d7a0
JD
8937
8938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8939fi
ca81d7a0
JD
8940{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8941echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8942if test $ac_cv_c_const = no; then
8943
c0d27fcc 8944cat >>confdefs.h <<\_ACEOF
98418dba 8945#define const
c0d27fcc 8946_ACEOF
98418dba
CW
8947
8948fi
8949
ca81d7a0
JD
8950{ echo "$as_me:$LINENO: checking for void * support" >&5
8951echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8952if test "${emacs_cv_void_star+set}" = set; then
8953 echo $ECHO_N "(cached) $ECHO_C" >&6
8954else
8955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8956/* confdefs.h. */
8957_ACEOF
8958cat confdefs.h >>conftest.$ac_ext
8959cat >>conftest.$ac_ext <<_ACEOF
8960/* end confdefs.h. */
98418dba 8961
98418dba
CW
8962int
8963main ()
8964{
8965void * foo;
8966 ;
8967 return 0;
8968}
8969_ACEOF
8970rm -f conftest.$ac_objext
ca81d7a0
JD
8971if { (ac_try="$ac_compile"
8972case "(($ac_try" in
8973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8974 *) ac_try_echo=$ac_try;;
8975esac
8976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8977 (eval "$ac_compile") 2>conftest.er1
98418dba 8978 ac_status=$?
edfaf76d
LK
8979 grep -v '^ *+' conftest.er1 >conftest.err
8980 rm -f conftest.er1
8981 cat conftest.err >&5
c0d27fcc 8982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8983 (exit $ac_status); } && {
8984 test -z "$ac_c_werror_flag" ||
8985 test ! -s conftest.err
8986 } && test -s conftest.$ac_objext; then
98418dba
CW
8987 emacs_cv_void_star=yes
8988else
8989 echo "$as_me: failed program was:" >&5
19650fd6
AS
8990sed 's/^/| /' conftest.$ac_ext >&5
8991
ca81d7a0 8992 emacs_cv_void_star=no
98418dba 8993fi
ca81d7a0
JD
8994
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8996fi
ca81d7a0
JD
8997{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8998echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8999if test $emacs_cv_void_star = yes; then
c0d27fcc 9000 cat >>confdefs.h <<\_ACEOF
98418dba 9001#define POINTER_TYPE void
c0d27fcc 9002_ACEOF
98418dba
CW
9003
9004else
c0d27fcc 9005 cat >>confdefs.h <<\_ACEOF
98418dba 9006#define POINTER_TYPE char
c0d27fcc 9007_ACEOF
98418dba
CW
9008
9009fi
9010
c0d27fcc 9011
4494a266
JD
9012
9013
cd958eb3 9014
ca81d7a0
JD
9015{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9016echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9017set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9018if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9019 echo $ECHO_N "(cached) $ECHO_C" >&6
9020else
c0d27fcc 9021 cat >conftest.make <<\_ACEOF
ca81d7a0 9022SHELL = /bin/sh
98418dba 9023all:
ca81d7a0 9024 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9025_ACEOF
98418dba 9026# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9027case `${MAKE-make} -f conftest.make 2>/dev/null` in
9028 *@@@%%%=?*=@@@%%%*)
9029 eval ac_cv_prog_make_${ac_make}_set=yes;;
9030 *)
9031 eval ac_cv_prog_make_${ac_make}_set=no;;
9032esac
4b411bfe 9033rm -f conftest.make
98418dba 9034fi
ca81d7a0
JD
9035if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9036 { echo "$as_me:$LINENO: result: yes" >&5
9037echo "${ECHO_T}yes" >&6; }
98418dba
CW
9038 SET_MAKE=
9039else
ca81d7a0
JD
9040 { echo "$as_me:$LINENO: result: no" >&5
9041echo "${ECHO_T}no" >&6; }
98418dba
CW
9042 SET_MAKE="MAKE=${MAKE-make}"
9043fi
9044
c0d27fcc 9045
ca81d7a0
JD
9046{ echo "$as_me:$LINENO: checking for long file names" >&5
9047echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9048if test "${ac_cv_sys_long_file_names+set}" = set; then
9049 echo $ECHO_N "(cached) $ECHO_C" >&6
9050else
9051 ac_cv_sys_long_file_names=yes
9052# Test for long file names in all the places we know might matter:
9053# . the current directory, where building will happen
9054# $prefix/lib where we will be installing things
9055# $exec_prefix/lib likewise
98418dba 9056# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9057# /tmp where it might want to write temporary files
9058# /var/tmp likewise
9059# /usr/tmp likewise
ca81d7a0
JD
9060for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9061 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9062 # in the usual case where exec_prefix is '${prefix}'.
9063 case $ac_dir in #(
9064 . | /* | ?:[\\/]*) ;; #(
9065 *) continue;;
9066 esac
9067 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9068 ac_xdir=$ac_dir/cf$$
ca81d7a0 9069 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9070 ac_tf1=$ac_xdir/conftest9012345
9071 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9072 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9073 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9074 rm -f -r "$ac_xdir" 2>/dev/null
9075 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9076done
9077fi
ca81d7a0
JD
9078{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9079echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9080if test $ac_cv_sys_long_file_names = yes; then
9081
c0d27fcc 9082cat >>confdefs.h <<\_ACEOF
98418dba 9083#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9084_ACEOF
98418dba
CW
9085
9086fi
9087
c0d27fcc 9088
98418dba
CW
9089#### Choose a window system.
9090
ca81d7a0
JD
9091{ echo "$as_me:$LINENO: checking for X" >&5
9092echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9093
c0d27fcc 9094
ca81d7a0 9095# Check whether --with-x was given.
98418dba 9096if test "${with_x+set}" = set; then
ca81d7a0
JD
9097 withval=$with_x;
9098fi
98418dba 9099
98418dba
CW
9100# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9101if test "x$with_x" = xno; then
9102 # The user explicitly disabled X.
9103 have_x=disabled
9104else
ca81d7a0
JD
9105 case $x_includes,$x_libraries in #(
9106 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9107echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9108 { (exit 1); exit 1; }; };; #(
9109 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9110 echo $ECHO_N "(cached) $ECHO_C" >&6
9111else
9112 # One or both of the vars are not set, and there is no cached value.
9113ac_x_includes=no ac_x_libraries=no
ca81d7a0 9114rm -f -r conftest.dir
98418dba
CW
9115if mkdir conftest.dir; then
9116 cd conftest.dir
c0d27fcc 9117 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9118incroot:
9119 @echo incroot='${INCROOT}'
9120usrlibdir:
9121 @echo usrlibdir='${USRLIBDIR}'
9122libdir:
9123 @echo libdir='${LIBDIR}'
9124_ACEOF
9125 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9126 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9127 for ac_var in incroot usrlibdir libdir; do
9128 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9129 done
98418dba
CW
9130 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9131 for ac_extension in a so sl; do
ca81d7a0
JD
9132 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9133 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9134 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9135 fi
9136 done
9137 # Screen out bogus values from the imake configuration. They are
9138 # bogus both because they are the default anyway, and because
9139 # using them would break gcc on systems where it needs fixed includes.
9140 case $ac_im_incroot in
ca81d7a0 9141 /usr/include) ac_x_includes= ;;
98418dba
CW
9142 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9143 esac
9144 case $ac_im_usrlibdir in
9145 /usr/lib | /lib) ;;
9146 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9147 esac
9148 fi
9149 cd ..
ca81d7a0 9150 rm -f -r conftest.dir
98418dba
CW
9151fi
9152
9153# Standard set of common directories for X headers.
9154# Check X11 before X11Rn because it is often a symlink to the current release.
9155ac_x_header_dirs='
9156/usr/X11/include
9157/usr/X11R6/include
9158/usr/X11R5/include
9159/usr/X11R4/include
9160
9161/usr/include/X11
9162/usr/include/X11R6
9163/usr/include/X11R5
9164/usr/include/X11R4
9165
9166/usr/local/X11/include
9167/usr/local/X11R6/include
9168/usr/local/X11R5/include
9169/usr/local/X11R4/include
9170
9171/usr/local/include/X11
9172/usr/local/include/X11R6
9173/usr/local/include/X11R5
9174/usr/local/include/X11R4
9175
9176/usr/X386/include
9177/usr/x386/include
9178/usr/XFree86/include/X11
9179
9180/usr/include
9181/usr/local/include
9182/usr/unsupported/include
9183/usr/athena/include
9184/usr/local/x11r5/include
9185/usr/lpp/Xamples/include
9186
9187/usr/openwin/include
9188/usr/openwin/share/include'
9189
9190if test "$ac_x_includes" = no; then
ca81d7a0 9191 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9192 # First, try using that file with no special directory specified.
9193 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9194/* confdefs.h. */
9195_ACEOF
9196cat confdefs.h >>conftest.$ac_ext
9197cat >>conftest.$ac_ext <<_ACEOF
9198/* end confdefs.h. */
ca81d7a0 9199#include <X11/Xlib.h>
98418dba 9200_ACEOF
ca81d7a0
JD
9201if { (ac_try="$ac_cpp conftest.$ac_ext"
9202case "(($ac_try" in
9203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9204 *) ac_try_echo=$ac_try;;
9205esac
9206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9207 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9208 ac_status=$?
6bae0ccf 9209 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9210 rm -f conftest.er1
9211 cat conftest.err >&5
c0d27fcc 9212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9213 (exit $ac_status); } >/dev/null && {
9214 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9215 test ! -s conftest.err
9216 }; then
98418dba
CW
9217 # We can compile using X headers with no special include directory.
9218ac_x_includes=
9219else
9220 echo "$as_me: failed program was:" >&5
19650fd6
AS
9221sed 's/^/| /' conftest.$ac_ext >&5
9222
98418dba 9223 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9224 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9225 ac_x_includes=$ac_dir
9226 break
9227 fi
9228done
9229fi
ca81d7a0 9230
98418dba
CW
9231rm -f conftest.err conftest.$ac_ext
9232fi # $ac_x_includes = no
9233
9234if test "$ac_x_libraries" = no; then
9235 # Check for the libraries.
9236 # See if we find them without any special options.
9237 # Don't add to $LIBS permanently.
9238 ac_save_LIBS=$LIBS
f053c89f 9239 LIBS="-lX11 $LIBS"
98418dba 9240 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9241/* confdefs.h. */
9242_ACEOF
9243cat confdefs.h >>conftest.$ac_ext
9244cat >>conftest.$ac_ext <<_ACEOF
9245/* end confdefs.h. */
ca81d7a0 9246#include <X11/Xlib.h>
98418dba
CW
9247int
9248main ()
9249{
ca81d7a0 9250XrmInitialize ()
98418dba
CW
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9256if { (ac_try="$ac_link"
9257case "(($ac_try" in
9258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9259 *) ac_try_echo=$ac_try;;
9260esac
9261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9262 (eval "$ac_link") 2>conftest.er1
98418dba 9263 ac_status=$?
edfaf76d
LK
9264 grep -v '^ *+' conftest.er1 >conftest.err
9265 rm -f conftest.er1
9266 cat conftest.err >&5
c0d27fcc 9267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9268 (exit $ac_status); } && {
9269 test -z "$ac_c_werror_flag" ||
9270 test ! -s conftest.err
9271 } && test -s conftest$ac_exeext &&
9272 $as_test_x conftest$ac_exeext; then
98418dba
CW
9273 LIBS=$ac_save_LIBS
9274# We can link X programs with no special library path.
9275ac_x_libraries=
9276else
9277 echo "$as_me: failed program was:" >&5
19650fd6
AS
9278sed 's/^/| /' conftest.$ac_ext >&5
9279
ca81d7a0 9280 LIBS=$ac_save_LIBS
98418dba
CW
9281for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9282do
9283 # Don't even attempt the hair of trying to link an X program!
9284 for ac_extension in a so sl; do
f053c89f 9285 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9286 ac_x_libraries=$ac_dir
9287 break 2
9288 fi
9289 done
9290done
9291fi
ca81d7a0 9292
f053c89f 9293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9294 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9295fi # $ac_x_libraries = no
9296
ca81d7a0
JD
9297case $ac_x_includes,$ac_x_libraries in #(
9298 no,* | *,no | *\'*)
9299 # Didn't find X, or a directory has "'" in its name.
9300 ac_cv_have_x="have_x=no";; #(
9301 *)
9302 # Record where we found X for the cache.
9303 ac_cv_have_x="have_x=yes\
9304 ac_x_includes='$ac_x_includes'\
9305 ac_x_libraries='$ac_x_libraries'"
9306esac
4b411bfe 9307fi
ca81d7a0
JD
9308;; #(
9309 *) have_x=yes;;
9310 esac
98418dba
CW
9311 eval "$ac_cv_have_x"
9312fi # $with_x != no
9313
9314if test "$have_x" != yes; then
ca81d7a0
JD
9315 { echo "$as_me:$LINENO: result: $have_x" >&5
9316echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9317 no_x=yes
9318else
9319 # If each of the values was on the command line, it overrides each guess.
9320 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9321 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9322 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9323 ac_cv_have_x="have_x=yes\
9324 ac_x_includes='$x_includes'\
9325 ac_x_libraries='$x_libraries'"
9326 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9327echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9328fi
9329
9330if test "$no_x" = yes; then
9331 window_system=none
9332else
9333 window_system=x11
9334fi
9335
92d1ccf4
AS
9336if test "${x_libraries}" != NONE; then
9337 if test -n "${x_libraries}"; then
9338 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9339 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9340 fi
98418dba 9341 x_default_search_path=""
92d1ccf4
AS
9342 x_search_path=${x_libraries}
9343 if test -z "${x_search_path}"; then
9344 x_search_path=/usr/lib
9345 fi
9346 for x_library in `echo ${x_search_path}: | \
9347 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9348 x_search_path="\
9349${x_library}/X11/%L/%T/%N%C%S:\
9350${x_library}/X11/%l/%T/%N%C%S:\
9351${x_library}/X11/%T/%N%C%S:\
9352${x_library}/X11/%L/%T/%N%S:\
9353${x_library}/X11/%l/%T/%N%S:\
9354${x_library}/X11/%T/%N%S"
9355 if test x"${x_default_search_path}" = x; then
9356 x_default_search_path=${x_search_path}
9357 else
9358 x_default_search_path="${x_search_path}:${x_default_search_path}"
9359 fi
9360 done
9361fi
9362if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9363 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9364fi
9365
9366if test x"${x_includes}" = x; then
9367 bitmapdir=/usr/include/X11/bitmaps
9368else
9369 # accumulate include directories that have X11 bitmap subdirectories
9370 bmd_acc="dummyval"
9371 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9372 if test -d "${bmd}/X11/bitmaps"; then
9373 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9374 fi
9375 if test -d "${bmd}/bitmaps"; then
9376 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9377 fi
9378 done
9379 if test ${bmd_acc} != "dummyval"; then
9380 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9381 fi
9382fi
9383
5d6da11e 9384HAVE_CARBON=no
1d4d5604
YM
9385if test "${with_carbon}" != no; then
9386 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9387 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9388echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9389if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9390 echo $ECHO_N "(cached) $ECHO_C" >&6
9391fi
ca81d7a0
JD
9392{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9393echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9394else
9395 # Is the header compilable?
ca81d7a0
JD
9396{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9397echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9398cat >conftest.$ac_ext <<_ACEOF
9399/* confdefs.h. */
9400_ACEOF
9401cat confdefs.h >>conftest.$ac_ext
9402cat >>conftest.$ac_ext <<_ACEOF
9403/* end confdefs.h. */
9404$ac_includes_default
9405#include <Carbon/Carbon.h>
9406_ACEOF
9407rm -f conftest.$ac_objext
ca81d7a0
JD
9408if { (ac_try="$ac_compile"
9409case "(($ac_try" in
9410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9411 *) ac_try_echo=$ac_try;;
9412esac
9413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9414 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9415 ac_status=$?
edfaf76d
LK
9416 grep -v '^ *+' conftest.er1 >conftest.err
9417 rm -f conftest.er1
9418 cat conftest.err >&5
5d6da11e 9419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9420 (exit $ac_status); } && {
9421 test -z "$ac_c_werror_flag" ||
9422 test ! -s conftest.err
9423 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9424 ac_header_compiler=yes
9425else
9426 echo "$as_me: failed program was:" >&5
9427sed 's/^/| /' conftest.$ac_ext >&5
9428
ca81d7a0 9429 ac_header_compiler=no
5d6da11e 9430fi
ca81d7a0
JD
9431
9432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9433{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9434echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9435
9436# Is the header present?
ca81d7a0
JD
9437{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9438echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9439cat >conftest.$ac_ext <<_ACEOF
9440/* confdefs.h. */
9441_ACEOF
9442cat confdefs.h >>conftest.$ac_ext
9443cat >>conftest.$ac_ext <<_ACEOF
9444/* end confdefs.h. */
9445#include <Carbon/Carbon.h>
9446_ACEOF
ca81d7a0
JD
9447if { (ac_try="$ac_cpp conftest.$ac_ext"
9448case "(($ac_try" in
9449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9450 *) ac_try_echo=$ac_try;;
9451esac
9452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9454 ac_status=$?
9455 grep -v '^ *+' conftest.er1 >conftest.err
9456 rm -f conftest.er1
9457 cat conftest.err >&5
9458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9459 (exit $ac_status); } >/dev/null && {
9460 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9461 test ! -s conftest.err
9462 }; then
5d6da11e
YM
9463 ac_header_preproc=yes
9464else
9465 echo "$as_me: failed program was:" >&5
9466sed 's/^/| /' conftest.$ac_ext >&5
9467
9468 ac_header_preproc=no
9469fi
ca81d7a0 9470
5d6da11e 9471rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9472{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9473echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9474
9475# So? What about this header?
edfaf76d
LK
9476case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9477 yes:no: )
5d6da11e
YM
9478 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9479echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9480 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9481echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9482 ac_header_preproc=yes
5d6da11e 9483 ;;
edfaf76d 9484 no:yes:* )
5d6da11e
YM
9485 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9486echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9487 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9488echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9489 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9490echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9491 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9492echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9493 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9494echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9495 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9496echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9497
5d6da11e
YM
9498 ;;
9499esac
ca81d7a0
JD
9500{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9501echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9502if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9503 echo $ECHO_N "(cached) $ECHO_C" >&6
9504else
9505 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9506fi
ca81d7a0
JD
9507{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9508echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9509
9510fi
9511if test $ac_cv_header_Carbon_Carbon_h = yes; then
9512 HAVE_CARBON=yes
9513fi
9514
9515
1d4d5604
YM
9516fi
9517if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9518 if test "${with_carbon+set}" != set \
9519 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9520 for var in with_x with_x_toolkit with_gtk with_xim \
9521 with_xpm with_jpeg with_tiff with_gif with_png; do
9522 if eval test \"\${$var+set}\" = set; then
9523 HAVE_CARBON=no
9524 break
9525 fi
9526 done
5d6da11e
YM
9527 fi
9528fi
1d4d5604
YM
9529if test "${HAVE_CARBON}" = yes; then
9530 window_system=mac
9531fi
9532
9533case "${window_system}" in
9534 x11 )
9535 HAVE_X_WINDOWS=yes
9536 HAVE_X11=yes
9537 case "${with_x_toolkit}" in
9538 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9539 motif ) USE_X_TOOLKIT=MOTIF ;;
9540 gtk ) with_gtk=yes
9541 USE_X_TOOLKIT=none ;;
9542 no ) USE_X_TOOLKIT=none ;;
9543 * ) USE_X_TOOLKIT=maybe ;;
9544 esac
9545 ;;
9546 mac | none )
9547 HAVE_X_WINDOWS=no
9548 HAVE_X11=no
9549 USE_X_TOOLKIT=none
9550 ;;
9551esac
9552
9553### If we're using X11, we should use the X menu package.
9554HAVE_MENUS=no
9555case ${HAVE_X11} in
9556 yes ) HAVE_MENUS=yes ;;
9557esac
9558
9559if test "${opsys}" = "hpux9"; then
9560 case "${x_libraries}" in
9561 *X11R4* )
9562 opsysfile="s/hpux9-x11r4.h"
9563 ;;
9564 esac
9565fi
9566
9567if test "${opsys}" = "hpux9shr"; then
9568 case "${x_libraries}" in
9569 *X11R4* )
9570 opsysfile="s/hpux9shxr4.h"
9571 ;;
9572 esac
9573fi
5d6da11e 9574
98418dba
CW
9575### Compute the unexec source name from the object name.
9576UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9577
9578# Do the opsystem or machine files prohibit the use of the GNU malloc?
9579# Assume not, until told otherwise.
9580GNU_MALLOC=yes
9581doug_lea_malloc=yes
ca81d7a0
JD
9582{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9583echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9584if test "${ac_cv_func_malloc_get_state+set}" = set; then
9585 echo $ECHO_N "(cached) $ECHO_C" >&6
9586else
9587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9588/* confdefs.h. */
9589_ACEOF
9590cat confdefs.h >>conftest.$ac_ext
9591cat >>conftest.$ac_ext <<_ACEOF
9592/* end confdefs.h. */
edfaf76d
LK
9593/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9594 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9595#define malloc_get_state innocuous_malloc_get_state
9596
98418dba 9597/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9598 which can conflict with char malloc_get_state (); below.
9599 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9600 <limits.h> exists even on freestanding compilers. */
edfaf76d 9601
19650fd6
AS
9602#ifdef __STDC__
9603# include <limits.h>
9604#else
9605# include <assert.h>
9606#endif
edfaf76d
LK
9607
9608#undef malloc_get_state
9609
ca81d7a0
JD
9610/* Override any GCC internal prototype to avoid an error.
9611 Use char because int might match the return type of a GCC
9612 builtin and then its argument prototype would still apply. */
98418dba
CW
9613#ifdef __cplusplus
9614extern "C"
9615#endif
98418dba 9616char malloc_get_state ();
98418dba
CW
9617/* The GNU C library defines this for functions which it implements
9618 to always fail with ENOSYS. Some functions are actually named
9619 something starting with __ and the normal name is an alias. */
ca81d7a0 9620#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9621choke me
98418dba
CW
9622#endif
9623
19650fd6
AS
9624int
9625main ()
9626{
ca81d7a0 9627return malloc_get_state ();
98418dba
CW
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9633if { (ac_try="$ac_link"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
9638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9639 (eval "$ac_link") 2>conftest.er1
98418dba 9640 ac_status=$?
edfaf76d
LK
9641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
c0d27fcc 9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest$ac_exeext &&
9649 $as_test_x conftest$ac_exeext; then
98418dba
CW
9650 ac_cv_func_malloc_get_state=yes
9651else
9652 echo "$as_me: failed program was:" >&5
19650fd6
AS
9653sed 's/^/| /' conftest.$ac_ext >&5
9654
ca81d7a0 9655 ac_cv_func_malloc_get_state=no
98418dba 9656fi
ca81d7a0 9657
f053c89f 9658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9659 conftest$ac_exeext conftest.$ac_ext
98418dba 9660fi
ca81d7a0
JD
9661{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9662echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9663if test $ac_cv_func_malloc_get_state = yes; then
9664 :
9665else
9666 doug_lea_malloc=no
9667fi
9668
ca81d7a0
JD
9669{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9670echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9671if test "${ac_cv_func_malloc_set_state+set}" = set; then
9672 echo $ECHO_N "(cached) $ECHO_C" >&6
9673else
9674 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9675/* confdefs.h. */
9676_ACEOF
9677cat confdefs.h >>conftest.$ac_ext
9678cat >>conftest.$ac_ext <<_ACEOF
9679/* end confdefs.h. */
edfaf76d
LK
9680/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9681 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9682#define malloc_set_state innocuous_malloc_set_state
9683
98418dba 9684/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9685 which can conflict with char malloc_set_state (); below.
9686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9687 <limits.h> exists even on freestanding compilers. */
edfaf76d 9688
19650fd6
AS
9689#ifdef __STDC__
9690# include <limits.h>
9691#else
9692# include <assert.h>
9693#endif
edfaf76d
LK
9694
9695#undef malloc_set_state
9696
ca81d7a0
JD
9697/* Override any GCC internal prototype to avoid an error.
9698 Use char because int might match the return type of a GCC
9699 builtin and then its argument prototype would still apply. */
98418dba
CW
9700#ifdef __cplusplus
9701extern "C"
9702#endif
98418dba 9703char malloc_set_state ();
98418dba
CW
9704/* The GNU C library defines this for functions which it implements
9705 to always fail with ENOSYS. Some functions are actually named
9706 something starting with __ and the normal name is an alias. */
ca81d7a0 9707#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9708choke me
98418dba
CW
9709#endif
9710
19650fd6
AS
9711int
9712main ()
9713{
ca81d7a0 9714return malloc_set_state ();
98418dba
CW
9715 ;
9716 return 0;
9717}
9718_ACEOF
9719rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9720if { (ac_try="$ac_link"
9721case "(($ac_try" in
9722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9723 *) ac_try_echo=$ac_try;;
9724esac
9725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9726 (eval "$ac_link") 2>conftest.er1
98418dba 9727 ac_status=$?
edfaf76d
LK
9728 grep -v '^ *+' conftest.er1 >conftest.err
9729 rm -f conftest.er1
9730 cat conftest.err >&5
c0d27fcc 9731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9732 (exit $ac_status); } && {
9733 test -z "$ac_c_werror_flag" ||
9734 test ! -s conftest.err
9735 } && test -s conftest$ac_exeext &&
9736 $as_test_x conftest$ac_exeext; then
98418dba
CW
9737 ac_cv_func_malloc_set_state=yes
9738else
9739 echo "$as_me: failed program was:" >&5
19650fd6
AS
9740sed 's/^/| /' conftest.$ac_ext >&5
9741
ca81d7a0 9742 ac_cv_func_malloc_set_state=no
98418dba 9743fi
ca81d7a0 9744
f053c89f 9745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9746 conftest$ac_exeext conftest.$ac_ext
98418dba 9747fi
ca81d7a0
JD
9748{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9749echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9750if test $ac_cv_func_malloc_set_state = yes; then
9751 :
9752else
9753 doug_lea_malloc=no
9754fi
9755
ca81d7a0
JD
9756{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9757echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9758if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9759 echo $ECHO_N "(cached) $ECHO_C" >&6
9760else
9761 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9762/* confdefs.h. */
9763_ACEOF
9764cat confdefs.h >>conftest.$ac_ext
9765cat >>conftest.$ac_ext <<_ACEOF
9766/* end confdefs.h. */
98418dba 9767extern void (* __after_morecore_hook)();
98418dba
CW
9768int
9769main ()
9770{
9771__after_morecore_hook = 0
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9777if { (ac_try="$ac_link"
9778case "(($ac_try" in
9779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9780 *) ac_try_echo=$ac_try;;
9781esac
9782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9783 (eval "$ac_link") 2>conftest.er1
98418dba 9784 ac_status=$?
edfaf76d
LK
9785 grep -v '^ *+' conftest.er1 >conftest.err
9786 rm -f conftest.er1
9787 cat conftest.err >&5
c0d27fcc 9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9789 (exit $ac_status); } && {
9790 test -z "$ac_c_werror_flag" ||
9791 test ! -s conftest.err
9792 } && test -s conftest$ac_exeext &&
9793 $as_test_x conftest$ac_exeext; then
98418dba
CW
9794 emacs_cv_var___after_morecore_hook=yes
9795else
9796 echo "$as_me: failed program was:" >&5
19650fd6
AS
9797sed 's/^/| /' conftest.$ac_ext >&5
9798
ca81d7a0 9799 emacs_cv_var___after_morecore_hook=no
98418dba 9800fi
ca81d7a0 9801
f053c89f 9802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9803 conftest$ac_exeext conftest.$ac_ext
98418dba 9804fi
ca81d7a0
JD
9805{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9806echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9807if test $emacs_cv_var___after_morecore_hook = no; then
9808 doug_lea_malloc=no
9809fi
9810if test "${system_malloc}" = "yes"; then
9811 GNU_MALLOC=no
9812 GNU_MALLOC_reason="
9813 (The GNU allocators don't work with this system configuration.)"
9814fi
9815if test "$doug_lea_malloc" = "yes" ; then
9816 if test "$GNU_MALLOC" = yes ; then
9817 GNU_MALLOC_reason="
9818 (Using Doug Lea's new malloc from the GNU C Library.)"
9819 fi
b936fae4 9820
c0d27fcc 9821cat >>confdefs.h <<\_ACEOF
98418dba 9822#define DOUG_LEA_MALLOC 1
c0d27fcc 9823_ACEOF
98418dba
CW
9824
9825fi
9826
9827if test x"${REL_ALLOC}" = x; then
9828 REL_ALLOC=${GNU_MALLOC}
9829fi
9830
9831
c0d27fcc
MR
9832
9833
9834for ac_header in stdlib.h unistd.h
98418dba
CW
9835do
9836as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9837if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9838 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9839echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9840if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9841 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9842fi
ca81d7a0
JD
9843ac_res=`eval echo '${'$as_ac_Header'}'`
9844 { echo "$as_me:$LINENO: result: $ac_res" >&5
9845echo "${ECHO_T}$ac_res" >&6; }
98418dba 9846else
c0d27fcc 9847 # Is the header compilable?
ca81d7a0
JD
9848{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9849echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9850cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9851/* confdefs.h. */
9852_ACEOF
9853cat confdefs.h >>conftest.$ac_ext
9854cat >>conftest.$ac_ext <<_ACEOF
9855/* end confdefs.h. */
98418dba
CW
9856$ac_includes_default
9857#include <$ac_header>
9858_ACEOF
9859rm -f conftest.$ac_objext
ca81d7a0
JD
9860if { (ac_try="$ac_compile"
9861case "(($ac_try" in
9862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9863 *) ac_try_echo=$ac_try;;
9864esac
9865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9866 (eval "$ac_compile") 2>conftest.er1
98418dba 9867 ac_status=$?
edfaf76d
LK
9868 grep -v '^ *+' conftest.er1 >conftest.err
9869 rm -f conftest.er1
9870 cat conftest.err >&5
c0d27fcc 9871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9872 (exit $ac_status); } && {
9873 test -z "$ac_c_werror_flag" ||
9874 test ! -s conftest.err
9875 } && test -s conftest.$ac_objext; then
c0d27fcc 9876 ac_header_compiler=yes
98418dba
CW
9877else
9878 echo "$as_me: failed program was:" >&5
19650fd6
AS
9879sed 's/^/| /' conftest.$ac_ext >&5
9880
ca81d7a0 9881 ac_header_compiler=no
98418dba 9882fi
ca81d7a0
JD
9883
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9885{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9886echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9887
c0d27fcc 9888# Is the header present?
ca81d7a0
JD
9889{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9890echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9891cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9892/* confdefs.h. */
9893_ACEOF
9894cat confdefs.h >>conftest.$ac_ext
9895cat >>conftest.$ac_ext <<_ACEOF
9896/* end confdefs.h. */
98418dba
CW
9897#include <$ac_header>
9898_ACEOF
ca81d7a0
JD
9899if { (ac_try="$ac_cpp conftest.$ac_ext"
9900case "(($ac_try" in
9901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9902 *) ac_try_echo=$ac_try;;
9903esac
9904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9905 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9906 ac_status=$?
6bae0ccf 9907 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9908 rm -f conftest.er1
9909 cat conftest.err >&5
c0d27fcc 9910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9911 (exit $ac_status); } >/dev/null && {
9912 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9913 test ! -s conftest.err
9914 }; then
c0d27fcc 9915 ac_header_preproc=yes
98418dba
CW
9916else
9917 echo "$as_me: failed program was:" >&5
19650fd6
AS
9918sed 's/^/| /' conftest.$ac_ext >&5
9919
c0d27fcc 9920 ac_header_preproc=no
98418dba 9921fi
ca81d7a0 9922
98418dba 9923rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9924{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9925echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9926
9927# So? What about this header?
edfaf76d
LK
9928case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9929 yes:no: )
c0d27fcc
MR
9930 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9931echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9932 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9933echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9934 ac_header_preproc=yes
9935 ;;
9936 no:yes:* )
9937 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9938echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9939 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9940echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9941 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9942echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9943 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9944echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9945 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9946echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9947 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9948echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9949
19650fd6 9950 ;;
c0d27fcc 9951esac
ca81d7a0
JD
9952{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9953echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9954if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
edfaf76d 9957 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9958fi
ca81d7a0
JD
9959ac_res=`eval echo '${'$as_ac_Header'}'`
9960 { echo "$as_me:$LINENO: result: $ac_res" >&5
9961echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9962
9963fi
98418dba 9964if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9965 cat >>confdefs.h <<_ACEOF
98418dba 9966#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9967_ACEOF
98418dba
CW
9968
9969fi
c0d27fcc 9970
98418dba
CW
9971done
9972
c0d27fcc 9973
98418dba
CW
9974for ac_func in getpagesize
9975do
9976as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9977{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9978echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9979if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9980 echo $ECHO_N "(cached) $ECHO_C" >&6
9981else
9982 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9983/* confdefs.h. */
9984_ACEOF
9985cat confdefs.h >>conftest.$ac_ext
9986cat >>conftest.$ac_ext <<_ACEOF
9987/* end confdefs.h. */
edfaf76d
LK
9988/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9989 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9990#define $ac_func innocuous_$ac_func
9991
98418dba 9992/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9993 which can conflict with char $ac_func (); below.
9994 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9995 <limits.h> exists even on freestanding compilers. */
edfaf76d 9996
19650fd6
AS
9997#ifdef __STDC__
9998# include <limits.h>
9999#else
10000# include <assert.h>
10001#endif
edfaf76d
LK
10002
10003#undef $ac_func
10004
ca81d7a0
JD
10005/* Override any GCC internal prototype to avoid an error.
10006 Use char because int might match the return type of a GCC
10007 builtin and then its argument prototype would still apply. */
98418dba
CW
10008#ifdef __cplusplus
10009extern "C"
10010#endif
98418dba 10011char $ac_func ();
98418dba
CW
10012/* The GNU C library defines this for functions which it implements
10013 to always fail with ENOSYS. Some functions are actually named
10014 something starting with __ and the normal name is an alias. */
ca81d7a0 10015#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10016choke me
98418dba
CW
10017#endif
10018
19650fd6
AS
10019int
10020main ()
10021{
ca81d7a0 10022return $ac_func ();
98418dba
CW
10023 ;
10024 return 0;
10025}
10026_ACEOF
10027rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10028if { (ac_try="$ac_link"
10029case "(($ac_try" in
10030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10031 *) ac_try_echo=$ac_try;;
10032esac
10033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10034 (eval "$ac_link") 2>conftest.er1
98418dba 10035 ac_status=$?
edfaf76d
LK
10036 grep -v '^ *+' conftest.er1 >conftest.err
10037 rm -f conftest.er1
10038 cat conftest.err >&5
c0d27fcc 10039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10040 (exit $ac_status); } && {
10041 test -z "$ac_c_werror_flag" ||
10042 test ! -s conftest.err
10043 } && test -s conftest$ac_exeext &&
10044 $as_test_x conftest$ac_exeext; then
98418dba
CW
10045 eval "$as_ac_var=yes"
10046else
10047 echo "$as_me: failed program was:" >&5
19650fd6
AS
10048sed 's/^/| /' conftest.$ac_ext >&5
10049
ca81d7a0 10050 eval "$as_ac_var=no"
98418dba 10051fi
ca81d7a0 10052
f053c89f 10053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10054 conftest$ac_exeext conftest.$ac_ext
98418dba 10055fi
ca81d7a0
JD
10056ac_res=`eval echo '${'$as_ac_var'}'`
10057 { echo "$as_me:$LINENO: result: $ac_res" >&5
10058echo "${ECHO_T}$ac_res" >&6; }
98418dba 10059if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10060 cat >>confdefs.h <<_ACEOF
98418dba 10061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10062_ACEOF
98418dba
CW
10063
10064fi
10065done
10066
ca81d7a0
JD
10067{ echo "$as_me:$LINENO: checking for working mmap" >&5
10068echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10069if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10070 echo $ECHO_N "(cached) $ECHO_C" >&6
10071else
10072 if test "$cross_compiling" = yes; then
10073 ac_cv_func_mmap_fixed_mapped=no
10074else
10075 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10076/* confdefs.h. */
10077_ACEOF
10078cat confdefs.h >>conftest.$ac_ext
10079cat >>conftest.$ac_ext <<_ACEOF
10080/* end confdefs.h. */
98418dba 10081$ac_includes_default
c0d27fcc
MR
10082/* malloc might have been renamed as rpl_malloc. */
10083#undef malloc
10084
98418dba
CW
10085/* Thanks to Mike Haertel and Jim Avera for this test.
10086 Here is a matrix of mmap possibilities:
10087 mmap private not fixed
10088 mmap private fixed at somewhere currently unmapped
10089 mmap private fixed at somewhere already mapped
10090 mmap shared not fixed
10091 mmap shared fixed at somewhere currently unmapped
10092 mmap shared fixed at somewhere already mapped
10093 For private mappings, we should verify that changes cannot be read()
10094 back from the file, nor mmap's back from the file at a different
10095 address. (There have been systems where private was not correctly
10096 implemented like the infamous i386 svr4.0, and systems where the
10097 VM page cache was not coherent with the file system buffer cache
10098 like early versions of FreeBSD and possibly contemporary NetBSD.)
10099 For shared mappings, we should conversely verify that changes get
c0d27fcc 10100 propagated back to all the places they're supposed to be.
98418dba
CW
10101
10102 Grep wants private fixed already mapped.
10103 The main things grep needs to know about mmap are:
10104 * does it exist and is it safe to write into the mmap'd area
10105 * how to use it (BSD variants) */
10106
10107#include <fcntl.h>
10108#include <sys/mman.h>
10109
f053c89f 10110#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10111char *malloc ();
10112#endif
10113
10114/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10115#ifndef HAVE_GETPAGESIZE
98418dba 10116/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10117# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10118# define HAVE_SYS_PARAM_H 1
10119# endif
10120
10121# ifdef _SC_PAGESIZE
10122# define getpagesize() sysconf(_SC_PAGESIZE)
10123# else /* no _SC_PAGESIZE */
f053c89f 10124# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10125# include <sys/param.h>
10126# ifdef EXEC_PAGESIZE
10127# define getpagesize() EXEC_PAGESIZE
10128# else /* no EXEC_PAGESIZE */
10129# ifdef NBPG
10130# define getpagesize() NBPG * CLSIZE
10131# ifndef CLSIZE
10132# define CLSIZE 1
10133# endif /* no CLSIZE */
10134# else /* no NBPG */
10135# ifdef NBPC
10136# define getpagesize() NBPC
10137# else /* no NBPC */
10138# ifdef PAGESIZE
10139# define getpagesize() PAGESIZE
10140# endif /* PAGESIZE */
10141# endif /* no NBPC */
10142# endif /* no NBPG */
10143# endif /* no EXEC_PAGESIZE */
10144# else /* no HAVE_SYS_PARAM_H */
10145# define getpagesize() 8192 /* punt totally */
10146# endif /* no HAVE_SYS_PARAM_H */
10147# endif /* no _SC_PAGESIZE */
10148
10149#endif /* no HAVE_GETPAGESIZE */
10150
10151int
10152main ()
10153{
10154 char *data, *data2, *data3;
10155 int i, pagesize;
10156 int fd;
10157
10158 pagesize = getpagesize ();
10159
10160 /* First, make a file with some known garbage in it. */
10161 data = (char *) malloc (pagesize);
10162 if (!data)
ca81d7a0 10163 return 1;
98418dba
CW
10164 for (i = 0; i < pagesize; ++i)
10165 *(data + i) = rand ();
10166 umask (0);
10167 fd = creat ("conftest.mmap", 0600);
10168 if (fd < 0)
ca81d7a0 10169 return 1;
98418dba 10170 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10171 return 1;
98418dba
CW
10172 close (fd);
10173
10174 /* Next, try to mmap the file at a fixed address which already has
10175 something else allocated at it. If we can, also make sure that
10176 we see the same garbage. */
10177 fd = open ("conftest.mmap", O_RDWR);
10178 if (fd < 0)
ca81d7a0 10179 return 1;
98418dba
CW
10180 data2 = (char *) malloc (2 * pagesize);
10181 if (!data2)
ca81d7a0
JD
10182 return 1;
10183 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10184 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10185 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10186 return 1;
98418dba
CW
10187 for (i = 0; i < pagesize; ++i)
10188 if (*(data + i) != *(data2 + i))
ca81d7a0 10189 return 1;
98418dba
CW
10190
10191 /* Finally, make sure that changes to the mapped area do not
10192 percolate back to the file as seen by read(). (This is a bug on
10193 some variants of i386 svr4.0.) */
10194 for (i = 0; i < pagesize; ++i)
10195 *(data2 + i) = *(data2 + i) + 1;
10196 data3 = (char *) malloc (pagesize);
10197 if (!data3)
ca81d7a0 10198 return 1;
98418dba 10199 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10200 return 1;
98418dba
CW
10201 for (i = 0; i < pagesize; ++i)
10202 if (*(data + i) != *(data3 + i))
ca81d7a0 10203 return 1;
98418dba 10204 close (fd);
ca81d7a0 10205 return 0;
98418dba
CW
10206}
10207_ACEOF
10208rm -f conftest$ac_exeext
ca81d7a0
JD
10209if { (ac_try="$ac_link"
10210case "(($ac_try" in
10211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10212 *) ac_try_echo=$ac_try;;
10213esac
10214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10215 (eval "$ac_link") 2>&5
98418dba 10216 ac_status=$?
c0d27fcc 10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10219 { (case "(($ac_try" in
10220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10221 *) ac_try_echo=$ac_try;;
10222esac
10223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10224 (eval "$ac_try") 2>&5
98418dba 10225 ac_status=$?
c0d27fcc 10226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10227 (exit $ac_status); }; }; then
10228 ac_cv_func_mmap_fixed_mapped=yes
10229else
10230 echo "$as_me: program exited with status $ac_status" >&5
10231echo "$as_me: failed program was:" >&5
19650fd6
AS
10232sed 's/^/| /' conftest.$ac_ext >&5
10233
c0d27fcc 10234( exit $ac_status )
98418dba
CW
10235ac_cv_func_mmap_fixed_mapped=no
10236fi
ca81d7a0 10237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10238fi
ca81d7a0
JD
10239
10240
98418dba 10241fi
ca81d7a0
JD
10242{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10243echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10244if test $ac_cv_func_mmap_fixed_mapped = yes; then
10245
c0d27fcc 10246cat >>confdefs.h <<\_ACEOF
98418dba 10247#define HAVE_MMAP 1
c0d27fcc 10248_ACEOF
98418dba
CW
10249
10250fi
10251rm -f conftest.mmap
10252
10253if test $use_mmap_for_buffers = yes; then
10254 REL_ALLOC=no
10255fi
10256
10257LIBS="$libsrc_libs $LIBS"
10258
c0d27fcc 10259
ca81d7a0
JD
10260{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10261echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10262if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10263 echo $ECHO_N "(cached) $ECHO_C" >&6
10264else
10265 ac_check_lib_save_LIBS=$LIBS
10266LIBS="-ldnet $LIBS"
10267cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
98418dba 10273
ca81d7a0
JD
10274/* Override any GCC internal prototype to avoid an error.
10275 Use char because int might match the return type of a GCC
10276 builtin and then its argument prototype would still apply. */
98418dba
CW
10277#ifdef __cplusplus
10278extern "C"
10279#endif
98418dba 10280char dnet_ntoa ();
98418dba
CW
10281int
10282main ()
10283{
ca81d7a0 10284return dnet_ntoa ();
98418dba
CW
10285 ;
10286 return 0;
10287}
10288_ACEOF
10289rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10290if { (ac_try="$ac_link"
10291case "(($ac_try" in
10292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10293 *) ac_try_echo=$ac_try;;
10294esac
10295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10296 (eval "$ac_link") 2>conftest.er1
98418dba 10297 ac_status=$?
edfaf76d
LK
10298 grep -v '^ *+' conftest.er1 >conftest.err
10299 rm -f conftest.er1
10300 cat conftest.err >&5
c0d27fcc 10301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10302 (exit $ac_status); } && {
10303 test -z "$ac_c_werror_flag" ||
10304 test ! -s conftest.err
10305 } && test -s conftest$ac_exeext &&
10306 $as_test_x conftest$ac_exeext; then
98418dba
CW
10307 ac_cv_lib_dnet_dnet_ntoa=yes
10308else
10309 echo "$as_me: failed program was:" >&5
19650fd6
AS
10310sed 's/^/| /' conftest.$ac_ext >&5
10311
ca81d7a0 10312 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10313fi
ca81d7a0 10314
f053c89f 10315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10316 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10317LIBS=$ac_check_lib_save_LIBS
10318fi
ca81d7a0
JD
10319{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10320echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10321if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10322 cat >>confdefs.h <<_ACEOF
98418dba 10323#define HAVE_LIBDNET 1
c0d27fcc 10324_ACEOF
98418dba
CW
10325
10326 LIBS="-ldnet $LIBS"
10327
10328fi
10329
c0d27fcc 10330
ca81d7a0
JD
10331{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10332echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10333if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10334 echo $ECHO_N "(cached) $ECHO_C" >&6
10335else
10336 ac_check_lib_save_LIBS=$LIBS
10337LIBS="-lXbsd $LIBS"
10338cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10339/* confdefs.h. */
10340_ACEOF
10341cat confdefs.h >>conftest.$ac_ext
10342cat >>conftest.$ac_ext <<_ACEOF
10343/* end confdefs.h. */
98418dba 10344
c0d27fcc 10345
98418dba
CW
10346int
10347main ()
10348{
ca81d7a0 10349return main ();
98418dba
CW
10350 ;
10351 return 0;
10352}
10353_ACEOF
10354rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10355if { (ac_try="$ac_link"
10356case "(($ac_try" in
10357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10358 *) ac_try_echo=$ac_try;;
10359esac
10360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10361 (eval "$ac_link") 2>conftest.er1
98418dba 10362 ac_status=$?
edfaf76d
LK
10363 grep -v '^ *+' conftest.er1 >conftest.err
10364 rm -f conftest.er1
10365 cat conftest.err >&5
c0d27fcc 10366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10367 (exit $ac_status); } && {
10368 test -z "$ac_c_werror_flag" ||
10369 test ! -s conftest.err
10370 } && test -s conftest$ac_exeext &&
10371 $as_test_x conftest$ac_exeext; then
98418dba
CW
10372 ac_cv_lib_Xbsd_main=yes
10373else
10374 echo "$as_me: failed program was:" >&5
19650fd6
AS
10375sed 's/^/| /' conftest.$ac_ext >&5
10376
ca81d7a0 10377 ac_cv_lib_Xbsd_main=no
98418dba 10378fi
ca81d7a0 10379
f053c89f 10380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10381 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10382LIBS=$ac_check_lib_save_LIBS
10383fi
ca81d7a0
JD
10384{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10385echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10386if test $ac_cv_lib_Xbsd_main = yes; then
10387 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10388fi
10389
c0d27fcc
MR
10390
10391
ca81d7a0
JD
10392{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10393echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10394if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10395 echo $ECHO_N "(cached) $ECHO_C" >&6
10396else
10397 ac_check_lib_save_LIBS=$LIBS
10398LIBS="-lpthreads $LIBS"
10399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10400/* confdefs.h. */
10401_ACEOF
10402cat confdefs.h >>conftest.$ac_ext
10403cat >>conftest.$ac_ext <<_ACEOF
10404/* end confdefs.h. */
98418dba 10405
ca81d7a0
JD
10406/* Override any GCC internal prototype to avoid an error.
10407 Use char because int might match the return type of a GCC
10408 builtin and then its argument prototype would still apply. */
98418dba
CW
10409#ifdef __cplusplus
10410extern "C"
10411#endif
98418dba 10412char cma_open ();
98418dba
CW
10413int
10414main ()
10415{
ca81d7a0 10416return cma_open ();
98418dba
CW
10417 ;
10418 return 0;
10419}
10420_ACEOF
10421rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10422if { (ac_try="$ac_link"
10423case "(($ac_try" in
10424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10425 *) ac_try_echo=$ac_try;;
10426esac
10427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10428 (eval "$ac_link") 2>conftest.er1
98418dba 10429 ac_status=$?
edfaf76d
LK
10430 grep -v '^ *+' conftest.er1 >conftest.err
10431 rm -f conftest.er1
10432 cat conftest.err >&5
c0d27fcc 10433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10434 (exit $ac_status); } && {
10435 test -z "$ac_c_werror_flag" ||
10436 test ! -s conftest.err
10437 } && test -s conftest$ac_exeext &&
10438 $as_test_x conftest$ac_exeext; then
98418dba
CW
10439 ac_cv_lib_pthreads_cma_open=yes
10440else
10441 echo "$as_me: failed program was:" >&5
19650fd6
AS
10442sed 's/^/| /' conftest.$ac_ext >&5
10443
ca81d7a0 10444 ac_cv_lib_pthreads_cma_open=no
98418dba 10445fi
ca81d7a0 10446
f053c89f 10447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10448 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10449LIBS=$ac_check_lib_save_LIBS
10450fi
ca81d7a0
JD
10451{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10452echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10453if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10454 cat >>confdefs.h <<_ACEOF
98418dba 10455#define HAVE_LIBPTHREADS 1
c0d27fcc 10456_ACEOF
98418dba
CW
10457
10458 LIBS="-lpthreads $LIBS"
10459
10460fi
10461
c0d27fcc 10462
ca81d7a0
JD
10463{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10464echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10465if test -d /usr/X386/include; then
10466 HAVE_XFREE386=yes
10467 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10468else
10469 HAVE_XFREE386=no
10470fi
ca81d7a0
JD
10471{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10472echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10473
55597d70
DL
10474
10475case ${host_os} in
10476aix*)
ca81d7a0
JD
10477 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10478echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10479if test "${gdb_cv_bigtoc+set}" = set; then
10480 echo $ECHO_N "(cached) $ECHO_C" >&6
10481else
10482
10483 case $GCC in
10484 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10485 *) gdb_cv_bigtoc=-bbigtoc ;;
10486 esac
10487
10488 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10489 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10490/* confdefs.h. */
10491_ACEOF
10492cat confdefs.h >>conftest.$ac_ext
10493cat >>conftest.$ac_ext <<_ACEOF
10494/* end confdefs.h. */
55597d70
DL
10495
10496int
10497main ()
10498{
10499int i;
10500 ;
10501 return 0;
10502}
10503_ACEOF
10504rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10505if { (ac_try="$ac_link"
10506case "(($ac_try" in
10507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10508 *) ac_try_echo=$ac_try;;
10509esac
10510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10511 (eval "$ac_link") 2>conftest.er1
55597d70 10512 ac_status=$?
edfaf76d
LK
10513 grep -v '^ *+' conftest.er1 >conftest.err
10514 rm -f conftest.er1
10515 cat conftest.err >&5
55597d70 10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10517 (exit $ac_status); } && {
10518 test -z "$ac_c_werror_flag" ||
10519 test ! -s conftest.err
10520 } && test -s conftest$ac_exeext &&
10521 $as_test_x conftest$ac_exeext; then
55597d70
DL
10522 :
10523else
10524 echo "$as_me: failed program was:" >&5
19650fd6
AS
10525sed 's/^/| /' conftest.$ac_ext >&5
10526
ca81d7a0 10527 gdb_cv_bigtoc=
55597d70 10528fi
ca81d7a0 10529
f053c89f 10530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10531 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10532
10533fi
ca81d7a0
JD
10534{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10535echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10536 ;;
10537esac
10538
ae1a998c
RS
10539# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10540# used for the tests that follow. We set them back to REAL_CFLAGS and
10541# REAL_CPPFLAGS later on.
98418dba
CW
10542
10543REAL_CPPFLAGS="$CPPFLAGS"
10544
10545if test "${HAVE_X11}" = "yes"; then
10546 DEFS="$C_SWITCH_X_SITE $DEFS"
10547 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10548 LIBS="$LIBX $LIBS"
10549 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10550 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10551
10552 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10553 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10554 # but it's more convenient here to set LD_RUN_PATH
10555 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10556 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10557 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10558 export LD_RUN_PATH
10559 fi
10560
10561 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10562 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10563echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10564 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10565/* confdefs.h. */
10566_ACEOF
10567cat confdefs.h >>conftest.$ac_ext
10568cat >>conftest.$ac_ext <<_ACEOF
10569/* end confdefs.h. */
98418dba 10570
98418dba
CW
10571int
10572main ()
10573{
10574XOpenDisplay ("foo");
10575 ;
10576 return 0;
10577}
10578_ACEOF
10579rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10580if { (ac_try="$ac_link"
10581case "(($ac_try" in
10582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10583 *) ac_try_echo=$ac_try;;
10584esac
10585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10586 (eval "$ac_link") 2>conftest.er1
98418dba 10587 ac_status=$?
edfaf76d
LK
10588 grep -v '^ *+' conftest.er1 >conftest.err
10589 rm -f conftest.er1
10590 cat conftest.err >&5
c0d27fcc 10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10592 (exit $ac_status); } && {
10593 test -z "$ac_c_werror_flag" ||
10594 test ! -s conftest.err
10595 } && test -s conftest$ac_exeext &&
10596 $as_test_x conftest$ac_exeext; then
35996d22 10597 xlinux_first_failure=no
98418dba
CW
10598else
10599 echo "$as_me: failed program was:" >&5
19650fd6
AS
10600sed 's/^/| /' conftest.$ac_ext >&5
10601
ca81d7a0 10602 xlinux_first_failure=yes
98418dba 10603fi
ca81d7a0 10604
f053c89f 10605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10606 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10607 if test "${xlinux_first_failure}" = "yes"; then
10608 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10609 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10610 OLD_CPPFLAGS="$CPPFLAGS"
10611 OLD_LIBS="$LIBS"
10612 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10613 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10614 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10615 LIBS="$LIBS -b i486-linuxaout"
10616 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10617/* confdefs.h. */
10618_ACEOF
10619cat confdefs.h >>conftest.$ac_ext
10620cat >>conftest.$ac_ext <<_ACEOF
10621/* end confdefs.h. */
98418dba 10622
98418dba
CW
10623int
10624main ()
10625{
10626XOpenDisplay ("foo");
10627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10632if { (ac_try="$ac_link"
10633case "(($ac_try" in
10634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10635 *) ac_try_echo=$ac_try;;
10636esac
10637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10638 (eval "$ac_link") 2>conftest.er1
98418dba 10639 ac_status=$?
edfaf76d
LK
10640 grep -v '^ *+' conftest.er1 >conftest.err
10641 rm -f conftest.er1
10642 cat conftest.err >&5
c0d27fcc 10643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10644 (exit $ac_status); } && {
10645 test -z "$ac_c_werror_flag" ||
10646 test ! -s conftest.err
10647 } && test -s conftest$ac_exeext &&
10648 $as_test_x conftest$ac_exeext; then
98418dba
CW
10649 xlinux_second_failure=no
10650else
10651 echo "$as_me: failed program was:" >&5
19650fd6
AS
10652sed 's/^/| /' conftest.$ac_ext >&5
10653
ca81d7a0 10654 xlinux_second_failure=yes
98418dba 10655fi
ca81d7a0 10656
f053c89f 10657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10658 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10659 if test "${xlinux_second_failure}" = "yes"; then
10660 # If we get the same failure with -b, there is no use adding -b.
10661 # So take it out. This plays safe.
10662 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10663 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10664 CPPFLAGS="$OLD_CPPFLAGS"
10665 LIBS="$OLD_LIBS"
ca81d7a0
JD
10666 { echo "$as_me:$LINENO: result: no" >&5
10667echo "${ECHO_T}no" >&6; }
98418dba 10668 else
ca81d7a0
JD
10669 { echo "$as_me:$LINENO: result: yes" >&5
10670echo "${ECHO_T}yes" >&6; }
98418dba
CW
10671 fi
10672 else
ca81d7a0
JD
10673 { echo "$as_me:$LINENO: result: no" >&5
10674echo "${ECHO_T}no" >&6; }
98418dba
CW
10675 fi
10676 fi
10677
10678 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10679 # header files included from there.
ca81d7a0
JD
10680 { echo "$as_me:$LINENO: checking for Xkb" >&5
10681echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10683/* confdefs.h. */
10684_ACEOF
10685cat confdefs.h >>conftest.$ac_ext
10686cat >>conftest.$ac_ext <<_ACEOF
10687/* end confdefs.h. */
98418dba
CW
10688#include <X11/Xlib.h>
10689#include <X11/XKBlib.h>
98418dba
CW
10690int
10691main ()
10692{
10693XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10694 ;
10695 return 0;
10696}
10697_ACEOF
10698rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10699if { (ac_try="$ac_link"
10700case "(($ac_try" in
10701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10702 *) ac_try_echo=$ac_try;;
10703esac
10704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10705 (eval "$ac_link") 2>conftest.er1
98418dba 10706 ac_status=$?
edfaf76d
LK
10707 grep -v '^ *+' conftest.er1 >conftest.err
10708 rm -f conftest.er1
10709 cat conftest.err >&5
c0d27fcc 10710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10711 (exit $ac_status); } && {
10712 test -z "$ac_c_werror_flag" ||
10713 test ! -s conftest.err
10714 } && test -s conftest$ac_exeext &&
10715 $as_test_x conftest$ac_exeext; then
98418dba
CW
10716 emacs_xkb=yes
10717else
10718 echo "$as_me: failed program was:" >&5
19650fd6
AS
10719sed 's/^/| /' conftest.$ac_ext >&5
10720
ca81d7a0 10721 emacs_xkb=no
98418dba 10722fi
ca81d7a0 10723
f053c89f 10724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10725 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10726 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10727echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10728 if test $emacs_xkb = yes; then
b936fae4 10729
c0d27fcc 10730cat >>confdefs.h <<\_ACEOF
98418dba 10731#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10732_ACEOF
98418dba
CW
10733
10734 fi
10735
c0d27fcc
MR
10736
10737
10738
10739
98418dba
CW
10740for ac_func in XrmSetDatabase XScreenResourceString \
10741XScreenNumberOfScreen XSetWMProtocols
10742do
10743as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10744{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10745echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10746if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10747 echo $ECHO_N "(cached) $ECHO_C" >&6
10748else
10749 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10750/* confdefs.h. */
10751_ACEOF
10752cat confdefs.h >>conftest.$ac_ext
10753cat >>conftest.$ac_ext <<_ACEOF
10754/* end confdefs.h. */
edfaf76d
LK
10755/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10756 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10757#define $ac_func innocuous_$ac_func
10758
98418dba 10759/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10760 which can conflict with char $ac_func (); below.
10761 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10762 <limits.h> exists even on freestanding compilers. */
edfaf76d 10763
19650fd6
AS
10764#ifdef __STDC__
10765# include <limits.h>
10766#else
10767# include <assert.h>
10768#endif
edfaf76d
LK
10769
10770#undef $ac_func
10771
ca81d7a0
JD
10772/* Override any GCC internal prototype to avoid an error.
10773 Use char because int might match the return type of a GCC
10774 builtin and then its argument prototype would still apply. */
98418dba
CW
10775#ifdef __cplusplus
10776extern "C"
10777#endif
98418dba 10778char $ac_func ();
98418dba
CW
10779/* The GNU C library defines this for functions which it implements
10780 to always fail with ENOSYS. Some functions are actually named
10781 something starting with __ and the normal name is an alias. */
ca81d7a0 10782#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10783choke me
98418dba
CW
10784#endif
10785
19650fd6
AS
10786int
10787main ()
10788{
ca81d7a0 10789return $ac_func ();
98418dba
CW
10790 ;
10791 return 0;
10792}
10793_ACEOF
10794rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10795if { (ac_try="$ac_link"
10796case "(($ac_try" in
10797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10798 *) ac_try_echo=$ac_try;;
10799esac
10800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10801 (eval "$ac_link") 2>conftest.er1
98418dba 10802 ac_status=$?
edfaf76d
LK
10803 grep -v '^ *+' conftest.er1 >conftest.err
10804 rm -f conftest.er1
10805 cat conftest.err >&5
c0d27fcc 10806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10807 (exit $ac_status); } && {
10808 test -z "$ac_c_werror_flag" ||
10809 test ! -s conftest.err
10810 } && test -s conftest$ac_exeext &&
10811 $as_test_x conftest$ac_exeext; then
98418dba
CW
10812 eval "$as_ac_var=yes"
10813else
10814 echo "$as_me: failed program was:" >&5
19650fd6
AS
10815sed 's/^/| /' conftest.$ac_ext >&5
10816
ca81d7a0 10817 eval "$as_ac_var=no"
98418dba 10818fi
ca81d7a0 10819
f053c89f 10820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10821 conftest$ac_exeext conftest.$ac_ext
98418dba 10822fi
ca81d7a0
JD
10823ac_res=`eval echo '${'$as_ac_var'}'`
10824 { echo "$as_me:$LINENO: result: $ac_res" >&5
10825echo "${ECHO_T}$ac_res" >&6; }
98418dba 10826if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10827 cat >>confdefs.h <<_ACEOF
98418dba 10828#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10829_ACEOF
98418dba
CW
10830
10831fi
10832done
10833
10834fi
10835
10836if test "${window_system}" = "x11"; then
ca81d7a0
JD
10837 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10838echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10839 if test "${emacs_cv_x11_version_6+set}" = set; then
10840 echo $ECHO_N "(cached) $ECHO_C" >&6
10841else
10842 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10843/* confdefs.h. */
10844_ACEOF
10845cat confdefs.h >>conftest.$ac_ext
10846cat >>conftest.$ac_ext <<_ACEOF
10847/* end confdefs.h. */
98418dba 10848#include <X11/Xlib.h>
98418dba
CW
10849int
10850main ()
10851{
10852#if XlibSpecificationRelease < 6
10853fail;
10854#endif
10855
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10861if { (ac_try="$ac_link"
10862case "(($ac_try" in
10863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10864 *) ac_try_echo=$ac_try;;
10865esac
10866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10867 (eval "$ac_link") 2>conftest.er1
98418dba 10868 ac_status=$?
edfaf76d
LK
10869 grep -v '^ *+' conftest.er1 >conftest.err
10870 rm -f conftest.er1
10871 cat conftest.err >&5
c0d27fcc 10872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10873 (exit $ac_status); } && {
10874 test -z "$ac_c_werror_flag" ||
10875 test ! -s conftest.err
10876 } && test -s conftest$ac_exeext &&
10877 $as_test_x conftest$ac_exeext; then
98418dba
CW
10878 emacs_cv_x11_version_6=yes
10879else
10880 echo "$as_me: failed program was:" >&5
19650fd6
AS
10881sed 's/^/| /' conftest.$ac_ext >&5
10882
ca81d7a0 10883 emacs_cv_x11_version_6=no
98418dba 10884fi
ca81d7a0 10885
f053c89f 10886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10887 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10888fi
10889
10890 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10891 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10892echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10893
c0d27fcc 10894cat >>confdefs.h <<\_ACEOF
98418dba 10895#define HAVE_X11R6 1
c0d27fcc 10896_ACEOF
98418dba
CW
10897
10898 else
ca81d7a0
JD
10899 { echo "$as_me:$LINENO: result: before 6" >&5
10900echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10901 fi
10902fi
10903
10904if test "${window_system}" = "x11"; then
ca81d7a0
JD
10905 { echo "$as_me:$LINENO: checking X11 version 5" >&5
10906echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
10907 if test "${emacs_cv_x11_version_5+set}" = set; then
10908 echo $ECHO_N "(cached) $ECHO_C" >&6
10909else
10910 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10911/* confdefs.h. */
10912_ACEOF
10913cat confdefs.h >>conftest.$ac_ext
10914cat >>conftest.$ac_ext <<_ACEOF
10915/* end confdefs.h. */
98418dba 10916#include <X11/Xlib.h>
98418dba
CW
10917int
10918main ()
10919{
10920#if XlibSpecificationRelease < 5
10921fail;
10922#endif
10923
10924 ;
10925 return 0;
10926}
10927_ACEOF
10928rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10929if { (ac_try="$ac_link"
10930case "(($ac_try" in
10931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10932 *) ac_try_echo=$ac_try;;
10933esac
10934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10935 (eval "$ac_link") 2>conftest.er1
98418dba 10936 ac_status=$?
edfaf76d
LK
10937 grep -v '^ *+' conftest.er1 >conftest.err
10938 rm -f conftest.er1
10939 cat conftest.err >&5
c0d27fcc 10940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10941 (exit $ac_status); } && {
10942 test -z "$ac_c_werror_flag" ||
10943 test ! -s conftest.err
10944 } && test -s conftest$ac_exeext &&
10945 $as_test_x conftest$ac_exeext; then
98418dba
CW
10946 emacs_cv_x11_version_5=yes
10947else
10948 echo "$as_me: failed program was:" >&5
19650fd6
AS
10949sed 's/^/| /' conftest.$ac_ext >&5
10950
ca81d7a0 10951 emacs_cv_x11_version_5=no
98418dba 10952fi
ca81d7a0 10953
f053c89f 10954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10955 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10956fi
10957
10958 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
10959 { echo "$as_me:$LINENO: result: 5 or newer" >&5
10960echo "${ECHO_T}5 or newer" >&6; }
98418dba 10961 HAVE_X11R5=yes
b936fae4 10962
c0d27fcc 10963cat >>confdefs.h <<\_ACEOF
98418dba 10964#define HAVE_X11R5 1
c0d27fcc 10965_ACEOF
98418dba
CW
10966
10967 else
10968 HAVE_X11R5=no
ca81d7a0
JD
10969 { echo "$as_me:$LINENO: result: before 5" >&5
10970echo "${ECHO_T}before 5" >&6; }
98418dba
CW
10971 fi
10972fi
10973
488dd4c4 10974HAVE_GTK=no
8eeae1c9
JD
10975if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
10976 USE_X_TOOLKIT=none
10977fi
488dd4c4 10978if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10979 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10980 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10981echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10982 { (exit 1); exit 1; }; };
10983 fi
d0162c10
JD
10984 GLIB_REQUIRED=2.6
10985 GTK_REQUIRED=2.6
488dd4c4
JD
10986 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10987
10988 if test "X${with_pkg_config_prog}" != X; then
10989 PKG_CONFIG="${with_pkg_config_prog}"
10990 fi
10991
10992 succeeded=no
10993
10994 if test -z "$PKG_CONFIG"; then
10995 # Extract the first word of "pkg-config", so it can be a program name with args.
10996set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10997{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10998echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10999if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11000 echo $ECHO_N "(cached) $ECHO_C" >&6
11001else
11002 case $PKG_CONFIG in
11003 [\\/]* | ?:[\\/]*)
11004 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11005 ;;
11006 *)
11007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010 IFS=$as_save_IFS
11011 test -z "$as_dir" && as_dir=.
11012 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11014 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11016 break 2
11017 fi
11018done
11019done
ca81d7a0 11020IFS=$as_save_IFS
488dd4c4
JD
11021
11022 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11023 ;;
11024esac
11025fi
11026PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11027if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11028 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11029echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11030else
ca81d7a0
JD
11031 { echo "$as_me:$LINENO: result: no" >&5
11032echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11033fi
11034
ca81d7a0 11035
488dd4c4
JD
11036 fi
11037
11038 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
11039 { { echo "$as_me:$LINENO: error:
11040 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
11041echo "$as_me: error:
11042 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
11043 { (exit 1); exit 1; }; }
488dd4c4
JD
11044 else
11045 PKG_CONFIG_MIN_VERSION=0.9.0
11046 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11047 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11048echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11049
67db6aa2 11050 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11051 { echo "$as_me:$LINENO: result: yes" >&5
11052echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11053 succeeded=yes
11054
ca81d7a0
JD
11055 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11056echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11057 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11058 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11059echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11060
ca81d7a0
JD
11061 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11062echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11063 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11064 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11065echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11066 else
ca81d7a0
JD
11067 { echo "$as_me:$LINENO: result: no" >&5
11068echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11069 GTK_CFLAGS=""
11070 GTK_LIBS=""
11071 ## If we have a custom action on failure, don't print errors, but
11072 ## do set a variable so people can do so.
11073 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
11074 echo $GTK_PKG_ERRORS
11075 fi
11076
11077
11078
11079 else
11080 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11081 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11082 fi
11083 fi
11084
11085 if test $succeeded = yes; then
11086 :
11087 else
11088 { { echo "$as_me:$LINENO: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
11089echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
11090 { (exit 1); exit 1; }; }
11091 fi
11092
11093
11094
11095 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11096 CFLAGS="$CFLAGS $GTK_CFLAGS"
11097 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11098 GTK_COMPILES=no
57669b57 11099
8eeae1c9 11100for ac_func in gtk_main
57669b57
JD
11101do
11102as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11103{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11104echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11105if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11106 echo $ECHO_N "(cached) $ECHO_C" >&6
11107else
11108 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11109/* confdefs.h. */
11110_ACEOF
11111cat confdefs.h >>conftest.$ac_ext
11112cat >>conftest.$ac_ext <<_ACEOF
11113/* end confdefs.h. */
edfaf76d
LK
11114/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11115 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11116#define $ac_func innocuous_$ac_func
11117
57669b57
JD
11118/* System header to define __stub macros and hopefully few prototypes,
11119 which can conflict with char $ac_func (); below.
11120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11121 <limits.h> exists even on freestanding compilers. */
edfaf76d 11122
57669b57
JD
11123#ifdef __STDC__
11124# include <limits.h>
11125#else
11126# include <assert.h>
11127#endif
edfaf76d
LK
11128
11129#undef $ac_func
11130
ca81d7a0
JD
11131/* Override any GCC internal prototype to avoid an error.
11132 Use char because int might match the return type of a GCC
11133 builtin and then its argument prototype would still apply. */
57669b57
JD
11134#ifdef __cplusplus
11135extern "C"
57669b57 11136#endif
57669b57
JD
11137char $ac_func ();
11138/* The GNU C library defines this for functions which it implements
11139 to always fail with ENOSYS. Some functions are actually named
11140 something starting with __ and the normal name is an alias. */
ca81d7a0 11141#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11142choke me
57669b57
JD
11143#endif
11144
11145int
11146main ()
11147{
ca81d7a0 11148return $ac_func ();
57669b57
JD
11149 ;
11150 return 0;
11151}
11152_ACEOF
11153rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11154if { (ac_try="$ac_link"
11155case "(($ac_try" in
11156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11157 *) ac_try_echo=$ac_try;;
11158esac
11159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11160 (eval "$ac_link") 2>conftest.er1
57669b57 11161 ac_status=$?
edfaf76d
LK
11162 grep -v '^ *+' conftest.er1 >conftest.err
11163 rm -f conftest.er1
11164 cat conftest.err >&5
57669b57 11165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11166 (exit $ac_status); } && {
11167 test -z "$ac_c_werror_flag" ||
11168 test ! -s conftest.err
11169 } && test -s conftest$ac_exeext &&
11170 $as_test_x conftest$ac_exeext; then
57669b57
JD
11171 eval "$as_ac_var=yes"
11172else
11173 echo "$as_me: failed program was:" >&5
11174sed 's/^/| /' conftest.$ac_ext >&5
11175
ca81d7a0 11176 eval "$as_ac_var=no"
57669b57 11177fi
ca81d7a0 11178
f053c89f 11179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11180 conftest$ac_exeext conftest.$ac_ext
57669b57 11181fi
ca81d7a0
JD
11182ac_res=`eval echo '${'$as_ac_var'}'`
11183 { echo "$as_me:$LINENO: result: $ac_res" >&5
11184echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11185if test `eval echo '${'$as_ac_var'}'` = yes; then
11186 cat >>confdefs.h <<_ACEOF
11187#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11188_ACEOF
8eeae1c9 11189 GTK_COMPILES=yes
57669b57
JD
11190fi
11191done
11192
8eeae1c9
JD
11193 if test "${GTK_COMPILES}" != "yes"; then
11194 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11195echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11196 { (exit 1); exit 1; }; };
11197 fi
11198
11199 HAVE_GTK=yes
57669b57
JD
11200
11201cat >>confdefs.h <<\_ACEOF
8eeae1c9 11202#define HAVE_GTK 1
572a3cc2
JD
11203_ACEOF
11204
8eeae1c9
JD
11205 USE_X_TOOLKIT=none
11206
11207 if test "$with_toolkit_scroll_bars" != no; then
11208 with_toolkit_scroll_bars=yes
572a3cc2 11209 fi
572a3cc2 11210
8eeae1c9
JD
11211 HAVE_GTK_MULTIDISPLAY=no
11212
11213for ac_func in gdk_display_open
572a3cc2
JD
11214do
11215as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11216{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11217echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11218if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11219 echo $ECHO_N "(cached) $ECHO_C" >&6
11220else
11221 cat >conftest.$ac_ext <<_ACEOF
11222/* confdefs.h. */
11223_ACEOF
11224cat confdefs.h >>conftest.$ac_ext
11225cat >>conftest.$ac_ext <<_ACEOF
11226/* end confdefs.h. */
edfaf76d
LK
11227/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11228 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11229#define $ac_func innocuous_$ac_func
11230
572a3cc2
JD
11231/* System header to define __stub macros and hopefully few prototypes,
11232 which can conflict with char $ac_func (); below.
11233 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11234 <limits.h> exists even on freestanding compilers. */
edfaf76d 11235
572a3cc2
JD
11236#ifdef __STDC__
11237# include <limits.h>
11238#else
11239# include <assert.h>
11240#endif
edfaf76d
LK
11241
11242#undef $ac_func
11243
ca81d7a0
JD
11244/* Override any GCC internal prototype to avoid an error.
11245 Use char because int might match the return type of a GCC
11246 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11247#ifdef __cplusplus
11248extern "C"
572a3cc2 11249#endif
572a3cc2
JD
11250char $ac_func ();
11251/* The GNU C library defines this for functions which it implements
11252 to always fail with ENOSYS. Some functions are actually named
11253 something starting with __ and the normal name is an alias. */
ca81d7a0 11254#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11255choke me
572a3cc2
JD
11256#endif
11257
11258int
11259main ()
11260{
ca81d7a0 11261return $ac_func ();
572a3cc2
JD
11262 ;
11263 return 0;
11264}
11265_ACEOF
11266rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11267if { (ac_try="$ac_link"
11268case "(($ac_try" in
11269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270 *) ac_try_echo=$ac_try;;
11271esac
11272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11273 (eval "$ac_link") 2>conftest.er1
572a3cc2 11274 ac_status=$?
edfaf76d
LK
11275 grep -v '^ *+' conftest.er1 >conftest.err
11276 rm -f conftest.er1
11277 cat conftest.err >&5
572a3cc2 11278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11279 (exit $ac_status); } && {
11280 test -z "$ac_c_werror_flag" ||
11281 test ! -s conftest.err
11282 } && test -s conftest$ac_exeext &&
11283 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11284 eval "$as_ac_var=yes"
11285else
11286 echo "$as_me: failed program was:" >&5
11287sed 's/^/| /' conftest.$ac_ext >&5
11288
ca81d7a0 11289 eval "$as_ac_var=no"
572a3cc2 11290fi
ca81d7a0 11291
f053c89f 11292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11293 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11294fi
ca81d7a0
JD
11295ac_res=`eval echo '${'$as_ac_var'}'`
11296 { echo "$as_me:$LINENO: result: $ac_res" >&5
11297echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11298if test `eval echo '${'$as_ac_var'}'` = yes; then
11299 cat >>confdefs.h <<_ACEOF
11300#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11301_ACEOF
8eeae1c9 11302 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
11303fi
11304done
11305
8eeae1c9 11306 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 11307
8eeae1c9
JD
11308cat >>confdefs.h <<\_ACEOF
11309#define HAVE_GTK_MULTIDISPLAY 1
11310_ACEOF
572a3cc2 11311
8eeae1c9
JD
11312 fi
11313 HAVE_GTK_FILE_SELECTION=no
11314
11315for ac_func in gtk_file_selection_new
572a3cc2
JD
11316do
11317as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11318{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11319echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11320if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11321 echo $ECHO_N "(cached) $ECHO_C" >&6
11322else
11323 cat >conftest.$ac_ext <<_ACEOF
11324/* confdefs.h. */
11325_ACEOF
11326cat confdefs.h >>conftest.$ac_ext
11327cat >>conftest.$ac_ext <<_ACEOF
11328/* end confdefs.h. */
edfaf76d
LK
11329/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11330 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11331#define $ac_func innocuous_$ac_func
11332
572a3cc2
JD
11333/* System header to define __stub macros and hopefully few prototypes,
11334 which can conflict with char $ac_func (); below.
11335 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11336 <limits.h> exists even on freestanding compilers. */
edfaf76d 11337
572a3cc2
JD
11338#ifdef __STDC__
11339# include <limits.h>
11340#else
11341# include <assert.h>
11342#endif
edfaf76d
LK
11343
11344#undef $ac_func
11345
ca81d7a0
JD
11346/* Override any GCC internal prototype to avoid an error.
11347 Use char because int might match the return type of a GCC
11348 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11349#ifdef __cplusplus
11350extern "C"
572a3cc2 11351#endif
572a3cc2
JD
11352char $ac_func ();
11353/* The GNU C library defines this for functions which it implements
11354 to always fail with ENOSYS. Some functions are actually named
11355 something starting with __ and the normal name is an alias. */
ca81d7a0 11356#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11357choke me
572a3cc2
JD
11358#endif
11359
11360int
11361main ()
11362{
ca81d7a0 11363return $ac_func ();
572a3cc2
JD
11364 ;
11365 return 0;
11366}
11367_ACEOF
11368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11369if { (ac_try="$ac_link"
11370case "(($ac_try" in
11371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11372 *) ac_try_echo=$ac_try;;
11373esac
11374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11375 (eval "$ac_link") 2>conftest.er1
572a3cc2 11376 ac_status=$?
edfaf76d
LK
11377 grep -v '^ *+' conftest.er1 >conftest.err
11378 rm -f conftest.er1
11379 cat conftest.err >&5
572a3cc2 11380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11381 (exit $ac_status); } && {
11382 test -z "$ac_c_werror_flag" ||
11383 test ! -s conftest.err
11384 } && test -s conftest$ac_exeext &&
11385 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11386 eval "$as_ac_var=yes"
11387else
11388 echo "$as_me: failed program was:" >&5
11389sed 's/^/| /' conftest.$ac_ext >&5
11390
ca81d7a0 11391 eval "$as_ac_var=no"
572a3cc2 11392fi
ca81d7a0 11393
f053c89f 11394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11395 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11396fi
ca81d7a0
JD
11397ac_res=`eval echo '${'$as_ac_var'}'`
11398 { echo "$as_me:$LINENO: result: $ac_res" >&5
11399echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11400if test `eval echo '${'$as_ac_var'}'` = yes; then
11401 cat >>confdefs.h <<_ACEOF
11402#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11403_ACEOF
8eeae1c9 11404 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
11405fi
11406done
11407
11408
8eeae1c9 11409 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 11410
8eeae1c9 11411for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 11412do
8eeae1c9 11413as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11414{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11415echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11416if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 11417 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11418else
8eeae1c9 11419 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
11420/* confdefs.h. */
11421_ACEOF
11422cat confdefs.h >>conftest.$ac_ext
11423cat >>conftest.$ac_ext <<_ACEOF
11424/* end confdefs.h. */
8eeae1c9
JD
11425/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11426 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11427#define $ac_func innocuous_$ac_func
11428
11429/* System header to define __stub macros and hopefully few prototypes,
11430 which can conflict with char $ac_func (); below.
11431 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11432 <limits.h> exists even on freestanding compilers. */
11433
11434#ifdef __STDC__
11435# include <limits.h>
11436#else
11437# include <assert.h>
11438#endif
11439
11440#undef $ac_func
11441
ca81d7a0
JD
11442/* Override any GCC internal prototype to avoid an error.
11443 Use char because int might match the return type of a GCC
11444 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
11445#ifdef __cplusplus
11446extern "C"
11447#endif
11448char $ac_func ();
11449/* The GNU C library defines this for functions which it implements
11450 to always fail with ENOSYS. Some functions are actually named
11451 something starting with __ and the normal name is an alias. */
ca81d7a0 11452#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
11453choke me
11454#endif
11455
11456int
11457main ()
11458{
ca81d7a0 11459return $ac_func ();
8eeae1c9
JD
11460 ;
11461 return 0;
11462}
11463_ACEOF
11464rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11465if { (ac_try="$ac_link"
11466case "(($ac_try" in
11467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11468 *) ac_try_echo=$ac_try;;
11469esac
11470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11471 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
11472 ac_status=$?
11473 grep -v '^ *+' conftest.er1 >conftest.err
11474 rm -f conftest.er1
11475 cat conftest.err >&5
11476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11477 (exit $ac_status); } && {
11478 test -z "$ac_c_werror_flag" ||
11479 test ! -s conftest.err
11480 } && test -s conftest$ac_exeext &&
11481 $as_test_x conftest$ac_exeext; then
8eeae1c9
JD
11482 eval "$as_ac_var=yes"
11483else
11484 echo "$as_me: failed program was:" >&5
11485sed 's/^/| /' conftest.$ac_ext >&5
11486
ca81d7a0 11487 eval "$as_ac_var=no"
8eeae1c9 11488fi
ca81d7a0 11489
f053c89f 11490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8eeae1c9
JD
11491 conftest$ac_exeext conftest.$ac_ext
11492fi
ca81d7a0
JD
11493ac_res=`eval echo '${'$as_ac_var'}'`
11494 { echo "$as_me:$LINENO: result: $ac_res" >&5
11495echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11496if test `eval echo '${'$as_ac_var'}'` = yes; then
11497 cat >>confdefs.h <<_ACEOF
11498#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11499_ACEOF
11500 HAVE_GTK_FILE_CHOOSER=yes
11501fi
11502done
11503
11504
11505 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11506 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11507
11508cat >>confdefs.h <<\_ACEOF
11509#define HAVE_GTK_FILE_BOTH 1
11510_ACEOF
11511
11512 fi
11513
11514 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11515 HAVE_GTK_AND_PTHREAD=no
11516
11517for ac_header in pthread.h
11518do
11519as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11521 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
11524 echo $ECHO_N "(cached) $ECHO_C" >&6
11525fi
ca81d7a0
JD
11526ac_res=`eval echo '${'$as_ac_Header'}'`
11527 { echo "$as_me:$LINENO: result: $ac_res" >&5
11528echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11529else
11530 # Is the header compilable?
ca81d7a0
JD
11531{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11532echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
11533cat >conftest.$ac_ext <<_ACEOF
11534/* confdefs.h. */
11535_ACEOF
11536cat confdefs.h >>conftest.$ac_ext
11537cat >>conftest.$ac_ext <<_ACEOF
11538/* end confdefs.h. */
11539$ac_includes_default
11540#include <$ac_header>
11541_ACEOF
11542rm -f conftest.$ac_objext
ca81d7a0
JD
11543if { (ac_try="$ac_compile"
11544case "(($ac_try" in
11545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11546 *) ac_try_echo=$ac_try;;
11547esac
11548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11549 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
11550 ac_status=$?
11551 grep -v '^ *+' conftest.er1 >conftest.err
11552 rm -f conftest.er1
edfaf76d 11553 cat conftest.err >&5
b8bdffbe 11554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11555 (exit $ac_status); } && {
11556 test -z "$ac_c_werror_flag" ||
11557 test ! -s conftest.err
11558 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11559 ac_header_compiler=yes
11560else
11561 echo "$as_me: failed program was:" >&5
11562sed 's/^/| /' conftest.$ac_ext >&5
11563
ca81d7a0 11564 ac_header_compiler=no
b8bdffbe 11565fi
ca81d7a0
JD
11566
11567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11568{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11569echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11570
11571# Is the header present?
ca81d7a0
JD
11572{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11573echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11574cat >conftest.$ac_ext <<_ACEOF
11575/* confdefs.h. */
11576_ACEOF
11577cat confdefs.h >>conftest.$ac_ext
11578cat >>conftest.$ac_ext <<_ACEOF
11579/* end confdefs.h. */
11580#include <$ac_header>
11581_ACEOF
ca81d7a0
JD
11582if { (ac_try="$ac_cpp conftest.$ac_ext"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
11587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11589 ac_status=$?
11590 grep -v '^ *+' conftest.er1 >conftest.err
11591 rm -f conftest.er1
11592 cat conftest.err >&5
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11594 (exit $ac_status); } >/dev/null && {
11595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11596 test ! -s conftest.err
11597 }; then
b8bdffbe
JD
11598 ac_header_preproc=yes
11599else
11600 echo "$as_me: failed program was:" >&5
11601sed 's/^/| /' conftest.$ac_ext >&5
11602
11603 ac_header_preproc=no
11604fi
ca81d7a0 11605
b8bdffbe 11606rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11607{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11608echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11609
11610# So? What about this header?
edfaf76d
LK
11611case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11612 yes:no: )
b8bdffbe
JD
11613 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11614echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11615 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11616echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11617 ac_header_preproc=yes
b8bdffbe 11618 ;;
edfaf76d 11619 no:yes:* )
b8bdffbe
JD
11620 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11621echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11622 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11623echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11624 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11625echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11626 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11627echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11628 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11629echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11630 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11631echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11632
b8bdffbe
JD
11633 ;;
11634esac
ca81d7a0
JD
11635{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11637if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11638 echo $ECHO_N "(cached) $ECHO_C" >&6
11639else
edfaf76d 11640 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11641fi
ca81d7a0
JD
11642ac_res=`eval echo '${'$as_ac_Header'}'`
11643 { echo "$as_me:$LINENO: result: $ac_res" >&5
11644echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11645
11646fi
11647if test `eval echo '${'$as_ac_Header'}'` = yes; then
11648 cat >>confdefs.h <<_ACEOF
11649#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11650_ACEOF
11651
11652fi
11653
11654done
11655
11656 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11657 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11658echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11659if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11660 echo $ECHO_N "(cached) $ECHO_C" >&6
11661else
11662 ac_check_lib_save_LIBS=$LIBS
11663LIBS="-lpthread $LIBS"
11664cat >conftest.$ac_ext <<_ACEOF
11665/* confdefs.h. */
11666_ACEOF
11667cat confdefs.h >>conftest.$ac_ext
11668cat >>conftest.$ac_ext <<_ACEOF
11669/* end confdefs.h. */
11670
ca81d7a0
JD
11671/* Override any GCC internal prototype to avoid an error.
11672 Use char because int might match the return type of a GCC
11673 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11674#ifdef __cplusplus
11675extern "C"
11676#endif
b8bdffbe
JD
11677char pthread_self ();
11678int
11679main ()
11680{
ca81d7a0 11681return pthread_self ();
b8bdffbe
JD
11682 ;
11683 return 0;
11684}
11685_ACEOF
11686rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11687if { (ac_try="$ac_link"
11688case "(($ac_try" in
11689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11690 *) ac_try_echo=$ac_try;;
11691esac
11692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11693 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11694 ac_status=$?
edfaf76d
LK
11695 grep -v '^ *+' conftest.er1 >conftest.err
11696 rm -f conftest.er1
11697 cat conftest.err >&5
b8bdffbe 11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11699 (exit $ac_status); } && {
11700 test -z "$ac_c_werror_flag" ||
11701 test ! -s conftest.err
11702 } && test -s conftest$ac_exeext &&
11703 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11704 ac_cv_lib_pthread_pthread_self=yes
11705else
11706 echo "$as_me: failed program was:" >&5
11707sed 's/^/| /' conftest.$ac_ext >&5
11708
ca81d7a0 11709 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11710fi
ca81d7a0 11711
f053c89f 11712rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11713 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11714LIBS=$ac_check_lib_save_LIBS
11715fi
ca81d7a0
JD
11716{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11717echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11718if test $ac_cv_lib_pthread_pthread_self = yes; then
11719 HAVE_GTK_AND_PTHREAD=yes
11720fi
11721
11722 fi
11723 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11724 case "${canonical}" in
11725 *-hpux*) ;;
11726 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11727 esac
b8bdffbe
JD
11728
11729cat >>confdefs.h <<\_ACEOF
11730#define HAVE_GTK_AND_PTHREAD 1
11731_ACEOF
11732
11733 fi
57669b57 11734 fi
488dd4c4
JD
11735fi
11736
9d89ffd0
JD
11737### Link with -lXft if available to work around a bug.
11738HAVE_XFT=maybe
11739if test "${HAVE_GTK}" = "yes"; then
11740 if test "X${with_pkg_config_prog}" != X; then
11741 PKG_CONFIG="${with_pkg_config_prog}"
11742 fi
11743
11744
11745 succeeded=no
11746
11747 if test -z "$PKG_CONFIG"; then
11748 # Extract the first word of "pkg-config", so it can be a program name with args.
11749set dummy pkg-config; ac_word=$2
11750{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11752if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11753 echo $ECHO_N "(cached) $ECHO_C" >&6
11754else
11755 case $PKG_CONFIG in
11756 [\\/]* | ?:[\\/]*)
11757 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11758 ;;
11759 *)
11760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761for as_dir in $PATH
11762do
11763 IFS=$as_save_IFS
11764 test -z "$as_dir" && as_dir=.
11765 for ac_exec_ext in '' $ac_executable_extensions; do
11766 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11767 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11768 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11769 break 2
11770 fi
11771done
11772done
11773IFS=$as_save_IFS
11774
11775 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11776 ;;
11777esac
11778fi
11779PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11780if test -n "$PKG_CONFIG"; then
11781 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11782echo "${ECHO_T}$PKG_CONFIG" >&6; }
11783else
11784 { echo "$as_me:$LINENO: result: no" >&5
11785echo "${ECHO_T}no" >&6; }
11786fi
11787
11788
11789 fi
11790
11791 if test "$PKG_CONFIG" = "no" ; then
11792 HAVE_XFT=no
11793 else
11794 PKG_CONFIG_MIN_VERSION=0.9.0
11795 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11796 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
11797echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
11798
11799 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
11800 { echo "$as_me:$LINENO: result: yes" >&5
11801echo "${ECHO_T}yes" >&6; }
11802 succeeded=yes
11803
11804 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
11805echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 11806 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11807 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
11808echo "${ECHO_T}$XFT_CFLAGS" >&6; }
11809
11810 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
11811echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 11812 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11813 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
11814echo "${ECHO_T}$XFT_LIBS" >&6; }
11815 else
11816 { echo "$as_me:$LINENO: result: no" >&5
11817echo "${ECHO_T}no" >&6; }
11818 XFT_CFLAGS=""
11819 XFT_LIBS=""
11820 ## If we have a custom action on failure, don't print errors, but
11821 ## do set a variable so people can do so.
11822 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11823
11824 fi
11825
11826
11827
11828 else
11829 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11830 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11831 fi
11832 fi
11833
11834 if test $succeeded = yes; then
11835 :
11836 else
11837 HAVE_XFT=no
11838 fi
11839
11840 if test "$HAVE_XFT" != no; then
11841 OLD_CFLAGS="$CPPFLAGS"
f23323c5 11842 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
11843 OLD_LIBS="$LIBS"
11844 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11845 CFLAGS="$CFLAGS $XFT_CFLAGS"
11846 LIBS="$XFT_LIBS $LIBS"
11847 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11848 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11849echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11850if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11851 echo $ECHO_N "(cached) $ECHO_C" >&6
11852fi
11853{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11854echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11855else
11856 # Is the header compilable?
11857{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
11858echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
11859cat >conftest.$ac_ext <<_ACEOF
11860/* confdefs.h. */
11861_ACEOF
11862cat confdefs.h >>conftest.$ac_ext
11863cat >>conftest.$ac_ext <<_ACEOF
11864/* end confdefs.h. */
11865$ac_includes_default
11866#include <X11/Xft/Xft.h>
11867_ACEOF
11868rm -f conftest.$ac_objext
11869if { (ac_try="$ac_compile"
11870case "(($ac_try" in
11871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11872 *) ac_try_echo=$ac_try;;
11873esac
11874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11875 (eval "$ac_compile") 2>conftest.er1
11876 ac_status=$?
11877 grep -v '^ *+' conftest.er1 >conftest.err
11878 rm -f conftest.er1
11879 cat conftest.err >&5
11880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11881 (exit $ac_status); } && {
11882 test -z "$ac_c_werror_flag" ||
11883 test ! -s conftest.err
11884 } && test -s conftest.$ac_objext; then
11885 ac_header_compiler=yes
11886else
11887 echo "$as_me: failed program was:" >&5
11888sed 's/^/| /' conftest.$ac_ext >&5
11889
11890 ac_header_compiler=no
11891fi
11892
11893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11894{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11895echo "${ECHO_T}$ac_header_compiler" >&6; }
11896
11897# Is the header present?
11898{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
11899echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
11900cat >conftest.$ac_ext <<_ACEOF
11901/* confdefs.h. */
11902_ACEOF
11903cat confdefs.h >>conftest.$ac_ext
11904cat >>conftest.$ac_ext <<_ACEOF
11905/* end confdefs.h. */
11906#include <X11/Xft/Xft.h>
11907_ACEOF
11908if { (ac_try="$ac_cpp conftest.$ac_ext"
11909case "(($ac_try" in
11910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11911 *) ac_try_echo=$ac_try;;
11912esac
11913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11914 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11915 ac_status=$?
11916 grep -v '^ *+' conftest.er1 >conftest.err
11917 rm -f conftest.er1
11918 cat conftest.err >&5
11919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920 (exit $ac_status); } >/dev/null && {
11921 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11922 test ! -s conftest.err
11923 }; then
11924 ac_header_preproc=yes
11925else
11926 echo "$as_me: failed program was:" >&5
11927sed 's/^/| /' conftest.$ac_ext >&5
11928
11929 ac_header_preproc=no
11930fi
11931
11932rm -f conftest.err conftest.$ac_ext
11933{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11934echo "${ECHO_T}$ac_header_preproc" >&6; }
11935
11936# So? What about this header?
11937case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11938 yes:no: )
11939 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
11940echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11941 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
11942echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
11943 ac_header_preproc=yes
11944 ;;
11945 no:yes:* )
11946 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
11947echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
11948 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
11949echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
11950 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
11951echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
11952 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
11953echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
11954 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
11955echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
11956 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
11957echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
11958
11959 ;;
11960esac
11961{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11962echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11963if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11964 echo $ECHO_N "(cached) $ECHO_C" >&6
11965else
11966 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
11967fi
11968{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11969echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11970
11971fi
11972if test $ac_cv_header_X11_Xft_Xft_h = yes; then
11973 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
11974echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
11975if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
11976 echo $ECHO_N "(cached) $ECHO_C" >&6
11977else
11978 ac_check_lib_save_LIBS=$LIBS
11979LIBS="-lXft $XFT_LIBS $LIBS"
11980cat >conftest.$ac_ext <<_ACEOF
11981/* confdefs.h. */
11982_ACEOF
11983cat confdefs.h >>conftest.$ac_ext
11984cat >>conftest.$ac_ext <<_ACEOF
11985/* end confdefs.h. */
11986
11987/* Override any GCC internal prototype to avoid an error.
11988 Use char because int might match the return type of a GCC
11989 builtin and then its argument prototype would still apply. */
11990#ifdef __cplusplus
11991extern "C"
11992#endif
11993char XftFontOpen ();
11994int
11995main ()
11996{
11997return XftFontOpen ();
11998 ;
11999 return 0;
12000}
12001_ACEOF
12002rm -f conftest.$ac_objext conftest$ac_exeext
12003if { (ac_try="$ac_link"
12004case "(($ac_try" in
12005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12006 *) ac_try_echo=$ac_try;;
12007esac
12008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12009 (eval "$ac_link") 2>conftest.er1
12010 ac_status=$?
12011 grep -v '^ *+' conftest.er1 >conftest.err
12012 rm -f conftest.er1
12013 cat conftest.err >&5
12014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015 (exit $ac_status); } && {
12016 test -z "$ac_c_werror_flag" ||
12017 test ! -s conftest.err
12018 } && test -s conftest$ac_exeext &&
12019 $as_test_x conftest$ac_exeext; then
12020 ac_cv_lib_Xft_XftFontOpen=yes
12021else
12022 echo "$as_me: failed program was:" >&5
12023sed 's/^/| /' conftest.$ac_ext >&5
12024
12025 ac_cv_lib_Xft_XftFontOpen=no
12026fi
12027
12028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12029 conftest$ac_exeext conftest.$ac_ext
12030LIBS=$ac_check_lib_save_LIBS
12031fi
12032{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12033echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12034if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12035 HAVE_XFT=yes
12036fi
12037
12038fi
12039
12040
12041
12042 if test "${HAVE_XFT}" = "yes"; then
12043
12044cat >>confdefs.h <<\_ACEOF
12045#define HAVE_XFT 1
12046_ACEOF
12047
12048
12049 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12050 else
12051 CFLAGS="$OLD_CPPFLAGS"
12052 CFLAGS="$OLD_CFLAGS"
12053 LIBS="$OLD_LIBS"
12054 fi
12055 fi
12056fi
12057
3685ba3f 12058if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
98418dba 12059 if test x"${HAVE_X11R5}" = xyes; then
ca81d7a0
JD
12060 { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
12061echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
98418dba
CW
12062 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
12063 echo $ECHO_N "(cached) $ECHO_C" >&6
12064else
12065 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12066/* confdefs.h. */
12067_ACEOF
12068cat confdefs.h >>conftest.$ac_ext
12069cat >>conftest.$ac_ext <<_ACEOF
12070/* end confdefs.h. */
98418dba
CW
12071
12072#include <X11/Intrinsic.h>
12073#include <X11/Xaw/Simple.h>
98418dba
CW
12074int
12075main ()
12076{
12077
12078 ;
12079 return 0;
12080}
12081_ACEOF
12082rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12083if { (ac_try="$ac_link"
12084case "(($ac_try" in
12085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12086 *) ac_try_echo=$ac_try;;
12087esac
12088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12089 (eval "$ac_link") 2>conftest.er1
98418dba 12090 ac_status=$?
edfaf76d
LK
12091 grep -v '^ *+' conftest.er1 >conftest.err
12092 rm -f conftest.er1
12093 cat conftest.err >&5
c0d27fcc 12094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12095 (exit $ac_status); } && {
12096 test -z "$ac_c_werror_flag" ||
12097 test ! -s conftest.err
12098 } && test -s conftest$ac_exeext &&
12099 $as_test_x conftest$ac_exeext; then
98418dba
CW
12100 emacs_cv_x11_version_5_with_xaw=yes
12101else
12102 echo "$as_me: failed program was:" >&5
19650fd6
AS
12103sed 's/^/| /' conftest.$ac_ext >&5
12104
ca81d7a0 12105 emacs_cv_x11_version_5_with_xaw=no
98418dba 12106fi
ca81d7a0 12107
f053c89f 12108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12109 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12110fi
12111
12112 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ca81d7a0
JD
12113 { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
12114echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
98418dba
CW
12115 USE_X_TOOLKIT=LUCID
12116 else
3685ba3f
CY
12117 if test x"${USE_X_TOOLKIT}" = xLUCID; then
12118 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12119echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12120 { (exit 1); exit 1; }; }
12121 else
12122 { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
ca81d7a0 12123echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
3685ba3f
CY
12124 USE_X_TOOLKIT=none
12125 fi
98418dba
CW
12126 fi
12127 else
12128 USE_X_TOOLKIT=none
12129 fi
12130fi
12131
12132X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12133
12134if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12135 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12136echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12137 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12138 echo $ECHO_N "(cached) $ECHO_C" >&6
12139else
12140 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
98418dba 12146#include <X11/Intrinsic.h>
98418dba
CW
12147int
12148main ()
12149{
12150#if XtSpecificationRelease < 6
12151fail;
12152#endif
12153
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12159if { (ac_try="$ac_link"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
12164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12165 (eval "$ac_link") 2>conftest.er1
98418dba 12166 ac_status=$?
edfaf76d
LK
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
c0d27fcc 12170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest$ac_exeext &&
12175 $as_test_x conftest$ac_exeext; then
98418dba
CW
12176 emacs_cv_x11_toolkit_version_6=yes
12177else
12178 echo "$as_me: failed program was:" >&5
19650fd6
AS
12179sed 's/^/| /' conftest.$ac_ext >&5
12180
ca81d7a0 12181 emacs_cv_x11_toolkit_version_6=no
98418dba 12182fi
ca81d7a0 12183
f053c89f 12184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12185 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12186fi
12187
12188 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12189 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12190 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12191echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12192
c0d27fcc 12193cat >>confdefs.h <<\_ACEOF
98418dba 12194#define HAVE_X11XTR6 1
c0d27fcc 12195_ACEOF
98418dba
CW
12196
12197 else
ca81d7a0
JD
12198 { echo "$as_me:$LINENO: result: before 6" >&5
12199echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12200 fi
12201
12202 OLDLIBS="$LIBS"
12203 if test x$HAVE_X11XTR6 = xyes; then
12204 LIBS="-lXt -lSM -lICE $LIBS"
12205 else
12206 LIBS="-lXt $LIBS"
12207 fi
12208
ca81d7a0
JD
12209{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12210echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12211if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12212 echo $ECHO_N "(cached) $ECHO_C" >&6
12213else
12214 ac_check_lib_save_LIBS=$LIBS
12215LIBS="-lXmu $LIBS"
12216cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12217/* confdefs.h. */
12218_ACEOF
12219cat confdefs.h >>conftest.$ac_ext
12220cat >>conftest.$ac_ext <<_ACEOF
12221/* end confdefs.h. */
98418dba 12222
ca81d7a0
JD
12223/* Override any GCC internal prototype to avoid an error.
12224 Use char because int might match the return type of a GCC
12225 builtin and then its argument prototype would still apply. */
98418dba
CW
12226#ifdef __cplusplus
12227extern "C"
12228#endif
98418dba 12229char XmuConvertStandardSelection ();
98418dba
CW
12230int
12231main ()
12232{
ca81d7a0 12233return XmuConvertStandardSelection ();
98418dba
CW
12234 ;
12235 return 0;
12236}
12237_ACEOF
12238rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12239if { (ac_try="$ac_link"
12240case "(($ac_try" in
12241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12242 *) ac_try_echo=$ac_try;;
12243esac
12244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12245 (eval "$ac_link") 2>conftest.er1
98418dba 12246 ac_status=$?
edfaf76d
LK
12247 grep -v '^ *+' conftest.er1 >conftest.err
12248 rm -f conftest.er1
12249 cat conftest.err >&5
c0d27fcc 12250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12251 (exit $ac_status); } && {
12252 test -z "$ac_c_werror_flag" ||
12253 test ! -s conftest.err
12254 } && test -s conftest$ac_exeext &&
12255 $as_test_x conftest$ac_exeext; then
98418dba
CW
12256 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12257else
12258 echo "$as_me: failed program was:" >&5
19650fd6
AS
12259sed 's/^/| /' conftest.$ac_ext >&5
12260
ca81d7a0 12261 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12262fi
ca81d7a0 12263
f053c89f 12264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12265 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12266LIBS=$ac_check_lib_save_LIBS
12267fi
ca81d7a0
JD
12268{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12269echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12270if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12271 cat >>confdefs.h <<_ACEOF
98418dba 12272#define HAVE_LIBXMU 1
c0d27fcc 12273_ACEOF
98418dba
CW
12274
12275 LIBS="-lXmu $LIBS"
12276
12277fi
12278
12279 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12280fi
12281
12282# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12283if test "${HAVE_X11}" = "yes"; then
12284 if test "${USE_X_TOOLKIT}" != "none"; then
12285
ca81d7a0
JD
12286{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12287echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12288if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12289 echo $ECHO_N "(cached) $ECHO_C" >&6
12290else
12291 ac_check_lib_save_LIBS=$LIBS
12292LIBS="-lXext $LIBS"
12293cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12294/* confdefs.h. */
12295_ACEOF
12296cat confdefs.h >>conftest.$ac_ext
12297cat >>conftest.$ac_ext <<_ACEOF
12298/* end confdefs.h. */
98418dba 12299
ca81d7a0
JD
12300/* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
98418dba
CW
12303#ifdef __cplusplus
12304extern "C"
12305#endif
98418dba 12306char XShapeQueryExtension ();
98418dba
CW
12307int
12308main ()
12309{
ca81d7a0 12310return XShapeQueryExtension ();
98418dba
CW
12311 ;
12312 return 0;
12313}
12314_ACEOF
12315rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12316if { (ac_try="$ac_link"
12317case "(($ac_try" in
12318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12319 *) ac_try_echo=$ac_try;;
12320esac
12321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12322 (eval "$ac_link") 2>conftest.er1
98418dba 12323 ac_status=$?
edfaf76d
LK
12324 grep -v '^ *+' conftest.er1 >conftest.err
12325 rm -f conftest.er1
12326 cat conftest.err >&5
c0d27fcc 12327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12328 (exit $ac_status); } && {
12329 test -z "$ac_c_werror_flag" ||
12330 test ! -s conftest.err
12331 } && test -s conftest$ac_exeext &&
12332 $as_test_x conftest$ac_exeext; then
98418dba
CW
12333 ac_cv_lib_Xext_XShapeQueryExtension=yes
12334else
12335 echo "$as_me: failed program was:" >&5
19650fd6
AS
12336sed 's/^/| /' conftest.$ac_ext >&5
12337
ca81d7a0 12338 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12339fi
ca81d7a0 12340
f053c89f 12341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12342 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12343LIBS=$ac_check_lib_save_LIBS
12344fi
ca81d7a0
JD
12345{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12346echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12347if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12348 cat >>confdefs.h <<_ACEOF
98418dba 12349#define HAVE_LIBXEXT 1
c0d27fcc 12350_ACEOF
98418dba
CW
12351
12352 LIBS="-lXext $LIBS"
12353
12354fi
12355
12356 fi
12357fi
12358
12359if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12360 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12361echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12362if test "${emacs_cv_motif_version_2_1+set}" = set; then
12363 echo $ECHO_N "(cached) $ECHO_C" >&6
12364else
12365 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12366/* confdefs.h. */
12367_ACEOF
12368cat confdefs.h >>conftest.$ac_ext
12369cat >>conftest.$ac_ext <<_ACEOF
12370/* end confdefs.h. */
98418dba 12371#include <Xm/Xm.h>
98418dba
CW
12372int
12373main ()
12374{
12375#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12376int x = 5;
12377#else
12378Motif version prior to 2.1.
12379#endif
12380 ;
12381 return 0;
12382}
12383_ACEOF
12384rm -f conftest.$ac_objext
ca81d7a0
JD
12385if { (ac_try="$ac_compile"
12386case "(($ac_try" in
12387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12388 *) ac_try_echo=$ac_try;;
12389esac
12390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12391 (eval "$ac_compile") 2>conftest.er1
98418dba 12392 ac_status=$?
edfaf76d
LK
12393 grep -v '^ *+' conftest.er1 >conftest.err
12394 rm -f conftest.er1
12395 cat conftest.err >&5
c0d27fcc 12396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12397 (exit $ac_status); } && {
12398 test -z "$ac_c_werror_flag" ||
12399 test ! -s conftest.err
12400 } && test -s conftest.$ac_objext; then
98418dba
CW
12401 emacs_cv_motif_version_2_1=yes
12402else
12403 echo "$as_me: failed program was:" >&5
19650fd6
AS
12404sed 's/^/| /' conftest.$ac_ext >&5
12405
ca81d7a0 12406 emacs_cv_motif_version_2_1=no
98418dba 12407fi
ca81d7a0
JD
12408
12409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12410fi
ca81d7a0
JD
12411{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12412echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12413 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12414 if test $emacs_cv_motif_version_2_1 = yes; then
12415 HAVE_LIBXP=no
b936fae4 12416
c0d27fcc 12417cat >>confdefs.h <<\_ACEOF
98418dba 12418#define HAVE_MOTIF_2_1 1
c0d27fcc 12419_ACEOF
98418dba 12420
ca81d7a0
JD
12421 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12422echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12423if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12424 echo $ECHO_N "(cached) $ECHO_C" >&6
12425else
12426 ac_check_lib_save_LIBS=$LIBS
12427LIBS="-lXp $LIBS"
12428cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12429/* confdefs.h. */
12430_ACEOF
12431cat confdefs.h >>conftest.$ac_ext
12432cat >>conftest.$ac_ext <<_ACEOF
12433/* end confdefs.h. */
98418dba 12434
ca81d7a0
JD
12435/* Override any GCC internal prototype to avoid an error.
12436 Use char because int might match the return type of a GCC
12437 builtin and then its argument prototype would still apply. */
98418dba
CW
12438#ifdef __cplusplus
12439extern "C"
12440#endif
98418dba 12441char XpCreateContext ();
98418dba
CW
12442int
12443main ()
12444{
ca81d7a0 12445return XpCreateContext ();
98418dba
CW
12446 ;
12447 return 0;
12448}
12449_ACEOF
12450rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12451if { (ac_try="$ac_link"
12452case "(($ac_try" in
12453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12454 *) ac_try_echo=$ac_try;;
12455esac
12456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12457 (eval "$ac_link") 2>conftest.er1
98418dba 12458 ac_status=$?
edfaf76d
LK
12459 grep -v '^ *+' conftest.er1 >conftest.err
12460 rm -f conftest.er1
12461 cat conftest.err >&5
c0d27fcc 12462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12463 (exit $ac_status); } && {
12464 test -z "$ac_c_werror_flag" ||
12465 test ! -s conftest.err
12466 } && test -s conftest$ac_exeext &&
12467 $as_test_x conftest$ac_exeext; then
98418dba
CW
12468 ac_cv_lib_Xp_XpCreateContext=yes
12469else
12470 echo "$as_me: failed program was:" >&5
19650fd6
AS
12471sed 's/^/| /' conftest.$ac_ext >&5
12472
ca81d7a0 12473 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12474fi
ca81d7a0 12475
f053c89f 12476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12477 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12478LIBS=$ac_check_lib_save_LIBS
12479fi
ca81d7a0
JD
12480{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12481echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12482if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12483 HAVE_LIBXP=yes
12484fi
503d2be0 12485
98418dba 12486 if test ${HAVE_LIBXP} = yes; then
b936fae4 12487
c0d27fcc 12488cat >>confdefs.h <<\_ACEOF
98418dba 12489#define HAVE_LIBXP 1
c0d27fcc 12490_ACEOF
503d2be0 12491
98418dba 12492 fi
4693dbc9 12493 else
ca81d7a0
JD
12494 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12495echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12496if test "${emacs_cv_lesstif+set}" = set; then
12497 echo $ECHO_N "(cached) $ECHO_C" >&6
12498else
12499 # We put this in CFLAGS temporarily to precede other -I options
12500 # that might be in CFLAGS temporarily.
12501 # We put this in CPPFLAGS where it precedes the other -I options.
12502 OLD_CPPFLAGS=$CPPFLAGS
12503 OLD_CFLAGS=$CFLAGS
12504 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12505 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12506 cat >conftest.$ac_ext <<_ACEOF
12507/* confdefs.h. */
12508_ACEOF
12509cat confdefs.h >>conftest.$ac_ext
12510cat >>conftest.$ac_ext <<_ACEOF
12511/* end confdefs.h. */
12512#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12513int
12514main ()
12515{
12516int x = 5;
12517 ;
12518 return 0;
12519}
12520_ACEOF
12521rm -f conftest.$ac_objext
ca81d7a0
JD
12522if { (ac_try="$ac_compile"
12523case "(($ac_try" in
12524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12525 *) ac_try_echo=$ac_try;;
12526esac
12527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12528 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12529 ac_status=$?
edfaf76d
LK
12530 grep -v '^ *+' conftest.er1 >conftest.err
12531 rm -f conftest.er1
12532 cat conftest.err >&5
4693dbc9 12533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12534 (exit $ac_status); } && {
12535 test -z "$ac_c_werror_flag" ||
12536 test ! -s conftest.err
12537 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12538 emacs_cv_lesstif=yes
12539else
12540 echo "$as_me: failed program was:" >&5
12541sed 's/^/| /' conftest.$ac_ext >&5
12542
ca81d7a0 12543 emacs_cv_lesstif=no
4693dbc9 12544fi
ca81d7a0
JD
12545
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12547fi
ca81d7a0
JD
12548{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12549echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12550 if test $emacs_cv_lesstif = yes; then
12551 # Make sure this -I option remains in CPPFLAGS after it is set
12552 # back to REAL_CPPFLAGS.
12553 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12554 # have those other -I options anyway. Ultimately, having this
12555 # directory ultimately in CPPFLAGS will be enough.
12556 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12557 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12558 else
12559 CFLAGS=$OLD_CFLAGS
12560 CPPFLAGS=$OLD_CPPFLAGS
12561 fi
98418dba
CW
12562 fi
12563fi
12564
12565### Is -lXaw3d available?
12566HAVE_XAW3D=no
12567if test "${HAVE_X11}" = "yes"; then
7c00e1e9 12568 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
ca81d7a0
JD
12569 { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
12570echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
98418dba
CW
12571if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
12572 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12573else
22044edf 12574 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12575/* confdefs.h. */
12576_ACEOF
12577cat confdefs.h >>conftest.$ac_ext
12578cat >>conftest.$ac_ext <<_ACEOF
12579/* end confdefs.h. */
98418dba 12580#include <X11/Xaw3d/Scrollbar.h>
503d2be0 12581_ACEOF
ca81d7a0
JD
12582if { (ac_try="$ac_cpp conftest.$ac_ext"
12583case "(($ac_try" in
12584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12585 *) ac_try_echo=$ac_try;;
12586esac
12587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 12589 ac_status=$?
6bae0ccf 12590 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12591 rm -f conftest.er1
12592 cat conftest.err >&5
c0d27fcc 12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12594 (exit $ac_status); } >/dev/null && {
12595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12596 test ! -s conftest.err
12597 }; then
22044edf 12598 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 12599else
503d2be0 12600 echo "$as_me: failed program was:" >&5
19650fd6
AS
12601sed 's/^/| /' conftest.$ac_ext >&5
12602
22044edf 12603 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 12604fi
ca81d7a0 12605
503d2be0 12606rm -f conftest.err conftest.$ac_ext
98418dba 12607fi
ca81d7a0
JD
12608{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
12609echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
98418dba 12610if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ca81d7a0
JD
12611 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12612echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
98418dba
CW
12613if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
12614 echo $ECHO_N "(cached) $ECHO_C" >&6
12615else
12616 ac_check_lib_save_LIBS=$LIBS
12617LIBS="-lXaw3d $LIBS"
12618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12619/* confdefs.h. */
12620_ACEOF
12621cat confdefs.h >>conftest.$ac_ext
12622cat >>conftest.$ac_ext <<_ACEOF
12623/* end confdefs.h. */
98418dba 12624
ca81d7a0
JD
12625/* Override any GCC internal prototype to avoid an error.
12626 Use char because int might match the return type of a GCC
12627 builtin and then its argument prototype would still apply. */
98418dba
CW
12628#ifdef __cplusplus
12629extern "C"
12630#endif
98418dba 12631char XawScrollbarSetThumb ();
503d2be0
AS
12632int
12633main ()
12634{
ca81d7a0 12635return XawScrollbarSetThumb ();
503d2be0
AS
12636 ;
12637 return 0;
12638}
12639_ACEOF
12640rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12641if { (ac_try="$ac_link"
12642case "(($ac_try" in
12643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12644 *) ac_try_echo=$ac_try;;
12645esac
12646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12647 (eval "$ac_link") 2>conftest.er1
503d2be0 12648 ac_status=$?
edfaf76d
LK
12649 grep -v '^ *+' conftest.er1 >conftest.err
12650 rm -f conftest.er1
12651 cat conftest.err >&5
c0d27fcc 12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12653 (exit $ac_status); } && {
12654 test -z "$ac_c_werror_flag" ||
12655 test ! -s conftest.err
12656 } && test -s conftest$ac_exeext &&
12657 $as_test_x conftest$ac_exeext; then
98418dba 12658 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 12659else
503d2be0 12660 echo "$as_me: failed program was:" >&5
19650fd6
AS
12661sed 's/^/| /' conftest.$ac_ext >&5
12662
ca81d7a0 12663 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 12664fi
ca81d7a0 12665
f053c89f 12666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12667 conftest$ac_exeext conftest.$ac_ext
98418dba 12668LIBS=$ac_check_lib_save_LIBS
ba4481b5 12669fi
ca81d7a0
JD
12670{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12671echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
98418dba
CW
12672if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
12673 HAVE_XAW3D=yes
ba4481b5 12674fi
503d2be0 12675
ba4481b5
DL
12676fi
12677
c0d27fcc 12678
98418dba 12679 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 12680
c0d27fcc 12681cat >>confdefs.h <<\_ACEOF
98418dba 12682#define HAVE_XAW3D 1
c0d27fcc 12683_ACEOF
98418dba 12684
ba4481b5 12685 fi
98418dba 12686 fi
ba4481b5
DL
12687fi
12688
c0d27fcc
MR
12689
12690
98418dba
CW
12691USE_TOOLKIT_SCROLL_BARS=no
12692if test "${with_toolkit_scroll_bars}" != "no"; then
12693 if test "${USE_X_TOOLKIT}" != "none"; then
12694 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12695 cat >>confdefs.h <<\_ACEOF
98418dba 12696#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12697_ACEOF
98418dba
CW
12698
12699 HAVE_XAW3D=no
12700 USE_TOOLKIT_SCROLL_BARS=yes
12701 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12702 cat >>confdefs.h <<\_ACEOF
98418dba 12703#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12704_ACEOF
98418dba
CW
12705
12706 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12707 fi
488dd4c4
JD
12708 elif test "${HAVE_GTK}" = "yes"; then
12709 cat >>confdefs.h <<\_ACEOF
12710#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12711_ACEOF
12712
12713 USE_TOOLKIT_SCROLL_BARS=yes
12714 elif test "${HAVE_CARBON}" = "yes"; then
12715 cat >>confdefs.h <<\_ACEOF
12716#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12717_ACEOF
12718
12719 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12720 fi
12721fi
12722
abd39b57 12723cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12724/* confdefs.h. */
12725_ACEOF
12726cat confdefs.h >>conftest.$ac_ext
12727cat >>conftest.$ac_ext <<_ACEOF
12728/* end confdefs.h. */
12729
12730 #include <X11/Xlib.h>
12731 #include <X11/Xresource.h>
12732int
12733main ()
12734{
12735XIMProc callback;
12736 ;
12737 return 0;
12738}
12739_ACEOF
12740rm -f conftest.$ac_objext
ca81d7a0
JD
12741if { (ac_try="$ac_compile"
12742case "(($ac_try" in
12743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12744 *) ac_try_echo=$ac_try;;
12745esac
12746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12747 (eval "$ac_compile") 2>conftest.er1
abd39b57 12748 ac_status=$?
edfaf76d
LK
12749 grep -v '^ *+' conftest.er1 >conftest.err
12750 rm -f conftest.er1
12751 cat conftest.err >&5
abd39b57 12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12753 (exit $ac_status); } && {
12754 test -z "$ac_c_werror_flag" ||
12755 test ! -s conftest.err
12756 } && test -s conftest.$ac_objext; then
abd39b57
AC
12757 HAVE_XIM=yes
12758
12759cat >>confdefs.h <<\_ACEOF
12760#define HAVE_XIM 1
12761_ACEOF
12762
12763else
12764 echo "$as_me: failed program was:" >&5
12765sed 's/^/| /' conftest.$ac_ext >&5
12766
ca81d7a0 12767 HAVE_XIM=no
abd39b57 12768fi
ca81d7a0
JD
12769
12770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12771
c0d27fcc 12772
98418dba 12773if test "${with_xim}" != "no"; then
b936fae4 12774
c0d27fcc 12775cat >>confdefs.h <<\_ACEOF
98418dba 12776#define USE_XIM 1
c0d27fcc 12777_ACEOF
98418dba 12778
793fa0d7 12779fi
abd39b57
AC
12780
12781
12782if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12783 late_CFLAGS=$CFLAGS
12784 if test "$GCC" = yes; then
12785 CFLAGS="$CFLAGS --pedantic-errors"
12786 fi
cffcede7 12787 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12788/* confdefs.h. */
12789_ACEOF
12790cat confdefs.h >>conftest.$ac_ext
12791cat >>conftest.$ac_ext <<_ACEOF
12792/* end confdefs.h. */
cffcede7
JD
12793
12794#include <X11/Xlib.h>
12795#include <X11/Xresource.h>
12796int
12797main ()
12798{
12799Display *display;
12800XrmDatabase db;
12801char *res_name;
12802char *res_class;
12803XIMProc callback;
12804XPointer *client_data;
849d80cf
DL
12805#ifndef __GNUC__
12806/* If we're not using GCC, it's probably not XFree86, and this is
12807 probably right, but we can't use something like --pedantic-errors. */
12808extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12809 char*, XIMProc, XPointer*);
12810#endif
cffcede7
JD
12811(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12812 client_data);
12813 ;
12814 return 0;
12815}
12816_ACEOF
12817rm -f conftest.$ac_objext
ca81d7a0
JD
12818if { (ac_try="$ac_compile"
12819case "(($ac_try" in
12820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12821 *) ac_try_echo=$ac_try;;
12822esac
12823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12824 (eval "$ac_compile") 2>conftest.er1
cffcede7 12825 ac_status=$?
edfaf76d
LK
12826 grep -v '^ *+' conftest.er1 >conftest.err
12827 rm -f conftest.er1
12828 cat conftest.err >&5
cffcede7 12829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12830 (exit $ac_status); } && {
12831 test -z "$ac_c_werror_flag" ||
12832 test ! -s conftest.err
12833 } && test -s conftest.$ac_objext; then
cffcede7
JD
12834 emacs_cv_arg6_star=yes
12835else
12836 echo "$as_me: failed program was:" >&5
19650fd6
AS
12837sed 's/^/| /' conftest.$ac_ext >&5
12838
ca81d7a0 12839
cffcede7 12840fi
ca81d7a0
JD
12841
12842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12843
12844 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12845 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12846#define XRegisterIMInstantiateCallback_arg6 XPointer*
12847_ACEOF
12848
12849 else
f57bd967 12850 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12851#define XRegisterIMInstantiateCallback_arg6 XPointer
12852_ACEOF
12853
12854 fi
849d80cf 12855 CFLAGS=$late_CFLAGS
98418dba
CW
12856fi
12857
12858### Use -lXpm if available, unless `--with-xpm=no'.
12859HAVE_XPM=no
12860if test "${HAVE_X11}" = "yes"; then
12861 if test "${with_xpm}" != "no"; then
c0d27fcc 12862 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
12863 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12864echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12865if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12866 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12867fi
ca81d7a0
JD
12868{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12869echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12870else
c0d27fcc 12871 # Is the header compilable?
ca81d7a0
JD
12872{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12873echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12874cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12875/* confdefs.h. */
12876_ACEOF
12877cat confdefs.h >>conftest.$ac_ext
12878cat >>conftest.$ac_ext <<_ACEOF
12879/* end confdefs.h. */
c0d27fcc
MR
12880$ac_includes_default
12881#include <X11/xpm.h>
12882_ACEOF
12883rm -f conftest.$ac_objext
ca81d7a0
JD
12884if { (ac_try="$ac_compile"
12885case "(($ac_try" in
12886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12887 *) ac_try_echo=$ac_try;;
12888esac
12889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12890 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12891 ac_status=$?
edfaf76d
LK
12892 grep -v '^ *+' conftest.er1 >conftest.err
12893 rm -f conftest.er1
12894 cat conftest.err >&5
c0d27fcc 12895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12896 (exit $ac_status); } && {
12897 test -z "$ac_c_werror_flag" ||
12898 test ! -s conftest.err
12899 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12900 ac_header_compiler=yes
12901else
12902 echo "$as_me: failed program was:" >&5
19650fd6
AS
12903sed 's/^/| /' conftest.$ac_ext >&5
12904
ca81d7a0 12905 ac_header_compiler=no
c0d27fcc 12906fi
ca81d7a0
JD
12907
12908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12909{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12910echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12911
12912# Is the header present?
ca81d7a0
JD
12913{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12914echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12915cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12916/* confdefs.h. */
12917_ACEOF
12918cat confdefs.h >>conftest.$ac_ext
12919cat >>conftest.$ac_ext <<_ACEOF
12920/* end confdefs.h. */
98418dba
CW
12921#include <X11/xpm.h>
12922_ACEOF
ca81d7a0
JD
12923if { (ac_try="$ac_cpp conftest.$ac_ext"
12924case "(($ac_try" in
12925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12926 *) ac_try_echo=$ac_try;;
12927esac
12928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12929 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12930 ac_status=$?
6bae0ccf 12931 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12932 rm -f conftest.er1
12933 cat conftest.err >&5
c0d27fcc 12934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12935 (exit $ac_status); } >/dev/null && {
12936 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12937 test ! -s conftest.err
12938 }; then
c0d27fcc 12939 ac_header_preproc=yes
98418dba
CW
12940else
12941 echo "$as_me: failed program was:" >&5
19650fd6
AS
12942sed 's/^/| /' conftest.$ac_ext >&5
12943
c0d27fcc 12944 ac_header_preproc=no
98418dba 12945fi
ca81d7a0 12946
98418dba 12947rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12948{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12949echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12950
12951# So? What about this header?
edfaf76d
LK
12952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12953 yes:no: )
c0d27fcc
MR
12954 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
12955echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12956 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
12957echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
12958 ac_header_preproc=yes
12959 ;;
12960 no:yes:* )
12961 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
12962echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
12963 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
12964echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
12965 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
12966echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
12967 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
12968echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
12969 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
12970echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12971 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
12972echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12973
19650fd6 12974 ;;
c0d27fcc 12975esac
ca81d7a0
JD
12976{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12977echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
12978if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12979 echo $ECHO_N "(cached) $ECHO_C" >&6
12980else
12981 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12982fi
ca81d7a0
JD
12983{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12984echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
12985
12986fi
98418dba 12987if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
12988 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
12989echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 12990if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12991 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12992else
98418dba
CW
12993 ac_check_lib_save_LIBS=$LIBS
12994LIBS="-lXpm -lX11 $LIBS"
12995cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12996/* confdefs.h. */
12997_ACEOF
12998cat confdefs.h >>conftest.$ac_ext
12999cat >>conftest.$ac_ext <<_ACEOF
13000/* end confdefs.h. */
98418dba 13001
ca81d7a0
JD
13002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
503d2be0
AS
13005#ifdef __cplusplus
13006extern "C"
13007#endif
98418dba 13008char XpmReadFileToPixmap ();
503d2be0
AS
13009int
13010main ()
13011{
ca81d7a0 13012return XpmReadFileToPixmap ();
503d2be0
AS
13013 ;
13014 return 0;
13015}
13016_ACEOF
13017rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13018if { (ac_try="$ac_link"
13019case "(($ac_try" in
13020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13021 *) ac_try_echo=$ac_try;;
13022esac
13023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13024 (eval "$ac_link") 2>conftest.er1
503d2be0 13025 ac_status=$?
edfaf76d
LK
13026 grep -v '^ *+' conftest.er1 >conftest.err
13027 rm -f conftest.er1
13028 cat conftest.err >&5
c0d27fcc 13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13030 (exit $ac_status); } && {
13031 test -z "$ac_c_werror_flag" ||
13032 test ! -s conftest.err
13033 } && test -s conftest$ac_exeext &&
13034 $as_test_x conftest$ac_exeext; then
98418dba 13035 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13036else
13037 echo "$as_me: failed program was:" >&5
19650fd6
AS
13038sed 's/^/| /' conftest.$ac_ext >&5
13039
ca81d7a0 13040 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13041fi
ca81d7a0 13042
f053c89f 13043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13044 conftest$ac_exeext conftest.$ac_ext
98418dba 13045LIBS=$ac_check_lib_save_LIBS
503d2be0 13046fi
ca81d7a0
JD
13047{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13048echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13049if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13050 HAVE_XPM=yes
ba4481b5
DL
13051fi
13052
98418dba
CW
13053fi
13054
c0d27fcc 13055
98418dba 13056 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13057 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13058echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13059 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13060/* confdefs.h. */
13061_ACEOF
13062cat confdefs.h >>conftest.$ac_ext
13063cat >>conftest.$ac_ext <<_ACEOF
13064/* end confdefs.h. */
98418dba
CW
13065#include "X11/xpm.h"
13066#ifndef XpmReturnAllocPixels
13067no_return_alloc_pixels
503d2be0 13068#endif
ba4481b5 13069
98418dba
CW
13070_ACEOF
13071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13072 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13073 HAVE_XPM=no
13074else
13075 HAVE_XPM=yes
13076fi
13077rm -f conftest*
ba4481b5 13078
c0d27fcc 13079
98418dba 13080 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13081 { echo "$as_me:$LINENO: result: yes" >&5
13082echo "${ECHO_T}yes" >&6; }
98418dba 13083 else
ca81d7a0
JD
13084 { echo "$as_me:$LINENO: result: no" >&5
13085echo "${ECHO_T}no" >&6; }
98418dba
CW
13086 fi
13087 fi
13088 fi
13089
13090 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13091
c0d27fcc 13092cat >>confdefs.h <<\_ACEOF
98418dba 13093#define HAVE_XPM 1
c0d27fcc 13094_ACEOF
98418dba
CW
13095
13096 fi
13097fi
13098
13099### Use -ljpeg if available, unless `--with-jpeg=no'.
13100HAVE_JPEG=no
13101if test "${HAVE_X11}" = "yes"; then
13102 if test "${with_jpeg}" != "no"; then
c0d27fcc 13103 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
13104 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13105echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13106if test "${ac_cv_header_jerror_h+set}" = set; then
13107 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13108fi
ca81d7a0
JD
13109{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13110echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13111else
c0d27fcc 13112 # Is the header compilable?
ca81d7a0
JD
13113{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13114echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13115cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13116/* confdefs.h. */
13117_ACEOF
13118cat confdefs.h >>conftest.$ac_ext
13119cat >>conftest.$ac_ext <<_ACEOF
13120/* end confdefs.h. */
c0d27fcc
MR
13121$ac_includes_default
13122#include <jerror.h>
13123_ACEOF
13124rm -f conftest.$ac_objext
ca81d7a0
JD
13125if { (ac_try="$ac_compile"
13126case "(($ac_try" in
13127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13128 *) ac_try_echo=$ac_try;;
13129esac
13130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13131 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13132 ac_status=$?
edfaf76d
LK
13133 grep -v '^ *+' conftest.er1 >conftest.err
13134 rm -f conftest.er1
13135 cat conftest.err >&5
c0d27fcc 13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13137 (exit $ac_status); } && {
13138 test -z "$ac_c_werror_flag" ||
13139 test ! -s conftest.err
13140 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13141 ac_header_compiler=yes
13142else
13143 echo "$as_me: failed program was:" >&5
19650fd6
AS
13144sed 's/^/| /' conftest.$ac_ext >&5
13145
ca81d7a0 13146 ac_header_compiler=no
c0d27fcc 13147fi
ca81d7a0
JD
13148
13149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13150{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13151echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13152
13153# Is the header present?
ca81d7a0
JD
13154{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13155echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13156cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
98418dba
CW
13162#include <jerror.h>
13163_ACEOF
ca81d7a0
JD
13164if { (ac_try="$ac_cpp conftest.$ac_ext"
13165case "(($ac_try" in
13166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13167 *) ac_try_echo=$ac_try;;
13168esac
13169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13170 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13171 ac_status=$?
6bae0ccf 13172 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13173 rm -f conftest.er1
13174 cat conftest.err >&5
c0d27fcc 13175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13176 (exit $ac_status); } >/dev/null && {
13177 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13178 test ! -s conftest.err
13179 }; then
c0d27fcc 13180 ac_header_preproc=yes
ba4481b5 13181else
98418dba 13182 echo "$as_me: failed program was:" >&5
19650fd6
AS
13183sed 's/^/| /' conftest.$ac_ext >&5
13184
c0d27fcc 13185 ac_header_preproc=no
98418dba 13186fi
ca81d7a0 13187
98418dba 13188rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13189{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13190echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13191
13192# So? What about this header?
edfaf76d
LK
13193case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13194 yes:no: )
c0d27fcc
MR
13195 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13196echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13197 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13198echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13199 ac_header_preproc=yes
19650fd6 13200 ;;
edfaf76d 13201 no:yes:* )
c0d27fcc
MR
13202 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13203echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13204 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13205echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13206 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13207echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13208 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13209echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13210 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13211echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13212 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13213echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13214
19650fd6 13215 ;;
c0d27fcc 13216esac
ca81d7a0
JD
13217{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13218echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13219if test "${ac_cv_header_jerror_h+set}" = set; then
13220 echo $ECHO_N "(cached) $ECHO_C" >&6
13221else
13222 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13223fi
ca81d7a0
JD
13224{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13225echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13226
13227fi
98418dba 13228if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13229 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13230echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13231if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13232 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13233else
98418dba
CW
13234 ac_check_lib_save_LIBS=$LIBS
13235LIBS="-ljpeg $LIBS"
13236cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13237/* confdefs.h. */
13238_ACEOF
13239cat confdefs.h >>conftest.$ac_ext
13240cat >>conftest.$ac_ext <<_ACEOF
13241/* end confdefs.h. */
98418dba 13242
ca81d7a0
JD
13243/* Override any GCC internal prototype to avoid an error.
13244 Use char because int might match the return type of a GCC
13245 builtin and then its argument prototype would still apply. */
98418dba
CW
13246#ifdef __cplusplus
13247extern "C"
13248#endif
98418dba 13249char jpeg_destroy_compress ();
503d2be0
AS
13250int
13251main ()
13252{
ca81d7a0 13253return jpeg_destroy_compress ();
503d2be0
AS
13254 ;
13255 return 0;
13256}
13257_ACEOF
13258rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13259if { (ac_try="$ac_link"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
13264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13265 (eval "$ac_link") 2>conftest.er1
503d2be0 13266 ac_status=$?
edfaf76d
LK
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
c0d27fcc 13270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest$ac_exeext &&
13275 $as_test_x conftest$ac_exeext; then
98418dba 13276 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13277else
503d2be0 13278 echo "$as_me: failed program was:" >&5
19650fd6
AS
13279sed 's/^/| /' conftest.$ac_ext >&5
13280
ca81d7a0 13281 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13282fi
ca81d7a0 13283
f053c89f 13284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13285 conftest$ac_exeext conftest.$ac_ext
98418dba 13286LIBS=$ac_check_lib_save_LIBS
ba4481b5 13287fi
ca81d7a0
JD
13288{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13289echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13290if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13291 HAVE_JPEG=yes
ba4481b5 13292fi
98418dba 13293
ba4481b5 13294fi
98418dba 13295
c0d27fcc 13296
ba4481b5 13297 fi
ba4481b5 13298
c0d27fcc 13299
98418dba 13300 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13301 cat >>confdefs.h <<\_ACEOF
98418dba 13302#define HAVE_JPEG 1
c0d27fcc 13303_ACEOF
98418dba
CW
13304
13305 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13306/* confdefs.h. */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h. */
22044edf 13311#include <jpeglib.h>
98418dba
CW
13312 version=JPEG_LIB_VERSION
13313
13314_ACEOF
13315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13316 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13317 cat >>confdefs.h <<\_ACEOF
98418dba 13318#define HAVE_JPEG 1
c0d27fcc 13319_ACEOF
ba4481b5 13320
98418dba 13321else
c0d27fcc 13322 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13323echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13324 HAVE_JPEG=no
ba4481b5 13325fi
98418dba 13326rm -f conftest*
ba4481b5 13327
98418dba
CW
13328 fi
13329fi
503d2be0 13330
98418dba
CW
13331### Use -lpng if available, unless `--with-png=no'.
13332HAVE_PNG=no
13333if test "${HAVE_X11}" = "yes"; then
13334 if test "${with_png}" != "no"; then
f57bd967
DL
13335 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13336 # in /usr/include/libpng.
13337
13338
13339for ac_header in png.h libpng/png.h
13340do
13341as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13342if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13343 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13345if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13346 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13347fi
ca81d7a0
JD
13348ac_res=`eval echo '${'$as_ac_Header'}'`
13349 { echo "$as_me:$LINENO: result: $ac_res" >&5
13350echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13351else
c0d27fcc 13352 # Is the header compilable?
ca81d7a0
JD
13353{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13354echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13356/* confdefs.h. */
13357_ACEOF
13358cat confdefs.h >>conftest.$ac_ext
13359cat >>conftest.$ac_ext <<_ACEOF
13360/* end confdefs.h. */
c0d27fcc 13361$ac_includes_default
f57bd967 13362#include <$ac_header>
c0d27fcc
MR
13363_ACEOF
13364rm -f conftest.$ac_objext
ca81d7a0
JD
13365if { (ac_try="$ac_compile"
13366case "(($ac_try" in
13367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13368 *) ac_try_echo=$ac_try;;
13369esac
13370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13371 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13372 ac_status=$?
edfaf76d
LK
13373 grep -v '^ *+' conftest.er1 >conftest.err
13374 rm -f conftest.er1
13375 cat conftest.err >&5
c0d27fcc 13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13377 (exit $ac_status); } && {
13378 test -z "$ac_c_werror_flag" ||
13379 test ! -s conftest.err
13380 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13381 ac_header_compiler=yes
13382else
13383 echo "$as_me: failed program was:" >&5
19650fd6
AS
13384sed 's/^/| /' conftest.$ac_ext >&5
13385
ca81d7a0 13386 ac_header_compiler=no
c0d27fcc 13387fi
ca81d7a0
JD
13388
13389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13390{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13391echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13392
13393# Is the header present?
ca81d7a0
JD
13394{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13395echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13397/* confdefs.h. */
13398_ACEOF
13399cat confdefs.h >>conftest.$ac_ext
13400cat >>conftest.$ac_ext <<_ACEOF
13401/* end confdefs.h. */
f57bd967 13402#include <$ac_header>
503d2be0 13403_ACEOF
ca81d7a0
JD
13404if { (ac_try="$ac_cpp conftest.$ac_ext"
13405case "(($ac_try" in
13406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13407 *) ac_try_echo=$ac_try;;
13408esac
13409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13410 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13411 ac_status=$?
6bae0ccf 13412 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13413 rm -f conftest.er1
13414 cat conftest.err >&5
c0d27fcc 13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13416 (exit $ac_status); } >/dev/null && {
13417 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13418 test ! -s conftest.err
13419 }; then
c0d27fcc 13420 ac_header_preproc=yes
503d2be0
AS
13421else
13422 echo "$as_me: failed program was:" >&5
19650fd6
AS
13423sed 's/^/| /' conftest.$ac_ext >&5
13424
c0d27fcc 13425 ac_header_preproc=no
ba4481b5 13426fi
ca81d7a0 13427
503d2be0 13428rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13429{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13430echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13431
13432# So? What about this header?
edfaf76d
LK
13433case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13434 yes:no: )
f57bd967
DL
13435 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13436echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13437 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13438echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13439 ac_header_preproc=yes
19650fd6 13440 ;;
edfaf76d 13441 no:yes:* )
f57bd967
DL
13442 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13443echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13444 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13445echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13446 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13447echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13448 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13449echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13450 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13451echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13452 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13453echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13454
19650fd6 13455 ;;
c0d27fcc 13456esac
ca81d7a0
JD
13457{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13458echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13459if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13460 echo $ECHO_N "(cached) $ECHO_C" >&6
13461else
edfaf76d 13462 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13463fi
ca81d7a0
JD
13464ac_res=`eval echo '${'$as_ac_Header'}'`
13465 { echo "$as_me:$LINENO: result: $ac_res" >&5
13466echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13467
ba4481b5 13468fi
f57bd967
DL
13469if test `eval echo '${'$as_ac_Header'}'` = yes; then
13470 cat >>confdefs.h <<_ACEOF
13471#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13472_ACEOF
c0d27fcc
MR
13473
13474fi
f57bd967
DL
13475
13476done
13477
13478 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13479 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13480echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13481if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13482 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13483else
98418dba
CW
13484 ac_check_lib_save_LIBS=$LIBS
13485LIBS="-lpng -lz -lm $LIBS"
13486cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13487/* confdefs.h. */
13488_ACEOF
13489cat confdefs.h >>conftest.$ac_ext
13490cat >>conftest.$ac_ext <<_ACEOF
13491/* end confdefs.h. */
98418dba 13492
ca81d7a0
JD
13493/* Override any GCC internal prototype to avoid an error.
13494 Use char because int might match the return type of a GCC
13495 builtin and then its argument prototype would still apply. */
503d2be0
AS
13496#ifdef __cplusplus
13497extern "C"
13498#endif
98418dba 13499char png_get_channels ();
503d2be0
AS
13500int
13501main ()
13502{
ca81d7a0 13503return png_get_channels ();
503d2be0
AS
13504 ;
13505 return 0;
13506}
13507_ACEOF
13508rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13509if { (ac_try="$ac_link"
13510case "(($ac_try" in
13511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13512 *) ac_try_echo=$ac_try;;
13513esac
13514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13515 (eval "$ac_link") 2>conftest.er1
503d2be0 13516 ac_status=$?
edfaf76d
LK
13517 grep -v '^ *+' conftest.er1 >conftest.err
13518 rm -f conftest.er1
13519 cat conftest.err >&5
c0d27fcc 13520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13521 (exit $ac_status); } && {
13522 test -z "$ac_c_werror_flag" ||
13523 test ! -s conftest.err
13524 } && test -s conftest$ac_exeext &&
13525 $as_test_x conftest$ac_exeext; then
98418dba 13526 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13527else
98418dba 13528 echo "$as_me: failed program was:" >&5
19650fd6
AS
13529sed 's/^/| /' conftest.$ac_ext >&5
13530
ca81d7a0 13531 ac_cv_lib_png_png_get_channels=no
73b77ee5 13532fi
ca81d7a0 13533
f053c89f 13534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13535 conftest$ac_exeext conftest.$ac_ext
98418dba 13536LIBS=$ac_check_lib_save_LIBS
73b77ee5 13537fi
ca81d7a0
JD
13538{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13539echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13540if test $ac_cv_lib_png_png_get_channels = yes; then
13541 HAVE_PNG=yes
73b77ee5 13542fi
503d2be0 13543
f57bd967 13544 fi
98418dba
CW
13545 fi
13546
13547 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13548
c0d27fcc 13549cat >>confdefs.h <<\_ACEOF
98418dba 13550#define HAVE_PNG 1
c0d27fcc 13551_ACEOF
73b77ee5 13552
98418dba 13553 fi
73b77ee5
GM
13554fi
13555
98418dba
CW
13556### Use -ltiff if available, unless `--with-tiff=no'.
13557HAVE_TIFF=no
13558if test "${HAVE_X11}" = "yes"; then
13559 if test "${with_tiff}" != "no"; then
c0d27fcc 13560 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13561 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13562echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13563if test "${ac_cv_header_tiffio_h+set}" = set; then
13564 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13565fi
ca81d7a0
JD
13566{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13567echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13568else
c0d27fcc 13569 # Is the header compilable?
ca81d7a0
JD
13570{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13571echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13572cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13573/* confdefs.h. */
13574_ACEOF
13575cat confdefs.h >>conftest.$ac_ext
13576cat >>conftest.$ac_ext <<_ACEOF
13577/* end confdefs.h. */
c0d27fcc
MR
13578$ac_includes_default
13579#include <tiffio.h>
13580_ACEOF
13581rm -f conftest.$ac_objext
ca81d7a0
JD
13582if { (ac_try="$ac_compile"
13583case "(($ac_try" in
13584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13585 *) ac_try_echo=$ac_try;;
13586esac
13587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13588 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13589 ac_status=$?
edfaf76d
LK
13590 grep -v '^ *+' conftest.er1 >conftest.err
13591 rm -f conftest.er1
13592 cat conftest.err >&5
c0d27fcc 13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13594 (exit $ac_status); } && {
13595 test -z "$ac_c_werror_flag" ||
13596 test ! -s conftest.err
13597 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13598 ac_header_compiler=yes
13599else
13600 echo "$as_me: failed program was:" >&5
19650fd6
AS
13601sed 's/^/| /' conftest.$ac_ext >&5
13602
ca81d7a0 13603 ac_header_compiler=no
c0d27fcc 13604fi
ca81d7a0
JD
13605
13606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13607{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13608echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13609
13610# Is the header present?
ca81d7a0
JD
13611{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13612echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13613cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13614/* confdefs.h. */
13615_ACEOF
13616cat confdefs.h >>conftest.$ac_ext
13617cat >>conftest.$ac_ext <<_ACEOF
13618/* end confdefs.h. */
98418dba
CW
13619#include <tiffio.h>
13620_ACEOF
ca81d7a0
JD
13621if { (ac_try="$ac_cpp conftest.$ac_ext"
13622case "(($ac_try" in
13623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13624 *) ac_try_echo=$ac_try;;
13625esac
13626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13627 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13628 ac_status=$?
6bae0ccf 13629 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13630 rm -f conftest.er1
13631 cat conftest.err >&5
c0d27fcc 13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13633 (exit $ac_status); } >/dev/null && {
13634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13635 test ! -s conftest.err
13636 }; then
c0d27fcc 13637 ac_header_preproc=yes
98418dba
CW
13638else
13639 echo "$as_me: failed program was:" >&5
19650fd6
AS
13640sed 's/^/| /' conftest.$ac_ext >&5
13641
c0d27fcc 13642 ac_header_preproc=no
98418dba 13643fi
ca81d7a0 13644
98418dba 13645rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13646{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13647echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13648
13649# So? What about this header?
edfaf76d
LK
13650case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13651 yes:no: )
c0d27fcc
MR
13652 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13653echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13654 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13655echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13656 ac_header_preproc=yes
19650fd6 13657 ;;
edfaf76d 13658 no:yes:* )
c0d27fcc
MR
13659 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13660echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13661 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13662echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13663 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13664echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13665 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13666echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13667 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13668echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13669 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13670echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13671
19650fd6 13672 ;;
c0d27fcc 13673esac
ca81d7a0
JD
13674{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13675echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13676if test "${ac_cv_header_tiffio_h+set}" = set; then
13677 echo $ECHO_N "(cached) $ECHO_C" >&6
13678else
13679 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13680fi
ca81d7a0
JD
13681{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13682echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13683
13684fi
98418dba
CW
13685if test $ac_cv_header_tiffio_h = yes; then
13686 tifflibs="-lz -lm"
13687 # At least one tiff package requires the jpeg library.
13688 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13689 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13690echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13691if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13692 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13693else
503d2be0 13694 ac_check_lib_save_LIBS=$LIBS
98418dba 13695LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13696cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13697/* confdefs.h. */
13698_ACEOF
13699cat confdefs.h >>conftest.$ac_ext
13700cat >>conftest.$ac_ext <<_ACEOF
13701/* end confdefs.h. */
503d2be0 13702
ca81d7a0
JD
13703/* Override any GCC internal prototype to avoid an error.
13704 Use char because int might match the return type of a GCC
13705 builtin and then its argument prototype would still apply. */
503d2be0
AS
13706#ifdef __cplusplus
13707extern "C"
13708#endif
98418dba 13709char TIFFGetVersion ();
503d2be0
AS
13710int
13711main ()
13712{
ca81d7a0 13713return TIFFGetVersion ();
503d2be0
AS
13714 ;
13715 return 0;
13716}
13717_ACEOF
13718rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13719if { (ac_try="$ac_link"
13720case "(($ac_try" in
13721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13722 *) ac_try_echo=$ac_try;;
13723esac
13724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13725 (eval "$ac_link") 2>conftest.er1
503d2be0 13726 ac_status=$?
edfaf76d
LK
13727 grep -v '^ *+' conftest.er1 >conftest.err
13728 rm -f conftest.er1
13729 cat conftest.err >&5
c0d27fcc 13730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13731 (exit $ac_status); } && {
13732 test -z "$ac_c_werror_flag" ||
13733 test ! -s conftest.err
13734 } && test -s conftest$ac_exeext &&
13735 $as_test_x conftest$ac_exeext; then
98418dba 13736 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13737else
13738 echo "$as_me: failed program was:" >&5
19650fd6
AS
13739sed 's/^/| /' conftest.$ac_ext >&5
13740
ca81d7a0 13741 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13742fi
ca81d7a0 13743
f053c89f 13744rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13745 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13746LIBS=$ac_check_lib_save_LIBS
13747fi
ca81d7a0
JD
13748{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13749echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13750if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13751 HAVE_TIFF=yes
13752fi
13753
13754fi
73b77ee5 13755
c0d27fcc 13756
98418dba
CW
13757 fi
13758
13759 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13760
c0d27fcc 13761cat >>confdefs.h <<\_ACEOF
98418dba 13762#define HAVE_TIFF 1
c0d27fcc 13763_ACEOF
98418dba
CW
13764
13765 fi
73b77ee5
GM
13766fi
13767
98418dba
CW
13768### Use -lgif if available, unless `--with-gif=no'.
13769HAVE_GIF=no
13770if test "${HAVE_X11}" = "yes"; then
13771 if test "${with_gif}" != "no"; then
c0d27fcc 13772 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
13773 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13774echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13775if test "${ac_cv_header_gif_lib_h+set}" = set; then
13776 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13777fi
ca81d7a0
JD
13778{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13779echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13780else
c0d27fcc 13781 # Is the header compilable?
ca81d7a0
JD
13782{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13783echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13784cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13785/* confdefs.h. */
13786_ACEOF
13787cat confdefs.h >>conftest.$ac_ext
13788cat >>conftest.$ac_ext <<_ACEOF
13789/* end confdefs.h. */
c0d27fcc
MR
13790$ac_includes_default
13791#include <gif_lib.h>
13792_ACEOF
13793rm -f conftest.$ac_objext
ca81d7a0
JD
13794if { (ac_try="$ac_compile"
13795case "(($ac_try" in
13796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13797 *) ac_try_echo=$ac_try;;
13798esac
13799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13800 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13801 ac_status=$?
edfaf76d
LK
13802 grep -v '^ *+' conftest.er1 >conftest.err
13803 rm -f conftest.er1
13804 cat conftest.err >&5
c0d27fcc 13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13806 (exit $ac_status); } && {
13807 test -z "$ac_c_werror_flag" ||
13808 test ! -s conftest.err
13809 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13810 ac_header_compiler=yes
13811else
13812 echo "$as_me: failed program was:" >&5
19650fd6
AS
13813sed 's/^/| /' conftest.$ac_ext >&5
13814
ca81d7a0 13815 ac_header_compiler=no
c0d27fcc 13816fi
ca81d7a0
JD
13817
13818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13819{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13820echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13821
13822# Is the header present?
ca81d7a0
JD
13823{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13824echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13825cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13826/* confdefs.h. */
13827_ACEOF
13828cat confdefs.h >>conftest.$ac_ext
13829cat >>conftest.$ac_ext <<_ACEOF
13830/* end confdefs.h. */
98418dba
CW
13831#include <gif_lib.h>
13832_ACEOF
ca81d7a0
JD
13833if { (ac_try="$ac_cpp conftest.$ac_ext"
13834case "(($ac_try" in
13835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13836 *) ac_try_echo=$ac_try;;
13837esac
13838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13839 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13840 ac_status=$?
6bae0ccf 13841 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13842 rm -f conftest.er1
13843 cat conftest.err >&5
c0d27fcc 13844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13845 (exit $ac_status); } >/dev/null && {
13846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13847 test ! -s conftest.err
13848 }; then
c0d27fcc 13849 ac_header_preproc=yes
98418dba
CW
13850else
13851 echo "$as_me: failed program was:" >&5
19650fd6
AS
13852sed 's/^/| /' conftest.$ac_ext >&5
13853
c0d27fcc 13854 ac_header_preproc=no
98418dba 13855fi
ca81d7a0 13856
98418dba 13857rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13858{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13859echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13860
13861# So? What about this header?
edfaf76d
LK
13862case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13863 yes:no: )
c0d27fcc
MR
13864 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13865echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13866 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13867echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13868 ac_header_preproc=yes
19650fd6 13869 ;;
edfaf76d 13870 no:yes:* )
c0d27fcc
MR
13871 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13872echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13873 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13874echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13875 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13876echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13877 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13878echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13879 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13880echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13881 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13882echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13883
19650fd6 13884 ;;
c0d27fcc 13885esac
ca81d7a0
JD
13886{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13887echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13888if test "${ac_cv_header_gif_lib_h+set}" = set; then
13889 echo $ECHO_N "(cached) $ECHO_C" >&6
13890else
13891 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13892fi
ca81d7a0
JD
13893{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13894echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13895
13896fi
98418dba
CW
13897if test $ac_cv_header_gif_lib_h = yes; then
13898 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13899# Earlier versions can crash Emacs.
ca81d7a0
JD
13900 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
13901echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
98418dba 13902if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 13903 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13904else
503d2be0 13905 ac_check_lib_save_LIBS=$LIBS
98418dba 13906LIBS="-lungif $LIBS"
503d2be0 13907cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13908/* confdefs.h. */
13909_ACEOF
13910cat confdefs.h >>conftest.$ac_ext
13911cat >>conftest.$ac_ext <<_ACEOF
13912/* end confdefs.h. */
73b77ee5 13913
ca81d7a0
JD
13914/* Override any GCC internal prototype to avoid an error.
13915 Use char because int might match the return type of a GCC
13916 builtin and then its argument prototype would still apply. */
98418dba
CW
13917#ifdef __cplusplus
13918extern "C"
13919#endif
98418dba 13920char EGifPutExtensionLast ();
503d2be0
AS
13921int
13922main ()
13923{
ca81d7a0 13924return EGifPutExtensionLast ();
503d2be0
AS
13925 ;
13926 return 0;
13927}
13928_ACEOF
13929rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13930if { (ac_try="$ac_link"
13931case "(($ac_try" in
13932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13933 *) ac_try_echo=$ac_try;;
13934esac
13935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13936 (eval "$ac_link") 2>conftest.er1
503d2be0 13937 ac_status=$?
edfaf76d
LK
13938 grep -v '^ *+' conftest.er1 >conftest.err
13939 rm -f conftest.er1
13940 cat conftest.err >&5
c0d27fcc 13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13942 (exit $ac_status); } && {
13943 test -z "$ac_c_werror_flag" ||
13944 test ! -s conftest.err
13945 } && test -s conftest$ac_exeext &&
13946 $as_test_x conftest$ac_exeext; then
35996d22
AS
13947 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13948else
98418dba 13949 echo "$as_me: failed program was:" >&5
19650fd6
AS
13950sed 's/^/| /' conftest.$ac_ext >&5
13951
ca81d7a0 13952 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba 13953fi
ca81d7a0 13954
f053c89f 13955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13956 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13957LIBS=$ac_check_lib_save_LIBS
13958fi
ca81d7a0
JD
13959{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13960echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
98418dba
CW
13961if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13962 HAVE_GIF=yes
13963fi
13964
13965fi
13966
c0d27fcc 13967
98418dba
CW
13968 fi
13969
13970 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13971
c0d27fcc 13972cat >>confdefs.h <<\_ACEOF
98418dba 13973#define HAVE_GIF 1
c0d27fcc 13974_ACEOF
98418dba
CW
13975
13976 fi
13977fi
13978
cef11da2 13979if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
13980 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13981echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13982if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13983 echo $ECHO_N "(cached) $ECHO_C" >&6
13984fi
ca81d7a0
JD
13985{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13986echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13987else
13988 # Is the header compilable?
ca81d7a0
JD
13989{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13990echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
13991cat >conftest.$ac_ext <<_ACEOF
13992/* confdefs.h. */
13993_ACEOF
13994cat confdefs.h >>conftest.$ac_ext
13995cat >>conftest.$ac_ext <<_ACEOF
13996/* end confdefs.h. */
13997$ac_includes_default
13998#include <malloc/malloc.h>
13999_ACEOF
14000rm -f conftest.$ac_objext
ca81d7a0
JD
14001if { (ac_try="$ac_compile"
14002case "(($ac_try" in
14003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14004 *) ac_try_echo=$ac_try;;
14005esac
14006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14007 (eval "$ac_compile") 2>conftest.er1
cef11da2 14008 ac_status=$?
edfaf76d
LK
14009 grep -v '^ *+' conftest.er1 >conftest.err
14010 rm -f conftest.er1
14011 cat conftest.err >&5
cef11da2 14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14013 (exit $ac_status); } && {
14014 test -z "$ac_c_werror_flag" ||
14015 test ! -s conftest.err
14016 } && test -s conftest.$ac_objext; then
cef11da2
ST
14017 ac_header_compiler=yes
14018else
14019 echo "$as_me: failed program was:" >&5
14020sed 's/^/| /' conftest.$ac_ext >&5
14021
ca81d7a0 14022 ac_header_compiler=no
cef11da2 14023fi
ca81d7a0
JD
14024
14025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14027echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14028
14029# Is the header present?
ca81d7a0
JD
14030{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14031echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14032cat >conftest.$ac_ext <<_ACEOF
14033/* confdefs.h. */
14034_ACEOF
14035cat confdefs.h >>conftest.$ac_ext
14036cat >>conftest.$ac_ext <<_ACEOF
14037/* end confdefs.h. */
14038#include <malloc/malloc.h>
14039_ACEOF
ca81d7a0
JD
14040if { (ac_try="$ac_cpp conftest.$ac_ext"
14041case "(($ac_try" in
14042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14043 *) ac_try_echo=$ac_try;;
14044esac
14045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14046 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14047 ac_status=$?
14048 grep -v '^ *+' conftest.er1 >conftest.err
14049 rm -f conftest.er1
14050 cat conftest.err >&5
14051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14052 (exit $ac_status); } >/dev/null && {
14053 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14054 test ! -s conftest.err
14055 }; then
cef11da2
ST
14056 ac_header_preproc=yes
14057else
14058 echo "$as_me: failed program was:" >&5
14059sed 's/^/| /' conftest.$ac_ext >&5
14060
14061 ac_header_preproc=no
14062fi
ca81d7a0 14063
cef11da2 14064rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14065{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14066echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14067
14068# So? What about this header?
edfaf76d
LK
14069case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14070 yes:no: )
cef11da2
ST
14071 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14072echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14073 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14074echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14075 ac_header_preproc=yes
cef11da2 14076 ;;
edfaf76d 14077 no:yes:* )
cef11da2
ST
14078 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14079echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14080 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14081echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14082 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14083echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14084 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14085echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14086 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14087echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14088 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14089echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14090
cef11da2
ST
14091 ;;
14092esac
ca81d7a0
JD
14093{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14094echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14095if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14096 echo $ECHO_N "(cached) $ECHO_C" >&6
14097else
14098 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14099fi
ca81d7a0
JD
14100{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14101echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14102
14103fi
14104if test $ac_cv_header_malloc_malloc_h = yes; then
14105
14106cat >>confdefs.h <<\_ACEOF
14107#define HAVE_MALLOC_MALLOC_H 1
14108_ACEOF
14109
14110fi
14111
14112
14113
5d6da11e 14114### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14115if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14116
c0d27fcc 14117cat >>confdefs.h <<\_ACEOF
e0f712ba 14118#define HAVE_CARBON 1
c0d27fcc 14119_ACEOF
e0f712ba 14120
dbdbca09
YM
14121
14122for ac_header in AvailabilityMacros.h
14123do
14124as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14125if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14126 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14127echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14128if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14129 echo $ECHO_N "(cached) $ECHO_C" >&6
14130fi
14131ac_res=`eval echo '${'$as_ac_Header'}'`
14132 { echo "$as_me:$LINENO: result: $ac_res" >&5
14133echo "${ECHO_T}$ac_res" >&6; }
14134else
14135 # Is the header compilable?
14136{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14137echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
14138cat >conftest.$ac_ext <<_ACEOF
14139/* confdefs.h. */
14140_ACEOF
14141cat confdefs.h >>conftest.$ac_ext
14142cat >>conftest.$ac_ext <<_ACEOF
14143/* end confdefs.h. */
14144$ac_includes_default
14145#include <$ac_header>
14146_ACEOF
14147rm -f conftest.$ac_objext
14148if { (ac_try="$ac_compile"
14149case "(($ac_try" in
14150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14151 *) ac_try_echo=$ac_try;;
14152esac
14153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14154 (eval "$ac_compile") 2>conftest.er1
14155 ac_status=$?
14156 grep -v '^ *+' conftest.er1 >conftest.err
14157 rm -f conftest.er1
14158 cat conftest.err >&5
14159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14160 (exit $ac_status); } && {
14161 test -z "$ac_c_werror_flag" ||
14162 test ! -s conftest.err
14163 } && test -s conftest.$ac_objext; then
14164 ac_header_compiler=yes
14165else
14166 echo "$as_me: failed program was:" >&5
14167sed 's/^/| /' conftest.$ac_ext >&5
14168
14169 ac_header_compiler=no
14170fi
14171
14172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14173{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14174echo "${ECHO_T}$ac_header_compiler" >&6; }
14175
14176# Is the header present?
14177{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
14178echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
14179cat >conftest.$ac_ext <<_ACEOF
14180/* confdefs.h. */
14181_ACEOF
14182cat confdefs.h >>conftest.$ac_ext
14183cat >>conftest.$ac_ext <<_ACEOF
14184/* end confdefs.h. */
14185#include <$ac_header>
14186_ACEOF
14187if { (ac_try="$ac_cpp conftest.$ac_ext"
14188case "(($ac_try" in
14189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14190 *) ac_try_echo=$ac_try;;
14191esac
14192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14193 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14194 ac_status=$?
14195 grep -v '^ *+' conftest.er1 >conftest.err
14196 rm -f conftest.er1
14197 cat conftest.err >&5
14198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14199 (exit $ac_status); } >/dev/null && {
14200 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14201 test ! -s conftest.err
14202 }; then
14203 ac_header_preproc=yes
14204else
14205 echo "$as_me: failed program was:" >&5
14206sed 's/^/| /' conftest.$ac_ext >&5
14207
14208 ac_header_preproc=no
14209fi
14210
14211rm -f conftest.err conftest.$ac_ext
14212{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14213echo "${ECHO_T}$ac_header_preproc" >&6; }
14214
14215# So? What about this header?
14216case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14217 yes:no: )
14218 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14219echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14220 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14221echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14222 ac_header_preproc=yes
14223 ;;
14224 no:yes:* )
14225 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14226echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14227 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14228echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14229 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14230echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14231 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14232echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14233 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14234echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14235 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14236echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14237
14238 ;;
14239esac
14240{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14241echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14242if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14243 echo $ECHO_N "(cached) $ECHO_C" >&6
14244else
14245 eval "$as_ac_Header=\$ac_header_preproc"
14246fi
14247ac_res=`eval echo '${'$as_ac_Header'}'`
14248 { echo "$as_me:$LINENO: result: $ac_res" >&5
14249echo "${ECHO_T}$ac_res" >&6; }
14250
14251fi
14252if test `eval echo '${'$as_ac_Header'}'` = yes; then
14253 cat >>confdefs.h <<_ACEOF
14254#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14255_ACEOF
14256
14257fi
14258
14259done
14260
6a3a24fa
JD
14261 ## Specify the install directory
14262 carbon_appdir=
14263 if test "${carbon_appdir_x}" != ""; then
14264 case ${carbon_appdir_x} in
14265 y | ye | yes) carbon_appdir=/Applications ;;
14266 * ) carbon_appdir=${carbon_appdir_x} ;;
14267 esac
14268 fi
8f417b3b
AS
14269 # We also have mouse menus.
14270 HAVE_MENUS=yes
e0f712ba
AC
14271fi
14272
98418dba
CW
14273### Use session management (-lSM -lICE) if available
14274HAVE_X_SM=no
14275if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14276 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14277 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14278echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14279if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14280 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14281fi
ca81d7a0
JD
14282{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14283echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14284else
c0d27fcc 14285 # Is the header compilable?
ca81d7a0
JD
14286{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14287echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14288cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14289/* confdefs.h. */
14290_ACEOF
14291cat confdefs.h >>conftest.$ac_ext
14292cat >>conftest.$ac_ext <<_ACEOF
14293/* end confdefs.h. */
c0d27fcc
MR
14294$ac_includes_default
14295#include <X11/SM/SMlib.h>
14296_ACEOF
14297rm -f conftest.$ac_objext
ca81d7a0
JD
14298if { (ac_try="$ac_compile"
14299case "(($ac_try" in
14300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14301 *) ac_try_echo=$ac_try;;
14302esac
14303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14304 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14305 ac_status=$?
edfaf76d
LK
14306 grep -v '^ *+' conftest.er1 >conftest.err
14307 rm -f conftest.er1
14308 cat conftest.err >&5
c0d27fcc 14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14310 (exit $ac_status); } && {
14311 test -z "$ac_c_werror_flag" ||
14312 test ! -s conftest.err
14313 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14314 ac_header_compiler=yes
14315else
14316 echo "$as_me: failed program was:" >&5
19650fd6
AS
14317sed 's/^/| /' conftest.$ac_ext >&5
14318
ca81d7a0 14319 ac_header_compiler=no
c0d27fcc 14320fi
ca81d7a0
JD
14321
14322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14323{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14324echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14325
14326# Is the header present?
ca81d7a0
JD
14327{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14328echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14329cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14330/* confdefs.h. */
14331_ACEOF
14332cat confdefs.h >>conftest.$ac_ext
14333cat >>conftest.$ac_ext <<_ACEOF
14334/* end confdefs.h. */
98418dba
CW
14335#include <X11/SM/SMlib.h>
14336_ACEOF
ca81d7a0
JD
14337if { (ac_try="$ac_cpp conftest.$ac_ext"
14338case "(($ac_try" in
14339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14340 *) ac_try_echo=$ac_try;;
14341esac
14342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14343 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14344 ac_status=$?
6bae0ccf 14345 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14346 rm -f conftest.er1
14347 cat conftest.err >&5
c0d27fcc 14348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14349 (exit $ac_status); } >/dev/null && {
14350 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14351 test ! -s conftest.err
14352 }; then
c0d27fcc 14353 ac_header_preproc=yes
98418dba
CW
14354else
14355 echo "$as_me: failed program was:" >&5
19650fd6
AS
14356sed 's/^/| /' conftest.$ac_ext >&5
14357
c0d27fcc 14358 ac_header_preproc=no
98418dba 14359fi
ca81d7a0 14360
98418dba 14361rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14362{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14363echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14364
14365# So? What about this header?
edfaf76d
LK
14366case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14367 yes:no: )
c0d27fcc
MR
14368 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14369echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14370 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14371echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14372 ac_header_preproc=yes
19650fd6 14373 ;;
edfaf76d 14374 no:yes:* )
c0d27fcc
MR
14375 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14376echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14377 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14378echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14379 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14380echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14381 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14382echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14383 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14384echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14385 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14386echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14387
19650fd6 14388 ;;
c0d27fcc 14389esac
ca81d7a0
JD
14390{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14391echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14392if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14393 echo $ECHO_N "(cached) $ECHO_C" >&6
14394else
14395 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14396fi
ca81d7a0
JD
14397{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14398echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14399
14400fi
98418dba 14401if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
14402 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14403echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14404if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14405 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14406else
503d2be0 14407 ac_check_lib_save_LIBS=$LIBS
1660500f 14408LIBS="-lSM -lICE $LIBS"
503d2be0 14409cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14410/* confdefs.h. */
14411_ACEOF
14412cat confdefs.h >>conftest.$ac_ext
14413cat >>conftest.$ac_ext <<_ACEOF
14414/* end confdefs.h. */
503d2be0 14415
ca81d7a0
JD
14416/* Override any GCC internal prototype to avoid an error.
14417 Use char because int might match the return type of a GCC
14418 builtin and then its argument prototype would still apply. */
503d2be0
AS
14419#ifdef __cplusplus
14420extern "C"
14421#endif
98418dba 14422char SmcOpenConnection ();
503d2be0
AS
14423int
14424main ()
14425{
ca81d7a0 14426return SmcOpenConnection ();
503d2be0
AS
14427 ;
14428 return 0;
14429}
14430_ACEOF
14431rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14432if { (ac_try="$ac_link"
14433case "(($ac_try" in
14434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14435 *) ac_try_echo=$ac_try;;
14436esac
14437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14438 (eval "$ac_link") 2>conftest.er1
503d2be0 14439 ac_status=$?
edfaf76d
LK
14440 grep -v '^ *+' conftest.er1 >conftest.err
14441 rm -f conftest.er1
14442 cat conftest.err >&5
c0d27fcc 14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14444 (exit $ac_status); } && {
14445 test -z "$ac_c_werror_flag" ||
14446 test ! -s conftest.err
14447 } && test -s conftest$ac_exeext &&
14448 $as_test_x conftest$ac_exeext; then
98418dba 14449 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14450else
14451 echo "$as_me: failed program was:" >&5
19650fd6
AS
14452sed 's/^/| /' conftest.$ac_ext >&5
14453
ca81d7a0 14454 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14455fi
ca81d7a0 14456
f053c89f 14457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14458 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14459LIBS=$ac_check_lib_save_LIBS
14460fi
ca81d7a0
JD
14461{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14462echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14463if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14464 HAVE_X_SM=yes
73b77ee5
GM
14465fi
14466
73b77ee5 14467fi
73b77ee5 14468
c0d27fcc
MR
14469
14470
98418dba 14471 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14472
c0d27fcc 14473cat >>confdefs.h <<\_ACEOF
98418dba 14474#define HAVE_X_SM 1
c0d27fcc 14475_ACEOF
73b77ee5 14476
98418dba
CW
14477 case "$LIBS" in
14478 *-lSM*) ;;
14479 *) LIBS="-lSM -lICE $LIBS" ;;
14480 esac
73b77ee5 14481 fi
98418dba 14482fi
73b77ee5 14483
98418dba 14484# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
14485{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14486echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14487if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14488 echo $ECHO_N "(cached) $ECHO_C" >&6
14489else
14490 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14491/* confdefs.h. */
14492_ACEOF
14493cat confdefs.h >>conftest.$ac_ext
14494cat >>conftest.$ac_ext <<_ACEOF
14495/* end confdefs.h. */
98418dba 14496#include <netdb.h>
503d2be0
AS
14497int
14498main ()
14499{
98418dba 14500return h_errno;
503d2be0
AS
14501 ;
14502 return 0;
14503}
14504_ACEOF
14505rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14506if { (ac_try="$ac_link"
14507case "(($ac_try" in
14508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14509 *) ac_try_echo=$ac_try;;
14510esac
14511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14512 (eval "$ac_link") 2>conftest.er1
503d2be0 14513 ac_status=$?
edfaf76d
LK
14514 grep -v '^ *+' conftest.er1 >conftest.err
14515 rm -f conftest.er1
14516 cat conftest.err >&5
c0d27fcc 14517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14518 (exit $ac_status); } && {
14519 test -z "$ac_c_werror_flag" ||
14520 test ! -s conftest.err
14521 } && test -s conftest$ac_exeext &&
14522 $as_test_x conftest$ac_exeext; then
98418dba 14523 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14524else
503d2be0 14525 echo "$as_me: failed program was:" >&5
19650fd6
AS
14526sed 's/^/| /' conftest.$ac_ext >&5
14527
ca81d7a0 14528 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14529fi
ca81d7a0 14530
f053c89f 14531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14532 conftest$ac_exeext conftest.$ac_ext
98418dba 14533fi
ca81d7a0
JD
14534{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14535echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14536if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14537
c0d27fcc 14538cat >>confdefs.h <<\_ACEOF
98418dba 14539#define HAVE_H_ERRNO 1
c0d27fcc 14540_ACEOF
73b77ee5 14541
98418dba
CW
14542fi
14543
14544# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14545# for constant arguments. Useless!
ca81d7a0
JD
14546{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14547echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14548if test "${ac_cv_working_alloca_h+set}" = set; then
14549 echo $ECHO_N "(cached) $ECHO_C" >&6
14550else
14551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14552/* confdefs.h. */
14553_ACEOF
14554cat confdefs.h >>conftest.$ac_ext
14555cat >>conftest.$ac_ext <<_ACEOF
14556/* end confdefs.h. */
98418dba 14557#include <alloca.h>
503d2be0
AS
14558int
14559main ()
14560{
98418dba 14561char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 14562 if (p) return 0;
503d2be0
AS
14563 ;
14564 return 0;
14565}
14566_ACEOF
14567rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14568if { (ac_try="$ac_link"
14569case "(($ac_try" in
14570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14571 *) ac_try_echo=$ac_try;;
14572esac
14573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14574 (eval "$ac_link") 2>conftest.er1
503d2be0 14575 ac_status=$?
edfaf76d
LK
14576 grep -v '^ *+' conftest.er1 >conftest.err
14577 rm -f conftest.er1
14578 cat conftest.err >&5
c0d27fcc 14579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14580 (exit $ac_status); } && {
14581 test -z "$ac_c_werror_flag" ||
14582 test ! -s conftest.err
14583 } && test -s conftest$ac_exeext &&
14584 $as_test_x conftest$ac_exeext; then
98418dba 14585 ac_cv_working_alloca_h=yes
73b77ee5 14586else
503d2be0 14587 echo "$as_me: failed program was:" >&5
19650fd6
AS
14588sed 's/^/| /' conftest.$ac_ext >&5
14589
ca81d7a0 14590 ac_cv_working_alloca_h=no
73b77ee5 14591fi
ca81d7a0 14592
f053c89f 14593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14594 conftest$ac_exeext conftest.$ac_ext
98418dba 14595fi
ca81d7a0
JD
14596{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14597echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14598if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14599
c0d27fcc 14600cat >>confdefs.h <<\_ACEOF
98418dba 14601#define HAVE_ALLOCA_H 1
c0d27fcc 14602_ACEOF
98418dba
CW
14603
14604fi
14605
ca81d7a0
JD
14606{ echo "$as_me:$LINENO: checking for alloca" >&5
14607echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14608if test "${ac_cv_func_alloca_works+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
14610else
503d2be0 14611 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14612/* confdefs.h. */
14613_ACEOF
14614cat confdefs.h >>conftest.$ac_ext
14615cat >>conftest.$ac_ext <<_ACEOF
14616/* end confdefs.h. */
98418dba
CW
14617#ifdef __GNUC__
14618# define alloca __builtin_alloca
14619#else
14620# ifdef _MSC_VER
14621# include <malloc.h>
14622# define alloca _alloca
14623# else
f053c89f 14624# ifdef HAVE_ALLOCA_H
98418dba
CW
14625# include <alloca.h>
14626# else
14627# ifdef _AIX
14628 #pragma alloca
14629# else
14630# ifndef alloca /* predefined by HP cc +Olibcalls */
14631char *alloca ();
14632# endif
14633# endif
14634# endif
14635# endif
14636#endif
14637
503d2be0
AS
14638int
14639main ()
14640{
98418dba 14641char *p = (char *) alloca (1);
ca81d7a0 14642 if (p) return 0;
503d2be0
AS
14643 ;
14644 return 0;
14645}
14646_ACEOF
14647rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14648if { (ac_try="$ac_link"
14649case "(($ac_try" in
14650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14651 *) ac_try_echo=$ac_try;;
14652esac
14653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14654 (eval "$ac_link") 2>conftest.er1
503d2be0 14655 ac_status=$?
edfaf76d
LK
14656 grep -v '^ *+' conftest.er1 >conftest.err
14657 rm -f conftest.er1
14658 cat conftest.err >&5
c0d27fcc 14659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14660 (exit $ac_status); } && {
14661 test -z "$ac_c_werror_flag" ||
14662 test ! -s conftest.err
14663 } && test -s conftest$ac_exeext &&
14664 $as_test_x conftest$ac_exeext; then
98418dba 14665 ac_cv_func_alloca_works=yes
ac95a621 14666else
503d2be0 14667 echo "$as_me: failed program was:" >&5
19650fd6
AS
14668sed 's/^/| /' conftest.$ac_ext >&5
14669
ca81d7a0 14670 ac_cv_func_alloca_works=no
ac95a621 14671fi
ca81d7a0 14672
f053c89f 14673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14674 conftest$ac_exeext conftest.$ac_ext
98418dba 14675fi
ca81d7a0
JD
14676{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14677echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14678
98418dba
CW
14679if test $ac_cv_func_alloca_works = yes; then
14680
c0d27fcc 14681cat >>confdefs.h <<\_ACEOF
98418dba 14682#define HAVE_ALLOCA 1
c0d27fcc 14683_ACEOF
98418dba
CW
14684
14685else
14686 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14687# that cause trouble. Some versions do not even contain alloca or
14688# contain a buggy version. If you still want to use their alloca,
14689# use ar to extract alloca.o from them instead of compiling alloca.c.
14690
ca81d7a0 14691ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14692
c0d27fcc 14693cat >>confdefs.h <<\_ACEOF
98418dba 14694#define C_ALLOCA 1
c0d27fcc 14695_ACEOF
98418dba 14696
c0d27fcc 14697
ca81d7a0
JD
14698{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14699echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14700if test "${ac_cv_os_cray+set}" = set; then
14701 echo $ECHO_N "(cached) $ECHO_C" >&6
14702else
14703 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14704/* confdefs.h. */
14705_ACEOF
14706cat confdefs.h >>conftest.$ac_ext
14707cat >>conftest.$ac_ext <<_ACEOF
14708/* end confdefs.h. */
ca81d7a0 14709#if defined CRAY && ! defined CRAY2
98418dba
CW
14710webecray
14711#else
14712wenotbecray
14713#endif
14714
14715_ACEOF
14716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14717 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14718 ac_cv_os_cray=yes
14719else
14720 ac_cv_os_cray=no
14721fi
14722rm -f conftest*
ac95a621 14723
98418dba 14724fi
ca81d7a0
JD
14725{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14726echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14727if test $ac_cv_os_cray = yes; then
14728 for ac_func in _getb67 GETB67 getb67; do
14729 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14730{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14731echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14732if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14733 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14734else
503d2be0 14735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14736/* confdefs.h. */
14737_ACEOF
14738cat confdefs.h >>conftest.$ac_ext
14739cat >>conftest.$ac_ext <<_ACEOF
14740/* end confdefs.h. */
edfaf76d
LK
14741/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14742 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14743#define $ac_func innocuous_$ac_func
14744
73b77ee5 14745/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14746 which can conflict with char $ac_func (); below.
14747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14748 <limits.h> exists even on freestanding compilers. */
edfaf76d 14749
19650fd6
AS
14750#ifdef __STDC__
14751# include <limits.h>
14752#else
14753# include <assert.h>
14754#endif
edfaf76d
LK
14755
14756#undef $ac_func
14757
ca81d7a0
JD
14758/* Override any GCC internal prototype to avoid an error.
14759 Use char because int might match the return type of a GCC
14760 builtin and then its argument prototype would still apply. */
503d2be0
AS
14761#ifdef __cplusplus
14762extern "C"
14763#endif
503d2be0 14764char $ac_func ();
73b77ee5
GM
14765/* The GNU C library defines this for functions which it implements
14766 to always fail with ENOSYS. Some functions are actually named
14767 something starting with __ and the normal name is an alias. */
ca81d7a0 14768#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14769choke me
73b77ee5
GM
14770#endif
14771
19650fd6
AS
14772int
14773main ()
14774{
ca81d7a0 14775return $ac_func ();
503d2be0
AS
14776 ;
14777 return 0;
14778}
14779_ACEOF
14780rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14781if { (ac_try="$ac_link"
14782case "(($ac_try" in
14783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14784 *) ac_try_echo=$ac_try;;
14785esac
14786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14787 (eval "$ac_link") 2>conftest.er1
503d2be0 14788 ac_status=$?
edfaf76d
LK
14789 grep -v '^ *+' conftest.er1 >conftest.err
14790 rm -f conftest.er1
14791 cat conftest.err >&5
c0d27fcc 14792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14793 (exit $ac_status); } && {
14794 test -z "$ac_c_werror_flag" ||
14795 test ! -s conftest.err
14796 } && test -s conftest$ac_exeext &&
14797 $as_test_x conftest$ac_exeext; then
503d2be0
AS
14798 eval "$as_ac_var=yes"
14799else
14800 echo "$as_me: failed program was:" >&5
19650fd6
AS
14801sed 's/^/| /' conftest.$ac_ext >&5
14802
ca81d7a0 14803 eval "$as_ac_var=no"
503d2be0 14804fi
ca81d7a0 14805
f053c89f 14806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14807 conftest$ac_exeext conftest.$ac_ext
503d2be0 14808fi
ca81d7a0
JD
14809ac_res=`eval echo '${'$as_ac_var'}'`
14810 { echo "$as_me:$LINENO: result: $ac_res" >&5
14811echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14812if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 14813
c0d27fcc 14814cat >>confdefs.h <<_ACEOF
98418dba 14815#define CRAY_STACKSEG_END $ac_func
c0d27fcc 14816_ACEOF
98418dba
CW
14817
14818 break
73b77ee5 14819fi
73b77ee5 14820
98418dba 14821 done
73b77ee5
GM
14822fi
14823
ca81d7a0
JD
14824{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14825echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 14826if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 14827 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
14828else
14829 if test "$cross_compiling" = yes; then
14830 ac_cv_c_stack_direction=0
73b77ee5 14831else
503d2be0 14832 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14833/* confdefs.h. */
14834_ACEOF
14835cat confdefs.h >>conftest.$ac_ext
14836cat >>conftest.$ac_ext <<_ACEOF
14837/* end confdefs.h. */
ca81d7a0 14838$ac_includes_default
503d2be0 14839int
98418dba 14840find_stack_direction ()
503d2be0 14841{
98418dba
CW
14842 static char *addr = 0;
14843 auto char dummy;
14844 if (addr == 0)
14845 {
14846 addr = &dummy;
14847 return find_stack_direction ();
14848 }
73b77ee5 14849 else
98418dba
CW
14850 return (&dummy > addr) ? 1 : -1;
14851}
ba4481b5 14852
503d2be0
AS
14853int
14854main ()
14855{
ca81d7a0 14856 return find_stack_direction () < 0;
503d2be0
AS
14857}
14858_ACEOF
98418dba 14859rm -f conftest$ac_exeext
ca81d7a0
JD
14860if { (ac_try="$ac_link"
14861case "(($ac_try" in
14862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14863 *) ac_try_echo=$ac_try;;
14864esac
14865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14866 (eval "$ac_link") 2>&5
503d2be0 14867 ac_status=$?
c0d27fcc 14868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14869 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
14870 { (case "(($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_try") 2>&5
503d2be0 14876 ac_status=$?
c0d27fcc 14877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14878 (exit $ac_status); }; }; then
98418dba 14879 ac_cv_c_stack_direction=1
ba4481b5 14880else
98418dba
CW
14881 echo "$as_me: program exited with status $ac_status" >&5
14882echo "$as_me: failed program was:" >&5
19650fd6
AS
14883sed 's/^/| /' conftest.$ac_ext >&5
14884
c0d27fcc 14885( exit $ac_status )
98418dba 14886ac_cv_c_stack_direction=-1
ba4481b5 14887fi
ca81d7a0 14888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 14889fi
ca81d7a0
JD
14890
14891
98418dba 14892fi
ca81d7a0
JD
14893{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14894echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 14895
c0d27fcc 14896cat >>confdefs.h <<_ACEOF
98418dba 14897#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
14898_ACEOF
14899
ba4481b5 14900
ba4481b5
DL
14901fi
14902
c0d27fcc 14903
98418dba
CW
14904# fmod, logb, and frexp are found in -lm on most systems.
14905# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
14906
ca81d7a0
JD
14907{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
14908echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 14909if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 14910 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14911else
98418dba
CW
14912 ac_check_lib_save_LIBS=$LIBS
14913LIBS="-lm $LIBS"
14914cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14915/* confdefs.h. */
14916_ACEOF
14917cat confdefs.h >>conftest.$ac_ext
14918cat >>conftest.$ac_ext <<_ACEOF
14919/* end confdefs.h. */
ba4481b5 14920
ca81d7a0
JD
14921/* Override any GCC internal prototype to avoid an error.
14922 Use char because int might match the return type of a GCC
14923 builtin and then its argument prototype would still apply. */
98418dba
CW
14924#ifdef __cplusplus
14925extern "C"
14926#endif
98418dba 14927char sqrt ();
503d2be0
AS
14928int
14929main ()
14930{
ca81d7a0 14931return sqrt ();
503d2be0
AS
14932 ;
14933 return 0;
14934}
14935_ACEOF
14936rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14937if { (ac_try="$ac_link"
14938case "(($ac_try" in
14939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14940 *) ac_try_echo=$ac_try;;
14941esac
14942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14943 (eval "$ac_link") 2>conftest.er1
503d2be0 14944 ac_status=$?
edfaf76d
LK
14945 grep -v '^ *+' conftest.er1 >conftest.err
14946 rm -f conftest.er1
14947 cat conftest.err >&5
c0d27fcc 14948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14949 (exit $ac_status); } && {
14950 test -z "$ac_c_werror_flag" ||
14951 test ! -s conftest.err
14952 } && test -s conftest$ac_exeext &&
14953 $as_test_x conftest$ac_exeext; then
98418dba 14954 ac_cv_lib_m_sqrt=yes
ba4481b5 14955else
503d2be0 14956 echo "$as_me: failed program was:" >&5
19650fd6
AS
14957sed 's/^/| /' conftest.$ac_ext >&5
14958
ca81d7a0 14959 ac_cv_lib_m_sqrt=no
ba4481b5 14960fi
ca81d7a0 14961
f053c89f 14962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14963 conftest$ac_exeext conftest.$ac_ext
98418dba 14964LIBS=$ac_check_lib_save_LIBS
ba4481b5 14965fi
ca81d7a0
JD
14966{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
14967echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 14968if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14969 cat >>confdefs.h <<_ACEOF
98418dba 14970#define HAVE_LIBM 1
c0d27fcc 14971_ACEOF
98418dba
CW
14972
14973 LIBS="-lm $LIBS"
ba4481b5 14974
ba4481b5
DL
14975fi
14976
c0d27fcc 14977
55597d70
DL
14978# Check for mail-locking functions in a "mail" library. Probably this should
14979# have the same check as for liblockfile below.
98418dba 14980
ca81d7a0
JD
14981{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
14982echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 14983if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14984 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14985else
98418dba
CW
14986 ac_check_lib_save_LIBS=$LIBS
14987LIBS="-lmail $LIBS"
14988cat >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
ca81d7a0
JD
14995/* Override any GCC internal prototype to avoid an error.
14996 Use char because int might match the return type of a GCC
14997 builtin and then its argument prototype would still apply. */
98418dba
CW
14998#ifdef __cplusplus
14999extern "C"
15000#endif
98418dba 15001char maillock ();
503d2be0
AS
15002int
15003main ()
15004{
ca81d7a0 15005return maillock ();
503d2be0
AS
15006 ;
15007 return 0;
15008}
15009_ACEOF
15010rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15011if { (ac_try="$ac_link"
15012case "(($ac_try" in
15013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15014 *) ac_try_echo=$ac_try;;
15015esac
15016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15017 (eval "$ac_link") 2>conftest.er1
503d2be0 15018 ac_status=$?
edfaf76d
LK
15019 grep -v '^ *+' conftest.er1 >conftest.err
15020 rm -f conftest.er1
15021 cat conftest.err >&5
c0d27fcc 15022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15023 (exit $ac_status); } && {
15024 test -z "$ac_c_werror_flag" ||
15025 test ! -s conftest.err
15026 } && test -s conftest$ac_exeext &&
15027 $as_test_x conftest$ac_exeext; then
98418dba 15028 ac_cv_lib_mail_maillock=yes
ba4481b5 15029else
503d2be0 15030 echo "$as_me: failed program was:" >&5
19650fd6
AS
15031sed 's/^/| /' conftest.$ac_ext >&5
15032
ca81d7a0 15033 ac_cv_lib_mail_maillock=no
ba4481b5 15034fi
ca81d7a0 15035
f053c89f 15036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15037 conftest$ac_exeext conftest.$ac_ext
98418dba 15038LIBS=$ac_check_lib_save_LIBS
ba4481b5 15039fi
ca81d7a0
JD
15040{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15041echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15042if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15043 cat >>confdefs.h <<_ACEOF
98418dba 15044#define HAVE_LIBMAIL 1
c0d27fcc 15045_ACEOF
ba4481b5 15046
98418dba 15047 LIBS="-lmail $LIBS"
ba4481b5 15048
98418dba 15049fi
ba4481b5 15050
c0d27fcc 15051
ca81d7a0
JD
15052{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15053echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15054if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15055 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15056else
503d2be0 15057 ac_check_lib_save_LIBS=$LIBS
98418dba 15058LIBS="-llockfile $LIBS"
503d2be0 15059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15060/* confdefs.h. */
15061_ACEOF
15062cat confdefs.h >>conftest.$ac_ext
15063cat >>conftest.$ac_ext <<_ACEOF
15064/* end confdefs.h. */
503d2be0 15065
ca81d7a0
JD
15066/* Override any GCC internal prototype to avoid an error.
15067 Use char because int might match the return type of a GCC
15068 builtin and then its argument prototype would still apply. */
503d2be0
AS
15069#ifdef __cplusplus
15070extern "C"
15071#endif
98418dba 15072char maillock ();
503d2be0
AS
15073int
15074main ()
15075{
ca81d7a0 15076return maillock ();
503d2be0
AS
15077 ;
15078 return 0;
15079}
15080_ACEOF
15081rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15082if { (ac_try="$ac_link"
15083case "(($ac_try" in
15084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15085 *) ac_try_echo=$ac_try;;
15086esac
15087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15088 (eval "$ac_link") 2>conftest.er1
503d2be0 15089 ac_status=$?
edfaf76d
LK
15090 grep -v '^ *+' conftest.er1 >conftest.err
15091 rm -f conftest.er1
15092 cat conftest.err >&5
c0d27fcc 15093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15094 (exit $ac_status); } && {
15095 test -z "$ac_c_werror_flag" ||
15096 test ! -s conftest.err
15097 } && test -s conftest$ac_exeext &&
15098 $as_test_x conftest$ac_exeext; then
98418dba 15099 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15100else
15101 echo "$as_me: failed program was:" >&5
19650fd6
AS
15102sed 's/^/| /' conftest.$ac_ext >&5
15103
ca81d7a0 15104 ac_cv_lib_lockfile_maillock=no
98418dba 15105fi
ca81d7a0 15106
f053c89f 15107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15108 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15109LIBS=$ac_check_lib_save_LIBS
15110fi
ca81d7a0
JD
15111{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15112echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15113if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15114 cat >>confdefs.h <<_ACEOF
98418dba 15115#define HAVE_LIBLOCKFILE 1
c0d27fcc 15116_ACEOF
98418dba
CW
15117
15118 LIBS="-llockfile $LIBS"
15119
15120fi
15121
15122# If we have the shared liblockfile, assume we must use it for mail
15123# locking (e.g. Debian). If we couldn't link against liblockfile
15124# (no liblockfile.a installed), ensure that we don't need to.
15125if test "$ac_cv_lib_lockfile_maillock" = no; then
15126 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15127set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15128{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15129echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15130if test "${ac_cv_prog_liblockfile+set}" = set; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
15132else
15133 if test -n "$liblockfile"; then
15134 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15135else
c0d27fcc 15136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15137as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15138for as_dir in $as_dummy
c0d27fcc
MR
15139do
15140 IFS=$as_save_IFS
15141 test -z "$as_dir" && as_dir=.
15142 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15144 ac_cv_prog_liblockfile="yes"
15145 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15146 break 2
15147 fi
15148done
98418dba 15149done
ca81d7a0 15150IFS=$as_save_IFS
98418dba
CW
15151
15152 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15153fi
503d2be0 15154fi
98418dba
CW
15155liblockfile=$ac_cv_prog_liblockfile
15156if test -n "$liblockfile"; then
ca81d7a0
JD
15157 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15158echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15159else
ca81d7a0
JD
15160 { echo "$as_me:$LINENO: result: no" >&5
15161echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15162fi
15163
ca81d7a0 15164
98418dba 15165 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15166 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15167This probably means that movemail could lose mail.
15168There may be a \`development' package to install containing liblockfile." >&5
15169echo "$as_me: error: Shared liblockfile found but can't link against it.
15170This probably means that movemail could lose mail.
15171There may be a \`development' package to install containing liblockfile." >&2;}
15172 { (exit 1); exit 1; }; }
98418dba 15173 else :
55597d70 15174 fi
98418dba 15175fi
503d2be0 15176
98418dba
CW
15177for ac_func in touchlock
15178do
15179as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15180{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15181echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15182if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15183 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15184else
98418dba 15185 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
edfaf76d
LK
15191/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15193#define $ac_func innocuous_$ac_func
15194
98418dba 15195/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15196 which can conflict with char $ac_func (); below.
15197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15198 <limits.h> exists even on freestanding compilers. */
edfaf76d 15199
19650fd6
AS
15200#ifdef __STDC__
15201# include <limits.h>
15202#else
15203# include <assert.h>
15204#endif
edfaf76d
LK
15205
15206#undef $ac_func
15207
ca81d7a0
JD
15208/* Override any GCC internal prototype to avoid an error.
15209 Use char because int might match the return type of a GCC
15210 builtin and then its argument prototype would still apply. */
503d2be0
AS
15211#ifdef __cplusplus
15212extern "C"
15213#endif
98418dba 15214char $ac_func ();
98418dba
CW
15215/* The GNU C library defines this for functions which it implements
15216 to always fail with ENOSYS. Some functions are actually named
15217 something starting with __ and the normal name is an alias. */
ca81d7a0 15218#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15219choke me
cd958eb3
MB
15220#endif
15221
19650fd6
AS
15222int
15223main ()
15224{
ca81d7a0 15225return $ac_func ();
503d2be0
AS
15226 ;
15227 return 0;
15228}
15229_ACEOF
15230rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15231if { (ac_try="$ac_link"
15232case "(($ac_try" in
15233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15234 *) ac_try_echo=$ac_try;;
15235esac
15236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15237 (eval "$ac_link") 2>conftest.er1
503d2be0 15238 ac_status=$?
edfaf76d
LK
15239 grep -v '^ *+' conftest.er1 >conftest.err
15240 rm -f conftest.er1
15241 cat conftest.err >&5
c0d27fcc 15242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15243 (exit $ac_status); } && {
15244 test -z "$ac_c_werror_flag" ||
15245 test ! -s conftest.err
15246 } && test -s conftest$ac_exeext &&
15247 $as_test_x conftest$ac_exeext; then
98418dba 15248 eval "$as_ac_var=yes"
503d2be0
AS
15249else
15250 echo "$as_me: failed program was:" >&5
19650fd6
AS
15251sed 's/^/| /' conftest.$ac_ext >&5
15252
ca81d7a0 15253 eval "$as_ac_var=no"
503d2be0 15254fi
ca81d7a0 15255
f053c89f 15256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15257 conftest$ac_exeext conftest.$ac_ext
503d2be0 15258fi
ca81d7a0
JD
15259ac_res=`eval echo '${'$as_ac_var'}'`
15260 { echo "$as_me:$LINENO: result: $ac_res" >&5
15261echo "${ECHO_T}$ac_res" >&6; }
98418dba 15262if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15263 cat >>confdefs.h <<_ACEOF
98418dba 15264#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15265_ACEOF
457b792c 15266
457b792c 15267fi
98418dba 15268done
457b792c 15269
c0d27fcc 15270
98418dba
CW
15271for ac_header in maillock.h
15272do
15273as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15274if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15275 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15276echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15277if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15278 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15279fi
ca81d7a0
JD
15280ac_res=`eval echo '${'$as_ac_Header'}'`
15281 { echo "$as_me:$LINENO: result: $ac_res" >&5
15282echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15283else
c0d27fcc 15284 # Is the header compilable?
ca81d7a0
JD
15285{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15286echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
c0d27fcc
MR
15293$ac_includes_default
15294#include <$ac_header>
15295_ACEOF
15296rm -f conftest.$ac_objext
ca81d7a0
JD
15297if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
c0d27fcc 15304 ac_status=$?
edfaf76d
LK
15305 grep -v '^ *+' conftest.er1 >conftest.err
15306 rm -f conftest.er1
15307 cat conftest.err >&5
c0d27fcc 15308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15309 (exit $ac_status); } && {
15310 test -z "$ac_c_werror_flag" ||
15311 test ! -s conftest.err
15312 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15313 ac_header_compiler=yes
15314else
15315 echo "$as_me: failed program was:" >&5
19650fd6
AS
15316sed 's/^/| /' conftest.$ac_ext >&5
15317
ca81d7a0 15318 ac_header_compiler=no
c0d27fcc 15319fi
ca81d7a0
JD
15320
15321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15322{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15323echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15324
15325# Is the header present?
ca81d7a0
JD
15326{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15327echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15328cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15329/* confdefs.h. */
15330_ACEOF
15331cat confdefs.h >>conftest.$ac_ext
15332cat >>conftest.$ac_ext <<_ACEOF
15333/* end confdefs.h. */
98418dba 15334#include <$ac_header>
503d2be0 15335_ACEOF
ca81d7a0
JD
15336if { (ac_try="$ac_cpp conftest.$ac_ext"
15337case "(($ac_try" in
15338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15339 *) ac_try_echo=$ac_try;;
15340esac
15341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15342 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15343 ac_status=$?
6bae0ccf 15344 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15345 rm -f conftest.er1
15346 cat conftest.err >&5
c0d27fcc 15347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15348 (exit $ac_status); } >/dev/null && {
15349 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15350 test ! -s conftest.err
15351 }; then
c0d27fcc 15352 ac_header_preproc=yes
98418dba
CW
15353else
15354 echo "$as_me: failed program was:" >&5
19650fd6
AS
15355sed 's/^/| /' conftest.$ac_ext >&5
15356
c0d27fcc 15357 ac_header_preproc=no
503d2be0 15358fi
ca81d7a0 15359
98418dba 15360rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15361{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15362echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15363
15364# So? What about this header?
edfaf76d
LK
15365case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15366 yes:no: )
c0d27fcc
MR
15367 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15368echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15369 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15370echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15371 ac_header_preproc=yes
19650fd6 15372 ;;
edfaf76d 15373 no:yes:* )
c0d27fcc
MR
15374 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15375echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15376 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15377echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15378 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15379echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15380 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15381echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15382 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15383echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15384 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15385echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15386
19650fd6 15387 ;;
c0d27fcc 15388esac
ca81d7a0
JD
15389{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15390echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15392 echo $ECHO_N "(cached) $ECHO_C" >&6
15393else
edfaf76d 15394 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15395fi
ca81d7a0
JD
15396ac_res=`eval echo '${'$as_ac_Header'}'`
15397 { echo "$as_me:$LINENO: result: $ac_res" >&5
15398echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15399
15400fi
98418dba 15401if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15402 cat >>confdefs.h <<_ACEOF
98418dba 15403#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15404_ACEOF
48d4b120 15405
ba4481b5 15406fi
c0d27fcc 15407
98418dba
CW
15408done
15409
c0d27fcc
MR
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
22044edf
DL
15465
15466
c0d27fcc 15467
b0e44248
RB
15468
15469
973a76b1
DL
15470
15471
15472
cd958eb3 15473
25ca0bca 15474
ea92fc9f 15475
e2fcf543 15476
190956b3 15477
80aa0171 15478
c0d27fcc
MR
15479
15480
98418dba 15481for ac_func in gethostname getdomainname dup2 \
e2fcf543 15482rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
15483random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
15484strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
80aa0171 15485utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15486__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15487sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15488gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15489memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15490do
15491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15492{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15493echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15494if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15495 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15496else
503d2be0 15497 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15498/* confdefs.h. */
15499_ACEOF
15500cat confdefs.h >>conftest.$ac_ext
15501cat >>conftest.$ac_ext <<_ACEOF
15502/* end confdefs.h. */
edfaf76d
LK
15503/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15504 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15505#define $ac_func innocuous_$ac_func
15506
98418dba 15507/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15508 which can conflict with char $ac_func (); below.
15509 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15510 <limits.h> exists even on freestanding compilers. */
edfaf76d 15511
19650fd6
AS
15512#ifdef __STDC__
15513# include <limits.h>
15514#else
15515# include <assert.h>
15516#endif
edfaf76d
LK
15517
15518#undef $ac_func
15519
ca81d7a0
JD
15520/* Override any GCC internal prototype to avoid an error.
15521 Use char because int might match the return type of a GCC
15522 builtin and then its argument prototype would still apply. */
503d2be0
AS
15523#ifdef __cplusplus
15524extern "C"
15525#endif
98418dba 15526char $ac_func ();
98418dba
CW
15527/* The GNU C library defines this for functions which it implements
15528 to always fail with ENOSYS. Some functions are actually named
15529 something starting with __ and the normal name is an alias. */
ca81d7a0 15530#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15531choke me
98418dba
CW
15532#endif
15533
19650fd6
AS
15534int
15535main ()
15536{
ca81d7a0 15537return $ac_func ();
503d2be0
AS
15538 ;
15539 return 0;
15540}
15541_ACEOF
15542rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15543if { (ac_try="$ac_link"
15544case "(($ac_try" in
15545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15546 *) ac_try_echo=$ac_try;;
15547esac
15548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15549 (eval "$ac_link") 2>conftest.er1
503d2be0 15550 ac_status=$?
edfaf76d
LK
15551 grep -v '^ *+' conftest.er1 >conftest.err
15552 rm -f conftest.er1
15553 cat conftest.err >&5
c0d27fcc 15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15555 (exit $ac_status); } && {
15556 test -z "$ac_c_werror_flag" ||
15557 test ! -s conftest.err
15558 } && test -s conftest$ac_exeext &&
15559 $as_test_x conftest$ac_exeext; then
98418dba 15560 eval "$as_ac_var=yes"
503d2be0
AS
15561else
15562 echo "$as_me: failed program was:" >&5
19650fd6
AS
15563sed 's/^/| /' conftest.$ac_ext >&5
15564
ca81d7a0 15565 eval "$as_ac_var=no"
503d2be0 15566fi
ca81d7a0 15567
f053c89f 15568rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15569 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15570fi
ca81d7a0
JD
15571ac_res=`eval echo '${'$as_ac_var'}'`
15572 { echo "$as_me:$LINENO: result: $ac_res" >&5
15573echo "${ECHO_T}$ac_res" >&6; }
98418dba 15574if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15575 cat >>confdefs.h <<_ACEOF
98418dba 15576#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15577_ACEOF
ba4481b5 15578
ba4481b5 15579fi
98418dba 15580done
ba4481b5 15581
c0d27fcc
MR
15582
15583
98418dba
CW
15584for ac_header in sys/un.h
15585do
15586as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15588 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15589echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15590if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15591 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15592fi
ca81d7a0
JD
15593ac_res=`eval echo '${'$as_ac_Header'}'`
15594 { echo "$as_me:$LINENO: result: $ac_res" >&5
15595echo "${ECHO_T}$ac_res" >&6; }
98418dba 15596else
c0d27fcc 15597 # Is the header compilable?
ca81d7a0
JD
15598{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15599echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15601/* confdefs.h. */
15602_ACEOF
15603cat confdefs.h >>conftest.$ac_ext
15604cat >>conftest.$ac_ext <<_ACEOF
15605/* end confdefs.h. */
c0d27fcc
MR
15606$ac_includes_default
15607#include <$ac_header>
15608_ACEOF
15609rm -f conftest.$ac_objext
ca81d7a0
JD
15610if { (ac_try="$ac_compile"
15611case "(($ac_try" in
15612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15613 *) ac_try_echo=$ac_try;;
15614esac
15615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15616 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15617 ac_status=$?
edfaf76d
LK
15618 grep -v '^ *+' conftest.er1 >conftest.err
15619 rm -f conftest.er1
15620 cat conftest.err >&5
c0d27fcc 15621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15622 (exit $ac_status); } && {
15623 test -z "$ac_c_werror_flag" ||
15624 test ! -s conftest.err
15625 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15626 ac_header_compiler=yes
15627else
15628 echo "$as_me: failed program was:" >&5
19650fd6
AS
15629sed 's/^/| /' conftest.$ac_ext >&5
15630
ca81d7a0 15631 ac_header_compiler=no
c0d27fcc 15632fi
ca81d7a0
JD
15633
15634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15635{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15636echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15637
15638# Is the header present?
ca81d7a0
JD
15639{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15640echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15641cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15642/* confdefs.h. */
15643_ACEOF
15644cat confdefs.h >>conftest.$ac_ext
15645cat >>conftest.$ac_ext <<_ACEOF
15646/* end confdefs.h. */
98418dba 15647#include <$ac_header>
503d2be0 15648_ACEOF
ca81d7a0
JD
15649if { (ac_try="$ac_cpp conftest.$ac_ext"
15650case "(($ac_try" in
15651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15652 *) ac_try_echo=$ac_try;;
15653esac
15654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15655 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15656 ac_status=$?
6bae0ccf 15657 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15658 rm -f conftest.er1
15659 cat conftest.err >&5
c0d27fcc 15660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15661 (exit $ac_status); } >/dev/null && {
15662 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15663 test ! -s conftest.err
15664 }; then
c0d27fcc 15665 ac_header_preproc=yes
ba4481b5 15666else
503d2be0 15667 echo "$as_me: failed program was:" >&5
19650fd6
AS
15668sed 's/^/| /' conftest.$ac_ext >&5
15669
c0d27fcc 15670 ac_header_preproc=no
ba4481b5 15671fi
ca81d7a0 15672
503d2be0 15673rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15674{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15675echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15676
15677# So? What about this header?
edfaf76d
LK
15678case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15679 yes:no: )
c0d27fcc
MR
15680 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15681echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15682 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15683echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15684 ac_header_preproc=yes
19650fd6 15685 ;;
edfaf76d 15686 no:yes:* )
c0d27fcc
MR
15687 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15688echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15689 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15690echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15691 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15692echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15693 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15694echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15695 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15696echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15697 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15698echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15699
19650fd6 15700 ;;
c0d27fcc 15701esac
ca81d7a0
JD
15702{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15704if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15705 echo $ECHO_N "(cached) $ECHO_C" >&6
15706else
edfaf76d 15707 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15708fi
ca81d7a0
JD
15709ac_res=`eval echo '${'$as_ac_Header'}'`
15710 { echo "$as_me:$LINENO: result: $ac_res" >&5
15711echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15712
15713fi
925c2f3f 15714if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15715 cat >>confdefs.h <<_ACEOF
925c2f3f 15716#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15717_ACEOF
503d2be0 15718
925c2f3f 15719fi
c0d27fcc 15720
925c2f3f
EZ
15721done
15722
c0d27fcc
MR
15723
15724
15725
edfaf76d 15726
f053c89f
CY
15727
15728for ac_header in $ac_header_list
925c2f3f
EZ
15729do
15730as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15731if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15732 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15733echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15734if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15735 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15736fi
ca81d7a0
JD
15737ac_res=`eval echo '${'$as_ac_Header'}'`
15738 { echo "$as_me:$LINENO: result: $ac_res" >&5
15739echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15740else
c0d27fcc 15741 # Is the header compilable?
ca81d7a0
JD
15742{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15743echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15744cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15745/* confdefs.h. */
15746_ACEOF
15747cat confdefs.h >>conftest.$ac_ext
15748cat >>conftest.$ac_ext <<_ACEOF
15749/* end confdefs.h. */
c0d27fcc
MR
15750$ac_includes_default
15751#include <$ac_header>
15752_ACEOF
15753rm -f conftest.$ac_objext
ca81d7a0
JD
15754if { (ac_try="$ac_compile"
15755case "(($ac_try" in
15756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15757 *) ac_try_echo=$ac_try;;
15758esac
15759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15760 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15761 ac_status=$?
edfaf76d
LK
15762 grep -v '^ *+' conftest.er1 >conftest.err
15763 rm -f conftest.er1
15764 cat conftest.err >&5
c0d27fcc 15765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15766 (exit $ac_status); } && {
15767 test -z "$ac_c_werror_flag" ||
15768 test ! -s conftest.err
15769 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15770 ac_header_compiler=yes
15771else
15772 echo "$as_me: failed program was:" >&5
19650fd6
AS
15773sed 's/^/| /' conftest.$ac_ext >&5
15774
ca81d7a0 15775 ac_header_compiler=no
c0d27fcc 15776fi
ca81d7a0
JD
15777
15778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15779{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15780echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15781
15782# Is the header present?
ca81d7a0
JD
15783{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15784echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15785cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15786/* confdefs.h. */
15787_ACEOF
15788cat confdefs.h >>conftest.$ac_ext
15789cat >>conftest.$ac_ext <<_ACEOF
15790/* end confdefs.h. */
98418dba 15791#include <$ac_header>
503d2be0 15792_ACEOF
ca81d7a0
JD
15793if { (ac_try="$ac_cpp conftest.$ac_ext"
15794case "(($ac_try" in
15795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15796 *) ac_try_echo=$ac_try;;
15797esac
15798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15799 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15800 ac_status=$?
6bae0ccf 15801 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15802 rm -f conftest.er1
15803 cat conftest.err >&5
c0d27fcc 15804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15805 (exit $ac_status); } >/dev/null && {
15806 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15807 test ! -s conftest.err
15808 }; then
c0d27fcc 15809 ac_header_preproc=yes
98418dba
CW
15810else
15811 echo "$as_me: failed program was:" >&5
19650fd6
AS
15812sed 's/^/| /' conftest.$ac_ext >&5
15813
c0d27fcc 15814 ac_header_preproc=no
98418dba 15815fi
ca81d7a0 15816
98418dba 15817rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15818{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15819echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15820
15821# So? What about this header?
edfaf76d
LK
15822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15823 yes:no: )
c0d27fcc
MR
15824 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15825echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15826 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15827echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15828 ac_header_preproc=yes
19650fd6 15829 ;;
edfaf76d 15830 no:yes:* )
c0d27fcc
MR
15831 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15832echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15833 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15834echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15836echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15838echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15840echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15841 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15842echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15843
19650fd6 15844 ;;
c0d27fcc 15845esac
ca81d7a0
JD
15846{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15847echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15848if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15849 echo $ECHO_N "(cached) $ECHO_C" >&6
15850else
edfaf76d 15851 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 15852fi
ca81d7a0
JD
15853ac_res=`eval echo '${'$as_ac_Header'}'`
15854 { echo "$as_me:$LINENO: result: $ac_res" >&5
15855echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15856
15857fi
98418dba 15858if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15859 cat >>confdefs.h <<_ACEOF
98418dba 15860#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15861_ACEOF
98418dba
CW
15862
15863fi
c0d27fcc 15864
98418dba
CW
15865done
15866
c0d27fcc 15867
f053c89f
CY
15868
15869
15870
15871
15872
15873
15874
15875for ac_func in $ac_func_list
98418dba
CW
15876do
15877as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15878{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15879echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15880if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15881 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15882else
98418dba 15883 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15884/* confdefs.h. */
15885_ACEOF
15886cat confdefs.h >>conftest.$ac_ext
15887cat >>conftest.$ac_ext <<_ACEOF
15888/* end confdefs.h. */
edfaf76d
LK
15889/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15890 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15891#define $ac_func innocuous_$ac_func
15892
98418dba 15893/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15894 which can conflict with char $ac_func (); below.
15895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15896 <limits.h> exists even on freestanding compilers. */
edfaf76d 15897
19650fd6
AS
15898#ifdef __STDC__
15899# include <limits.h>
15900#else
15901# include <assert.h>
15902#endif
edfaf76d
LK
15903
15904#undef $ac_func
15905
ca81d7a0
JD
15906/* Override any GCC internal prototype to avoid an error.
15907 Use char because int might match the return type of a GCC
15908 builtin and then its argument prototype would still apply. */
503d2be0
AS
15909#ifdef __cplusplus
15910extern "C"
15911#endif
98418dba 15912char $ac_func ();
98418dba
CW
15913/* The GNU C library defines this for functions which it implements
15914 to always fail with ENOSYS. Some functions are actually named
15915 something starting with __ and the normal name is an alias. */
ca81d7a0 15916#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15917choke me
98418dba
CW
15918#endif
15919
19650fd6
AS
15920int
15921main ()
15922{
ca81d7a0 15923return $ac_func ();
503d2be0
AS
15924 ;
15925 return 0;
15926}
15927_ACEOF
15928rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15929if { (ac_try="$ac_link"
15930case "(($ac_try" in
15931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15932 *) ac_try_echo=$ac_try;;
15933esac
15934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15935 (eval "$ac_link") 2>conftest.er1
503d2be0 15936 ac_status=$?
edfaf76d
LK
15937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
c0d27fcc 15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15941 (exit $ac_status); } && {
15942 test -z "$ac_c_werror_flag" ||
15943 test ! -s conftest.err
15944 } && test -s conftest$ac_exeext &&
15945 $as_test_x conftest$ac_exeext; then
98418dba 15946 eval "$as_ac_var=yes"
503d2be0
AS
15947else
15948 echo "$as_me: failed program was:" >&5
19650fd6
AS
15949sed 's/^/| /' conftest.$ac_ext >&5
15950
ca81d7a0 15951 eval "$as_ac_var=no"
503d2be0 15952fi
ca81d7a0 15953
f053c89f 15954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15955 conftest$ac_exeext conftest.$ac_ext
ffe36136 15956fi
ca81d7a0
JD
15957ac_res=`eval echo '${'$as_ac_var'}'`
15958 { echo "$as_me:$LINENO: result: $ac_res" >&5
15959echo "${ECHO_T}$ac_res" >&6; }
98418dba 15960if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15961 cat >>confdefs.h <<_ACEOF
98418dba 15962#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15963_ACEOF
ffe36136 15964
ba4481b5 15965fi
98418dba 15966done
ba4481b5 15967
f053c89f
CY
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
ca81d7a0
JD
15984{ echo "$as_me:$LINENO: checking for working mktime" >&5
15985echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
15986if test "${ac_cv_func_working_mktime+set}" = set; then
15987 echo $ECHO_N "(cached) $ECHO_C" >&6
15988else
15989 if test "$cross_compiling" = yes; then
15990 ac_cv_func_working_mktime=no
15991else
15992 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15993/* confdefs.h. */
15994_ACEOF
15995cat confdefs.h >>conftest.$ac_ext
15996cat >>conftest.$ac_ext <<_ACEOF
15997/* end confdefs.h. */
98418dba 15998/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 15999#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16000# include <sys/time.h>
16001# include <time.h>
16002#else
f053c89f 16003# ifdef HAVE_SYS_TIME_H
98418dba
CW
16004# include <sys/time.h>
16005# else
16006# include <time.h>
16007# endif
16008#endif
ba4481b5 16009
f053c89f 16010#include <stdlib.h>
edfaf76d 16011
f053c89f 16012#ifdef HAVE_UNISTD_H
98418dba
CW
16013# include <unistd.h>
16014#endif
ba4481b5 16015
f053c89f 16016#ifndef HAVE_ALARM
98418dba
CW
16017# define alarm(X) /* empty */
16018#endif
df645f7c 16019
98418dba
CW
16020/* Work around redefinition to rpl_putenv by other config tests. */
16021#undef putenv
df645f7c 16022
98418dba 16023static time_t time_t_max;
edfaf76d 16024static time_t time_t_min;
df645f7c 16025
98418dba 16026/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16027static char *tz_strings[] = {
16028 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16029 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16030};
16031#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16032
ca81d7a0 16033/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16034 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16035static int
98418dba
CW
16036spring_forward_gap ()
16037{
16038 /* glibc (up to about 1998-10-07) failed this test. */
16039 struct tm tm;
16040
16041 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16042 instead of "TZ=America/Vancouver" in order to detect the bug even
16043 on systems that don't support the Olson extension, or don't have the
16044 full zoneinfo tables installed. */
16045 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16046
16047 tm.tm_year = 98;
16048 tm.tm_mon = 3;
16049 tm.tm_mday = 5;
16050 tm.tm_hour = 2;
16051 tm.tm_min = 0;
16052 tm.tm_sec = 0;
16053 tm.tm_isdst = -1;
ca81d7a0 16054 return mktime (&tm) != (time_t) -1;
98418dba
CW
16055}
16056
ca81d7a0 16057static int
edfaf76d 16058mktime_test1 (now)
98418dba
CW
16059 time_t now;
16060{
16061 struct tm *lt;
ca81d7a0 16062 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16063}
16064
ca81d7a0 16065static int
edfaf76d
LK
16066mktime_test (now)
16067 time_t now;
16068{
ca81d7a0
JD
16069 return (mktime_test1 (now)
16070 && mktime_test1 ((time_t) (time_t_max - now))
16071 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16072}
16073
ca81d7a0 16074static int
98418dba
CW
16075irix_6_4_bug ()
16076{
16077 /* Based on code from Ariel Faigon. */
16078 struct tm tm;
16079 tm.tm_year = 96;
16080 tm.tm_mon = 3;
16081 tm.tm_mday = 0;
16082 tm.tm_hour = 0;
16083 tm.tm_min = 0;
16084 tm.tm_sec = 0;
16085 tm.tm_isdst = -1;
16086 mktime (&tm);
ca81d7a0 16087 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16088}
16089
ca81d7a0 16090static int
98418dba
CW
16091bigtime_test (j)
16092 int j;
16093{
16094 struct tm tm;
16095 time_t now;
16096 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16097 now = mktime (&tm);
16098 if (now != (time_t) -1)
16099 {
16100 struct tm *lt = localtime (&now);
16101 if (! (lt
16102 && lt->tm_year == tm.tm_year
16103 && lt->tm_mon == tm.tm_mon
16104 && lt->tm_mday == tm.tm_mday
16105 && lt->tm_hour == tm.tm_hour
16106 && lt->tm_min == tm.tm_min
16107 && lt->tm_sec == tm.tm_sec
16108 && lt->tm_yday == tm.tm_yday
16109 && lt->tm_wday == tm.tm_wday
16110 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16111 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16112 return 0;
98418dba 16113 }
ca81d7a0 16114 return 1;
98418dba
CW
16115}
16116
f053c89f
CY
16117static int
16118year_2050_test ()
16119{
16120 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16121 ignoring leap seconds. */
16122 unsigned long int answer = 2527315200UL;
16123
16124 struct tm tm;
16125 time_t t;
16126 tm.tm_year = 2050 - 1900;
16127 tm.tm_mon = 2 - 1;
16128 tm.tm_mday = 1;
16129 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16130 tm.tm_isdst = -1;
16131
16132 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16133 instead of "TZ=America/Vancouver" in order to detect the bug even
16134 on systems that don't support the Olson extension, or don't have the
16135 full zoneinfo tables installed. */
16136 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16137
16138 t = mktime (&tm);
16139
16140 /* Check that the result is either a failure, or close enough
16141 to the correct answer that we can assume the discrepancy is
16142 due to leap seconds. */
16143 return (t == (time_t) -1
16144 || (0 < t && answer - 120 <= t && t <= answer + 120));
16145}
16146
98418dba
CW
16147int
16148main ()
16149{
16150 time_t t, delta;
16151 int i, j;
16152
16153 /* This test makes some buggy mktime implementations loop.
16154 Give up after 60 seconds; a mktime slower than that
16155 isn't worth using anyway. */
16156 alarm (60);
16157
16158 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16159 continue;
16160 time_t_max--;
edfaf76d
LK
16161 if ((time_t) -1 < 0)
16162 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16163 continue;
98418dba
CW
16164 delta = time_t_max / 997; /* a suitable prime number */
16165 for (i = 0; i < N_STRINGS; i++)
16166 {
16167 if (tz_strings[i])
16168 putenv (tz_strings[i]);
503d2be0 16169
98418dba 16170 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16171 if (! mktime_test (t))
16172 return 1;
16173 if (! (mktime_test ((time_t) 1)
16174 && mktime_test ((time_t) (60 * 60))
16175 && mktime_test ((time_t) (60 * 60 * 24))))
16176 return 1;
98418dba
CW
16177
16178 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
16179 if (! bigtime_test (j))
16180 return 1;
16181 if (! bigtime_test (j - 1))
16182 return 1;
98418dba 16183 }
f053c89f 16184 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16185}
16186_ACEOF
98418dba 16187rm -f conftest$ac_exeext
ca81d7a0
JD
16188if { (ac_try="$ac_link"
16189case "(($ac_try" in
16190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16191 *) ac_try_echo=$ac_try;;
16192esac
16193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16194 (eval "$ac_link") 2>&5
503d2be0 16195 ac_status=$?
c0d27fcc 16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16198 { (case "(($ac_try" in
16199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16200 *) ac_try_echo=$ac_try;;
16201esac
16202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16203 (eval "$ac_try") 2>&5
503d2be0 16204 ac_status=$?
c0d27fcc 16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16206 (exit $ac_status); }; }; then
98418dba 16207 ac_cv_func_working_mktime=yes
503d2be0 16208else
98418dba
CW
16209 echo "$as_me: program exited with status $ac_status" >&5
16210echo "$as_me: failed program was:" >&5
19650fd6
AS
16211sed 's/^/| /' conftest.$ac_ext >&5
16212
c0d27fcc 16213( exit $ac_status )
98418dba 16214ac_cv_func_working_mktime=no
503d2be0 16215fi
ca81d7a0 16216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16217fi
ca81d7a0
JD
16218
16219
ba4481b5 16220fi
ca81d7a0
JD
16221{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16222echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16223if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16224 case " $LIBOBJS " in
edfaf76d 16225 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16226 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16227 ;;
edfaf76d
LK
16228esac
16229
ba4481b5
DL
16230fi
16231
98418dba 16232if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16233
c0d27fcc 16234cat >>confdefs.h <<\_ACEOF
98418dba 16235#define BROKEN_MKTIME 1
c0d27fcc 16236_ACEOF
ba4481b5 16237
ba4481b5 16238fi
503d2be0 16239
98418dba
CW
16240ac_have_func=no # yes means we've found a way to get the load average.
16241
6bae0ccf
DL
16242# Make sure getloadavg.c is where it belongs, at configure-time.
16243test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16244 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16245echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16246 { (exit 1); exit 1; }; }
16247
98418dba
CW
16248ac_save_LIBS=$LIBS
16249
16250# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16251({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16252echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16253if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16254 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16255else
503d2be0 16256 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16257/* confdefs.h. */
16258_ACEOF
16259cat confdefs.h >>conftest.$ac_ext
16260cat >>conftest.$ac_ext <<_ACEOF
16261/* end confdefs.h. */
edfaf76d
LK
16262/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16264#define getloadavg innocuous_getloadavg
16265
98418dba 16266/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16267 which can conflict with char getloadavg (); below.
16268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16269 <limits.h> exists even on freestanding compilers. */
edfaf76d 16270
19650fd6
AS
16271#ifdef __STDC__
16272# include <limits.h>
16273#else
16274# include <assert.h>
16275#endif
edfaf76d
LK
16276
16277#undef getloadavg
16278
ca81d7a0
JD
16279/* Override any GCC internal prototype to avoid an error.
16280 Use char because int might match the return type of a GCC
16281 builtin and then its argument prototype would still apply. */
503d2be0
AS
16282#ifdef __cplusplus
16283extern "C"
16284#endif
98418dba 16285char getloadavg ();
98418dba
CW
16286/* The GNU C library defines this for functions which it implements
16287 to always fail with ENOSYS. Some functions are actually named
16288 something starting with __ and the normal name is an alias. */
ca81d7a0 16289#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16290choke me
cd958eb3
MB
16291#endif
16292
19650fd6
AS
16293int
16294main ()
16295{
ca81d7a0 16296return getloadavg ();
503d2be0
AS
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16302if { (ac_try="$ac_link"
16303case "(($ac_try" in
16304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16305 *) ac_try_echo=$ac_try;;
16306esac
16307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16308 (eval "$ac_link") 2>conftest.er1
503d2be0 16309 ac_status=$?
edfaf76d
LK
16310 grep -v '^ *+' conftest.er1 >conftest.err
16311 rm -f conftest.er1
16312 cat conftest.err >&5
c0d27fcc 16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16314 (exit $ac_status); } && {
16315 test -z "$ac_c_werror_flag" ||
16316 test ! -s conftest.err
16317 } && test -s conftest$ac_exeext &&
16318 $as_test_x conftest$ac_exeext; then
98418dba 16319 ac_cv_func_getloadavg=yes
503d2be0
AS
16320else
16321 echo "$as_me: failed program was:" >&5
19650fd6
AS
16322sed 's/^/| /' conftest.$ac_ext >&5
16323
ca81d7a0 16324 ac_cv_func_getloadavg=no
503d2be0 16325fi
ca81d7a0 16326
f053c89f 16327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16328 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16329fi
ca81d7a0
JD
16330{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16331echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16332if test $ac_cv_func_getloadavg = yes; then
16333 exit 0
16334else
16335 exit 1
ba4481b5 16336fi
98418dba 16337) && ac_have_func=yes
ba4481b5 16338
98418dba 16339# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16340
98418dba
CW
16341for ac_func in pstat_getdynamic
16342do
16343as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16344{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16345echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16346if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16347 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16348else
503d2be0 16349 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16350/* confdefs.h. */
16351_ACEOF
16352cat confdefs.h >>conftest.$ac_ext
16353cat >>conftest.$ac_ext <<_ACEOF
16354/* end confdefs.h. */
edfaf76d
LK
16355/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16356 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16357#define $ac_func innocuous_$ac_func
16358
98418dba 16359/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16360 which can conflict with char $ac_func (); below.
16361 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16362 <limits.h> exists even on freestanding compilers. */
edfaf76d 16363
19650fd6
AS
16364#ifdef __STDC__
16365# include <limits.h>
16366#else
16367# include <assert.h>
16368#endif
edfaf76d
LK
16369
16370#undef $ac_func
16371
ca81d7a0
JD
16372/* Override any GCC internal prototype to avoid an error.
16373 Use char because int might match the return type of a GCC
16374 builtin and then its argument prototype would still apply. */
503d2be0
AS
16375#ifdef __cplusplus
16376extern "C"
16377#endif
98418dba 16378char $ac_func ();
98418dba
CW
16379/* The GNU C library defines this for functions which it implements
16380 to always fail with ENOSYS. Some functions are actually named
16381 something starting with __ and the normal name is an alias. */
ca81d7a0 16382#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16383choke me
98418dba
CW
16384#endif
16385
19650fd6
AS
16386int
16387main ()
16388{
ca81d7a0 16389return $ac_func ();
98418dba
CW
16390 ;
16391 return 0;
16392}
f21fadcc 16393_ACEOF
98418dba 16394rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16395if { (ac_try="$ac_link"
16396case "(($ac_try" in
16397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16398 *) ac_try_echo=$ac_try;;
16399esac
16400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16401 (eval "$ac_link") 2>conftest.er1
f21fadcc 16402 ac_status=$?
edfaf76d
LK
16403 grep -v '^ *+' conftest.er1 >conftest.err
16404 rm -f conftest.er1
16405 cat conftest.err >&5
c0d27fcc 16406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16407 (exit $ac_status); } && {
16408 test -z "$ac_c_werror_flag" ||
16409 test ! -s conftest.err
16410 } && test -s conftest$ac_exeext &&
16411 $as_test_x conftest$ac_exeext; then
98418dba 16412 eval "$as_ac_var=yes"
f21fadcc
JD
16413else
16414 echo "$as_me: failed program was:" >&5
19650fd6
AS
16415sed 's/^/| /' conftest.$ac_ext >&5
16416
ca81d7a0 16417 eval "$as_ac_var=no"
f21fadcc 16418fi
ca81d7a0 16419
f053c89f 16420rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16421 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16422fi
ca81d7a0
JD
16423ac_res=`eval echo '${'$as_ac_var'}'`
16424 { echo "$as_me:$LINENO: result: $ac_res" >&5
16425echo "${ECHO_T}$ac_res" >&6; }
98418dba 16426if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16427 cat >>confdefs.h <<_ACEOF
98418dba 16428#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16429_ACEOF
98418dba
CW
16430
16431fi
16432done
16433
c0d27fcc 16434
98418dba
CW
16435# Solaris has libkstat which does not require root.
16436
ca81d7a0
JD
16437{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16438echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16439if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16440 echo $ECHO_N "(cached) $ECHO_C" >&6
16441else
16442 ac_check_lib_save_LIBS=$LIBS
98418dba 16443LIBS="-lkstat $LIBS"
f21fadcc 16444cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16445/* confdefs.h. */
16446_ACEOF
16447cat confdefs.h >>conftest.$ac_ext
16448cat >>conftest.$ac_ext <<_ACEOF
16449/* end confdefs.h. */
f21fadcc 16450
ca81d7a0
JD
16451/* Override any GCC internal prototype to avoid an error.
16452 Use char because int might match the return type of a GCC
16453 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16454#ifdef __cplusplus
16455extern "C"
16456#endif
98418dba 16457char kstat_open ();
f21fadcc
JD
16458int
16459main ()
16460{
ca81d7a0 16461return kstat_open ();
f21fadcc
JD
16462 ;
16463 return 0;
16464}
16465_ACEOF
16466rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16467if { (ac_try="$ac_link"
16468case "(($ac_try" in
16469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16470 *) ac_try_echo=$ac_try;;
16471esac
16472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16473 (eval "$ac_link") 2>conftest.er1
f21fadcc 16474 ac_status=$?
edfaf76d
LK
16475 grep -v '^ *+' conftest.er1 >conftest.err
16476 rm -f conftest.er1
16477 cat conftest.err >&5
c0d27fcc 16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16479 (exit $ac_status); } && {
16480 test -z "$ac_c_werror_flag" ||
16481 test ! -s conftest.err
16482 } && test -s conftest$ac_exeext &&
16483 $as_test_x conftest$ac_exeext; then
98418dba 16484 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16485else
16486 echo "$as_me: failed program was:" >&5
19650fd6
AS
16487sed 's/^/| /' conftest.$ac_ext >&5
16488
ca81d7a0 16489 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16490fi
ca81d7a0 16491
f053c89f 16492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16493 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16494LIBS=$ac_check_lib_save_LIBS
16495fi
ca81d7a0
JD
16496{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16497echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16498if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16499 cat >>confdefs.h <<_ACEOF
98418dba 16500#define HAVE_LIBKSTAT 1
c0d27fcc 16501_ACEOF
f21fadcc 16502
98418dba 16503 LIBS="-lkstat $LIBS"
f21fadcc 16504
f21fadcc
JD
16505fi
16506
98418dba
CW
16507test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16508
16509# Some systems with -lutil have (and need) -lkvm as well, some do not.
16510# On Solaris, -lkvm requires nlist from -lelf, so check that first
16511# to get the right answer into the cache.
16512# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16513if test $ac_have_func = no; then
ca81d7a0
JD
16514 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16515echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16516if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16517 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16518else
98418dba
CW
16519 ac_check_lib_save_LIBS=$LIBS
16520LIBS="-lelf $LIBS"
16521cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
98418dba 16527
ca81d7a0
JD
16528/* Override any GCC internal prototype to avoid an error.
16529 Use char because int might match the return type of a GCC
16530 builtin and then its argument prototype would still apply. */
98418dba
CW
16531#ifdef __cplusplus
16532extern "C"
16533#endif
98418dba 16534char elf_begin ();
503d2be0
AS
16535int
16536main ()
16537{
ca81d7a0 16538return elf_begin ();
503d2be0
AS
16539 ;
16540 return 0;
16541}
16542_ACEOF
16543rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16544if { (ac_try="$ac_link"
16545case "(($ac_try" in
16546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16547 *) ac_try_echo=$ac_try;;
16548esac
16549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16550 (eval "$ac_link") 2>conftest.er1
503d2be0 16551 ac_status=$?
edfaf76d
LK
16552 grep -v '^ *+' conftest.er1 >conftest.err
16553 rm -f conftest.er1
16554 cat conftest.err >&5
c0d27fcc 16555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16556 (exit $ac_status); } && {
16557 test -z "$ac_c_werror_flag" ||
16558 test ! -s conftest.err
16559 } && test -s conftest$ac_exeext &&
16560 $as_test_x conftest$ac_exeext; then
98418dba 16561 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16562else
503d2be0 16563 echo "$as_me: failed program was:" >&5
19650fd6
AS
16564sed 's/^/| /' conftest.$ac_ext >&5
16565
ca81d7a0 16566 ac_cv_lib_elf_elf_begin=no
ba4481b5 16567fi
ca81d7a0 16568
f053c89f 16569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16570 conftest$ac_exeext conftest.$ac_ext
98418dba 16571LIBS=$ac_check_lib_save_LIBS
ba4481b5 16572fi
ca81d7a0
JD
16573{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16574echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16575if test $ac_cv_lib_elf_elf_begin = yes; then
16576 LIBS="-lelf $LIBS"
ba4481b5
DL
16577fi
16578
98418dba
CW
16579fi
16580if test $ac_have_func = no; then
ca81d7a0
JD
16581 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16582echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16583if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16584 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16585else
98418dba
CW
16586 ac_check_lib_save_LIBS=$LIBS
16587LIBS="-lkvm $LIBS"
16588cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16589/* confdefs.h. */
16590_ACEOF
16591cat confdefs.h >>conftest.$ac_ext
16592cat >>conftest.$ac_ext <<_ACEOF
16593/* end confdefs.h. */
98418dba 16594
ca81d7a0
JD
16595/* Override any GCC internal prototype to avoid an error.
16596 Use char because int might match the return type of a GCC
16597 builtin and then its argument prototype would still apply. */
98418dba
CW
16598#ifdef __cplusplus
16599extern "C"
16600#endif
98418dba 16601char kvm_open ();
503d2be0
AS
16602int
16603main ()
16604{
ca81d7a0 16605return kvm_open ();
503d2be0
AS
16606 ;
16607 return 0;
16608}
16609_ACEOF
16610rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16611if { (ac_try="$ac_link"
16612case "(($ac_try" in
16613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16614 *) ac_try_echo=$ac_try;;
16615esac
16616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16617 (eval "$ac_link") 2>conftest.er1
503d2be0 16618 ac_status=$?
edfaf76d
LK
16619 grep -v '^ *+' conftest.er1 >conftest.err
16620 rm -f conftest.er1
16621 cat conftest.err >&5
c0d27fcc 16622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16623 (exit $ac_status); } && {
16624 test -z "$ac_c_werror_flag" ||
16625 test ! -s conftest.err
16626 } && test -s conftest$ac_exeext &&
16627 $as_test_x conftest$ac_exeext; then
98418dba 16628 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16629else
16630 echo "$as_me: failed program was:" >&5
19650fd6
AS
16631sed 's/^/| /' conftest.$ac_ext >&5
16632
ca81d7a0 16633 ac_cv_lib_kvm_kvm_open=no
503d2be0 16634fi
ca81d7a0 16635
f053c89f 16636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16637 conftest$ac_exeext conftest.$ac_ext
98418dba 16638LIBS=$ac_check_lib_save_LIBS
503d2be0 16639fi
ca81d7a0
JD
16640{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16641echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16642if test $ac_cv_lib_kvm_kvm_open = yes; then
16643 LIBS="-lkvm $LIBS"
ba4481b5
DL
16644fi
16645
98418dba 16646 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
16647 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16648echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16649if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16650 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16651else
98418dba
CW
16652 ac_check_lib_save_LIBS=$LIBS
16653LIBS="-lutil $LIBS"
16654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16655/* confdefs.h. */
16656_ACEOF
16657cat confdefs.h >>conftest.$ac_ext
16658cat >>conftest.$ac_ext <<_ACEOF
16659/* end confdefs.h. */
98418dba 16660
ca81d7a0
JD
16661/* Override any GCC internal prototype to avoid an error.
16662 Use char because int might match the return type of a GCC
16663 builtin and then its argument prototype would still apply. */
98418dba
CW
16664#ifdef __cplusplus
16665extern "C"
16666#endif
98418dba 16667char getloadavg ();
503d2be0
AS
16668int
16669main ()
16670{
ca81d7a0 16671return getloadavg ();
503d2be0
AS
16672 ;
16673 return 0;
16674}
16675_ACEOF
16676rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16677if { (ac_try="$ac_link"
16678case "(($ac_try" in
16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16680 *) ac_try_echo=$ac_try;;
16681esac
16682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16683 (eval "$ac_link") 2>conftest.er1
503d2be0 16684 ac_status=$?
edfaf76d
LK
16685 grep -v '^ *+' conftest.er1 >conftest.err
16686 rm -f conftest.er1
16687 cat conftest.err >&5
c0d27fcc 16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16689 (exit $ac_status); } && {
16690 test -z "$ac_c_werror_flag" ||
16691 test ! -s conftest.err
16692 } && test -s conftest$ac_exeext &&
16693 $as_test_x conftest$ac_exeext; then
35996d22
AS
16694 ac_cv_lib_util_getloadavg=yes
16695else
503d2be0 16696 echo "$as_me: failed program was:" >&5
19650fd6
AS
16697sed 's/^/| /' conftest.$ac_ext >&5
16698
ca81d7a0 16699 ac_cv_lib_util_getloadavg=no
ba4481b5 16700fi
ca81d7a0 16701
f053c89f 16702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16703 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16704LIBS=$ac_check_lib_save_LIBS
16705fi
ca81d7a0
JD
16706{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16707echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16708if test $ac_cv_lib_util_getloadavg = yes; then
16709 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16710fi
503d2be0 16711
98418dba 16712fi
ba4481b5 16713
98418dba
CW
16714if test $ac_have_func = no; then
16715 # There is a commonly available library for RS/6000 AIX.
16716 # Since it is not a standard part of AIX, it might be installed locally.
16717 ac_getloadavg_LIBS=$LIBS
16718 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
16719 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16720echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16721if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16722 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16723else
98418dba
CW
16724 ac_check_lib_save_LIBS=$LIBS
16725LIBS="-lgetloadavg $LIBS"
16726cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
ba4481b5 16732
ca81d7a0
JD
16733/* Override any GCC internal prototype to avoid an error.
16734 Use char because int might match the return type of a GCC
16735 builtin and then its argument prototype would still apply. */
98418dba
CW
16736#ifdef __cplusplus
16737extern "C"
16738#endif
98418dba 16739char getloadavg ();
98418dba
CW
16740int
16741main ()
16742{
ca81d7a0 16743return getloadavg ();
98418dba
CW
16744 ;
16745 return 0;
16746}
503d2be0 16747_ACEOF
98418dba 16748rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16749if { (ac_try="$ac_link"
16750case "(($ac_try" in
16751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16752 *) ac_try_echo=$ac_try;;
16753esac
16754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16755 (eval "$ac_link") 2>conftest.er1
98418dba 16756 ac_status=$?
edfaf76d
LK
16757 grep -v '^ *+' conftest.er1 >conftest.err
16758 rm -f conftest.er1
16759 cat conftest.err >&5
c0d27fcc 16760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16761 (exit $ac_status); } && {
16762 test -z "$ac_c_werror_flag" ||
16763 test ! -s conftest.err
16764 } && test -s conftest$ac_exeext &&
16765 $as_test_x conftest$ac_exeext; then
98418dba 16766 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16767else
98418dba 16768 echo "$as_me: failed program was:" >&5
19650fd6
AS
16769sed 's/^/| /' conftest.$ac_ext >&5
16770
ca81d7a0 16771 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16772fi
ca81d7a0 16773
f053c89f 16774rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16775 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16776LIBS=$ac_check_lib_save_LIBS
16777fi
ca81d7a0
JD
16778{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
16779echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
16780if test $ac_cv_lib_getloadavg_getloadavg = yes; then
16781 LIBS="-lgetloadavg $LIBS"
16782else
16783 LIBS=$ac_getloadavg_LIBS
ba4481b5 16784fi
ba4481b5
DL
16785
16786fi
98418dba
CW
16787
16788# Make sure it is really in the library, if we think we found it,
16789# otherwise set up the replacement function.
16790
16791for ac_func in getloadavg
16792do
16793as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16794{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16795echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16796if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16797 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16798else
503d2be0 16799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16800/* confdefs.h. */
16801_ACEOF
16802cat confdefs.h >>conftest.$ac_ext
16803cat >>conftest.$ac_ext <<_ACEOF
16804/* end confdefs.h. */
edfaf76d
LK
16805/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16807#define $ac_func innocuous_$ac_func
16808
ba4481b5 16809/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16810 which can conflict with char $ac_func (); below.
16811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16812 <limits.h> exists even on freestanding compilers. */
edfaf76d 16813
19650fd6
AS
16814#ifdef __STDC__
16815# include <limits.h>
16816#else
16817# include <assert.h>
16818#endif
edfaf76d
LK
16819
16820#undef $ac_func
16821
ca81d7a0
JD
16822/* Override any GCC internal prototype to avoid an error.
16823 Use char because int might match the return type of a GCC
16824 builtin and then its argument prototype would still apply. */
503d2be0
AS
16825#ifdef __cplusplus
16826extern "C"
16827#endif
503d2be0 16828char $ac_func ();
ba4481b5
DL
16829/* The GNU C library defines this for functions which it implements
16830 to always fail with ENOSYS. Some functions are actually named
16831 something starting with __ and the normal name is an alias. */
ca81d7a0 16832#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16833choke me
cd958eb3
MB
16834#endif
16835
19650fd6
AS
16836int
16837main ()
16838{
ca81d7a0 16839return $ac_func ();
503d2be0
AS
16840 ;
16841 return 0;
16842}
16843_ACEOF
16844rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16845if { (ac_try="$ac_link"
16846case "(($ac_try" in
16847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16848 *) ac_try_echo=$ac_try;;
16849esac
16850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16851 (eval "$ac_link") 2>conftest.er1
503d2be0 16852 ac_status=$?
edfaf76d
LK
16853 grep -v '^ *+' conftest.er1 >conftest.err
16854 rm -f conftest.er1
16855 cat conftest.err >&5
c0d27fcc 16856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16857 (exit $ac_status); } && {
16858 test -z "$ac_c_werror_flag" ||
16859 test ! -s conftest.err
16860 } && test -s conftest$ac_exeext &&
16861 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16862 eval "$as_ac_var=yes"
16863else
16864 echo "$as_me: failed program was:" >&5
19650fd6
AS
16865sed 's/^/| /' conftest.$ac_ext >&5
16866
ca81d7a0 16867 eval "$as_ac_var=no"
503d2be0 16868fi
ca81d7a0 16869
f053c89f 16870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16871 conftest$ac_exeext conftest.$ac_ext
503d2be0 16872fi
ca81d7a0
JD
16873ac_res=`eval echo '${'$as_ac_var'}'`
16874 { echo "$as_me:$LINENO: result: $ac_res" >&5
16875echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16876if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16877 cat >>confdefs.h <<_ACEOF
98418dba 16878#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16879_ACEOF
503d2be0 16880
98418dba 16881else
ca81d7a0 16882 case " $LIBOBJS " in
edfaf76d 16883 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
16884 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
16885 ;;
edfaf76d
LK
16886esac
16887
ba4481b5 16888
c0d27fcc 16889cat >>confdefs.h <<\_ACEOF
98418dba 16890#define C_GETLOADAVG 1
c0d27fcc 16891_ACEOF
ba4481b5 16892
98418dba
CW
16893# Figure out what our getloadavg.c needs.
16894ac_have_func=no
c0d27fcc 16895if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
16896 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16897echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 16898if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 16899 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16900fi
ca81d7a0
JD
16901{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16902echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 16903else
c0d27fcc 16904 # Is the header compilable?
ca81d7a0
JD
16905{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
16906echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 16907cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16908/* confdefs.h. */
16909_ACEOF
16910cat confdefs.h >>conftest.$ac_ext
16911cat >>conftest.$ac_ext <<_ACEOF
16912/* end confdefs.h. */
c0d27fcc
MR
16913$ac_includes_default
16914#include <sys/dg_sys_info.h>
16915_ACEOF
16916rm -f conftest.$ac_objext
ca81d7a0
JD
16917if { (ac_try="$ac_compile"
16918case "(($ac_try" in
16919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16920 *) ac_try_echo=$ac_try;;
16921esac
16922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16923 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16924 ac_status=$?
edfaf76d
LK
16925 grep -v '^ *+' conftest.er1 >conftest.err
16926 rm -f conftest.er1
16927 cat conftest.err >&5
c0d27fcc 16928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16929 (exit $ac_status); } && {
16930 test -z "$ac_c_werror_flag" ||
16931 test ! -s conftest.err
16932 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16933 ac_header_compiler=yes
16934else
16935 echo "$as_me: failed program was:" >&5
19650fd6
AS
16936sed 's/^/| /' conftest.$ac_ext >&5
16937
ca81d7a0 16938 ac_header_compiler=no
c0d27fcc 16939fi
ca81d7a0
JD
16940
16941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16942{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16943echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16944
16945# Is the header present?
ca81d7a0
JD
16946{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16947echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 16948cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16949/* confdefs.h. */
16950_ACEOF
16951cat confdefs.h >>conftest.$ac_ext
16952cat >>conftest.$ac_ext <<_ACEOF
16953/* end confdefs.h. */
98418dba
CW
16954#include <sys/dg_sys_info.h>
16955_ACEOF
ca81d7a0
JD
16956if { (ac_try="$ac_cpp conftest.$ac_ext"
16957case "(($ac_try" in
16958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16959 *) ac_try_echo=$ac_try;;
16960esac
16961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16962 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 16963 ac_status=$?
6bae0ccf 16964 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16965 rm -f conftest.er1
16966 cat conftest.err >&5
c0d27fcc 16967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16968 (exit $ac_status); } >/dev/null && {
16969 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16970 test ! -s conftest.err
16971 }; then
c0d27fcc 16972 ac_header_preproc=yes
98418dba
CW
16973else
16974 echo "$as_me: failed program was:" >&5
19650fd6
AS
16975sed 's/^/| /' conftest.$ac_ext >&5
16976
c0d27fcc 16977 ac_header_preproc=no
ba4481b5 16978fi
ca81d7a0 16979
98418dba 16980rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16981{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16982echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16983
16984# So? What about this header?
edfaf76d
LK
16985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16986 yes:no: )
c0d27fcc
MR
16987 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16988echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16989 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16990echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16991 ac_header_preproc=yes
19650fd6 16992 ;;
edfaf76d 16993 no:yes:* )
c0d27fcc
MR
16994 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16995echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16996 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16997echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16998 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16999echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17000 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17001echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17002 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17003echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17004 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17005echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17006
19650fd6 17007 ;;
c0d27fcc 17008esac
ca81d7a0
JD
17009{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17010echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17011if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17012 echo $ECHO_N "(cached) $ECHO_C" >&6
17013else
17014 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17015fi
ca81d7a0
JD
17016{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17017echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17018
17019fi
98418dba
CW
17020if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17021 ac_have_func=yes
ba4481b5 17022
c0d27fcc 17023cat >>confdefs.h <<\_ACEOF
98418dba 17024#define DGUX 1
c0d27fcc
MR
17025_ACEOF
17026
503d2be0 17027
ca81d7a0
JD
17028{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17029echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17030if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17031 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17032else
503d2be0 17033 ac_check_lib_save_LIBS=$LIBS
98418dba 17034LIBS="-ldgc $LIBS"
503d2be0 17035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17036/* confdefs.h. */
17037_ACEOF
17038cat confdefs.h >>conftest.$ac_ext
17039cat >>conftest.$ac_ext <<_ACEOF
17040/* end confdefs.h. */
503d2be0 17041
ca81d7a0
JD
17042/* Override any GCC internal prototype to avoid an error.
17043 Use char because int might match the return type of a GCC
17044 builtin and then its argument prototype would still apply. */
503d2be0
AS
17045#ifdef __cplusplus
17046extern "C"
17047#endif
98418dba 17048char dg_sys_info ();
503d2be0
AS
17049int
17050main ()
17051{
ca81d7a0 17052return dg_sys_info ();
503d2be0
AS
17053 ;
17054 return 0;
17055}
17056_ACEOF
17057rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17058if { (ac_try="$ac_link"
17059case "(($ac_try" in
17060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17061 *) ac_try_echo=$ac_try;;
17062esac
17063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17064 (eval "$ac_link") 2>conftest.er1
503d2be0 17065 ac_status=$?
edfaf76d
LK
17066 grep -v '^ *+' conftest.er1 >conftest.err
17067 rm -f conftest.er1
17068 cat conftest.err >&5
c0d27fcc 17069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17070 (exit $ac_status); } && {
17071 test -z "$ac_c_werror_flag" ||
17072 test ! -s conftest.err
17073 } && test -s conftest$ac_exeext &&
17074 $as_test_x conftest$ac_exeext; then
98418dba 17075 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17076else
17077 echo "$as_me: failed program was:" >&5
19650fd6
AS
17078sed 's/^/| /' conftest.$ac_ext >&5
17079
ca81d7a0 17080 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17081fi
ca81d7a0 17082
f053c89f 17083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17084 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17085LIBS=$ac_check_lib_save_LIBS
17086fi
ca81d7a0
JD
17087{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17088echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17089if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17090 cat >>confdefs.h <<_ACEOF
98418dba 17091#define HAVE_LIBDGC 1
c0d27fcc 17092_ACEOF
ba4481b5 17093
98418dba 17094 LIBS="-ldgc $LIBS"
ba4481b5 17095
ba4481b5
DL
17096fi
17097
98418dba 17098fi
503d2be0 17099
c0d27fcc
MR
17100
17101
17102if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17103 { echo "$as_me:$LINENO: checking for locale.h" >&5
17104echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17105if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17106 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17107fi
ca81d7a0
JD
17108{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17109echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17110else
c0d27fcc 17111 # Is the header compilable?
ca81d7a0
JD
17112{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17113echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17114cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17115/* confdefs.h. */
17116_ACEOF
17117cat confdefs.h >>conftest.$ac_ext
17118cat >>conftest.$ac_ext <<_ACEOF
17119/* end confdefs.h. */
c0d27fcc
MR
17120$ac_includes_default
17121#include <locale.h>
17122_ACEOF
17123rm -f conftest.$ac_objext
ca81d7a0
JD
17124if { (ac_try="$ac_compile"
17125case "(($ac_try" in
17126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17127 *) ac_try_echo=$ac_try;;
17128esac
17129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17130 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17131 ac_status=$?
edfaf76d
LK
17132 grep -v '^ *+' conftest.er1 >conftest.err
17133 rm -f conftest.er1
17134 cat conftest.err >&5
c0d27fcc 17135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17136 (exit $ac_status); } && {
17137 test -z "$ac_c_werror_flag" ||
17138 test ! -s conftest.err
17139 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17140 ac_header_compiler=yes
17141else
17142 echo "$as_me: failed program was:" >&5
19650fd6
AS
17143sed 's/^/| /' conftest.$ac_ext >&5
17144
ca81d7a0 17145 ac_header_compiler=no
c0d27fcc 17146fi
ca81d7a0
JD
17147
17148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17149{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17150echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17151
17152# Is the header present?
ca81d7a0
JD
17153{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17154echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17156/* confdefs.h. */
17157_ACEOF
17158cat confdefs.h >>conftest.$ac_ext
17159cat >>conftest.$ac_ext <<_ACEOF
17160/* end confdefs.h. */
98418dba 17161#include <locale.h>
503d2be0 17162_ACEOF
ca81d7a0
JD
17163if { (ac_try="$ac_cpp conftest.$ac_ext"
17164case "(($ac_try" in
17165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17166 *) ac_try_echo=$ac_try;;
17167esac
17168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17169 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17170 ac_status=$?
6bae0ccf 17171 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17172 rm -f conftest.er1
17173 cat conftest.err >&5
c0d27fcc 17174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17175 (exit $ac_status); } >/dev/null && {
17176 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17177 test ! -s conftest.err
17178 }; then
c0d27fcc 17179 ac_header_preproc=yes
98418dba
CW
17180else
17181 echo "$as_me: failed program was:" >&5
19650fd6
AS
17182sed 's/^/| /' conftest.$ac_ext >&5
17183
c0d27fcc 17184 ac_header_preproc=no
ba4481b5 17185fi
ca81d7a0 17186
98418dba 17187rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17188{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17189echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17190
17191# So? What about this header?
edfaf76d
LK
17192case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17193 yes:no: )
c0d27fcc
MR
17194 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17195echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17196 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17197echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17198 ac_header_preproc=yes
19650fd6 17199 ;;
edfaf76d 17200 no:yes:* )
c0d27fcc
MR
17201 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17202echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17203 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17204echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17205 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17206echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17207 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17208echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17209 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17210echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17211 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17212echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17213
19650fd6 17214 ;;
c0d27fcc 17215esac
ca81d7a0
JD
17216{ echo "$as_me:$LINENO: checking for locale.h" >&5
17217echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17218if test "${ac_cv_header_locale_h+set}" = set; then
17219 echo $ECHO_N "(cached) $ECHO_C" >&6
17220else
17221 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17222fi
ca81d7a0
JD
17223{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17224echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17225
c0d27fcc
MR
17226fi
17227
17228
17229
98418dba 17230for ac_func in setlocale
ba4481b5 17231do
503d2be0 17232as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17233{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17234echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17235if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17236 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17237else
503d2be0 17238 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17239/* confdefs.h. */
17240_ACEOF
17241cat confdefs.h >>conftest.$ac_ext
17242cat >>conftest.$ac_ext <<_ACEOF
17243/* end confdefs.h. */
edfaf76d
LK
17244/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17246#define $ac_func innocuous_$ac_func
17247
ba4481b5 17248/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17249 which can conflict with char $ac_func (); below.
17250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17251 <limits.h> exists even on freestanding compilers. */
edfaf76d 17252
19650fd6
AS
17253#ifdef __STDC__
17254# include <limits.h>
17255#else
17256# include <assert.h>
17257#endif
edfaf76d
LK
17258
17259#undef $ac_func
17260
ca81d7a0
JD
17261/* Override any GCC internal prototype to avoid an error.
17262 Use char because int might match the return type of a GCC
17263 builtin and then its argument prototype would still apply. */
503d2be0
AS
17264#ifdef __cplusplus
17265extern "C"
17266#endif
503d2be0 17267char $ac_func ();
ba4481b5
DL
17268/* The GNU C library defines this for functions which it implements
17269 to always fail with ENOSYS. Some functions are actually named
17270 something starting with __ and the normal name is an alias. */
ca81d7a0 17271#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17272choke me
ba4481b5
DL
17273#endif
17274
19650fd6
AS
17275int
17276main ()
17277{
ca81d7a0 17278return $ac_func ();
503d2be0
AS
17279 ;
17280 return 0;
17281}
17282_ACEOF
17283rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17284if { (ac_try="$ac_link"
17285case "(($ac_try" in
17286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17287 *) ac_try_echo=$ac_try;;
17288esac
17289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17290 (eval "$ac_link") 2>conftest.er1
503d2be0 17291 ac_status=$?
edfaf76d
LK
17292 grep -v '^ *+' conftest.er1 >conftest.err
17293 rm -f conftest.er1
17294 cat conftest.err >&5
c0d27fcc 17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17296 (exit $ac_status); } && {
17297 test -z "$ac_c_werror_flag" ||
17298 test ! -s conftest.err
17299 } && test -s conftest$ac_exeext &&
17300 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17301 eval "$as_ac_var=yes"
17302else
17303 echo "$as_me: failed program was:" >&5
19650fd6
AS
17304sed 's/^/| /' conftest.$ac_ext >&5
17305
ca81d7a0 17306 eval "$as_ac_var=no"
503d2be0 17307fi
ca81d7a0 17308
f053c89f 17309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17310 conftest$ac_exeext conftest.$ac_ext
503d2be0 17311fi
ca81d7a0
JD
17312ac_res=`eval echo '${'$as_ac_var'}'`
17313 { echo "$as_me:$LINENO: result: $ac_res" >&5
17314echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17315if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17316 cat >>confdefs.h <<_ACEOF
503d2be0 17317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17318_ACEOF
ba4481b5 17319
ba4481b5
DL
17320fi
17321done
17322
c0d27fcc 17323
98418dba
CW
17324# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17325# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17326# Irix 4.0.5F has the header but not the library.
17327if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17328 ac_have_func=yes
17329
c0d27fcc 17330cat >>confdefs.h <<\_ACEOF
98418dba 17331#define SVR4 1
c0d27fcc 17332_ACEOF
98418dba
CW
17333
17334fi
17335
17336if test $ac_have_func = no; then
c0d27fcc 17337 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17338 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17339echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17340if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17341 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17342fi
ca81d7a0
JD
17343{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17344echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17345else
c0d27fcc 17346 # Is the header compilable?
ca81d7a0
JD
17347{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17348echo $ECHO_N "checking inq_stats/cpustats.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 <inq_stats/cpustats.h>
17357_ACEOF
17358rm -f conftest.$ac_objext
ca81d7a0
JD
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
f053c89f
CY
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
ca81d7a0 17380 ac_header_compiler=no
c0d27fcc 17381fi
ca81d7a0
JD
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?
ca81d7a0
JD
17388{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17389echo $ECHO_N "checking inq_stats/cpustats.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 17396#include <inq_stats/cpustats.h>
503d2be0 17397_ACEOF
ca81d7a0
JD
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
503d2be0 17405 ac_status=$?
6bae0ccf 17406 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17407 rm -f conftest.er1
17408 cat conftest.err >&5
c0d27fcc 17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
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
503d2be0
AS
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
ca81d7a0 17421
503d2be0 17422rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
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: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17430echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17431 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17432echo "$as_me: WARNING: inq_stats/cpustats.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: inq_stats/cpustats.h: present but cannot be compiled" >&5
17437echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17438 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17439echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17440 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17441echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17442 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17443echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17444 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17445echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17446 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17447echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17448
19650fd6 17449 ;;
c0d27fcc 17450esac
ca81d7a0
JD
17451{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17452echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17453if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17454 echo $ECHO_N "(cached) $ECHO_C" >&6
17455else
17456 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17457fi
ca81d7a0
JD
17458{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17459echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17460
17461fi
98418dba
CW
17462if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17463 ac_have_func=yes
ba4481b5 17464
c0d27fcc 17465cat >>confdefs.h <<\_ACEOF
98418dba 17466#define UMAX 1
c0d27fcc 17467_ACEOF
98418dba 17468
c0d27fcc
MR
17469
17470cat >>confdefs.h <<\_ACEOF
98418dba 17471#define UMAX4_3 1
c0d27fcc 17472_ACEOF
98418dba
CW
17473
17474fi
17475
c0d27fcc 17476
98418dba
CW
17477fi
17478
17479if test $ac_have_func = no; then
c0d27fcc 17480 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
17481 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17482echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17483if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17484 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17485fi
ca81d7a0
JD
17486{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17487echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17488else
c0d27fcc 17489 # Is the header compilable?
ca81d7a0
JD
17490{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17491echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17492cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17493/* confdefs.h. */
17494_ACEOF
17495cat confdefs.h >>conftest.$ac_ext
17496cat >>conftest.$ac_ext <<_ACEOF
17497/* end confdefs.h. */
c0d27fcc
MR
17498$ac_includes_default
17499#include <sys/cpustats.h>
17500_ACEOF
17501rm -f conftest.$ac_objext
ca81d7a0
JD
17502if { (ac_try="$ac_compile"
17503case "(($ac_try" in
17504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17505 *) ac_try_echo=$ac_try;;
17506esac
17507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17508 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17509 ac_status=$?
edfaf76d
LK
17510 grep -v '^ *+' conftest.er1 >conftest.err
17511 rm -f conftest.er1
17512 cat conftest.err >&5
c0d27fcc 17513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17514 (exit $ac_status); } && {
17515 test -z "$ac_c_werror_flag" ||
17516 test ! -s conftest.err
17517 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17518 ac_header_compiler=yes
17519else
17520 echo "$as_me: failed program was:" >&5
19650fd6
AS
17521sed 's/^/| /' conftest.$ac_ext >&5
17522
ca81d7a0 17523 ac_header_compiler=no
c0d27fcc 17524fi
ca81d7a0
JD
17525
17526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17527{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17528echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17529
17530# Is the header present?
ca81d7a0
JD
17531{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17532echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17534/* confdefs.h. */
17535_ACEOF
17536cat confdefs.h >>conftest.$ac_ext
17537cat >>conftest.$ac_ext <<_ACEOF
17538/* end confdefs.h. */
98418dba
CW
17539#include <sys/cpustats.h>
17540_ACEOF
ca81d7a0
JD
17541if { (ac_try="$ac_cpp conftest.$ac_ext"
17542case "(($ac_try" in
17543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17544 *) ac_try_echo=$ac_try;;
17545esac
17546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17547 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17548 ac_status=$?
6bae0ccf 17549 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17550 rm -f conftest.er1
17551 cat conftest.err >&5
c0d27fcc 17552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17553 (exit $ac_status); } >/dev/null && {
17554 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17555 test ! -s conftest.err
17556 }; then
c0d27fcc 17557 ac_header_preproc=yes
98418dba
CW
17558else
17559 echo "$as_me: failed program was:" >&5
19650fd6
AS
17560sed 's/^/| /' conftest.$ac_ext >&5
17561
c0d27fcc 17562 ac_header_preproc=no
98418dba 17563fi
ca81d7a0 17564
98418dba 17565rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17566{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17567echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17568
17569# So? What about this header?
edfaf76d
LK
17570case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17571 yes:no: )
c0d27fcc
MR
17572 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17573echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17574 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17575echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17576 ac_header_preproc=yes
19650fd6 17577 ;;
edfaf76d 17578 no:yes:* )
c0d27fcc
MR
17579 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17580echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17581 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17582echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17583 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17584echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17585 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17586echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17587 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17588echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17589 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17590echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17591
19650fd6 17592 ;;
c0d27fcc 17593esac
ca81d7a0
JD
17594{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17595echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17596if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17597 echo $ECHO_N "(cached) $ECHO_C" >&6
17598else
17599 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17600fi
ca81d7a0
JD
17601{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17602echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17603
17604fi
98418dba 17605if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17606 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17607#define UMAX 1
c0d27fcc 17608_ACEOF
ba4481b5 17609
98418dba
CW
17610fi
17611
c0d27fcc 17612
98418dba
CW
17613fi
17614
17615if test $ac_have_func = no; then
17616
17617for ac_header in mach/mach.h
2c9dccc9
PJ
17618do
17619as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17620if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17621 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17623if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17624 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17625fi
ca81d7a0
JD
17626ac_res=`eval echo '${'$as_ac_Header'}'`
17627 { echo "$as_me:$LINENO: result: $ac_res" >&5
17628echo "${ECHO_T}$ac_res" >&6; }
98418dba 17629else
c0d27fcc 17630 # Is the header compilable?
ca81d7a0
JD
17631{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17632echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17633cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17634/* confdefs.h. */
17635_ACEOF
17636cat confdefs.h >>conftest.$ac_ext
17637cat >>conftest.$ac_ext <<_ACEOF
17638/* end confdefs.h. */
c0d27fcc
MR
17639$ac_includes_default
17640#include <$ac_header>
17641_ACEOF
17642rm -f conftest.$ac_objext
ca81d7a0
JD
17643if { (ac_try="$ac_compile"
17644case "(($ac_try" in
17645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17646 *) ac_try_echo=$ac_try;;
17647esac
17648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17649 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17650 ac_status=$?
edfaf76d
LK
17651 grep -v '^ *+' conftest.er1 >conftest.err
17652 rm -f conftest.er1
17653 cat conftest.err >&5
c0d27fcc 17654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17655 (exit $ac_status); } && {
17656 test -z "$ac_c_werror_flag" ||
17657 test ! -s conftest.err
17658 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17659 ac_header_compiler=yes
17660else
17661 echo "$as_me: failed program was:" >&5
19650fd6
AS
17662sed 's/^/| /' conftest.$ac_ext >&5
17663
ca81d7a0 17664 ac_header_compiler=no
c0d27fcc 17665fi
ca81d7a0
JD
17666
17667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17668{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17669echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17670
17671# Is the header present?
ca81d7a0
JD
17672{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17673echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17674cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17675/* confdefs.h. */
17676_ACEOF
17677cat confdefs.h >>conftest.$ac_ext
17678cat >>conftest.$ac_ext <<_ACEOF
17679/* end confdefs.h. */
2c9dccc9
PJ
17680#include <$ac_header>
17681_ACEOF
ca81d7a0
JD
17682if { (ac_try="$ac_cpp conftest.$ac_ext"
17683case "(($ac_try" in
17684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17685 *) ac_try_echo=$ac_try;;
17686esac
17687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17689 ac_status=$?
6bae0ccf 17690 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17691 rm -f conftest.er1
17692 cat conftest.err >&5
c0d27fcc 17693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17694 (exit $ac_status); } >/dev/null && {
17695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17696 test ! -s conftest.err
17697 }; then
c0d27fcc
MR
17698 ac_header_preproc=yes
17699else
17700 echo "$as_me: failed program was:" >&5
19650fd6
AS
17701sed 's/^/| /' conftest.$ac_ext >&5
17702
c0d27fcc
MR
17703 ac_header_preproc=no
17704fi
ca81d7a0 17705
c0d27fcc 17706rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17707{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17708echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17709
17710# So? What about this header?
edfaf76d
LK
17711case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17712 yes:no: )
c0d27fcc
MR
17713 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17714echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17715 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17716echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17717 ac_header_preproc=yes
19650fd6 17718 ;;
edfaf76d 17719 no:yes:* )
c0d27fcc
MR
17720 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17721echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17722 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17723echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17724 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17725echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17726 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17727echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17728 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17729echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17730 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17731echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17732
19650fd6 17733 ;;
c0d27fcc 17734esac
ca81d7a0
JD
17735{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17736echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17737if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17738 echo $ECHO_N "(cached) $ECHO_C" >&6
17739else
edfaf76d 17740 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17741fi
ca81d7a0
JD
17742ac_res=`eval echo '${'$as_ac_Header'}'`
17743 { echo "$as_me:$LINENO: result: $ac_res" >&5
17744echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17745
17746fi
17747if test `eval echo '${'$as_ac_Header'}'` = yes; then
17748 cat >>confdefs.h <<_ACEOF
17749#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17750_ACEOF
17751
17752fi
17753
17754done
17755
17756fi
17757
17758
17759for ac_header in nlist.h
17760do
17761as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17762if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17763 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17764echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17765if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17766 echo $ECHO_N "(cached) $ECHO_C" >&6
17767fi
ca81d7a0
JD
17768ac_res=`eval echo '${'$as_ac_Header'}'`
17769 { echo "$as_me:$LINENO: result: $ac_res" >&5
17770echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17771else
17772 # Is the header compilable?
ca81d7a0
JD
17773{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17774echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17775cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17776/* confdefs.h. */
17777_ACEOF
17778cat confdefs.h >>conftest.$ac_ext
17779cat >>conftest.$ac_ext <<_ACEOF
17780/* end confdefs.h. */
c0d27fcc
MR
17781$ac_includes_default
17782#include <$ac_header>
17783_ACEOF
17784rm -f conftest.$ac_objext
ca81d7a0
JD
17785if { (ac_try="$ac_compile"
17786case "(($ac_try" in
17787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17788 *) ac_try_echo=$ac_try;;
17789esac
17790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17791 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17792 ac_status=$?
edfaf76d
LK
17793 grep -v '^ *+' conftest.er1 >conftest.err
17794 rm -f conftest.er1
17795 cat conftest.err >&5
c0d27fcc 17796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17797 (exit $ac_status); } && {
17798 test -z "$ac_c_werror_flag" ||
17799 test ! -s conftest.err
17800 } && test -s conftest.$ac_objext; then
c0d27fcc 17801 ac_header_compiler=yes
2c9dccc9
PJ
17802else
17803 echo "$as_me: failed program was:" >&5
19650fd6
AS
17804sed 's/^/| /' conftest.$ac_ext >&5
17805
ca81d7a0 17806 ac_header_compiler=no
98418dba 17807fi
ca81d7a0
JD
17808
17809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17810{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17811echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 17812
c0d27fcc 17813# Is the header present?
ca81d7a0
JD
17814{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17815echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17816cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17817/* confdefs.h. */
17818_ACEOF
17819cat confdefs.h >>conftest.$ac_ext
17820cat >>conftest.$ac_ext <<_ACEOF
17821/* end confdefs.h. */
503d2be0
AS
17822#include <$ac_header>
17823_ACEOF
ca81d7a0
JD
17824if { (ac_try="$ac_cpp conftest.$ac_ext"
17825case "(($ac_try" in
17826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827 *) ac_try_echo=$ac_try;;
17828esac
17829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17830 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17831 ac_status=$?
6bae0ccf 17832 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17833 rm -f conftest.er1
17834 cat conftest.err >&5
c0d27fcc 17835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17836 (exit $ac_status); } >/dev/null && {
17837 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17838 test ! -s conftest.err
17839 }; then
c0d27fcc 17840 ac_header_preproc=yes
503d2be0
AS
17841else
17842 echo "$as_me: failed program was:" >&5
19650fd6
AS
17843sed 's/^/| /' conftest.$ac_ext >&5
17844
c0d27fcc 17845 ac_header_preproc=no
b5de8dc0 17846fi
ca81d7a0 17847
503d2be0 17848rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17849{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17850echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17851
17852# So? What about this header?
edfaf76d
LK
17853case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17854 yes:no: )
c0d27fcc
MR
17855 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17856echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17857 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17858echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17859 ac_header_preproc=yes
19650fd6 17860 ;;
edfaf76d 17861 no:yes:* )
c0d27fcc
MR
17862 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17863echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17864 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17865echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17866 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17867echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17868 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17869echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17870 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17871echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17872 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17873echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17874
19650fd6 17875 ;;
c0d27fcc 17876esac
ca81d7a0
JD
17877{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17878echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17879if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17880 echo $ECHO_N "(cached) $ECHO_C" >&6
17881else
edfaf76d 17882 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17883fi
ca81d7a0
JD
17884ac_res=`eval echo '${'$as_ac_Header'}'`
17885 { echo "$as_me:$LINENO: result: $ac_res" >&5
17886echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17887
17888fi
98418dba 17889if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17890 cat >>confdefs.h <<_ACEOF
98418dba 17891#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17892_ACEOF
ca81d7a0
JD
17893 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
17894echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 17895if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17896 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17897else
503d2be0 17898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17899/* confdefs.h. */
17900_ACEOF
17901cat confdefs.h >>conftest.$ac_ext
17902cat >>conftest.$ac_ext <<_ACEOF
17903/* end confdefs.h. */
98418dba 17904#include <nlist.h>
b5de8dc0 17905
503d2be0
AS
17906int
17907main ()
17908{
98418dba
CW
17909static struct nlist ac_aggr;
17910if (ac_aggr.n_un.n_name)
17911return 0;
503d2be0
AS
17912 ;
17913 return 0;
17914}
17915_ACEOF
98418dba 17916rm -f conftest.$ac_objext
ca81d7a0
JD
17917if { (ac_try="$ac_compile"
17918case "(($ac_try" in
17919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17920 *) ac_try_echo=$ac_try;;
17921esac
17922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17923 (eval "$ac_compile") 2>conftest.er1
503d2be0 17924 ac_status=$?
edfaf76d
LK
17925 grep -v '^ *+' conftest.er1 >conftest.err
17926 rm -f conftest.er1
17927 cat conftest.err >&5
c0d27fcc 17928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17929 (exit $ac_status); } && {
17930 test -z "$ac_c_werror_flag" ||
17931 test ! -s conftest.err
17932 } && test -s conftest.$ac_objext; then
edfaf76d 17933 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17934else
17935 echo "$as_me: failed program was:" >&5
19650fd6
AS
17936sed 's/^/| /' conftest.$ac_ext >&5
17937
ca81d7a0 17938 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17939/* confdefs.h. */
17940_ACEOF
17941cat confdefs.h >>conftest.$ac_ext
17942cat >>conftest.$ac_ext <<_ACEOF
17943/* end confdefs.h. */
6bae0ccf
DL
17944#include <nlist.h>
17945
17946int
17947main ()
17948{
17949static struct nlist ac_aggr;
17950if (sizeof ac_aggr.n_un.n_name)
17951return 0;
17952 ;
17953 return 0;
17954}
17955_ACEOF
17956rm -f conftest.$ac_objext
ca81d7a0
JD
17957if { (ac_try="$ac_compile"
17958case "(($ac_try" in
17959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17960 *) ac_try_echo=$ac_try;;
17961esac
17962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17963 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 17964 ac_status=$?
edfaf76d
LK
17965 grep -v '^ *+' conftest.er1 >conftest.err
17966 rm -f conftest.er1
17967 cat conftest.err >&5
6bae0ccf 17968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17969 (exit $ac_status); } && {
17970 test -z "$ac_c_werror_flag" ||
17971 test ! -s conftest.err
17972 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
17973 ac_cv_member_struct_nlist_n_un_n_name=yes
17974else
17975 echo "$as_me: failed program was:" >&5
19650fd6
AS
17976sed 's/^/| /' conftest.$ac_ext >&5
17977
ca81d7a0 17978 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17979fi
ca81d7a0
JD
17980
17981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17982fi
ca81d7a0
JD
17983
17984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17985fi
ca81d7a0
JD
17986{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
17987echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 17988if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17989
c0d27fcc 17990cat >>confdefs.h <<_ACEOF
98418dba 17991#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17992_ACEOF
b5de8dc0 17993
c0d27fcc
MR
17994
17995cat >>confdefs.h <<\_ACEOF
98418dba 17996#define NLIST_NAME_UNION 1
c0d27fcc 17997_ACEOF
b5de8dc0 17998
98418dba 17999fi
b5de8dc0 18000
c0d27fcc 18001
98418dba 18002fi
c0d27fcc 18003
98418dba 18004done
b5de8dc0 18005
98418dba
CW
18006fi
18007done
b5de8dc0 18008
c0d27fcc 18009
98418dba 18010# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18011{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18012echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18013if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18014 echo $ECHO_N "(cached) $ECHO_C" >&6
18015else
18016 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18017/* confdefs.h. */
18018_ACEOF
18019cat confdefs.h >>conftest.$ac_ext
18020cat >>conftest.$ac_ext <<_ACEOF
18021/* end confdefs.h. */
6bae0ccf 18022#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18023#ifdef LDAV_PRIVILEGED
18024Yowza Am I SETGID yet
18025#endif
18026_ACEOF
18027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18028 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18029 ac_cv_func_getloadavg_setgid=yes
18030else
18031 ac_cv_func_getloadavg_setgid=no
18032fi
18033rm -f conftest*
b5de8dc0 18034
98418dba 18035fi
ca81d7a0
JD
18036{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18037echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18038if test $ac_cv_func_getloadavg_setgid = yes; then
18039 NEED_SETGID=true
b5de8dc0 18040
c0d27fcc 18041cat >>confdefs.h <<\_ACEOF
98418dba 18042#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18043_ACEOF
98418dba 18044
b5de8dc0 18045else
98418dba 18046 NEED_SETGID=false
b5de8dc0 18047fi
98418dba
CW
18048
18049if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18050 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18051echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18052if test "${ac_cv_group_kmem+set}" = set; then
18053 echo $ECHO_N "(cached) $ECHO_C" >&6
18054else
18055 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18056 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18057 # If we got an error (system does not support symlinks), try without -L.
18058 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18059 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18060 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18061 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18062 / /s/.* //;p;'`
18063
b5de8dc0 18064fi
ca81d7a0
JD
18065{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18066echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18067 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18068fi
98418dba
CW
18069if test "x$ac_save_LIBS" = x; then
18070 GETLOADAVG_LIBS=$LIBS
18071else
18072 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18073fi
98418dba 18074LIBS=$ac_save_LIBS
b5de8dc0 18075
c0d27fcc
MR
18076
18077
ca81d7a0
JD
18078{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18079echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18080if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18081 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18082else
b936fae4 18083 while :; do
503d2be0 18084 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18085/* confdefs.h. */
18086_ACEOF
18087cat confdefs.h >>conftest.$ac_ext
18088cat >>conftest.$ac_ext <<_ACEOF
18089/* end confdefs.h. */
50e682b9
CY
18090#include <sys/types.h> /* for off_t */
18091 #include <stdio.h>
503d2be0
AS
18092int
18093main ()
18094{
50e682b9
CY
18095int (*fp) (FILE *, off_t, int) = fseeko;
18096 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18097 ;
18098 return 0;
18099}
18100_ACEOF
f053c89f
CY
18101rm -f conftest.$ac_objext conftest$ac_exeext
18102if { (ac_try="$ac_link"
ca81d7a0
JD
18103case "(($ac_try" in
18104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18105 *) ac_try_echo=$ac_try;;
18106esac
18107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18108 (eval "$ac_link") 2>conftest.er1
b936fae4 18109 ac_status=$?
edfaf76d
LK
18110 grep -v '^ *+' conftest.er1 >conftest.err
18111 rm -f conftest.er1
18112 cat conftest.err >&5
c0d27fcc 18113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18114 (exit $ac_status); } && {
18115 test -z "$ac_c_werror_flag" ||
18116 test ! -s conftest.err
18117 } && test -s conftest$ac_exeext &&
18118 $as_test_x conftest$ac_exeext; then
18119 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18120else
18121 echo "$as_me: failed program was:" >&5
19650fd6
AS
18122sed 's/^/| /' conftest.$ac_ext >&5
18123
ca81d7a0 18124
b936fae4 18125fi
ca81d7a0 18126
f053c89f
CY
18127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18128 conftest$ac_exeext conftest.$ac_ext
b936fae4 18129 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18130/* confdefs.h. */
18131_ACEOF
18132cat confdefs.h >>conftest.$ac_ext
18133cat >>conftest.$ac_ext <<_ACEOF
18134/* end confdefs.h. */
b936fae4 18135#define _LARGEFILE_SOURCE 1
50e682b9
CY
18136#include <sys/types.h> /* for off_t */
18137 #include <stdio.h>
b936fae4
AS
18138int
18139main ()
18140{
50e682b9
CY
18141int (*fp) (FILE *, off_t, int) = fseeko;
18142 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18143 ;
18144 return 0;
18145}
18146_ACEOF
f053c89f
CY
18147rm -f conftest.$ac_objext conftest$ac_exeext
18148if { (ac_try="$ac_link"
ca81d7a0
JD
18149case "(($ac_try" in
18150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18151 *) ac_try_echo=$ac_try;;
18152esac
18153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18154 (eval "$ac_link") 2>conftest.er1
b936fae4 18155 ac_status=$?
edfaf76d
LK
18156 grep -v '^ *+' conftest.er1 >conftest.err
18157 rm -f conftest.er1
18158 cat conftest.err >&5
c0d27fcc 18159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18160 (exit $ac_status); } && {
18161 test -z "$ac_c_werror_flag" ||
18162 test ! -s conftest.err
18163 } && test -s conftest$ac_exeext &&
18164 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18165 ac_cv_sys_largefile_source=1; break
18166else
18167 echo "$as_me: failed program was:" >&5
19650fd6
AS
18168sed 's/^/| /' conftest.$ac_ext >&5
18169
ca81d7a0 18170
b936fae4 18171fi
ca81d7a0 18172
f053c89f
CY
18173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18174 conftest$ac_exeext conftest.$ac_ext
18175 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18176 break
18177done
18178fi
ca81d7a0
JD
18179{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18180echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18181case $ac_cv_sys_largefile_source in #(
18182 no | unknown) ;;
18183 *)
c0d27fcc 18184cat >>confdefs.h <<_ACEOF
b936fae4 18185#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18186_ACEOF
f053c89f
CY
18187;;
18188esac
b936fae4 18189rm -f conftest*
4c343001 18190
b936fae4
AS
18191# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18192# in glibc 2.1.3, but that breaks too many other things.
18193# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
f053c89f 18194if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18195
c0d27fcc 18196cat >>confdefs.h <<\_ACEOF
b936fae4 18197#define HAVE_FSEEKO 1
c0d27fcc 18198_ACEOF
b936fae4 18199
4c343001
DL
18200fi
18201
c0d27fcc 18202
52dbaac8
PE
18203# Configure getopt.
18204# getopt.m4 serial 10
18205
18206# The getopt module assume you want GNU getopt, with getopt_long etc,
18207# rather than vanilla POSIX getopt. This means your your code should
18208# always include <getopt.h> for the getopt prototypes.
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220# Prerequisites of lib/getopt*.
18221
18222
18223
10a3b1a1 18224
52dbaac8
PE
18225 GETOPT_H=
18226
18227for ac_header in getopt.h
18228do
18229as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18231 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18233if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18234 echo $ECHO_N "(cached) $ECHO_C" >&6
18235fi
ca81d7a0
JD
18236ac_res=`eval echo '${'$as_ac_Header'}'`
18237 { echo "$as_me:$LINENO: result: $ac_res" >&5
18238echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18239else
18240 # Is the header compilable?
ca81d7a0
JD
18241{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18242echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18243cat >conftest.$ac_ext <<_ACEOF
18244/* confdefs.h. */
18245_ACEOF
18246cat confdefs.h >>conftest.$ac_ext
18247cat >>conftest.$ac_ext <<_ACEOF
18248/* end confdefs.h. */
18249$ac_includes_default
18250#include <$ac_header>
18251_ACEOF
18252rm -f conftest.$ac_objext
ca81d7a0
JD
18253if { (ac_try="$ac_compile"
18254case "(($ac_try" in
18255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18256 *) ac_try_echo=$ac_try;;
18257esac
18258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18259 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18260 ac_status=$?
18261 grep -v '^ *+' conftest.er1 >conftest.err
18262 rm -f conftest.er1
18263 cat conftest.err >&5
18264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18265 (exit $ac_status); } && {
18266 test -z "$ac_c_werror_flag" ||
18267 test ! -s conftest.err
18268 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18269 ac_header_compiler=yes
18270else
18271 echo "$as_me: failed program was:" >&5
18272sed 's/^/| /' conftest.$ac_ext >&5
18273
ca81d7a0 18274 ac_header_compiler=no
52dbaac8 18275fi
ca81d7a0
JD
18276
18277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18279echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18280
18281# Is the header present?
ca81d7a0
JD
18282{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18283echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18284cat >conftest.$ac_ext <<_ACEOF
18285/* confdefs.h. */
18286_ACEOF
18287cat confdefs.h >>conftest.$ac_ext
18288cat >>conftest.$ac_ext <<_ACEOF
18289/* end confdefs.h. */
18290#include <$ac_header>
18291_ACEOF
ca81d7a0
JD
18292if { (ac_try="$ac_cpp conftest.$ac_ext"
18293case "(($ac_try" in
18294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18295 *) ac_try_echo=$ac_try;;
18296esac
18297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18299 ac_status=$?
18300 grep -v '^ *+' conftest.er1 >conftest.err
18301 rm -f conftest.er1
18302 cat conftest.err >&5
18303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18304 (exit $ac_status); } >/dev/null && {
18305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18306 test ! -s conftest.err
18307 }; then
52dbaac8
PE
18308 ac_header_preproc=yes
18309else
18310 echo "$as_me: failed program was:" >&5
18311sed 's/^/| /' conftest.$ac_ext >&5
18312
18313 ac_header_preproc=no
18314fi
ca81d7a0 18315
52dbaac8 18316rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18318echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18319
18320# So? What about this header?
18321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18322 yes:no: )
18323 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18324echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18325 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18326echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18327 ac_header_preproc=yes
18328 ;;
18329 no:yes:* )
18330 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18331echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18332 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18333echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18334 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18335echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18336 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18337echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18338 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18339echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18340 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18341echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18342
52dbaac8
PE
18343 ;;
18344esac
ca81d7a0
JD
18345{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18347if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18348 echo $ECHO_N "(cached) $ECHO_C" >&6
18349else
18350 eval "$as_ac_Header=\$ac_header_preproc"
18351fi
ca81d7a0
JD
18352ac_res=`eval echo '${'$as_ac_Header'}'`
18353 { echo "$as_me:$LINENO: result: $ac_res" >&5
18354echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18355
18356fi
18357if test `eval echo '${'$as_ac_Header'}'` = yes; then
18358 cat >>confdefs.h <<_ACEOF
18359#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18360_ACEOF
18361
18362else
18363 GETOPT_H=getopt.h
18364fi
18365
18366done
18367
18368 if test -z "$GETOPT_H"; then
18369
18370for ac_func in getopt_long_only
18371do
18372as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18373{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18374echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18375if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18376 echo $ECHO_N "(cached) $ECHO_C" >&6
18377else
18378 cat >conftest.$ac_ext <<_ACEOF
18379/* confdefs.h. */
18380_ACEOF
18381cat confdefs.h >>conftest.$ac_ext
18382cat >>conftest.$ac_ext <<_ACEOF
18383/* end confdefs.h. */
18384/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18386#define $ac_func innocuous_$ac_func
18387
18388/* System header to define __stub macros and hopefully few prototypes,
18389 which can conflict with char $ac_func (); below.
18390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18391 <limits.h> exists even on freestanding compilers. */
18392
18393#ifdef __STDC__
18394# include <limits.h>
18395#else
18396# include <assert.h>
18397#endif
18398
18399#undef $ac_func
18400
ca81d7a0
JD
18401/* Override any GCC internal prototype to avoid an error.
18402 Use char because int might match the return type of a GCC
18403 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18404#ifdef __cplusplus
18405extern "C"
52dbaac8 18406#endif
52dbaac8
PE
18407char $ac_func ();
18408/* The GNU C library defines this for functions which it implements
18409 to always fail with ENOSYS. Some functions are actually named
18410 something starting with __ and the normal name is an alias. */
ca81d7a0 18411#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18412choke me
52dbaac8
PE
18413#endif
18414
18415int
18416main ()
18417{
ca81d7a0 18418return $ac_func ();
52dbaac8
PE
18419 ;
18420 return 0;
18421}
18422_ACEOF
18423rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18424if { (ac_try="$ac_link"
18425case "(($ac_try" in
18426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18427 *) ac_try_echo=$ac_try;;
18428esac
18429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18430 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18431 ac_status=$?
18432 grep -v '^ *+' conftest.er1 >conftest.err
18433 rm -f conftest.er1
18434 cat conftest.err >&5
18435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18436 (exit $ac_status); } && {
18437 test -z "$ac_c_werror_flag" ||
18438 test ! -s conftest.err
18439 } && test -s conftest$ac_exeext &&
18440 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18441 eval "$as_ac_var=yes"
18442else
18443 echo "$as_me: failed program was:" >&5
18444sed 's/^/| /' conftest.$ac_ext >&5
18445
ca81d7a0 18446 eval "$as_ac_var=no"
52dbaac8 18447fi
ca81d7a0 18448
f053c89f 18449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18450 conftest$ac_exeext conftest.$ac_ext
18451fi
ca81d7a0
JD
18452ac_res=`eval echo '${'$as_ac_var'}'`
18453 { echo "$as_me:$LINENO: result: $ac_res" >&5
18454echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18455if test `eval echo '${'$as_ac_var'}'` = yes; then
18456 cat >>confdefs.h <<_ACEOF
18457#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18458_ACEOF
18459
18460else
18461 GETOPT_H=getopt.h
18462fi
18463done
18464
18465 fi
18466
18467 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18468 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18469echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18470if test "${ac_cv_have_decl_optreset+set}" = set; then
18471 echo $ECHO_N "(cached) $ECHO_C" >&6
18472else
18473 cat >conftest.$ac_ext <<_ACEOF
18474/* confdefs.h. */
18475_ACEOF
18476cat confdefs.h >>conftest.$ac_ext
18477cat >>conftest.$ac_ext <<_ACEOF
18478/* end confdefs.h. */
18479#include <getopt.h>
18480
18481int
18482main ()
18483{
18484#ifndef optreset
f053c89f 18485 (void) optreset;
52dbaac8
PE
18486#endif
18487
18488 ;
18489 return 0;
18490}
18491_ACEOF
18492rm -f conftest.$ac_objext
ca81d7a0
JD
18493if { (ac_try="$ac_compile"
18494case "(($ac_try" in
18495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18496 *) ac_try_echo=$ac_try;;
18497esac
18498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18499 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18500 ac_status=$?
18501 grep -v '^ *+' conftest.er1 >conftest.err
18502 rm -f conftest.er1
18503 cat conftest.err >&5
18504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18505 (exit $ac_status); } && {
18506 test -z "$ac_c_werror_flag" ||
18507 test ! -s conftest.err
18508 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18509 ac_cv_have_decl_optreset=yes
18510else
18511 echo "$as_me: failed program was:" >&5
18512sed 's/^/| /' conftest.$ac_ext >&5
18513
ca81d7a0 18514 ac_cv_have_decl_optreset=no
52dbaac8 18515fi
ca81d7a0
JD
18516
18517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18518fi
ca81d7a0
JD
18519{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18520echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18521if test $ac_cv_have_decl_optreset = yes; then
18522 GETOPT_H=getopt.h
18523fi
18524
18525 fi
18526
18527 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18528 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18529echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18530if test "${gl_cv_func_gnu_getopt+set}" = set; then
18531 echo $ECHO_N "(cached) $ECHO_C" >&6
18532else
18533 if test "$cross_compiling" = yes; then
ca81d7a0
JD
18534 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18535echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18536if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18537 echo $ECHO_N "(cached) $ECHO_C" >&6
18538else
18539 cat >conftest.$ac_ext <<_ACEOF
18540/* confdefs.h. */
18541_ACEOF
18542cat confdefs.h >>conftest.$ac_ext
18543cat >>conftest.$ac_ext <<_ACEOF
18544/* end confdefs.h. */
18545#include <getopt.h>
18546
18547int
18548main ()
18549{
18550#ifndef getopt_clip
f053c89f 18551 (void) getopt_clip;
52dbaac8
PE
18552#endif
18553
18554 ;
18555 return 0;
18556}
18557_ACEOF
18558rm -f conftest.$ac_objext
ca81d7a0
JD
18559if { (ac_try="$ac_compile"
18560case "(($ac_try" in
18561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18562 *) ac_try_echo=$ac_try;;
18563esac
18564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18565 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18566 ac_status=$?
18567 grep -v '^ *+' conftest.er1 >conftest.err
18568 rm -f conftest.er1
18569 cat conftest.err >&5
18570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18571 (exit $ac_status); } && {
18572 test -z "$ac_c_werror_flag" ||
18573 test ! -s conftest.err
18574 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18575 ac_cv_have_decl_getopt_clip=yes
18576else
18577 echo "$as_me: failed program was:" >&5
18578sed 's/^/| /' conftest.$ac_ext >&5
18579
ca81d7a0 18580 ac_cv_have_decl_getopt_clip=no
52dbaac8 18581fi
ca81d7a0
JD
18582
18583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18584fi
ca81d7a0
JD
18585{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18586echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18587if test $ac_cv_have_decl_getopt_clip = yes; then
18588 gl_cv_func_gnu_getopt=no
18589else
18590 gl_cv_func_gnu_getopt=yes
18591fi
18592
18593else
18594 cat >conftest.$ac_ext <<_ACEOF
18595/* confdefs.h. */
18596_ACEOF
18597cat confdefs.h >>conftest.$ac_ext
18598cat >>conftest.$ac_ext <<_ACEOF
18599/* end confdefs.h. */
18600#include <getopt.h>
18601int
18602main ()
18603{
18604
18605 char *myargv[3];
18606 myargv[0] = "conftest";
18607 myargv[1] = "-+";
18608 myargv[2] = 0;
18609 return getopt (2, myargv, "+a") != '?';
18610
18611 ;
18612 return 0;
18613}
18614_ACEOF
18615rm -f conftest$ac_exeext
ca81d7a0
JD
18616if { (ac_try="$ac_link"
18617case "(($ac_try" in
18618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18619 *) ac_try_echo=$ac_try;;
18620esac
18621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18622 (eval "$ac_link") 2>&5
52dbaac8
PE
18623 ac_status=$?
18624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
18626 { (case "(($ac_try" in
18627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18628 *) ac_try_echo=$ac_try;;
18629esac
18630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18631 (eval "$ac_try") 2>&5
52dbaac8
PE
18632 ac_status=$?
18633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18634 (exit $ac_status); }; }; then
18635 gl_cv_func_gnu_getopt=yes
18636else
18637 echo "$as_me: program exited with status $ac_status" >&5
18638echo "$as_me: failed program was:" >&5
18639sed 's/^/| /' conftest.$ac_ext >&5
18640
18641( exit $ac_status )
18642gl_cv_func_gnu_getopt=no
18643fi
ca81d7a0 18644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18645fi
ca81d7a0
JD
18646
18647
52dbaac8 18648fi
ca81d7a0
JD
18649{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18650echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18651 if test "$gl_cv_func_gnu_getopt" = "no"; then
18652 GETOPT_H=getopt.h
18653 fi
18654 fi
18655
18656
18657
18658 if test -n "$GETOPT_H"; then
18659
18660
18661 GETOPT_H=getopt.h
18662
18663cat >>confdefs.h <<\_ACEOF
18664#define __GETOPT_PREFIX rpl_
18665_ACEOF
18666
18667
18668
18669 :
18670 GETOPTOBJS='getopt.o getopt1.o'
18671
18672fi
18673
18674
18675
18676
ca81d7a0
JD
18677{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18678echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18679if test "${ac_cv_func_getpgrp_void+set}" = set; then
18680 echo $ECHO_N "(cached) $ECHO_C" >&6
18681else
18682 # Use it with a single arg.
18683cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18684/* confdefs.h. */
18685_ACEOF
18686cat confdefs.h >>conftest.$ac_ext
18687cat >>conftest.$ac_ext <<_ACEOF
18688/* end confdefs.h. */
cd958eb3
MB
18689$ac_includes_default
18690int
18691main ()
18692{
18693getpgrp (0);
18694 ;
18695 return 0;
18696}
18697_ACEOF
18698rm -f conftest.$ac_objext
ca81d7a0
JD
18699if { (ac_try="$ac_compile"
18700case "(($ac_try" in
18701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18702 *) ac_try_echo=$ac_try;;
18703esac
18704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18705 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18706 ac_status=$?
edfaf76d
LK
18707 grep -v '^ *+' conftest.er1 >conftest.err
18708 rm -f conftest.er1
18709 cat conftest.err >&5
cd958eb3 18710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18711 (exit $ac_status); } && {
18712 test -z "$ac_c_werror_flag" ||
18713 test ! -s conftest.err
18714 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18715 ac_cv_func_getpgrp_void=no
18716else
18717 echo "$as_me: failed program was:" >&5
19650fd6
AS
18718sed 's/^/| /' conftest.$ac_ext >&5
18719
ca81d7a0 18720 ac_cv_func_getpgrp_void=yes
cd958eb3 18721fi
ca81d7a0
JD
18722
18723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18724
18725fi
ca81d7a0
JD
18726{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18727echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18728if test $ac_cv_func_getpgrp_void = yes; then
18729
18730cat >>confdefs.h <<\_ACEOF
18731#define GETPGRP_VOID 1
18732_ACEOF
18733
18734fi
18735
18736
973a76b1
DL
18737
18738for ac_func in strftime
18739do
18740as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18741{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18742echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18743if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18744 echo $ECHO_N "(cached) $ECHO_C" >&6
18745else
18746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18747/* confdefs.h. */
18748_ACEOF
18749cat confdefs.h >>conftest.$ac_ext
18750cat >>conftest.$ac_ext <<_ACEOF
18751/* end confdefs.h. */
edfaf76d
LK
18752/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18753 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18754#define $ac_func innocuous_$ac_func
18755
973a76b1 18756/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18757 which can conflict with char $ac_func (); below.
18758 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18759 <limits.h> exists even on freestanding compilers. */
edfaf76d 18760
19650fd6
AS
18761#ifdef __STDC__
18762# include <limits.h>
18763#else
18764# include <assert.h>
18765#endif
edfaf76d
LK
18766
18767#undef $ac_func
18768
ca81d7a0
JD
18769/* Override any GCC internal prototype to avoid an error.
18770 Use char because int might match the return type of a GCC
18771 builtin and then its argument prototype would still apply. */
973a76b1
DL
18772#ifdef __cplusplus
18773extern "C"
973a76b1 18774#endif
973a76b1
DL
18775char $ac_func ();
18776/* The GNU C library defines this for functions which it implements
18777 to always fail with ENOSYS. Some functions are actually named
18778 something starting with __ and the normal name is an alias. */
ca81d7a0 18779#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 18780choke me
973a76b1
DL
18781#endif
18782
19650fd6
AS
18783int
18784main ()
18785{
ca81d7a0 18786return $ac_func ();
973a76b1
DL
18787 ;
18788 return 0;
18789}
18790_ACEOF
18791rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18792if { (ac_try="$ac_link"
18793case "(($ac_try" in
18794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18795 *) ac_try_echo=$ac_try;;
18796esac
18797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18798 (eval "$ac_link") 2>conftest.er1
973a76b1 18799 ac_status=$?
edfaf76d
LK
18800 grep -v '^ *+' conftest.er1 >conftest.err
18801 rm -f conftest.er1
18802 cat conftest.err >&5
973a76b1 18803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18804 (exit $ac_status); } && {
18805 test -z "$ac_c_werror_flag" ||
18806 test ! -s conftest.err
18807 } && test -s conftest$ac_exeext &&
18808 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18809 eval "$as_ac_var=yes"
18810else
18811 echo "$as_me: failed program was:" >&5
19650fd6
AS
18812sed 's/^/| /' conftest.$ac_ext >&5
18813
ca81d7a0 18814 eval "$as_ac_var=no"
973a76b1 18815fi
ca81d7a0 18816
f053c89f 18817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18818 conftest$ac_exeext conftest.$ac_ext
973a76b1 18819fi
ca81d7a0
JD
18820ac_res=`eval echo '${'$as_ac_var'}'`
18821 { echo "$as_me:$LINENO: result: $ac_res" >&5
18822echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
18823if test `eval echo '${'$as_ac_var'}'` = yes; then
18824 cat >>confdefs.h <<_ACEOF
18825#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18826_ACEOF
18827
18828else
18829 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
18830{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18831echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
18832if test "${ac_cv_lib_intl_strftime+set}" = set; then
18833 echo $ECHO_N "(cached) $ECHO_C" >&6
18834else
18835 ac_check_lib_save_LIBS=$LIBS
18836LIBS="-lintl $LIBS"
18837cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18838/* confdefs.h. */
18839_ACEOF
18840cat confdefs.h >>conftest.$ac_ext
18841cat >>conftest.$ac_ext <<_ACEOF
18842/* end confdefs.h. */
973a76b1 18843
ca81d7a0
JD
18844/* Override any GCC internal prototype to avoid an error.
18845 Use char because int might match the return type of a GCC
18846 builtin and then its argument prototype would still apply. */
973a76b1
DL
18847#ifdef __cplusplus
18848extern "C"
18849#endif
973a76b1
DL
18850char strftime ();
18851int
18852main ()
18853{
ca81d7a0 18854return strftime ();
973a76b1
DL
18855 ;
18856 return 0;
18857}
18858_ACEOF
18859rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18860if { (ac_try="$ac_link"
18861case "(($ac_try" in
18862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18863 *) ac_try_echo=$ac_try;;
18864esac
18865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18866 (eval "$ac_link") 2>conftest.er1
973a76b1 18867 ac_status=$?
edfaf76d
LK
18868 grep -v '^ *+' conftest.er1 >conftest.err
18869 rm -f conftest.er1
18870 cat conftest.err >&5
973a76b1 18871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18872 (exit $ac_status); } && {
18873 test -z "$ac_c_werror_flag" ||
18874 test ! -s conftest.err
18875 } && test -s conftest$ac_exeext &&
18876 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18877 ac_cv_lib_intl_strftime=yes
18878else
18879 echo "$as_me: failed program was:" >&5
19650fd6
AS
18880sed 's/^/| /' conftest.$ac_ext >&5
18881
ca81d7a0 18882 ac_cv_lib_intl_strftime=no
973a76b1 18883fi
ca81d7a0 18884
f053c89f 18885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18886 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18887LIBS=$ac_check_lib_save_LIBS
18888fi
ca81d7a0
JD
18889{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18890echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
18891if test $ac_cv_lib_intl_strftime = yes; then
18892 cat >>confdefs.h <<\_ACEOF
18893#define HAVE_STRFTIME 1
18894_ACEOF
18895
18896LIBS="-lintl $LIBS"
18897fi
18898
18899fi
18900done
18901
18902
b936fae4
AS
18903# UNIX98 PTYs.
18904
18905for ac_func in grantpt
503d2be0
AS
18906do
18907as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18908{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18909echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18910if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18911 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18912else
503d2be0 18913 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18914/* confdefs.h. */
18915_ACEOF
18916cat confdefs.h >>conftest.$ac_ext
18917cat >>conftest.$ac_ext <<_ACEOF
18918/* end confdefs.h. */
edfaf76d
LK
18919/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18920 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18921#define $ac_func innocuous_$ac_func
18922
503d2be0 18923/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18924 which can conflict with char $ac_func (); below.
18925 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18926 <limits.h> exists even on freestanding compilers. */
edfaf76d 18927
19650fd6
AS
18928#ifdef __STDC__
18929# include <limits.h>
18930#else
18931# include <assert.h>
18932#endif
edfaf76d
LK
18933
18934#undef $ac_func
18935
ca81d7a0
JD
18936/* Override any GCC internal prototype to avoid an error.
18937 Use char because int might match the return type of a GCC
18938 builtin and then its argument prototype would still apply. */
503d2be0
AS
18939#ifdef __cplusplus
18940extern "C"
18941#endif
503d2be0 18942char $ac_func ();
503d2be0
AS
18943/* The GNU C library defines this for functions which it implements
18944 to always fail with ENOSYS. Some functions are actually named
18945 something starting with __ and the normal name is an alias. */
ca81d7a0 18946#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 18947choke me
503d2be0 18948#endif
4c343001 18949
19650fd6
AS
18950int
18951main ()
18952{
ca81d7a0 18953return $ac_func ();
503d2be0
AS
18954 ;
18955 return 0;
18956}
18957_ACEOF
18958rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18959if { (ac_try="$ac_link"
18960case "(($ac_try" in
18961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18962 *) ac_try_echo=$ac_try;;
18963esac
18964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18965 (eval "$ac_link") 2>conftest.er1
503d2be0 18966 ac_status=$?
edfaf76d
LK
18967 grep -v '^ *+' conftest.er1 >conftest.err
18968 rm -f conftest.er1
18969 cat conftest.err >&5
c0d27fcc 18970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18971 (exit $ac_status); } && {
18972 test -z "$ac_c_werror_flag" ||
18973 test ! -s conftest.err
18974 } && test -s conftest$ac_exeext &&
18975 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18976 eval "$as_ac_var=yes"
18977else
18978 echo "$as_me: failed program was:" >&5
19650fd6
AS
18979sed 's/^/| /' conftest.$ac_ext >&5
18980
ca81d7a0 18981 eval "$as_ac_var=no"
503d2be0 18982fi
ca81d7a0 18983
f053c89f 18984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18985 conftest$ac_exeext conftest.$ac_ext
503d2be0 18986fi
ca81d7a0
JD
18987ac_res=`eval echo '${'$as_ac_var'}'`
18988 { echo "$as_me:$LINENO: result: $ac_res" >&5
18989echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18990if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18991 cat >>confdefs.h <<_ACEOF
503d2be0 18992#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18993_ACEOF
4c343001
DL
18994
18995fi
503d2be0
AS
18996done
18997
c0d27fcc 18998
b936fae4 18999# PTY-related GNU extensions.
4c343001 19000
b936fae4
AS
19001for ac_func in getpt
19002do
19003as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19004{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19005echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19006if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19007 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19008else
b936fae4 19009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19010/* confdefs.h. */
19011_ACEOF
19012cat confdefs.h >>conftest.$ac_ext
19013cat >>conftest.$ac_ext <<_ACEOF
19014/* end confdefs.h. */
edfaf76d
LK
19015/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19016 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19017#define $ac_func innocuous_$ac_func
19018
087121cc 19019/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19020 which can conflict with char $ac_func (); below.
19021 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19022 <limits.h> exists even on freestanding compilers. */
edfaf76d 19023
19650fd6
AS
19024#ifdef __STDC__
19025# include <limits.h>
19026#else
19027# include <assert.h>
19028#endif
edfaf76d
LK
19029
19030#undef $ac_func
19031
ca81d7a0
JD
19032/* Override any GCC internal prototype to avoid an error.
19033 Use char because int might match the return type of a GCC
19034 builtin and then its argument prototype would still apply. */
503d2be0
AS
19035#ifdef __cplusplus
19036extern "C"
19037#endif
503d2be0 19038char $ac_func ();
087121cc
GM
19039/* The GNU C library defines this for functions which it implements
19040 to always fail with ENOSYS. Some functions are actually named
19041 something starting with __ and the normal name is an alias. */
ca81d7a0 19042#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19043choke me
087121cc
GM
19044#endif
19045
19650fd6
AS
19046int
19047main ()
19048{
ca81d7a0 19049return $ac_func ();
503d2be0
AS
19050 ;
19051 return 0;
19052}
19053_ACEOF
19054rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19055if { (ac_try="$ac_link"
19056case "(($ac_try" in
19057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19058 *) ac_try_echo=$ac_try;;
19059esac
19060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19061 (eval "$ac_link") 2>conftest.er1
503d2be0 19062 ac_status=$?
f053c89f
CY
19063 grep -v '^ *+' conftest.er1 >conftest.err
19064 rm -f conftest.er1
19065 cat conftest.err >&5
c0d27fcc 19066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19067 (exit $ac_status); } && {
19068 test -z "$ac_c_werror_flag" ||
19069 test ! -s conftest.err
19070 } && test -s conftest$ac_exeext &&
19071 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19072 eval "$as_ac_var=yes"
19073else
19074 echo "$as_me: failed program was:" >&5
19650fd6
AS
19075sed 's/^/| /' conftest.$ac_ext >&5
19076
ca81d7a0 19077 eval "$as_ac_var=no"
503d2be0 19078fi
ca81d7a0 19079
f053c89f 19080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19081 conftest$ac_exeext conftest.$ac_ext
503d2be0 19082fi
ca81d7a0
JD
19083ac_res=`eval echo '${'$as_ac_var'}'`
19084 { echo "$as_me:$LINENO: result: $ac_res" >&5
19085echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19086if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19087 cat >>confdefs.h <<_ACEOF
503d2be0 19088#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19089_ACEOF
087121cc 19090
087121cc
GM
19091fi
19092done
19093
c0d27fcc 19094
ba4481b5
DL
19095# Check this now, so that we will NOT find the above functions in ncurses.
19096# That is because we have not set up to link ncurses in lib-src.
19097# It's better to believe a function is not available
19098# than to expect to find it in ncurses.
503d2be0 19099
ca81d7a0
JD
19100{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19101echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19102if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19103 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19104else
503d2be0 19105 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19106LIBS="-lncurses $LIBS"
503d2be0 19107cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19108/* confdefs.h. */
19109_ACEOF
19110cat confdefs.h >>conftest.$ac_ext
19111cat >>conftest.$ac_ext <<_ACEOF
19112/* end confdefs.h. */
503d2be0 19113
ca81d7a0
JD
19114/* Override any GCC internal prototype to avoid an error.
19115 Use char because int might match the return type of a GCC
19116 builtin and then its argument prototype would still apply. */
503d2be0
AS
19117#ifdef __cplusplus
19118extern "C"
19119#endif
503d2be0
AS
19120char tparm ();
19121int
19122main ()
19123{
ca81d7a0 19124return tparm ();
503d2be0
AS
19125 ;
19126 return 0;
19127}
19128_ACEOF
19129rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19130if { (ac_try="$ac_link"
19131case "(($ac_try" in
19132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19133 *) ac_try_echo=$ac_try;;
19134esac
19135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19136 (eval "$ac_link") 2>conftest.er1
503d2be0 19137 ac_status=$?
edfaf76d
LK
19138 grep -v '^ *+' conftest.er1 >conftest.err
19139 rm -f conftest.er1
19140 cat conftest.err >&5
c0d27fcc 19141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19142 (exit $ac_status); } && {
19143 test -z "$ac_c_werror_flag" ||
19144 test ! -s conftest.err
19145 } && test -s conftest$ac_exeext &&
19146 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19147 ac_cv_lib_ncurses_tparm=yes
19148else
19149 echo "$as_me: failed program was:" >&5
19650fd6
AS
19150sed 's/^/| /' conftest.$ac_ext >&5
19151
ca81d7a0 19152 ac_cv_lib_ncurses_tparm=no
503d2be0 19153fi
ca81d7a0 19154
f053c89f 19155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19156 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19157LIBS=$ac_check_lib_save_LIBS
19158fi
ca81d7a0
JD
19159{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19160echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19161if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19162 cat >>confdefs.h <<_ACEOF
503d2be0 19163#define HAVE_LIBNCURSES 1
c0d27fcc 19164_ACEOF
ba4481b5
DL
19165
19166 LIBS="-lncurses $LIBS"
19167
ba4481b5
DL
19168fi
19169
c0d27fcc 19170
84e70f78
KR
19171# Do we need the Hesiod library to provide the support routines?
19172if test "$with_hesiod" = yes ; then
19173 # Don't set $LIBS here -- see comments above.
19174 resolv=no
ca81d7a0
JD
19175 { echo "$as_me:$LINENO: checking for res_send" >&5
19176echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19177if test "${ac_cv_func_res_send+set}" = set; then
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
19179else
19180 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19181/* confdefs.h. */
19182_ACEOF
19183cat confdefs.h >>conftest.$ac_ext
19184cat >>conftest.$ac_ext <<_ACEOF
19185/* end confdefs.h. */
edfaf76d
LK
19186/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19187 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19188#define res_send innocuous_res_send
19189
84e70f78 19190/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19191 which can conflict with char res_send (); below.
19192 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19193 <limits.h> exists even on freestanding compilers. */
edfaf76d 19194
19650fd6
AS
19195#ifdef __STDC__
19196# include <limits.h>
19197#else
19198# include <assert.h>
19199#endif
edfaf76d
LK
19200
19201#undef res_send
19202
ca81d7a0
JD
19203/* Override any GCC internal prototype to avoid an error.
19204 Use char because int might match the return type of a GCC
19205 builtin and then its argument prototype would still apply. */
84e70f78
KR
19206#ifdef __cplusplus
19207extern "C"
19208#endif
84e70f78 19209char res_send ();
84e70f78
KR
19210/* The GNU C library defines this for functions which it implements
19211 to always fail with ENOSYS. Some functions are actually named
19212 something starting with __ and the normal name is an alias. */
ca81d7a0 19213#if defined __stub_res_send || defined __stub___res_send
84e70f78 19214choke me
cd958eb3
MB
19215#endif
19216
19650fd6
AS
19217int
19218main ()
19219{
ca81d7a0 19220return res_send ();
84e70f78
KR
19221 ;
19222 return 0;
19223}
19224_ACEOF
19225rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19226if { (ac_try="$ac_link"
19227case "(($ac_try" in
19228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19229 *) ac_try_echo=$ac_try;;
19230esac
19231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19232 (eval "$ac_link") 2>conftest.er1
84e70f78 19233 ac_status=$?
edfaf76d
LK
19234 grep -v '^ *+' conftest.er1 >conftest.err
19235 rm -f conftest.er1
19236 cat conftest.err >&5
c0d27fcc 19237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19238 (exit $ac_status); } && {
19239 test -z "$ac_c_werror_flag" ||
19240 test ! -s conftest.err
19241 } && test -s conftest$ac_exeext &&
19242 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19243 ac_cv_func_res_send=yes
19244else
19245 echo "$as_me: failed program was:" >&5
19650fd6
AS
19246sed 's/^/| /' conftest.$ac_ext >&5
19247
ca81d7a0 19248 ac_cv_func_res_send=no
84e70f78 19249fi
ca81d7a0 19250
f053c89f 19251rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19252 conftest$ac_exeext conftest.$ac_ext
84e70f78 19253fi
ca81d7a0
JD
19254{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19255echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19256if test $ac_cv_func_res_send = yes; then
19257 :
19258else
ca81d7a0
JD
19259 { echo "$as_me:$LINENO: checking for __res_send" >&5
19260echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19261if test "${ac_cv_func___res_send+set}" = set; then
19262 echo $ECHO_N "(cached) $ECHO_C" >&6
19263else
19264 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19265/* confdefs.h. */
19266_ACEOF
19267cat confdefs.h >>conftest.$ac_ext
19268cat >>conftest.$ac_ext <<_ACEOF
19269/* end confdefs.h. */
edfaf76d
LK
19270/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19271 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19272#define __res_send innocuous___res_send
19273
84e70f78 19274/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19275 which can conflict with char __res_send (); below.
19276 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19277 <limits.h> exists even on freestanding compilers. */
edfaf76d 19278
19650fd6
AS
19279#ifdef __STDC__
19280# include <limits.h>
19281#else
19282# include <assert.h>
19283#endif
edfaf76d
LK
19284
19285#undef __res_send
19286
ca81d7a0
JD
19287/* Override any GCC internal prototype to avoid an error.
19288 Use char because int might match the return type of a GCC
19289 builtin and then its argument prototype would still apply. */
84e70f78
KR
19290#ifdef __cplusplus
19291extern "C"
19292#endif
84e70f78 19293char __res_send ();
84e70f78
KR
19294/* The GNU C library defines this for functions which it implements
19295 to always fail with ENOSYS. Some functions are actually named
19296 something starting with __ and the normal name is an alias. */
ca81d7a0 19297#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19298choke me
84e70f78
KR
19299#endif
19300
19650fd6
AS
19301int
19302main ()
19303{
ca81d7a0 19304return __res_send ();
84e70f78
KR
19305 ;
19306 return 0;
19307}
19308_ACEOF
19309rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19310if { (ac_try="$ac_link"
19311case "(($ac_try" in
19312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19313 *) ac_try_echo=$ac_try;;
19314esac
19315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19316 (eval "$ac_link") 2>conftest.er1
84e70f78 19317 ac_status=$?
edfaf76d
LK
19318 grep -v '^ *+' conftest.er1 >conftest.err
19319 rm -f conftest.er1
19320 cat conftest.err >&5
c0d27fcc 19321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19322 (exit $ac_status); } && {
19323 test -z "$ac_c_werror_flag" ||
19324 test ! -s conftest.err
19325 } && test -s conftest$ac_exeext &&
19326 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19327 ac_cv_func___res_send=yes
19328else
19329 echo "$as_me: failed program was:" >&5
19650fd6
AS
19330sed 's/^/| /' conftest.$ac_ext >&5
19331
ca81d7a0 19332 ac_cv_func___res_send=no
84e70f78 19333fi
ca81d7a0 19334
f053c89f 19335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19336 conftest$ac_exeext conftest.$ac_ext
84e70f78 19337fi
ca81d7a0
JD
19338{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19339echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19340if test $ac_cv_func___res_send = yes; then
19341 :
19342else
ca81d7a0
JD
19343 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19344echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19345if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19346 echo $ECHO_N "(cached) $ECHO_C" >&6
19347else
19348 ac_check_lib_save_LIBS=$LIBS
19349LIBS="-lresolv $LIBS"
19350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19351/* confdefs.h. */
19352_ACEOF
19353cat confdefs.h >>conftest.$ac_ext
19354cat >>conftest.$ac_ext <<_ACEOF
19355/* end confdefs.h. */
84e70f78 19356
ca81d7a0
JD
19357/* Override any GCC internal prototype to avoid an error.
19358 Use char because int might match the return type of a GCC
19359 builtin and then its argument prototype would still apply. */
84e70f78
KR
19360#ifdef __cplusplus
19361extern "C"
19362#endif
84e70f78
KR
19363char res_send ();
19364int
19365main ()
19366{
ca81d7a0 19367return res_send ();
84e70f78
KR
19368 ;
19369 return 0;
19370}
19371_ACEOF
19372rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19373if { (ac_try="$ac_link"
19374case "(($ac_try" in
19375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19376 *) ac_try_echo=$ac_try;;
19377esac
19378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19379 (eval "$ac_link") 2>conftest.er1
84e70f78 19380 ac_status=$?
edfaf76d
LK
19381 grep -v '^ *+' conftest.er1 >conftest.err
19382 rm -f conftest.er1
19383 cat conftest.err >&5
c0d27fcc 19384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19385 (exit $ac_status); } && {
19386 test -z "$ac_c_werror_flag" ||
19387 test ! -s conftest.err
19388 } && test -s conftest$ac_exeext &&
19389 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19390 ac_cv_lib_resolv_res_send=yes
19391else
19392 echo "$as_me: failed program was:" >&5
19650fd6
AS
19393sed 's/^/| /' conftest.$ac_ext >&5
19394
ca81d7a0 19395 ac_cv_lib_resolv_res_send=no
84e70f78 19396fi
ca81d7a0 19397
f053c89f 19398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19399 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19400LIBS=$ac_check_lib_save_LIBS
19401fi
ca81d7a0
JD
19402{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19403echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19404if test $ac_cv_lib_resolv_res_send = yes; then
19405 resolv=yes
19406else
ca81d7a0
JD
19407 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19408echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19409if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19410 echo $ECHO_N "(cached) $ECHO_C" >&6
19411else
19412 ac_check_lib_save_LIBS=$LIBS
19413LIBS="-lresolv $LIBS"
19414cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19415/* confdefs.h. */
19416_ACEOF
19417cat confdefs.h >>conftest.$ac_ext
19418cat >>conftest.$ac_ext <<_ACEOF
19419/* end confdefs.h. */
84e70f78 19420
ca81d7a0
JD
19421/* Override any GCC internal prototype to avoid an error.
19422 Use char because int might match the return type of a GCC
19423 builtin and then its argument prototype would still apply. */
84e70f78
KR
19424#ifdef __cplusplus
19425extern "C"
19426#endif
84e70f78
KR
19427char __res_send ();
19428int
19429main ()
19430{
ca81d7a0 19431return __res_send ();
84e70f78
KR
19432 ;
19433 return 0;
19434}
19435_ACEOF
19436rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19437if { (ac_try="$ac_link"
19438case "(($ac_try" in
19439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19440 *) ac_try_echo=$ac_try;;
19441esac
19442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19443 (eval "$ac_link") 2>conftest.er1
84e70f78 19444 ac_status=$?
edfaf76d
LK
19445 grep -v '^ *+' conftest.er1 >conftest.err
19446 rm -f conftest.er1
19447 cat conftest.err >&5
c0d27fcc 19448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19449 (exit $ac_status); } && {
19450 test -z "$ac_c_werror_flag" ||
19451 test ! -s conftest.err
19452 } && test -s conftest$ac_exeext &&
19453 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19454 ac_cv_lib_resolv___res_send=yes
19455else
19456 echo "$as_me: failed program was:" >&5
19650fd6
AS
19457sed 's/^/| /' conftest.$ac_ext >&5
19458
ca81d7a0 19459 ac_cv_lib_resolv___res_send=no
84e70f78 19460fi
ca81d7a0 19461
f053c89f 19462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19463 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19464LIBS=$ac_check_lib_save_LIBS
19465fi
ca81d7a0
JD
19466{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19467echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19468if test $ac_cv_lib_resolv___res_send = yes; then
19469 resolv=yes
19470fi
19471
19472fi
19473
19474fi
19475
19476fi
19477
19478 if test "$resolv" = yes ; then
19479 RESOLVLIB=-lresolv
b936fae4 19480
c0d27fcc 19481cat >>confdefs.h <<\_ACEOF
84e70f78 19482#define HAVE_LIBRESOLV 1
c0d27fcc 19483_ACEOF
84e70f78
KR
19484
19485 else
19486 RESOLVLIB=
19487 fi
ca81d7a0
JD
19488 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19489echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19490if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19491 echo $ECHO_N "(cached) $ECHO_C" >&6
19492else
19493 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19494/* confdefs.h. */
19495_ACEOF
19496cat confdefs.h >>conftest.$ac_ext
19497cat >>conftest.$ac_ext <<_ACEOF
19498/* end confdefs.h. */
edfaf76d
LK
19499/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19501#define hes_getmailhost innocuous_hes_getmailhost
19502
84e70f78 19503/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19504 which can conflict with char hes_getmailhost (); below.
19505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19506 <limits.h> exists even on freestanding compilers. */
edfaf76d 19507
19650fd6
AS
19508#ifdef __STDC__
19509# include <limits.h>
19510#else
19511# include <assert.h>
19512#endif
edfaf76d
LK
19513
19514#undef hes_getmailhost
19515
ca81d7a0
JD
19516/* Override any GCC internal prototype to avoid an error.
19517 Use char because int might match the return type of a GCC
19518 builtin and then its argument prototype would still apply. */
84e70f78
KR
19519#ifdef __cplusplus
19520extern "C"
19521#endif
84e70f78 19522char hes_getmailhost ();
84e70f78
KR
19523/* The GNU C library defines this for functions which it implements
19524 to always fail with ENOSYS. Some functions are actually named
19525 something starting with __ and the normal name is an alias. */
ca81d7a0 19526#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19527choke me
cd958eb3
MB
19528#endif
19529
19650fd6
AS
19530int
19531main ()
19532{
ca81d7a0 19533return hes_getmailhost ();
84e70f78
KR
19534 ;
19535 return 0;
19536}
19537_ACEOF
19538rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19539if { (ac_try="$ac_link"
19540case "(($ac_try" in
19541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19542 *) ac_try_echo=$ac_try;;
19543esac
19544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19545 (eval "$ac_link") 2>conftest.er1
84e70f78 19546 ac_status=$?
edfaf76d
LK
19547 grep -v '^ *+' conftest.er1 >conftest.err
19548 rm -f conftest.er1
19549 cat conftest.err >&5
c0d27fcc 19550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19551 (exit $ac_status); } && {
19552 test -z "$ac_c_werror_flag" ||
19553 test ! -s conftest.err
19554 } && test -s conftest$ac_exeext &&
19555 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19556 ac_cv_func_hes_getmailhost=yes
19557else
19558 echo "$as_me: failed program was:" >&5
19650fd6
AS
19559sed 's/^/| /' conftest.$ac_ext >&5
19560
ca81d7a0 19561 ac_cv_func_hes_getmailhost=no
84e70f78 19562fi
ca81d7a0 19563
f053c89f 19564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19565 conftest$ac_exeext conftest.$ac_ext
84e70f78 19566fi
ca81d7a0
JD
19567{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19568echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19569if test $ac_cv_func_hes_getmailhost = yes; then
19570 :
19571else
ca81d7a0
JD
19572 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19573echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19574if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19575 echo $ECHO_N "(cached) $ECHO_C" >&6
19576else
19577 ac_check_lib_save_LIBS=$LIBS
19578LIBS="-lhesiod $RESOLVLIB $LIBS"
19579cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19580/* confdefs.h. */
19581_ACEOF
19582cat confdefs.h >>conftest.$ac_ext
19583cat >>conftest.$ac_ext <<_ACEOF
19584/* end confdefs.h. */
84e70f78 19585
ca81d7a0
JD
19586/* Override any GCC internal prototype to avoid an error.
19587 Use char because int might match the return type of a GCC
19588 builtin and then its argument prototype would still apply. */
84e70f78
KR
19589#ifdef __cplusplus
19590extern "C"
19591#endif
84e70f78
KR
19592char hes_getmailhost ();
19593int
19594main ()
19595{
ca81d7a0 19596return hes_getmailhost ();
84e70f78
KR
19597 ;
19598 return 0;
19599}
19600_ACEOF
19601rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19602if { (ac_try="$ac_link"
19603case "(($ac_try" in
19604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19605 *) ac_try_echo=$ac_try;;
19606esac
19607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19608 (eval "$ac_link") 2>conftest.er1
84e70f78 19609 ac_status=$?
edfaf76d
LK
19610 grep -v '^ *+' conftest.er1 >conftest.err
19611 rm -f conftest.er1
19612 cat conftest.err >&5
c0d27fcc 19613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19614 (exit $ac_status); } && {
19615 test -z "$ac_c_werror_flag" ||
19616 test ! -s conftest.err
19617 } && test -s conftest$ac_exeext &&
19618 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19619 ac_cv_lib_hesiod_hes_getmailhost=yes
19620else
19621 echo "$as_me: failed program was:" >&5
19650fd6
AS
19622sed 's/^/| /' conftest.$ac_ext >&5
19623
ca81d7a0 19624 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19625fi
ca81d7a0 19626
f053c89f 19627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19628 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19629LIBS=$ac_check_lib_save_LIBS
19630fi
ca81d7a0
JD
19631{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19632echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19633if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19634
c0d27fcc 19635cat >>confdefs.h <<\_ACEOF
84e70f78 19636#define HAVE_LIBHESIOD 1
c0d27fcc 19637_ACEOF
84e70f78
KR
19638
19639else
19640 :
19641fi
19642
19643fi
19644
19645fi
19646
a21616bd
KR
19647# These tell us which Kerberos-related libraries to use.
19648if test "${with_kerberos+set}" = set; then
503d2be0 19649
ca81d7a0
JD
19650{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19651echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19652if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19653 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19654else
503d2be0 19655 ac_check_lib_save_LIBS=$LIBS
a21616bd 19656LIBS="-lcom_err $LIBS"
503d2be0 19657cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19658/* confdefs.h. */
19659_ACEOF
19660cat confdefs.h >>conftest.$ac_ext
19661cat >>conftest.$ac_ext <<_ACEOF
19662/* end confdefs.h. */
503d2be0 19663
ca81d7a0
JD
19664/* Override any GCC internal prototype to avoid an error.
19665 Use char because int might match the return type of a GCC
19666 builtin and then its argument prototype would still apply. */
503d2be0
AS
19667#ifdef __cplusplus
19668extern "C"
19669#endif
503d2be0
AS
19670char com_err ();
19671int
19672main ()
19673{
ca81d7a0 19674return com_err ();
503d2be0
AS
19675 ;
19676 return 0;
19677}
19678_ACEOF
19679rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19680if { (ac_try="$ac_link"
19681case "(($ac_try" in
19682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19683 *) ac_try_echo=$ac_try;;
19684esac
19685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19686 (eval "$ac_link") 2>conftest.er1
503d2be0 19687 ac_status=$?
edfaf76d
LK
19688 grep -v '^ *+' conftest.er1 >conftest.err
19689 rm -f conftest.er1
19690 cat conftest.err >&5
c0d27fcc 19691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19692 (exit $ac_status); } && {
19693 test -z "$ac_c_werror_flag" ||
19694 test ! -s conftest.err
19695 } && test -s conftest$ac_exeext &&
19696 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19697 ac_cv_lib_com_err_com_err=yes
19698else
19699 echo "$as_me: failed program was:" >&5
19650fd6
AS
19700sed 's/^/| /' conftest.$ac_ext >&5
19701
ca81d7a0 19702 ac_cv_lib_com_err_com_err=no
503d2be0 19703fi
ca81d7a0 19704
f053c89f 19705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19706 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19707LIBS=$ac_check_lib_save_LIBS
19708fi
ca81d7a0
JD
19709{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19710echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19711if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19712 cat >>confdefs.h <<_ACEOF
503d2be0 19713#define HAVE_LIBCOM_ERR 1
c0d27fcc 19714_ACEOF
a21616bd
KR
19715
19716 LIBS="-lcom_err $LIBS"
19717
a21616bd
KR
19718fi
19719
c0d27fcc 19720
ca81d7a0
JD
19721{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19722echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19723if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19724 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19725else
503d2be0 19726 ac_check_lib_save_LIBS=$LIBS
a21616bd 19727LIBS="-lk5crypto $LIBS"
503d2be0 19728cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19729/* confdefs.h. */
19730_ACEOF
19731cat confdefs.h >>conftest.$ac_ext
19732cat >>conftest.$ac_ext <<_ACEOF
19733/* end confdefs.h. */
503d2be0 19734
ca81d7a0
JD
19735/* Override any GCC internal prototype to avoid an error.
19736 Use char because int might match the return type of a GCC
19737 builtin and then its argument prototype would still apply. */
503d2be0
AS
19738#ifdef __cplusplus
19739extern "C"
19740#endif
503d2be0
AS
19741char mit_des_cbc_encrypt ();
19742int
19743main ()
19744{
ca81d7a0 19745return mit_des_cbc_encrypt ();
503d2be0
AS
19746 ;
19747 return 0;
19748}
19749_ACEOF
19750rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19751if { (ac_try="$ac_link"
19752case "(($ac_try" in
19753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19754 *) ac_try_echo=$ac_try;;
19755esac
19756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19757 (eval "$ac_link") 2>conftest.er1
503d2be0 19758 ac_status=$?
edfaf76d
LK
19759 grep -v '^ *+' conftest.er1 >conftest.err
19760 rm -f conftest.er1
19761 cat conftest.err >&5
c0d27fcc 19762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19763 (exit $ac_status); } && {
19764 test -z "$ac_c_werror_flag" ||
19765 test ! -s conftest.err
19766 } && test -s conftest$ac_exeext &&
19767 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19768 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19769else
19770 echo "$as_me: failed program was:" >&5
19650fd6
AS
19771sed 's/^/| /' conftest.$ac_ext >&5
19772
ca81d7a0 19773 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 19774fi
ca81d7a0 19775
f053c89f 19776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19777 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19778LIBS=$ac_check_lib_save_LIBS
19779fi
ca81d7a0
JD
19780{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
19781echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19782if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19783 cat >>confdefs.h <<_ACEOF
503d2be0 19784#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19785_ACEOF
a21616bd
KR
19786
19787 LIBS="-lk5crypto $LIBS"
19788
a21616bd
KR
19789fi
19790
c0d27fcc 19791
ca81d7a0
JD
19792{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
19793echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
19794if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19795 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19796else
503d2be0 19797 ac_check_lib_save_LIBS=$LIBS
a21616bd 19798LIBS="-lcrypto $LIBS"
503d2be0 19799cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19800/* confdefs.h. */
19801_ACEOF
19802cat confdefs.h >>conftest.$ac_ext
19803cat >>conftest.$ac_ext <<_ACEOF
19804/* end confdefs.h. */
503d2be0 19805
ca81d7a0
JD
19806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
503d2be0
AS
19809#ifdef __cplusplus
19810extern "C"
19811#endif
503d2be0
AS
19812char mit_des_cbc_encrypt ();
19813int
19814main ()
19815{
ca81d7a0 19816return mit_des_cbc_encrypt ();
503d2be0
AS
19817 ;
19818 return 0;
19819}
19820_ACEOF
19821rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19822if { (ac_try="$ac_link"
19823case "(($ac_try" in
19824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825 *) ac_try_echo=$ac_try;;
19826esac
19827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19828 (eval "$ac_link") 2>conftest.er1
503d2be0 19829 ac_status=$?
edfaf76d
LK
19830 grep -v '^ *+' conftest.er1 >conftest.err
19831 rm -f conftest.er1
19832 cat conftest.err >&5
c0d27fcc 19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19834 (exit $ac_status); } && {
19835 test -z "$ac_c_werror_flag" ||
19836 test ! -s conftest.err
19837 } && test -s conftest$ac_exeext &&
19838 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19839 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19840else
19841 echo "$as_me: failed program was:" >&5
19650fd6
AS
19842sed 's/^/| /' conftest.$ac_ext >&5
19843
ca81d7a0 19844 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 19845fi
ca81d7a0 19846
f053c89f 19847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19848 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19849LIBS=$ac_check_lib_save_LIBS
19850fi
ca81d7a0
JD
19851{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
19852echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19853if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19854 cat >>confdefs.h <<_ACEOF
503d2be0 19855#define HAVE_LIBCRYPTO 1
c0d27fcc 19856_ACEOF
a21616bd
KR
19857
19858 LIBS="-lcrypto $LIBS"
19859
a21616bd
KR
19860fi
19861
c0d27fcc 19862
ca81d7a0
JD
19863{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
19864echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
19865if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19866 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19867else
503d2be0 19868 ac_check_lib_save_LIBS=$LIBS
a21616bd 19869LIBS="-lkrb5 $LIBS"
503d2be0 19870cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19871/* confdefs.h. */
19872_ACEOF
19873cat confdefs.h >>conftest.$ac_ext
19874cat >>conftest.$ac_ext <<_ACEOF
19875/* end confdefs.h. */
a21616bd 19876
ca81d7a0
JD
19877/* Override any GCC internal prototype to avoid an error.
19878 Use char because int might match the return type of a GCC
19879 builtin and then its argument prototype would still apply. */
503d2be0
AS
19880#ifdef __cplusplus
19881extern "C"
19882#endif
503d2be0
AS
19883char krb5_init_context ();
19884int
19885main ()
19886{
ca81d7a0 19887return krb5_init_context ();
503d2be0
AS
19888 ;
19889 return 0;
19890}
19891_ACEOF
19892rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19893if { (ac_try="$ac_link"
19894case "(($ac_try" in
19895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19896 *) ac_try_echo=$ac_try;;
19897esac
19898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19899 (eval "$ac_link") 2>conftest.er1
503d2be0 19900 ac_status=$?
edfaf76d
LK
19901 grep -v '^ *+' conftest.er1 >conftest.err
19902 rm -f conftest.er1
19903 cat conftest.err >&5
c0d27fcc 19904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19905 (exit $ac_status); } && {
19906 test -z "$ac_c_werror_flag" ||
19907 test ! -s conftest.err
19908 } && test -s conftest$ac_exeext &&
19909 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19910 ac_cv_lib_krb5_krb5_init_context=yes
19911else
19912 echo "$as_me: failed program was:" >&5
19650fd6
AS
19913sed 's/^/| /' conftest.$ac_ext >&5
19914
ca81d7a0 19915 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 19916fi
ca81d7a0 19917
f053c89f 19918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19919 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19920LIBS=$ac_check_lib_save_LIBS
19921fi
ca81d7a0
JD
19922{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
19923echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 19924if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19925 cat >>confdefs.h <<_ACEOF
503d2be0 19926#define HAVE_LIBKRB5 1
c0d27fcc 19927_ACEOF
a21616bd
KR
19928
19929 LIBS="-lkrb5 $LIBS"
19930
a21616bd
KR
19931fi
19932
19933 if test "${with_kerberos5+set}" != set; then
503d2be0 19934
ca81d7a0
JD
19935{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
19936echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
19937if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19938 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19939else
503d2be0 19940 ac_check_lib_save_LIBS=$LIBS
a21616bd 19941LIBS="-ldes425 $LIBS"
503d2be0 19942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19943/* confdefs.h. */
19944_ACEOF
19945cat confdefs.h >>conftest.$ac_ext
19946cat >>conftest.$ac_ext <<_ACEOF
19947/* end confdefs.h. */
503d2be0 19948
ca81d7a0
JD
19949/* Override any GCC internal prototype to avoid an error.
19950 Use char because int might match the return type of a GCC
19951 builtin and then its argument prototype would still apply. */
503d2be0
AS
19952#ifdef __cplusplus
19953extern "C"
19954#endif
503d2be0
AS
19955char des_cbc_encrypt ();
19956int
19957main ()
19958{
ca81d7a0 19959return des_cbc_encrypt ();
503d2be0
AS
19960 ;
19961 return 0;
19962}
19963_ACEOF
19964rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19965if { (ac_try="$ac_link"
19966case "(($ac_try" in
19967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19968 *) ac_try_echo=$ac_try;;
19969esac
19970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19971 (eval "$ac_link") 2>conftest.er1
503d2be0 19972 ac_status=$?
edfaf76d
LK
19973 grep -v '^ *+' conftest.er1 >conftest.err
19974 rm -f conftest.er1
19975 cat conftest.err >&5
c0d27fcc 19976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19977 (exit $ac_status); } && {
19978 test -z "$ac_c_werror_flag" ||
19979 test ! -s conftest.err
19980 } && test -s conftest$ac_exeext &&
19981 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19982 ac_cv_lib_des425_des_cbc_encrypt=yes
19983else
19984 echo "$as_me: failed program was:" >&5
19650fd6
AS
19985sed 's/^/| /' conftest.$ac_ext >&5
19986
ca81d7a0 19987 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 19988fi
ca81d7a0 19989
f053c89f 19990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19991 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19992LIBS=$ac_check_lib_save_LIBS
19993fi
ca81d7a0
JD
19994{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
19995echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 19996if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19997 cat >>confdefs.h <<_ACEOF
503d2be0 19998#define HAVE_LIBDES425 1
c0d27fcc 19999_ACEOF
a21616bd
KR
20000
20001 LIBS="-ldes425 $LIBS"
20002
20003else
503d2be0 20004
ca81d7a0
JD
20005{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20006echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20007if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20008 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20009else
503d2be0 20010 ac_check_lib_save_LIBS=$LIBS
a21616bd 20011LIBS="-ldes $LIBS"
503d2be0 20012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20013/* confdefs.h. */
20014_ACEOF
20015cat confdefs.h >>conftest.$ac_ext
20016cat >>conftest.$ac_ext <<_ACEOF
20017/* end confdefs.h. */
503d2be0 20018
ca81d7a0
JD
20019/* Override any GCC internal prototype to avoid an error.
20020 Use char because int might match the return type of a GCC
20021 builtin and then its argument prototype would still apply. */
503d2be0
AS
20022#ifdef __cplusplus
20023extern "C"
20024#endif
503d2be0
AS
20025char des_cbc_encrypt ();
20026int
20027main ()
20028{
ca81d7a0 20029return des_cbc_encrypt ();
503d2be0
AS
20030 ;
20031 return 0;
20032}
20033_ACEOF
20034rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20035if { (ac_try="$ac_link"
20036case "(($ac_try" in
20037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20038 *) ac_try_echo=$ac_try;;
20039esac
20040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20041 (eval "$ac_link") 2>conftest.er1
503d2be0 20042 ac_status=$?
edfaf76d
LK
20043 grep -v '^ *+' conftest.er1 >conftest.err
20044 rm -f conftest.er1
20045 cat conftest.err >&5
c0d27fcc 20046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20047 (exit $ac_status); } && {
20048 test -z "$ac_c_werror_flag" ||
20049 test ! -s conftest.err
20050 } && test -s conftest$ac_exeext &&
20051 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20052 ac_cv_lib_des_des_cbc_encrypt=yes
20053else
20054 echo "$as_me: failed program was:" >&5
19650fd6
AS
20055sed 's/^/| /' conftest.$ac_ext >&5
20056
ca81d7a0 20057 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20058fi
ca81d7a0 20059
f053c89f 20060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20061 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20062LIBS=$ac_check_lib_save_LIBS
20063fi
ca81d7a0
JD
20064{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20065echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20066if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20067 cat >>confdefs.h <<_ACEOF
503d2be0 20068#define HAVE_LIBDES 1
c0d27fcc 20069_ACEOF
a21616bd
KR
20070
20071 LIBS="-ldes $LIBS"
20072
a21616bd
KR
20073fi
20074
20075fi
20076
c0d27fcc 20077
ca81d7a0
JD
20078{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20079echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20080if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20081 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20082else
503d2be0 20083 ac_check_lib_save_LIBS=$LIBS
a21616bd 20084LIBS="-lkrb4 $LIBS"
503d2be0 20085cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20086/* confdefs.h. */
20087_ACEOF
20088cat confdefs.h >>conftest.$ac_ext
20089cat >>conftest.$ac_ext <<_ACEOF
20090/* end confdefs.h. */
503d2be0 20091
ca81d7a0
JD
20092/* Override any GCC internal prototype to avoid an error.
20093 Use char because int might match the return type of a GCC
20094 builtin and then its argument prototype would still apply. */
503d2be0
AS
20095#ifdef __cplusplus
20096extern "C"
20097#endif
503d2be0
AS
20098char krb_get_cred ();
20099int
f053c89f
CY
20100main ()
20101{
20102return krb_get_cred ();
20103 ;
20104 return 0;
20105}
20106_ACEOF
20107rm -f conftest.$ac_objext conftest$ac_exeext
20108if { (ac_try="$ac_link"
20109case "(($ac_try" in
ca81d7a0
JD
20110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20111 *) ac_try_echo=$ac_try;;
20112esac
20113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20114 (eval "$ac_link") 2>conftest.er1
503d2be0 20115 ac_status=$?
f053c89f
CY
20116 grep -v '^ *+' conftest.er1 >conftest.err
20117 rm -f conftest.er1
20118 cat conftest.err >&5
c0d27fcc 20119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20120 (exit $ac_status); } && {
20121 test -z "$ac_c_werror_flag" ||
20122 test ! -s conftest.err
20123 } && test -s conftest$ac_exeext &&
20124 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20125 ac_cv_lib_krb4_krb_get_cred=yes
20126else
20127 echo "$as_me: failed program was:" >&5
19650fd6
AS
20128sed 's/^/| /' conftest.$ac_ext >&5
20129
ca81d7a0 20130 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20131fi
ca81d7a0 20132
f053c89f 20133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20134 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20135LIBS=$ac_check_lib_save_LIBS
20136fi
ca81d7a0
JD
20137{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20138echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20139if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20140 cat >>confdefs.h <<_ACEOF
503d2be0 20141#define HAVE_LIBKRB4 1
c0d27fcc 20142_ACEOF
a21616bd
KR
20143
20144 LIBS="-lkrb4 $LIBS"
20145
20146else
503d2be0 20147
ca81d7a0
JD
20148{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20149echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20150if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20151 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20152else
503d2be0 20153 ac_check_lib_save_LIBS=$LIBS
a21616bd 20154LIBS="-lkrb $LIBS"
503d2be0 20155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
503d2be0 20161
ca81d7a0
JD
20162/* Override any GCC internal prototype to avoid an error.
20163 Use char because int might match the return type of a GCC
20164 builtin and then its argument prototype would still apply. */
503d2be0
AS
20165#ifdef __cplusplus
20166extern "C"
20167#endif
503d2be0
AS
20168char krb_get_cred ();
20169int
20170main ()
20171{
ca81d7a0 20172return krb_get_cred ();
503d2be0
AS
20173 ;
20174 return 0;
20175}
20176_ACEOF
20177rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20178if { (ac_try="$ac_link"
20179case "(($ac_try" in
20180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181 *) ac_try_echo=$ac_try;;
20182esac
20183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20184 (eval "$ac_link") 2>conftest.er1
503d2be0 20185 ac_status=$?
edfaf76d
LK
20186 grep -v '^ *+' conftest.er1 >conftest.err
20187 rm -f conftest.er1
20188 cat conftest.err >&5
c0d27fcc 20189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20190 (exit $ac_status); } && {
20191 test -z "$ac_c_werror_flag" ||
20192 test ! -s conftest.err
20193 } && test -s conftest$ac_exeext &&
20194 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20195 ac_cv_lib_krb_krb_get_cred=yes
20196else
20197 echo "$as_me: failed program was:" >&5
19650fd6
AS
20198sed 's/^/| /' conftest.$ac_ext >&5
20199
ca81d7a0 20200 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20201fi
ca81d7a0 20202
f053c89f 20203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20204 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20205LIBS=$ac_check_lib_save_LIBS
20206fi
ca81d7a0
JD
20207{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20208echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20209if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20210 cat >>confdefs.h <<_ACEOF
503d2be0 20211#define HAVE_LIBKRB 1
c0d27fcc 20212_ACEOF
a21616bd
KR
20213
20214 LIBS="-lkrb $LIBS"
20215
a21616bd
KR
20216fi
20217
20218fi
20219
20220 fi
20221
20222 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20223
20224for ac_header in krb5.h
a21616bd 20225do
503d2be0 20226as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20227if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20228 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20229echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20231 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20232fi
ca81d7a0
JD
20233ac_res=`eval echo '${'$as_ac_Header'}'`
20234 { echo "$as_me:$LINENO: result: $ac_res" >&5
20235echo "${ECHO_T}$ac_res" >&6; }
98418dba 20236else
c0d27fcc 20237 # Is the header compilable?
ca81d7a0
JD
20238{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20239echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20240cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20241/* confdefs.h. */
20242_ACEOF
20243cat confdefs.h >>conftest.$ac_ext
20244cat >>conftest.$ac_ext <<_ACEOF
20245/* end confdefs.h. */
c0d27fcc
MR
20246$ac_includes_default
20247#include <$ac_header>
20248_ACEOF
20249rm -f conftest.$ac_objext
ca81d7a0
JD
20250if { (ac_try="$ac_compile"
20251case "(($ac_try" in
20252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20253 *) ac_try_echo=$ac_try;;
20254esac
20255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20256 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20257 ac_status=$?
edfaf76d
LK
20258 grep -v '^ *+' conftest.er1 >conftest.err
20259 rm -f conftest.er1
20260 cat conftest.err >&5
c0d27fcc 20261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20262 (exit $ac_status); } && {
20263 test -z "$ac_c_werror_flag" ||
20264 test ! -s conftest.err
20265 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20266 ac_header_compiler=yes
20267else
20268 echo "$as_me: failed program was:" >&5
19650fd6
AS
20269sed 's/^/| /' conftest.$ac_ext >&5
20270
ca81d7a0 20271 ac_header_compiler=no
c0d27fcc 20272fi
ca81d7a0
JD
20273
20274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20275{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20276echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20277
20278# Is the header present?
ca81d7a0
JD
20279{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20280echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20281cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20282/* confdefs.h. */
20283_ACEOF
20284cat confdefs.h >>conftest.$ac_ext
20285cat >>conftest.$ac_ext <<_ACEOF
20286/* end confdefs.h. */
503d2be0
AS
20287#include <$ac_header>
20288_ACEOF
ca81d7a0
JD
20289if { (ac_try="$ac_cpp conftest.$ac_ext"
20290case "(($ac_try" in
20291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20292 *) ac_try_echo=$ac_try;;
20293esac
20294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20295 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20296 ac_status=$?
6bae0ccf 20297 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20298 rm -f conftest.er1
20299 cat conftest.err >&5
c0d27fcc 20300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20301 (exit $ac_status); } >/dev/null && {
20302 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20303 test ! -s conftest.err
20304 }; then
c0d27fcc 20305 ac_header_preproc=yes
503d2be0
AS
20306else
20307 echo "$as_me: failed program was:" >&5
19650fd6
AS
20308sed 's/^/| /' conftest.$ac_ext >&5
20309
c0d27fcc 20310 ac_header_preproc=no
a21616bd 20311fi
ca81d7a0 20312
503d2be0 20313rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20314{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20315echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20316
20317# So? What about this header?
edfaf76d
LK
20318case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20319 yes:no: )
c0d27fcc
MR
20320 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20321echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20322 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20323echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20324 ac_header_preproc=yes
19650fd6 20325 ;;
edfaf76d 20326 no:yes:* )
c0d27fcc
MR
20327 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20328echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20329 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20330echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20331 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20332echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20333 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20334echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20335 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20336echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20337 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20338echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20339
19650fd6 20340 ;;
c0d27fcc 20341esac
ca81d7a0
JD
20342{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20343echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20344if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20345 echo $ECHO_N "(cached) $ECHO_C" >&6
20346else
edfaf76d 20347 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20348fi
ca81d7a0
JD
20349ac_res=`eval echo '${'$as_ac_Header'}'`
20350 { echo "$as_me:$LINENO: result: $ac_res" >&5
20351echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20352
20353fi
503d2be0 20354if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20355 cat >>confdefs.h <<_ACEOF
503d2be0 20356#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20357_ACEOF
609b5db1
CY
20358 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
20359echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
20360if test "${ac_cv_member_krb5_error_text+set}" = set; then
20361 echo $ECHO_N "(cached) $ECHO_C" >&6
20362else
20363 cat >conftest.$ac_ext <<_ACEOF
20364/* confdefs.h. */
20365_ACEOF
20366cat confdefs.h >>conftest.$ac_ext
20367cat >>conftest.$ac_ext <<_ACEOF
20368/* end confdefs.h. */
20369#include <krb5.h>
20370
20371int
20372main ()
20373{
20374static krb5_error ac_aggr;
20375if (ac_aggr.text)
20376return 0;
20377 ;
20378 return 0;
20379}
20380_ACEOF
20381rm -f conftest.$ac_objext
20382if { (ac_try="$ac_compile"
20383case "(($ac_try" in
20384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20385 *) ac_try_echo=$ac_try;;
20386esac
20387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20388 (eval "$ac_compile") 2>conftest.er1
20389 ac_status=$?
20390 grep -v '^ *+' conftest.er1 >conftest.err
20391 rm -f conftest.er1
20392 cat conftest.err >&5
20393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20394 (exit $ac_status); } && {
20395 test -z "$ac_c_werror_flag" ||
20396 test ! -s conftest.err
20397 } && test -s conftest.$ac_objext; then
20398 ac_cv_member_krb5_error_text=yes
20399else
20400 echo "$as_me: failed program was:" >&5
20401sed 's/^/| /' conftest.$ac_ext >&5
20402
20403 cat >conftest.$ac_ext <<_ACEOF
20404/* confdefs.h. */
20405_ACEOF
20406cat confdefs.h >>conftest.$ac_ext
20407cat >>conftest.$ac_ext <<_ACEOF
20408/* end confdefs.h. */
20409#include <krb5.h>
20410
20411int
20412main ()
20413{
20414static krb5_error ac_aggr;
20415if (sizeof ac_aggr.text)
20416return 0;
20417 ;
20418 return 0;
20419}
20420_ACEOF
20421rm -f conftest.$ac_objext
20422if { (ac_try="$ac_compile"
20423case "(($ac_try" in
20424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20425 *) ac_try_echo=$ac_try;;
20426esac
20427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20428 (eval "$ac_compile") 2>conftest.er1
20429 ac_status=$?
20430 grep -v '^ *+' conftest.er1 >conftest.err
20431 rm -f conftest.er1
20432 cat conftest.err >&5
20433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20434 (exit $ac_status); } && {
20435 test -z "$ac_c_werror_flag" ||
20436 test ! -s conftest.err
20437 } && test -s conftest.$ac_objext; then
20438 ac_cv_member_krb5_error_text=yes
20439else
20440 echo "$as_me: failed program was:" >&5
20441sed 's/^/| /' conftest.$ac_ext >&5
20442
20443 ac_cv_member_krb5_error_text=no
20444fi
20445
20446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20447fi
20448
20449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20450fi
20451{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
20452echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
20453if test $ac_cv_member_krb5_error_text = yes; then
20454
20455cat >>confdefs.h <<_ACEOF
20456#define HAVE_KRB5_ERROR_TEXT 1
20457_ACEOF
20458
20459
20460fi
20461{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
20462echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
20463if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
20464 echo $ECHO_N "(cached) $ECHO_C" >&6
20465else
20466 cat >conftest.$ac_ext <<_ACEOF
20467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
20472#include <krb5.h>
20473
20474int
20475main ()
20476{
20477static krb5_error ac_aggr;
20478if (ac_aggr.e_text)
20479return 0;
20480 ;
20481 return 0;
20482}
20483_ACEOF
20484rm -f conftest.$ac_objext
20485if { (ac_try="$ac_compile"
20486case "(($ac_try" in
20487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20488 *) ac_try_echo=$ac_try;;
20489esac
20490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20491 (eval "$ac_compile") 2>conftest.er1
20492 ac_status=$?
20493 grep -v '^ *+' conftest.er1 >conftest.err
20494 rm -f conftest.er1
20495 cat conftest.err >&5
20496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20497 (exit $ac_status); } && {
20498 test -z "$ac_c_werror_flag" ||
20499 test ! -s conftest.err
20500 } && test -s conftest.$ac_objext; then
20501 ac_cv_member_krb5_error_e_text=yes
20502else
20503 echo "$as_me: failed program was:" >&5
20504sed 's/^/| /' conftest.$ac_ext >&5
20505
20506 cat >conftest.$ac_ext <<_ACEOF
20507/* confdefs.h. */
20508_ACEOF
20509cat confdefs.h >>conftest.$ac_ext
20510cat >>conftest.$ac_ext <<_ACEOF
20511/* end confdefs.h. */
20512#include <krb5.h>
20513
20514int
20515main ()
20516{
20517static krb5_error ac_aggr;
20518if (sizeof ac_aggr.e_text)
20519return 0;
20520 ;
20521 return 0;
20522}
20523_ACEOF
20524rm -f conftest.$ac_objext
20525if { (ac_try="$ac_compile"
20526case "(($ac_try" in
20527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20528 *) ac_try_echo=$ac_try;;
20529esac
20530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20531 (eval "$ac_compile") 2>conftest.er1
20532 ac_status=$?
20533 grep -v '^ *+' conftest.er1 >conftest.err
20534 rm -f conftest.er1
20535 cat conftest.err >&5
20536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20537 (exit $ac_status); } && {
20538 test -z "$ac_c_werror_flag" ||
20539 test ! -s conftest.err
20540 } && test -s conftest.$ac_objext; then
20541 ac_cv_member_krb5_error_e_text=yes
20542else
20543 echo "$as_me: failed program was:" >&5
20544sed 's/^/| /' conftest.$ac_ext >&5
20545
20546 ac_cv_member_krb5_error_e_text=no
20547fi
20548
20549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20550fi
20551
20552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20553fi
20554{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
20555echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
20556if test $ac_cv_member_krb5_error_e_text = yes; then
20557
20558cat >>confdefs.h <<_ACEOF
20559#define HAVE_KRB5_ERROR_E_TEXT 1
20560_ACEOF
20561
20562
20563fi
503d2be0 20564
a21616bd 20565fi
c0d27fcc 20566
a21616bd
KR
20567done
20568
20569 else
503d2be0
AS
20570
20571for ac_header in des.h
a21616bd 20572do
503d2be0 20573as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20574if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20575 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20576echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20577if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20578 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20579fi
ca81d7a0
JD
20580ac_res=`eval echo '${'$as_ac_Header'}'`
20581 { echo "$as_me:$LINENO: result: $ac_res" >&5
20582echo "${ECHO_T}$ac_res" >&6; }
98418dba 20583else
c0d27fcc 20584 # Is the header compilable?
ca81d7a0
JD
20585{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20586echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20587cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20588/* confdefs.h. */
20589_ACEOF
20590cat confdefs.h >>conftest.$ac_ext
20591cat >>conftest.$ac_ext <<_ACEOF
20592/* end confdefs.h. */
c0d27fcc
MR
20593$ac_includes_default
20594#include <$ac_header>
20595_ACEOF
20596rm -f conftest.$ac_objext
ca81d7a0
JD
20597if { (ac_try="$ac_compile"
20598case "(($ac_try" in
20599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20600 *) ac_try_echo=$ac_try;;
20601esac
20602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20603 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20604 ac_status=$?
edfaf76d
LK
20605 grep -v '^ *+' conftest.er1 >conftest.err
20606 rm -f conftest.er1
20607 cat conftest.err >&5
c0d27fcc 20608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20609 (exit $ac_status); } && {
20610 test -z "$ac_c_werror_flag" ||
20611 test ! -s conftest.err
20612 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20613 ac_header_compiler=yes
20614else
20615 echo "$as_me: failed program was:" >&5
19650fd6
AS
20616sed 's/^/| /' conftest.$ac_ext >&5
20617
ca81d7a0 20618 ac_header_compiler=no
c0d27fcc 20619fi
ca81d7a0
JD
20620
20621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20622{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20623echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20624
20625# Is the header present?
ca81d7a0
JD
20626{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20627echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20628cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20629/* confdefs.h. */
20630_ACEOF
20631cat confdefs.h >>conftest.$ac_ext
20632cat >>conftest.$ac_ext <<_ACEOF
20633/* end confdefs.h. */
503d2be0
AS
20634#include <$ac_header>
20635_ACEOF
ca81d7a0
JD
20636if { (ac_try="$ac_cpp conftest.$ac_ext"
20637case "(($ac_try" in
20638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20639 *) ac_try_echo=$ac_try;;
20640esac
20641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20642 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20643 ac_status=$?
6bae0ccf 20644 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20645 rm -f conftest.er1
20646 cat conftest.err >&5
c0d27fcc 20647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20648 (exit $ac_status); } >/dev/null && {
20649 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20650 test ! -s conftest.err
20651 }; then
c0d27fcc 20652 ac_header_preproc=yes
503d2be0
AS
20653else
20654 echo "$as_me: failed program was:" >&5
19650fd6
AS
20655sed 's/^/| /' conftest.$ac_ext >&5
20656
c0d27fcc 20657 ac_header_preproc=no
a21616bd 20658fi
ca81d7a0 20659
503d2be0 20660rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20661{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20662echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20663
20664# So? What about this header?
edfaf76d
LK
20665case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20666 yes:no: )
c0d27fcc
MR
20667 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20668echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20669 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20670echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20671 ac_header_preproc=yes
19650fd6 20672 ;;
edfaf76d 20673 no:yes:* )
c0d27fcc
MR
20674 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20675echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20676 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20677echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20678 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20679echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20680 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20681echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20682 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20683echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20684 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20685echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20686
19650fd6 20687 ;;
c0d27fcc 20688esac
ca81d7a0
JD
20689{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20690echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20691if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20692 echo $ECHO_N "(cached) $ECHO_C" >&6
20693else
edfaf76d 20694 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20695fi
ca81d7a0
JD
20696ac_res=`eval echo '${'$as_ac_Header'}'`
20697 { echo "$as_me:$LINENO: result: $ac_res" >&5
20698echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20699
20700fi
503d2be0 20701if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20702 cat >>confdefs.h <<_ACEOF
503d2be0 20703#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20704_ACEOF
503d2be0 20705
a21616bd 20706else
503d2be0
AS
20707
20708for ac_header in kerberosIV/des.h
a21616bd 20709do
503d2be0 20710as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20711if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20712 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20715 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20716fi
ca81d7a0
JD
20717ac_res=`eval echo '${'$as_ac_Header'}'`
20718 { echo "$as_me:$LINENO: result: $ac_res" >&5
20719echo "${ECHO_T}$ac_res" >&6; }
98418dba 20720else
c0d27fcc 20721 # Is the header compilable?
ca81d7a0
JD
20722{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20723echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20724cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20725/* confdefs.h. */
20726_ACEOF
20727cat confdefs.h >>conftest.$ac_ext
20728cat >>conftest.$ac_ext <<_ACEOF
20729/* end confdefs.h. */
c0d27fcc
MR
20730$ac_includes_default
20731#include <$ac_header>
20732_ACEOF
20733rm -f conftest.$ac_objext
ca81d7a0
JD
20734if { (ac_try="$ac_compile"
20735case "(($ac_try" in
20736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20737 *) ac_try_echo=$ac_try;;
20738esac
20739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20740 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20741 ac_status=$?
edfaf76d
LK
20742 grep -v '^ *+' conftest.er1 >conftest.err
20743 rm -f conftest.er1
20744 cat conftest.err >&5
c0d27fcc 20745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20746 (exit $ac_status); } && {
20747 test -z "$ac_c_werror_flag" ||
20748 test ! -s conftest.err
20749 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20750 ac_header_compiler=yes
20751else
20752 echo "$as_me: failed program was:" >&5
19650fd6
AS
20753sed 's/^/| /' conftest.$ac_ext >&5
20754
ca81d7a0 20755 ac_header_compiler=no
c0d27fcc 20756fi
ca81d7a0
JD
20757
20758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20759{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20760echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20761
20762# Is the header present?
ca81d7a0
JD
20763{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20764echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20765cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20766/* confdefs.h. */
20767_ACEOF
20768cat confdefs.h >>conftest.$ac_ext
20769cat >>conftest.$ac_ext <<_ACEOF
20770/* end confdefs.h. */
503d2be0
AS
20771#include <$ac_header>
20772_ACEOF
ca81d7a0
JD
20773if { (ac_try="$ac_cpp conftest.$ac_ext"
20774case "(($ac_try" in
20775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20776 *) ac_try_echo=$ac_try;;
20777esac
20778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20779 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20780 ac_status=$?
6bae0ccf 20781 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20782 rm -f conftest.er1
20783 cat conftest.err >&5
c0d27fcc 20784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20785 (exit $ac_status); } >/dev/null && {
20786 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20787 test ! -s conftest.err
20788 }; then
c0d27fcc 20789 ac_header_preproc=yes
503d2be0
AS
20790else
20791 echo "$as_me: failed program was:" >&5
19650fd6
AS
20792sed 's/^/| /' conftest.$ac_ext >&5
20793
c0d27fcc 20794 ac_header_preproc=no
a21616bd 20795fi
ca81d7a0 20796
503d2be0 20797rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20798{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20799echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20800
20801# So? What about this header?
edfaf76d
LK
20802case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20803 yes:no: )
c0d27fcc
MR
20804 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20805echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20806 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20807echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20808 ac_header_preproc=yes
19650fd6 20809 ;;
edfaf76d 20810 no:yes:* )
c0d27fcc
MR
20811 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20812echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20813 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20814echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20815 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20816echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20817 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20818echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20819 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20820echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20821 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20822echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20823
19650fd6 20824 ;;
c0d27fcc 20825esac
ca81d7a0
JD
20826{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20828if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20829 echo $ECHO_N "(cached) $ECHO_C" >&6
20830else
edfaf76d 20831 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20832fi
ca81d7a0
JD
20833ac_res=`eval echo '${'$as_ac_Header'}'`
20834 { echo "$as_me:$LINENO: result: $ac_res" >&5
20835echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20836
20837fi
503d2be0 20838if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20839 cat >>confdefs.h <<_ACEOF
503d2be0 20840#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20841_ACEOF
503d2be0 20842
a21616bd 20843else
503d2be0
AS
20844
20845for ac_header in kerberos/des.h
a21616bd 20846do
503d2be0 20847as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20848if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20849 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20851if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20852 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20853fi
ca81d7a0
JD
20854ac_res=`eval echo '${'$as_ac_Header'}'`
20855 { echo "$as_me:$LINENO: result: $ac_res" >&5
20856echo "${ECHO_T}$ac_res" >&6; }
98418dba 20857else
c0d27fcc 20858 # Is the header compilable?
ca81d7a0
JD
20859{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20860echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20861cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20862/* confdefs.h. */
20863_ACEOF
20864cat confdefs.h >>conftest.$ac_ext
20865cat >>conftest.$ac_ext <<_ACEOF
20866/* end confdefs.h. */
c0d27fcc
MR
20867$ac_includes_default
20868#include <$ac_header>
20869_ACEOF
20870rm -f conftest.$ac_objext
ca81d7a0
JD
20871if { (ac_try="$ac_compile"
20872case "(($ac_try" in
20873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20874 *) ac_try_echo=$ac_try;;
20875esac
20876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20877 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20878 ac_status=$?
edfaf76d
LK
20879 grep -v '^ *+' conftest.er1 >conftest.err
20880 rm -f conftest.er1
20881 cat conftest.err >&5
c0d27fcc 20882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20883 (exit $ac_status); } && {
20884 test -z "$ac_c_werror_flag" ||
20885 test ! -s conftest.err
20886 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20887 ac_header_compiler=yes
20888else
20889 echo "$as_me: failed program was:" >&5
19650fd6
AS
20890sed 's/^/| /' conftest.$ac_ext >&5
20891
ca81d7a0 20892 ac_header_compiler=no
c0d27fcc 20893fi
ca81d7a0
JD
20894
20895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20896{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20897echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20898
20899# Is the header present?
ca81d7a0
JD
20900{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20901echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20902cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20903/* confdefs.h. */
20904_ACEOF
20905cat confdefs.h >>conftest.$ac_ext
20906cat >>conftest.$ac_ext <<_ACEOF
20907/* end confdefs.h. */
503d2be0
AS
20908#include <$ac_header>
20909_ACEOF
ca81d7a0
JD
20910if { (ac_try="$ac_cpp conftest.$ac_ext"
20911case "(($ac_try" in
20912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20913 *) ac_try_echo=$ac_try;;
20914esac
20915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20916 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20917 ac_status=$?
6bae0ccf 20918 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20919 rm -f conftest.er1
20920 cat conftest.err >&5
c0d27fcc 20921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20922 (exit $ac_status); } >/dev/null && {
20923 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20924 test ! -s conftest.err
20925 }; then
c0d27fcc 20926 ac_header_preproc=yes
503d2be0
AS
20927else
20928 echo "$as_me: failed program was:" >&5
19650fd6
AS
20929sed 's/^/| /' conftest.$ac_ext >&5
20930
c0d27fcc 20931 ac_header_preproc=no
a21616bd 20932fi
ca81d7a0 20933
503d2be0 20934rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20935{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20936echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20937
20938# So? What about this header?
edfaf76d
LK
20939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20940 yes:no: )
c0d27fcc
MR
20941 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20942echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20943 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20944echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20945 ac_header_preproc=yes
19650fd6 20946 ;;
edfaf76d 20947 no:yes:* )
c0d27fcc
MR
20948 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20949echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20950 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20951echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20952 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20953echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20954 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20955echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20956 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20957echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20958 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20959echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20960
19650fd6 20961 ;;
c0d27fcc 20962esac
ca81d7a0
JD
20963{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20965if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20966 echo $ECHO_N "(cached) $ECHO_C" >&6
20967else
edfaf76d 20968 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20969fi
ca81d7a0
JD
20970ac_res=`eval echo '${'$as_ac_Header'}'`
20971 { echo "$as_me:$LINENO: result: $ac_res" >&5
20972echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20973
20974fi
503d2be0 20975if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20976 cat >>confdefs.h <<_ACEOF
503d2be0 20977#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20978_ACEOF
a21616bd
KR
20979
20980fi
c0d27fcc 20981
a21616bd
KR
20982done
20983
98418dba 20984fi
c0d27fcc 20985
925c2f3f
EZ
20986done
20987
98418dba 20988fi
c0d27fcc 20989
925c2f3f 20990done
98418dba 20991
c0d27fcc 20992
925c2f3f
EZ
20993for ac_header in krb.h
20994do
20995as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20996if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20997 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20998echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20999if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21000 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21001fi
ca81d7a0
JD
21002ac_res=`eval echo '${'$as_ac_Header'}'`
21003 { echo "$as_me:$LINENO: result: $ac_res" >&5
21004echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21005else
21006 # Is the header compilable?
ca81d7a0
JD
21007{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21008echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21009cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21010/* confdefs.h. */
21011_ACEOF
21012cat confdefs.h >>conftest.$ac_ext
21013cat >>conftest.$ac_ext <<_ACEOF
21014/* end confdefs.h. */
c0d27fcc
MR
21015$ac_includes_default
21016#include <$ac_header>
21017_ACEOF
21018rm -f conftest.$ac_objext
ca81d7a0
JD
21019if { (ac_try="$ac_compile"
21020case "(($ac_try" in
21021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21022 *) ac_try_echo=$ac_try;;
21023esac
21024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21025 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21026 ac_status=$?
edfaf76d
LK
21027 grep -v '^ *+' conftest.er1 >conftest.err
21028 rm -f conftest.er1
21029 cat conftest.err >&5
c0d27fcc 21030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21031 (exit $ac_status); } && {
21032 test -z "$ac_c_werror_flag" ||
21033 test ! -s conftest.err
21034 } && test -s conftest.$ac_objext; then
c0d27fcc 21035 ac_header_compiler=yes
925c2f3f 21036else
c0d27fcc 21037 echo "$as_me: failed program was:" >&5
19650fd6
AS
21038sed 's/^/| /' conftest.$ac_ext >&5
21039
ca81d7a0 21040 ac_header_compiler=no
c0d27fcc 21041fi
ca81d7a0
JD
21042
21043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21044{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21045echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21046
21047# Is the header present?
ca81d7a0
JD
21048{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21049echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21051/* confdefs.h. */
21052_ACEOF
21053cat confdefs.h >>conftest.$ac_ext
21054cat >>conftest.$ac_ext <<_ACEOF
21055/* end confdefs.h. */
503d2be0
AS
21056#include <$ac_header>
21057_ACEOF
ca81d7a0
JD
21058if { (ac_try="$ac_cpp conftest.$ac_ext"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
21063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21064 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21065 ac_status=$?
6bae0ccf 21066 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21067 rm -f conftest.er1
21068 cat conftest.err >&5
c0d27fcc 21069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21070 (exit $ac_status); } >/dev/null && {
21071 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 }; then
c0d27fcc 21074 ac_header_preproc=yes
503d2be0
AS
21075else
21076 echo "$as_me: failed program was:" >&5
19650fd6
AS
21077sed 's/^/| /' conftest.$ac_ext >&5
21078
c0d27fcc 21079 ac_header_preproc=no
a21616bd 21080fi
ca81d7a0 21081
503d2be0 21082rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21083{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21084echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21085
21086# So? What about this header?
edfaf76d
LK
21087case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21088 yes:no: )
c0d27fcc
MR
21089 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21090echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21091 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21092echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21093 ac_header_preproc=yes
19650fd6 21094 ;;
edfaf76d 21095 no:yes:* )
c0d27fcc
MR
21096 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21097echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21098 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21099echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21100 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21101echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21102 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21103echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21104 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21105echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21106 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21107echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21108
19650fd6 21109 ;;
c0d27fcc 21110esac
ca81d7a0
JD
21111{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21113if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21114 echo $ECHO_N "(cached) $ECHO_C" >&6
21115else
edfaf76d 21116 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21117fi
ca81d7a0
JD
21118ac_res=`eval echo '${'$as_ac_Header'}'`
21119 { echo "$as_me:$LINENO: result: $ac_res" >&5
21120echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21121
21122fi
503d2be0 21123if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21124 cat >>confdefs.h <<_ACEOF
503d2be0 21125#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21126_ACEOF
503d2be0 21127
a21616bd 21128else
503d2be0
AS
21129
21130for ac_header in kerberosIV/krb.h
a21616bd 21131do
503d2be0 21132as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21133if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21134 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21135echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21137 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21138fi
ca81d7a0
JD
21139ac_res=`eval echo '${'$as_ac_Header'}'`
21140 { echo "$as_me:$LINENO: result: $ac_res" >&5
21141echo "${ECHO_T}$ac_res" >&6; }
98418dba 21142else
c0d27fcc 21143 # Is the header compilable?
ca81d7a0
JD
21144{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21145echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21146cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21147/* confdefs.h. */
21148_ACEOF
21149cat confdefs.h >>conftest.$ac_ext
21150cat >>conftest.$ac_ext <<_ACEOF
21151/* end confdefs.h. */
c0d27fcc
MR
21152$ac_includes_default
21153#include <$ac_header>
21154_ACEOF
21155rm -f conftest.$ac_objext
ca81d7a0
JD
21156if { (ac_try="$ac_compile"
21157case "(($ac_try" in
21158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21159 *) ac_try_echo=$ac_try;;
21160esac
21161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21162 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21163 ac_status=$?
edfaf76d
LK
21164 grep -v '^ *+' conftest.er1 >conftest.err
21165 rm -f conftest.er1
21166 cat conftest.err >&5
c0d27fcc 21167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21168 (exit $ac_status); } && {
21169 test -z "$ac_c_werror_flag" ||
21170 test ! -s conftest.err
21171 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21172 ac_header_compiler=yes
21173else
21174 echo "$as_me: failed program was:" >&5
19650fd6
AS
21175sed 's/^/| /' conftest.$ac_ext >&5
21176
ca81d7a0 21177 ac_header_compiler=no
c0d27fcc 21178fi
ca81d7a0
JD
21179
21180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21181{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21182echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21183
21184# Is the header present?
ca81d7a0
JD
21185{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21186echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21188/* confdefs.h. */
21189_ACEOF
21190cat confdefs.h >>conftest.$ac_ext
21191cat >>conftest.$ac_ext <<_ACEOF
21192/* end confdefs.h. */
503d2be0
AS
21193#include <$ac_header>
21194_ACEOF
ca81d7a0
JD
21195if { (ac_try="$ac_cpp conftest.$ac_ext"
21196case "(($ac_try" in
21197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21198 *) ac_try_echo=$ac_try;;
21199esac
21200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21202 ac_status=$?
6bae0ccf 21203 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21204 rm -f conftest.er1
21205 cat conftest.err >&5
c0d27fcc 21206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21207 (exit $ac_status); } >/dev/null && {
21208 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21209 test ! -s conftest.err
21210 }; then
c0d27fcc 21211 ac_header_preproc=yes
503d2be0
AS
21212else
21213 echo "$as_me: failed program was:" >&5
19650fd6
AS
21214sed 's/^/| /' conftest.$ac_ext >&5
21215
c0d27fcc 21216 ac_header_preproc=no
a21616bd 21217fi
ca81d7a0 21218
503d2be0 21219rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21220{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21221echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21222
21223# So? What about this header?
edfaf76d
LK
21224case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21225 yes:no: )
c0d27fcc
MR
21226 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21227echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21229echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21230 ac_header_preproc=yes
19650fd6 21231 ;;
edfaf76d 21232 no:yes:* )
c0d27fcc
MR
21233 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21234echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21235 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21236echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21237 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21238echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21239 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21240echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21241 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21242echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21243 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21244echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21245
19650fd6 21246 ;;
c0d27fcc 21247esac
ca81d7a0
JD
21248{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21249echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21251 echo $ECHO_N "(cached) $ECHO_C" >&6
21252else
edfaf76d 21253 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21254fi
ca81d7a0
JD
21255ac_res=`eval echo '${'$as_ac_Header'}'`
21256 { echo "$as_me:$LINENO: result: $ac_res" >&5
21257echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21258
21259fi
503d2be0 21260if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21261 cat >>confdefs.h <<_ACEOF
503d2be0 21262#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21263_ACEOF
503d2be0 21264
a21616bd 21265else
503d2be0
AS
21266
21267for ac_header in kerberos/krb.h
a21616bd 21268do
503d2be0 21269as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21270if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21271 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21272echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21273if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21274 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21275fi
ca81d7a0
JD
21276ac_res=`eval echo '${'$as_ac_Header'}'`
21277 { echo "$as_me:$LINENO: result: $ac_res" >&5
21278echo "${ECHO_T}$ac_res" >&6; }
98418dba 21279else
c0d27fcc 21280 # Is the header compilable?
ca81d7a0
JD
21281{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21282echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21283cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
c0d27fcc
MR
21289$ac_includes_default
21290#include <$ac_header>
21291_ACEOF
21292rm -f conftest.$ac_objext
ca81d7a0
JD
21293if { (ac_try="$ac_compile"
21294case "(($ac_try" in
21295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21296 *) ac_try_echo=$ac_try;;
21297esac
21298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21299 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21300 ac_status=$?
edfaf76d
LK
21301 grep -v '^ *+' conftest.er1 >conftest.err
21302 rm -f conftest.er1
21303 cat conftest.err >&5
c0d27fcc 21304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21305 (exit $ac_status); } && {
21306 test -z "$ac_c_werror_flag" ||
21307 test ! -s conftest.err
21308 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21309 ac_header_compiler=yes
21310else
21311 echo "$as_me: failed program was:" >&5
19650fd6
AS
21312sed 's/^/| /' conftest.$ac_ext >&5
21313
ca81d7a0 21314 ac_header_compiler=no
c0d27fcc 21315fi
ca81d7a0
JD
21316
21317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21318{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21319echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21320
21321# Is the header present?
ca81d7a0
JD
21322{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21323echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21324cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21325/* confdefs.h. */
21326_ACEOF
21327cat confdefs.h >>conftest.$ac_ext
21328cat >>conftest.$ac_ext <<_ACEOF
21329/* end confdefs.h. */
503d2be0
AS
21330#include <$ac_header>
21331_ACEOF
ca81d7a0
JD
21332if { (ac_try="$ac_cpp conftest.$ac_ext"
21333case "(($ac_try" in
21334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21335 *) ac_try_echo=$ac_try;;
21336esac
21337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21338 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21339 ac_status=$?
6bae0ccf 21340 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21341 rm -f conftest.er1
21342 cat conftest.err >&5
c0d27fcc 21343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21344 (exit $ac_status); } >/dev/null && {
21345 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21346 test ! -s conftest.err
21347 }; then
c0d27fcc 21348 ac_header_preproc=yes
503d2be0
AS
21349else
21350 echo "$as_me: failed program was:" >&5
19650fd6
AS
21351sed 's/^/| /' conftest.$ac_ext >&5
21352
c0d27fcc 21353 ac_header_preproc=no
a21616bd 21354fi
ca81d7a0 21355
503d2be0 21356rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21357{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21358echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21359
21360# So? What about this header?
edfaf76d
LK
21361case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21362 yes:no: )
35996d22
AS
21363 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21364echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21365 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21366echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21367 ac_header_preproc=yes
19650fd6 21368 ;;
edfaf76d 21369 no:yes:* )
c0d27fcc
MR
21370 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21371echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21372 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21373echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21374 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21375echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21376 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21377echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21378 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21379echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21380 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21381echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21382
19650fd6 21383 ;;
c0d27fcc 21384esac
ca81d7a0
JD
21385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21388 echo $ECHO_N "(cached) $ECHO_C" >&6
21389else
edfaf76d 21390 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21391fi
ca81d7a0
JD
21392ac_res=`eval echo '${'$as_ac_Header'}'`
21393 { echo "$as_me:$LINENO: result: $ac_res" >&5
21394echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21395
21396fi
503d2be0 21397if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21398 cat >>confdefs.h <<_ACEOF
503d2be0 21399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21400_ACEOF
503d2be0 21401
a21616bd 21402fi
c0d27fcc 21403
a21616bd
KR
21404done
21405
21406fi
c0d27fcc 21407
a21616bd
KR
21408done
21409
21410fi
c0d27fcc 21411
a21616bd
KR
21412done
21413
21414 fi
503d2be0
AS
21415
21416for ac_header in com_err.h
a21616bd 21417do
503d2be0 21418as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21419if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21420 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21422if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21423 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21424fi
ca81d7a0
JD
21425ac_res=`eval echo '${'$as_ac_Header'}'`
21426 { echo "$as_me:$LINENO: result: $ac_res" >&5
21427echo "${ECHO_T}$ac_res" >&6; }
98418dba 21428else
c0d27fcc 21429 # Is the header compilable?
ca81d7a0
JD
21430{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21431echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21432cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21433/* confdefs.h. */
21434_ACEOF
21435cat confdefs.h >>conftest.$ac_ext
21436cat >>conftest.$ac_ext <<_ACEOF
21437/* end confdefs.h. */
c0d27fcc
MR
21438$ac_includes_default
21439#include <$ac_header>
21440_ACEOF
21441rm -f conftest.$ac_objext
ca81d7a0
JD
21442if { (ac_try="$ac_compile"
21443case "(($ac_try" in
21444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21445 *) ac_try_echo=$ac_try;;
21446esac
21447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21448 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21449 ac_status=$?
21450 grep -v '^ *+' conftest.er1 >conftest.err
21451 rm -f conftest.er1
21452 cat conftest.err >&5
21453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21454 (exit $ac_status); } && {
21455 test -z "$ac_c_werror_flag" ||
21456 test ! -s conftest.err
21457 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21458 ac_header_compiler=yes
21459else
21460 echo "$as_me: failed program was:" >&5
19650fd6
AS
21461sed 's/^/| /' conftest.$ac_ext >&5
21462
ca81d7a0 21463 ac_header_compiler=no
c0d27fcc 21464fi
ca81d7a0
JD
21465
21466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21467{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21468echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21469
21470# Is the header present?
ca81d7a0
JD
21471{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21472echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21473cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21474/* confdefs.h. */
21475_ACEOF
21476cat confdefs.h >>conftest.$ac_ext
21477cat >>conftest.$ac_ext <<_ACEOF
21478/* end confdefs.h. */
503d2be0
AS
21479#include <$ac_header>
21480_ACEOF
ca81d7a0
JD
21481if { (ac_try="$ac_cpp conftest.$ac_ext"
21482case "(($ac_try" in
21483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21484 *) ac_try_echo=$ac_try;;
21485esac
21486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21487 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21488 ac_status=$?
6bae0ccf 21489 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21490 rm -f conftest.er1
21491 cat conftest.err >&5
c0d27fcc 21492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21493 (exit $ac_status); } >/dev/null && {
21494 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21495 test ! -s conftest.err
21496 }; then
c0d27fcc 21497 ac_header_preproc=yes
503d2be0
AS
21498else
21499 echo "$as_me: failed program was:" >&5
19650fd6
AS
21500sed 's/^/| /' conftest.$ac_ext >&5
21501
c0d27fcc 21502 ac_header_preproc=no
a21616bd 21503fi
ca81d7a0 21504
503d2be0 21505rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21506{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21507echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21508
21509# So? What about this header?
edfaf76d
LK
21510case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21511 yes:no: )
c0d27fcc
MR
21512 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21513echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21514 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21515echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21516 ac_header_preproc=yes
19650fd6 21517 ;;
edfaf76d 21518 no:yes:* )
c0d27fcc
MR
21519 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21520echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21521 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21522echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21523 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21524echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21525 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21526echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21527 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21528echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21529 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21530echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21531
19650fd6 21532 ;;
c0d27fcc 21533esac
ca81d7a0
JD
21534{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21535echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21536if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21537 echo $ECHO_N "(cached) $ECHO_C" >&6
21538else
edfaf76d 21539 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21540fi
ca81d7a0
JD
21541ac_res=`eval echo '${'$as_ac_Header'}'`
21542 { echo "$as_me:$LINENO: result: $ac_res" >&5
21543echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21544
21545fi
503d2be0 21546if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21547 cat >>confdefs.h <<_ACEOF
503d2be0 21548#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21549_ACEOF
503d2be0 21550
a21616bd 21551fi
c0d27fcc 21552
a21616bd
KR
21553done
21554
21555fi
21556
ba4481b5
DL
21557# Solaris requires -lintl if you want strerror (which calls dgettext)
21558# to return localized messages.
503d2be0 21559
ca81d7a0
JD
21560{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21561echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21562if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21563 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21564else
503d2be0 21565 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21566LIBS="-lintl $LIBS"
503d2be0 21567cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21568/* confdefs.h. */
21569_ACEOF
21570cat confdefs.h >>conftest.$ac_ext
21571cat >>conftest.$ac_ext <<_ACEOF
21572/* end confdefs.h. */
503d2be0 21573
ca81d7a0
JD
21574/* Override any GCC internal prototype to avoid an error.
21575 Use char because int might match the return type of a GCC
21576 builtin and then its argument prototype would still apply. */
503d2be0
AS
21577#ifdef __cplusplus
21578extern "C"
21579#endif
503d2be0
AS
21580char dgettext ();
21581int
21582main ()
21583{
ca81d7a0 21584return dgettext ();
503d2be0
AS
21585 ;
21586 return 0;
21587}
21588_ACEOF
21589rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21590if { (ac_try="$ac_link"
21591case "(($ac_try" in
21592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21593 *) ac_try_echo=$ac_try;;
21594esac
21595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21596 (eval "$ac_link") 2>conftest.er1
503d2be0 21597 ac_status=$?
edfaf76d
LK
21598 grep -v '^ *+' conftest.er1 >conftest.err
21599 rm -f conftest.er1
21600 cat conftest.err >&5
c0d27fcc 21601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21602 (exit $ac_status); } && {
21603 test -z "$ac_c_werror_flag" ||
21604 test ! -s conftest.err
21605 } && test -s conftest$ac_exeext &&
21606 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21607 ac_cv_lib_intl_dgettext=yes
21608else
21609 echo "$as_me: failed program was:" >&5
19650fd6
AS
21610sed 's/^/| /' conftest.$ac_ext >&5
21611
ca81d7a0 21612 ac_cv_lib_intl_dgettext=no
503d2be0 21613fi
ca81d7a0 21614
f053c89f 21615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21616 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21617LIBS=$ac_check_lib_save_LIBS
21618fi
ca81d7a0
JD
21619{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21620echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21621if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21622 cat >>confdefs.h <<_ACEOF
503d2be0 21623#define HAVE_LIBINTL 1
c0d27fcc 21624_ACEOF
ba4481b5
DL
21625
21626 LIBS="-lintl $LIBS"
21627
ba4481b5
DL
21628fi
21629
c0d27fcc 21630
ca81d7a0
JD
21631{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21632echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21633if test "${emacs_cv_localtime_cache+set}" = set; then
21634 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21635else
21636 if test x$ac_cv_func_tzset = xyes; then
21637if test "$cross_compiling" = yes; then
21638 # If we have tzset, assume the worst when cross-compiling.
21639emacs_cv_localtime_cache=yes
21640else
503d2be0 21641 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21642/* confdefs.h. */
21643_ACEOF
21644cat confdefs.h >>conftest.$ac_ext
21645cat >>conftest.$ac_ext <<_ACEOF
21646/* end confdefs.h. */
ba4481b5 21647#include <time.h>
ba4481b5
DL
21648extern char **environ;
21649unset_TZ ()
21650{
21651 char **from, **to;
21652 for (to = from = environ; (*to = *from); from++)
21653 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21654 to++;
21655}
21656char TZ_GMT0[] = "TZ=GMT0";
21657char TZ_PST8[] = "TZ=PST8";
21658main()
21659{
21660 time_t now = time ((time_t *) 0);
21661 int hour_GMT0, hour_unset;
21662 if (putenv (TZ_GMT0) != 0)
21663 exit (1);
21664 hour_GMT0 = localtime (&now)->tm_hour;
21665 unset_TZ ();
21666 hour_unset = localtime (&now)->tm_hour;
21667 if (putenv (TZ_PST8) != 0)
21668 exit (1);
21669 if (localtime (&now)->tm_hour == hour_GMT0)
21670 exit (1);
21671 unset_TZ ();
21672 if (localtime (&now)->tm_hour != hour_unset)
21673 exit (1);
21674 exit (0);
21675}
503d2be0
AS
21676_ACEOF
21677rm -f conftest$ac_exeext
ca81d7a0
JD
21678if { (ac_try="$ac_link"
21679case "(($ac_try" in
21680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21681 *) ac_try_echo=$ac_try;;
21682esac
21683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21684 (eval "$ac_link") 2>&5
503d2be0 21685 ac_status=$?
c0d27fcc 21686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
21688 { (case "(($ac_try" in
21689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21690 *) ac_try_echo=$ac_try;;
21691esac
21692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21693 (eval "$ac_try") 2>&5
503d2be0 21694 ac_status=$?
c0d27fcc 21695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21696 (exit $ac_status); }; }; then
ba4481b5
DL
21697 emacs_cv_localtime_cache=no
21698else
503d2be0
AS
21699 echo "$as_me: program exited with status $ac_status" >&5
21700echo "$as_me: failed program was:" >&5
19650fd6
AS
21701sed 's/^/| /' conftest.$ac_ext >&5
21702
c0d27fcc 21703( exit $ac_status )
503d2be0 21704emacs_cv_localtime_cache=yes
ba4481b5 21705fi
ca81d7a0 21706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21707fi
ca81d7a0
JD
21708
21709
ba4481b5
DL
21710else
21711 # If we lack tzset, report that localtime does not cache TZ,
21712 # since we can't invalidate the cache if we don't have tzset.
21713 emacs_cv_localtime_cache=no
21714fi
21715fi
ca81d7a0
JD
21716{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21717echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21718if test $emacs_cv_localtime_cache = yes; then
b936fae4 21719
c0d27fcc 21720cat >>confdefs.h <<\_ACEOF
ba4481b5 21721#define LOCALTIME_CACHE 1
c0d27fcc 21722_ACEOF
ba4481b5
DL
21723
21724fi
21725
21726if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21727
21728for ac_func in gettimeofday
48d4b120 21729do
503d2be0 21730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21731{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21733if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21734 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21735else
503d2be0 21736 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21737/* confdefs.h. */
21738_ACEOF
21739cat confdefs.h >>conftest.$ac_ext
21740cat >>conftest.$ac_ext <<_ACEOF
21741/* end confdefs.h. */
edfaf76d
LK
21742/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21743 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21744#define $ac_func innocuous_$ac_func
21745
48d4b120 21746/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21747 which can conflict with char $ac_func (); below.
21748 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21749 <limits.h> exists even on freestanding compilers. */
edfaf76d 21750
19650fd6
AS
21751#ifdef __STDC__
21752# include <limits.h>
21753#else
21754# include <assert.h>
21755#endif
edfaf76d
LK
21756
21757#undef $ac_func
21758
ca81d7a0
JD
21759/* Override any GCC internal prototype to avoid an error.
21760 Use char because int might match the return type of a GCC
21761 builtin and then its argument prototype would still apply. */
503d2be0
AS
21762#ifdef __cplusplus
21763extern "C"
21764#endif
503d2be0 21765char $ac_func ();
48d4b120
DL
21766/* The GNU C library defines this for functions which it implements
21767 to always fail with ENOSYS. Some functions are actually named
21768 something starting with __ and the normal name is an alias. */
ca81d7a0 21769#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21770choke me
cd958eb3
MB
21771#endif
21772
19650fd6
AS
21773int
21774main ()
21775{
ca81d7a0 21776return $ac_func ();
503d2be0
AS
21777 ;
21778 return 0;
21779}
21780_ACEOF
21781rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21782if { (ac_try="$ac_link"
21783case "(($ac_try" in
21784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21785 *) ac_try_echo=$ac_try;;
21786esac
21787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21788 (eval "$ac_link") 2>conftest.er1
503d2be0 21789 ac_status=$?
edfaf76d
LK
21790 grep -v '^ *+' conftest.er1 >conftest.err
21791 rm -f conftest.er1
21792 cat conftest.err >&5
c0d27fcc 21793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21794 (exit $ac_status); } && {
21795 test -z "$ac_c_werror_flag" ||
21796 test ! -s conftest.err
21797 } && test -s conftest$ac_exeext &&
21798 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21799 eval "$as_ac_var=yes"
21800else
21801 echo "$as_me: failed program was:" >&5
19650fd6
AS
21802sed 's/^/| /' conftest.$ac_ext >&5
21803
ca81d7a0 21804 eval "$as_ac_var=no"
503d2be0 21805fi
ca81d7a0 21806
f053c89f 21807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21808 conftest$ac_exeext conftest.$ac_ext
503d2be0 21809fi
ca81d7a0
JD
21810ac_res=`eval echo '${'$as_ac_var'}'`
21811 { echo "$as_me:$LINENO: result: $ac_res" >&5
21812echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21813if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21814 cat >>confdefs.h <<_ACEOF
503d2be0 21815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21816_ACEOF
48d4b120 21817
48d4b120
DL
21818fi
21819done
21820
b936fae4 21821 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
21822 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21823echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21824if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21825 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21826else
503d2be0 21827 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21828/* confdefs.h. */
21829_ACEOF
21830cat confdefs.h >>conftest.$ac_ext
21831cat >>conftest.$ac_ext <<_ACEOF
21832/* end confdefs.h. */
ba4481b5 21833
a3f08d9e
DL
21834#ifdef TIME_WITH_SYS_TIME
21835#include <sys/time.h>
21836#include <time.h>
21837#else
21838#ifdef HAVE_SYS_TIME_H
21839#include <sys/time.h>
21840#else
21841#include <time.h>
21842#endif
21843#endif
503d2be0
AS
21844int
21845main ()
21846{
a3f08d9e 21847struct timeval time;
b936fae4 21848 gettimeofday (&time, 0);
503d2be0
AS
21849 ;
21850 return 0;
21851}
21852_ACEOF
21853rm -f conftest.$ac_objext
f053c89f
CY
21854if { (ac_try="$ac_compile"
21855case "(($ac_try" in
ca81d7a0
JD
21856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21857 *) ac_try_echo=$ac_try;;
21858esac
21859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21860 (eval "$ac_compile") 2>conftest.er1
503d2be0 21861 ac_status=$?
f053c89f
CY
21862 grep -v '^ *+' conftest.er1 >conftest.err
21863 rm -f conftest.er1
21864 cat conftest.err >&5
c0d27fcc 21865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21866 (exit $ac_status); } && {
21867 test -z "$ac_c_werror_flag" ||
21868 test ! -s conftest.err
21869 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21870 emacs_cv_gettimeofday_two_arguments=yes
21871else
503d2be0 21872 echo "$as_me: failed program was:" >&5
19650fd6
AS
21873sed 's/^/| /' conftest.$ac_ext >&5
21874
ca81d7a0 21875 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21876fi
ca81d7a0
JD
21877
21878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21879fi
ca81d7a0
JD
21880{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21881echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21882 if test $emacs_cv_gettimeofday_two_arguments = no; then
21883
c0d27fcc 21884cat >>confdefs.h <<\_ACEOF
ba4481b5 21885#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21886_ACEOF
ba4481b5 21887
b936fae4 21888 fi
ba4481b5
DL
21889 fi
21890fi
21891
21892ok_so_far=yes
ca81d7a0
JD
21893{ echo "$as_me:$LINENO: checking for socket" >&5
21894echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21895if test "${ac_cv_func_socket+set}" = set; then
21896 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21897else
503d2be0 21898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21899/* confdefs.h. */
21900_ACEOF
21901cat confdefs.h >>conftest.$ac_ext
21902cat >>conftest.$ac_ext <<_ACEOF
21903/* end confdefs.h. */
edfaf76d
LK
21904/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21906#define socket innocuous_socket
21907
ba4481b5 21908/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21909 which can conflict with char socket (); below.
21910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21911 <limits.h> exists even on freestanding compilers. */
edfaf76d 21912
19650fd6
AS
21913#ifdef __STDC__
21914# include <limits.h>
21915#else
21916# include <assert.h>
21917#endif
edfaf76d
LK
21918
21919#undef socket
21920
ca81d7a0
JD
21921/* Override any GCC internal prototype to avoid an error.
21922 Use char because int might match the return type of a GCC
21923 builtin and then its argument prototype would still apply. */
503d2be0
AS
21924#ifdef __cplusplus
21925extern "C"
21926#endif
503d2be0 21927char socket ();
ba4481b5
DL
21928/* The GNU C library defines this for functions which it implements
21929 to always fail with ENOSYS. Some functions are actually named
21930 something starting with __ and the normal name is an alias. */
ca81d7a0 21931#if defined __stub_socket || defined __stub___socket
ba4481b5 21932choke me
cd958eb3
MB
21933#endif
21934
19650fd6
AS
21935int
21936main ()
21937{
ca81d7a0 21938return socket ();
503d2be0
AS
21939 ;
21940 return 0;
21941}
21942_ACEOF
21943rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21944if { (ac_try="$ac_link"
21945case "(($ac_try" in
21946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947 *) ac_try_echo=$ac_try;;
21948esac
21949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21950 (eval "$ac_link") 2>conftest.er1
503d2be0 21951 ac_status=$?
edfaf76d
LK
21952 grep -v '^ *+' conftest.er1 >conftest.err
21953 rm -f conftest.er1
21954 cat conftest.err >&5
c0d27fcc 21955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21956 (exit $ac_status); } && {
21957 test -z "$ac_c_werror_flag" ||
21958 test ! -s conftest.err
21959 } && test -s conftest$ac_exeext &&
21960 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21961 ac_cv_func_socket=yes
21962else
21963 echo "$as_me: failed program was:" >&5
19650fd6
AS
21964sed 's/^/| /' conftest.$ac_ext >&5
21965
ca81d7a0 21966 ac_cv_func_socket=no
503d2be0 21967fi
ca81d7a0 21968
f053c89f 21969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21970 conftest$ac_exeext conftest.$ac_ext
503d2be0 21971fi
ca81d7a0
JD
21972{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21973echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21974if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21975 :
21976else
503d2be0 21977 ok_so_far=no
ba4481b5
DL
21978fi
21979
21980if test $ok_so_far = yes; then
c0d27fcc 21981 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
21982 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21983echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
21984if test "${ac_cv_header_netinet_in_h+set}" = set; then
21985 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21986fi
ca81d7a0
JD
21987{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21988echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 21989else
c0d27fcc 21990 # Is the header compilable?
ca81d7a0
JD
21991{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21992echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 21993cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21994/* confdefs.h. */
21995_ACEOF
21996cat confdefs.h >>conftest.$ac_ext
21997cat >>conftest.$ac_ext <<_ACEOF
21998/* end confdefs.h. */
c0d27fcc
MR
21999$ac_includes_default
22000#include <netinet/in.h>
22001_ACEOF
22002rm -f conftest.$ac_objext
ca81d7a0
JD
22003if { (ac_try="$ac_compile"
22004case "(($ac_try" in
22005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22006 *) ac_try_echo=$ac_try;;
22007esac
22008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22009 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22010 ac_status=$?
edfaf76d
LK
22011 grep -v '^ *+' conftest.er1 >conftest.err
22012 rm -f conftest.er1
22013 cat conftest.err >&5
c0d27fcc 22014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22015 (exit $ac_status); } && {
22016 test -z "$ac_c_werror_flag" ||
22017 test ! -s conftest.err
22018 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22019 ac_header_compiler=yes
22020else
22021 echo "$as_me: failed program was:" >&5
19650fd6
AS
22022sed 's/^/| /' conftest.$ac_ext >&5
22023
ca81d7a0 22024 ac_header_compiler=no
c0d27fcc 22025fi
ca81d7a0
JD
22026
22027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22028{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22029echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22030
22031# Is the header present?
ca81d7a0
JD
22032{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22033echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22034cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22035/* confdefs.h. */
22036_ACEOF
22037cat confdefs.h >>conftest.$ac_ext
22038cat >>conftest.$ac_ext <<_ACEOF
22039/* end confdefs.h. */
ba4481b5 22040#include <netinet/in.h>
503d2be0 22041_ACEOF
ca81d7a0
JD
22042if { (ac_try="$ac_cpp conftest.$ac_ext"
22043case "(($ac_try" in
22044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22045 *) ac_try_echo=$ac_try;;
22046esac
22047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22048 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22049 ac_status=$?
6bae0ccf 22050 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22051 rm -f conftest.er1
22052 cat conftest.err >&5
c0d27fcc 22053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22054 (exit $ac_status); } >/dev/null && {
22055 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22056 test ! -s conftest.err
22057 }; then
c0d27fcc 22058 ac_header_preproc=yes
ba4481b5 22059else
503d2be0 22060 echo "$as_me: failed program was:" >&5
19650fd6
AS
22061sed 's/^/| /' conftest.$ac_ext >&5
22062
c0d27fcc 22063 ac_header_preproc=no
ba4481b5 22064fi
ca81d7a0 22065
503d2be0 22066rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22067{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22068echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22069
22070# So? What about this header?
edfaf76d
LK
22071case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22072 yes:no: )
c0d27fcc
MR
22073 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22074echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22075 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22076echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22077 ac_header_preproc=yes
19650fd6 22078 ;;
edfaf76d 22079 no:yes:* )
c0d27fcc
MR
22080 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22081echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22082 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22083echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22084 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22085echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22086 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22087echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22088 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22089echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22090 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22091echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22092
19650fd6 22093 ;;
c0d27fcc 22094esac
ca81d7a0
JD
22095{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22096echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22097if test "${ac_cv_header_netinet_in_h+set}" = set; then
22098 echo $ECHO_N "(cached) $ECHO_C" >&6
22099else
22100 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22101fi
ca81d7a0
JD
22102{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22103echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22104
22105fi
503d2be0 22106if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22107 :
22108else
503d2be0 22109 ok_so_far=no
ba4481b5
DL
22110fi
22111
c0d27fcc 22112
ba4481b5
DL
22113fi
22114if test $ok_so_far = yes; then
c0d27fcc 22115 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22116 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22117echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22118if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22119 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22120fi
ca81d7a0
JD
22121{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22122echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22123else
c0d27fcc 22124 # Is the header compilable?
ca81d7a0
JD
22125{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22126echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22127cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22128/* confdefs.h. */
22129_ACEOF
22130cat confdefs.h >>conftest.$ac_ext
22131cat >>conftest.$ac_ext <<_ACEOF
22132/* end confdefs.h. */
c0d27fcc
MR
22133$ac_includes_default
22134#include <arpa/inet.h>
22135_ACEOF
22136rm -f conftest.$ac_objext
ca81d7a0
JD
22137if { (ac_try="$ac_compile"
22138case "(($ac_try" in
22139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22140 *) ac_try_echo=$ac_try;;
22141esac
22142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22143 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22144 ac_status=$?
edfaf76d
LK
22145 grep -v '^ *+' conftest.er1 >conftest.err
22146 rm -f conftest.er1
22147 cat conftest.err >&5
c0d27fcc 22148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22149 (exit $ac_status); } && {
22150 test -z "$ac_c_werror_flag" ||
22151 test ! -s conftest.err
22152 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22153 ac_header_compiler=yes
22154else
22155 echo "$as_me: failed program was:" >&5
19650fd6
AS
22156sed 's/^/| /' conftest.$ac_ext >&5
22157
ca81d7a0 22158 ac_header_compiler=no
c0d27fcc 22159fi
ca81d7a0
JD
22160
22161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22162{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22163echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22164
22165# Is the header present?
ca81d7a0
JD
22166{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22167echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22168cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22169/* confdefs.h. */
22170_ACEOF
22171cat confdefs.h >>conftest.$ac_ext
22172cat >>conftest.$ac_ext <<_ACEOF
22173/* end confdefs.h. */
ba4481b5 22174#include <arpa/inet.h>
503d2be0 22175_ACEOF
ca81d7a0
JD
22176if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22183 ac_status=$?
6bae0ccf 22184 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22185 rm -f conftest.er1
22186 cat conftest.err >&5
c0d27fcc 22187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22188 (exit $ac_status); } >/dev/null && {
22189 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22190 test ! -s conftest.err
22191 }; then
c0d27fcc 22192 ac_header_preproc=yes
ba4481b5 22193else
503d2be0 22194 echo "$as_me: failed program was:" >&5
19650fd6
AS
22195sed 's/^/| /' conftest.$ac_ext >&5
22196
c0d27fcc 22197 ac_header_preproc=no
ba4481b5 22198fi
ca81d7a0 22199
503d2be0 22200rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22201{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22202echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22203
22204# So? What about this header?
edfaf76d
LK
22205case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22206 yes:no: )
c0d27fcc
MR
22207 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22208echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22209 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22210echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22211 ac_header_preproc=yes
19650fd6 22212 ;;
edfaf76d 22213 no:yes:* )
c0d27fcc
MR
22214 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22215echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22216 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22217echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22218 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22219echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22220 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22221echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22222 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22223echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22224 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22225echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22226
19650fd6 22227 ;;
c0d27fcc 22228esac
ca81d7a0
JD
22229{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22230echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22231if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22232 echo $ECHO_N "(cached) $ECHO_C" >&6
22233else
22234 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22235fi
ca81d7a0
JD
22236{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22237echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22238
22239fi
503d2be0 22240if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22241 :
22242else
503d2be0 22243 ok_so_far=no
ba4481b5
DL
22244fi
22245
c0d27fcc 22246
ba4481b5
DL
22247fi
22248if test $ok_so_far = yes; then
b936fae4 22249
c0d27fcc 22250cat >>confdefs.h <<\_ACEOF
ba4481b5 22251#define HAVE_INET_SOCKETS 1
c0d27fcc 22252_ACEOF
ba4481b5
DL
22253
22254fi
22255
2d2b6695 22256
7862d3a8 22257for ac_header in sys/ioctl.h
2d2b6695
KS
22258do
22259as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22260if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22261 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22263if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22264 echo $ECHO_N "(cached) $ECHO_C" >&6
22265fi
ca81d7a0
JD
22266ac_res=`eval echo '${'$as_ac_Header'}'`
22267 { echo "$as_me:$LINENO: result: $ac_res" >&5
22268echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22269else
22270 # Is the header compilable?
ca81d7a0
JD
22271{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22272echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22273cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22274/* confdefs.h. */
22275_ACEOF
22276cat confdefs.h >>conftest.$ac_ext
22277cat >>conftest.$ac_ext <<_ACEOF
22278/* end confdefs.h. */
22279$ac_includes_default
22280#include <$ac_header>
22281_ACEOF
22282rm -f conftest.$ac_objext
ca81d7a0
JD
22283if { (ac_try="$ac_compile"
22284case "(($ac_try" in
22285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22286 *) ac_try_echo=$ac_try;;
22287esac
22288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22289 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22290 ac_status=$?
edfaf76d
LK
22291 grep -v '^ *+' conftest.er1 >conftest.err
22292 rm -f conftest.er1
22293 cat conftest.err >&5
2d2b6695 22294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22295 (exit $ac_status); } && {
22296 test -z "$ac_c_werror_flag" ||
22297 test ! -s conftest.err
22298 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22299 ac_header_compiler=yes
22300else
22301 echo "$as_me: failed program was:" >&5
22302sed 's/^/| /' conftest.$ac_ext >&5
22303
ca81d7a0 22304 ac_header_compiler=no
2d2b6695 22305fi
ca81d7a0
JD
22306
22307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22308{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22309echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22310
22311# Is the header present?
ca81d7a0
JD
22312{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22313echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22314cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22315/* confdefs.h. */
22316_ACEOF
22317cat confdefs.h >>conftest.$ac_ext
22318cat >>conftest.$ac_ext <<_ACEOF
22319/* end confdefs.h. */
22320#include <$ac_header>
22321_ACEOF
ca81d7a0
JD
22322if { (ac_try="$ac_cpp conftest.$ac_ext"
22323case "(($ac_try" in
22324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22325 *) ac_try_echo=$ac_try;;
22326esac
22327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22328 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22329 ac_status=$?
22330 grep -v '^ *+' conftest.er1 >conftest.err
22331 rm -f conftest.er1
22332 cat conftest.err >&5
22333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22334 (exit $ac_status); } >/dev/null && {
22335 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22336 test ! -s conftest.err
22337 }; then
2d2b6695
KS
22338 ac_header_preproc=yes
22339else
22340 echo "$as_me: failed program was:" >&5
22341sed 's/^/| /' conftest.$ac_ext >&5
22342
22343 ac_header_preproc=no
22344fi
ca81d7a0 22345
2d2b6695 22346rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22347{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22348echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22349
22350# So? What about this header?
edfaf76d
LK
22351case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22352 yes:no: )
2d2b6695
KS
22353 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22354echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22355 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22356echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22357 ac_header_preproc=yes
2d2b6695 22358 ;;
edfaf76d 22359 no:yes:* )
2d2b6695
KS
22360 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22361echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22362 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22363echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22364 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22365echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22366 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22367echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22368 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22369echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22370 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22371echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22372
2d2b6695
KS
22373 ;;
22374esac
ca81d7a0
JD
22375{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22377if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22378 echo $ECHO_N "(cached) $ECHO_C" >&6
22379else
edfaf76d 22380 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22381fi
ca81d7a0
JD
22382ac_res=`eval echo '${'$as_ac_Header'}'`
22383 { echo "$as_me:$LINENO: result: $ac_res" >&5
22384echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22385
22386fi
22387if test `eval echo '${'$as_ac_Header'}'` = yes; then
22388 cat >>confdefs.h <<_ACEOF
22389#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22390_ACEOF
22391
22392fi
22393
22394done
22395
22396
ba4481b5 22397if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22398
c0d27fcc 22399cat >>confdefs.h <<\_ACEOF
ba4481b5 22400#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22401_ACEOF
ba4481b5
DL
22402
22403fi
22404
ca81d7a0
JD
22405{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22406echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22407if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
22408 { echo "$as_me:$LINENO: result: yes" >&5
22409echo "${ECHO_T}yes" >&6; }
b936fae4 22410
c0d27fcc 22411cat >>confdefs.h <<\_ACEOF
3d9fec71 22412#define HAVE_DEV_PTMX 1
c0d27fcc 22413_ACEOF
3d9fec71
DL
22414
22415else
ca81d7a0
JD
22416 { echo "$as_me:$LINENO: result: no" >&5
22417echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22418fi
22419
ca81d7a0
JD
22420{ echo "$as_me:$LINENO: checking for pid_t" >&5
22421echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22422if test "${ac_cv_type_pid_t+set}" = set; then
22423 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22424else
503d2be0 22425 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22426/* confdefs.h. */
22427_ACEOF
22428cat confdefs.h >>conftest.$ac_ext
22429cat >>conftest.$ac_ext <<_ACEOF
22430/* end confdefs.h. */
503d2be0 22431$ac_includes_default
ca81d7a0 22432typedef pid_t ac__type_new_;
503d2be0
AS
22433int
22434main ()
22435{
ca81d7a0 22436if ((ac__type_new_ *) 0)
503d2be0 22437 return 0;
ca81d7a0 22438if (sizeof (ac__type_new_))
503d2be0
AS
22439 return 0;
22440 ;
22441 return 0;
22442}
22443_ACEOF
22444rm -f conftest.$ac_objext
ca81d7a0
JD
22445if { (ac_try="$ac_compile"
22446case "(($ac_try" in
22447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22448 *) ac_try_echo=$ac_try;;
22449esac
22450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22451 (eval "$ac_compile") 2>conftest.er1
503d2be0 22452 ac_status=$?
edfaf76d
LK
22453 grep -v '^ *+' conftest.er1 >conftest.err
22454 rm -f conftest.er1
22455 cat conftest.err >&5
c0d27fcc 22456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22457 (exit $ac_status); } && {
22458 test -z "$ac_c_werror_flag" ||
22459 test ! -s conftest.err
22460 } && test -s conftest.$ac_objext; then
647847ea
DL
22461 ac_cv_type_pid_t=yes
22462else
503d2be0 22463 echo "$as_me: failed program was:" >&5
19650fd6
AS
22464sed 's/^/| /' conftest.$ac_ext >&5
22465
ca81d7a0 22466 ac_cv_type_pid_t=no
647847ea 22467fi
ca81d7a0
JD
22468
22469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22470fi
ca81d7a0
JD
22471{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22472echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22473if test $ac_cv_type_pid_t = yes; then
22474 :
22475else
22476
c0d27fcc 22477cat >>confdefs.h <<_ACEOF
647847ea 22478#define pid_t int
c0d27fcc 22479_ACEOF
647847ea
DL
22480
22481fi
22482
c0d27fcc 22483
ca81d7a0 22484for ac_header in vfork.h
503d2be0
AS
22485do
22486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22488 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22491 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22492fi
ca81d7a0
JD
22493ac_res=`eval echo '${'$as_ac_Header'}'`
22494 { echo "$as_me:$LINENO: result: $ac_res" >&5
22495echo "${ECHO_T}$ac_res" >&6; }
98418dba 22496else
c0d27fcc 22497 # Is the header compilable?
ca81d7a0
JD
22498{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22499echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22501/* confdefs.h. */
22502_ACEOF
22503cat confdefs.h >>conftest.$ac_ext
22504cat >>conftest.$ac_ext <<_ACEOF
22505/* end confdefs.h. */
c0d27fcc
MR
22506$ac_includes_default
22507#include <$ac_header>
22508_ACEOF
22509rm -f conftest.$ac_objext
ca81d7a0
JD
22510if { (ac_try="$ac_compile"
22511case "(($ac_try" in
22512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22513 *) ac_try_echo=$ac_try;;
22514esac
22515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22516 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22517 ac_status=$?
edfaf76d
LK
22518 grep -v '^ *+' conftest.er1 >conftest.err
22519 rm -f conftest.er1
22520 cat conftest.err >&5
c0d27fcc 22521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22522 (exit $ac_status); } && {
22523 test -z "$ac_c_werror_flag" ||
22524 test ! -s conftest.err
22525 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22526 ac_header_compiler=yes
22527else
22528 echo "$as_me: failed program was:" >&5
19650fd6
AS
22529sed 's/^/| /' conftest.$ac_ext >&5
22530
ca81d7a0 22531 ac_header_compiler=no
c0d27fcc 22532fi
ca81d7a0
JD
22533
22534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22535{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22536echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22537
22538# Is the header present?
ca81d7a0
JD
22539{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22540echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22542/* confdefs.h. */
22543_ACEOF
22544cat confdefs.h >>conftest.$ac_ext
22545cat >>conftest.$ac_ext <<_ACEOF
22546/* end confdefs.h. */
503d2be0
AS
22547#include <$ac_header>
22548_ACEOF
ca81d7a0
JD
22549if { (ac_try="$ac_cpp conftest.$ac_ext"
22550case "(($ac_try" in
22551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22552 *) ac_try_echo=$ac_try;;
22553esac
22554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22556 ac_status=$?
6bae0ccf 22557 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22558 rm -f conftest.er1
22559 cat conftest.err >&5
c0d27fcc 22560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22561 (exit $ac_status); } >/dev/null && {
22562 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22563 test ! -s conftest.err
22564 }; then
c0d27fcc 22565 ac_header_preproc=yes
647847ea 22566else
503d2be0 22567 echo "$as_me: failed program was:" >&5
19650fd6
AS
22568sed 's/^/| /' conftest.$ac_ext >&5
22569
c0d27fcc 22570 ac_header_preproc=no
647847ea 22571fi
ca81d7a0 22572
503d2be0 22573rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22574{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22575echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22576
22577# So? What about this header?
edfaf76d
LK
22578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22579 yes:no: )
c0d27fcc
MR
22580 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22581echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22582 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22583echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22584 ac_header_preproc=yes
19650fd6 22585 ;;
edfaf76d 22586 no:yes:* )
c0d27fcc
MR
22587 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22588echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22589 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22590echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22591 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22592echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22593 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22594echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22595 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22596echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22597 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22598echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22599
19650fd6 22600 ;;
c0d27fcc 22601esac
ca81d7a0
JD
22602{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22605 echo $ECHO_N "(cached) $ECHO_C" >&6
22606else
edfaf76d 22607 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22608fi
ca81d7a0
JD
22609ac_res=`eval echo '${'$as_ac_Header'}'`
22610 { echo "$as_me:$LINENO: result: $ac_res" >&5
22611echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22612
22613fi
503d2be0 22614if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22615 cat >>confdefs.h <<_ACEOF
503d2be0 22616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22617_ACEOF
647847ea 22618
73b77ee5 22619fi
c0d27fcc 22620
503d2be0 22621done
73b77ee5 22622
c0d27fcc
MR
22623
22624
503d2be0
AS
22625for ac_func in fork vfork
22626do
22627as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22628{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22629echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22630if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22631 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22632else
503d2be0 22633 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22634/* confdefs.h. */
22635_ACEOF
22636cat confdefs.h >>conftest.$ac_ext
22637cat >>conftest.$ac_ext <<_ACEOF
22638/* end confdefs.h. */
edfaf76d
LK
22639/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22640 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22641#define $ac_func innocuous_$ac_func
22642
fa0b693c 22643/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22644 which can conflict with char $ac_func (); below.
22645 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22646 <limits.h> exists even on freestanding compilers. */
edfaf76d 22647
19650fd6
AS
22648#ifdef __STDC__
22649# include <limits.h>
22650#else
22651# include <assert.h>
22652#endif
edfaf76d
LK
22653
22654#undef $ac_func
22655
ca81d7a0
JD
22656/* Override any GCC internal prototype to avoid an error.
22657 Use char because int might match the return type of a GCC
22658 builtin and then its argument prototype would still apply. */
503d2be0
AS
22659#ifdef __cplusplus
22660extern "C"
22661#endif
503d2be0 22662char $ac_func ();
fa0b693c
GM
22663/* The GNU C library defines this for functions which it implements
22664 to always fail with ENOSYS. Some functions are actually named
22665 something starting with __ and the normal name is an alias. */
ca81d7a0 22666#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22667choke me
fa0b693c
GM
22668#endif
22669
19650fd6
AS
22670int
22671main ()
22672{
ca81d7a0 22673return $ac_func ();
503d2be0
AS
22674 ;
22675 return 0;
22676}
22677_ACEOF
22678rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22679if { (ac_try="$ac_link"
22680case "(($ac_try" in
22681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22682 *) ac_try_echo=$ac_try;;
22683esac
22684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22685 (eval "$ac_link") 2>conftest.er1
503d2be0 22686 ac_status=$?
edfaf76d
LK
22687 grep -v '^ *+' conftest.er1 >conftest.err
22688 rm -f conftest.er1
22689 cat conftest.err >&5
c0d27fcc 22690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22691 (exit $ac_status); } && {
22692 test -z "$ac_c_werror_flag" ||
22693 test ! -s conftest.err
22694 } && test -s conftest$ac_exeext &&
22695 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22696 eval "$as_ac_var=yes"
22697else
22698 echo "$as_me: failed program was:" >&5
19650fd6
AS
22699sed 's/^/| /' conftest.$ac_ext >&5
22700
ca81d7a0 22701 eval "$as_ac_var=no"
503d2be0 22702fi
ca81d7a0 22703
f053c89f 22704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22705 conftest$ac_exeext conftest.$ac_ext
503d2be0 22706fi
ca81d7a0
JD
22707ac_res=`eval echo '${'$as_ac_var'}'`
22708 { echo "$as_me:$LINENO: result: $ac_res" >&5
22709echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22710if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22711 cat >>confdefs.h <<_ACEOF
503d2be0 22712#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22713_ACEOF
503d2be0 22714
fa0b693c 22715fi
503d2be0 22716done
fa0b693c 22717
503d2be0 22718if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
22719 { echo "$as_me:$LINENO: checking for working fork" >&5
22720echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22721if test "${ac_cv_func_fork_works+set}" = set; then
22722 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22723else
503d2be0
AS
22724 if test "$cross_compiling" = yes; then
22725 ac_cv_func_fork_works=cross
22726else
22727 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
22728/* confdefs.h. */
22729_ACEOF
22730cat confdefs.h >>conftest.$ac_ext
22731cat >>conftest.$ac_ext <<_ACEOF
22732/* end confdefs.h. */
22733$ac_includes_default
22734int
22735main ()
22736{
22737
22738 /* By Ruediger Kuhlmann. */
22739 return fork () < 0;
22740
22741 ;
22742 return 0;
22743}
503d2be0
AS
22744_ACEOF
22745rm -f conftest$ac_exeext
ca81d7a0
JD
22746if { (ac_try="$ac_link"
22747case "(($ac_try" in
22748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22749 *) ac_try_echo=$ac_try;;
22750esac
22751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22752 (eval "$ac_link") 2>&5
503d2be0 22753 ac_status=$?
c0d27fcc 22754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22756 { (case "(($ac_try" in
22757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22758 *) ac_try_echo=$ac_try;;
22759esac
22760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22761 (eval "$ac_try") 2>&5
503d2be0 22762 ac_status=$?
c0d27fcc 22763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22764 (exit $ac_status); }; }; then
22765 ac_cv_func_fork_works=yes
22766else
22767 echo "$as_me: program exited with status $ac_status" >&5
22768echo "$as_me: failed program was:" >&5
19650fd6
AS
22769sed 's/^/| /' conftest.$ac_ext >&5
22770
c0d27fcc 22771( exit $ac_status )
503d2be0
AS
22772ac_cv_func_fork_works=no
22773fi
ca81d7a0 22774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22775fi
ca81d7a0
JD
22776
22777
503d2be0 22778fi
ca81d7a0
JD
22779{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22780echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22781
6bae0ccf
DL
22782else
22783 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22784fi
22785if test "x$ac_cv_func_fork_works" = xcross; then
22786 case $host in
22787 *-*-amigaos* | *-*-msdosdjgpp*)
22788 # Override, as these systems have only a dummy fork() stub
22789 ac_cv_func_fork_works=no
22790 ;;
22791 *)
22792 ac_cv_func_fork_works=yes
22793 ;;
22794 esac
c0d27fcc
MR
22795 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22796echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22797fi
73b77ee5 22798ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22799if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
22800 { echo "$as_me:$LINENO: checking for working vfork" >&5
22801echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22802if test "${ac_cv_func_vfork_works+set}" = set; then
22803 echo $ECHO_N "(cached) $ECHO_C" >&6
22804else
22805 if test "$cross_compiling" = yes; then
22806 ac_cv_func_vfork_works=cross
fa0b693c 22807else
503d2be0 22808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22809/* confdefs.h. */
22810_ACEOF
22811cat confdefs.h >>conftest.$ac_ext
22812cat >>conftest.$ac_ext <<_ACEOF
22813/* end confdefs.h. */
73b77ee5 22814/* Thanks to Paul Eggert for this test. */
ca81d7a0 22815$ac_includes_default
19650fd6 22816#include <sys/wait.h>
f053c89f 22817#ifdef HAVE_VFORK_H
503d2be0 22818# include <vfork.h>
73b77ee5
GM
22819#endif
22820/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22821 argument registers are propagated back to the parent. The compiler
22822 is told about this with #include <vfork.h>, but some compilers
22823 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22824 static variable whose address is put into a register that is
22825 clobbered by the vfork. */
19650fd6 22826static void
fa0b693c 22827#ifdef __cplusplus
73b77ee5 22828sparc_address_test (int arg)
503d2be0 22829# else
73b77ee5 22830sparc_address_test (arg) int arg;
fa0b693c 22831#endif
fa0b693c 22832{
73b77ee5
GM
22833 static pid_t child;
22834 if (!child) {
22835 child = vfork ();
22836 if (child < 0) {
22837 perror ("vfork");
22838 _exit(2);
22839 }
22840 if (!child) {
22841 arg = getpid();
22842 write(-1, "", 0);
22843 _exit (arg);
22844 }
22845 }
22846}
503d2be0
AS
22847
22848int
22849main ()
22850{
73b77ee5
GM
22851 pid_t parent = getpid ();
22852 pid_t child;
fa0b693c 22853
19650fd6 22854 sparc_address_test (0);
fa0b693c 22855
73b77ee5 22856 child = vfork ();
fa0b693c 22857
73b77ee5 22858 if (child == 0) {
503d2be0
AS
22859 /* Here is another test for sparc vfork register problems. This
22860 test uses lots of local variables, at least as many local
22861 variables as main has allocated so far including compiler
22862 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22863 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22864 reuse the register of parent for one of the local variables,
22865 since it will think that parent can't possibly be used any more
22866 in this routine. Assigning to the local variable will thus
22867 munge parent in the parent process. */
73b77ee5
GM
22868 pid_t
22869 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22870 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22871 /* Convince the compiler that p..p7 are live; otherwise, it might
22872 use the same hardware register for all 8 local variables. */
22873 if (p != p1 || p != p2 || p != p3 || p != p4
22874 || p != p5 || p != p6 || p != p7)
22875 _exit(1);
fa0b693c 22876
503d2be0
AS
22877 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22878 from child file descriptors. If the child closes a descriptor
22879 before it execs or exits, this munges the parent's descriptor
22880 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22881 _exit(close(fileno(stdout)) != 0);
22882 } else {
22883 int status;
22884 struct stat st;
22885
22886 while (wait(&status) != child)
22887 ;
ca81d7a0 22888 return (
73b77ee5
GM
22889 /* Was there some problem with vforking? */
22890 child < 0
22891
22892 /* Did the child fail? (This shouldn't happen.) */
22893 || status
22894
22895 /* Did the vfork/compiler bug occur? */
22896 || parent != getpid()
fa0b693c 22897
73b77ee5
GM
22898 /* Did the file descriptor bug occur? */
22899 || fstat(fileno(stdout), &st) != 0
22900 );
22901 }
22902}
503d2be0
AS
22903_ACEOF
22904rm -f conftest$ac_exeext
ca81d7a0
JD
22905if { (ac_try="$ac_link"
22906case "(($ac_try" in
22907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22908 *) ac_try_echo=$ac_try;;
22909esac
22910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22911 (eval "$ac_link") 2>&5
503d2be0 22912 ac_status=$?
c0d27fcc 22913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22915 { (case "(($ac_try" in
22916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22917 *) ac_try_echo=$ac_try;;
22918esac
22919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22920 (eval "$ac_try") 2>&5
503d2be0 22921 ac_status=$?
c0d27fcc 22922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22923 (exit $ac_status); }; }; then
73b77ee5 22924 ac_cv_func_vfork_works=yes
fa0b693c 22925else
503d2be0
AS
22926 echo "$as_me: program exited with status $ac_status" >&5
22927echo "$as_me: failed program was:" >&5
19650fd6
AS
22928sed 's/^/| /' conftest.$ac_ext >&5
22929
c0d27fcc 22930( exit $ac_status )
503d2be0
AS
22931ac_cv_func_vfork_works=no
22932fi
ca81d7a0 22933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22934fi
ca81d7a0
JD
22935
22936
fa0b693c 22937fi
ca81d7a0
JD
22938{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22939echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22940
503d2be0
AS
22941fi;
22942if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22943 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22944 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22945echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22946fi
22947
503d2be0
AS
22948if test "x$ac_cv_func_vfork_works" = xyes; then
22949
c0d27fcc 22950cat >>confdefs.h <<\_ACEOF
503d2be0 22951#define HAVE_WORKING_VFORK 1
c0d27fcc 22952_ACEOF
503d2be0
AS
22953
22954else
22955
c0d27fcc 22956cat >>confdefs.h <<\_ACEOF
73b77ee5 22957#define vfork fork
c0d27fcc 22958_ACEOF
fa0b693c
GM
22959
22960fi
503d2be0
AS
22961if test "x$ac_cv_func_fork_works" = xyes; then
22962
c0d27fcc 22963cat >>confdefs.h <<\_ACEOF
503d2be0 22964#define HAVE_WORKING_FORK 1
c0d27fcc 22965_ACEOF
fa0b693c 22966
503d2be0 22967fi
647847ea 22968
c0d27fcc 22969
ca81d7a0
JD
22970{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22971echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22972if test "${emacs_cv_langinfo_codeset+set}" = set; then
22973 echo $ECHO_N "(cached) $ECHO_C" >&6
22974else
22975 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22976/* confdefs.h. */
22977_ACEOF
22978cat confdefs.h >>conftest.$ac_ext
22979cat >>conftest.$ac_ext <<_ACEOF
22980/* end confdefs.h. */
6a3a24fa
JD
22981#include <langinfo.h>
22982int
22983main ()
22984{
22985char* cs = nl_langinfo(CODESET);
22986 ;
22987 return 0;
22988}
22989_ACEOF
22990rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22991if { (ac_try="$ac_link"
22992case "(($ac_try" in
22993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22994 *) ac_try_echo=$ac_try;;
22995esac
22996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22997 (eval "$ac_link") 2>conftest.er1
6a3a24fa 22998 ac_status=$?
edfaf76d
LK
22999 grep -v '^ *+' conftest.er1 >conftest.err
23000 rm -f conftest.er1
23001 cat conftest.err >&5
6a3a24fa 23002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23003 (exit $ac_status); } && {
23004 test -z "$ac_c_werror_flag" ||
23005 test ! -s conftest.err
23006 } && test -s conftest$ac_exeext &&
23007 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23008 emacs_cv_langinfo_codeset=yes
23009else
23010 echo "$as_me: failed program was:" >&5
19650fd6
AS
23011sed 's/^/| /' conftest.$ac_ext >&5
23012
ca81d7a0 23013 emacs_cv_langinfo_codeset=no
6a3a24fa 23014fi
ca81d7a0 23015
f053c89f 23016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23017 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23018
23019fi
ca81d7a0
JD
23020{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23021echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23022if test $emacs_cv_langinfo_codeset = yes; then
23023
23024cat >>confdefs.h <<\_ACEOF
23025#define HAVE_LANGINFO_CODESET 1
23026_ACEOF
23027
23028fi
23029
ca81d7a0
JD
23030{ echo "$as_me:$LINENO: checking for size_t" >&5
23031echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23032if test "${ac_cv_type_size_t+set}" = set; then
23033 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23034else
503d2be0 23035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23036/* confdefs.h. */
23037_ACEOF
23038cat confdefs.h >>conftest.$ac_ext
23039cat >>conftest.$ac_ext <<_ACEOF
23040/* end confdefs.h. */
503d2be0 23041$ac_includes_default
ca81d7a0 23042typedef size_t ac__type_new_;
503d2be0
AS
23043int
23044main ()
23045{
ca81d7a0 23046if ((ac__type_new_ *) 0)
503d2be0 23047 return 0;
ca81d7a0 23048if (sizeof (ac__type_new_))
503d2be0
AS
23049 return 0;
23050 ;
23051 return 0;
23052}
23053_ACEOF
23054rm -f conftest.$ac_objext
ca81d7a0
JD
23055if { (ac_try="$ac_compile"
23056case "(($ac_try" in
23057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23058 *) ac_try_echo=$ac_try;;
23059esac
23060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23061 (eval "$ac_compile") 2>conftest.er1
503d2be0 23062 ac_status=$?
edfaf76d
LK
23063 grep -v '^ *+' conftest.er1 >conftest.err
23064 rm -f conftest.er1
23065 cat conftest.err >&5
c0d27fcc 23066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23067 (exit $ac_status); } && {
23068 test -z "$ac_c_werror_flag" ||
23069 test ! -s conftest.err
23070 } && test -s conftest.$ac_objext; then
8730a8da
DL
23071 ac_cv_type_size_t=yes
23072else
503d2be0 23073 echo "$as_me: failed program was:" >&5
19650fd6
AS
23074sed 's/^/| /' conftest.$ac_ext >&5
23075
ca81d7a0 23076 ac_cv_type_size_t=no
8730a8da 23077fi
ca81d7a0
JD
23078
23079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23080fi
ca81d7a0
JD
23081{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23082echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23083if test $ac_cv_type_size_t = yes; then
503d2be0 23084
c0d27fcc
MR
23085cat >>confdefs.h <<_ACEOF
23086#define HAVE_SIZE_T 1
23087_ACEOF
23088
8730a8da
DL
23089
23090fi
23091
c0d27fcc 23092
ca81d7a0
JD
23093{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23094echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23095if test "${ac_cv_type_mbstate_t+set}" = set; then
23096 echo $ECHO_N "(cached) $ECHO_C" >&6
23097else
23098 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23099/* confdefs.h. */
23100_ACEOF
23101cat confdefs.h >>conftest.$ac_ext
23102cat >>conftest.$ac_ext <<_ACEOF
23103/* end confdefs.h. */
973a76b1
DL
23104$ac_includes_default
23105# include <wchar.h>
23106int
23107main ()
23108{
23109mbstate_t x; return sizeof x;
23110 ;
23111 return 0;
23112}
23113_ACEOF
23114rm -f conftest.$ac_objext
ca81d7a0
JD
23115if { (ac_try="$ac_compile"
23116case "(($ac_try" in
23117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23118 *) ac_try_echo=$ac_try;;
23119esac
23120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23121 (eval "$ac_compile") 2>conftest.er1
973a76b1 23122 ac_status=$?
edfaf76d
LK
23123 grep -v '^ *+' conftest.er1 >conftest.err
23124 rm -f conftest.er1
23125 cat conftest.err >&5
973a76b1 23126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23127 (exit $ac_status); } && {
23128 test -z "$ac_c_werror_flag" ||
23129 test ! -s conftest.err
23130 } && test -s conftest.$ac_objext; then
973a76b1
DL
23131 ac_cv_type_mbstate_t=yes
23132else
23133 echo "$as_me: failed program was:" >&5
19650fd6
AS
23134sed 's/^/| /' conftest.$ac_ext >&5
23135
ca81d7a0 23136 ac_cv_type_mbstate_t=no
973a76b1 23137fi
ca81d7a0
JD
23138
23139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23140fi
ca81d7a0
JD
23141{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23142echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23143 if test $ac_cv_type_mbstate_t = yes; then
23144
23145cat >>confdefs.h <<\_ACEOF
23146#define HAVE_MBSTATE_T 1
23147_ACEOF
23148
23149 else
23150
23151cat >>confdefs.h <<\_ACEOF
23152#define mbstate_t int
23153_ACEOF
23154
23155 fi
23156
ca81d7a0
JD
23157{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23158echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23159if test "${emacs_cv_c_restrict+set}" = set; then
23160 echo $ECHO_N "(cached) $ECHO_C" >&6
23161else
23162 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23163/* confdefs.h. */
23164_ACEOF
23165cat confdefs.h >>conftest.$ac_ext
23166cat >>conftest.$ac_ext <<_ACEOF
23167/* end confdefs.h. */
22044edf
DL
23168void fred (int *restrict x);
23169int
23170main ()
23171{
b936fae4 23172
22044edf
DL
23173 ;
23174 return 0;
23175}
c0d27fcc 23176_ACEOF
22044edf 23177rm -f conftest.$ac_objext
ca81d7a0
JD
23178if { (ac_try="$ac_compile"
23179case "(($ac_try" in
23180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23181 *) ac_try_echo=$ac_try;;
23182esac
23183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23184 (eval "$ac_compile") 2>conftest.er1
22044edf 23185 ac_status=$?
edfaf76d
LK
23186 grep -v '^ *+' conftest.er1 >conftest.err
23187 rm -f conftest.er1
23188 cat conftest.err >&5
22044edf 23189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23190 (exit $ac_status); } && {
23191 test -z "$ac_c_werror_flag" ||
23192 test ! -s conftest.err
23193 } && test -s conftest.$ac_objext; then
22044edf
DL
23194 emacs_cv_c_restrict=yes
23195else
23196 echo "$as_me: failed program was:" >&5
19650fd6
AS
23197sed 's/^/| /' conftest.$ac_ext >&5
23198
ca81d7a0 23199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23200/* confdefs.h. */
23201_ACEOF
23202cat confdefs.h >>conftest.$ac_ext
23203cat >>conftest.$ac_ext <<_ACEOF
23204/* end confdefs.h. */
22044edf
DL
23205void fred (int *__restrict x);
23206int
23207main ()
23208{
c0d27fcc 23209
22044edf
DL
23210 ;
23211 return 0;
23212}
c0d27fcc 23213_ACEOF
22044edf 23214rm -f conftest.$ac_objext
ca81d7a0
JD
23215if { (ac_try="$ac_compile"
23216case "(($ac_try" in
23217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23218 *) ac_try_echo=$ac_try;;
23219esac
23220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23221 (eval "$ac_compile") 2>conftest.er1
22044edf 23222 ac_status=$?
edfaf76d
LK
23223 grep -v '^ *+' conftest.er1 >conftest.err
23224 rm -f conftest.er1
23225 cat conftest.err >&5
22044edf 23226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23227 (exit $ac_status); } && {
23228 test -z "$ac_c_werror_flag" ||
23229 test ! -s conftest.err
23230 } && test -s conftest.$ac_objext; then
22044edf
DL
23231 emacs_cv_c_restrict=__restrict
23232else
23233 echo "$as_me: failed program was:" >&5
19650fd6
AS
23234sed 's/^/| /' conftest.$ac_ext >&5
23235
ca81d7a0 23236 emacs_cv_c_restrict=no
ba4481b5 23237fi
ca81d7a0
JD
23238
23239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23240fi
ca81d7a0
JD
23241
23242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23243fi
ca81d7a0
JD
23244{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23245echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23246case "$emacs_cv_c_restrict" in
23247 yes) emacs_restrict=restrict;;
23248 no) emacs_restrict="";;
23249 *) emacs_restrict="$emacs_cv_c_restrict";;
23250esac
23251if test "$emacs_restrict" != __restrict; then
b936fae4 23252
22044edf
DL
23253cat >>confdefs.h <<_ACEOF
23254#define __restrict $emacs_restrict
c0d27fcc 23255_ACEOF
ba4481b5
DL
23256
23257fi
ba4481b5 23258
ca81d7a0
JD
23259{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23260echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23261if test "${emacs_cv_c_restrict_arr+set}" = set; then
23262 echo $ECHO_N "(cached) $ECHO_C" >&6
23263else
23264 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23265/* confdefs.h. */
23266_ACEOF
23267cat confdefs.h >>conftest.$ac_ext
23268cat >>conftest.$ac_ext <<_ACEOF
23269/* end confdefs.h. */
22044edf
DL
23270void fred (int x[__restrict]);
23271int
23272main ()
23273{
b936fae4 23274
22044edf
DL
23275 ;
23276 return 0;
23277}
c0d27fcc 23278_ACEOF
22044edf 23279rm -f conftest.$ac_objext
ca81d7a0
JD
23280if { (ac_try="$ac_compile"
23281case "(($ac_try" in
23282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23283 *) ac_try_echo=$ac_try;;
23284esac
23285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23286 (eval "$ac_compile") 2>conftest.er1
22044edf 23287 ac_status=$?
edfaf76d
LK
23288 grep -v '^ *+' conftest.er1 >conftest.err
23289 rm -f conftest.er1
23290 cat conftest.err >&5
22044edf 23291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23292 (exit $ac_status); } && {
23293 test -z "$ac_c_werror_flag" ||
23294 test ! -s conftest.err
23295 } && test -s conftest.$ac_objext; then
22044edf
DL
23296 emacs_cv_c_restrict_arr=yes
23297else
23298 echo "$as_me: failed program was:" >&5
19650fd6
AS
23299sed 's/^/| /' conftest.$ac_ext >&5
23300
ca81d7a0 23301 emacs_cv_c_restrict_arr=no
ba4481b5 23302fi
ca81d7a0
JD
23303
23304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23305fi
ca81d7a0
JD
23306{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23307echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23308if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23309
c0d27fcc 23310cat >>confdefs.h <<\_ACEOF
22044edf 23311#define __restrict_arr __restrict
c0d27fcc 23312_ACEOF
ba4481b5 23313
ba4481b5
DL
23314fi
23315
c0d27fcc 23316
c0d27fcc 23317
22044edf
DL
23318# Set up the CFLAGS for real compilation, so we can substitute it.
23319CFLAGS="$REAL_CFLAGS"
23320CPPFLAGS="$REAL_CPPFLAGS"
23321
23322#### Find out which version of Emacs this is.
23323version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23324 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23325if test x"${version}" = x; then
23326 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23327echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23328 { (exit 1); exit 1; }; }
23329fi
23330
23331### Specify what sort of things we'll be editing into Makefile and config.h.
23332### Use configuration here uncanonicalized to avoid exceeding size limits.
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
6a3a24fa 23365
22044edf
DL
23366
23367
23368cat >>confdefs.h <<_ACEOF
23369#define EMACS_CONFIGURATION "${canonical}"
23370_ACEOF
23371
23372
23373cat >>confdefs.h <<_ACEOF
23374#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23375_ACEOF
23376
23377
23378cat >>confdefs.h <<_ACEOF
23379#define config_machfile "${machfile}"
23380_ACEOF
23381
23382
23383cat >>confdefs.h <<_ACEOF
23384#define config_opsysfile "${opsysfile}"
23385_ACEOF
23386
23387
23388cat >>confdefs.h <<_ACEOF
23389#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23390_ACEOF
23391
23392
23393cat >>confdefs.h <<_ACEOF
23394#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23395_ACEOF
23396
23397
23398cat >>confdefs.h <<_ACEOF
23399#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23400_ACEOF
23401
23402
23403cat >>confdefs.h <<_ACEOF
23404#define UNEXEC_SRC ${UNEXEC_SRC}
23405_ACEOF
23406
23407
23408if test "${HAVE_X_WINDOWS}" = "yes" ; then
23409
23410cat >>confdefs.h <<\_ACEOF
23411#define HAVE_X_WINDOWS 1
23412_ACEOF
23413
23414fi
23415if test "${USE_X_TOOLKIT}" != "none" ; then
23416
23417cat >>confdefs.h <<\_ACEOF
23418#define USE_X_TOOLKIT 1
23419_ACEOF
23420
23421fi
23422if test "${HAVE_X11}" = "yes" ; then
23423
23424cat >>confdefs.h <<\_ACEOF
23425#define HAVE_X11 1
23426_ACEOF
23427
23428fi
23429if test "${HAVE_XFREE386}" = "yes" ; then
23430
23431cat >>confdefs.h <<\_ACEOF
23432#define HAVE_XFREE386 1
23433_ACEOF
23434
23435fi
23436if test "${HAVE_MENUS}" = "yes" ; then
23437
23438cat >>confdefs.h <<\_ACEOF
23439#define HAVE_MENUS 1
23440_ACEOF
23441
23442fi
23443if test "${GNU_MALLOC}" = "yes" ; then
23444
23445cat >>confdefs.h <<\_ACEOF
23446#define GNU_MALLOC 1
23447_ACEOF
23448
23449fi
23450if test "${REL_ALLOC}" = "yes" ; then
23451
23452cat >>confdefs.h <<\_ACEOF
23453#define REL_ALLOC 1
23454_ACEOF
23455
23456fi
23457
23458
23459
c0d27fcc
MR
23460
23461
ba4481b5 23462#### Report on what we decided to do.
488dd4c4
JD
23463#### Report GTK as a toolkit, even if it doesn't use Xt.
23464#### It makes printing result more understandable as using GTK sets
23465#### toolkit_scroll_bars to yes by default.
23466if test "${HAVE_GTK}" = "yes"; then
23467 USE_X_TOOLKIT=GTK
23468fi
23469
ba4481b5
DL
23470echo "
23471Configured for \`${canonical}'.
23472
23473 Where should the build process find the source code? ${srcdir}
23474 What operating system and machine description files should Emacs use?
23475 \`${opsysfile}' and \`${machfile}'
23476 What compiler should emacs be built with? ${CC} ${CFLAGS}
23477 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23478 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23479 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23480 What window system should Emacs use? ${window_system}
8e967cf7 23481 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23482
23483if test -n "${x_includes}"; then
23484echo " Where do we find X Windows header files? ${x_includes}"
23485else
23486echo " Where do we find X Windows header files? Standard dirs"
23487fi
23488if test -n "${x_libraries}"; then
23489echo " Where do we find X Windows libraries? ${x_libraries}"
23490else
23491echo " Where do we find X Windows libraries? Standard dirs"
23492fi
23493
23494echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23495echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23496echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23497echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
23498echo " Does Emacs use -lungif? ${HAVE_GIF}"
23499echo " Does Emacs use -lpng? ${HAVE_PNG}"
23500echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23501echo
23502
d0098f13
JD
23503if test $USE_XASSERTS = yes; then
23504 echo " Compiling with asserts turned on."
d0098f13
JD
23505 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23506 echo
23507fi
05cf15c6 23508
a2d3b5bd
JD
23509if test "$USE_X_TOOLKIT" = GTK; then
23510 case "$canonical" in
23511 *cygwin*)
23512 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23513 will probably get a crash on startup. If this happens, please use another
23514 toolkit for Emacs. See etc/PROBLEMS for more information."
23515 ;;
23516 esac
23517fi
23518
05cf15c6 23519
05cf15c6 23520
ba4481b5
DL
23521# Remove any trailing slashes in these variables.
23522test "${prefix}" != NONE &&
23523 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23524test "${exec_prefix}" != NONE &&
23525 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23526
d0e9bfd2
GM
23527## Check if the C preprocessor will convert `..' to `. .'. If so, set
23528## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23529## from Makefile.c can correctly provide the arg `-traditional' to the
23530## C preprocessor.
23531
503d2be0 23532cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23533/* confdefs.h. */
23534_ACEOF
23535cat confdefs.h >>conftest.$ac_ext
23536cat >>conftest.$ac_ext <<_ACEOF
23537/* end confdefs.h. */
d0e9bfd2 23538yes..yes
503d2be0 23539_ACEOF
d0e9bfd2 23540if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23541 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23542 CPP_NEED_TRADITIONAL=no
23543else
d0e9bfd2
GM
23544 CPP_NEED_TRADITIONAL=yes
23545fi
23546rm -f conftest*
23547
c0d27fcc 23548
ca81d7a0
JD
23549ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
23550
23551ac_config_commands="$ac_config_commands default"
23552
503d2be0 23553cat >confcache <<\_ACEOF
ba4481b5
DL
23554# This file is a shell script that caches the results of configure
23555# tests run on this system so they can be shared between configure
503d2be0
AS
23556# scripts and configure runs, see configure's option --config-cache.
23557# It is not useful on other systems. If it contains results you don't
23558# want to keep, you may remove or edit it.
ba4481b5 23559#
503d2be0
AS
23560# config.status only pays attention to the cache file if you give it
23561# the --recheck option to rerun configure.
ba4481b5 23562#
6bae0ccf 23563# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23564# loading this file, other *unset* `ac_cv_foo' will be assigned the
23565# following values.
23566
23567_ACEOF
23568
ba4481b5
DL
23569# The following way of writing the cache mishandles newlines in values,
23570# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 23571# So, we kill variables containing newlines.
ba4481b5
DL
23572# Ultrix sh set writes to stderr and can't be redirected directly,
23573# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
23574(
23575 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23576 eval ac_val=\$$ac_var
23577 case $ac_val in #(
23578 *${as_nl}*)
23579 case $ac_var in #(
23580 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23581echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23582 esac
23583 case $ac_var in #(
23584 _ | IFS | as_nl) ;; #(
23585 *) $as_unset $ac_var ;;
23586 esac ;;
23587 esac
23588 done
23589
503d2be0 23590 (set) 2>&1 |
ca81d7a0
JD
23591 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23592 *${as_nl}ac_space=\ *)
503d2be0
AS
23593 # `set' does not quote correctly, so add quotes (double-quote
23594 # substitution turns \\\\ into \\, and sed turns \\ into \).
23595 sed -n \
edfaf76d
LK
23596 "s/'/'\\\\''/g;
23597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 23598 ;; #(
503d2be0
AS
23599 *)
23600 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 23601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23602 ;;
ca81d7a0
JD
23603 esac |
23604 sort
23605) |
503d2be0 23606 sed '
ca81d7a0 23607 /^ac_cv_env_/b end
503d2be0 23608 t clear
ca81d7a0 23609 :clear
503d2be0
AS
23610 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23611 t end
ca81d7a0
JD
23612 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23613 :end' >>confcache
23614if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23615 if test -w "$cache_file"; then
23616 test "x$cache_file" != "x/dev/null" &&
23617 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23618echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23619 cat confcache >$cache_file
ba4481b5 23620 else
ca81d7a0
JD
23621 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23622echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23623 fi
23624fi
23625rm -f confcache
23626
ba4481b5
DL
23627test "x$prefix" = xNONE && prefix=$ac_default_prefix
23628# Let make expand exec_prefix.
23629test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23630
ba4481b5
DL
23631DEFS=-DHAVE_CONFIG_H
23632
6bae0ccf
DL
23633ac_libobjs=
23634ac_ltlibobjs=
23635for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23636 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
23637 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23638 ac_i=`echo "$ac_i" | sed "$ac_script"`
23639 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23640 # will be set to the directory where LIBOBJS objects are built.
23641 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23642 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23643done
23644LIBOBJS=$ac_libobjs
23645
23646LTLIBOBJS=$ac_ltlibobjs
23647
23648
c0d27fcc 23649
ba4481b5 23650: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23651ac_clean_files_save=$ac_clean_files
23652ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23653{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23654echo "$as_me: creating $CONFIG_STATUS" >&6;}
23655cat >$CONFIG_STATUS <<_ACEOF
23656#! $SHELL
c0d27fcc 23657# Generated by $as_me.
ba4481b5 23658# Run this file to recreate the current configuration.
ba4481b5 23659# Compiler output produced by configure, useful for debugging
503d2be0 23660# configure, is in config.log if it exists.
ba4481b5 23661
503d2be0 23662debug=false
19650fd6
AS
23663ac_cs_recheck=false
23664ac_cs_silent=false
503d2be0 23665SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23666_ACEOF
23667
23668cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23669## --------------------- ##
23670## M4sh Initialization. ##
23671## --------------------- ##
23672
f053c89f
CY
23673# Be more Bourne compatible
23674DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23675if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23676 emulate sh
23677 NULLCMD=:
6bae0ccf
DL
23678 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23679 # is contrary to our usage. Disable this feature.
23680 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
23681 setopt NO_GLOB_SUBST
23682else
f053c89f
CY
23683 case `(set -o) 2>/dev/null` in
23684 *posix*) set -o posix ;;
23685esac
23686
503d2be0 23687fi
f053c89f
CY
23688
23689
503d2be0 23690
ca81d7a0
JD
23691
23692# PATH needs CR
23693# Avoid depending upon Character Ranges.
23694as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23695as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23696as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23697as_cr_digits='0123456789'
23698as_cr_alnum=$as_cr_Letters$as_cr_digits
23699
23700# The user is always right.
23701if test "${PATH_SEPARATOR+set}" != set; then
23702 echo "#! /bin/sh" >conf$$.sh
23703 echo "exit 0" >>conf$$.sh
23704 chmod +x conf$$.sh
23705 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23706 PATH_SEPARATOR=';'
23707 else
23708 PATH_SEPARATOR=:
23709 fi
23710 rm -f conf$$.sh
23711fi
23712
c0d27fcc 23713# Support unset when possible.
edfaf76d 23714if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23715 as_unset=unset
23716else
23717 as_unset=false
23718fi
23719
6bae0ccf 23720
ca81d7a0
JD
23721# IFS
23722# We need space, tab and new line, in precisely that order. Quoting is
23723# there to prevent editors from complaining about space-tab.
23724# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23725# splitting by setting IFS to empty value.)
23726as_nl='
23727'
23728IFS=" "" $as_nl"
23729
23730# Find who we are. Look in the path if we contain no directory separator.
23731case $0 in
23732 *[\\/]* ) as_myself=$0 ;;
23733 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23734for as_dir in $PATH
23735do
23736 IFS=$as_save_IFS
23737 test -z "$as_dir" && as_dir=.
23738 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23739done
23740IFS=$as_save_IFS
23741
23742 ;;
23743esac
23744# We did not find ourselves, most probably we were run as `sh COMMAND'
23745# in which case we are not to be found in the path.
23746if test "x$as_myself" = x; then
23747 as_myself=$0
23748fi
23749if test ! -f "$as_myself"; then
23750 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23751 { (exit 1); exit 1; }
23752fi
23753
6bae0ccf 23754# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
23755for as_var in ENV MAIL MAILPATH
23756do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23757done
6bae0ccf
DL
23758PS1='$ '
23759PS2='> '
23760PS4='+ '
23761
23762# NLS nuisances.
19650fd6
AS
23763for as_var in \
23764 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23765 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23766 LC_TELEPHONE LC_TIME
6bae0ccf 23767do
edfaf76d 23768 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23769 eval $as_var=C; export $as_var
23770 else
ca81d7a0 23771 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23772 fi
23773done
23774
23775# Required to use basename.
ca81d7a0
JD
23776if expr a : '\(a\)' >/dev/null 2>&1 &&
23777 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23778 as_expr=expr
23779else
23780 as_expr=false
23781fi
23782
ca81d7a0 23783if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23784 as_basename=basename
23785else
23786 as_basename=false
23787fi
c0d27fcc
MR
23788
23789
503d2be0 23790# Name of the executable.
ca81d7a0 23791as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23792$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23793 X"$0" : 'X\(//\)$' \| \
ca81d7a0 23794 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23795echo X/"$0" |
ca81d7a0
JD
23796 sed '/^.*\/\([^/][^/]*\)\/*$/{
23797 s//\1/
23798 q
23799 }
23800 /^X\/\(\/\/\)$/{
23801 s//\1/
23802 q
23803 }
23804 /^X\/\(\/\).*/{
23805 s//\1/
23806 q
23807 }
23808 s/.*/./; q'`
c0d27fcc 23809
ca81d7a0
JD
23810# CDPATH.
23811$as_unset CDPATH
4b411bfe
CY
23812
23813
c0d27fcc
MR
23814
23815 as_lineno_1=$LINENO
23816 as_lineno_2=$LINENO
c0d27fcc 23817 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 23818 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23819
23820 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23821 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
23822 # line-number line after each line using $LINENO; the second 'sed'
23823 # does the real work. The second script uses 'N' to pair each
23824 # line-number line with the line containing $LINENO, and appends
23825 # trailing '-' during substitution so that $LINENO is not a special
23826 # case at line end.
c0d27fcc 23827 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
23828 # scripts with optimization help from Paolo Bonzini. Blame Lee
23829 # E. McMahon (1931-1989) for sed's syntax. :-)
23830 sed -n '
23831 p
23832 /[$]LINENO/=
23833 ' <$as_myself |
c0d27fcc 23834 sed '
ca81d7a0
JD
23835 s/[$]LINENO.*/&-/
23836 t lineno
23837 b
23838 :lineno
c0d27fcc 23839 N
ca81d7a0
JD
23840 :loop
23841 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23842 t loop
ca81d7a0 23843 s/-\n.*//
c0d27fcc 23844 ' >$as_me.lineno &&
ca81d7a0
JD
23845 chmod +x "$as_me.lineno" ||
23846 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23847 { (exit 1); exit 1; }; }
23848
23849 # Don't try to exec as it changes $[0], causing all sort of problems
23850 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
23851 # original and so on. Autoconf is especially sensitive to this).
23852 . "./$as_me.lineno"
c0d27fcc
MR
23853 # Exit status is that of the last command.
23854 exit
23855}
23856
23857
ca81d7a0
JD
23858if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23859 as_dirname=dirname
23860else
23861 as_dirname=false
23862fi
23863
23864ECHO_C= ECHO_N= ECHO_T=
23865case `echo -n x` in
23866-n*)
23867 case `echo 'x\c'` in
23868 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23869 *) ECHO_C='\c';;
23870 esac;;
23871*)
23872 ECHO_N='-n';;
c0d27fcc 23873esac
503d2be0 23874
ca81d7a0
JD
23875if expr a : '\(a\)' >/dev/null 2>&1 &&
23876 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23877 as_expr=expr
23878else
23879 as_expr=false
23880fi
23881
23882rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
23883if test -d conf$$.dir; then
23884 rm -f conf$$.dir/conf$$.file
23885else
23886 rm -f conf$$.dir
23887 mkdir conf$$.dir
23888fi
503d2be0
AS
23889echo >conf$$.file
23890if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
23891 as_ln_s='ln -s'
23892 # ... but there are two gotchas:
23893 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23894 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23895 # In both cases, we have to default to `cp -p'.
23896 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23897 as_ln_s='cp -p'
503d2be0
AS
23898elif ln conf$$.file conf$$ 2>/dev/null; then
23899 as_ln_s=ln
23900else
23901 as_ln_s='cp -p'
23902fi
ca81d7a0
JD
23903rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23904rmdir conf$$.dir 2>/dev/null
503d2be0 23905
6bae0ccf
DL
23906if mkdir -p . 2>/dev/null; then
23907 as_mkdir_p=:
23908else
edfaf76d 23909 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23910 as_mkdir_p=false
23911fi
23912
f053c89f
CY
23913if test -x / >/dev/null 2>&1; then
23914 as_test_x='test -x'
ca81d7a0 23915else
f053c89f
CY
23916 if ls -dL / >/dev/null 2>&1; then
23917 as_ls_L_option=L
23918 else
23919 as_ls_L_option=
23920 fi
23921 as_test_x='
23922 eval sh -c '\''
23923 if test -d "$1"; then
23924 test -d "$1/.";
23925 else
23926 case $1 in
23927 -*)set "./$1";;
23928 esac;
23929 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23930 ???[sx]*):;;*)false;;esac;fi
23931 '\'' sh
23932 '
ca81d7a0 23933fi
f053c89f 23934as_executable_p=$as_test_x
503d2be0 23935
c0d27fcc 23936# Sed expression to map a string onto a valid CPP name.
edfaf76d 23937as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23938
23939# Sed expression to map a string onto a valid variable name.
edfaf76d 23940as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23941
503d2be0 23942
503d2be0
AS
23943exec 6>&1
23944
ca81d7a0 23945# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23946# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
23947# values after options handling.
23948ac_log="
c0d27fcc 23949This file was extended by $as_me, which was
f053c89f 23950generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23951
23952 CONFIG_FILES = $CONFIG_FILES
23953 CONFIG_HEADERS = $CONFIG_HEADERS
23954 CONFIG_LINKS = $CONFIG_LINKS
23955 CONFIG_COMMANDS = $CONFIG_COMMANDS
23956 $ $0 $@
23957
ca81d7a0
JD
23958on `(hostname || uname -n) 2>/dev/null | sed 1q`
23959"
23960
503d2be0
AS
23961_ACEOF
23962
ca81d7a0 23963cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23964# Files that config.status was made for.
ca81d7a0
JD
23965config_files="$ac_config_files"
23966config_headers="$ac_config_headers"
23967config_commands="$ac_config_commands"
4b411bfe 23968
ca81d7a0 23969_ACEOF
503d2be0 23970
c0d27fcc 23971cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23972ac_cs_usage="\
23973\`$as_me' instantiates files from templates according to the
23974current configuration.
23975
23976Usage: $0 [OPTIONS] [FILE]...
23977
23978 -h, --help print this help, then exit
f053c89f 23979 -V, --version print version number and configuration settings, then exit
19650fd6 23980 -q, --quiet do not print progress messages
503d2be0
AS
23981 -d, --debug don't remove temporary files
23982 --recheck update $as_me by reconfiguring in the same conditions
23983 --file=FILE[:TEMPLATE]
edfaf76d 23984 instantiate the configuration file FILE
503d2be0 23985 --header=FILE[:TEMPLATE]
edfaf76d 23986 instantiate the configuration header FILE
503d2be0
AS
23987
23988Configuration files:
23989$config_files
23990
23991Configuration headers:
23992$config_headers
23993
23994Configuration commands:
23995$config_commands
23996
23997Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 23998
ca81d7a0 23999_ACEOF
c0d27fcc 24000cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24001ac_cs_version="\\
24002config.status
f053c89f 24003configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24004 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24005
040c474e 24006Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24007This config.status script is free software; the Free Software Foundation
24008gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24009
24010ac_pwd='$ac_pwd'
24011srcdir='$srcdir'
24012INSTALL='$INSTALL'
c0d27fcc 24013_ACEOF
503d2be0 24014
c0d27fcc 24015cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24016# If no file are specified by the user, then we need to provide default
24017# value. By we need to know if files were specified by the user.
24018ac_need_defaults=:
24019while test $# != 0
ba4481b5 24020do
503d2be0
AS
24021 case $1 in
24022 --*=*)
ca81d7a0
JD
24023 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24024 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24025 ac_shift=:
24026 ;;
ca81d7a0 24027 *)
6bae0ccf
DL
24028 ac_option=$1
24029 ac_optarg=$2
24030 ac_shift=shift
503d2be0 24031 ;;
503d2be0
AS
24032 esac
24033
6bae0ccf 24034 case $ac_option in
503d2be0 24035 # Handling of the options.
19650fd6
AS
24036 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24037 ac_cs_recheck=: ;;
ca81d7a0
JD
24038 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24039 echo "$ac_cs_version"; exit ;;
24040 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24041 debug=: ;;
24042 --file | --fil | --fi | --f )
6bae0ccf
DL
24043 $ac_shift
24044 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24045 ac_need_defaults=false;;
24046 --header | --heade | --head | --hea )
6bae0ccf
DL
24047 $ac_shift
24048 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24049 ac_need_defaults=false;;
ca81d7a0
JD
24050 --he | --h)
24051 # Conflict between --help and --header
24052 { echo "$as_me: error: ambiguous option: $1
24053Try \`$0 --help' for more information." >&2
24054 { (exit 1); exit 1; }; };;
24055 --help | --hel | -h )
24056 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24057 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24058 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24059 ac_cs_silent=: ;;
503d2be0
AS
24060
24061 # This is an error.
ca81d7a0
JD
24062 -*) { echo "$as_me: error: unrecognized option: $1
24063Try \`$0 --help' for more information." >&2
503d2be0
AS
24064 { (exit 1); exit 1; }; } ;;
24065
ca81d7a0
JD
24066 *) ac_config_targets="$ac_config_targets $1"
24067 ac_need_defaults=false ;;
503d2be0 24068
ba4481b5 24069 esac
503d2be0 24070 shift
ba4481b5
DL
24071done
24072
19650fd6
AS
24073ac_configure_extra_args=
24074
24075if $ac_cs_silent; then
24076 exec 6>/dev/null
24077 ac_configure_extra_args="$ac_configure_extra_args --silent"
24078fi
24079
24080_ACEOF
24081cat >>$CONFIG_STATUS <<_ACEOF
24082if \$ac_cs_recheck; then
ca81d7a0
JD
24083 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24084 CONFIG_SHELL=$SHELL
24085 export CONFIG_SHELL
24086 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24087fi
24088
503d2be0 24089_ACEOF
ca81d7a0
JD
24090cat >>$CONFIG_STATUS <<\_ACEOF
24091exec 5>>config.log
24092{
24093 echo
24094 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24095## Running $as_me. ##
24096_ASBOX
24097 echo "$ac_log"
24098} >&5
ba4481b5 24099
ca81d7a0 24100_ACEOF
c0d27fcc 24101cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24102#
ca81d7a0 24103# INIT-COMMANDS
503d2be0 24104#
503d2be0
AS
24105GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24106
c0d27fcc
MR
24107_ACEOF
24108
4b411bfe 24109cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24110
24111# Handling of arguments.
503d2be0
AS
24112for ac_config_target in $ac_config_targets
24113do
ca81d7a0
JD
24114 case $ac_config_target in
24115 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24116 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24117 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24118 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
24119 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
24120 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
24121 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
24122 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
24123 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
24124 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
24125 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24126 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24127
c0d27fcc 24128 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24129echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24130 { (exit 1); exit 1; }; };;
24131 esac
ba4481b5 24132done
503d2be0 24133
ca81d7a0 24134
503d2be0
AS
24135# If the user did not use the arguments to specify the items to instantiate,
24136# then the envvar interface is used. Set only those that are not.
24137# We use the long form for the default assignment because of an extremely
24138# bizarre bug on SunOS 4.1.3.
24139if $ac_need_defaults; then
24140 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24141 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24142 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24143fi
503d2be0 24144
19650fd6 24145# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24146# simply because there is no reason against having it here, and in addition,
19650fd6 24147# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24148# Hook for its removal unless debugging.
24149# Note that there is a small window in which the directory will not be cleaned:
24150# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24151$debug ||
24152{
ca81d7a0
JD
24153 tmp=
24154 trap 'exit_status=$?
24155 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24156' 0
503d2be0
AS
24157 trap '{ (exit 1); exit 1; }' 1 2 13 15
24158}
503d2be0 24159# Create a (secure) tmp directory for tmp files.
19650fd6 24160
503d2be0 24161{
ca81d7a0 24162 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24163 test -n "$tmp" && test -d "$tmp"
24164} ||
24165{
ca81d7a0
JD
24166 tmp=./conf$$-$RANDOM
24167 (umask 077 && mkdir "$tmp")
503d2be0
AS
24168} ||
24169{
19650fd6 24170 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24171 { (exit 1); exit 1; }
24172}
24173
503d2be0 24174#
ca81d7a0 24175# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24176#
24177
24178# No need to generate the scripts if there are no CONFIG_FILES.
24179# This happens for instance when ./config.status config.h
ca81d7a0
JD
24180if test -n "$CONFIG_FILES"; then
24181
24182_ACEOF
24183
24184
24185
24186ac_delim='%!_!# '
24187for ac_last_try in false false false false false :; do
24188 cat >conf$$subs.sed <<_ACEOF
24189SHELL!$SHELL$ac_delim
24190PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24191PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24192PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24193PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24194PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24195PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24196exec_prefix!$exec_prefix$ac_delim
24197prefix!$prefix$ac_delim
24198program_transform_name!$program_transform_name$ac_delim
24199bindir!$bindir$ac_delim
24200sbindir!$sbindir$ac_delim
24201libexecdir!$libexecdir$ac_delim
24202datarootdir!$datarootdir$ac_delim
24203datadir!$datadir$ac_delim
24204sysconfdir!$sysconfdir$ac_delim
24205sharedstatedir!$sharedstatedir$ac_delim
24206localstatedir!$localstatedir$ac_delim
24207includedir!$includedir$ac_delim
24208oldincludedir!$oldincludedir$ac_delim
24209docdir!$docdir$ac_delim
24210infodir!$infodir$ac_delim
24211htmldir!$htmldir$ac_delim
24212dvidir!$dvidir$ac_delim
24213pdfdir!$pdfdir$ac_delim
24214psdir!$psdir$ac_delim
24215libdir!$libdir$ac_delim
24216localedir!$localedir$ac_delim
24217mandir!$mandir$ac_delim
24218DEFS!$DEFS$ac_delim
24219ECHO_C!$ECHO_C$ac_delim
24220ECHO_N!$ECHO_N$ac_delim
24221ECHO_T!$ECHO_T$ac_delim
24222LIBS!$LIBS$ac_delim
24223build_alias!$build_alias$ac_delim
24224host_alias!$host_alias$ac_delim
24225target_alias!$target_alias$ac_delim
24226MAINT!$MAINT$ac_delim
24227build!$build$ac_delim
24228build_cpu!$build_cpu$ac_delim
24229build_vendor!$build_vendor$ac_delim
24230build_os!$build_os$ac_delim
24231host!$host$ac_delim
24232host_cpu!$host_cpu$ac_delim
24233host_vendor!$host_vendor$ac_delim
24234host_os!$host_os$ac_delim
24235CC!$CC$ac_delim
24236CFLAGS!$CFLAGS$ac_delim
24237LDFLAGS!$LDFLAGS$ac_delim
24238CPPFLAGS!$CPPFLAGS$ac_delim
24239ac_ct_CC!$ac_ct_CC$ac_delim
24240EXEEXT!$EXEEXT$ac_delim
24241OBJEXT!$OBJEXT$ac_delim
24242CPP!$CPP$ac_delim
24243GREP!$GREP$ac_delim
24244EGREP!$EGREP$ac_delim
24245LN_S!$LN_S$ac_delim
24246INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24247INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24248INSTALL_DATA!$INSTALL_DATA$ac_delim
24249RANLIB!$RANLIB$ac_delim
24250INSTALL_INFO!$INSTALL_INFO$ac_delim
24251GZIP_PROG!$GZIP_PROG$ac_delim
24252LIBSOUND!$LIBSOUND$ac_delim
24253PKG_CONFIG!$PKG_CONFIG$ac_delim
24254ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24255ALSA_LIBS!$ALSA_LIBS$ac_delim
24256CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24257SET_MAKE!$SET_MAKE$ac_delim
24258XMKMF!$XMKMF$ac_delim
24259GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24260GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
24261XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24262XFT_LIBS!$XFT_LIBS$ac_delim
ca81d7a0
JD
24263ALLOCA!$ALLOCA$ac_delim
24264liblockfile!$liblockfile$ac_delim
24265LIBOBJS!$LIBOBJS$ac_delim
24266NEED_SETGID!$NEED_SETGID$ac_delim
24267KMEM_GROUP!$KMEM_GROUP$ac_delim
24268GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24269GETOPT_H!$GETOPT_H$ac_delim
24270GETOPTOBJS!$GETOPTOBJS$ac_delim
24271version!$version$ac_delim
24272configuration!$configuration$ac_delim
24273canonical!$canonical$ac_delim
24274srcdir!$srcdir$ac_delim
24275lispdir!$lispdir$ac_delim
24276locallisppath!$locallisppath$ac_delim
24277lisppath!$lisppath$ac_delim
24278x_default_search_path!$x_default_search_path$ac_delim
24279etcdir!$etcdir$ac_delim
24280archlibdir!$archlibdir$ac_delim
24281bitmapdir!$bitmapdir$ac_delim
24282gamedir!$gamedir$ac_delim
24283gameuser!$gameuser$ac_delim
24284c_switch_system!$c_switch_system$ac_delim
24285c_switch_machine!$c_switch_machine$ac_delim
ca81d7a0
JD
24286_ACEOF
24287
24288 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24289 break
24290 elif $ac_last_try; then
24291 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24292echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24293 { (exit 1); exit 1; }; }
24294 else
24295 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 24296 fi
ca81d7a0
JD
24297done
24298
24299ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24300if test -n "$ac_eof"; then
24301 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24302 ac_eof=`expr $ac_eof + 1`
24303fi
24304
24305cat >>$CONFIG_STATUS <<_ACEOF
24306cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24307/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24308_ACEOF
24309sed '
24310s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24311s/^/s,@/; s/!/@,|#_!!_#|/
24312:n
24313t n
24314s/'"$ac_delim"'$/,g/; t
24315s/$/\\/; p
24316N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24317' >>$CONFIG_STATUS <conf$$subs.sed
24318rm -f conf$$subs.sed
24319cat >>$CONFIG_STATUS <<_ACEOF
24320CEOF$ac_eof
24321_ACEOF
24322
24323
24324ac_delim='%!_!# '
24325for ac_last_try in false false false false false :; do
24326 cat >conf$$subs.sed <<_ACEOF
9d89ffd0
JD
24327LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24328LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
24329C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24330X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24331machfile!$machfile$ac_delim
24332opsysfile!$opsysfile$ac_delim
24333carbon_appdir!$carbon_appdir$ac_delim
24334LTLIBOBJS!$LTLIBOBJS$ac_delim
24335_ACEOF
24336
9d89ffd0 24337 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
ca81d7a0
JD
24338 break
24339 elif $ac_last_try; then
24340 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24341echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24342 { (exit 1); exit 1; }; }
24343 else
24344 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24345 fi
24346done
24347
24348ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24349if test -n "$ac_eof"; then
24350 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24351 ac_eof=`expr $ac_eof + 1`
24352fi
8eeae1c9 24353
ca81d7a0
JD
24354cat >>$CONFIG_STATUS <<_ACEOF
24355cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24356/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24357_ACEOF
24358sed '
24359s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24360s/^/s,@/; s/!/@,|#_!!_#|/
24361:n
24362t n
24363s/'"$ac_delim"'$/,g/; t
24364s/$/\\/; p
24365N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24366' >>$CONFIG_STATUS <conf$$subs.sed
24367rm -f conf$$subs.sed
24368cat >>$CONFIG_STATUS <<_ACEOF
24369:end
24370s/|#_!!_#|//g
24371CEOF$ac_eof
c0d27fcc 24372_ACEOF
ca81d7a0
JD
24373
24374
24375# VPATH may cause trouble with some makes, so we remove $(srcdir),
24376# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24377# trailing colons and then remove the whole line if VPATH becomes empty
24378# (actually we leave an empty line to preserve line numbers).
24379if test "x$srcdir" = x.; then
24380 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24381s/:*\$(srcdir):*/:/
24382s/:*\${srcdir}:*/:/
24383s/:*@srcdir@:*/:/
24384s/^\([^=]*=[ ]*\):*/\1/
24385s/:*$//
24386s/^[^=]*=[ ]*$//
24387}'
24388fi
24389
c0d27fcc 24390cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24391fi # test -n "$CONFIG_FILES"
24392
24393
24394for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24395do
24396 case $ac_tag in
24397 :[FHLC]) ac_mode=$ac_tag; continue;;
24398 esac
24399 case $ac_mode$ac_tag in
24400 :[FHL]*:*);;
24401 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24402echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24403 { (exit 1); exit 1; }; };;
24404 :[FH]-) ac_tag=-:-;;
24405 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24406 esac
24407 ac_save_IFS=$IFS
24408 IFS=:
24409 set x $ac_tag
24410 IFS=$ac_save_IFS
24411 shift
24412 ac_file=$1
24413 shift
24414
24415 case $ac_mode in
24416 :L) ac_source=$1;;
24417 :[FH])
24418 ac_file_inputs=
24419 for ac_f
24420 do
24421 case $ac_f in
24422 -) ac_f="$tmp/stdin";;
24423 *) # Look for the file first in the build tree, then in the source tree
24424 # (if the path is not absolute). The absolute path cannot be DOS-style,
24425 # because $ac_f cannot contain `:'.
24426 test -f "$ac_f" ||
24427 case $ac_f in
24428 [\\/$]*) false;;
24429 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24430 esac ||
24431 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24432echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24433 { (exit 1); exit 1; }; };;
24434 esac
24435 ac_file_inputs="$ac_file_inputs $ac_f"
24436 done
24437
24438 # Let's still pretend it is `configure' which instantiates (i.e., don't
24439 # use $as_me), people would be surprised to read:
24440 # /* config.h. Generated by config.status. */
24441 configure_input="Generated from "`IFS=:
24442 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24443 if test x"$ac_file" != x-; then
24444 configure_input="$ac_file. $configure_input"
24445 { echo "$as_me:$LINENO: creating $ac_file" >&5
24446echo "$as_me: creating $ac_file" >&6;}
24447 fi
24448
24449 case $ac_tag in
24450 *:-:* | *:-) cat >"$tmp/stdin";;
24451 esac
24452 ;;
ba4481b5
DL
24453 esac
24454
ca81d7a0 24455 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24456$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24457 X"$ac_file" : 'X\(//\)[^/]' \| \
24458 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 24459 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24460echo X"$ac_file" |
ca81d7a0
JD
24461 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24462 s//\1/
24463 q
24464 }
24465 /^X\(\/\/\)[^/].*/{
24466 s//\1/
24467 q
24468 }
24469 /^X\(\/\/\)$/{
24470 s//\1/
24471 q
24472 }
24473 /^X\(\/\).*/{
24474 s//\1/
24475 q
24476 }
24477 s/.*/./; q'`
24478 { as_dir="$ac_dir"
24479 case $as_dir in #(
24480 -*) as_dir=./$as_dir;;
24481 esac
24482 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24483 as_dirs=
ca81d7a0
JD
24484 while :; do
24485 case $as_dir in #(
24486 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24487 *) as_qdir=$as_dir;;
24488 esac
24489 as_dirs="'$as_qdir' $as_dirs"
24490 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24491$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24492 X"$as_dir" : 'X\(//\)[^/]' \| \
24493 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 24494 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24495echo X"$as_dir" |
ca81d7a0
JD
24496 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24497 s//\1/
24498 q
24499 }
24500 /^X\(\/\/\)[^/].*/{
24501 s//\1/
24502 q
24503 }
24504 /^X\(\/\/\)$/{
24505 s//\1/
24506 q
24507 }
24508 /^X\(\/\).*/{
24509 s//\1/
24510 q
24511 }
24512 s/.*/./; q'`
24513 test -d "$as_dir" && break
6bae0ccf 24514 done
ca81d7a0
JD
24515 test -z "$as_dirs" || eval "mkdir $as_dirs"
24516 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24517echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24518 { (exit 1); exit 1; }; }; }
c0d27fcc 24519 ac_builddir=.
98418dba 24520
ca81d7a0
JD
24521case "$ac_dir" in
24522.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24523*)
c0d27fcc 24524 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
24525 # A ".." for each directory in $ac_dir_suffix.
24526 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24527 case $ac_top_builddir_sub in
24528 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24529 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24530 esac ;;
24531esac
24532ac_abs_top_builddir=$ac_pwd
24533ac_abs_builddir=$ac_pwd$ac_dir_suffix
24534# for backward compatibility:
24535ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24536
24537case $srcdir in
ca81d7a0 24538 .) # We are building in place.
c0d27fcc 24539 ac_srcdir=.
ca81d7a0
JD
24540 ac_top_srcdir=$ac_top_builddir_sub
24541 ac_abs_top_srcdir=$ac_pwd ;;
24542 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24543 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
24544 ac_top_srcdir=$srcdir
24545 ac_abs_top_srcdir=$srcdir ;;
24546 *) # Relative name.
24547 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24548 ac_top_srcdir=$ac_top_build_prefix$srcdir
24549 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24550esac
ca81d7a0 24551ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24552
c0d27fcc 24553
ca81d7a0
JD
24554 case $ac_mode in
24555 :F)
24556 #
24557 # CONFIG_FILE
24558 #
ba4481b5 24559
503d2be0
AS
24560 case $INSTALL in
24561 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 24562 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24563 esac
ca81d7a0 24564_ACEOF
ba4481b5 24565
ca81d7a0
JD
24566cat >>$CONFIG_STATUS <<\_ACEOF
24567# If the template does not know about datarootdir, expand it.
24568# FIXME: This hack should be removed a few years after 2.60.
24569ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 24570
ca81d7a0
JD
24571case `sed -n '/datarootdir/ {
24572 p
24573 q
24574}
24575/@datadir@/p
24576/@docdir@/p
24577/@infodir@/p
24578/@localedir@/p
24579/@mandir@/p
24580' $ac_file_inputs` in
24581*datarootdir*) ac_datarootdir_seen=yes;;
24582*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24583 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24584echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 24585_ACEOF
ca81d7a0
JD
24586cat >>$CONFIG_STATUS <<_ACEOF
24587 ac_datarootdir_hack='
24588 s&@datadir@&$datadir&g
24589 s&@docdir@&$docdir&g
24590 s&@infodir@&$infodir&g
24591 s&@localedir@&$localedir&g
24592 s&@mandir@&$mandir&g
24593 s&\\\${datarootdir}&$datarootdir&g' ;;
24594esac
24595_ACEOF
24596
24597# Neutralize VPATH when `$srcdir' = `.'.
24598# Shell code in configure.ac might set extrasub.
24599# FIXME: do we really want to maintain this feature?
c0d27fcc 24600cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24601 sed "$ac_vpsub
24602$extrasub
c0d27fcc
MR
24603_ACEOF
24604cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24605:t
24606/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
24607s&@configure_input@&$configure_input&;t t
24608s&@top_builddir@&$ac_top_builddir_sub&;t t
24609s&@srcdir@&$ac_srcdir&;t t
24610s&@abs_srcdir@&$ac_abs_srcdir&;t t
24611s&@top_srcdir@&$ac_top_srcdir&;t t
24612s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24613s&@builddir@&$ac_builddir&;t t
24614s&@abs_builddir@&$ac_abs_builddir&;t t
24615s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24616s&@INSTALL@&$ac_INSTALL&;t t
24617$ac_datarootdir_hack
24618" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24619
24620test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24621 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24622 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24623 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24624which seems to be undefined. Please make sure it is defined." >&5
24625echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24626which seems to be undefined. Please make sure it is defined." >&2;}
24627
24628 rm -f "$tmp/stdin"
503d2be0 24629 case $ac_file in
ca81d7a0
JD
24630 -) cat "$tmp/out"; rm -f "$tmp/out";;
24631 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24632 esac
ca81d7a0
JD
24633 ;;
24634 :H)
24635 #
24636 # CONFIG_HEADER
24637 #
24638_ACEOF
24639
24640# Transform confdefs.h into a sed script `conftest.defines', that
24641# substitutes the proper values into config.h.in to produce config.h.
24642rm -f conftest.defines conftest.tail
24643# First, append a space to every undef/define line, to ease matching.
24644echo 's/$/ /' >conftest.defines
24645# Then, protect against being on the right side of a sed subst, or in
24646# an unquoted here document, in config.status. If some macros were
24647# called several times there might be several #defines for the same
24648# symbol, which is useless. But do not sort them, since the last
24649# AC_DEFINE must be honored.
24650ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24651# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24652# NAME is the cpp macro being defined, VALUE is the value it is being given.
24653# PARAMS is the parameter list in the macro definition--in most cases, it's
24654# just an empty string.
24655ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24656ac_dB='\\)[ (].*,\\1define\\2'
24657ac_dC=' '
24658ac_dD=' ,'
24659
24660uniq confdefs.h |
24661 sed -n '
24662 t rset
24663 :rset
24664 s/^[ ]*#[ ]*define[ ][ ]*//
24665 t ok
24666 d
24667 :ok
24668 s/[\\&,]/\\&/g
24669 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24670 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24671 ' >>conftest.defines
24672
24673# Remove the space that was appended to ease matching.
24674# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24675# example, in the case of _POSIX_SOURCE, which is predefined and required
24676# on some systems where configure will not decide to define it.
ca81d7a0
JD
24677# (The regexp can be short, since the line contains either #define or #undef.)
24678echo 's/ $//
24679s,^[ #]*u.*,/* & */,' >>conftest.defines
24680
24681# Break up conftest.defines:
24682ac_max_sed_lines=50
24683
24684# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24685# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24686# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24687# et cetera.
24688ac_in='$ac_file_inputs'
24689ac_out='"$tmp/out1"'
24690ac_nxt='"$tmp/out2"'
24691
24692while :
503d2be0 24693do
ca81d7a0
JD
24694 # Write a here document:
24695 cat >>$CONFIG_STATUS <<_ACEOF
24696 # First, check the format of the line:
24697 cat >"\$tmp/defines.sed" <<\\CEOF
24698/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24699/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24700b
24701:def
24702_ACEOF
24703 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24704 echo 'CEOF
ca81d7a0
JD
24705 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24706 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24707 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24708 grep . conftest.tail >/dev/null || break
503d2be0
AS
24709 rm -f conftest.defines
24710 mv conftest.tail conftest.defines
24711done
ca81d7a0 24712rm -f conftest.defines conftest.tail
503d2be0 24713
ca81d7a0 24714echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24715cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24716 if test x"$ac_file" != x-; then
ca81d7a0
JD
24717 echo "/* $configure_input */" >"$tmp/config.h"
24718 cat "$ac_result" >>"$tmp/config.h"
24719 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24720 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24721echo "$as_me: $ac_file is unchanged" >&6;}
24722 else
503d2be0 24723 rm -f $ac_file
ca81d7a0 24724 mv "$tmp/config.h" $ac_file
ba4481b5 24725 fi
503d2be0 24726 else
ca81d7a0
JD
24727 echo "/* $configure_input */"
24728 cat "$ac_result"
ba4481b5 24729 fi
ca81d7a0
JD
24730 rm -f "$tmp/out12"
24731 ;;
4b411bfe 24732
ca81d7a0
JD
24733 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24734echo "$as_me: executing $ac_file commands" >&6;}
24735 ;;
24736 esac
c0d27fcc 24737
4b411bfe 24738
ca81d7a0
JD
24739 case $ac_file$ac_mode in
24740 "default":C)
ba4481b5
DL
24741
24742### Make the necessary directories, if they don't exist.
24743for dir in etc lisp ; do
24744 test -d ${dir} || mkdir ${dir}
24745done
24746
24747# Build src/Makefile from ${srcdir}/src/Makefile.c
24748# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24749# This must be done after src/config.h is built, since we rely on that file.
24750
24751# Now get this: Some word that is part of the ${srcdir} directory name
24752# or the ${configuration} value might, just might, happen to be an
24753# identifier like `sun4' or `i386' or something, and be predefined by
24754# the C preprocessor to some helpful value like 1, or maybe the empty
24755# string. Needless to say consequent macro substitutions are less
24756# than conducive to the makefile finding the correct directory.
24757undefs="`echo $top_srcdir $configuration $canonical |
24758sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24759 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24760`"
24761
24762echo creating src/epaths.h
4aa6b955 24763${MAKE-make} epaths-force
ba4481b5 24764
1c203d4c
DL
24765# As of 2000-11-19, newest development versions of GNU cpp preprocess
24766# `..' to `. .' unless invoked with -traditional
24767
d0e9bfd2 24768if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24769 CPPFLAGS="$CPPFLAGS -traditional"
24770fi
24771
ba4481b5
DL
24772echo creating lib-src/Makefile
24773( cd lib-src
24774 rm -f junk.c junk1.c junk2.c
24775 sed -e '/start of cpp stuff/q' \
24776 < Makefile.c > junk1.c
24777 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24778 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24779 < Makefile.c > junk.c
503d2be0 24780 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24781 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24782 cat junk1.c junk2.c > Makefile.new
24783 rm -f junk.c junk1.c junk2.c
24784 chmod 444 Makefile.new
24785 mv -f Makefile.new Makefile
24786)
24787
24788echo creating src/Makefile
24789( cd src
24790 rm -f junk.c junk1.c junk2.c
24791 sed -e '/start of cpp stuff/q' \
24792 < Makefile.c > junk1.c
24793 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24794 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24795 < Makefile.c > junk.c
503d2be0 24796 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24797 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24798 cat junk1.c junk2.c > Makefile.new
24799 rm -f junk.c junk1.c junk2.c
24800 chmod 444 Makefile.new
24801 mv -f Makefile.new Makefile
24802)
24803
503d2be0 24804if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24805 echo creating src/.gdbinit
503d2be0 24806 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24807fi
24808
24809# This is how we know whether to re-run configure in certain cases.
24810touch src/config.stamp
24811
503d2be0 24812 ;;
ca81d7a0 24813
503d2be0 24814 esac
ca81d7a0 24815done # for ac_tag
503d2be0 24816
ba4481b5 24817
503d2be0 24818{ (exit 0); exit 0; }
c0d27fcc 24819_ACEOF
ba4481b5 24820chmod +x $CONFIG_STATUS
503d2be0
AS
24821ac_clean_files=$ac_clean_files_save
24822
c0d27fcc 24823
503d2be0
AS
24824# configure is writing to config.log, and then calls config.status.
24825# config.status does its own redirection, appending to config.log.
24826# Unfortunately, on DOS this fails, as config.log is still kept open
24827# by configure, so config.status won't be able to write to it; its
24828# output is simply discarded. So we exec the FD to /dev/null,
24829# effectively closing config.log, so it can be properly (re)opened and
24830# appended to by config.status. When coming back to configure, we
24831# need to make the FD available again.
24832if test "$no_create" != yes; then
24833 ac_cs_success=:
19650fd6
AS
24834 ac_config_status_args=
24835 test "$silent" = yes &&
24836 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24837 exec 5>/dev/null
19650fd6 24838 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24839 exec 5>>config.log
24840 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24841 # would make configure fail if this is the last instruction.
24842 $ac_cs_success || { (exit 1); exit 1; }
24843fi
f5f47add 24844
c0d27fcc 24845