Merge from emacs--devo--0
[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
JD
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 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
503d2be0
AS
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
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
6bae0ccf 152
c0d27fcc 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
c0d27fcc
MR
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}
c0d27fcc 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
c0d27fcc 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
MR
221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
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(
c0d27fcc
MR
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
c0d27fcc 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") || {
554b610f
MB
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>
503d2be0 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
c24fa7dc
MB
617ac_header_list=
618ac_func_list=
619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656MAINT
657build
658build_cpu
659build_vendor
660build_os
661host
662host_cpu
663host_vendor
664host_os
665CC
666CFLAGS
667LDFLAGS
668CPPFLAGS
669ac_ct_CC
670EXEEXT
671OBJEXT
672CPP
673GREP
674EGREP
675LN_S
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679RANLIB
680INSTALL_INFO
681GZIP_PROG
1bb9a689 682MAKEINFO
c24fa7dc
MB
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
c24fa7dc
MB
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
cfe440b8 690HAVE_XSERVER
0cfc0546
GM
691RSVG_CFLAGS
692RSVG_LIBS
c24fa7dc
MB
693GTK_CFLAGS
694GTK_LIBS
695XFT_CFLAGS
696XFT_LIBS
697FREETYPE_CFLAGS
698FREETYPE_LIBS
699FONTCONFIG_CFLAGS
700FONTCONFIG_LIBS
701HAVE_LIBOTF
702LIBOTF_CFLAGS
703LIBOTF_LIBS
704ALLOCA
705liblockfile
706LIBOBJS
707NEED_SETGID
708KMEM_GROUP
709GETLOADAVG_LIBS
710GETOPT_H
711GETOPTOBJS
712version
713configuration
714canonical
715srcdir
716lispdir
717locallisppath
718lisppath
719x_default_search_path
720etcdir
721archlibdir
722bitmapdir
723gamedir
724gameuser
725c_switch_system
726c_switch_machine
727LD_SWITCH_X_SITE
728LD_SWITCH_X_SITE_AUX
729C_SWITCH_X_SITE
730X_TOOLKIT_TYPE
731machfile
732opsysfile
733carbon_appdir
734LTLIBOBJS'
6bae0ccf 735ac_subst_files=''
ca81d7a0
JD
736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
f053c89f 742LIBS
ca81d7a0
JD
743CPPFLAGS
744CPP
745XMKMF'
746
c0d27fcc 747
ba4481b5 748# Initialize some variables set by options.
503d2be0
AS
749ac_init_help=
750ac_init_version=false
ba4481b5
DL
751# The variables have the same names as the options, with
752# dashes changed to underlines.
503d2be0 753cache_file=/dev/null
ba4481b5 754exec_prefix=NONE
ba4481b5 755no_create=
ba4481b5
DL
756no_recursion=
757prefix=NONE
758program_prefix=NONE
759program_suffix=NONE
760program_transform_name=s,x,x,
761silent=
762site=
763srcdir=
ba4481b5
DL
764verbose=
765x_includes=NONE
766x_libraries=NONE
503d2be0
AS
767
768# Installation directory options.
769# These are left unexpanded so users can "make install exec_prefix=/foo"
770# and all the variables that are supposed to be based on exec_prefix
771# by default will actually change.
772# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 773# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
774bindir='${exec_prefix}/bin'
775sbindir='${exec_prefix}/sbin'
776libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
777datarootdir='${prefix}/share'
778datadir='${datarootdir}'
ba4481b5
DL
779sysconfdir='${prefix}/etc'
780sharedstatedir='${prefix}/com'
781localstatedir='${prefix}/var'
ba4481b5
DL
782includedir='${prefix}/include'
783oldincludedir='/usr/include'
ca81d7a0
JD
784docdir='${datarootdir}/doc/${PACKAGE}'
785infodir='${datarootdir}/info'
786htmldir='${docdir}'
787dvidir='${docdir}'
788pdfdir='${docdir}'
789psdir='${docdir}'
790libdir='${exec_prefix}/lib'
791localedir='${datarootdir}/locale'
792mandir='${datarootdir}/man'
ba4481b5 793
ba4481b5 794ac_prev=
ca81d7a0 795ac_dashdash=
ba4481b5
DL
796for ac_option
797do
ba4481b5
DL
798 # If the previous option needs an argument, assign it.
799 if test -n "$ac_prev"; then
ca81d7a0 800 eval $ac_prev=\$ac_option
ba4481b5
DL
801 ac_prev=
802 continue
803 fi
804
ca81d7a0
JD
805 case $ac_option in
806 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
807 *) ac_optarg=yes ;;
808 esac
ba4481b5
DL
809
810 # Accept the important Cygnus configure options, so we can diagnose typos.
811
ca81d7a0
JD
812 case $ac_dashdash$ac_option in
813 --)
814 ac_dashdash=yes ;;
ba4481b5
DL
815
816 -bindir | --bindir | --bindi | --bind | --bin | --bi)
817 ac_prev=bindir ;;
818 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 819 bindir=$ac_optarg ;;
ba4481b5
DL
820
821 -build | --build | --buil | --bui | --bu)
503d2be0 822 ac_prev=build_alias ;;
ba4481b5 823 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 824 build_alias=$ac_optarg ;;
ba4481b5
DL
825
826 -cache-file | --cache-file | --cache-fil | --cache-fi \
827 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
828 ac_prev=cache_file ;;
829 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
830 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
831 cache_file=$ac_optarg ;;
832
833 --config-cache | -C)
834 cache_file=config.cache ;;
ba4481b5 835
ca81d7a0 836 -datadir | --datadir | --datadi | --datad)
ba4481b5 837 ac_prev=datadir ;;
ca81d7a0 838 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 839 datadir=$ac_optarg ;;
ba4481b5 840
ca81d7a0
JD
841 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
842 | --dataroo | --dataro | --datar)
843 ac_prev=datarootdir ;;
844 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
845 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
846 datarootdir=$ac_optarg ;;
847
ba4481b5 848 -disable-* | --disable-*)
503d2be0 849 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 850 # Reject names that are not valid shell variable names.
f053c89f 851 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
852 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
853 { (exit 1); exit 1; }; }
f053c89f 854 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
855 eval enable_$ac_feature=no ;;
856
857 -docdir | --docdir | --docdi | --doc | --do)
858 ac_prev=docdir ;;
859 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
860 docdir=$ac_optarg ;;
861
862 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
863 ac_prev=dvidir ;;
864 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
865 dvidir=$ac_optarg ;;
ba4481b5
DL
866
867 -enable-* | --enable-*)
503d2be0 868 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 869 # Reject names that are not valid shell variable names.
f053c89f 870 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
871 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
872 { (exit 1); exit 1; }; }
f053c89f 873 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 874 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
875
876 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
877 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
878 | --exec | --exe | --ex)
879 ac_prev=exec_prefix ;;
880 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
881 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
882 | --exec=* | --exe=* | --ex=*)
503d2be0 883 exec_prefix=$ac_optarg ;;
ba4481b5
DL
884
885 -gas | --gas | --ga | --g)
886 # Obsolete; use --with-gas.
887 with_gas=yes ;;
888
503d2be0
AS
889 -help | --help | --hel | --he | -h)
890 ac_init_help=long ;;
891 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
892 ac_init_help=recursive ;;
893 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
894 ac_init_help=short ;;
ba4481b5
DL
895
896 -host | --host | --hos | --ho)
503d2be0 897 ac_prev=host_alias ;;
ba4481b5 898 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 899 host_alias=$ac_optarg ;;
ba4481b5 900
ca81d7a0
JD
901 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
902 ac_prev=htmldir ;;
903 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
904 | --ht=*)
905 htmldir=$ac_optarg ;;
906
ba4481b5
DL
907 -includedir | --includedir | --includedi | --included | --include \
908 | --includ | --inclu | --incl | --inc)
909 ac_prev=includedir ;;
910 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
911 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 912 includedir=$ac_optarg ;;
ba4481b5
DL
913
914 -infodir | --infodir | --infodi | --infod | --info | --inf)
915 ac_prev=infodir ;;
916 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 917 infodir=$ac_optarg ;;
ba4481b5
DL
918
919 -libdir | --libdir | --libdi | --libd)
920 ac_prev=libdir ;;
921 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 922 libdir=$ac_optarg ;;
ba4481b5
DL
923
924 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
925 | --libexe | --libex | --libe)
926 ac_prev=libexecdir ;;
927 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
928 | --libexe=* | --libex=* | --libe=*)
503d2be0 929 libexecdir=$ac_optarg ;;
ba4481b5 930
ca81d7a0
JD
931 -localedir | --localedir | --localedi | --localed | --locale)
932 ac_prev=localedir ;;
933 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
934 localedir=$ac_optarg ;;
935
ba4481b5 936 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 937 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
938 ac_prev=localstatedir ;;
939 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 940 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 941 localstatedir=$ac_optarg ;;
ba4481b5
DL
942
943 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
944 ac_prev=mandir ;;
945 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 946 mandir=$ac_optarg ;;
ba4481b5
DL
947
948 -nfp | --nfp | --nf)
949 # Obsolete; use --without-fp.
950 with_fp=no ;;
951
952 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 953 | --no-cr | --no-c | -n)
ba4481b5
DL
954 no_create=yes ;;
955
956 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
957 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
958 no_recursion=yes ;;
959
960 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
961 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
962 | --oldin | --oldi | --old | --ol | --o)
963 ac_prev=oldincludedir ;;
964 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
965 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
966 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 967 oldincludedir=$ac_optarg ;;
ba4481b5
DL
968
969 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 ac_prev=prefix ;;
971 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 972 prefix=$ac_optarg ;;
ba4481b5
DL
973
974 -program-prefix | --program-prefix | --program-prefi | --program-pref \
975 | --program-pre | --program-pr | --program-p)
976 ac_prev=program_prefix ;;
977 -program-prefix=* | --program-prefix=* | --program-prefi=* \
978 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 979 program_prefix=$ac_optarg ;;
ba4481b5
DL
980
981 -program-suffix | --program-suffix | --program-suffi | --program-suff \
982 | --program-suf | --program-su | --program-s)
983 ac_prev=program_suffix ;;
984 -program-suffix=* | --program-suffix=* | --program-suffi=* \
985 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 986 program_suffix=$ac_optarg ;;
ba4481b5
DL
987
988 -program-transform-name | --program-transform-name \
989 | --program-transform-nam | --program-transform-na \
990 | --program-transform-n | --program-transform- \
991 | --program-transform | --program-transfor \
992 | --program-transfo | --program-transf \
993 | --program-trans | --program-tran \
994 | --progr-tra | --program-tr | --program-t)
995 ac_prev=program_transform_name ;;
996 -program-transform-name=* | --program-transform-name=* \
997 | --program-transform-nam=* | --program-transform-na=* \
998 | --program-transform-n=* | --program-transform-=* \
999 | --program-transform=* | --program-transfor=* \
1000 | --program-transfo=* | --program-transf=* \
1001 | --program-trans=* | --program-tran=* \
1002 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1003 program_transform_name=$ac_optarg ;;
ba4481b5 1004
ca81d7a0
JD
1005 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1006 ac_prev=pdfdir ;;
1007 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1008 pdfdir=$ac_optarg ;;
1009
1010 -psdir | --psdir | --psdi | --psd | --ps)
1011 ac_prev=psdir ;;
1012 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1013 psdir=$ac_optarg ;;
1014
ba4481b5
DL
1015 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1016 | -silent | --silent | --silen | --sile | --sil)
1017 silent=yes ;;
1018
1019 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1020 ac_prev=sbindir ;;
1021 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1022 | --sbi=* | --sb=*)
503d2be0 1023 sbindir=$ac_optarg ;;
ba4481b5
DL
1024
1025 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1026 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1027 | --sharedst | --shareds | --shared | --share | --shar \
1028 | --sha | --sh)
1029 ac_prev=sharedstatedir ;;
1030 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1031 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1032 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1033 | --sha=* | --sh=*)
503d2be0 1034 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1035
1036 -site | --site | --sit)
1037 ac_prev=site ;;
1038 -site=* | --site=* | --sit=*)
503d2be0 1039 site=$ac_optarg ;;
ba4481b5
DL
1040
1041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1042 ac_prev=srcdir ;;
1043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1044 srcdir=$ac_optarg ;;
ba4481b5
DL
1045
1046 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1047 | --syscon | --sysco | --sysc | --sys | --sy)
1048 ac_prev=sysconfdir ;;
1049 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1050 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1051 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1052
1053 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1054 ac_prev=target_alias ;;
ba4481b5 1055 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1056 target_alias=$ac_optarg ;;
ba4481b5
DL
1057
1058 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1059 verbose=yes ;;
1060
503d2be0
AS
1061 -version | --version | --versio | --versi | --vers | -V)
1062 ac_init_version=: ;;
ba4481b5
DL
1063
1064 -with-* | --with-*)
503d2be0 1065 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1066 # Reject names that are not valid shell variable names.
f053c89f 1067 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1068 { echo "$as_me: error: invalid package name: $ac_package" >&2
1069 { (exit 1); exit 1; }; }
f053c89f 1070 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1071 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1072
1073 -without-* | --without-*)
503d2be0 1074 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1075 # Reject names that are not valid shell variable names.
f053c89f 1076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1077 { echo "$as_me: error: invalid package name: $ac_package" >&2
1078 { (exit 1); exit 1; }; }
f053c89f 1079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1080 eval with_$ac_package=no ;;
ba4481b5
DL
1081
1082 --x)
1083 # Obsolete; use --with-x.
1084 with_x=yes ;;
1085
1086 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1087 | --x-incl | --x-inc | --x-in | --x-i)
1088 ac_prev=x_includes ;;
1089 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1090 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1091 x_includes=$ac_optarg ;;
ba4481b5
DL
1092
1093 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1094 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1095 ac_prev=x_libraries ;;
1096 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1097 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1098 x_libraries=$ac_optarg ;;
ba4481b5 1099
503d2be0
AS
1100 -*) { echo "$as_me: error: unrecognized option: $ac_option
1101Try \`$0 --help' for more information." >&2
1102 { (exit 1); exit 1; }; }
ba4481b5
DL
1103 ;;
1104
503d2be0
AS
1105 *=*)
1106 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1109 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1110 { (exit 1); exit 1; }; }
ca81d7a0 1111 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1112 export $ac_envvar ;;
1113
ba4481b5 1114 *)
503d2be0
AS
1115 # FIXME: should be removed in autoconf 3.0.
1116 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1117 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1119 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1120 ;;
1121
1122 esac
1123done
1124
1125if test -n "$ac_prev"; then
503d2be0
AS
1126 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1127 { echo "$as_me: error: missing argument to $ac_option" >&2
1128 { (exit 1); exit 1; }; }
ba4481b5 1129fi
ba4481b5 1130
ca81d7a0
JD
1131# Be sure to have absolute directory names.
1132for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1133 datadir sysconfdir sharedstatedir localstatedir includedir \
1134 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1135 libdir localedir mandir
ba4481b5 1136do
ca81d7a0 1137 eval ac_val=\$$ac_var
503d2be0 1138 case $ac_val in
ca81d7a0
JD
1139 [\\/$]* | ?:[\\/]* ) continue;;
1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1141 esac
ca81d7a0
JD
1142 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1143 { (exit 1); exit 1; }; }
ba4481b5
DL
1144done
1145
503d2be0
AS
1146# There might be people who depend on the old broken behavior: `$host'
1147# used to hold the argument of --host etc.
c0d27fcc 1148# FIXME: To remove some day.
503d2be0
AS
1149build=$build_alias
1150host=$host_alias
1151target=$target_alias
1152
c0d27fcc 1153# FIXME: To remove some day.
503d2be0
AS
1154if test "x$host_alias" != x; then
1155 if test "x$build_alias" = x; then
1156 cross_compiling=maybe
1157 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1158 If a cross compiler is detected then cross compile mode will be used." >&2
1159 elif test "x$build_alias" != "x$host_alias"; then
1160 cross_compiling=yes
1161 fi
1162fi
ba4481b5 1163
503d2be0
AS
1164ac_tool_prefix=
1165test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1166
503d2be0 1167test "$silent" = yes && exec 6>/dev/null
ba4481b5 1168
c0d27fcc 1169
ca81d7a0
JD
1170ac_pwd=`pwd` && test -n "$ac_pwd" &&
1171ac_ls_di=`ls -di .` &&
1172ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1173 { echo "$as_me: error: Working directory cannot be determined" >&2
1174 { (exit 1); exit 1; }; }
1175test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1176 { echo "$as_me: error: pwd does not report name of working directory" >&2
1177 { (exit 1); exit 1; }; }
1178
1179
ba4481b5
DL
1180# Find the source files, if location was not specified.
1181if test -z "$srcdir"; then
1182 ac_srcdir_defaulted=yes
ca81d7a0
JD
1183 # Try the directory containing this script, then the parent directory.
1184 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1185$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1186 X"$0" : 'X\(//\)[^/]' \| \
1187 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1188 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1189echo X"$0" |
ca81d7a0
JD
1190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)[^/].*/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\).*/{
1203 s//\1/
1204 q
1205 }
1206 s/.*/./; q'`
ba4481b5 1207 srcdir=$ac_confdir
ca81d7a0 1208 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1209 srcdir=..
1210 fi
1211else
1212 ac_srcdir_defaulted=no
1213fi
ca81d7a0
JD
1214if test ! -r "$srcdir/$ac_unique_file"; then
1215 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1216 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1217 { (exit 1); exit 1; }; }
ba4481b5 1218fi
ca81d7a0
JD
1219ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1220ac_abs_confdir=`(
1221 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1222 { (exit 1); exit 1; }; }
ca81d7a0
JD
1223 pwd)`
1224# When building in place, set srcdir=.
1225if test "$ac_abs_confdir" = "$ac_pwd"; then
1226 srcdir=.
1227fi
1228# Remove unnecessary trailing slashes from srcdir.
1229# Double slashes in file names in object file debugging info
1230# mess up M-x gdb in Emacs.
1231case $srcdir in
1232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1233esac
1234for ac_var in $ac_precious_vars; do
1235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1236 eval ac_env_${ac_var}_value=\$${ac_var}
1237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1239done
503d2be0
AS
1240
1241#
1242# Report the --help message.
1243#
1244if test "$ac_init_help" = "long"; then
1245 # Omit some internal or obsolete options to make the list less imposing.
1246 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1247 cat <<_ACEOF
503d2be0
AS
1248\`configure' configures this package to adapt to many kinds of systems.
1249
1250Usage: $0 [OPTION]... [VAR=VALUE]...
1251
1252To assign environment variables (e.g., CC, CFLAGS...), specify them as
1253VAR=VALUE. See below for descriptions of some of the useful variables.
1254
1255Defaults for the options are specified in brackets.
1256
1257Configuration:
1258 -h, --help display this help and exit
1259 --help=short display options specific to this package
1260 --help=recursive display the short help of all the included packages
1261 -V, --version display version information and exit
1262 -q, --quiet, --silent do not print \`checking...' messages
1263 --cache-file=FILE cache test results in FILE [disabled]
1264 -C, --config-cache alias for \`--cache-file=config.cache'
1265 -n, --no-create do not create output files
1266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1267
503d2be0
AS
1268Installation directories:
1269 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1270 [$ac_default_prefix]
503d2be0 1271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1272 [PREFIX]
503d2be0
AS
1273
1274By default, \`make install' will install all the files in
1275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1277for instance \`--prefix=\$HOME'.
1278
1279For better control, use the options below.
1280
1281Fine tuning of the installation directories:
1282 --bindir=DIR user executables [EPREFIX/bin]
1283 --sbindir=DIR system admin executables [EPREFIX/sbin]
1284 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1288 --libdir=DIR object code libraries [EPREFIX/lib]
1289 --includedir=DIR C header files [PREFIX/include]
1290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1293 --infodir=DIR info documentation [DATAROOTDIR/info]
1294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1295 --mandir=DIR man documentation [DATAROOTDIR/man]
1296 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1297 --htmldir=DIR html documentation [DOCDIR]
1298 --dvidir=DIR dvi documentation [DOCDIR]
1299 --pdfdir=DIR pdf documentation [DOCDIR]
1300 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1301_ACEOF
503d2be0 1302
c0d27fcc 1303 cat <<\_ACEOF
503d2be0 1304
ba5da88a
PJ
1305Program names:
1306 --program-prefix=PREFIX prepend PREFIX to installed program names
1307 --program-suffix=SUFFIX append SUFFIX to installed program names
1308 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1309
503d2be0
AS
1310X features:
1311 --x-includes=DIR X include files are in DIR
1312 --x-libraries=DIR X library files are in DIR
1313
1314System types:
1315 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1316 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1317_ACEOF
503d2be0
AS
1318fi
1319
1320if test -n "$ac_init_help"; then
1321
c0d27fcc 1322 cat <<\_ACEOF
503d2be0
AS
1323
1324Optional Features:
1325 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1326 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1327 --enable-carbon-app[=DIR]
6a3a24fa 1328 specify install directory for Emacs.app on Mac OS X
709e90de 1329 [DIR=/Application]
45a4b03e 1330 --enable-font-backend compile code of font-backend support
d0098f13 1331 --enable-asserts compile code with asserts enabled
709e90de
AS
1332 --enable-maintainer-mode
1333 enable make rules and dependencies not useful (and
1334 sometimes confusing) to the casual installer
9adfabc2
LK
1335 --enable-locallisppath=PATH
1336 directories Emacs should search for lisp files
1337 specific to this site
503d2be0
AS
1338 --disable-largefile omit support for large files
1339
1340Optional Packages:
1341 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1342 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1343 --without-gcc don't use GCC to compile Emacs if GCC is found
1344 --without-pop don't support POP mail retrieval with movemail
1345 --with-kerberos support Kerberos-authenticated POP
1346 --with-kerberos5 support Kerberos version 5 authenticated POP
1347 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1348 --without-sound don't compile with sound support
49adb60f
TTN
1349 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1350 motif, gtk, no)
503d2be0
AS
1351 --with-xpm use -lXpm for displaying XPM images
1352 --with-jpeg use -ljpeg for displaying JPEG images
1353 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1354 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1355 --with-png use -lpng for displaying PNG images
45a4b03e
KH
1356 --with-freetype use -lfreetype for local fonts support
1357 --with-xft use -lXft for anti aliased fonts
79011b82 1358 --with-gpm use -lgpm for mouse support on a GNU/Linux console
0cfc0546 1359 --with-rsvg use -lrsvg-2 for displaying SVG images
488dd4c4 1360 --with-gtk use GTK (same as --with-x-toolkit=gtk)
49adb60f 1361 --with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
503d2be0 1362 --without-toolkit-scroll-bars
cc227489 1363 don't use Motif or Xaw3d scroll bars
c982cf7d 1364 --without-xaw3d don't use Xaw3d
cc227489 1365 --without-xim don't use X11 XIM
e0f712ba 1366 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1367 --with-x use the X Window System
1368
1369Some influential environment variables:
1370 CC C compiler command
1371 CFLAGS C compiler flags
1372 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1373 nonstandard directory <lib dir>
f053c89f 1374 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1375 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1376 you have headers in a nonstandard directory <include dir>
503d2be0 1377 CPP C preprocessor
ca81d7a0 1378 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
c0d27fcc 1383_ACEOF
ca81d7a0 1384ac_status=$?
503d2be0
AS
1385fi
1386
1387if test "$ac_init_help" = "recursive"; then
1388 # If there are subdirs, report their specific --help.
c0d27fcc 1389 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1390 test -d "$ac_dir" || continue
c0d27fcc
MR
1391 ac_builddir=.
1392
ca81d7a0
JD
1393case "$ac_dir" in
1394.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1395*)
c0d27fcc 1396 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1397 # A ".." for each directory in $ac_dir_suffix.
1398 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1399 case $ac_top_builddir_sub in
1400 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1401 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1402 esac ;;
1403esac
1404ac_abs_top_builddir=$ac_pwd
1405ac_abs_builddir=$ac_pwd$ac_dir_suffix
1406# for backward compatibility:
1407ac_top_builddir=$ac_top_build_prefix
503d2be0 1408
c0d27fcc 1409case $srcdir in
ca81d7a0 1410 .) # We are building in place.
c0d27fcc 1411 ac_srcdir=.
ca81d7a0
JD
1412 ac_top_srcdir=$ac_top_builddir_sub
1413 ac_abs_top_srcdir=$ac_pwd ;;
1414 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1415 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1416 ac_top_srcdir=$srcdir
1417 ac_abs_top_srcdir=$srcdir ;;
1418 *) # Relative name.
1419 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1420 ac_top_srcdir=$ac_top_build_prefix$srcdir
1421 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1422esac
ca81d7a0
JD
1423ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1424
1425 cd "$ac_dir" || { ac_status=$?; continue; }
1426 # Check for guested configure.
1427 if test -f "$ac_srcdir/configure.gnu"; then
1428 echo &&
1429 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1430 elif test -f "$ac_srcdir/configure"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1433 else
c0d27fcc 1434 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1435 fi || ac_status=$?
1436 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1437 done
1438fi
1439
ca81d7a0 1440test -n "$ac_init_help" && exit $ac_status
503d2be0 1441if $ac_init_version; then
c0d27fcc 1442 cat <<\_ACEOF
ca81d7a0 1443configure
f053c89f 1444generated by GNU Autoconf 2.61
503d2be0 1445
ca81d7a0
JD
1446Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14472002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1448This configure script is free software; the Free Software Foundation
1449gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1450_ACEOF
ca81d7a0 1451 exit
503d2be0 1452fi
ca81d7a0 1453cat >config.log <<_ACEOF
503d2be0
AS
1454This file contains any messages produced by compilers while
1455running configure, to aid debugging if configure makes a mistake.
1456
1457It was created by $as_me, which was
f053c89f 1458generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1459
1460 $ $0 $@
1461
c0d27fcc 1462_ACEOF
ca81d7a0 1463exec 5>>config.log
503d2be0
AS
1464{
1465cat <<_ASUNAME
c0d27fcc
MR
1466## --------- ##
1467## Platform. ##
1468## --------- ##
503d2be0
AS
1469
1470hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1471uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1477/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1478
1479/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1480/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1481/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1482/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1483/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1485/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1486
925c2f3f 1487_ASUNAME
c0d27fcc
MR
1488
1489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1490for as_dir in $PATH
1491do
1492 IFS=$as_save_IFS
1493 test -z "$as_dir" && as_dir=.
1494 echo "PATH: $as_dir"
1495done
ca81d7a0 1496IFS=$as_save_IFS
c0d27fcc 1497
503d2be0
AS
1498} >&5
1499
c0d27fcc
MR
1500cat >&5 <<_ACEOF
1501
1502
1503## ----------- ##
1504## Core tests. ##
1505## ----------- ##
1506
1507_ACEOF
503d2be0 1508
503d2be0
AS
1509
1510# Keep a trace of the command line.
1511# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1512# Strip out --silent because we don't want to record it for future runs.
503d2be0 1513# Also quote any args containing shell meta-characters.
19650fd6 1514# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1515ac_configure_args=
19650fd6
AS
1516ac_configure_args0=
1517ac_configure_args1=
19650fd6
AS
1518ac_must_keep_next=false
1519for ac_pass in 1 2
503d2be0 1520do
19650fd6
AS
1521 for ac_arg
1522 do
1523 case $ac_arg in
1524 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1525 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1526 | -silent | --silent | --silen | --sile | --sil)
1527 continue ;;
ca81d7a0 1528 *\'*)
19650fd6
AS
1529 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1530 esac
1531 case $ac_pass in
1532 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1533 2)
1534 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1535 if test $ac_must_keep_next = true; then
edfaf76d 1536 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1537 else
edfaf76d
LK
1538 case $ac_arg in
1539 *=* | --config-cache | -C | -disable-* | --disable-* \
1540 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1541 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1542 | -with-* | --with-* | -without-* | --without-* | --x)
1543 case "$ac_configure_args0 " in
1544 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1545 esac
1546 ;;
1547 -* ) ac_must_keep_next=true ;;
1548 esac
19650fd6 1549 fi
ca81d7a0 1550 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1551 ;;
1552 esac
1553 done
503d2be0 1554done
19650fd6
AS
1555$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1556$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1557
1558# When interrupted or exit'd, cleanup temporary files, and complete
1559# config.log. We remove comments because anyway the quotes in there
1560# would cause problems or look ugly.
ca81d7a0
JD
1561# WARNING: Use '\'' to represent an apostrophe within the trap.
1562# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1563trap 'exit_status=$?
1564 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1565 {
1566 echo
6bae0ccf 1567
c0d27fcc
MR
1568 cat <<\_ASBOX
1569## ---------------- ##
1570## Cache variables. ##
1571## ---------------- ##
1572_ASBOX
1573 echo
1574 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1575(
1576 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1577 eval ac_val=\$$ac_var
1578 case $ac_val in #(
1579 *${as_nl}*)
1580 case $ac_var in #(
1581 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1582echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1583 esac
1584 case $ac_var in #(
1585 _ | IFS | as_nl) ;; #(
1586 *) $as_unset $ac_var ;;
1587 esac ;;
1588 esac
1589 done
503d2be0 1590 (set) 2>&1 |
ca81d7a0
JD
1591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1592 *${as_nl}ac_space=\ *)
503d2be0 1593 sed -n \
ca81d7a0
JD
1594 "s/'\''/'\''\\\\'\'''\''/g;
1595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1596 ;; #(
503d2be0 1597 *)
ca81d7a0 1598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1599 ;;
ca81d7a0
JD
1600 esac |
1601 sort
1602)
c0d27fcc 1603 echo
6bae0ccf
DL
1604
1605 cat <<\_ASBOX
1606## ----------------- ##
1607## Output variables. ##
1608## ----------------- ##
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_vars
1612 do
ca81d7a0
JD
1613 eval ac_val=\$$ac_var
1614 case $ac_val in
1615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1616 esac
1617 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1618 done | sort
1619 echo
1620
1621 if test -n "$ac_subst_files"; then
1622 cat <<\_ASBOX
ca81d7a0
JD
1623## ------------------- ##
1624## File substitutions. ##
1625## ------------------- ##
6bae0ccf
DL
1626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_files
1629 do
ca81d7a0
JD
1630 eval ac_val=\$$ac_var
1631 case $ac_val in
1632 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1633 esac
1634 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1635 done | sort
1636 echo
1637 fi
1638
c0d27fcc
MR
1639 if test -s confdefs.h; then
1640 cat <<\_ASBOX
1641## ----------- ##
1642## confdefs.h. ##
1643## ----------- ##
1644_ASBOX
1645 echo
ca81d7a0 1646 cat confdefs.h
c0d27fcc
MR
1647 echo
1648 fi
1649 test "$ac_signal" != 0 &&
1650 echo "$as_me: caught signal $ac_signal"
1651 echo "$as_me: exit $exit_status"
1652 } >&5
ca81d7a0
JD
1653 rm -f core *.core core.conftest.* &&
1654 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1655 exit $exit_status
ca81d7a0 1656' 0
503d2be0
AS
1657for ac_signal in 1 2 13 15; do
1658 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1659done
1660ac_signal=0
1661
1662# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1663rm -f -r conftest* confdefs.h
ba4481b5 1664
c0d27fcc
MR
1665# Predefined preprocessor variables.
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_NAME "$PACKAGE_NAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_VERSION "$PACKAGE_VERSION"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_STRING "$PACKAGE_STRING"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1689_ACEOF
1690
1691
503d2be0 1692# Let the site file select an alternate cache file if it wants to.
ba4481b5 1693# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1694if test -n "$CONFIG_SITE"; then
1695 set x "$CONFIG_SITE"
1696elif test "x$prefix" != xNONE; then
1697 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1698else
1699 set x "$ac_default_prefix/share/config.site" \
1700 "$ac_default_prefix/etc/config.site"
ba4481b5 1701fi
ca81d7a0
JD
1702shift
1703for ac_site_file
1704do
ba4481b5 1705 if test -r "$ac_site_file"; then
c0d27fcc 1706 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1707echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1708 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1709 . "$ac_site_file"
1710 fi
1711done
1712
1713if test -r "$cache_file"; then
503d2be0
AS
1714 # Some versions of bash will fail to source /dev/null (special
1715 # files actually), so we avoid doing that.
1716 if test -f "$cache_file"; then
c0d27fcc 1717 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1718echo "$as_me: loading cache $cache_file" >&6;}
1719 case $cache_file in
ca81d7a0
JD
1720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1721 *) . "./$cache_file";;
503d2be0
AS
1722 esac
1723 fi
ba4481b5 1724else
c0d27fcc 1725 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1726echo "$as_me: creating cache $cache_file" >&6;}
1727 >$cache_file
1728fi
1729
f053c89f
CY
1730ac_header_list="$ac_header_list sys/time.h"
1731ac_header_list="$ac_header_list unistd.h"
1732ac_func_list="$ac_func_list alarm"
503d2be0
AS
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
ca81d7a0 1736for ac_var in $ac_precious_vars; do
503d2be0
AS
1737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1741 case $ac_old_set,$ac_new_set in
1742 set,)
c0d27fcc 1743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1745 ac_cache_corrupted=: ;;
1746 ,set)
c0d27fcc 1747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1756echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1758echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1759 ac_cache_corrupted=:
503d2be0
AS
1760 fi;;
1761 esac
c0d27fcc 1762 # Pass precious variables to config.status.
503d2be0
AS
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
ca81d7a0 1765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
c0d27fcc 1775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1779 { (exit 1); exit 1; }; }
ba4481b5
DL
1780fi
1781
c0d27fcc
MR
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
ca81d7a0
JD
1798ac_ext=c
1799ac_cpp='$CPP $CPPFLAGS'
1800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1802ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1803
6bae0ccf 1804
ca81d7a0 1805ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1806
c0d27fcc 1807
ba5da88a 1808test "$program_prefix" != NONE &&
ca81d7a0 1809 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1810# Use a double $ so make ignores it.
1811test "$program_suffix" != NONE &&
ca81d7a0 1812 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1813# Double any \ or $. echo might interpret backslashes.
1814# By default was `s,x,x', remove it if useless.
1815cat <<\_ACEOF >conftest.sed
1816s/[\\$]/&&/g;s/;s,x,x,$//
1817_ACEOF
1818program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1819rm -f conftest.sed
ba5da88a 1820
c0d27fcc 1821
ba4481b5
DL
1822lispdir='${datadir}/emacs/${version}/lisp'
1823locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1824'${datadir}/emacs/site-lisp'
1825lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1826etcdir='${datadir}/emacs/${version}/etc'
1827archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1828docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1829gamedir='${localstatedir}/games/emacs'
98418dba
CW
1830
1831gameuser=games
1832
c0d27fcc 1833
49adb60f 1834
ca81d7a0 1835# Check whether --with-gcc was given.
ba4481b5 1836if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1837 withval=$with_gcc;
1838fi
503d2be0 1839
ba4481b5 1840
49adb60f 1841
ca81d7a0 1842# Check whether --with-pop was given.
ba4481b5 1843if test "${with_pop+set}" = set; then
ca81d7a0 1844 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1845 cat >>confdefs.h <<\_ACEOF
ba4481b5 1846#define MAIL_USE_POP 1
c0d27fcc 1847_ACEOF
ba4481b5 1848
243cf185
DL
1849else :
1850fi
3d9fec71 1851else
c0d27fcc 1852 cat >>confdefs.h <<\_ACEOF
3d9fec71 1853#define MAIL_USE_POP 1
c0d27fcc 1854_ACEOF
3d9fec71 1855
ca81d7a0 1856fi
ba4481b5 1857
c0d27fcc 1858
c0d27fcc 1859
49adb60f 1860
ca81d7a0 1861# Check whether --with-kerberos was given.
a21616bd 1862if test "${with_kerberos+set}" = set; then
54e6585f
CY
1863 withval=$with_kerberos; if test "$withval" = yes; then
1864 cat >>confdefs.h <<\_ACEOF
a21616bd 1865#define KERBEROS 1
c0d27fcc 1866_ACEOF
a21616bd 1867
ca81d7a0 1868fi
54e6585f 1869fi
a21616bd 1870
c0d27fcc 1871
c0d27fcc 1872
49adb60f 1873
ca81d7a0 1874# Check whether --with-kerberos5 was given.
a21616bd 1875if test "${with_kerberos5+set}" = set; then
ca81d7a0 1876 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1877 if test "${with_kerberos+set}" != set; then
1878 with_kerberos=yes
c0d27fcc 1879 cat >>confdefs.h <<\_ACEOF
a21616bd 1880#define KERBEROS 1
c0d27fcc 1881_ACEOF
a21616bd
KR
1882
1883 fi
b936fae4 1884
c0d27fcc 1885cat >>confdefs.h <<\_ACEOF
a21616bd 1886#define KERBEROS5 1
c0d27fcc 1887_ACEOF
a21616bd 1888
ca81d7a0 1889fi
54e6585f 1890fi
a21616bd 1891
b936fae4 1892
49adb60f 1893
ca81d7a0
JD
1894# Check whether --with-hesiod was given.
1895if test "${with_hesiod+set}" = set; then
54e6585f
CY
1896 withval=$with_hesiod; if test "$withval" = yes; then
1897
c0d27fcc 1898cat >>confdefs.h <<\_ACEOF
ba4481b5 1899#define HESIOD 1
c0d27fcc 1900_ACEOF
ba4481b5 1901
ca81d7a0 1902fi
54e6585f 1903fi
ba4481b5 1904
c0d27fcc 1905
c0d27fcc 1906
ca81d7a0 1907# Check whether --with-sound was given.
2c9dccc9 1908if test "${with_sound+set}" = set; then
ca81d7a0
JD
1909 withval=$with_sound;
1910fi
2c9dccc9 1911
2c9dccc9 1912
c0d27fcc 1913
ca81d7a0 1914# Check whether --with-x-toolkit was given.
ba4481b5 1915if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1916 withval=$with_x_toolkit; case "${withval}" in
089a966d 1917 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1918 n | no ) val=no ;;
1919 l | lu | luc | luci | lucid ) val=lucid ;;
1920 a | at | ath | athe | athen | athena ) val=athena ;;
1921 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1922 g | gt | gtk ) val=gtk ;;
ba4481b5 1923 * )
29d69661 1924{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1925this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1926\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1927echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1928this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1929\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1930 { (exit 1); exit 1; }; }
ba4481b5
DL
1931 ;;
1932 esac
1933 with_x_toolkit=$val
1934
ca81d7a0 1935fi
8eeae1c9 1936
ba4481b5 1937
49adb60f 1938
ca81d7a0 1939# Check whether --with-xpm was given.
ba4481b5 1940if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1941 withval=$with_xpm;
1942fi
503d2be0 1943
ba4481b5 1944
ca81d7a0 1945# Check whether --with-jpeg was given.
ba4481b5 1946if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1947 withval=$with_jpeg;
1948fi
503d2be0 1949
ba4481b5 1950
ca81d7a0 1951# Check whether --with-tiff was given.
ba4481b5 1952if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1953 withval=$with_tiff;
1954fi
503d2be0 1955
ba4481b5 1956
ca81d7a0 1957# Check whether --with-gif was given.
ba4481b5 1958if test "${with_gif+set}" = set; then
ca81d7a0
JD
1959 withval=$with_gif;
1960fi
503d2be0 1961
ba4481b5 1962
ca81d7a0 1963# Check whether --with-png was given.
ba4481b5 1964if test "${with_png+set}" = set; then
ca81d7a0
JD
1965 withval=$with_png;
1966fi
503d2be0 1967
ba4481b5 1968
c24fa7dc 1969# Check whether --with-freetype was given.
45a4b03e 1970if test "${with_freetype+set}" = set; then
c24fa7dc
MB
1971 withval=$with_freetype;
1972fi
45a4b03e 1973
45a4b03e 1974
c24fa7dc 1975# Check whether --with-xft was given.
45a4b03e 1976if test "${with_xft+set}" = set; then
c24fa7dc
MB
1977 withval=$with_xft;
1978fi
45a4b03e 1979
45a4b03e 1980
79011b82
NR
1981# Check whether --with-gpm was given.
1982if test "${with_gpm+set}" = set; then
1983 withval=$with_gpm;
1984fi
1985
1986
0cfc0546
GM
1987# Check whether --with-rsvg was given.
1988if test "${with_rsvg+set}" = set; then
1989 withval=$with_rsvg;
1990fi
1991
1992
c24fa7dc 1993# Check whether --with-gtk was given.
488dd4c4 1994if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1995 withval=$with_gtk;
1996fi
488dd4c4 1997
488dd4c4 1998
ca81d7a0 1999# Check whether --with-pkg-config-prog was given.
488dd4c4 2000if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
2001 withval=$with_pkg_config_prog;
2002fi
488dd4c4 2003
488dd4c4 2004
ca81d7a0 2005# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2006if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
2007 withval=$with_toolkit_scroll_bars;
2008fi
503d2be0 2009
ba4481b5 2010
e35a28cd
TTN
2011# Check whether --with-xaw3d was given.
2012if test "${with_xaw3d+set}" = set; then
2013 withval=$with_xaw3d;
c982cf7d
JD
2014fi
2015
2016
ca81d7a0 2017# Check whether --with-xim was given.
1d36487c 2018if test "${with_xim+set}" = set; then
ca81d7a0
JD
2019 withval=$with_xim;
2020fi
1d36487c 2021
ba4481b5 2022
ca81d7a0 2023# Check whether --with-carbon was given.
e0f712ba 2024if test "${with_carbon+set}" = set; then
ca81d7a0
JD
2025 withval=$with_carbon;
2026fi
e0f712ba 2027
49adb60f 2028
ca81d7a0 2029# Check whether --enable-carbon-app was given.
6a3a24fa 2030if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2031 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2032fi
2033
e0f712ba 2034
c24fa7dc 2035# Check whether --enable-font-backend was given.
45a4b03e 2036if test "${enable_font_backend+set}" = set; then
c24fa7dc 2037 enableval=$enable_font_backend; USE_FONT_BACKEND=$enableval
45a4b03e
KH
2038else
2039 USE_FONT_BACKEND=no
c24fa7dc 2040fi
45a4b03e 2041
c24fa7dc
MB
2042
2043# Check whether --enable-asserts was given.
d0098f13 2044if test "${enable_asserts+set}" = set; then
ca81d7a0 2045 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2046else
2047 USE_XASSERTS=no
ca81d7a0 2048fi
8eeae1c9 2049
d0098f13 2050
ca81d7a0 2051# Check whether --enable-maintainer-mode was given.
19650fd6 2052if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2053 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2054else
2055 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2056fi
2057
19650fd6
AS
2058if test $USE_MAINTAINER_MODE = yes; then
2059 MAINT=
2060else
2061 MAINT=#
2062fi
2063
2064
ca81d7a0 2065# Check whether --enable-locallisppath was given.
9adfabc2 2066if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2067 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2068 locallisppath=
2069elif test "${enableval}" != "yes"; then
2070 locallisppath=${enableval}
2071fi
ca81d7a0
JD
2072fi
2073
9adfabc2 2074
ba4481b5 2075#### Make srcdir absolute, if it isn't already. It's important to
17494071 2076#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2077#### give you automounter prefixes, which can go away. We do all this
2078#### so Emacs can find its files when run uninstalled.
17494071
GM
2079## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2080unset CDPATH
ba4481b5
DL
2081case "${srcdir}" in
2082 /* ) ;;
2083 . )
2084 ## We may be able to use the $PWD environment variable to make this
2085 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2086 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2087 ## but that tested only for a well-formed and valid PWD,
2088 ## it did not object when PWD was well-formed and valid but just wrong.
2089 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2090 then
2091 srcdir="$PWD"
2092 else
2093 srcdir="`(cd ${srcdir}; pwd)`"
2094 fi
2095 ;;
2096 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2097esac
2098
2099#### Check if the source directory already has a configured system in it.
2100if test `pwd` != `(cd ${srcdir} && pwd)` \
2101 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2102 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2103 as a build directory right now; it has been configured in its own
2104 right. To configure in another directory as well, you MUST
2105 use GNU make. If you do not have GNU make, then you must
2106 now do \`make distclean' in ${srcdir},
2107 and then run $0 again." >&5
2108echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2109 as a build directory right now; it has been configured in its own
2110 right. To configure in another directory as well, you MUST
2111 use GNU make. If you do not have GNU make, then you must
2112 now do \`make distclean' in ${srcdir},
503d2be0 2113 and then run $0 again." >&2;}
ba4481b5
DL
2114fi
2115
2116#### Given the configuration name, set machfile and opsysfile to the
2117#### names of the m/*.h and s/*.h files we should use.
2118
2119### Canonicalize the configuration name.
2120
2121ac_aux_dir=
ca81d7a0
JD
2122for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2123 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2124 ac_aux_dir=$ac_dir
2125 ac_install_sh="$ac_aux_dir/install-sh -c"
2126 break
ca81d7a0 2127 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2128 ac_aux_dir=$ac_dir
2129 ac_install_sh="$ac_aux_dir/install.sh -c"
2130 break
ca81d7a0 2131 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2132 ac_aux_dir=$ac_dir
2133 ac_install_sh="$ac_aux_dir/shtool install -c"
2134 break
ba4481b5
DL
2135 fi
2136done
2137if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2138 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2139echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2140 { (exit 1); exit 1; }; }
ba4481b5 2141fi
ca81d7a0
JD
2142
2143# These three variables are undocumented and unsupported,
2144# and are intended to be withdrawn in a future Autoconf release.
2145# They can cause serious problems if a builder's source tree is in a directory
2146# whose full name contains unusual characters.
2147ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2148ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2149ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2150
ba4481b5
DL
2151
2152# Make sure we can run config.sub.
ca81d7a0
JD
2153$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2154 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2155echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2156 { (exit 1); exit 1; }; }
2157
ca81d7a0
JD
2158{ echo "$as_me:$LINENO: checking build system type" >&5
2159echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2160if test "${ac_cv_build+set}" = set; then
2161 echo $ECHO_N "(cached) $ECHO_C" >&6
2162else
ca81d7a0
JD
2163 ac_build_alias=$build_alias
2164test "x$ac_build_alias" = x &&
2165 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2166test "x$ac_build_alias" = x &&
c0d27fcc 2167 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2168echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2169 { (exit 1); exit 1; }; }
ca81d7a0
JD
2170ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2171 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2172echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2173 { (exit 1); exit 1; }; }
2174
2175fi
ca81d7a0
JD
2176{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2177echo "${ECHO_T}$ac_cv_build" >&6; }
2178case $ac_cv_build in
2179*-*-*) ;;
2180*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2181echo "$as_me: error: invalid value of canonical build" >&2;}
2182 { (exit 1); exit 1; }; };;
2183esac
503d2be0 2184build=$ac_cv_build
ca81d7a0
JD
2185ac_save_IFS=$IFS; IFS='-'
2186set x $ac_cv_build
2187shift
2188build_cpu=$1
2189build_vendor=$2
2190shift; shift
2191# Remember, the first character of IFS is used to create $*,
2192# except with old shells:
2193build_os=$*
2194IFS=$ac_save_IFS
2195case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2196
2197
2198{ echo "$as_me:$LINENO: checking host system type" >&5
2199echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2200if test "${ac_cv_host+set}" = set; then
2201 echo $ECHO_N "(cached) $ECHO_C" >&6
2202else
ca81d7a0
JD
2203 if test "x$host_alias" = x; then
2204 ac_cv_host=$ac_cv_build
2205else
2206 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2207 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2208echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2209 { (exit 1); exit 1; }; }
ca81d7a0 2210fi
503d2be0
AS
2211
2212fi
ca81d7a0
JD
2213{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2214echo "${ECHO_T}$ac_cv_host" >&6; }
2215case $ac_cv_host in
2216*-*-*) ;;
2217*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2218echo "$as_me: error: invalid value of canonical host" >&2;}
2219 { (exit 1); exit 1; }; };;
2220esac
503d2be0 2221host=$ac_cv_host
ca81d7a0
JD
2222ac_save_IFS=$IFS; IFS='-'
2223set x $ac_cv_host
2224shift
2225host_cpu=$1
2226host_vendor=$2
2227shift; shift
2228# Remember, the first character of IFS is used to create $*,
2229# except with old shells:
2230host_os=$*
2231IFS=$ac_save_IFS
2232case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2233
c0d27fcc 2234
ba4481b5 2235canonical=$host
1770dcdc 2236configuration=${host_alias-${build_alias-$host}}
ba4481b5 2237
c0d27fcc 2238
22044edf 2239
ba4481b5
DL
2240### If you add support for a new configuration, add code to this
2241### switch statement to recognize your configuration name and select
2242### the appropriate operating system and machine description files.
2243
2244### You would hope that you could choose an m/*.h file pretty much
2245### based on the machine portion of the configuration name, and an s-
2246### file based on the operating system portion. However, it turns out
2247### that each m/*.h file is pretty manufacturer-specific - for
2248### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2249### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2250### machines. So we basically have to have a special case for each
2251### configuration name.
2252###
2253### As far as handling version numbers on operating systems is
2254### concerned, make sure things will fail in a fixable way. If
2255### /etc/MACHINES doesn't say anything about version numbers, be
2256### prepared to handle anything reasonably. If version numbers
2257### matter, be sure /etc/MACHINES says something about it.
2258###
2259### Eric Raymond says we should accept strings like "sysvr4" to mean
2260### "System V Release 4"; he writes, "The old convention encouraged
2261### confusion between `system' and `release' levels'."
2262
2263machine='' opsys='' unported=no
2264case "${canonical}" in
2265
1096bcc0
GM
2266 ## FreeBSD ports
2267 *-*-freebsd* )
2268 opsys=freebsd
2269 case "${canonical}" in
2270 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2271 ia64-*-freebsd*) machine=ia64 ;;
2272 sparc64-*-freebsd*) machine=sparc ;;
2273 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2274 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2275 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2276 esac
2277 ;;
2278
ba4481b5
DL
2279 ## NetBSD ports
2280 *-*-netbsd* )
2281 opsys=netbsd
dd038e26 2282 if test -f /usr/lib/crti.o; then
f57bd967
DL
2283
2284cat >>confdefs.h <<\_ACEOF
2285#define HAVE_CRTIN
dd038e26
AS
2286_ACEOF
2287
2288 fi
2289
ba4481b5
DL
2290 case "${canonical}" in
2291 alpha*-*-netbsd*) machine=alpha ;;
2292 i[3456]86-*-netbsd*) machine=intel386 ;;
2293 m68k-*-netbsd*)
2294 # This is somewhat bogus.
2295 machine=hp9000s300 ;;
ba4481b5 2296 mips-*-netbsd*) machine=pmax ;;
2df636f4 2297 mipsel-*-netbsd*) machine=pmax ;;
97836269 2298 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2299 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2300 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2301 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2302 vax-*-netbsd*) machine=vax ;;
2df636f4 2303 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2304 x86_64-*-netbsd*) machine=amdx86-64 ;;
2305 hppa-*-netbsd*) machine=hp800 ;;
2306 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2307 esac
2308 ;;
2309
2310 ## OpenBSD ports
2311 *-*-openbsd* )
2312 opsys=openbsd
2313 case "${canonical}" in
2314 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2315 arm-*-openbsd*) machine=arm ;;
2316 hppa-*-openbsd*) machine=hp9000s300 ;;
2317 i386-*-openbsd*) machine=intel386 ;;
2318 m68k-*-openbsd*) machine=hp9000s300 ;;
2319 m88k-*-openbsd*) machine=aviion ;;
2320 mips64-*-openbsd*) machine=mips64 ;;
2321 powerpc-*-openbsd*) machine=macppc ;;
2322 sh-*-openbsd*) machine=sh3el ;;
2323 sparc*-*-openbsd*) machine=sparc ;;
2324 vax-*-openbsd*) machine=vax ;;
2325 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2326 esac
2327 ;;
2328
10a3b1a1
EZ
2329 ## LynxOS ports
2330 *-*-lynxos* )
2331 opsys=lynxos
2332 case "${canonical}" in
2333 i[3456]86-*-lynxos*) machine=intel386 ;;
2334 powerpc-*-lynxos*) machine=powerpc ;;
2335 esac
2336 ;;
2337
ba4481b5
DL
2338 ## Acorn RISCiX:
2339 arm-acorn-riscix1.1* )
2340 machine=acorn opsys=riscix1-1
2341 ;;
2342 arm-acorn-riscix1.2* | arm-acorn-riscix )
2343 ## This name is riscix12 instead of riscix1.2
2344 ## to avoid a file name conflict on MSDOS.
2345 machine=acorn opsys=riscix12
2346 ;;
2347
2348 ## BSDI ports
2349 *-*-bsdi* )
2350 opsys=bsdi
2351 case "${canonical}" in
2352 i[345]86-*-bsdi*) machine=intel386 ;;
2353 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2354 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2355 esac
2356 case "${canonical}" in
2357 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2358 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2359 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2360 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2361 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2362 esac
2363 ;;
2364
2365 ## Alliant machines
2366 ## Strictly speaking, we need the version of the alliant operating
2367 ## system to choose the right machine file, but currently the
2368 ## configuration name doesn't tell us enough to choose the right
2369 ## one; we need to give alliants their own operating system name to
2370 ## do this right. When someone cares, they can help us.
2371 fx80-alliant-* )
2372 machine=alliant4 opsys=bsd4-2
2373 ;;
2374 i860-alliant-* )
2375 machine=alliant-2800 opsys=bsd4-3
2376 ;;
2377
2378 ## Alpha (DEC) machines.
2379 alpha*-dec-osf* )
2380 machine=alpha opsys=osf1
2381 # This is needed to find X11R6.1 libraries for certain tests.
2382 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2383 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2384 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2385 # due to non-traditional preprocessing with the current compiler
2386 # defaults. OSF 4 can also have that compiler version, and there
2387 # seems always to have been a usable /usr/bin/cpp.
2388 NON_GNU_CPP=/usr/bin/cpp
ca512671 2389 case "${canonical}" in
a55b799a 2390 alpha*-dec-osf[5-9]*)
bb17930d 2391 opsys=osf5-0 ;;
ca512671 2392 esac
ba4481b5
DL
2393 ;;
2394
2395 alpha*-*-linux-gnu* )
2396 machine=alpha opsys=gnu-linux
2397 ;;
2398
c4bb2108
DL
2399 arm*-*-linux-gnu* )
2400 machine=arm opsys=gnu-linux
2401 ;;
2402
ba4481b5
DL
2403 ## Altos 3068
2404 m68*-altos-sysv* )
2405 machine=altos opsys=usg5-2
2406 ;;
2407
2408 ## Amdahl UTS
2409 580-amdahl-sysv* )
2410 machine=amdahl opsys=usg5-2-2
2411 ;;
2412
2413 ## Apollo, Domain/OS
2414 m68*-apollo-* )
2415 machine=apollo opsys=bsd4-3
2416 ;;
2417
040c474e
CY
2418 ## Apple Darwin / Mac OS X
2419 *-apple-darwin* )
2420 case "${canonical}" in
2421 i[3456]86-* ) machine=intel386 ;;
2422 powerpc-* ) machine=powermac ;;
2423 * ) unported=yes ;;
2424 esac
2425 opsys=darwin
2426 # Define CPP as follows to make autoconf work correctly.
2427 CPP="${CC-cc} -E -no-cpp-precomp"
2428 # Use fink packages if available.
2429 if test -d /sw/include && test -d /sw/lib; then
2430 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2431 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2432 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2433 fi
2434 ;;
2435
ba4481b5
DL
2436 ## AT&T 3b2, 3b5, 3b15, 3b20
2437 we32k-att-sysv* )
2438 machine=att3b opsys=usg5-2-2
2439 ;;
2440
2441 ## AT&T 3b1 - The Mighty Unix PC!
2442 m68*-att-sysv* )
2443 machine=7300 opsys=usg5-2-2
2444 ;;
2445
2446 ## Bull dpx20
2447 rs6000-bull-bosx* )
2448 machine=ibmrs6000 opsys=aix3-2
2449 ;;
2450
2451 ## Bull dpx2
2452 m68*-bull-sysv3* )
2453 machine=dpx2 opsys=usg5-3
2454 ;;
2455
2456 ## Bull sps7
2457 m68*-bull-sysv2* )
2458 machine=sps7 opsys=usg5-2
2459 ;;
2460
2461 ## CCI 5/32, 6/32 -- see "Tahoe".
2462
2463 ## Celerity
2464 ## I don't know what configuration name to use for this; config.sub
2465 ## doesn't seem to know anything about it. Hey, Celerity users, get
2466 ## in touch with us!
2467 celerity-celerity-bsd* )
2468 machine=celerity opsys=bsd4-2
2469 ;;
2470
2471 ## Clipper
2472 ## What operating systems does this chip run that Emacs has been
2473 ## tested on?
2474 clipper-* )
2475 machine=clipper
2476 ## We'll use the catch-all code at the bottom to guess the
2477 ## operating system.
2478 ;;
2479
df645f7c
AS
2480 ## Compaq Nonstop
2481 mips-compaq-nonstopux* )
2482 machine=nonstopux opsys=nonstopux
2483 ;;
2484
ba4481b5
DL
2485 ## Convex
2486 *-convex-bsd* | *-convex-convexos* )
2487 machine=convex opsys=bsd4-3
2488 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2489 NON_GNU_CPP="cc -E -P"
2490 ;;
2491
2492 ## Cubix QBx/386
2493 i[3456]86-cubix-sysv* )
2494 machine=intel386 opsys=usg5-3
2495 ;;
2496
2497 ## Cydra 5
2498 cydra*-cydrome-sysv* )
2499 machine=cydra5 opsys=usg5-3
2500 ;;
2501
2502 ## Data General AViiON Machines
2503 ## DG changed naming conventions with the release of 5.4.4.10, they
2504 ## dropped the initial 5.4 but left the intervening R. Because of the
2505 ## R this shouldn't conflict with older versions of the OS (which I
2506 ## think were named like dgux4.*). In addition, DG new AViiONs series
2507 ## uses either Motorola M88k or Intel Pentium CPUs.
2508 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2509 machine=aviion opsys=dgux4
2510 ;;
2511 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2512 ## This name is dgux5-4-3 instead of dgux5-4r3
2513 ## to avoid a file name conflict on MSDOS.
2514 machine=aviion opsys=dgux5-4-3
2515 ;;
2516 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2517 machine=aviion opsys=dgux5-4r2
2518 ;;
2519 m88k-dg-dgux* )
2520 machine=aviion opsys=dgux
2521 ;;
2522
2523 ## Data General AViiON Intel (x86) Machines
2524 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2525 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2526 i[345]86-dg-dguxR4* )
2527 machine=aviion-intel opsys=dgux4
2528 ;;
2529
2530 ## DECstations
2531 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2532 machine=pmax opsys=bsd4-2
2533 ;;
2534 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2535 machine=pmax opsys=bsd4-3
2536 ;;
2537 mips-dec-ultrix* )
2538 machine=pmax opsys=ultrix4-3
2539 ;;
2540 mips-dec-osf* )
2541 machine=pmax opsys=osf1
2542 ;;
2543 mips-dec-mach_bsd4.3* )
2544 machine=pmax opsys=mach-bsd4-3
2545 ;;
2546
cd890796
JD
2547 ## Motorola Delta machines
2548 m68k-motorola-sysv* | m68000-motorola-sysv* )
2549 machine=delta opsys=usg5-3
2550 if test -z "`type gnucc | grep 'not found'`"
2551 then
2552 if test -s /etc/167config
2553 then CC="gnucc -m68040"
2554 else CC="gnucc -m68881"
2555 fi
2556 else
2557 if test -z "`type gcc | grep 'not found'`"
2558 then CC=gcc
2559 else CC=cc
2560 fi
2561 fi
2562 ;;
ba4481b5
DL
2563 m88k-motorola-sysv4* )
2564 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2565 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2566 # I hope there are not other 4.0 versions for this machine
2567 # which really need usg5-4 instead.
2568 machine=delta88k opsys=usg5-4-2
2569 ;;
2570 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2571 machine=delta88k opsys=usg5-3
2572 ;;
2573
2574 ## Dual machines
2575 m68*-dual-sysv* )
2576 machine=dual opsys=usg5-2
2577 ;;
2578 m68*-dual-uniplus* )
2579 machine=dual opsys=unipl5-2
2580 ;;
2581
2582 ## Elxsi 6400
2583 elxsi-elxsi-sysv* )
2584 machine=elxsi opsys=usg5-2
2585 ;;
2586
2587 ## Encore machines
2588 ns16k-encore-bsd* )
2589 machine=ns16000 opsys=umax
2590 ;;
2591
65171e3a
DL
2592 ## The GEC 63 - apparently, this port isn't really finished yet.
2593 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2594
2595 ## Gould Power Node and NP1
2596 pn-gould-bsd4.2* )
2597 machine=gould opsys=bsd4-2
2598 ;;
2599 pn-gould-bsd4.3* )
2600 machine=gould opsys=bsd4-3
2601 ;;
2602 np1-gould-bsd* )
2603 machine=gould-np1 opsys=bsd4-3
2604 ;;
2605
2606 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2607 ## as far as Emacs is concerned).
2608 m88k-harris-cxux* )
2609 # Build needs to be different on 7.0 and later releases
2610 case "`uname -r`" in
2611 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2612 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2613 esac
2614 NON_GNU_CPP="/lib/cpp"
2615 ;;
2616 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2617 m68k-harris-cxux* )
2618 machine=nh3000 opsys=cxux
2619 ;;
2620 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2621 powerpc-harris-powerunix )
2622 machine=nh6000 opsys=powerunix
2623 NON_GNU_CPP="cc -Xo -E -P"
2624 ;;
6fbb6db1
GM
2625 ## SR2001/SR2201 running HI-UX/MPP
2626 hppa1.1-hitachi-hiuxmpp* )
2627 machine=sr2k opsys=hiuxmpp
2628 ;;
2629 hppa1.1-hitachi-hiuxwe2* )
2630 machine=sr2k opsys=hiuxwe2
2631 ;;
ba4481b5
DL
2632 ## Honeywell XPS100
2633 xps*-honeywell-sysv* )
2634 machine=xps100 opsys=usg5-2
2635 ;;
2636
2637 ## HP 9000 series 200 or 300
2638 m68*-hp-bsd* )
2639 machine=hp9000s300 opsys=bsd4-3
2640 ;;
2641 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2642 m68*-hp-hpux* )
2643 case "`uname -r`" in
2644 ## Someone's system reports A.B8.05 for this.
2645 ## I wonder what other possibilities there are.
2646 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2647 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2648 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2649 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2650 *) machine=hp9000s300 opsys=hpux ;;
2651 esac
2652 ;;
2653
6fbb6db1
GM
2654 ## HP 9000 series 700 and 800, running HP/UX
2655 hppa*-hp-hpux7* )
2656 machine=hp800 opsys=hpux
2657 ;;
2658 hppa*-hp-hpux8* )
2659 machine=hp800 opsys=hpux8
2660 ;;
2661 hppa*-hp-hpux9shr* )
2662 machine=hp800 opsys=hpux9shr
2663 ;;
2664 hppa*-hp-hpux9* )
2665 machine=hp800 opsys=hpux9
2666 ;;
2667 hppa*-hp-hpux10.2* )
2668 machine=hp800 opsys=hpux10-20
2669 ;;
2670 hppa*-hp-hpux10* )
2671 machine=hp800 opsys=hpux10
2672 ;;
2673 hppa*-hp-hpux1[1-9]* )
2674 machine=hp800 opsys=hpux11
2675 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2676 ;;
2677
409d9577
GM
2678 hppa*-*-linux-gnu* )
2679 machine=hp800 opsys=gnu-linux
2680 ;;
2681
6fbb6db1
GM
2682 ## HP 9000 series 700 and 800, running HP/UX
2683 hppa*-hp-hpux* )
2684 ## Cross-compilation? Nah!
2685 case "`uname -r`" in
2686 ## Someone's system reports A.B8.05 for this.
2687 ## I wonder what other possibilities there are.
2688 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2689 *.08.* ) machine=hp800 opsys=hpux8 ;;
2690 *.09.* ) machine=hp800 opsys=hpux9 ;;
2691 *) machine=hp800 opsys=hpux10 ;;
2692 esac
2693 ;;
ba4481b5
DL
2694 hppa*-*-nextstep* )
2695 machine=hp800 opsys=nextstep
2696 ;;
2697
2698 ## Orion machines
2699 orion-orion-bsd* )
2700 machine=orion opsys=bsd4-2
2701 ;;
2702 clipper-orion-bsd* )
2703 machine=orion105 opsys=bsd4-2
2704 ;;
2705
2706 ## IBM machines
2707 i[3456]86-ibm-aix1.1* )
2708 machine=ibmps2-aix opsys=usg5-2-2
2709 ;;
2710 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2711 machine=ibmps2-aix opsys=usg5-3
2712 ;;
2713 i370-ibm-aix*)
2714 machine=ibm370aix opsys=usg5-3
2715 ;;
55597d70 2716 s390-*-linux-gnu* )
138f0859
GM
2717 machine=ibms390 opsys=gnu-linux
2718 ;;
bcdb1378
EZ
2719 s390x-*-linux-gnu* )
2720 machine=ibms390x opsys=gnu-linux
2721 ;;
ba4481b5
DL
2722 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2723 machine=ibmrs6000 opsys=aix3-1
2724 ;;
2725 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2726 machine=ibmrs6000 opsys=aix3-2-5
2727 ;;
2728 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2729 machine=ibmrs6000 opsys=aix4-1
2730 ;;
2731 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2732 machine=ibmrs6000 opsys=aix4-2
2733 ;;
67bf991b
CY
2734 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2735 machine=ibmrs6000 opsys=aix4-2
2736 ;;
55597d70 2737 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2738 machine=ibmrs6000 opsys=aix4-2
2739 ;;
ba4481b5
DL
2740 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2741 machine=ibmrs6000 opsys=aix4
2742 ;;
2743 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2744 machine=ibmrs6000 opsys=aix4-1
2745 ;;
2746 rs6000-ibm-aix* | powerpc-ibm-aix* )
2747 machine=ibmrs6000 opsys=aix3-2
2748 ;;
2749 romp-ibm-bsd4.3* )
2750 machine=ibmrt opsys=bsd4-3
2751 ;;
2752 romp-ibm-bsd4.2* )
2753 machine=ibmrt opsys=bsd4-2
2754 ;;
2755 romp-ibm-aos4.3* )
2756 machine=ibmrt opsys=bsd4-3
2757 ;;
2758 romp-ibm-aos4.2* )
2759 machine=ibmrt opsys=bsd4-2
2760 ;;
2761 romp-ibm-aos* )
2762 machine=ibmrt opsys=bsd4-3
2763 ;;
2764 romp-ibm-bsd* )
2765 machine=ibmrt opsys=bsd4-3
2766 ;;
2767 romp-ibm-aix* )
2768 machine=ibmrt-aix opsys=usg5-2-2
2769 ;;
2770
2771 ## Integrated Solutions `Optimum V'
2772 m68*-isi-bsd4.2* )
2773 machine=isi-ov opsys=bsd4-2
2774 ;;
2775 m68*-isi-bsd4.3* )
2776 machine=isi-ov opsys=bsd4-3
2777 ;;
2778
2779 ## Intel 386 machines where we do care about the manufacturer
2780 i[3456]86-intsys-sysv* )
2781 machine=is386 opsys=usg5-2-2
2782 ;;
2783
2784 ## Prime EXL
2785 i[3456]86-prime-sysv* )
2786 machine=i386 opsys=usg5-3
2787 ;;
2788
2789 ## Sequent Symmetry running Dynix
2790 i[3456]86-sequent-bsd* )
2791 machine=symmetry opsys=bsd4-3
2792 ;;
2793
2794 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2795 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2796 machine=sequent-ptx opsys=ptx4
2797 NON_GNU_CPP=/lib/cpp
2798 ;;
2799
2800 ## Sequent Symmetry running DYNIX/ptx
2801 ## Use the old cpp rather than the newer ANSI one.
2802 i[3456]86-sequent-ptx* )
2803 machine=sequent-ptx opsys=ptx
2804 NON_GNU_CPP="/lib/cpp"
2805 ;;
2806
2807 ## ncr machine running svr4.3.
2808 i[3456]86-ncr-sysv4.3 )
2809 machine=ncr386 opsys=usg5-4-3
2810 ;;
2811
2812 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2813 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2814 i[3456]86-ncr-sysv* )
2815 machine=ncr386 opsys=usg5-4-2
2816 ;;
2817
2818 ## Intel Paragon OSF/1
2819 i860-intel-osf1* )
2820 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2821 ;;
2822
2823 ## Intel 860
2824 i860-*-sysv4* )
2825 machine=i860 opsys=usg5-4
2826 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2827 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2828 ;;
2829
c76e04a8
GM
2830 ## Macintosh PowerPC
2831 powerpc*-*-linux-gnu* )
2832 machine=macppc opsys=gnu-linux
2833 ;;
2834
ba4481b5
DL
2835 ## Masscomp machines
2836 m68*-masscomp-rtu* )
2837 machine=masscomp opsys=rtu
2838 ;;
2839
2840 ## Megatest machines
2841 m68*-megatest-bsd* )
2842 machine=mega68 opsys=bsd4-2
2843 ;;
2844
2845 ## Workstations sold by MIPS
2846 ## This is not necessarily all workstations using the MIPS processor -
2847 ## Irises are produced by SGI, and DECstations by DEC.
2848
2849 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2850 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2851 ## it gives for choosing between the alternatives seems to be "Use
2852 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2853 ## the BSD world." I'll assume that these are instructions for
2854 ## handling two odd situations, and that every other situation
2855 ## should use mips.h and usg5-2-2, they being listed first.
2856 mips-mips-usg* )
2857 machine=mips4
2858 ## Fall through to the general code at the bottom to decide on the OS.
2859 ;;
2860 mips-mips-riscos4* )
2861 machine=mips4 opsys=bsd4-3
2862 NON_GNU_CC="cc -systype bsd43"
2863 NON_GNU_CPP="cc -systype bsd43 -E"
2864 ;;
2865 mips-mips-riscos5* )
2866 machine=mips4 opsys=riscos5
2867 NON_GNU_CC="cc -systype bsd43"
2868 NON_GNU_CPP="cc -systype bsd43 -E"
2869 ;;
2870 mips-mips-bsd* )
2871 machine=mips opsys=bsd4-3
2872 ;;
2873 mips-mips-* )
2874 machine=mips opsys=usg5-2-2
2875 ;;
2876
2877 ## NeXT
2878 m68*-next-* | m68k-*-nextstep* )
2879 machine=m68k opsys=nextstep
2880 ;;
2881
2882 ## The complete machine from National Semiconductor
2883 ns32k-ns-genix* )
2884 machine=ns32000 opsys=usg5-2
2885 ;;
2886
2887 ## NCR machines
2888 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2889 machine=tower32 opsys=usg5-2-2
2890 ;;
2891 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2892 machine=tower32v3 opsys=usg5-3
2893 ;;
2894
2895 ## NEC EWS4800
2896 mips-nec-sysv4*)
2897 machine=ews4800 opsys=ux4800
2898 ;;
2899
2900 ## Nixdorf Targon 31
2901 m68*-nixdorf-sysv* )
2902 machine=targon31 opsys=usg5-2-2
2903 ;;
2904
2905 ## Nu (TI or LMI)
2906 m68*-nu-sysv* )
2907 machine=nu opsys=usg5-2
2908 ;;
2909
2910 ## Plexus
2911 m68*-plexus-sysv* )
2912 machine=plexus opsys=usg5-2
2913 ;;
2914
ba4481b5
DL
2915 ## Pyramid machines
2916 ## I don't really have any idea what sort of processor the Pyramid has,
2917 ## so I'm assuming it is its own architecture.
2918 pyramid-pyramid-bsd* )
2919 machine=pyramid opsys=bsd4-2
2920 ;;
2921
2922 ## Sequent Balance
2923 ns32k-sequent-bsd4.2* )
2924 machine=sequent opsys=bsd4-2
2925 ;;
2926 ns32k-sequent-bsd4.3* )
2927 machine=sequent opsys=bsd4-3
2928 ;;
2929
2930 ## Siemens Nixdorf
2931 mips-siemens-sysv* | mips-sni-sysv*)
2932 machine=mips-siemens opsys=usg5-4
2933 NON_GNU_CC=/usr/ccs/bin/cc
2934 NON_GNU_CPP=/usr/ccs/lib/cpp
2935 ;;
2936
2937 ## Silicon Graphics machines
2938 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2939 m68*-sgi-iris3.5* )
2940 machine=irist opsys=iris3-5
2941 ;;
2942 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2943 machine=irist opsys=iris3-6
2944 ;;
2945 ## Iris 4D
2946 mips-sgi-irix3* )
2947 machine=iris4d opsys=irix3-3
2948 ;;
2949 mips-sgi-irix4* )
2950 machine=iris4d opsys=irix4-0
2951 ;;
2952 mips-sgi-irix6.5 )
2953 machine=iris4d opsys=irix6-5
946173ad
DL
2954 # Without defining _LANGUAGE_C, things get masked out in the headers
2955 # so that, for instance, grepping for `free' in stdlib.h fails and
2956 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2957 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2958 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2959 ;;
2960 mips-sgi-irix6* )
2961 machine=iris4d opsys=irix6-0
c4bb2108 2962 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2963 # but presumably it does no harm.
2964 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2965 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2966 NON_GCC_TEST_OPTIONS=-32
2967 ;;
2968 mips-sgi-irix5.[01]* )
2969 machine=iris4d opsys=irix5-0
2970 ;;
2971 mips-sgi-irix5* | mips-sgi-irix* )
2972 machine=iris4d opsys=irix5-2
2973 ;;
2974
2975 ## SONY machines
2976 m68*-sony-bsd4.2* )
2977 machine=news opsys=bsd4-2
2978 ;;
2979 m68*-sony-bsd4.3* )
2980 machine=news opsys=bsd4-3
2981 ;;
2982 m68*-sony-newsos3* | m68*-sony-news3*)
2983 machine=news opsys=bsd4-3
2984 ;;
2985 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2986 machine=news-risc opsys=bsd4-3
2987 ;;
2988 mips-sony-newsos6* )
2989 machine=news-r6 opsys=newsos6
2990 ;;
2991 mips-sony-news* )
2992 machine=news-risc opsys=newsos5
2993 ;;
2994
2995 ## Stride
2996 m68*-stride-sysv* )
2997 machine=stride opsys=usg5-2
2998 ;;
2999
3000 ## Suns
3001 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3002 machine=sparc opsys=gnu-linux
3003 ;;
3004
d054101f 3005 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
3006 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
3007 | rs6000-*-solaris2*)
3008 case "${canonical}" in
3009 m68*-sunos1* ) machine=sun1 ;;
3010 m68*-sunos2* ) machine=sun2 ;;
3011 m68* ) machine=sun3 ;;
3012 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
3013 i[3456]86-*-* ) machine=intel386 ;;
af46e133 3014 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
3015 powerpcle* ) machine=powerpcle ;;
3016 powerpc* | rs6000* ) machine=ibmrs6000 ;;
3017 sparc* ) machine=sparc ;;
3018 * ) unported=yes ;;
3019 esac
3020 case "${canonical}" in
3021 ## The Sun386 didn't get past 4.0.
3022 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
3023 *-sunos4.0* ) opsys=sunos4-0 ;;
3024 *-sunos4.1.[3-9]*noshare )
3025 ## This name is sunos413 instead of sunos4-1-3
3026 ## to avoid a file name conflict on MSDOS.
3027 opsys=sunos413
3028 NON_GNU_CPP=/usr/lib/cpp
3029 NON_GCC_TEST_OPTIONS=-Bstatic
3030 GCC_TEST_OPTIONS=-static
3031 ;;
3032 *-sunos4.1.[3-9]* | *-sunos4shr*)
3033 opsys=sunos4shr
3034 NON_GNU_CPP=/usr/lib/cpp
3035 ;;
3036 *-sunos4* | *-sunos )
3037 opsys=sunos4-1
3038 NON_GCC_TEST_OPTIONS=-Bstatic
3039 GCC_TEST_OPTIONS=-static
3040 ;;
3041 *-sunos5.3* | *-solaris2.3* )
3042 opsys=sol2-3
3043 NON_GNU_CPP=/usr/ccs/lib/cpp
3044 ;;
3045 *-sunos5.4* | *-solaris2.4* )
3046 opsys=sol2-4
3047 NON_GNU_CPP=/usr/ccs/lib/cpp
3048 RANLIB="ar -ts"
3049 ;;
3050 *-sunos5.5* | *-solaris2.5* )
3051 opsys=sol2-5
3052 NON_GNU_CPP=/usr/ccs/lib/cpp
3053 RANLIB="ar -ts"
3054 ;;
8e967cf7
MR
3055 *-sunos5.6* | *-solaris2.6* )
3056 opsys=sol2-6
3057 NON_GNU_CPP=/usr/ccs/lib/cpp
3058 RANLIB="ar -ts"
3059 ;;
ba4481b5 3060 *-sunos5* | *-solaris* )
9e71690e 3061 opsys=sol2-6
089a966d
GM
3062 emacs_check_sunpro_c=yes
3063 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
3064 ;;
3065 * ) opsys=bsd4-2 ;;
3066 esac
3067 ## Watch out for a compiler that we know will not work.
3068 case "${canonical}" in
3069 *-solaris* | *-sunos5* )
3070 if [ "x$CC" = x/usr/ucb/cc ]; then
3071 ## /usr/ucb/cc doesn't work;
3072 ## we should find some other compiler that does work.
3073 unset CC
3074 fi
3075 ;;
3076 *) ;;
3077 esac
3078 ;;
3079 sparc-*-nextstep* )
3080 machine=sparc opsys=nextstep
3081 ;;
3082
3083 ## Tadpole 68k
3084 m68*-tadpole-sysv* )
3085 machine=tad68k opsys=usg5-3
3086 ;;
3087
3088 ## Tahoe machines
3089 tahoe-tahoe-bsd4.2* )
3090 machine=tahoe opsys=bsd4-2
3091 ;;
3092 tahoe-tahoe-bsd4.3* )
3093 machine=tahoe opsys=bsd4-3
3094 ;;
3095
3096 ## Tandem Integrity S2
3097 mips-tandem-sysv* )
3098 machine=tandem-s2 opsys=usg5-3
3099 ;;
3100
3101 ## Tektronix XD88
3102 m88k-tektronix-sysv3* )
3103 machine=tekxd88 opsys=usg5-3
3104 ;;
3105
3106 ## Tektronix 16000 box (6130?)
3107 ns16k-tektronix-bsd* )
3108 machine=ns16000 opsys=bsd4-2
3109 ;;
3110 ## Tektronix 4300
3111 ## src/m/tek4300.h hints that this is a m68k machine.
3112 m68*-tektronix-bsd* )
3113 machine=tek4300 opsys=bsd4-3
3114 ;;
3115
3116 ## Titan P2 or P3
3117 ## We seem to have lost the machine-description file titan.h!
3118 titan-titan-sysv* )
3119 machine=titan opsys=usg5-3
3120 ;;
3121
3122 ## Ustation E30 (SS5E)
3123 m68*-unisys-uniplus* )
3124 machine=ustation opsystem=unipl5-2
3125 ;;
3126
3127 ## Vaxen.
3128 vax-dec-* )
3129 machine=vax
3130 case "${canonical}" in
3131 *-bsd4.1* ) opsys=bsd4-1 ;;
3132 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3133 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3134 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3135 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3136 *-vms* ) opsys=vms ;;
3137 * ) unported=yes
3138 esac
3139 ;;
3140
3141 ## Whitechapel MG1
3142 ns16k-whitechapel-* )
3143 machine=mg1
3144 ## We don't know what sort of OS runs on these; we'll let the
3145 ## operating system guessing code below try.
3146 ;;
3147
3148 ## Wicat
3149 m68*-wicat-sysv* )
3150 machine=wicat opsys=usg5-2
3151 ;;
3152
f4988be7
GM
3153 ## IA-64
3154 ia64*-*-linux* )
3155 machine=ia64 opsys=gnu-linux
3156 ;;
3157
ba4481b5
DL
3158 ## Intel 386 machines where we don't care about the manufacturer
3159 i[3456]86-*-* )
3160 machine=intel386
3161 case "${canonical}" in
c60ee5e7 3162 *-cygwin ) opsys=cygwin ;;
eae54018 3163 *-darwin* ) opsys=darwin
23fd4483
ST
3164 CPP="${CC-cc} -E -no-cpp-precomp"
3165 ;;
ba4481b5
DL
3166 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3167 *-isc2.2* ) opsys=isc2-2 ;;
3168 *-isc4.0* ) opsys=isc4-0 ;;
3169 *-isc4.* ) opsys=isc4-1
3170 GCC_TEST_OPTIONS=-posix
3171 NON_GCC_TEST_OPTIONS=-Xp
3172 ;;
3173 *-isc* ) opsys=isc3-0 ;;
3174 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3175 *-esix* ) opsys=esix ;;
3176 *-xenix* ) opsys=xenix ;;
3177 *-linux-gnu* ) opsys=gnu-linux ;;
3178 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3179 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3180 NON_GNU_CPP=/lib/cpp
3181 # Prevent -belf from being passed to $CPP.
3182 # /lib/cpp does not accept it.
3183 OVERRIDE_CPPFLAGS=" "
3184 ;;
3185 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3186 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3187 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3188 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3189 *-nextstep* ) opsys=nextstep ;;
3190 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3191 esac
3192 ;;
3193
3194 ## m68k Linux-based GNU system
3195 m68k-*-linux-gnu* )
3196 machine=m68k opsys=gnu-linux
3197 ;;
3198
3199 ## Mips Linux-based GNU system
cd958eb3 3200 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3201 machine=mips opsys=gnu-linux
3202 ;;
3203
3204 ## UXP/DS
3205 sparc-fujitsu-sysv4* )
3206 machine=sparc opsys=uxpds
3207 NON_GNU_CPP=/usr/ccs/lib/cpp
3208 RANLIB="ar -ts"
3209 ;;
3210
3211 ## UXP/V
3212 f301-fujitsu-uxpv4.1)
3213 machine=f301 opsys=uxpv
3214 ;;
3215
598a2813
AS
3216 ## AMD x86-64 Linux-based GNU system
3217 x86_64-*-linux-gnu* )
24b01ec4 3218 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3219 ;;
3220
94218e27
DN
3221 ## Tensilica Xtensa Linux-based GNU system
3222 xtensa-*-linux-gnu* )
3223 machine=xtensa opsys=gnu-linux
3224 ;;
3225
ba4481b5
DL
3226 * )
3227 unported=yes
3228 ;;
3229esac
3230
3231### If the code above didn't choose an operating system, just choose
3232### an operating system based on the configuration name. You really
3233### only want to use this when you have no idea what the right
3234### operating system is; if you know what operating systems a machine
3235### runs, it's cleaner to make it explicit in the case statement
3236### above.
3237if test x"${opsys}" = x; then
3238 case "${canonical}" in
3239 *-gnu* ) opsys=gnu ;;
3240 *-bsd4.[01] ) opsys=bsd4-1 ;;
3241 *-bsd4.2 ) opsys=bsd4-2 ;;
3242 *-bsd4.3 ) opsys=bsd4-3 ;;
3243 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3244 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3245 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3246 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3247 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3248 *-sysv5uw* ) opsys=unixware ;;
3249 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3250 *-sysv4.1* | *-sysvr4.1* )
3251 NON_GNU_CPP=/usr/lib/cpp
3252 opsys=usg5-4 ;;
3253 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3254 if [ x$NON_GNU_CPP = x ]; then
3255 if [ -f /usr/ccs/lib/cpp ]; then
3256 NON_GNU_CPP=/usr/ccs/lib/cpp
3257 else
3258 NON_GNU_CPP=/lib/cpp
3259 fi
3260 fi
3261 opsys=usg5-4-2 ;;
3262 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3263 * )
3264 unported=yes
3265 ;;
3266 esac
3267fi
3268
c0d27fcc 3269
22044edf 3270
ba4481b5 3271if test $unported = yes; then
c0d27fcc 3272 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3273Check \`etc/MACHINES' for recognized configuration names." >&5
3274echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3275Check \`etc/MACHINES' for recognized configuration names." >&2;}
3276 { (exit 1); exit 1; }; }
ba4481b5
DL
3277fi
3278
3279machfile="m/${machine}.h"
3280opsysfile="s/${opsys}.h"
3281
c0d27fcc 3282
ba4481b5
DL
3283#### Choose a compiler.
3284test -n "$CC" && cc_specified=yes
3285
3286# Save the value of CFLAGS that the user specified.
3287SPECIFIED_CFLAGS="$CFLAGS"
3288
3289case ${with_gcc} in
3290 "yes" ) CC="gcc" GCC=yes ;;
3291 "no" ) : ${CC=cc} ;;
503d2be0
AS
3292 * )
3293esac
3294ac_ext=c
3295ac_cpp='$CPP $CPPFLAGS'
3296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3298ac_compiler_gnu=$ac_cv_c_compiler_gnu
3299if test -n "$ac_tool_prefix"; then
3300 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3301set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3304if test "${ac_cv_prog_CC+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3306else
3307 if test -n "$CC"; then
3308 ac_cv_prog_CC="$CC" # Let the user override the test.
3309else
c0d27fcc
MR
3310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3311for as_dir in $PATH
3312do
3313 IFS=$as_save_IFS
3314 test -z "$as_dir" && as_dir=.
3315 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3317 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3319 break 2
3320 fi
3321done
503d2be0 3322done
ca81d7a0 3323IFS=$as_save_IFS
503d2be0 3324
ba4481b5
DL
3325fi
3326fi
503d2be0 3327CC=$ac_cv_prog_CC
ba4481b5 3328if test -n "$CC"; then
ca81d7a0
JD
3329 { echo "$as_me:$LINENO: result: $CC" >&5
3330echo "${ECHO_T}$CC" >&6; }
503d2be0 3331else
ca81d7a0
JD
3332 { echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6; }
503d2be0
AS
3334fi
3335
ca81d7a0 3336
503d2be0
AS
3337fi
3338if test -z "$ac_cv_prog_CC"; then
3339 ac_ct_CC=$CC
3340 # Extract the first word of "gcc", so it can be a program name with args.
3341set dummy gcc; ac_word=$2
ca81d7a0
JD
3342{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3344if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
3346else
3347 if test -n "$ac_ct_CC"; then
3348 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3349else
c0d27fcc
MR
3350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351for as_dir in $PATH
3352do
3353 IFS=$as_save_IFS
3354 test -z "$as_dir" && as_dir=.
3355 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3357 ac_cv_prog_ac_ct_CC="gcc"
3358 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3359 break 2
3360 fi
3361done
503d2be0 3362done
ca81d7a0 3363IFS=$as_save_IFS
503d2be0
AS
3364
3365fi
3366fi
3367ac_ct_CC=$ac_cv_prog_ac_ct_CC
3368if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3369 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3370echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3371else
ca81d7a0
JD
3372 { echo "$as_me:$LINENO: result: no" >&5
3373echo "${ECHO_T}no" >&6; }
503d2be0
AS
3374fi
3375
ca81d7a0
JD
3376 if test "x$ac_ct_CC" = x; then
3377 CC=""
3378 else
3379 case $cross_compiling:$ac_tool_warned in
3380yes:)
3381{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3382whose name does not start with the host triplet. If you think this
3383configuration is useful to you, please write to autoconf@gnu.org." >&5
3384echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3385whose name does not start with the host triplet. If you think this
3386configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3387ac_tool_warned=yes ;;
3388esac
3389 CC=$ac_ct_CC
3390 fi
503d2be0
AS
3391else
3392 CC="$ac_cv_prog_CC"
ba4481b5
DL
3393fi
3394
3395if test -z "$CC"; then
ca81d7a0
JD
3396 if test -n "$ac_tool_prefix"; then
3397 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3398set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3399{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3400echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3401if test "${ac_cv_prog_CC+set}" = set; then
3402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3403else
3404 if test -n "$CC"; then
3405 ac_cv_prog_CC="$CC" # Let the user override the test.
3406else
c0d27fcc
MR
3407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408for as_dir in $PATH
3409do
3410 IFS=$as_save_IFS
3411 test -z "$as_dir" && as_dir=.
3412 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3413 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3414 ac_cv_prog_CC="${ac_tool_prefix}cc"
3415 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3416 break 2
3417 fi
3418done
503d2be0 3419done
ca81d7a0 3420IFS=$as_save_IFS
503d2be0
AS
3421
3422fi
3423fi
3424CC=$ac_cv_prog_CC
3425if test -n "$CC"; then
ca81d7a0
JD
3426 { echo "$as_me:$LINENO: result: $CC" >&5
3427echo "${ECHO_T}$CC" >&6; }
503d2be0 3428else
ca81d7a0
JD
3429 { echo "$as_me:$LINENO: result: no" >&5
3430echo "${ECHO_T}no" >&6; }
503d2be0
AS
3431fi
3432
503d2be0 3433
ca81d7a0 3434 fi
503d2be0
AS
3435fi
3436if test -z "$CC"; then
3437 # Extract the first word of "cc", so it can be a program name with args.
3438set dummy cc; ac_word=$2
ca81d7a0
JD
3439{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3440echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3441if test "${ac_cv_prog_CC+set}" = set; then
3442 echo $ECHO_N "(cached) $ECHO_C" >&6
3443else
3444 if test -n "$CC"; then
3445 ac_cv_prog_CC="$CC" # Let the user override the test.
3446else
3447 ac_prog_rejected=no
c0d27fcc
MR
3448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451 IFS=$as_save_IFS
3452 test -z "$as_dir" && as_dir=.
3453 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3455 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3456 ac_prog_rejected=yes
3457 continue
3458 fi
3459 ac_cv_prog_CC="cc"
3460 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3461 break 2
3462 fi
3463done
503d2be0 3464done
ca81d7a0 3465IFS=$as_save_IFS
503d2be0 3466
ba4481b5
DL
3467if test $ac_prog_rejected = yes; then
3468 # We found a bogon in the path, so make sure we never use it.
3469 set dummy $ac_cv_prog_CC
3470 shift
503d2be0 3471 if test $# != 0; then
ba4481b5
DL
3472 # We chose a different compiler from the bogus one.
3473 # However, it has the same basename, so the bogon will be chosen
3474 # first if we set CC to just the basename; use the full file name.
3475 shift
6bae0ccf 3476 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3477 fi
3478fi
3479fi
3480fi
503d2be0 3481CC=$ac_cv_prog_CC
ba4481b5 3482if test -n "$CC"; then
ca81d7a0
JD
3483 { echo "$as_me:$LINENO: result: $CC" >&5
3484echo "${ECHO_T}$CC" >&6; }
ba4481b5 3485else
ca81d7a0
JD
3486 { echo "$as_me:$LINENO: result: no" >&5
3487echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3488fi
3489
ca81d7a0 3490
503d2be0
AS
3491fi
3492if test -z "$CC"; then
3493 if test -n "$ac_tool_prefix"; then
ca81d7a0 3494 for ac_prog in cl.exe
503d2be0
AS
3495 do
3496 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3497set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3498{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3500if test "${ac_cv_prog_CC+set}" = set; then
3501 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3502else
3503 if test -n "$CC"; then
3504 ac_cv_prog_CC="$CC" # Let the user override the test.
3505else
c0d27fcc
MR
3506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3507for as_dir in $PATH
3508do
3509 IFS=$as_save_IFS
3510 test -z "$as_dir" && as_dir=.
3511 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3513 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3514 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3515 break 2
3516 fi
3517done
503d2be0 3518done
ca81d7a0 3519IFS=$as_save_IFS
503d2be0 3520
c4bb2108
DL
3521fi
3522fi
503d2be0 3523CC=$ac_cv_prog_CC
c4bb2108 3524if test -n "$CC"; then
ca81d7a0
JD
3525 { echo "$as_me:$LINENO: result: $CC" >&5
3526echo "${ECHO_T}$CC" >&6; }
c4bb2108 3527else
ca81d7a0
JD
3528 { echo "$as_me:$LINENO: result: no" >&5
3529echo "${ECHO_T}no" >&6; }
503d2be0
AS
3530fi
3531
ca81d7a0 3532
503d2be0
AS
3533 test -n "$CC" && break
3534 done
3535fi
3536if test -z "$CC"; then
3537 ac_ct_CC=$CC
ca81d7a0 3538 for ac_prog in cl.exe
503d2be0
AS
3539do
3540 # Extract the first word of "$ac_prog", so it can be a program name with args.
3541set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3542{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3543echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3544if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3545 echo $ECHO_N "(cached) $ECHO_C" >&6
3546else
3547 if test -n "$ac_ct_CC"; then
3548 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3549else
c0d27fcc
MR
3550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3551for as_dir in $PATH
3552do
3553 IFS=$as_save_IFS
3554 test -z "$as_dir" && as_dir=.
3555 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3556 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3557 ac_cv_prog_ac_ct_CC="$ac_prog"
3558 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3559 break 2
3560 fi
3561done
503d2be0 3562done
ca81d7a0 3563IFS=$as_save_IFS
503d2be0 3564
c4bb2108 3565fi
503d2be0
AS
3566fi
3567ac_ct_CC=$ac_cv_prog_ac_ct_CC
3568if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3569 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3570echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3571else
ca81d7a0
JD
3572 { echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3574fi
3575
ca81d7a0 3576
503d2be0
AS
3577 test -n "$ac_ct_CC" && break
3578done
ba4481b5 3579
ca81d7a0
JD
3580 if test "x$ac_ct_CC" = x; then
3581 CC=""
3582 else
3583 case $cross_compiling:$ac_tool_warned in
3584yes:)
3585{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3586whose name does not start with the host triplet. If you think this
3587configuration is useful to you, please write to autoconf@gnu.org." >&5
3588echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3589whose name does not start with the host triplet. If you think this
3590configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3591ac_tool_warned=yes ;;
3592esac
3593 CC=$ac_ct_CC
3594 fi
503d2be0
AS
3595fi
3596
3597fi
ba4481b5 3598
c0d27fcc 3599
19650fd6
AS
3600test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3601See \`config.log' for more details." >&5
3602echo "$as_me: error: no acceptable C compiler found in \$PATH
3603See \`config.log' for more details." >&2;}
503d2be0 3604 { (exit 1); exit 1; }; }
c4bb2108 3605
503d2be0 3606# Provide some information about the compiler.
ca81d7a0 3607echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3608ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3609{ (ac_try="$ac_compiler --version >&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 --version >&5") 2>&5
503d2be0 3616 ac_status=$?
c0d27fcc 3617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3618 (exit $ac_status); }
ca81d7a0
JD
3619{ (ac_try="$ac_compiler -v >&5"
3620case "(($ac_try" in
3621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3622 *) ac_try_echo=$ac_try;;
3623esac
3624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3625 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3626 ac_status=$?
c0d27fcc 3627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3628 (exit $ac_status); }
ca81d7a0
JD
3629{ (ac_try="$ac_compiler -V >&5"
3630case "(($ac_try" in
3631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3632 *) ac_try_echo=$ac_try;;
3633esac
3634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3635 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3636 ac_status=$?
c0d27fcc 3637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3638 (exit $ac_status); }
3639
3640cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3641/* confdefs.h. */
3642_ACEOF
3643cat confdefs.h >>conftest.$ac_ext
3644cat >>conftest.$ac_ext <<_ACEOF
3645/* end confdefs.h. */
c4bb2108 3646
503d2be0
AS
3647int
3648main ()
3649{
3650
3651 ;
3652 return 0;
3653}
3654_ACEOF
3655ac_clean_files_save=$ac_clean_files
19650fd6 3656ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3657# Try to create an executable without -o first, disregard a.out.
3658# It will help us diagnose broken compilers, and finding out an intuition
3659# of exeext.
ca81d7a0
JD
3660{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3661echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3662ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3663#
3664# List of possible output files, starting from the most likely.
3665# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3666# only as a last resort. b.out is created by i960 compilers.
3667ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3668#
3669# The IRIX 6 linker writes into existing files which may not be
3670# executable, retaining their permissions. Remove them first so a
3671# subsequent execution test works.
3672ac_rmfiles=
3673for ac_file in $ac_files
3674do
3675 case $ac_file in
3676 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3677 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3678 esac
3679done
3680rm -f $ac_rmfiles
3681
3682if { (ac_try="$ac_link_default"
3683case "(($ac_try" in
3684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3685 *) ac_try_echo=$ac_try;;
3686esac
3687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3688 (eval "$ac_link_default") 2>&5
503d2be0 3689 ac_status=$?
c0d27fcc 3690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3691 (exit $ac_status); }; then
ca81d7a0
JD
3692 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3693# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3694# in a Makefile. We should not override ac_cv_exeext if it was cached,
3695# so that the user can short-circuit this test for compilers unknown to
3696# Autoconf.
f053c89f 3697for ac_file in $ac_files ''
19650fd6 3698do
6bae0ccf 3699 test -f "$ac_file" || continue
503d2be0 3700 case $ac_file in
ca81d7a0 3701 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3702 ;;
19650fd6 3703 [ab].out )
edfaf76d
LK
3704 # We found the default executable, but exeext='' is most
3705 # certainly right.
3706 break;;
19650fd6 3707 *.* )
ca81d7a0
JD
3708 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3709 then :; else
3710 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3711 fi
3712 # We set ac_cv_exeext here because the later test for it is not
3713 # safe: cross compilers may not add the suffix if given an `-o'
3714 # argument, so we may need to know it at that point already.
3715 # Even if this section looks crufty: it has the advantage of
3716 # actually working.
edfaf76d 3717 break;;
19650fd6 3718 * )
edfaf76d 3719 break;;
503d2be0
AS
3720 esac
3721done
ca81d7a0
JD
3722test "$ac_cv_exeext" = no && ac_cv_exeext=
3723
503d2be0 3724else
f053c89f
CY
3725 ac_file=''
3726fi
3727
3728{ echo "$as_me:$LINENO: result: $ac_file" >&5
3729echo "${ECHO_T}$ac_file" >&6; }
3730if test -z "$ac_file"; then
503d2be0 3731 echo "$as_me: failed program was:" >&5
19650fd6
AS
3732sed 's/^/| /' conftest.$ac_ext >&5
3733
6bae0ccf 3734{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3735See \`config.log' for more details." >&5
6bae0ccf 3736echo "$as_me: error: C compiler cannot create executables
19650fd6 3737See \`config.log' for more details." >&2;}
503d2be0
AS
3738 { (exit 77); exit 77; }; }
3739fi
3740
3741ac_exeext=$ac_cv_exeext
503d2be0 3742
ca81d7a0 3743# Check that the compiler produces executables we can run. If not, either
503d2be0 3744# the compiler is broken, or we cross compile.
ca81d7a0
JD
3745{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3746echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3747# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3748# If not cross compiling, check that we can run a simple program.
3749if test "$cross_compiling" != yes; then
3750 if { ac_try='./$ac_file'
ca81d7a0
JD
3751 { (case "(($ac_try" in
3752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3753 *) ac_try_echo=$ac_try;;
3754esac
3755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3756 (eval "$ac_try") 2>&5
503d2be0 3757 ac_status=$?
c0d27fcc 3758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3759 (exit $ac_status); }; }; then
3760 cross_compiling=no
ba4481b5 3761 else
503d2be0
AS
3762 if test "$cross_compiling" = maybe; then
3763 cross_compiling=yes
3764 else
c0d27fcc 3765 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3766If you meant to cross compile, use \`--host'.
3767See \`config.log' for more details." >&5
503d2be0 3768echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3769If you meant to cross compile, use \`--host'.
3770See \`config.log' for more details." >&2;}
503d2be0
AS
3771 { (exit 1); exit 1; }; }
3772 fi
ba4481b5 3773 fi
503d2be0 3774fi
ca81d7a0
JD
3775{ echo "$as_me:$LINENO: result: yes" >&5
3776echo "${ECHO_T}yes" >&6; }
503d2be0 3777
19650fd6 3778rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3779ac_clean_files=$ac_clean_files_save
ca81d7a0 3780# Check that the compiler produces executables we can run. If not, either
503d2be0 3781# the compiler is broken, or we cross compile.
ca81d7a0
JD
3782{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3783echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3784{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3785echo "${ECHO_T}$cross_compiling" >&6; }
3786
3787{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3788echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3789if { (ac_try="$ac_link"
3790case "(($ac_try" in
3791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3792 *) ac_try_echo=$ac_try;;
3793esac
3794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3795 (eval "$ac_link") 2>&5
503d2be0 3796 ac_status=$?
c0d27fcc 3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3798 (exit $ac_status); }; then
3799 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3800# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3801# work properly (i.e., refer to `conftest.exe'), while it won't with
3802# `rm'.
6bae0ccf
DL
3803for ac_file in conftest.exe conftest conftest.*; do
3804 test -f "$ac_file" || continue
503d2be0 3805 case $ac_file in
ca81d7a0 3806 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3807 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3808 break;;
503d2be0
AS
3809 * ) break;;
3810 esac
3811done
ba4481b5 3812else
19650fd6
AS
3813 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3814See \`config.log' for more details." >&5
3815echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3816See \`config.log' for more details." >&2;}
503d2be0 3817 { (exit 1); exit 1; }; }
ba4481b5 3818fi
ba4481b5 3819
503d2be0 3820rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3821{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3822echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3823
503d2be0
AS
3824rm -f conftest.$ac_ext
3825EXEEXT=$ac_cv_exeext
3826ac_exeext=$EXEEXT
ca81d7a0
JD
3827{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3828echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3829if test "${ac_cv_objext+set}" = set; then
3830 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3831else
503d2be0 3832 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3833/* confdefs.h. */
3834_ACEOF
3835cat confdefs.h >>conftest.$ac_ext
3836cat >>conftest.$ac_ext <<_ACEOF
3837/* end confdefs.h. */
ba4481b5 3838
503d2be0
AS
3839int
3840main ()
3841{
ba4481b5 3842
503d2be0
AS
3843 ;
3844 return 0;
3845}
3846_ACEOF
3847rm -f conftest.o conftest.obj
ca81d7a0
JD
3848if { (ac_try="$ac_compile"
3849case "(($ac_try" in
3850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3851 *) ac_try_echo=$ac_try;;
3852esac
3853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3854 (eval "$ac_compile") 2>&5
503d2be0 3855 ac_status=$?
c0d27fcc 3856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3857 (exit $ac_status); }; then
ca81d7a0
JD
3858 for ac_file in conftest.o conftest.obj conftest.*; do
3859 test -f "$ac_file" || continue;
503d2be0 3860 case $ac_file in
ca81d7a0 3861 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3862 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3863 break;;
3864 esac
3865done
c4bb2108 3866else
503d2be0 3867 echo "$as_me: failed program was:" >&5
19650fd6
AS
3868sed 's/^/| /' conftest.$ac_ext >&5
3869
3870{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3871See \`config.log' for more details." >&5
3872echo "$as_me: error: cannot compute suffix of object files: cannot compile
3873See \`config.log' for more details." >&2;}
503d2be0 3874 { (exit 1); exit 1; }; }
c4bb2108
DL
3875fi
3876
503d2be0
AS
3877rm -f conftest.$ac_cv_objext conftest.$ac_ext
3878fi
ca81d7a0
JD
3879{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3880echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3881OBJEXT=$ac_cv_objext
3882ac_objext=$OBJEXT
ca81d7a0
JD
3883{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3884echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3885if test "${ac_cv_c_compiler_gnu+set}" = set; then
3886 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3887else
503d2be0 3888 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3889/* confdefs.h. */
3890_ACEOF
3891cat confdefs.h >>conftest.$ac_ext
3892cat >>conftest.$ac_ext <<_ACEOF
3893/* end confdefs.h. */
503d2be0
AS
3894
3895int
3896main ()
3897{
3898#ifndef __GNUC__
3899 choke me
3900#endif
3901
3902 ;
3903 return 0;
3904}
3905_ACEOF
3906rm -f conftest.$ac_objext
ca81d7a0
JD
3907if { (ac_try="$ac_compile"
3908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
3912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3913 (eval "$ac_compile") 2>conftest.er1
503d2be0 3914 ac_status=$?
edfaf76d
LK
3915 grep -v '^ *+' conftest.er1 >conftest.err
3916 rm -f conftest.er1
3917 cat conftest.err >&5
c0d27fcc 3918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3919 (exit $ac_status); } && {
3920 test -z "$ac_c_werror_flag" ||
3921 test ! -s conftest.err
3922 } && test -s conftest.$ac_objext; then
503d2be0
AS
3923 ac_compiler_gnu=yes
3924else
3925 echo "$as_me: failed program was:" >&5
19650fd6
AS
3926sed 's/^/| /' conftest.$ac_ext >&5
3927
ca81d7a0 3928 ac_compiler_gnu=no
503d2be0 3929fi
ca81d7a0
JD
3930
3931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3932ac_cv_c_compiler_gnu=$ac_compiler_gnu
3933
3934fi
ca81d7a0
JD
3935{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3936echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3937GCC=`test $ac_compiler_gnu = yes && echo yes`
3938ac_test_CFLAGS=${CFLAGS+set}
3939ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3940{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3941echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3942if test "${ac_cv_prog_cc_g+set}" = set; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3944else
ca81d7a0
JD
3945 ac_save_c_werror_flag=$ac_c_werror_flag
3946 ac_c_werror_flag=yes
3947 ac_cv_prog_cc_g=no
3948 CFLAGS="-g"
3949 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3950/* confdefs.h. */
3951_ACEOF
3952cat confdefs.h >>conftest.$ac_ext
3953cat >>conftest.$ac_ext <<_ACEOF
3954/* end confdefs.h. */
503d2be0
AS
3955
3956int
3957main ()
3958{
3959
3960 ;
3961 return 0;
3962}
3963_ACEOF
3964rm -f conftest.$ac_objext
ca81d7a0
JD
3965if { (ac_try="$ac_compile"
3966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
3970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3971 (eval "$ac_compile") 2>conftest.er1
503d2be0 3972 ac_status=$?
edfaf76d
LK
3973 grep -v '^ *+' conftest.er1 >conftest.err
3974 rm -f conftest.er1
3975 cat conftest.err >&5
c0d27fcc 3976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3977 (exit $ac_status); } && {
3978 test -z "$ac_c_werror_flag" ||
3979 test ! -s conftest.err
3980 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3981 ac_cv_prog_cc_g=yes
3982else
503d2be0 3983 echo "$as_me: failed program was:" >&5
19650fd6
AS
3984sed 's/^/| /' conftest.$ac_ext >&5
3985
ca81d7a0
JD
3986 CFLAGS=""
3987 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3988/* confdefs.h. */
3989_ACEOF
3990cat confdefs.h >>conftest.$ac_ext
3991cat >>conftest.$ac_ext <<_ACEOF
3992/* end confdefs.h. */
edfaf76d 3993
6bae0ccf
DL
3994int
3995main ()
3996{
ca81d7a0 3997
6bae0ccf
DL
3998 ;
3999 return 0;
4000}
4001_ACEOF
ca81d7a0
JD
4002rm -f conftest.$ac_objext
4003if { (ac_try="$ac_compile"
4004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
4008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4009 (eval "$ac_compile") 2>conftest.er1
edfaf76d 4010 ac_status=$?
edfaf76d
LK
4011 grep -v '^ *+' conftest.er1 >conftest.err
4012 rm -f conftest.er1
4013 cat conftest.err >&5
edfaf76d 4014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4015 (exit $ac_status); } && {
4016 test -z "$ac_c_werror_flag" ||
4017 test ! -s conftest.err
4018 } && test -s conftest.$ac_objext; then
ca81d7a0 4019 :
6bae0ccf
DL
4020else
4021 echo "$as_me: failed program was:" >&5
19650fd6
AS
4022sed 's/^/| /' conftest.$ac_ext >&5
4023
ca81d7a0
JD
4024 ac_c_werror_flag=$ac_save_c_werror_flag
4025 CFLAGS="-g"
4026 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 4027/* confdefs.h. */
19650fd6
AS
4028_ACEOF
4029cat confdefs.h >>conftest.$ac_ext
4030cat >>conftest.$ac_ext <<_ACEOF
4031/* end confdefs.h. */
ca81d7a0 4032
503d2be0
AS
4033int
4034main ()
4035{
ca81d7a0 4036
503d2be0
AS
4037 ;
4038 return 0;
4039}
4040_ACEOF
4041rm -f conftest.$ac_objext
ca81d7a0
JD
4042if { (ac_try="$ac_compile"
4043case "(($ac_try" in
4044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4045 *) ac_try_echo=$ac_try;;
4046esac
4047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4048 (eval "$ac_compile") 2>conftest.er1
503d2be0 4049 ac_status=$?
edfaf76d
LK
4050 grep -v '^ *+' conftest.er1 >conftest.err
4051 rm -f conftest.er1
4052 cat conftest.err >&5
c0d27fcc 4053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4054 (exit $ac_status); } && {
4055 test -z "$ac_c_werror_flag" ||
4056 test ! -s conftest.err
4057 } && test -s conftest.$ac_objext; then
ba4481b5
DL
4058 ac_cv_prog_cc_g=yes
4059else
503d2be0 4060 echo "$as_me: failed program was:" >&5
19650fd6
AS
4061sed 's/^/| /' conftest.$ac_ext >&5
4062
ca81d7a0 4063
ba4481b5 4064fi
ca81d7a0
JD
4065
4066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4067fi
4068
4069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4070fi
4071
4072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4073 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 4074fi
ca81d7a0
JD
4075{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4076echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 4077if test "$ac_test_CFLAGS" = set; then
503d2be0 4078 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
4079elif test $ac_cv_prog_cc_g = yes; then
4080 if test "$GCC" = yes; then
ba4481b5
DL
4081 CFLAGS="-g -O2"
4082 else
c4bb2108 4083 CFLAGS="-g"
ba4481b5 4084 fi
22afa6e8 4085else
c4bb2108
DL
4086 if test "$GCC" = yes; then
4087 CFLAGS="-O2"
4088 else
4089 CFLAGS=
4090 fi
ba4481b5 4091fi
ca81d7a0
JD
4092{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4093echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4094if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
4095 echo $ECHO_N "(cached) $ECHO_C" >&6
4096else
ca81d7a0 4097 ac_cv_prog_cc_c89=no
6bae0ccf
DL
4098ac_save_CC=$CC
4099cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4100/* confdefs.h. */
4101_ACEOF
4102cat confdefs.h >>conftest.$ac_ext
4103cat >>conftest.$ac_ext <<_ACEOF
4104/* end confdefs.h. */
6bae0ccf
DL
4105#include <stdarg.h>
4106#include <stdio.h>
4107#include <sys/types.h>
4108#include <sys/stat.h>
4109/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4110struct buf { int x; };
4111FILE * (*rcsopen) (struct buf *, struct stat *, int);
4112static char *e (p, i)
4113 char **p;
4114 int i;
4115{
4116 return p[i];
4117}
4118static char *f (char * (*g) (char **, int), char **p, ...)
4119{
4120 char *s;
4121 va_list v;
4122 va_start (v,p);
4123 s = g (p, va_arg (v,int));
4124 va_end (v);
4125 return s;
4126}
edfaf76d
LK
4127
4128/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4129 function prototypes and stuff, but not '\xHH' hex character constants.
4130 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 4131 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
4132 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4133 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 4134 that's true only with -std. */
edfaf76d
LK
4135int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4136
ca81d7a0
JD
4137/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4138 inside strings and character constants. */
4139#define FOO(x) 'x'
4140int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4141
6bae0ccf
DL
4142int test (int i, double x);
4143struct s1 {int (*f) (int a);};
4144struct s2 {int (*f) (double a);};
4145int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4146int argc;
4147char **argv;
4148int
4149main ()
4150{
4151return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4152 ;
4153 return 0;
4154}
4155_ACEOF
ca81d7a0
JD
4156for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4157 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
4158do
4159 CC="$ac_save_CC $ac_arg"
4160 rm -f conftest.$ac_objext
ca81d7a0
JD
4161if { (ac_try="$ac_compile"
4162case "(($ac_try" in
4163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164 *) ac_try_echo=$ac_try;;
4165esac
4166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4167 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 4168 ac_status=$?
edfaf76d
LK
4169 grep -v '^ *+' conftest.er1 >conftest.err
4170 rm -f conftest.er1
4171 cat conftest.err >&5
6bae0ccf 4172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4173 (exit $ac_status); } && {
4174 test -z "$ac_c_werror_flag" ||
4175 test ! -s conftest.err
4176 } && test -s conftest.$ac_objext; then
ca81d7a0 4177 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
4178else
4179 echo "$as_me: failed program was:" >&5
19650fd6
AS
4180sed 's/^/| /' conftest.$ac_ext >&5
4181
ca81d7a0 4182
6bae0ccf 4183fi
ca81d7a0
JD
4184
4185rm -f core conftest.err conftest.$ac_objext
4186 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 4187done
ca81d7a0 4188rm -f conftest.$ac_ext
6bae0ccf
DL
4189CC=$ac_save_CC
4190
4191fi
ca81d7a0
JD
4192# AC_CACHE_VAL
4193case "x$ac_cv_prog_cc_c89" in
4194 x)
4195 { echo "$as_me:$LINENO: result: none needed" >&5
4196echo "${ECHO_T}none needed" >&6; } ;;
4197 xno)
4198 { echo "$as_me:$LINENO: result: unsupported" >&5
4199echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 4200 *)
ca81d7a0
JD
4201 CC="$CC $ac_cv_prog_cc_c89"
4202 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4203echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
4204esac
4205
19650fd6 4206
503d2be0
AS
4207ac_ext=c
4208ac_cpp='$CPP $CPPFLAGS'
4209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4212
c0d27fcc 4213
ba4481b5
DL
4214# On Suns, sometimes $CPP names a directory.
4215if test -n "$CPP" && test -d "$CPP"; then
4216 CPP=
4217fi
4218
089a966d
GM
4219## If not using gcc, and on Solaris, and no CPP specified, see if
4220## using a Sun compiler, which needs -Xs to prevent whitespace.
4221if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4222 test x"$CPP" = x; then
4223 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
4224echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
4225
4226if test "${emacs_cv_sunpro_c+set}" = set; then
4227 echo $ECHO_N "(cached) $ECHO_C" >&6
4228else
4229 cat >conftest.$ac_ext <<_ACEOF
4230/* confdefs.h. */
4231_ACEOF
4232cat confdefs.h >>conftest.$ac_ext
4233cat >>conftest.$ac_ext <<_ACEOF
4234/* end confdefs.h. */
4235
4236int
4237main ()
4238{
4239#ifndef __SUNPRO_C
4240fail;
4241#endif
4242
4243 ;
4244 return 0;
4245}
4246_ACEOF
4247rm -f conftest.$ac_objext conftest$ac_exeext
4248if { (ac_try="$ac_link"
4249case "(($ac_try" in
4250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4251 *) ac_try_echo=$ac_try;;
4252esac
4253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4254 (eval "$ac_link") 2>conftest.er1
4255 ac_status=$?
4256 grep -v '^ *+' conftest.er1 >conftest.err
4257 rm -f conftest.er1
4258 cat conftest.err >&5
4259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4260 (exit $ac_status); } && {
4261 test -z "$ac_c_werror_flag" ||
4262 test ! -s conftest.err
4263 } && test -s conftest$ac_exeext &&
4264 $as_test_x conftest$ac_exeext; then
4265 emacs_cv_sunpro_c=yes
4266else
4267 echo "$as_me: failed program was:" >&5
4268sed 's/^/| /' conftest.$ac_ext >&5
4269
4270 emacs_cv_sunpro_c=no
4271fi
4272
4273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4274 conftest$ac_exeext conftest.$ac_ext
4275fi
4276
4277 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
4278echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
4279
4280 if test x"$emacs_cv_sunpro_c" = xyes; then
4281 NON_GNU_CPP="$CC -E -Xs"
4282 fi
4283fi
4284
ba4481b5
DL
4285#### Some systems specify a CPP to use unless we are using GCC.
4286#### Now that we know whether we are using GCC, we can decide whether
4287#### to use that one.
4288if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4289then
4290 CPP="$NON_GNU_CPP"
4291fi
4292
4293#### Some systems specify a CC to use unless we are using GCC.
4294#### Now that we know whether we are using GCC, we can decide whether
4295#### to use that one.
4296if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4297 test x$cc_specified != xyes
4298then
4299 CC="$NON_GNU_CC"
4300fi
4301
4302if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4303then
4304 CC="$CC $GCC_TEST_OPTIONS"
4305fi
4306
4307if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4308then
4309 CC="$CC $NON_GCC_TEST_OPTIONS"
4310fi
4311
e143ad11
AS
4312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4317{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4318echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4319# On Suns, sometimes $CPP names a directory.
4320if test -n "$CPP" && test -d "$CPP"; then
4321 CPP=
4322fi
4323if test -z "$CPP"; then
4324 if test "${ac_cv_prog_CPP+set}" = set; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
4326else
4327 # Double quotes because CPP needs to be expanded
4328 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4329 do
4330 ac_preproc_ok=false
4331for ac_c_preproc_warn_flag in '' yes
4332do
4333 # Use a header file that comes with gcc, so configuring glibc
4334 # with a fresh cross-compiler works.
4335 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4336 # <limits.h> exists even on freestanding compilers.
4337 # On the NeXT, cc -E runs the code through the compiler's parser,
4338 # not just through cpp. "Syntax error" is here to catch this case.
4339 cat >conftest.$ac_ext <<_ACEOF
4340/* confdefs.h. */
4341_ACEOF
4342cat confdefs.h >>conftest.$ac_ext
4343cat >>conftest.$ac_ext <<_ACEOF
4344/* end confdefs.h. */
4345#ifdef __STDC__
4346# include <limits.h>
4347#else
4348# include <assert.h>
4349#endif
4350 Syntax error
4351_ACEOF
ca81d7a0
JD
4352if { (ac_try="$ac_cpp conftest.$ac_ext"
4353case "(($ac_try" in
4354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4355 *) ac_try_echo=$ac_try;;
4356esac
4357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4358 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4359 ac_status=$?
4360 grep -v '^ *+' conftest.er1 >conftest.err
4361 rm -f conftest.er1
4362 cat conftest.err >&5
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4364 (exit $ac_status); } >/dev/null && {
4365 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4366 test ! -s conftest.err
4367 }; then
e143ad11
AS
4368 :
4369else
4370 echo "$as_me: failed program was:" >&5
4371sed 's/^/| /' conftest.$ac_ext >&5
4372
4373 # Broken: fails on valid input.
4374continue
4375fi
ca81d7a0 4376
e143ad11
AS
4377rm -f conftest.err conftest.$ac_ext
4378
ca81d7a0 4379 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4380 # can be detected and how.
4381 cat >conftest.$ac_ext <<_ACEOF
4382/* confdefs.h. */
4383_ACEOF
4384cat confdefs.h >>conftest.$ac_ext
4385cat >>conftest.$ac_ext <<_ACEOF
4386/* end confdefs.h. */
4387#include <ac_nonexistent.h>
4388_ACEOF
ca81d7a0
JD
4389if { (ac_try="$ac_cpp conftest.$ac_ext"
4390case "(($ac_try" in
4391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4392 *) ac_try_echo=$ac_try;;
4393esac
4394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4395 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4396 ac_status=$?
4397 grep -v '^ *+' conftest.er1 >conftest.err
4398 rm -f conftest.er1
4399 cat conftest.err >&5
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4401 (exit $ac_status); } >/dev/null && {
4402 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4403 test ! -s conftest.err
4404 }; then
e143ad11
AS
4405 # Broken: success on invalid input.
4406continue
4407else
4408 echo "$as_me: failed program was:" >&5
4409sed 's/^/| /' conftest.$ac_ext >&5
4410
4411 # Passes both tests.
4412ac_preproc_ok=:
4413break
4414fi
ca81d7a0 4415
e143ad11
AS
4416rm -f conftest.err conftest.$ac_ext
4417
4418done
4419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4420rm -f conftest.err conftest.$ac_ext
4421if $ac_preproc_ok; then
4422 break
4423fi
4424
4425 done
4426 ac_cv_prog_CPP=$CPP
4427
4428fi
4429 CPP=$ac_cv_prog_CPP
4430else
4431 ac_cv_prog_CPP=$CPP
4432fi
ca81d7a0
JD
4433{ echo "$as_me:$LINENO: result: $CPP" >&5
4434echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4435ac_preproc_ok=false
4436for ac_c_preproc_warn_flag in '' yes
4437do
4438 # Use a header file that comes with gcc, so configuring glibc
4439 # with a fresh cross-compiler works.
4440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4441 # <limits.h> exists even on freestanding compilers.
4442 # On the NeXT, cc -E runs the code through the compiler's parser,
4443 # not just through cpp. "Syntax error" is here to catch this case.
4444 cat >conftest.$ac_ext <<_ACEOF
4445/* confdefs.h. */
4446_ACEOF
4447cat confdefs.h >>conftest.$ac_ext
4448cat >>conftest.$ac_ext <<_ACEOF
4449/* end confdefs.h. */
4450#ifdef __STDC__
4451# include <limits.h>
4452#else
4453# include <assert.h>
4454#endif
4455 Syntax error
4456_ACEOF
ca81d7a0
JD
4457if { (ac_try="$ac_cpp conftest.$ac_ext"
4458case "(($ac_try" in
4459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4460 *) ac_try_echo=$ac_try;;
4461esac
4462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4464 ac_status=$?
4465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
4468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4469 (exit $ac_status); } >/dev/null && {
4470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4471 test ! -s conftest.err
4472 }; then
e143ad11
AS
4473 :
4474else
4475 echo "$as_me: failed program was:" >&5
4476sed 's/^/| /' conftest.$ac_ext >&5
4477
4478 # Broken: fails on valid input.
4479continue
4480fi
ca81d7a0 4481
e143ad11
AS
4482rm -f conftest.err conftest.$ac_ext
4483
ca81d7a0 4484 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4485 # can be detected and how.
4486 cat >conftest.$ac_ext <<_ACEOF
4487/* confdefs.h. */
4488_ACEOF
4489cat confdefs.h >>conftest.$ac_ext
4490cat >>conftest.$ac_ext <<_ACEOF
4491/* end confdefs.h. */
4492#include <ac_nonexistent.h>
4493_ACEOF
ca81d7a0
JD
4494if { (ac_try="$ac_cpp conftest.$ac_ext"
4495case "(($ac_try" in
4496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4497 *) ac_try_echo=$ac_try;;
4498esac
4499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4500 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4501 ac_status=$?
4502 grep -v '^ *+' conftest.er1 >conftest.err
4503 rm -f conftest.er1
4504 cat conftest.err >&5
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4506 (exit $ac_status); } >/dev/null && {
4507 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4508 test ! -s conftest.err
4509 }; then
e143ad11
AS
4510 # Broken: success on invalid input.
4511continue
4512else
4513 echo "$as_me: failed program was:" >&5
4514sed 's/^/| /' conftest.$ac_ext >&5
4515
4516 # Passes both tests.
4517ac_preproc_ok=:
4518break
4519fi
ca81d7a0 4520
e143ad11
AS
4521rm -f conftest.err conftest.$ac_ext
4522
4523done
4524# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4525rm -f conftest.err conftest.$ac_ext
4526if $ac_preproc_ok; then
4527 :
4528else
4529 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4530See \`config.log' for more details." >&5
4531echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4532See \`config.log' for more details." >&2;}
4533 { (exit 1); exit 1; }; }
4534fi
4535
4536ac_ext=c
4537ac_cpp='$CPP $CPPFLAGS'
4538ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4539ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4540ac_compiler_gnu=$ac_cv_c_compiler_gnu
4541
4542
ca81d7a0
JD
4543{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4544echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4545if test "${ac_cv_path_GREP+set}" = set; then
4546 echo $ECHO_N "(cached) $ECHO_C" >&6
4547else
4548 # Extract the first word of "grep ggrep" to use in msg output
4549if test -z "$GREP"; then
4550set dummy grep ggrep; ac_prog_name=$2
4551if test "${ac_cv_path_GREP+set}" = set; then
4552 echo $ECHO_N "(cached) $ECHO_C" >&6
4553else
4554 ac_path_GREP_found=false
4555# Loop through the user's path and test for each of PROGNAME-LIST
4556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4558do
4559 IFS=$as_save_IFS
4560 test -z "$as_dir" && as_dir=.
4561 for ac_prog in grep ggrep; do
4562 for ac_exec_ext in '' $ac_executable_extensions; do
4563 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4564 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4565 # Check for GNU ac_path_GREP and select it if it is found.
4566 # Check for GNU $ac_path_GREP
4567case `"$ac_path_GREP" --version 2>&1` in
4568*GNU*)
4569 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4570*)
4571 ac_count=0
4572 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4573 while :
4574 do
4575 cat "conftest.in" "conftest.in" >"conftest.tmp"
4576 mv "conftest.tmp" "conftest.in"
4577 cp "conftest.in" "conftest.nl"
4578 echo 'GREP' >> "conftest.nl"
4579 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4580 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4581 ac_count=`expr $ac_count + 1`
4582 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4583 # Best one so far, save it but keep looking for a better one
4584 ac_cv_path_GREP="$ac_path_GREP"
4585 ac_path_GREP_max=$ac_count
4586 fi
4587 # 10*(2^10) chars as input seems more than enough
4588 test $ac_count -gt 10 && break
4589 done
4590 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4591esac
4592
4593
4594 $ac_path_GREP_found && break 3
4595 done
4596done
4597
4598done
4599IFS=$as_save_IFS
4600
4601
4602fi
4603
4604GREP="$ac_cv_path_GREP"
4605if test -z "$GREP"; then
4606 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4607echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4608 { (exit 1); exit 1; }; }
4609fi
4610
4611else
4612 ac_cv_path_GREP=$GREP
4613fi
4614
4615
4616fi
4617{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4618echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4619 GREP="$ac_cv_path_GREP"
4620
4621
4622{ echo "$as_me:$LINENO: checking for egrep" >&5
4623echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4624if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4625 echo $ECHO_N "(cached) $ECHO_C" >&6
4626else
ca81d7a0
JD
4627 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4628 then ac_cv_path_EGREP="$GREP -E"
4629 else
4630 # Extract the first word of "egrep" to use in msg output
4631if test -z "$EGREP"; then
4632set dummy egrep; ac_prog_name=$2
4633if test "${ac_cv_path_EGREP+set}" = set; then
4634 echo $ECHO_N "(cached) $ECHO_C" >&6
4635else
4636 ac_path_EGREP_found=false
4637# Loop through the user's path and test for each of PROGNAME-LIST
4638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4640do
4641 IFS=$as_save_IFS
4642 test -z "$as_dir" && as_dir=.
4643 for ac_prog in egrep; do
4644 for ac_exec_ext in '' $ac_executable_extensions; do
4645 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4646 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4647 # Check for GNU ac_path_EGREP and select it if it is found.
4648 # Check for GNU $ac_path_EGREP
4649case `"$ac_path_EGREP" --version 2>&1` in
4650*GNU*)
4651 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4652*)
4653 ac_count=0
4654 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4655 while :
4656 do
4657 cat "conftest.in" "conftest.in" >"conftest.tmp"
4658 mv "conftest.tmp" "conftest.in"
4659 cp "conftest.in" "conftest.nl"
4660 echo 'EGREP' >> "conftest.nl"
4661 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4662 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4663 ac_count=`expr $ac_count + 1`
4664 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4665 # Best one so far, save it but keep looking for a better one
4666 ac_cv_path_EGREP="$ac_path_EGREP"
4667 ac_path_EGREP_max=$ac_count
e143ad11 4668 fi
ca81d7a0
JD
4669 # 10*(2^10) chars as input seems more than enough
4670 test $ac_count -gt 10 && break
4671 done
4672 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4673esac
4674
4675
4676 $ac_path_EGREP_found && break 3
4677 done
4678done
4679
4680done
4681IFS=$as_save_IFS
4682
4683
e143ad11 4684fi
e143ad11 4685
ca81d7a0
JD
4686EGREP="$ac_cv_path_EGREP"
4687if test -z "$EGREP"; then
4688 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4689echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4690 { (exit 1); exit 1; }; }
4691fi
e143ad11 4692
ca81d7a0
JD
4693else
4694 ac_cv_path_EGREP=$EGREP
4695fi
e143ad11 4696
ca81d7a0
JD
4697
4698 fi
8eeae1c9 4699fi
ca81d7a0
JD
4700{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4701echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4702 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4703
4704
4705
ca81d7a0
JD
4706{ echo "$as_me:$LINENO: checking for AIX" >&5
4707echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4708cat >conftest.$ac_ext <<_ACEOF
4709/* confdefs.h. */
4710_ACEOF
4711cat confdefs.h >>conftest.$ac_ext
4712cat >>conftest.$ac_ext <<_ACEOF
4713/* end confdefs.h. */
4714#ifdef _AIX
4715 yes
4716#endif
4717
4718_ACEOF
4719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4720 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4721 { echo "$as_me:$LINENO: result: yes" >&5
4722echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4723cat >>confdefs.h <<\_ACEOF
4724#define _ALL_SOURCE 1
4725_ACEOF
4726
4727else
ca81d7a0
JD
4728 { echo "$as_me:$LINENO: result: no" >&5
4729echo "${ECHO_T}no" >&6; }
e143ad11
AS
4730fi
4731rm -f conftest*
4732
4733
4734
4735cat >>confdefs.h <<\_ACEOF
4736#define _GNU_SOURCE 1
4737_ACEOF
4738
4739
4740
01abe918 4741### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4742{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4743echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4744SAVE_CFLAGS="$CFLAGS"
4745CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4746cat >conftest.$ac_ext <<_ACEOF
4747/* confdefs.h. */
4748_ACEOF
4749cat confdefs.h >>conftest.$ac_ext
4750cat >>conftest.$ac_ext <<_ACEOF
4751/* end confdefs.h. */
4752
4753int
4754main ()
4755{
4756
4757 ;
4758 return 0;
4759}
4760_ACEOF
4761rm -f conftest.$ac_objext
ca81d7a0
JD
4762if { (ac_try="$ac_compile"
4763case "(($ac_try" in
4764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4765 *) ac_try_echo=$ac_try;;
4766esac
4767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4768 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4769 ac_status=$?
4770 grep -v '^ *+' conftest.er1 >conftest.err
4771 rm -f conftest.er1
4772 cat conftest.err >&5
4773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4774 (exit $ac_status); } && {
4775 test -z "$ac_c_werror_flag" ||
4776 test ! -s conftest.err
4777 } && test -s conftest.$ac_objext; then
01abe918
CY
4778 has_option=yes
4779else
4780 echo "$as_me: failed program was:" >&5
4781sed 's/^/| /' conftest.$ac_ext >&5
4782
ca81d7a0 4783 has_option=no
01abe918 4784fi
ca81d7a0
JD
4785
4786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4787if test $has_option = yes; then
4788 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4789fi
ca81d7a0
JD
4790{ echo "$as_me:$LINENO: result: $has_option" >&5
4791echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4792CFLAGS="$SAVE_CFLAGS"
4793unset has_option
4794unset SAVE_CFLAGS
4795
6a3a24fa 4796#### Some other nice autoconf tests.
ba4481b5 4797
ca81d7a0
JD
4798{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4799echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4800LN_S=$as_ln_s
4801if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4802 { echo "$as_me:$LINENO: result: yes" >&5
4803echo "${ECHO_T}yes" >&6; }
ba4481b5 4804else
ca81d7a0
JD
4805 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4806echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4807fi
4808
503d2be0
AS
4809ac_ext=c
4810ac_cpp='$CPP $CPPFLAGS'
4811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4813ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4814{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4815echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4816# On Suns, sometimes $CPP names a directory.
4817if test -n "$CPP" && test -d "$CPP"; then
4818 CPP=
4819fi
4820if test -z "$CPP"; then
503d2be0
AS
4821 if test "${ac_cv_prog_CPP+set}" = set; then
4822 echo $ECHO_N "(cached) $ECHO_C" >&6
4823else
4824 # Double quotes because CPP needs to be expanded
4825 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4826 do
4827 ac_preproc_ok=false
4828for ac_c_preproc_warn_flag in '' yes
4829do
4830 # Use a header file that comes with gcc, so configuring glibc
4831 # with a fresh cross-compiler works.
19650fd6
AS
4832 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4833 # <limits.h> exists even on freestanding compilers.
ba4481b5 4834 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4835 # not just through cpp. "Syntax error" is here to catch this case.
4836 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4837/* confdefs.h. */
4838_ACEOF
4839cat confdefs.h >>conftest.$ac_ext
4840cat >>conftest.$ac_ext <<_ACEOF
4841/* end confdefs.h. */
4842#ifdef __STDC__
4843# include <limits.h>
4844#else
4845# include <assert.h>
4846#endif
edfaf76d 4847 Syntax error
503d2be0 4848_ACEOF
ca81d7a0
JD
4849if { (ac_try="$ac_cpp conftest.$ac_ext"
4850case "(($ac_try" in
4851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4852 *) ac_try_echo=$ac_try;;
4853esac
4854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4855 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4856 ac_status=$?
6bae0ccf 4857 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4858 rm -f conftest.er1
4859 cat conftest.err >&5
c0d27fcc 4860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4861 (exit $ac_status); } >/dev/null && {
4862 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4863 test ! -s conftest.err
4864 }; then
ba4481b5
DL
4865 :
4866else
503d2be0 4867 echo "$as_me: failed program was:" >&5
19650fd6
AS
4868sed 's/^/| /' conftest.$ac_ext >&5
4869
503d2be0
AS
4870 # Broken: fails on valid input.
4871continue
4872fi
ca81d7a0 4873
503d2be0
AS
4874rm -f conftest.err conftest.$ac_ext
4875
ca81d7a0 4876 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4877 # can be detected and how.
4878 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
503d2be0
AS
4884#include <ac_nonexistent.h>
4885_ACEOF
ca81d7a0
JD
4886if { (ac_try="$ac_cpp conftest.$ac_ext"
4887case "(($ac_try" in
4888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4889 *) ac_try_echo=$ac_try;;
4890esac
4891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4892 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4893 ac_status=$?
6bae0ccf 4894 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4895 rm -f conftest.er1
4896 cat conftest.err >&5
c0d27fcc 4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4898 (exit $ac_status); } >/dev/null && {
4899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4900 test ! -s conftest.err
4901 }; then
503d2be0
AS
4902 # Broken: success on invalid input.
4903continue
c4bb2108 4904else
503d2be0 4905 echo "$as_me: failed program was:" >&5
19650fd6
AS
4906sed 's/^/| /' conftest.$ac_ext >&5
4907
503d2be0
AS
4908 # Passes both tests.
4909ac_preproc_ok=:
4910break
4911fi
ca81d7a0 4912
503d2be0
AS
4913rm -f conftest.err conftest.$ac_ext
4914
4915done
4916# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4917rm -f conftest.err conftest.$ac_ext
4918if $ac_preproc_ok; then
4919 break
4920fi
4921
4922 done
4923 ac_cv_prog_CPP=$CPP
4924
4925fi
4926 CPP=$ac_cv_prog_CPP
4927else
4928 ac_cv_prog_CPP=$CPP
4929fi
ca81d7a0
JD
4930{ echo "$as_me:$LINENO: result: $CPP" >&5
4931echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4932ac_preproc_ok=false
4933for ac_c_preproc_warn_flag in '' yes
4934do
4935 # Use a header file that comes with gcc, so configuring glibc
4936 # with a fresh cross-compiler works.
19650fd6
AS
4937 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4938 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4939 # On the NeXT, cc -E runs the code through the compiler's parser,
4940 # not just through cpp. "Syntax error" is here to catch this case.
4941 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
4947#ifdef __STDC__
4948# include <limits.h>
4949#else
4950# include <assert.h>
4951#endif
edfaf76d 4952 Syntax error
503d2be0 4953_ACEOF
ca81d7a0
JD
4954if { (ac_try="$ac_cpp conftest.$ac_ext"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
4959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4960 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4961 ac_status=$?
6bae0ccf 4962 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4963 rm -f conftest.er1
4964 cat conftest.err >&5
c0d27fcc 4965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4966 (exit $ac_status); } >/dev/null && {
4967 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4968 test ! -s conftest.err
4969 }; then
ba4481b5
DL
4970 :
4971else
503d2be0 4972 echo "$as_me: failed program was:" >&5
19650fd6
AS
4973sed 's/^/| /' conftest.$ac_ext >&5
4974
503d2be0
AS
4975 # Broken: fails on valid input.
4976continue
4977fi
ca81d7a0 4978
503d2be0
AS
4979rm -f conftest.err conftest.$ac_ext
4980
ca81d7a0 4981 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4982 # can be detected and how.
4983 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
503d2be0
AS
4989#include <ac_nonexistent.h>
4990_ACEOF
ca81d7a0
JD
4991if { (ac_try="$ac_cpp conftest.$ac_ext"
4992case "(($ac_try" in
4993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4994 *) ac_try_echo=$ac_try;;
4995esac
4996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4997 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4998 ac_status=$?
6bae0ccf 4999 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
5000 rm -f conftest.er1
5001 cat conftest.err >&5
c0d27fcc 5002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5003 (exit $ac_status); } >/dev/null && {
5004 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5005 test ! -s conftest.err
5006 }; then
503d2be0
AS
5007 # Broken: success on invalid input.
5008continue
5009else
5010 echo "$as_me: failed program was:" >&5
19650fd6
AS
5011sed 's/^/| /' conftest.$ac_ext >&5
5012
503d2be0
AS
5013 # Passes both tests.
5014ac_preproc_ok=:
5015break
ba4481b5 5016fi
ca81d7a0 5017
503d2be0
AS
5018rm -f conftest.err conftest.$ac_ext
5019
5020done
5021# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5022rm -f conftest.err conftest.$ac_ext
5023if $ac_preproc_ok; then
5024 :
ba4481b5 5025else
19650fd6
AS
5026 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5027See \`config.log' for more details." >&5
5028echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5029See \`config.log' for more details." >&2;}
503d2be0 5030 { (exit 1); exit 1; }; }
ba4481b5 5031fi
503d2be0
AS
5032
5033ac_ext=c
5034ac_cpp='$CPP $CPPFLAGS'
5035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5037ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5038
5039# Find a good install program. We prefer a C program (faster),
5040# so one script is as good as another. But avoid the broken or
5041# incompatible versions:
5042# SysV /etc/install, /usr/sbin/install
5043# SunOS /usr/etc/install
5044# IRIX /sbin/install
5045# AIX /bin/install
503d2be0 5046# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5047# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5048# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5049# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5050# OS/2's system install, which has a completely different semantic
ba4481b5 5051# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
5052{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5053echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5054if test -z "$INSTALL"; then
503d2be0
AS
5055if test "${ac_cv_path_install+set}" = set; then
5056 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5057else
c0d27fcc
MR
5058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5059for as_dir in $PATH
5060do
5061 IFS=$as_save_IFS
5062 test -z "$as_dir" && as_dir=.
5063 # Account for people who put trailing slashes in PATH elements.
5064case $as_dir/ in
5065 ./ | .// | /cC/* | \
5066 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5067 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5068 /usr/ucb/* ) ;;
5069 *)
5070 # OSF1 and SCO ODT 3.0 have their own names for install.
5071 # Don't use installbsd from OSF since it installs stuff as root
5072 # by default.
5073 for ac_prog in ginstall scoinst install; do
5074 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5075 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5076 if test $ac_prog = install &&
5077 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5078 # AIX install. It has an incompatible calling convention.
5079 :
5080 elif test $ac_prog = install &&
5081 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5082 # program-specific install script used by HP pwplus--don't use.
5083 :
5084 else
5085 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5086 break 3
5087 fi
5088 fi
ba4481b5 5089 done
c0d27fcc
MR
5090 done
5091 ;;
5092esac
5093done
ca81d7a0 5094IFS=$as_save_IFS
c0d27fcc 5095
ba4481b5
DL
5096
5097fi
5098 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5099 INSTALL=$ac_cv_path_install
ba4481b5 5100 else
ca81d7a0
JD
5101 # As a last resort, use the slow shell script. Don't cache a
5102 # value for INSTALL within a source directory, because that will
ba4481b5 5103 # break other packages using the cache if that directory is
ca81d7a0 5104 # removed, or if the value is a relative name.
503d2be0 5105 INSTALL=$ac_install_sh
ba4481b5
DL
5106 fi
5107fi
ca81d7a0
JD
5108{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5109echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5110
5111# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5112# It thinks the first close brace ends the variable substitution.
5113test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5114
503d2be0 5115test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5116
ba4481b5
DL
5117test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5118
c0d27fcc
MR
5119if test "x$RANLIB" = x; then
5120 if test -n "$ac_tool_prefix"; then
5121 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5122set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5123{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5124echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5125if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5126 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5127else
5128 if test -n "$RANLIB"; then
5129 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5130else
c0d27fcc
MR
5131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in $PATH
5133do
5134 IFS=$as_save_IFS
5135 test -z "$as_dir" && as_dir=.
5136 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5138 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5139 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5140 break 2
5141 fi
5142done
503d2be0 5143done
ca81d7a0 5144IFS=$as_save_IFS
503d2be0 5145
7397acc4
DL
5146fi
5147fi
503d2be0 5148RANLIB=$ac_cv_prog_RANLIB
7397acc4 5149if test -n "$RANLIB"; then
ca81d7a0
JD
5150 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5151echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5152else
ca81d7a0
JD
5153 { echo "$as_me:$LINENO: result: no" >&5
5154echo "${ECHO_T}no" >&6; }
503d2be0
AS
5155fi
5156
ca81d7a0 5157
503d2be0
AS
5158fi
5159if test -z "$ac_cv_prog_RANLIB"; then
5160 ac_ct_RANLIB=$RANLIB
5161 # Extract the first word of "ranlib", so it can be a program name with args.
5162set dummy ranlib; ac_word=$2
ca81d7a0
JD
5163{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5164echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5165if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5166 echo $ECHO_N "(cached) $ECHO_C" >&6
5167else
5168 if test -n "$ac_ct_RANLIB"; then
5169 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5170else
c0d27fcc
MR
5171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5172for as_dir in $PATH
5173do
5174 IFS=$as_save_IFS
5175 test -z "$as_dir" && as_dir=.
5176 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5178 ac_cv_prog_ac_ct_RANLIB="ranlib"
5179 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5180 break 2
5181 fi
5182done
503d2be0 5183done
ca81d7a0 5184IFS=$as_save_IFS
503d2be0 5185
503d2be0
AS
5186fi
5187fi
5188ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5189if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5190 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5191echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5192else
ca81d7a0
JD
5193 { echo "$as_me:$LINENO: result: no" >&5
5194echo "${ECHO_T}no" >&6; }
503d2be0
AS
5195fi
5196
ca81d7a0
JD
5197 if test "x$ac_ct_RANLIB" = x; then
5198 RANLIB=":"
5199 else
5200 case $cross_compiling:$ac_tool_warned in
5201yes:)
5202{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5203whose name does not start with the host triplet. If you think this
5204configuration is useful to you, please write to autoconf@gnu.org." >&5
5205echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5206whose name does not start with the host triplet. If you think this
5207configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5208ac_tool_warned=yes ;;
5209esac
5210 RANLIB=$ac_ct_RANLIB
5211 fi
7397acc4 5212else
503d2be0 5213 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5214fi
5215
5216fi
9e71690e
DK
5217# Extract the first word of "install-info", so it can be a program name with args.
5218set dummy install-info; ac_word=$2
ca81d7a0
JD
5219{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5220echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5221if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5222 echo $ECHO_N "(cached) $ECHO_C" >&6
5223else
5224 case $INSTALL_INFO in
5225 [\\/]* | ?:[\\/]*)
5226 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5227 ;;
5228 *)
5229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230for as_dir in $PATH
5231do
5232 IFS=$as_save_IFS
5233 test -z "$as_dir" && as_dir=.
5234 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5236 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5237 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5238 break 2
5239 fi
5240done
5241done
ca81d7a0 5242IFS=$as_save_IFS
9e71690e
DK
5243
5244 ;;
5245esac
5246fi
5247INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5248if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5249 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5250echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5251else
ca81d7a0
JD
5252 { echo "$as_me:$LINENO: result: no" >&5
5253echo "${ECHO_T}no" >&6; }
9e71690e
DK
5254fi
5255
ca81d7a0 5256
9e71690e
DK
5257# Extract the first word of "install-info", so it can be a program name with args.
5258set dummy install-info; ac_word=$2
ca81d7a0
JD
5259{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5261if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5262 echo $ECHO_N "(cached) $ECHO_C" >&6
5263else
5264 case $INSTALL_INFO in
5265 [\\/]* | ?:[\\/]*)
5266 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5267 ;;
5268 *)
5269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in /usr/sbin
5271do
5272 IFS=$as_save_IFS
5273 test -z "$as_dir" && as_dir=.
5274 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5275 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5276 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5277 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5278 break 2
5279 fi
5280done
5281done
ca81d7a0 5282IFS=$as_save_IFS
9e71690e
DK
5283
5284 ;;
5285esac
5286fi
5287INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5288if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5289 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5290echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5291else
ca81d7a0
JD
5292 { echo "$as_me:$LINENO: result: no" >&5
5293echo "${ECHO_T}no" >&6; }
9e71690e
DK
5294fi
5295
ca81d7a0 5296
9e71690e
DK
5297# Extract the first word of "install-info", so it can be a program name with args.
5298set dummy install-info; ac_word=$2
ca81d7a0
JD
5299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5301if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5302 echo $ECHO_N "(cached) $ECHO_C" >&6
5303else
5304 case $INSTALL_INFO in
5305 [\\/]* | ?:[\\/]*)
5306 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5307 ;;
5308 *)
5309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5310for as_dir in /sbin
5311do
5312 IFS=$as_save_IFS
5313 test -z "$as_dir" && as_dir=.
5314 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5315 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5316 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5318 break 2
5319 fi
5320done
5321done
ca81d7a0 5322IFS=$as_save_IFS
9e71690e
DK
5323
5324 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5325 ;;
5326esac
5327fi
5328INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5329if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5330 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5331echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5332else
ca81d7a0
JD
5333 { echo "$as_me:$LINENO: result: no" >&5
5334echo "${ECHO_T}no" >&6; }
9e71690e
DK
5335fi
5336
ca81d7a0 5337
8ae52ca6
RF
5338# Extract the first word of "gzip", so it can be a program name with args.
5339set dummy gzip; ac_word=$2
ca81d7a0
JD
5340{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5341echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5342if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5343 echo $ECHO_N "(cached) $ECHO_C" >&6
5344else
46e35e9f 5345 case $GZIP_PROG in
8ae52ca6 5346 [\\/]* | ?:[\\/]*)
46e35e9f 5347 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5348 ;;
5349 *)
5350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5351for as_dir in $PATH
5352do
5353 IFS=$as_save_IFS
5354 test -z "$as_dir" && as_dir=.
5355 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5357 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5358 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5359 break 2
5360 fi
5361done
5362done
ca81d7a0 5363IFS=$as_save_IFS
8ae52ca6
RF
5364
5365 ;;
5366esac
5367fi
46e35e9f 5368GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5369if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5370 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5371echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5372else
ca81d7a0
JD
5373 { echo "$as_me:$LINENO: result: no" >&5
5374echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5375fi
5376
ba4481b5 5377
c0d27fcc 5378
ca81d7a0 5379
1bb9a689
MB
5380## Need makeinfo >= 4.6 (?) to build the manuals.
5381# Extract the first word of "makeinfo", so it can be a program name with args.
5382set dummy makeinfo; ac_word=$2
5383{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5385if test "${ac_cv_path_MAKEINFO+set}" = set; then
5386 echo $ECHO_N "(cached) $ECHO_C" >&6
5387else
5388 case $MAKEINFO in
5389 [\\/]* | ?:[\\/]*)
5390 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5391 ;;
5392 *)
5393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5394for as_dir in $PATH
5395do
5396 IFS=$as_save_IFS
5397 test -z "$as_dir" && as_dir=.
5398 for ac_exec_ext in '' $ac_executable_extensions; do
5399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5400 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5402 break 2
5403 fi
5404done
5405done
5406IFS=$as_save_IFS
5407
5408 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5409 ;;
5410esac
5411fi
5412MAKEINFO=$ac_cv_path_MAKEINFO
5413if test -n "$MAKEINFO"; then
5414 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5415echo "${ECHO_T}$MAKEINFO" >&6; }
5416else
5417 { echo "$as_me:$LINENO: result: no" >&5
5418echo "${ECHO_T}no" >&6; }
5419fi
5420
5421
5422if test "$MAKEINFO" != "no" && \
d4840f44 5423 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
1bb9a689
MB
5424 MAKEINFO=no
5425fi
5426
5427if test "$MAKEINFO" = "no"; then
5428 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
5429echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
5430 { (exit 1); exit 1; }; }
5431fi
5432
5433
5434
8e967cf7
MR
5435if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5436then
5437 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5438fi
5439
5440if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5441then
5442 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5443fi
5444
c0d27fcc 5445
fe239f0f 5446late_LDFLAGS=$LDFLAGS
4af002d6 5447if test "$GCC" = yes; then
fe239f0f
AS
5448 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5449else
5450 LDFLAGS="$LDFLAGS -znocombreloc"
5451fi
5452
ca81d7a0
JD
5453{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5454echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5455cat >conftest.$ac_ext <<_ACEOF
5456main(){return 0;}
5457_ACEOF
5458rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5459if { (ac_try="$ac_link"
5460case "(($ac_try" in
5461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5462 *) ac_try_echo=$ac_try;;
5463esac
5464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5465 (eval "$ac_link") 2>conftest.er1
fe239f0f 5466 ac_status=$?
edfaf76d
LK
5467 grep -v '^ *+' conftest.er1 >conftest.err
5468 rm -f conftest.er1
5469 cat conftest.err >&5
fe239f0f 5470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5471 (exit $ac_status); } && {
5472 test -z "$ac_c_werror_flag" ||
5473 test ! -s conftest.err
5474 } && test -s conftest$ac_exeext &&
5475 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5476 { echo "$as_me:$LINENO: result: yes" >&5
5477echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5478else
5479 echo "$as_me: failed program was:" >&5
5480sed 's/^/| /' conftest.$ac_ext >&5
5481
ca81d7a0
JD
5482 LDFLAGS=$late_LDFLAGS
5483 { echo "$as_me:$LINENO: result: no" >&5
5484echo "${ECHO_T}no" >&6; }
fe239f0f 5485fi
ca81d7a0 5486
f053c89f 5487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5488 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5489
3b33a005
DL
5490#### Extract some information from the operating system and machine files.
5491
c0d27fcc 5492{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5493 - which libraries the lib-src programs will want, and
503d2be0
AS
5494 - whether the GNU malloc routines are usable..." >&5
5495echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5496 - which libraries the lib-src programs will want, and
503d2be0 5497 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5498
5499### First figure out CFLAGS (which we use for running the compiler here)
5500### and REAL_CFLAGS (which we use for real compilation).
5501### The two are the same except on a few systems, where they are made
5502### different to work around various lossages. For example,
5503### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5504### as implying static linking.
5505
5506### If the CFLAGS env var is specified, we use that value
5507### instead of the default.
5508
5509### It's not important that this name contain the PID; you can't run
5510### two configures in the same directory and have anything work
5511### anyway.
5512tempcname="conftest.c"
5513
5514echo '
5515#include "'${srcdir}'/src/'${opsysfile}'"
5516#include "'${srcdir}'/src/'${machfile}'"
5517#ifndef LIBS_MACHINE
5518#define LIBS_MACHINE
5519#endif
5520#ifndef LIBS_SYSTEM
5521#define LIBS_SYSTEM
5522#endif
5523#ifndef C_SWITCH_SYSTEM
5524#define C_SWITCH_SYSTEM
5525#endif
5526#ifndef C_SWITCH_MACHINE
5527#define C_SWITCH_MACHINE
5528#endif
5529configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5530configure___ c_switch_system=C_SWITCH_SYSTEM
5531configure___ c_switch_machine=C_SWITCH_MACHINE
5532
5533#ifndef LIB_X11_LIB
5534#define LIB_X11_LIB -lX11
5535#endif
5536
5537#ifndef LIBX11_MACHINE
5538#define LIBX11_MACHINE
5539#endif
5540
5541#ifndef LIBX11_SYSTEM
5542#define LIBX11_SYSTEM
5543#endif
5544configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5545
5546#ifdef UNEXEC
5547configure___ unexec=UNEXEC
5548#else
5549configure___ unexec=unexec.o
5550#endif
5551
5552#ifdef SYSTEM_MALLOC
5553configure___ system_malloc=yes
5554#else
5555configure___ system_malloc=no
5556#endif
5557
ef9e4345
GM
5558#ifdef USE_MMAP_FOR_BUFFERS
5559configure___ use_mmap_for_buffers=yes
73b77ee5 5560#else
ef9e4345 5561configure___ use_mmap_for_buffers=no
73b77ee5
GM
5562#endif
5563
3b33a005
DL
5564#ifndef C_DEBUG_SWITCH
5565#define C_DEBUG_SWITCH -g
5566#endif
5567
5568#ifndef C_OPTIMIZE_SWITCH
5569#ifdef __GNUC__
5570#define C_OPTIMIZE_SWITCH -O2
5571#else
5572#define C_OPTIMIZE_SWITCH -O
5573#endif
5574#endif
5575
01abe918
CY
5576#ifndef C_WARNINGS_SWITCH
5577#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5578#endif
5579
3b33a005
DL
5580#ifndef LD_SWITCH_MACHINE
5581#define LD_SWITCH_MACHINE
5582#endif
5583
5584#ifndef LD_SWITCH_SYSTEM
5585#define LD_SWITCH_SYSTEM
5586#endif
5587
5588#ifndef LD_SWITCH_X_SITE_AUX
5589#define LD_SWITCH_X_SITE_AUX
503d2be0 5590#endif
3b33a005
DL
5591
5592configure___ ld_switch_system=LD_SWITCH_SYSTEM
5593configure___ ld_switch_machine=LD_SWITCH_MACHINE
5594
5595#ifdef THIS_IS_CONFIGURE
5596
5597/* Get the CFLAGS for tests in configure. */
5598#ifdef __GNUC__
5599configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5600#else
5601configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5602#endif
5603
5604#else /* not THIS_IS_CONFIGURE */
5605
5606/* Get the CFLAGS for real compilation. */
5607#ifdef __GNUC__
01abe918 5608configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5609#else
5610configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5611#endif
5612
5613#endif /* not THIS_IS_CONFIGURE */
5614' > ${tempcname}
5615
5616# The value of CPP is a quoted variable reference, so we need to do this
5617# to get its actual value...
5618CPP=`eval "echo $CPP"`
5619eval `${CPP} -Isrc ${tempcname} \
5620 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5621if test "x$SPECIFIED_CFLAGS" = x; then
5622 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5623 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5624else
5625 REAL_CFLAGS="$CFLAGS"
5626fi
5627rm ${tempcname}
5628
5629ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5630
5631### Make sure subsequent tests use flags consistent with the build flags.
5632
5633if test x"${OVERRIDE_CPPFLAGS}" != x; then
5634 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5635else
5636 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5637fi
5638
6bae0ccf
DL
5639
5640
ca81d7a0 5641# Check whether --enable-largefile was given.
f4988be7 5642if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5643 enableval=$enable_largefile;
5644fi
f4988be7 5645
503d2be0 5646if test "$enable_largefile" != no; then
f4988be7 5647
ca81d7a0
JD
5648 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5649echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5650if test "${ac_cv_sys_largefile_CC+set}" = set; then
5651 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5652else
f4988be7 5653 ac_cv_sys_largefile_CC=no
503d2be0
AS
5654 if test "$GCC" != yes; then
5655 ac_save_CC=$CC
5656 while :; do
ca81d7a0
JD
5657 # IRIX 6.2 and later do not support large files by default,
5658 # so use the C compiler's -n32 option if that helps.
edfaf76d 5659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
f4988be7 5665#include <sys/types.h>
503d2be0
AS
5666 /* Check that off_t can represent 2**63 - 1 correctly.
5667 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5668 since some C++ compilers masquerading as C compilers
5669 incorrectly reject 9223372036854775807. */
5670#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5671 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5672 && LARGE_OFF_T % 2147483647 == 1)
5673 ? 1 : -1];
5674int
5675main ()
5676{
f4988be7 5677
503d2be0
AS
5678 ;
5679 return 0;
5680}
5681_ACEOF
ca81d7a0
JD
5682 rm -f conftest.$ac_objext
5683if { (ac_try="$ac_compile"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
5688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5689 (eval "$ac_compile") 2>conftest.er1
503d2be0 5690 ac_status=$?
edfaf76d
LK
5691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
c0d27fcc 5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest.$ac_objext; then
503d2be0 5699 break
b192d653 5700else
503d2be0 5701 echo "$as_me: failed program was:" >&5
19650fd6
AS
5702sed 's/^/| /' conftest.$ac_ext >&5
5703
ca81d7a0 5704
503d2be0 5705fi
ca81d7a0
JD
5706
5707rm -f core conftest.err conftest.$ac_objext
5708 CC="$CC -n32"
5709 rm -f conftest.$ac_objext
5710if { (ac_try="$ac_compile"
5711case "(($ac_try" in
5712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5713 *) ac_try_echo=$ac_try;;
5714esac
5715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5716 (eval "$ac_compile") 2>conftest.er1
503d2be0 5717 ac_status=$?
edfaf76d
LK
5718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
c0d27fcc 5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5722 (exit $ac_status); } && {
5723 test -z "$ac_c_werror_flag" ||
5724 test ! -s conftest.err
5725 } && test -s conftest.$ac_objext; then
503d2be0
AS
5726 ac_cv_sys_largefile_CC=' -n32'; break
5727else
5728 echo "$as_me: failed program was:" >&5
19650fd6
AS
5729sed 's/^/| /' conftest.$ac_ext >&5
5730
ca81d7a0 5731
503d2be0 5732fi
ca81d7a0
JD
5733
5734rm -f core conftest.err conftest.$ac_objext
edfaf76d 5735 break
503d2be0
AS
5736 done
5737 CC=$ac_save_CC
5738 rm -f conftest.$ac_ext
5739 fi
b192d653 5740fi
ca81d7a0
JD
5741{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5742echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5743 if test "$ac_cv_sys_largefile_CC" != no; then
5744 CC=$CC$ac_cv_sys_largefile_CC
5745 fi
b192d653 5746
ca81d7a0
JD
5747 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5748echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5749if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5750 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5751else
503d2be0 5752 while :; do
503d2be0 5753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5754/* confdefs.h. */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h. */
f4988be7 5759#include <sys/types.h>
503d2be0
AS
5760 /* Check that off_t can represent 2**63 - 1 correctly.
5761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5762 since some C++ compilers masquerading as C compilers
5763 incorrectly reject 9223372036854775807. */
5764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5766 && LARGE_OFF_T % 2147483647 == 1)
5767 ? 1 : -1];
5768int
5769main ()
5770{
f4988be7 5771
503d2be0
AS
5772 ;
5773 return 0;
5774}
5775_ACEOF
5776rm -f conftest.$ac_objext
ca81d7a0
JD
5777if { (ac_try="$ac_compile"
5778case "(($ac_try" in
5779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5780 *) ac_try_echo=$ac_try;;
5781esac
5782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5783 (eval "$ac_compile") 2>conftest.er1
503d2be0 5784 ac_status=$?
edfaf76d
LK
5785 grep -v '^ *+' conftest.er1 >conftest.err
5786 rm -f conftest.er1
5787 cat conftest.err >&5
c0d27fcc 5788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5789 (exit $ac_status); } && {
5790 test -z "$ac_c_werror_flag" ||
5791 test ! -s conftest.err
5792 } && test -s conftest.$ac_objext; then
5793 ac_cv_sys_file_offset_bits=no; break
f4988be7 5794else
503d2be0 5795 echo "$as_me: failed program was:" >&5
19650fd6
AS
5796sed 's/^/| /' conftest.$ac_ext >&5
5797
ca81d7a0 5798
503d2be0 5799fi
ca81d7a0
JD
5800
5801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
f4988be7
GM
5808#define _FILE_OFFSET_BITS 64
5809#include <sys/types.h>
503d2be0
AS
5810 /* Check that off_t can represent 2**63 - 1 correctly.
5811 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5812 since some C++ compilers masquerading as C compilers
5813 incorrectly reject 9223372036854775807. */
5814#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5815 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5816 && LARGE_OFF_T % 2147483647 == 1)
5817 ? 1 : -1];
5818int
5819main ()
5820{
5821
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
ca81d7a0
JD
5827if { (ac_try="$ac_compile"
5828case "(($ac_try" in
5829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830 *) ac_try_echo=$ac_try;;
5831esac
5832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5833 (eval "$ac_compile") 2>conftest.er1
503d2be0 5834 ac_status=$?
edfaf76d
LK
5835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
c0d27fcc 5838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5839 (exit $ac_status); } && {
5840 test -z "$ac_c_werror_flag" ||
5841 test ! -s conftest.err
5842 } && test -s conftest.$ac_objext; then
503d2be0
AS
5843 ac_cv_sys_file_offset_bits=64; break
5844else
5845 echo "$as_me: failed program was:" >&5
19650fd6
AS
5846sed 's/^/| /' conftest.$ac_ext >&5
5847
ca81d7a0 5848
503d2be0 5849fi
ca81d7a0
JD
5850
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5852 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5853 break
5854done
ba4481b5 5855fi
ca81d7a0
JD
5856{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5857echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5858case $ac_cv_sys_file_offset_bits in #(
5859 no | unknown) ;;
5860 *)
c0d27fcc 5861cat >>confdefs.h <<_ACEOF
f4988be7 5862#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5863_ACEOF
f053c89f
CY
5864;;
5865esac
503d2be0 5866rm -f conftest*
f053c89f
CY
5867 if test $ac_cv_sys_file_offset_bits = unknown; then
5868 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5869echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5870if test "${ac_cv_sys_large_files+set}" = set; then
5871 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5872else
503d2be0 5873 while :; do
503d2be0 5874 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5875/* confdefs.h. */
5876_ACEOF
5877cat confdefs.h >>conftest.$ac_ext
5878cat >>conftest.$ac_ext <<_ACEOF
5879/* end confdefs.h. */
503d2be0
AS
5880#include <sys/types.h>
5881 /* Check that off_t can represent 2**63 - 1 correctly.
5882 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5883 since some C++ compilers masquerading as C compilers
5884 incorrectly reject 9223372036854775807. */
5885#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5886 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5887 && LARGE_OFF_T % 2147483647 == 1)
5888 ? 1 : -1];
5889int
5890main ()
5891{
ba4481b5 5892
503d2be0
AS
5893 ;
5894 return 0;
5895}
5896_ACEOF
5897rm -f conftest.$ac_objext
ca81d7a0
JD
5898if { (ac_try="$ac_compile"
5899case "(($ac_try" in
5900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5901 *) ac_try_echo=$ac_try;;
5902esac
5903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5904 (eval "$ac_compile") 2>conftest.er1
503d2be0 5905 ac_status=$?
edfaf76d
LK
5906 grep -v '^ *+' conftest.er1 >conftest.err
5907 rm -f conftest.er1
5908 cat conftest.err >&5
c0d27fcc 5909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5910 (exit $ac_status); } && {
5911 test -z "$ac_c_werror_flag" ||
5912 test ! -s conftest.err
5913 } && test -s conftest.$ac_objext; then
5914 ac_cv_sys_large_files=no; break
ba4481b5 5915else
503d2be0 5916 echo "$as_me: failed program was:" >&5
19650fd6
AS
5917sed 's/^/| /' conftest.$ac_ext >&5
5918
ca81d7a0 5919
503d2be0 5920fi
ca81d7a0
JD
5921
5922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5923 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5924/* confdefs.h. */
5925_ACEOF
5926cat confdefs.h >>conftest.$ac_ext
5927cat >>conftest.$ac_ext <<_ACEOF
5928/* end confdefs.h. */
f4988be7 5929#define _LARGE_FILES 1
503d2be0
AS
5930#include <sys/types.h>
5931 /* Check that off_t can represent 2**63 - 1 correctly.
5932 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5933 since some C++ compilers masquerading as C compilers
5934 incorrectly reject 9223372036854775807. */
5935#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5936 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5937 && LARGE_OFF_T % 2147483647 == 1)
5938 ? 1 : -1];
5939int
5940main ()
5941{
f4988be7 5942
503d2be0
AS
5943 ;
5944 return 0;
5945}
5946_ACEOF
5947rm -f conftest.$ac_objext
ca81d7a0
JD
5948if { (ac_try="$ac_compile"
5949case "(($ac_try" in
5950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5951 *) ac_try_echo=$ac_try;;
5952esac
5953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5954 (eval "$ac_compile") 2>conftest.er1
503d2be0 5955 ac_status=$?
edfaf76d
LK
5956 grep -v '^ *+' conftest.er1 >conftest.err
5957 rm -f conftest.er1
5958 cat conftest.err >&5
c0d27fcc 5959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5960 (exit $ac_status); } && {
5961 test -z "$ac_c_werror_flag" ||
5962 test ! -s conftest.err
5963 } && test -s conftest.$ac_objext; then
503d2be0
AS
5964 ac_cv_sys_large_files=1; break
5965else
5966 echo "$as_me: failed program was:" >&5
19650fd6
AS
5967sed 's/^/| /' conftest.$ac_ext >&5
5968
ca81d7a0 5969
503d2be0 5970fi
ca81d7a0
JD
5971
5972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5973 ac_cv_sys_large_files=unknown
503d2be0
AS
5974 break
5975done
ba4481b5 5976fi
ca81d7a0
JD
5977{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5978echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5979case $ac_cv_sys_large_files in #(
5980 no | unknown) ;;
5981 *)
c0d27fcc 5982cat >>confdefs.h <<_ACEOF
f4988be7 5983#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5984_ACEOF
f053c89f
CY
5985;;
5986esac
503d2be0 5987rm -f conftest*
f053c89f 5988 fi
503d2be0 5989fi
ba4481b5 5990
c0d27fcc 5991
439f58ee 5992
bc5d9888
CY
5993### The standard library on x86-64 GNU/Linux distributions can
5994### be located in either /usr/lib64 or /usr/lib.
5995case "${canonical}" in
5996 x86_64-*-linux-gnu* )
5997 if test -d /usr/lib64; then
5998
5999cat >>confdefs.h <<\_ACEOF
6000#define HAVE_X86_64_LIB64_DIR 1
6001_ACEOF
6002
6003fi
6004esac
6005
439f58ee
JD
6006
6007
6008
2c9dccc9
PJ
6009if test "${with_sound}" != "no"; then
6010 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
6011 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6012echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
6013if test "${ac_cv_header_stdc+set}" = set; then
6014 echo $ECHO_N "(cached) $ECHO_C" >&6
6015else
6016 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6017/* confdefs.h. */
6018_ACEOF
6019cat confdefs.h >>conftest.$ac_ext
6020cat >>conftest.$ac_ext <<_ACEOF
6021/* end confdefs.h. */
c0d27fcc
MR
6022#include <stdlib.h>
6023#include <stdarg.h>
6024#include <string.h>
6025#include <float.h>
98418dba 6026
19650fd6
AS
6027int
6028main ()
6029{
6030
6031 ;
6032 return 0;
6033}
c0d27fcc 6034_ACEOF
19650fd6 6035rm -f conftest.$ac_objext
ca81d7a0
JD
6036if { (ac_try="$ac_compile"
6037case "(($ac_try" in
6038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6039 *) ac_try_echo=$ac_try;;
6040esac
6041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6042 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6043 ac_status=$?
edfaf76d
LK
6044 grep -v '^ *+' conftest.er1 >conftest.err
6045 rm -f conftest.er1
6046 cat conftest.err >&5
cd958eb3 6047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6048 (exit $ac_status); } && {
6049 test -z "$ac_c_werror_flag" ||
6050 test ! -s conftest.err
6051 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6052 ac_cv_header_stdc=yes
6053else
6054 echo "$as_me: failed program was:" >&5
19650fd6
AS
6055sed 's/^/| /' conftest.$ac_ext >&5
6056
ca81d7a0 6057 ac_cv_header_stdc=no
c0d27fcc 6058fi
ca81d7a0
JD
6059
6060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
6061
6062if test $ac_cv_header_stdc = yes; then
6063 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
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#include <string.h>
6071
6072_ACEOF
6073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6074 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
6075 :
6076else
6077 ac_cv_header_stdc=no
6078fi
6079rm -f conftest*
6080
6081fi
6082
6083if test $ac_cv_header_stdc = yes; then
6084 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6085 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
c0d27fcc
MR
6091#include <stdlib.h>
6092
6093_ACEOF
6094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6095 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
6096 :
6097else
6098 ac_cv_header_stdc=no
6099fi
6100rm -f conftest*
6101
6102fi
6103
6104if test $ac_cv_header_stdc = yes; then
6105 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6106 if test "$cross_compiling" = yes; then
6107 :
6108else
6109 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6110/* confdefs.h. */
6111_ACEOF
6112cat confdefs.h >>conftest.$ac_ext
6113cat >>conftest.$ac_ext <<_ACEOF
6114/* end confdefs.h. */
c0d27fcc 6115#include <ctype.h>
ca81d7a0 6116#include <stdlib.h>
c0d27fcc
MR
6117#if ((' ' & 0x0FF) == 0x020)
6118# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6119# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6120#else
19650fd6 6121# define ISLOWER(c) \
edfaf76d
LK
6122 (('a' <= (c) && (c) <= 'i') \
6123 || ('j' <= (c) && (c) <= 'r') \
6124 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6125# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6126#endif
6127
6128#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6129int
6130main ()
6131{
6132 int i;
6133 for (i = 0; i < 256; i++)
6134 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6135 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6136 return 2;
6137 return 0;
c0d27fcc
MR
6138}
6139_ACEOF
6140rm -f conftest$ac_exeext
ca81d7a0
JD
6141if { (ac_try="$ac_link"
6142case "(($ac_try" in
6143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6144 *) ac_try_echo=$ac_try;;
6145esac
6146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6147 (eval "$ac_link") 2>&5
c0d27fcc
MR
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6151 { (case "(($ac_try" in
6152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6153 *) ac_try_echo=$ac_try;;
6154esac
6155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6156 (eval "$ac_try") 2>&5
c0d27fcc
MR
6157 ac_status=$?
6158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159 (exit $ac_status); }; }; then
6160 :
6161else
6162 echo "$as_me: program exited with status $ac_status" >&5
6163echo "$as_me: failed program was:" >&5
19650fd6
AS
6164sed 's/^/| /' conftest.$ac_ext >&5
6165
c0d27fcc
MR
6166( exit $ac_status )
6167ac_cv_header_stdc=no
6168fi
ca81d7a0 6169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6170fi
ca81d7a0
JD
6171
6172
c0d27fcc
MR
6173fi
6174fi
ca81d7a0
JD
6175{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6176echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6177if test $ac_cv_header_stdc = yes; then
6178
6179cat >>confdefs.h <<\_ACEOF
6180#define STDC_HEADERS 1
6181_ACEOF
6182
6183fi
6184
6185# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6196 inttypes.h stdint.h unistd.h
98418dba
CW
6197do
6198as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6199{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6200echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6201if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6202 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6203else
925c2f3f 6204 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6205/* confdefs.h. */
6206_ACEOF
6207cat confdefs.h >>conftest.$ac_ext
6208cat >>conftest.$ac_ext <<_ACEOF
6209/* end confdefs.h. */
c0d27fcc
MR
6210$ac_includes_default
6211
6212#include <$ac_header>
6213_ACEOF
6214rm -f conftest.$ac_objext
ca81d7a0
JD
6215if { (ac_try="$ac_compile"
6216case "(($ac_try" in
6217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6218 *) ac_try_echo=$ac_try;;
6219esac
6220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6221 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6222 ac_status=$?
edfaf76d
LK
6223 grep -v '^ *+' conftest.er1 >conftest.err
6224 rm -f conftest.er1
6225 cat conftest.err >&5
c0d27fcc 6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6227 (exit $ac_status); } && {
6228 test -z "$ac_c_werror_flag" ||
6229 test ! -s conftest.err
6230 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6231 eval "$as_ac_Header=yes"
6232else
6233 echo "$as_me: failed program was:" >&5
19650fd6
AS
6234sed 's/^/| /' conftest.$ac_ext >&5
6235
ca81d7a0 6236 eval "$as_ac_Header=no"
c0d27fcc 6237fi
ca81d7a0
JD
6238
6239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6240fi
ca81d7a0
JD
6241ac_res=`eval echo '${'$as_ac_Header'}'`
6242 { echo "$as_me:$LINENO: result: $ac_res" >&5
6243echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6244if test `eval echo '${'$as_ac_Header'}'` = yes; then
6245 cat >>confdefs.h <<_ACEOF
6246#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6247_ACEOF
6248
6249fi
6250
6251done
6252
6253
6254
6255
6256
6257for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6258do
6259as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6260if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6261 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6263if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6264 echo $ECHO_N "(cached) $ECHO_C" >&6
6265fi
ca81d7a0
JD
6266ac_res=`eval echo '${'$as_ac_Header'}'`
6267 { echo "$as_me:$LINENO: result: $ac_res" >&5
6268echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6269else
6270 # Is the header compilable?
ca81d7a0
JD
6271{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6272echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6273cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6274/* confdefs.h. */
6275_ACEOF
6276cat confdefs.h >>conftest.$ac_ext
6277cat >>conftest.$ac_ext <<_ACEOF
6278/* end confdefs.h. */
c0d27fcc 6279$ac_includes_default
98418dba 6280#include <$ac_header>
503d2be0 6281_ACEOF
c0d27fcc 6282rm -f conftest.$ac_objext
ca81d7a0
JD
6283if { (ac_try="$ac_compile"
6284case "(($ac_try" in
6285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6286 *) ac_try_echo=$ac_try;;
6287esac
6288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6289 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6290 ac_status=$?
edfaf76d
LK
6291 grep -v '^ *+' conftest.er1 >conftest.err
6292 rm -f conftest.er1
6293 cat conftest.err >&5
c0d27fcc 6294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6295 (exit $ac_status); } && {
6296 test -z "$ac_c_werror_flag" ||
6297 test ! -s conftest.err
6298 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6299 ac_header_compiler=yes
6300else
6301 echo "$as_me: failed program was:" >&5
19650fd6
AS
6302sed 's/^/| /' conftest.$ac_ext >&5
6303
ca81d7a0 6304 ac_header_compiler=no
c0d27fcc 6305fi
ca81d7a0
JD
6306
6307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6308{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6309echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6310
6311# Is the header present?
ca81d7a0
JD
6312{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6313echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6314cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6315/* confdefs.h. */
6316_ACEOF
6317cat confdefs.h >>conftest.$ac_ext
6318cat >>conftest.$ac_ext <<_ACEOF
6319/* end confdefs.h. */
c0d27fcc
MR
6320#include <$ac_header>
6321_ACEOF
ca81d7a0
JD
6322if { (ac_try="$ac_cpp conftest.$ac_ext"
6323case "(($ac_try" in
6324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6325 *) ac_try_echo=$ac_try;;
6326esac
6327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6328 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6329 ac_status=$?
6bae0ccf 6330 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6331 rm -f conftest.er1
6332 cat conftest.err >&5
c0d27fcc 6333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6334 (exit $ac_status); } >/dev/null && {
6335 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6336 test ! -s conftest.err
6337 }; then
c0d27fcc 6338 ac_header_preproc=yes
f4988be7 6339else
503d2be0 6340 echo "$as_me: failed program was:" >&5
19650fd6
AS
6341sed 's/^/| /' conftest.$ac_ext >&5
6342
c0d27fcc 6343 ac_header_preproc=no
f4988be7 6344fi
ca81d7a0 6345
98418dba 6346rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6347{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6348echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6349
6350# So? What about this header?
edfaf76d
LK
6351case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6352 yes:no: )
c0d27fcc
MR
6353 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6354echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6355 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6356echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6357 ac_header_preproc=yes
19650fd6 6358 ;;
edfaf76d 6359 no:yes:* )
c0d27fcc
MR
6360 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6361echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6362 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6363echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6364 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6365echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6366 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6367echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6368 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6369echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6370 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6371echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6372
19650fd6 6373 ;;
c0d27fcc 6374esac
ca81d7a0
JD
6375{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6377if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6378 echo $ECHO_N "(cached) $ECHO_C" >&6
6379else
edfaf76d 6380 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6381fi
ca81d7a0
JD
6382ac_res=`eval echo '${'$as_ac_Header'}'`
6383 { echo "$as_me:$LINENO: result: $ac_res" >&5
6384echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6385
6386fi
98418dba 6387if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6388 cat >>confdefs.h <<_ACEOF
98418dba 6389#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6390_ACEOF
f4988be7
GM
6391
6392fi
c0d27fcc 6393
98418dba
CW
6394done
6395
6396 # Emulation library used on NetBSD.
ca81d7a0
JD
6397 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6398echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6399if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6400 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6401else
98418dba
CW
6402 ac_check_lib_save_LIBS=$LIBS
6403LIBS="-lossaudio $LIBS"
6404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6405/* confdefs.h. */
6406_ACEOF
6407cat confdefs.h >>conftest.$ac_ext
6408cat >>conftest.$ac_ext <<_ACEOF
6409/* end confdefs.h. */
98418dba 6410
ca81d7a0
JD
6411/* Override any GCC internal prototype to avoid an error.
6412 Use char because int might match the return type of a GCC
6413 builtin and then its argument prototype would still apply. */
98418dba
CW
6414#ifdef __cplusplus
6415extern "C"
f4988be7 6416#endif
98418dba 6417char _oss_ioctl ();
503d2be0
AS
6418int
6419main ()
6420{
ca81d7a0 6421return _oss_ioctl ();
503d2be0
AS
6422 ;
6423 return 0;
6424}
6425_ACEOF
98418dba 6426rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6427if { (ac_try="$ac_link"
6428case "(($ac_try" in
6429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6430 *) ac_try_echo=$ac_try;;
6431esac
6432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6433 (eval "$ac_link") 2>conftest.er1
503d2be0 6434 ac_status=$?
edfaf76d
LK
6435 grep -v '^ *+' conftest.er1 >conftest.err
6436 rm -f conftest.er1
6437 cat conftest.err >&5
c0d27fcc 6438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6439 (exit $ac_status); } && {
6440 test -z "$ac_c_werror_flag" ||
6441 test ! -s conftest.err
6442 } && test -s conftest$ac_exeext &&
6443 $as_test_x conftest$ac_exeext; then
98418dba 6444 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6445else
503d2be0 6446 echo "$as_me: failed program was:" >&5
19650fd6
AS
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
ca81d7a0 6449 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6450fi
ca81d7a0 6451
f053c89f 6452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6453 conftest$ac_exeext conftest.$ac_ext
98418dba 6454LIBS=$ac_check_lib_save_LIBS
f4988be7 6455fi
ca81d7a0
JD
6456{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6457echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6458if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6459 LIBSOUND=-lossaudio
6460else
6461 LIBSOUND=
6462fi
6463
c0d27fcc 6464
439f58ee
JD
6465
6466 ALSA_REQUIRED=1.0.0
6467 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6468 if test "X${with_pkg_config_prog}" != X; then
6469 PKG_CONFIG="${with_pkg_config_prog}"
6470 fi
6471
6472 succeeded=no
6473
6474 if test -z "$PKG_CONFIG"; then
6475 # Extract the first word of "pkg-config", so it can be a program name with args.
6476set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6477{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6479if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6480 echo $ECHO_N "(cached) $ECHO_C" >&6
6481else
6482 case $PKG_CONFIG in
6483 [\\/]* | ?:[\\/]*)
6484 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6485 ;;
6486 *)
6487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490 IFS=$as_save_IFS
6491 test -z "$as_dir" && as_dir=.
6492 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6493 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6494 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6496 break 2
6497 fi
6498done
6499done
ca81d7a0 6500IFS=$as_save_IFS
439f58ee
JD
6501
6502 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6503 ;;
6504esac
6505fi
6506PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6507if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6508 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6509echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6510else
ca81d7a0
JD
6511 { echo "$as_me:$LINENO: result: no" >&5
6512echo "${ECHO_T}no" >&6; }
439f58ee
JD
6513fi
6514
ca81d7a0 6515
439f58ee
JD
6516 fi
6517
6518 if test "$PKG_CONFIG" = "no" ; then
6519 HAVE_ALSA=no
6520 else
6521 PKG_CONFIG_MIN_VERSION=0.9.0
6522 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6523 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6524echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6525
67db6aa2 6526 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6527 { echo "$as_me:$LINENO: result: yes" >&5
6528echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6529 succeeded=yes
6530
ca81d7a0
JD
6531 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6532echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6533 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6534 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6535echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6536
ca81d7a0
JD
6537 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6538echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6539 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6540 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6541echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6542 else
ca81d7a0
JD
6543 { echo "$as_me:$LINENO: result: no" >&5
6544echo "${ECHO_T}no" >&6; }
439f58ee
JD
6545 ALSA_CFLAGS=""
6546 ALSA_LIBS=""
6547 ## If we have a custom action on failure, don't print errors, but
6548 ## do set a variable so people can do so.
6549 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6550
6551 fi
6552
6553
6554
6555 else
6556 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6557 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6558 fi
6559 fi
6560
6561 if test $succeeded = yes; then
6562 HAVE_ALSA=yes
6563 else
6564 HAVE_ALSA=no
6565 fi
6566
6567 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6568 SAVE_CFLAGS="$CFLAGS"
6569 SAVE_LDFLAGS="$LDFLAGS"
6570 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6571 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6572 cat >conftest.$ac_ext <<_ACEOF
6573/* confdefs.h. */
6574_ACEOF
6575cat confdefs.h >>conftest.$ac_ext
6576cat >>conftest.$ac_ext <<_ACEOF
6577/* end confdefs.h. */
6578#include <asoundlib.h>
6579int
6580main ()
6581{
6582snd_lib_error_set_handler (0);
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587rm -f conftest.$ac_objext
6588if { (ac_try="$ac_compile"
6589case "(($ac_try" in
6590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6591 *) ac_try_echo=$ac_try;;
6592esac
6593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6594 (eval "$ac_compile") 2>conftest.er1
6595 ac_status=$?
6596 grep -v '^ *+' conftest.er1 >conftest.err
6597 rm -f conftest.er1
6598 cat conftest.err >&5
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6600 (exit $ac_status); } && {
6601 test -z "$ac_c_werror_flag" ||
6602 test ! -s conftest.err
6603 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6604 emacs_alsa_normal=yes
6605else
6606 echo "$as_me: failed program was:" >&5
6607sed 's/^/| /' conftest.$ac_ext >&5
6608
6609 emacs_alsa_normal=no
6610fi
6611
6612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613 if test "$emacs_alsa_normal" != yes; then
6614 cat >conftest.$ac_ext <<_ACEOF
6615/* confdefs.h. */
6616_ACEOF
6617cat confdefs.h >>conftest.$ac_ext
6618cat >>conftest.$ac_ext <<_ACEOF
6619/* end confdefs.h. */
6620#include <alsa/asoundlib.h>
6621int
6622main ()
6623{
6624snd_lib_error_set_handler (0);
6625 ;
6626 return 0;
6627}
6628_ACEOF
6629rm -f conftest.$ac_objext
6630if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
6637 ac_status=$?
6638 grep -v '^ *+' conftest.er1 >conftest.err
6639 rm -f conftest.er1
6640 cat conftest.err >&5
6641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6642 (exit $ac_status); } && {
6643 test -z "$ac_c_werror_flag" ||
6644 test ! -s conftest.err
6645 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6646 emacs_alsa_subdir=yes
6647else
6648 echo "$as_me: failed program was:" >&5
6649sed 's/^/| /' conftest.$ac_ext >&5
6650
6651 emacs_alsa_subdir=no
6652fi
6653
6654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6655 if test "$emacs_alsa_subdir" != yes; then
6656 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6657echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6658 { (exit 1); exit 1; }; }
6659 fi
6660 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6661 fi
6662
6663 CFLAGS="$SAVE_CFLAGS"
6664 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6665 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6666 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6667
6668cat >>confdefs.h <<\_ACEOF
6669#define HAVE_ALSA 1
6670_ACEOF
6671
6672 fi
6673
f4988be7 6674fi
c0d27fcc
MR
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
22044edf
DL
6693
6694
973a76b1 6695
cffcede7 6696
551ffc27 6697
226e2359 6698
c0d27fcc 6699
f4988be7 6700
98418dba
CW
6701for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6702 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6703 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6704 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6705 sys/utsname.h pwd.h
98418dba
CW
6706do
6707as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6708if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6709 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6710echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6711if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6712 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6713fi
ca81d7a0
JD
6714ac_res=`eval echo '${'$as_ac_Header'}'`
6715 { echo "$as_me:$LINENO: result: $ac_res" >&5
6716echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6717else
c0d27fcc 6718 # Is the header compilable?
ca81d7a0
JD
6719{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6720echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6721cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6722/* confdefs.h. */
6723_ACEOF
6724cat confdefs.h >>conftest.$ac_ext
6725cat >>conftest.$ac_ext <<_ACEOF
6726/* end confdefs.h. */
c0d27fcc
MR
6727$ac_includes_default
6728#include <$ac_header>
6729_ACEOF
6730rm -f conftest.$ac_objext
ca81d7a0
JD
6731if { (ac_try="$ac_compile"
6732case "(($ac_try" in
6733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6734 *) ac_try_echo=$ac_try;;
6735esac
6736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6737 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6738 ac_status=$?
edfaf76d
LK
6739 grep -v '^ *+' conftest.er1 >conftest.err
6740 rm -f conftest.er1
6741 cat conftest.err >&5
c0d27fcc 6742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6743 (exit $ac_status); } && {
6744 test -z "$ac_c_werror_flag" ||
6745 test ! -s conftest.err
6746 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6747 ac_header_compiler=yes
6748else
6749 echo "$as_me: failed program was:" >&5
19650fd6
AS
6750sed 's/^/| /' conftest.$ac_ext >&5
6751
ca81d7a0 6752 ac_header_compiler=no
c0d27fcc 6753fi
ca81d7a0
JD
6754
6755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6756{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6757echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6758
6759# Is the header present?
ca81d7a0
JD
6760{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6761echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6762cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6763/* confdefs.h. */
6764_ACEOF
6765cat confdefs.h >>conftest.$ac_ext
6766cat >>conftest.$ac_ext <<_ACEOF
6767/* end confdefs.h. */
98418dba 6768#include <$ac_header>
503d2be0 6769_ACEOF
ca81d7a0
JD
6770if { (ac_try="$ac_cpp conftest.$ac_ext"
6771case "(($ac_try" in
6772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6773 *) ac_try_echo=$ac_try;;
6774esac
6775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6776 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6777 ac_status=$?
6bae0ccf 6778 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6779 rm -f conftest.er1
6780 cat conftest.err >&5
c0d27fcc 6781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6782 (exit $ac_status); } >/dev/null && {
6783 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6784 test ! -s conftest.err
6785 }; then
c0d27fcc 6786 ac_header_preproc=yes
34ec9ebe 6787else
503d2be0 6788 echo "$as_me: failed program was:" >&5
19650fd6
AS
6789sed 's/^/| /' conftest.$ac_ext >&5
6790
c0d27fcc 6791 ac_header_preproc=no
34ec9ebe 6792fi
ca81d7a0 6793
98418dba 6794rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6795{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6796echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6797
6798# So? What about this header?
edfaf76d
LK
6799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6800 yes:no: )
c0d27fcc
MR
6801 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6802echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6803 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6804echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6805 ac_header_preproc=yes
19650fd6 6806 ;;
edfaf76d 6807 no:yes:* )
c0d27fcc
MR
6808 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6809echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6810 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6811echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6812 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6813echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6814 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6815echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6816 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6817echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6818 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6819echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6820
19650fd6 6821 ;;
c0d27fcc 6822esac
ca81d7a0
JD
6823{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6824echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6825if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6826 echo $ECHO_N "(cached) $ECHO_C" >&6
6827else
edfaf76d 6828 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6829fi
ca81d7a0
JD
6830ac_res=`eval echo '${'$as_ac_Header'}'`
6831 { echo "$as_me:$LINENO: result: $ac_res" >&5
6832echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6833
6834fi
98418dba 6835if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6836 cat >>confdefs.h <<_ACEOF
98418dba 6837#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6838_ACEOF
34ec9ebe 6839
98418dba 6840fi
c0d27fcc 6841
98418dba
CW
6842done
6843
22044edf 6844
ca81d7a0
JD
6845{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6846echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6847cat >conftest.$ac_ext <<_ACEOF
6848/* confdefs.h. */
6849_ACEOF
6850cat confdefs.h >>conftest.$ac_ext
6851cat >>conftest.$ac_ext <<_ACEOF
6852/* end confdefs.h. */
6853#include <sys/personality.h>
6854int
6855main ()
6856{
6857personality (PER_LINUX32)
6858 ;
6859 return 0;
6860}
6861_ACEOF
6862rm -f conftest.$ac_objext
ca81d7a0
JD
6863if { (ac_try="$ac_compile"
6864case "(($ac_try" in
6865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6866 *) ac_try_echo=$ac_try;;
6867esac
6868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6869 (eval "$ac_compile") 2>conftest.er1
f17e308a 6870 ac_status=$?
edfaf76d
LK
6871 grep -v '^ *+' conftest.er1 >conftest.err
6872 rm -f conftest.er1
6873 cat conftest.err >&5
f17e308a 6874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6875 (exit $ac_status); } && {
6876 test -z "$ac_c_werror_flag" ||
6877 test ! -s conftest.err
6878 } && test -s conftest.$ac_objext; then
f17e308a
JD
6879 emacs_cv_personality_linux32=yes
6880else
6881 echo "$as_me: failed program was:" >&5
6882sed 's/^/| /' conftest.$ac_ext >&5
6883
ca81d7a0 6884 emacs_cv_personality_linux32=no
f17e308a 6885fi
ca81d7a0
JD
6886
6887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6888{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6889echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6890
6891if test $emacs_cv_personality_linux32 = yes; then
6892
6893cat >>confdefs.h <<\_ACEOF
6894#define HAVE_PERSONALITY_LINUX32 1
6895_ACEOF
6896
6897fi
6898
6899
22044edf
DL
6900for ac_header in term.h
6901do
6902as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6903{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6905if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6906 echo $ECHO_N "(cached) $ECHO_C" >&6
6907else
6908 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6909/* confdefs.h. */
6910_ACEOF
6911cat confdefs.h >>conftest.$ac_ext
6912cat >>conftest.$ac_ext <<_ACEOF
6913/* end confdefs.h. */
22044edf
DL
6914#include <$ac_header>
6915_ACEOF
ca81d7a0
JD
6916if { (ac_try="$ac_cpp conftest.$ac_ext"
6917case "(($ac_try" in
6918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6919 *) ac_try_echo=$ac_try;;
6920esac
6921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6922 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6923 ac_status=$?
6924 grep -v '^ *+' conftest.er1 >conftest.err
6925 rm -f conftest.er1
6926 cat conftest.err >&5
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6928 (exit $ac_status); } >/dev/null && {
6929 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6930 test ! -s conftest.err
6931 }; then
22044edf
DL
6932 eval "$as_ac_Header=yes"
6933else
6934 echo "$as_me: failed program was:" >&5
19650fd6
AS
6935sed 's/^/| /' conftest.$ac_ext >&5
6936
22044edf
DL
6937 eval "$as_ac_Header=no"
6938fi
ca81d7a0 6939
22044edf
DL
6940rm -f conftest.err conftest.$ac_ext
6941fi
ca81d7a0
JD
6942ac_res=`eval echo '${'$as_ac_Header'}'`
6943 { echo "$as_me:$LINENO: result: $ac_res" >&5
6944echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6945if test `eval echo '${'$as_ac_Header'}'` = yes; then
6946 cat >>confdefs.h <<_ACEOF
6947#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6948_ACEOF
6949
6950fi
6951
6952done
6953
ca81d7a0
JD
6954{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6955echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6956if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6957 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6958else
503d2be0 6959 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6960/* confdefs.h. */
6961_ACEOF
6962cat confdefs.h >>conftest.$ac_ext
6963cat >>conftest.$ac_ext <<_ACEOF
6964/* end confdefs.h. */
98418dba
CW
6965#include <stdlib.h>
6966#include <stdarg.h>
6967#include <string.h>
6968#include <float.h>
6969
19650fd6
AS
6970int
6971main ()
6972{
6973
6974 ;
6975 return 0;
6976}
98418dba 6977_ACEOF
19650fd6 6978rm -f conftest.$ac_objext
ca81d7a0
JD
6979if { (ac_try="$ac_compile"
6980case "(($ac_try" in
6981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6982 *) ac_try_echo=$ac_try;;
6983esac
6984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6985 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6986 ac_status=$?
edfaf76d
LK
6987 grep -v '^ *+' conftest.er1 >conftest.err
6988 rm -f conftest.er1
6989 cat conftest.err >&5
cd958eb3 6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6991 (exit $ac_status); } && {
6992 test -z "$ac_c_werror_flag" ||
6993 test ! -s conftest.err
6994 } && test -s conftest.$ac_objext; then
98418dba 6995 ac_cv_header_stdc=yes
ba4481b5 6996else
503d2be0 6997 echo "$as_me: failed program was:" >&5
19650fd6
AS
6998sed 's/^/| /' conftest.$ac_ext >&5
6999
ca81d7a0 7000 ac_cv_header_stdc=no
ba4481b5 7001fi
ca81d7a0
JD
7002
7003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
7004
7005if test $ac_cv_header_stdc = yes; then
7006 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7007 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7008/* confdefs.h. */
7009_ACEOF
7010cat confdefs.h >>conftest.$ac_ext
7011cat >>conftest.$ac_ext <<_ACEOF
7012/* end confdefs.h. */
98418dba
CW
7013#include <string.h>
7014
7015_ACEOF
7016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7017 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
7018 :
7019else
7020 ac_cv_header_stdc=no
ba4481b5 7021fi
98418dba 7022rm -f conftest*
ba4481b5
DL
7023
7024fi
7025
98418dba
CW
7026if test $ac_cv_header_stdc = yes; then
7027 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7028 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
98418dba
CW
7034#include <stdlib.h>
7035
7036_ACEOF
7037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7038 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
7039 :
7040else
7041 ac_cv_header_stdc=no
7042fi
7043rm -f conftest*
7044
7045fi
7046
7047if test $ac_cv_header_stdc = yes; then
7048 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7049 if test "$cross_compiling" = yes; then
7050 :
d42122a3 7051else
503d2be0 7052 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7053/* confdefs.h. */
7054_ACEOF
7055cat confdefs.h >>conftest.$ac_ext
7056cat >>conftest.$ac_ext <<_ACEOF
7057/* end confdefs.h. */
98418dba 7058#include <ctype.h>
ca81d7a0 7059#include <stdlib.h>
98418dba
CW
7060#if ((' ' & 0x0FF) == 0x020)
7061# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7062# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7063#else
19650fd6 7064# define ISLOWER(c) \
edfaf76d
LK
7065 (('a' <= (c) && (c) <= 'i') \
7066 || ('j' <= (c) && (c) <= 'r') \
7067 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
7068# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7069#endif
7070
7071#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
7072int
7073main ()
7074{
98418dba
CW
7075 int i;
7076 for (i = 0; i < 256; i++)
7077 if (XOR (islower (i), ISLOWER (i))
edfaf76d 7078 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
7079 return 2;
7080 return 0;
503d2be0
AS
7081}
7082_ACEOF
98418dba 7083rm -f conftest$ac_exeext
ca81d7a0
JD
7084if { (ac_try="$ac_link"
7085case "(($ac_try" in
7086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7087 *) ac_try_echo=$ac_try;;
7088esac
7089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7090 (eval "$ac_link") 2>&5
503d2be0 7091 ac_status=$?
c0d27fcc 7092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
7094 { (case "(($ac_try" in
7095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7096 *) ac_try_echo=$ac_try;;
7097esac
7098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7099 (eval "$ac_try") 2>&5
503d2be0 7100 ac_status=$?
c0d27fcc 7101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7102 (exit $ac_status); }; }; then
98418dba 7103 :
d42122a3 7104else
98418dba
CW
7105 echo "$as_me: program exited with status $ac_status" >&5
7106echo "$as_me: failed program was:" >&5
19650fd6
AS
7107sed 's/^/| /' conftest.$ac_ext >&5
7108
c0d27fcc 7109( exit $ac_status )
98418dba 7110ac_cv_header_stdc=no
d42122a3 7111fi
ca81d7a0 7112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7113fi
ca81d7a0
JD
7114
7115
98418dba
CW
7116fi
7117fi
ca81d7a0
JD
7118{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7119echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7120if test $ac_cv_header_stdc = yes; then
7121
c0d27fcc 7122cat >>confdefs.h <<\_ACEOF
98418dba 7123#define STDC_HEADERS 1
c0d27fcc 7124_ACEOF
d42122a3
DL
7125
7126fi
7127
ca81d7a0
JD
7128{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7129echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7130if test "${ac_cv_header_time+set}" = set; then
503d2be0 7131 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7132else
503d2be0 7133 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7134/* confdefs.h. */
7135_ACEOF
7136cat confdefs.h >>conftest.$ac_ext
7137cat >>conftest.$ac_ext <<_ACEOF
7138/* end confdefs.h. */
ba4481b5 7139#include <sys/types.h>
98418dba 7140#include <sys/time.h>
ba4481b5 7141#include <time.h>
503d2be0
AS
7142
7143int
7144main ()
7145{
98418dba
CW
7146if ((struct tm *) 0)
7147return 0;
503d2be0
AS
7148 ;
7149 return 0;
7150}
7151_ACEOF
7152rm -f conftest.$ac_objext
ca81d7a0
JD
7153if { (ac_try="$ac_compile"
7154case "(($ac_try" in
7155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7156 *) ac_try_echo=$ac_try;;
7157esac
7158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7159 (eval "$ac_compile") 2>conftest.er1
503d2be0 7160 ac_status=$?
edfaf76d
LK
7161 grep -v '^ *+' conftest.er1 >conftest.err
7162 rm -f conftest.er1
7163 cat conftest.err >&5
c0d27fcc 7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7165 (exit $ac_status); } && {
7166 test -z "$ac_c_werror_flag" ||
7167 test ! -s conftest.err
7168 } && test -s conftest.$ac_objext; then
98418dba 7169 ac_cv_header_time=yes
ba4481b5 7170else
503d2be0 7171 echo "$as_me: failed program was:" >&5
19650fd6
AS
7172sed 's/^/| /' conftest.$ac_ext >&5
7173
ca81d7a0 7174 ac_cv_header_time=no
ba4481b5 7175fi
ca81d7a0
JD
7176
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7178fi
ca81d7a0
JD
7179{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7180echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7181if test $ac_cv_header_time = yes; then
503d2be0 7182
c0d27fcc 7183cat >>confdefs.h <<\_ACEOF
98418dba 7184#define TIME_WITH_SYS_TIME 1
c0d27fcc 7185_ACEOF
ba4481b5
DL
7186
7187fi
7188
ca81d7a0
JD
7189{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7190echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7191if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7192 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7193else
503d2be0 7194 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7195/* confdefs.h. */
7196_ACEOF
7197cat confdefs.h >>conftest.$ac_ext
7198cat >>conftest.$ac_ext <<_ACEOF
7199/* end confdefs.h. */
cd958eb3
MB
7200$ac_includes_default
7201int
7202main ()
7203{
7204#ifndef sys_siglist
f053c89f 7205 (void) sys_siglist;
98418dba 7206#endif
503d2be0 7207
cd958eb3
MB
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212rm -f conftest.$ac_objext
ca81d7a0
JD
7213if { (ac_try="$ac_compile"
7214case "(($ac_try" in
7215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7216 *) ac_try_echo=$ac_try;;
7217esac
7218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7219 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7220 ac_status=$?
edfaf76d
LK
7221 grep -v '^ *+' conftest.er1 >conftest.err
7222 rm -f conftest.er1
7223 cat conftest.err >&5
cd958eb3 7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7225 (exit $ac_status); } && {
7226 test -z "$ac_c_werror_flag" ||
7227 test ! -s conftest.err
7228 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7229 ac_cv_have_decl_sys_siglist=yes
7230else
7231 echo "$as_me: failed program was:" >&5
19650fd6
AS
7232sed 's/^/| /' conftest.$ac_ext >&5
7233
ca81d7a0 7234 ac_cv_have_decl_sys_siglist=no
cd958eb3 7235fi
ca81d7a0
JD
7236
7237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7238fi
ca81d7a0
JD
7239{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7240echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7241if test $ac_cv_have_decl_sys_siglist = yes; then
7242
7243cat >>confdefs.h <<_ACEOF
7244#define HAVE_DECL_SYS_SIGLIST 1
7245_ACEOF
7246
7247
7248else
7249 cat >>confdefs.h <<_ACEOF
7250#define HAVE_DECL_SYS_SIGLIST 0
7251_ACEOF
7252
7253
7254fi
7255
7256
7257if test $ac_cv_have_decl_sys_siglist != yes; then
7258 # For Tru64, at least:
ca81d7a0
JD
7259 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7260echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7261if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7262 echo $ECHO_N "(cached) $ECHO_C" >&6
7263else
7264 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7265/* confdefs.h. */
7266_ACEOF
7267cat confdefs.h >>conftest.$ac_ext
7268cat >>conftest.$ac_ext <<_ACEOF
7269/* end confdefs.h. */
cd958eb3 7270$ac_includes_default
503d2be0
AS
7271int
7272main ()
7273{
cd958eb3 7274#ifndef __sys_siglist
f053c89f 7275 (void) __sys_siglist;
cd958eb3
MB
7276#endif
7277
503d2be0
AS
7278 ;
7279 return 0;
7280}
7281_ACEOF
7282rm -f conftest.$ac_objext
ca81d7a0
JD
7283if { (ac_try="$ac_compile"
7284case "(($ac_try" in
7285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7286 *) ac_try_echo=$ac_try;;
7287esac
7288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7289 (eval "$ac_compile") 2>conftest.er1
503d2be0 7290 ac_status=$?
edfaf76d
LK
7291 grep -v '^ *+' conftest.er1 >conftest.err
7292 rm -f conftest.er1
7293 cat conftest.err >&5
c0d27fcc 7294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7295 (exit $ac_status); } && {
7296 test -z "$ac_c_werror_flag" ||
7297 test ! -s conftest.err
7298 } && test -s conftest.$ac_objext; then
cd958eb3 7299 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7300else
503d2be0 7301 echo "$as_me: failed program was:" >&5
19650fd6
AS
7302sed 's/^/| /' conftest.$ac_ext >&5
7303
ca81d7a0 7304 ac_cv_have_decl___sys_siglist=no
ba4481b5 7305fi
ca81d7a0
JD
7306
7307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7308fi
ca81d7a0
JD
7309{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7310echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7311if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7312
cd958eb3
MB
7313cat >>confdefs.h <<_ACEOF
7314#define HAVE_DECL___SYS_SIGLIST 1
7315_ACEOF
7316
7317
7318else
7319 cat >>confdefs.h <<_ACEOF
7320#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7321_ACEOF
503d2be0 7322
cd958eb3 7323
ba4481b5
DL
7324fi
7325
cd958eb3
MB
7326
7327 if test $ac_cv_have_decl___sys_siglist = yes; then
7328
7329cat >>confdefs.h <<\_ACEOF
7330#define sys_siglist __sys_siglist
7331_ACEOF
7332
7333 fi
7334fi
ca81d7a0
JD
7335{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7336echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7337if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7338 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7339else
503d2be0 7340 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7341/* confdefs.h. */
7342_ACEOF
7343cat confdefs.h >>conftest.$ac_ext
7344cat >>conftest.$ac_ext <<_ACEOF
7345/* end confdefs.h. */
98418dba
CW
7346#include <sys/types.h>
7347#include <sys/wait.h>
7348#ifndef WEXITSTATUS
ca81d7a0 7349# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7350#endif
7351#ifndef WIFEXITED
7352# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7353#endif
503d2be0
AS
7354
7355int
7356main ()
7357{
98418dba
CW
7358 int s;
7359 wait (&s);
7360 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7361 ;
7362 return 0;
7363}
7364_ACEOF
98418dba 7365rm -f conftest.$ac_objext
ca81d7a0
JD
7366if { (ac_try="$ac_compile"
7367case "(($ac_try" in
7368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7369 *) ac_try_echo=$ac_try;;
7370esac
7371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7372 (eval "$ac_compile") 2>conftest.er1
503d2be0 7373 ac_status=$?
edfaf76d
LK
7374 grep -v '^ *+' conftest.er1 >conftest.err
7375 rm -f conftest.er1
7376 cat conftest.err >&5
c0d27fcc 7377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7378 (exit $ac_status); } && {
7379 test -z "$ac_c_werror_flag" ||
7380 test ! -s conftest.err
7381 } && test -s conftest.$ac_objext; then
98418dba 7382 ac_cv_header_sys_wait_h=yes
ba4481b5 7383else
503d2be0 7384 echo "$as_me: failed program was:" >&5
19650fd6
AS
7385sed 's/^/| /' conftest.$ac_ext >&5
7386
ca81d7a0 7387 ac_cv_header_sys_wait_h=no
ba4481b5 7388fi
ca81d7a0
JD
7389
7390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7391fi
ca81d7a0
JD
7392{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7393echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7394if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7395
c0d27fcc 7396cat >>confdefs.h <<\_ACEOF
98418dba 7397#define HAVE_SYS_WAIT_H 1
c0d27fcc 7398_ACEOF
ba4481b5 7399
ba4481b5
DL
7400fi
7401
c0d27fcc 7402
ca81d7a0
JD
7403{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7404echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7405if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7406 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7407else
503d2be0 7408 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7409/* confdefs.h. */
7410_ACEOF
7411cat confdefs.h >>conftest.$ac_ext
7412cat >>conftest.$ac_ext <<_ACEOF
7413/* end confdefs.h. */
98418dba
CW
7414#ifdef TIME_WITH_SYS_TIME
7415#include <sys/time.h>
7416#include <time.h>
7417#else
7418#ifdef HAVE_SYS_TIME_H
7419#include <sys/time.h>
7420#else
1113b624 7421#include <time.h>
98418dba
CW
7422#endif
7423#endif
7424#ifdef HAVE_UTIME_H
7425#include <utime.h>
7426#endif
503d2be0
AS
7427int
7428main ()
7429{
98418dba 7430static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7431 ;
7432 return 0;
7433}
7434_ACEOF
98418dba 7435rm -f conftest.$ac_objext
ca81d7a0
JD
7436if { (ac_try="$ac_compile"
7437case "(($ac_try" in
7438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7439 *) ac_try_echo=$ac_try;;
7440esac
7441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7442 (eval "$ac_compile") 2>conftest.er1
503d2be0 7443 ac_status=$?
edfaf76d
LK
7444 grep -v '^ *+' conftest.er1 >conftest.err
7445 rm -f conftest.er1
7446 cat conftest.err >&5
c0d27fcc 7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7448 (exit $ac_status); } && {
7449 test -z "$ac_c_werror_flag" ||
7450 test ! -s conftest.err
7451 } && test -s conftest.$ac_objext; then
98418dba 7452 emacs_cv_struct_utimbuf=yes
1113b624 7453else
503d2be0 7454 echo "$as_me: failed program was:" >&5
19650fd6
AS
7455sed 's/^/| /' conftest.$ac_ext >&5
7456
ca81d7a0 7457 emacs_cv_struct_utimbuf=no
1113b624 7458fi
ca81d7a0
JD
7459
7460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7461fi
ca81d7a0
JD
7462{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7463echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7464if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7465
c0d27fcc 7466cat >>confdefs.h <<\_ACEOF
98418dba 7467#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7468_ACEOF
1113b624
PE
7469
7470fi
ba4481b5 7471
ca81d7a0
JD
7472{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7473echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7474if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7475 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7476else
98418dba 7477 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7397acc4 7483#include <sys/types.h>
98418dba 7484#include <signal.h>
98418dba 7485
503d2be0
AS
7486int
7487main ()
7488{
ca81d7a0 7489return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7490 ;
7491 return 0;
7492}
7493_ACEOF
98418dba 7494rm -f conftest.$ac_objext
ca81d7a0
JD
7495if { (ac_try="$ac_compile"
7496case "(($ac_try" in
7497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7498 *) ac_try_echo=$ac_try;;
7499esac
7500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7501 (eval "$ac_compile") 2>conftest.er1
503d2be0 7502 ac_status=$?
edfaf76d
LK
7503 grep -v '^ *+' conftest.er1 >conftest.err
7504 rm -f conftest.er1
7505 cat conftest.err >&5
c0d27fcc 7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7507 (exit $ac_status); } && {
7508 test -z "$ac_c_werror_flag" ||
7509 test ! -s conftest.err
7510 } && test -s conftest.$ac_objext; then
ca81d7a0 7511 ac_cv_type_signal=int
503d2be0
AS
7512else
7513 echo "$as_me: failed program was:" >&5
19650fd6
AS
7514sed 's/^/| /' conftest.$ac_ext >&5
7515
ca81d7a0 7516 ac_cv_type_signal=void
503d2be0 7517fi
ca81d7a0
JD
7518
7519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7520fi
ca81d7a0
JD
7521{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7522echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7523
c0d27fcc 7524cat >>confdefs.h <<_ACEOF
98418dba 7525#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7526_ACEOF
7527
503d2be0 7528
c0d27fcc 7529
ca81d7a0
JD
7530{ echo "$as_me:$LINENO: checking for speed_t" >&5
7531echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7532if test "${emacs_cv_speed_t+set}" = set; then
7533 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7534else
98418dba 7535 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7536/* confdefs.h. */
7537_ACEOF
7538cat confdefs.h >>conftest.$ac_ext
7539cat >>conftest.$ac_ext <<_ACEOF
7540/* end confdefs.h. */
98418dba 7541#include <termios.h>
98418dba
CW
7542int
7543main ()
7544{
7545speed_t x = 1;
7546 ;
7547 return 0;
7548}
7549_ACEOF
7550rm -f conftest.$ac_objext
ca81d7a0
JD
7551if { (ac_try="$ac_compile"
7552case "(($ac_try" in
7553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7554 *) ac_try_echo=$ac_try;;
7555esac
7556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7557 (eval "$ac_compile") 2>conftest.er1
98418dba 7558 ac_status=$?
edfaf76d
LK
7559 grep -v '^ *+' conftest.er1 >conftest.err
7560 rm -f conftest.er1
7561 cat conftest.err >&5
c0d27fcc 7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7563 (exit $ac_status); } && {
7564 test -z "$ac_c_werror_flag" ||
7565 test ! -s conftest.err
7566 } && test -s conftest.$ac_objext; then
98418dba
CW
7567 emacs_cv_speed_t=yes
7568else
7569 echo "$as_me: failed program was:" >&5
19650fd6
AS
7570sed 's/^/| /' conftest.$ac_ext >&5
7571
ca81d7a0 7572 emacs_cv_speed_t=no
98418dba 7573fi
ca81d7a0
JD
7574
7575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7576fi
ca81d7a0
JD
7577{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7578echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7579if test $emacs_cv_speed_t = yes; then
b936fae4 7580
c0d27fcc 7581cat >>confdefs.h <<\_ACEOF
98418dba 7582#define HAVE_SPEED_T 1
c0d27fcc 7583_ACEOF
98418dba 7584
7397acc4
DL
7585fi
7586
ca81d7a0
JD
7587{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7588echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7589if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7590 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7591else
503d2be0 7592 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7593/* confdefs.h. */
7594_ACEOF
7595cat confdefs.h >>conftest.$ac_ext
7596cat >>conftest.$ac_ext <<_ACEOF
7597/* end confdefs.h. */
98418dba
CW
7598#ifdef TIME_WITH_SYS_TIME
7599#include <sys/time.h>
7600#include <time.h>
7601#else
7602#ifdef HAVE_SYS_TIME_H
7603#include <sys/time.h>
7604#else
7605#include <time.h>
7606#endif
7607#endif
503d2be0
AS
7608int
7609main ()
7610{
98418dba 7611static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7612 ;
7613 return 0;
7614}
7615_ACEOF
7616rm -f conftest.$ac_objext
ca81d7a0
JD
7617if { (ac_try="$ac_compile"
7618case "(($ac_try" in
7619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7620 *) ac_try_echo=$ac_try;;
7621esac
7622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7623 (eval "$ac_compile") 2>conftest.er1
503d2be0 7624 ac_status=$?
edfaf76d
LK
7625 grep -v '^ *+' conftest.er1 >conftest.err
7626 rm -f conftest.er1
7627 cat conftest.err >&5
c0d27fcc 7628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7629 (exit $ac_status); } && {
7630 test -z "$ac_c_werror_flag" ||
7631 test ! -s conftest.err
7632 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7633 emacs_cv_struct_timeval=yes
7634else
503d2be0 7635 echo "$as_me: failed program was:" >&5
19650fd6
AS
7636sed 's/^/| /' conftest.$ac_ext >&5
7637
ca81d7a0 7638 emacs_cv_struct_timeval=no
7397acc4 7639fi
ca81d7a0
JD
7640
7641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7642fi
ca81d7a0
JD
7643{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7644echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7645HAVE_TIMEVAL=$emacs_cv_struct_timeval
7646if test $emacs_cv_struct_timeval = yes; then
b936fae4 7647
c0d27fcc 7648cat >>confdefs.h <<\_ACEOF
98418dba 7649#define HAVE_TIMEVAL 1
c0d27fcc 7650_ACEOF
7397acc4
DL
7651
7652fi
7653
ca81d7a0
JD
7654{ echo "$as_me:$LINENO: checking for struct exception" >&5
7655echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7656if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7657 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7658else
503d2be0 7659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7660/* confdefs.h. */
7661_ACEOF
7662cat confdefs.h >>conftest.$ac_ext
7663cat >>conftest.$ac_ext <<_ACEOF
7664/* end confdefs.h. */
98418dba 7665#include <math.h>
503d2be0
AS
7666int
7667main ()
7668{
98418dba 7669static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7670 ;
7671 return 0;
ba4481b5 7672}
503d2be0
AS
7673_ACEOF
7674rm -f conftest.$ac_objext
ca81d7a0
JD
7675if { (ac_try="$ac_compile"
7676case "(($ac_try" in
7677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7678 *) ac_try_echo=$ac_try;;
7679esac
7680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7681 (eval "$ac_compile") 2>conftest.er1
503d2be0 7682 ac_status=$?
edfaf76d
LK
7683 grep -v '^ *+' conftest.er1 >conftest.err
7684 rm -f conftest.er1
7685 cat conftest.err >&5
c0d27fcc 7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7687 (exit $ac_status); } && {
7688 test -z "$ac_c_werror_flag" ||
7689 test ! -s conftest.err
7690 } && test -s conftest.$ac_objext; then
98418dba 7691 emacs_cv_struct_exception=yes
ba4481b5 7692else
503d2be0 7693 echo "$as_me: failed program was:" >&5
19650fd6
AS
7694sed 's/^/| /' conftest.$ac_ext >&5
7695
ca81d7a0 7696 emacs_cv_struct_exception=no
ba4481b5 7697fi
ca81d7a0
JD
7698
7699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7700fi
ca81d7a0
JD
7701{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7702echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7703HAVE_EXCEPTION=$emacs_cv_struct_exception
7704if test $emacs_cv_struct_exception != yes; then
b936fae4 7705
c0d27fcc 7706cat >>confdefs.h <<\_ACEOF
98418dba 7707#define NO_MATHERR 1
c0d27fcc 7708_ACEOF
ba4481b5
DL
7709
7710fi
7711
7862d3a8
AS
7712
7713for ac_header in sys/socket.h
7714do
7715as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7716if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7717 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7718echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7719if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7720 echo $ECHO_N "(cached) $ECHO_C" >&6
7721fi
ca81d7a0
JD
7722ac_res=`eval echo '${'$as_ac_Header'}'`
7723 { echo "$as_me:$LINENO: result: $ac_res" >&5
7724echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7725else
7726 # Is the header compilable?
ca81d7a0
JD
7727{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7728echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7729cat >conftest.$ac_ext <<_ACEOF
7730/* confdefs.h. */
7731_ACEOF
7732cat confdefs.h >>conftest.$ac_ext
7733cat >>conftest.$ac_ext <<_ACEOF
7734/* end confdefs.h. */
7735$ac_includes_default
7736#include <$ac_header>
7737_ACEOF
7738rm -f conftest.$ac_objext
ca81d7a0
JD
7739if { (ac_try="$ac_compile"
7740case "(($ac_try" in
7741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7742 *) ac_try_echo=$ac_try;;
7743esac
7744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7745 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7746 ac_status=$?
edfaf76d
LK
7747 grep -v '^ *+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
7862d3a8 7750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7751 (exit $ac_status); } && {
7752 test -z "$ac_c_werror_flag" ||
7753 test ! -s conftest.err
7754 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7755 ac_header_compiler=yes
7756else
7757 echo "$as_me: failed program was:" >&5
7758sed 's/^/| /' conftest.$ac_ext >&5
7759
ca81d7a0 7760 ac_header_compiler=no
7862d3a8 7761fi
ca81d7a0
JD
7762
7763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7764{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7765echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7766
7767# Is the header present?
ca81d7a0
JD
7768{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7769echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7770cat >conftest.$ac_ext <<_ACEOF
7771/* confdefs.h. */
7772_ACEOF
7773cat confdefs.h >>conftest.$ac_ext
7774cat >>conftest.$ac_ext <<_ACEOF
7775/* end confdefs.h. */
7776#include <$ac_header>
7777_ACEOF
ca81d7a0
JD
7778if { (ac_try="$ac_cpp conftest.$ac_ext"
7779case "(($ac_try" in
7780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7781 *) ac_try_echo=$ac_try;;
7782esac
7783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7784 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7785 ac_status=$?
7786 grep -v '^ *+' conftest.er1 >conftest.err
7787 rm -f conftest.er1
7788 cat conftest.err >&5
7789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7790 (exit $ac_status); } >/dev/null && {
7791 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7792 test ! -s conftest.err
7793 }; then
7862d3a8
AS
7794 ac_header_preproc=yes
7795else
7796 echo "$as_me: failed program was:" >&5
7797sed 's/^/| /' conftest.$ac_ext >&5
7798
7799 ac_header_preproc=no
7800fi
ca81d7a0 7801
7862d3a8 7802rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7803{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7804echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7805
7806# So? What about this header?
edfaf76d
LK
7807case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7808 yes:no: )
7862d3a8
AS
7809 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7810echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7811 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7812echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7813 ac_header_preproc=yes
7862d3a8 7814 ;;
edfaf76d 7815 no:yes:* )
7862d3a8
AS
7816 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7817echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7818 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7819echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7820 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7821echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7822 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7823echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7824 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7825echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7826 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7827echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7828
7862d3a8
AS
7829 ;;
7830esac
ca81d7a0
JD
7831{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7833if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7834 echo $ECHO_N "(cached) $ECHO_C" >&6
7835else
edfaf76d 7836 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7837fi
ca81d7a0
JD
7838ac_res=`eval echo '${'$as_ac_Header'}'`
7839 { echo "$as_me:$LINENO: result: $ac_res" >&5
7840echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7841
7842fi
7843if test `eval echo '${'$as_ac_Header'}'` = yes; then
7844 cat >>confdefs.h <<_ACEOF
7845#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7846_ACEOF
7847
7848fi
7849
7850done
7851
7852
7853for ac_header in net/if.h
7854do
7855as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7856{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7857echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7858if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
7860else
7861 cat >conftest.$ac_ext <<_ACEOF
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
7867$ac_includes_default
7868#if HAVE_SYS_SOCKET_H
7869#include <sys/socket.h>
7870#endif
7871
7872#include <$ac_header>
7873_ACEOF
7874rm -f conftest.$ac_objext
ca81d7a0
JD
7875if { (ac_try="$ac_compile"
7876case "(($ac_try" in
7877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7878 *) ac_try_echo=$ac_try;;
7879esac
7880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7881 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7882 ac_status=$?
edfaf76d
LK
7883 grep -v '^ *+' conftest.er1 >conftest.err
7884 rm -f conftest.er1
7885 cat conftest.err >&5
7862d3a8 7886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7887 (exit $ac_status); } && {
7888 test -z "$ac_c_werror_flag" ||
7889 test ! -s conftest.err
7890 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7891 eval "$as_ac_Header=yes"
7892else
7893 echo "$as_me: failed program was:" >&5
7894sed 's/^/| /' conftest.$ac_ext >&5
7895
ca81d7a0 7896 eval "$as_ac_Header=no"
7862d3a8 7897fi
ca81d7a0
JD
7898
7899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7900fi
ca81d7a0
JD
7901ac_res=`eval echo '${'$as_ac_Header'}'`
7902 { echo "$as_me:$LINENO: result: $ac_res" >&5
7903echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7904if test `eval echo '${'$as_ac_Header'}'` = yes; then
7905 cat >>confdefs.h <<_ACEOF
7906#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7907_ACEOF
7908
7909fi
7910
7911done
7912
7913
ca81d7a0
JD
7914{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7915echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7916if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7917 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7918else
503d2be0 7919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
98418dba
CW
7925#include <sys/types.h>
7926#include <time.h>
7397acc4 7927
503d2be0
AS
7928int
7929main ()
7930{
f053c89f
CY
7931struct tm tm;
7932 int *p = &tm.tm_sec;
7933 return !p;
503d2be0
AS
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
ca81d7a0
JD
7939if { (ac_try="$ac_compile"
7940case "(($ac_try" in
7941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7942 *) ac_try_echo=$ac_try;;
7943esac
7944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7945 (eval "$ac_compile") 2>conftest.er1
503d2be0 7946 ac_status=$?
edfaf76d
LK
7947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
c0d27fcc 7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
35996d22
AS
7955 ac_cv_struct_tm=time.h
7956else
503d2be0 7957 echo "$as_me: failed program was:" >&5
19650fd6
AS
7958sed 's/^/| /' conftest.$ac_ext >&5
7959
ca81d7a0 7960 ac_cv_struct_tm=sys/time.h
7397acc4 7961fi
ca81d7a0
JD
7962
7963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7964fi
ca81d7a0
JD
7965{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7966echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7967if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7968
c0d27fcc 7969cat >>confdefs.h <<\_ACEOF
98418dba 7970#define TM_IN_SYS_TIME 1
c0d27fcc 7971_ACEOF
7397acc4
DL
7972
7973fi
ba4481b5 7974
ca81d7a0
JD
7975{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7976echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7977if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7978 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7979else
98418dba 7980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7981/* confdefs.h. */
7982_ACEOF
7983cat confdefs.h >>conftest.$ac_ext
7984cat >>conftest.$ac_ext <<_ACEOF
7985/* end confdefs.h. */
98418dba
CW
7986#include <sys/types.h>
7987#include <$ac_cv_struct_tm>
ba4481b5 7988
c0d27fcc 7989
98418dba
CW
7990int
7991main ()
7992{
7993static struct tm ac_aggr;
7994if (ac_aggr.tm_zone)
7995return 0;
7996 ;
7997 return 0;
7998}
7999_ACEOF
8000rm -f conftest.$ac_objext
ca81d7a0
JD
8001if { (ac_try="$ac_compile"
8002case "(($ac_try" in
8003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8004 *) ac_try_echo=$ac_try;;
8005esac
8006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8007 (eval "$ac_compile") 2>conftest.er1
98418dba 8008 ac_status=$?
edfaf76d
LK
8009 grep -v '^ *+' conftest.er1 >conftest.err
8010 rm -f conftest.er1
8011 cat conftest.err >&5
c0d27fcc 8012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8013 (exit $ac_status); } && {
8014 test -z "$ac_c_werror_flag" ||
8015 test ! -s conftest.err
8016 } && test -s conftest.$ac_objext; then
98418dba 8017 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 8018else
98418dba 8019 echo "$as_me: failed program was:" >&5
19650fd6
AS
8020sed 's/^/| /' conftest.$ac_ext >&5
8021
ca81d7a0 8022 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8023/* confdefs.h. */
8024_ACEOF
8025cat confdefs.h >>conftest.$ac_ext
8026cat >>conftest.$ac_ext <<_ACEOF
8027/* end confdefs.h. */
6bae0ccf
DL
8028#include <sys/types.h>
8029#include <$ac_cv_struct_tm>
8030
8031
8032int
8033main ()
8034{
8035static struct tm ac_aggr;
8036if (sizeof ac_aggr.tm_zone)
8037return 0;
8038 ;
8039 return 0;
8040}
8041_ACEOF
8042rm -f conftest.$ac_objext
ca81d7a0
JD
8043if { (ac_try="$ac_compile"
8044case "(($ac_try" in
8045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8046 *) ac_try_echo=$ac_try;;
8047esac
8048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8049 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8050 ac_status=$?
edfaf76d
LK
8051 grep -v '^ *+' conftest.er1 >conftest.err
8052 rm -f conftest.er1
8053 cat conftest.err >&5
6bae0ccf 8054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8055 (exit $ac_status); } && {
8056 test -z "$ac_c_werror_flag" ||
8057 test ! -s conftest.err
8058 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
8059 ac_cv_member_struct_tm_tm_zone=yes
8060else
8061 echo "$as_me: failed program was:" >&5
19650fd6
AS
8062sed 's/^/| /' conftest.$ac_ext >&5
8063
ca81d7a0 8064 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 8065fi
ca81d7a0
JD
8066
8067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8068fi
ca81d7a0
JD
8069
8070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8071fi
ca81d7a0
JD
8072{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
8073echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 8074if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 8075
c0d27fcc 8076cat >>confdefs.h <<_ACEOF
98418dba 8077#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
8078_ACEOF
8079
ba4481b5 8080
98418dba 8081fi
ba4481b5 8082
98418dba 8083if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 8084
c0d27fcc 8085cat >>confdefs.h <<\_ACEOF
98418dba 8086#define HAVE_TM_ZONE 1
c0d27fcc 8087_ACEOF
ba4481b5 8088
ba4481b5 8089else
ca81d7a0
JD
8090 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
8091echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
8092if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 8093 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8094else
98418dba 8095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8096/* confdefs.h. */
8097_ACEOF
8098cat confdefs.h >>conftest.$ac_ext
8099cat >>conftest.$ac_ext <<_ACEOF
8100/* end confdefs.h. */
98418dba 8101#include <time.h>
98418dba 8102
98418dba
CW
8103int
8104main ()
8105{
ca81d7a0 8106#ifndef tzname
f053c89f 8107 (void) tzname;
ca81d7a0
JD
8108#endif
8109
6bae0ccf
DL
8110 ;
8111 return 0;
8112}
8113_ACEOF
8114rm -f conftest.$ac_objext
ca81d7a0
JD
8115if { (ac_try="$ac_compile"
8116case "(($ac_try" in
8117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8118 *) ac_try_echo=$ac_try;;
8119esac
8120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8121 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8122 ac_status=$?
edfaf76d
LK
8123 grep -v '^ *+' conftest.er1 >conftest.err
8124 rm -f conftest.er1
8125 cat conftest.err >&5
6bae0ccf 8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8127 (exit $ac_status); } && {
8128 test -z "$ac_c_werror_flag" ||
8129 test ! -s conftest.err
8130 } && test -s conftest.$ac_objext; then
ca81d7a0 8131 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
8132else
8133 echo "$as_me: failed program was:" >&5
19650fd6
AS
8134sed 's/^/| /' conftest.$ac_ext >&5
8135
ca81d7a0 8136 ac_cv_have_decl_tzname=no
ba4481b5 8137fi
ca81d7a0
JD
8138
8139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8140fi
ca81d7a0
JD
8141{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8142echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8143if test $ac_cv_have_decl_tzname = yes; then
503d2be0 8144
c0d27fcc 8145cat >>confdefs.h <<_ACEOF
ca81d7a0 8146#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
8147_ACEOF
8148
ba4481b5 8149
ca81d7a0
JD
8150else
8151 cat >>confdefs.h <<_ACEOF
8152#define HAVE_DECL_TZNAME 0
8153_ACEOF
ba4481b5 8154
ba4481b5 8155
98418dba 8156fi
ba4481b5 8157
ca81d7a0
JD
8158
8159 { echo "$as_me:$LINENO: checking for tzname" >&5
8160echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 8161if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 8162 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8163else
98418dba 8164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8165/* confdefs.h. */
8166_ACEOF
8167cat confdefs.h >>conftest.$ac_ext
8168cat >>conftest.$ac_ext <<_ACEOF
8169/* end confdefs.h. */
98418dba 8170#include <time.h>
ca81d7a0
JD
8171#if !HAVE_DECL_TZNAME
8172extern char *tzname[];
98418dba
CW
8173#endif
8174
98418dba
CW
8175int
8176main ()
8177{
ca81d7a0 8178return tzname[0][0];
98418dba
CW
8179 ;
8180 return 0;
8181}
8182_ACEOF
8183rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
8184if { (ac_try="$ac_link"
8185case "(($ac_try" in
8186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8187 *) ac_try_echo=$ac_try;;
8188esac
8189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8190 (eval "$ac_link") 2>conftest.er1
98418dba 8191 ac_status=$?
edfaf76d
LK
8192 grep -v '^ *+' conftest.er1 >conftest.err
8193 rm -f conftest.er1
8194 cat conftest.err >&5
c0d27fcc 8195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8196 (exit $ac_status); } && {
8197 test -z "$ac_c_werror_flag" ||
8198 test ! -s conftest.err
8199 } && test -s conftest$ac_exeext &&
8200 $as_test_x conftest$ac_exeext; then
98418dba
CW
8201 ac_cv_var_tzname=yes
8202else
8203 echo "$as_me: failed program was:" >&5
19650fd6
AS
8204sed 's/^/| /' conftest.$ac_ext >&5
8205
ca81d7a0 8206 ac_cv_var_tzname=no
ba4481b5 8207fi
6bae0ccf 8208
f053c89f 8209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8210 conftest$ac_exeext conftest.$ac_ext
98418dba 8211fi
ca81d7a0
JD
8212{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8213echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 8214 if test $ac_cv_var_tzname = yes; then
ba4481b5 8215
c0d27fcc 8216cat >>confdefs.h <<\_ACEOF
98418dba 8217#define HAVE_TZNAME 1
c0d27fcc 8218_ACEOF
503d2be0 8219
98418dba
CW
8220 fi
8221fi
503d2be0 8222
ca81d7a0
JD
8223{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8224echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 8225if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
8226 echo $ECHO_N "(cached) $ECHO_C" >&6
8227else
8228 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8229/* confdefs.h. */
8230_ACEOF
8231cat confdefs.h >>conftest.$ac_ext
8232cat >>conftest.$ac_ext <<_ACEOF
8233/* end confdefs.h. */
98418dba 8234#include <time.h>
b936fae4 8235
98418dba
CW
8236int
8237main ()
8238{
b936fae4
AS
8239static struct tm ac_aggr;
8240if (ac_aggr.tm_gmtoff)
8241return 0;
98418dba
CW
8242 ;
8243 return 0;
8244}
8245_ACEOF
b936fae4 8246rm -f conftest.$ac_objext
ca81d7a0
JD
8247if { (ac_try="$ac_compile"
8248case "(($ac_try" in
8249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8250 *) ac_try_echo=$ac_try;;
8251esac
8252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8253 (eval "$ac_compile") 2>conftest.er1
98418dba 8254 ac_status=$?
edfaf76d
LK
8255 grep -v '^ *+' conftest.er1 >conftest.err
8256 rm -f conftest.er1
8257 cat conftest.err >&5
c0d27fcc 8258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8259 (exit $ac_status); } && {
8260 test -z "$ac_c_werror_flag" ||
8261 test ! -s conftest.err
8262 } && test -s conftest.$ac_objext; then
b936fae4 8263 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
8264else
8265 echo "$as_me: failed program was:" >&5
19650fd6
AS
8266sed 's/^/| /' conftest.$ac_ext >&5
8267
ca81d7a0 8268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8269/* confdefs.h. */
8270_ACEOF
8271cat confdefs.h >>conftest.$ac_ext
8272cat >>conftest.$ac_ext <<_ACEOF
8273/* end confdefs.h. */
6bae0ccf
DL
8274#include <time.h>
8275
8799b3e4
CW
8276int
8277main ()
8278{
6bae0ccf
DL
8279static struct tm ac_aggr;
8280if (sizeof ac_aggr.tm_gmtoff)
8281return 0;
8799b3e4
CW
8282 ;
8283 return 0;
8284}
8285_ACEOF
6bae0ccf 8286rm -f conftest.$ac_objext
ca81d7a0
JD
8287if { (ac_try="$ac_compile"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
8292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8293 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8294 ac_status=$?
edfaf76d
LK
8295 grep -v '^ *+' conftest.er1 >conftest.err
8296 rm -f conftest.er1
8297 cat conftest.err >&5
c0d27fcc 8298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8299 (exit $ac_status); } && {
8300 test -z "$ac_c_werror_flag" ||
8301 test ! -s conftest.err
8302 } && test -s conftest.$ac_objext; then
6bae0ccf 8303 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8304else
8305 echo "$as_me: failed program was:" >&5
19650fd6
AS
8306sed 's/^/| /' conftest.$ac_ext >&5
8307
ca81d7a0 8308 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8309fi
ca81d7a0
JD
8310
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8312fi
ca81d7a0
JD
8313
8314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8315fi
ca81d7a0
JD
8316{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8317echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8318if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8319
8320cat >>confdefs.h <<\_ACEOF
8321#define HAVE_TM_GMTOFF 1
8322_ACEOF
8323
8324fi
8325
ca81d7a0
JD
8326{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8327echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8328if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8329 echo $ECHO_N "(cached) $ECHO_C" >&6
8330else
8331 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8332/* confdefs.h. */
8333_ACEOF
8334cat confdefs.h >>conftest.$ac_ext
8335cat >>conftest.$ac_ext <<_ACEOF
8336/* end confdefs.h. */
7862d3a8
AS
8337$ac_includes_default
8338#if HAVE_SYS_SOCKET_H
8339#include <sys/socket.h>
8340#endif
8341#if HAVE_NET_IF_H
96f3a036 8342#include <net/if.h>
7862d3a8 8343#endif
96f3a036
DL
8344
8345int
8346main ()
8347{
8348static struct ifreq ac_aggr;
8349if (ac_aggr.ifr_flags)
8350return 0;
8351 ;
8352 return 0;
8353}
8354_ACEOF
8355rm -f conftest.$ac_objext
ca81d7a0
JD
8356if { (ac_try="$ac_compile"
8357case "(($ac_try" in
8358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8359 *) ac_try_echo=$ac_try;;
8360esac
8361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8362 (eval "$ac_compile") 2>conftest.er1
96f3a036 8363 ac_status=$?
edfaf76d
LK
8364 grep -v '^ *+' conftest.er1 >conftest.err
8365 rm -f conftest.er1
8366 cat conftest.err >&5
96f3a036 8367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8368 (exit $ac_status); } && {
8369 test -z "$ac_c_werror_flag" ||
8370 test ! -s conftest.err
8371 } && test -s conftest.$ac_objext; then
96f3a036
DL
8372 ac_cv_member_struct_ifreq_ifr_flags=yes
8373else
8374 echo "$as_me: failed program was:" >&5
8375sed 's/^/| /' conftest.$ac_ext >&5
8376
ca81d7a0 8377 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8378/* confdefs.h. */
8379_ACEOF
8380cat confdefs.h >>conftest.$ac_ext
8381cat >>conftest.$ac_ext <<_ACEOF
8382/* end confdefs.h. */
7862d3a8
AS
8383$ac_includes_default
8384#if HAVE_SYS_SOCKET_H
8385#include <sys/socket.h>
8386#endif
8387#if HAVE_NET_IF_H
96f3a036 8388#include <net/if.h>
7862d3a8 8389#endif
96f3a036
DL
8390
8391int
8392main ()
8393{
8394static struct ifreq ac_aggr;
8395if (sizeof ac_aggr.ifr_flags)
8396return 0;
8397 ;
8398 return 0;
8399}
8400_ACEOF
8401rm -f conftest.$ac_objext
ca81d7a0
JD
8402if { (ac_try="$ac_compile"
8403case "(($ac_try" in
8404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8405 *) ac_try_echo=$ac_try;;
8406esac
8407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8408 (eval "$ac_compile") 2>conftest.er1
96f3a036 8409 ac_status=$?
edfaf76d
LK
8410 grep -v '^ *+' conftest.er1 >conftest.err
8411 rm -f conftest.er1
8412 cat conftest.err >&5
96f3a036 8413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8414 (exit $ac_status); } && {
8415 test -z "$ac_c_werror_flag" ||
8416 test ! -s conftest.err
8417 } && test -s conftest.$ac_objext; then
96f3a036
DL
8418 ac_cv_member_struct_ifreq_ifr_flags=yes
8419else
8420 echo "$as_me: failed program was:" >&5
8421sed 's/^/| /' conftest.$ac_ext >&5
8422
ca81d7a0 8423 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8424fi
ca81d7a0
JD
8425
8426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8427fi
ca81d7a0
JD
8428
8429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8430fi
ca81d7a0
JD
8431{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8432echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8433if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8434
8435cat >>confdefs.h <<_ACEOF
8436#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8437_ACEOF
8438
8439
8440fi
ca81d7a0
JD
8441{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8442echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8443if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8444 echo $ECHO_N "(cached) $ECHO_C" >&6
8445else
8446 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8447/* confdefs.h. */
8448_ACEOF
8449cat confdefs.h >>conftest.$ac_ext
8450cat >>conftest.$ac_ext <<_ACEOF
8451/* end confdefs.h. */
7862d3a8
AS
8452$ac_includes_default
8453#if HAVE_SYS_SOCKET_H
8454#include <sys/socket.h>
8455#endif
8456#if HAVE_NET_IF_H
96f3a036 8457#include <net/if.h>
7862d3a8 8458#endif
96f3a036
DL
8459
8460int
8461main ()
8462{
8463static struct ifreq ac_aggr;
8464if (ac_aggr.ifr_hwaddr)
8465return 0;
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
ca81d7a0
JD
8471if { (ac_try="$ac_compile"
8472case "(($ac_try" in
8473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8474 *) ac_try_echo=$ac_try;;
8475esac
8476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8477 (eval "$ac_compile") 2>conftest.er1
96f3a036 8478 ac_status=$?
edfaf76d
LK
8479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
96f3a036 8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8483 (exit $ac_status); } && {
8484 test -z "$ac_c_werror_flag" ||
8485 test ! -s conftest.err
8486 } && test -s conftest.$ac_objext; then
96f3a036
DL
8487 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8488else
8489 echo "$as_me: failed program was:" >&5
8490sed 's/^/| /' conftest.$ac_ext >&5
8491
ca81d7a0 8492 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8493/* confdefs.h. */
8494_ACEOF
8495cat confdefs.h >>conftest.$ac_ext
8496cat >>conftest.$ac_ext <<_ACEOF
8497/* end confdefs.h. */
7862d3a8
AS
8498$ac_includes_default
8499#if HAVE_SYS_SOCKET_H
8500#include <sys/socket.h>
8501#endif
8502#if HAVE_NET_IF_H
96f3a036 8503#include <net/if.h>
7862d3a8 8504#endif
96f3a036
DL
8505
8506int
8507main ()
8508{
8509static struct ifreq ac_aggr;
8510if (sizeof ac_aggr.ifr_hwaddr)
8511return 0;
8512 ;
8513 return 0;
8514}
8515_ACEOF
8516rm -f conftest.$ac_objext
ca81d7a0
JD
8517if { (ac_try="$ac_compile"
8518case "(($ac_try" in
8519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8520 *) ac_try_echo=$ac_try;;
8521esac
8522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8523 (eval "$ac_compile") 2>conftest.er1
96f3a036 8524 ac_status=$?
edfaf76d
LK
8525 grep -v '^ *+' conftest.er1 >conftest.err
8526 rm -f conftest.er1
8527 cat conftest.err >&5
96f3a036 8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8529 (exit $ac_status); } && {
8530 test -z "$ac_c_werror_flag" ||
8531 test ! -s conftest.err
8532 } && test -s conftest.$ac_objext; then
96f3a036
DL
8533 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8534else
8535 echo "$as_me: failed program was:" >&5
8536sed 's/^/| /' conftest.$ac_ext >&5
8537
ca81d7a0 8538 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8539fi
ca81d7a0
JD
8540
8541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8542fi
ca81d7a0
JD
8543
8544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8545fi
ca81d7a0
JD
8546{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8547echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8548if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8549
8550cat >>confdefs.h <<_ACEOF
8551#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8552_ACEOF
8553
8554
8555fi
ca81d7a0
JD
8556{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8557echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8558if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
8560else
8561 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8562/* confdefs.h. */
8563_ACEOF
8564cat confdefs.h >>conftest.$ac_ext
8565cat >>conftest.$ac_ext <<_ACEOF
8566/* end confdefs.h. */
7862d3a8
AS
8567$ac_includes_default
8568#if HAVE_SYS_SOCKET_H
8569#include <sys/socket.h>
8570#endif
8571#if HAVE_NET_IF_H
96f3a036 8572#include <net/if.h>
7862d3a8 8573#endif
96f3a036
DL
8574
8575int
8576main ()
8577{
8578static struct ifreq ac_aggr;
8579if (ac_aggr.ifr_netmask)
8580return 0;
8581 ;
8582 return 0;
8583}
8584_ACEOF
8585rm -f conftest.$ac_objext
ca81d7a0
JD
8586if { (ac_try="$ac_compile"
8587case "(($ac_try" in
8588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8589 *) ac_try_echo=$ac_try;;
8590esac
8591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8592 (eval "$ac_compile") 2>conftest.er1
96f3a036 8593 ac_status=$?
edfaf76d
LK
8594 grep -v '^ *+' conftest.er1 >conftest.err
8595 rm -f conftest.er1
8596 cat conftest.err >&5
96f3a036 8597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8598 (exit $ac_status); } && {
8599 test -z "$ac_c_werror_flag" ||
8600 test ! -s conftest.err
8601 } && test -s conftest.$ac_objext; then
96f3a036
DL
8602 ac_cv_member_struct_ifreq_ifr_netmask=yes
8603else
8604 echo "$as_me: failed program was:" >&5
8605sed 's/^/| /' conftest.$ac_ext >&5
8606
ca81d7a0 8607 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8608/* confdefs.h. */
8609_ACEOF
8610cat confdefs.h >>conftest.$ac_ext
8611cat >>conftest.$ac_ext <<_ACEOF
8612/* end confdefs.h. */
7862d3a8
AS
8613$ac_includes_default
8614#if HAVE_SYS_SOCKET_H
8615#include <sys/socket.h>
8616#endif
8617#if HAVE_NET_IF_H
96f3a036 8618#include <net/if.h>
7862d3a8 8619#endif
96f3a036
DL
8620
8621int
8622main ()
8623{
8624static struct ifreq ac_aggr;
8625if (sizeof ac_aggr.ifr_netmask)
8626return 0;
8627 ;
8628 return 0;
8629}
8630_ACEOF
8631rm -f conftest.$ac_objext
ca81d7a0
JD
8632if { (ac_try="$ac_compile"
8633case "(($ac_try" in
8634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8635 *) ac_try_echo=$ac_try;;
8636esac
8637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8638 (eval "$ac_compile") 2>conftest.er1
96f3a036 8639 ac_status=$?
edfaf76d
LK
8640 grep -v '^ *+' conftest.er1 >conftest.err
8641 rm -f conftest.er1
8642 cat conftest.err >&5
96f3a036 8643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8644 (exit $ac_status); } && {
8645 test -z "$ac_c_werror_flag" ||
8646 test ! -s conftest.err
8647 } && test -s conftest.$ac_objext; then
96f3a036
DL
8648 ac_cv_member_struct_ifreq_ifr_netmask=yes
8649else
8650 echo "$as_me: failed program was:" >&5
8651sed 's/^/| /' conftest.$ac_ext >&5
8652
ca81d7a0 8653 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8654fi
ca81d7a0
JD
8655
8656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8657fi
ca81d7a0
JD
8658
8659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8660fi
ca81d7a0
JD
8661{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8662echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8663if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8664
8665cat >>confdefs.h <<_ACEOF
8666#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8667_ACEOF
8668
8669
8670fi
ca81d7a0
JD
8671{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8672echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8673if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8674 echo $ECHO_N "(cached) $ECHO_C" >&6
8675else
8676 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8677/* confdefs.h. */
8678_ACEOF
8679cat confdefs.h >>conftest.$ac_ext
8680cat >>conftest.$ac_ext <<_ACEOF
8681/* end confdefs.h. */
7862d3a8
AS
8682$ac_includes_default
8683#if HAVE_SYS_SOCKET_H
8684#include <sys/socket.h>
8685#endif
8686#if HAVE_NET_IF_H
96f3a036 8687#include <net/if.h>
7862d3a8 8688#endif
96f3a036
DL
8689
8690int
8691main ()
8692{
8693static struct ifreq ac_aggr;
8694if (ac_aggr.ifr_broadaddr)
8695return 0;
8696 ;
8697 return 0;
8698}
8699_ACEOF
8700rm -f conftest.$ac_objext
ca81d7a0
JD
8701if { (ac_try="$ac_compile"
8702case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
8706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8707 (eval "$ac_compile") 2>conftest.er1
96f3a036 8708 ac_status=$?
edfaf76d
LK
8709 grep -v '^ *+' conftest.er1 >conftest.err
8710 rm -f conftest.er1
8711 cat conftest.err >&5
96f3a036 8712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8713 (exit $ac_status); } && {
8714 test -z "$ac_c_werror_flag" ||
8715 test ! -s conftest.err
8716 } && test -s conftest.$ac_objext; then
96f3a036
DL
8717 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8718else
8719 echo "$as_me: failed program was:" >&5
8720sed 's/^/| /' conftest.$ac_ext >&5
8721
ca81d7a0 8722 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8723/* confdefs.h. */
8724_ACEOF
8725cat confdefs.h >>conftest.$ac_ext
8726cat >>conftest.$ac_ext <<_ACEOF
8727/* end confdefs.h. */
7862d3a8
AS
8728$ac_includes_default
8729#if HAVE_SYS_SOCKET_H
8730#include <sys/socket.h>
8731#endif
8732#if HAVE_NET_IF_H
96f3a036 8733#include <net/if.h>
7862d3a8 8734#endif
96f3a036
DL
8735
8736int
8737main ()
8738{
8739static struct ifreq ac_aggr;
8740if (sizeof ac_aggr.ifr_broadaddr)
8741return 0;
8742 ;
8743 return 0;
8744}
8745_ACEOF
8746rm -f conftest.$ac_objext
ca81d7a0
JD
8747if { (ac_try="$ac_compile"
8748case "(($ac_try" in
8749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8750 *) ac_try_echo=$ac_try;;
8751esac
8752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8753 (eval "$ac_compile") 2>conftest.er1
96f3a036 8754 ac_status=$?
edfaf76d
LK
8755 grep -v '^ *+' conftest.er1 >conftest.err
8756 rm -f conftest.er1
8757 cat conftest.err >&5
96f3a036 8758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8759 (exit $ac_status); } && {
8760 test -z "$ac_c_werror_flag" ||
8761 test ! -s conftest.err
8762 } && test -s conftest.$ac_objext; then
96f3a036
DL
8763 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8764else
8765 echo "$as_me: failed program was:" >&5
8766sed 's/^/| /' conftest.$ac_ext >&5
8767
ca81d7a0 8768 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8769fi
ca81d7a0
JD
8770
8771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8772fi
ca81d7a0
JD
8773
8774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8775fi
ca81d7a0
JD
8776{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8777echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8778if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8779
8780cat >>confdefs.h <<_ACEOF
8781#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8782_ACEOF
8783
8784
8785fi
ca81d7a0
JD
8786{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8787echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8788if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8789 echo $ECHO_N "(cached) $ECHO_C" >&6
8790else
8791 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
7862d3a8
AS
8797$ac_includes_default
8798#if HAVE_SYS_SOCKET_H
8799#include <sys/socket.h>
8800#endif
8801#if HAVE_NET_IF_H
96f3a036 8802#include <net/if.h>
7862d3a8 8803#endif
96f3a036
DL
8804
8805int
8806main ()
8807{
8808static struct ifreq ac_aggr;
8809if (ac_aggr.ifr_addr)
8810return 0;
8811 ;
8812 return 0;
8813}
8814_ACEOF
8815rm -f conftest.$ac_objext
ca81d7a0
JD
8816if { (ac_try="$ac_compile"
8817case "(($ac_try" in
8818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8819 *) ac_try_echo=$ac_try;;
8820esac
8821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8822 (eval "$ac_compile") 2>conftest.er1
96f3a036 8823 ac_status=$?
edfaf76d
LK
8824 grep -v '^ *+' conftest.er1 >conftest.err
8825 rm -f conftest.er1
8826 cat conftest.err >&5
96f3a036 8827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8828 (exit $ac_status); } && {
8829 test -z "$ac_c_werror_flag" ||
8830 test ! -s conftest.err
8831 } && test -s conftest.$ac_objext; then
96f3a036
DL
8832 ac_cv_member_struct_ifreq_ifr_addr=yes
8833else
8834 echo "$as_me: failed program was:" >&5
8835sed 's/^/| /' conftest.$ac_ext >&5
8836
ca81d7a0 8837 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8838/* confdefs.h. */
8839_ACEOF
8840cat confdefs.h >>conftest.$ac_ext
8841cat >>conftest.$ac_ext <<_ACEOF
8842/* end confdefs.h. */
7862d3a8
AS
8843$ac_includes_default
8844#if HAVE_SYS_SOCKET_H
8845#include <sys/socket.h>
8846#endif
8847#if HAVE_NET_IF_H
96f3a036 8848#include <net/if.h>
7862d3a8 8849#endif
96f3a036
DL
8850
8851int
8852main ()
8853{
8854static struct ifreq ac_aggr;
8855if (sizeof ac_aggr.ifr_addr)
8856return 0;
8857 ;
8858 return 0;
8859}
8860_ACEOF
8861rm -f conftest.$ac_objext
ca81d7a0
JD
8862if { (ac_try="$ac_compile"
8863case "(($ac_try" in
8864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8865 *) ac_try_echo=$ac_try;;
8866esac
8867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8868 (eval "$ac_compile") 2>conftest.er1
96f3a036 8869 ac_status=$?
edfaf76d
LK
8870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
96f3a036 8873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8874 (exit $ac_status); } && {
8875 test -z "$ac_c_werror_flag" ||
8876 test ! -s conftest.err
8877 } && test -s conftest.$ac_objext; then
96f3a036
DL
8878 ac_cv_member_struct_ifreq_ifr_addr=yes
8879else
8880 echo "$as_me: failed program was:" >&5
8881sed 's/^/| /' conftest.$ac_ext >&5
8882
ca81d7a0 8883 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8884fi
ca81d7a0
JD
8885
8886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8887fi
ca81d7a0
JD
8888
8889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8890fi
ca81d7a0
JD
8891{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8892echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8893if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8894
8895cat >>confdefs.h <<_ACEOF
8896#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8897_ACEOF
8898
8899
8900fi
8901
8799b3e4 8902
8799b3e4 8903
ca81d7a0
JD
8904{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8905echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8906if test "$ac_cv_prog_cc_c89" != no; then
8907 { echo "$as_me:$LINENO: result: yes" >&5
8908echo "${ECHO_T}yes" >&6; }
98418dba 8909
c0d27fcc 8910cat >>confdefs.h <<\_ACEOF
98418dba 8911#define PROTOTYPES 1
c0d27fcc
MR
8912_ACEOF
8913
8914
8915cat >>confdefs.h <<\_ACEOF
8916#define __PROTOTYPES 1
8917_ACEOF
98418dba
CW
8918
8919else
ca81d7a0
JD
8920 { echo "$as_me:$LINENO: result: no" >&5
8921echo "${ECHO_T}no" >&6; }
98418dba
CW
8922fi
8923
ca81d7a0
JD
8924{ echo "$as_me:$LINENO: checking for working volatile" >&5
8925echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8926if test "${ac_cv_c_volatile+set}" = set; then
8927 echo $ECHO_N "(cached) $ECHO_C" >&6
8928else
8929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8930/* confdefs.h. */
8931_ACEOF
8932cat confdefs.h >>conftest.$ac_ext
8933cat >>conftest.$ac_ext <<_ACEOF
8934/* end confdefs.h. */
98418dba 8935
98418dba
CW
8936int
8937main ()
8938{
8939
8940volatile int x;
ca81d7a0
JD
8941int * volatile y = (int *) 0;
8942return !x && !y;
98418dba
CW
8943 ;
8944 return 0;
8945}
8946_ACEOF
8947rm -f conftest.$ac_objext
ca81d7a0
JD
8948if { (ac_try="$ac_compile"
8949case "(($ac_try" in
8950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8951 *) ac_try_echo=$ac_try;;
8952esac
8953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8954 (eval "$ac_compile") 2>conftest.er1
98418dba 8955 ac_status=$?
edfaf76d
LK
8956 grep -v '^ *+' conftest.er1 >conftest.err
8957 rm -f conftest.er1
8958 cat conftest.err >&5
c0d27fcc 8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8960 (exit $ac_status); } && {
8961 test -z "$ac_c_werror_flag" ||
8962 test ! -s conftest.err
8963 } && test -s conftest.$ac_objext; then
98418dba
CW
8964 ac_cv_c_volatile=yes
8965else
8966 echo "$as_me: failed program was:" >&5
19650fd6
AS
8967sed 's/^/| /' conftest.$ac_ext >&5
8968
ca81d7a0 8969 ac_cv_c_volatile=no
98418dba 8970fi
ca81d7a0
JD
8971
8972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8973fi
ca81d7a0
JD
8974{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8975echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8976if test $ac_cv_c_volatile = no; then
8977
c0d27fcc 8978cat >>confdefs.h <<\_ACEOF
98418dba 8979#define volatile
c0d27fcc 8980_ACEOF
98418dba
CW
8981
8982fi
8983
ca81d7a0
JD
8984{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8985echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8986if test "${ac_cv_c_const+set}" = set; then
8987 echo $ECHO_N "(cached) $ECHO_C" >&6
8988else
8989 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8990/* confdefs.h. */
8991_ACEOF
8992cat confdefs.h >>conftest.$ac_ext
8993cat >>conftest.$ac_ext <<_ACEOF
8994/* end confdefs.h. */
98418dba 8995
98418dba
CW
8996int
8997main ()
8998{
8999/* FIXME: Include the comments suggested by Paul. */
9000#ifndef __cplusplus
9001 /* Ultrix mips cc rejects this. */
9002 typedef int charset[2];
f053c89f 9003 const charset cs;
98418dba 9004 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
9005 char const *const *pcpcc;
9006 char **ppc;
98418dba
CW
9007 /* NEC SVR4.0.2 mips cc rejects this. */
9008 struct point {int x, y;};
9009 static struct point const zero = {0,0};
9010 /* AIX XL C 1.02.0.0 rejects this.
9011 It does not let you subtract one const X* pointer from another in
9012 an arm of an if-expression whose if-part is not a constant
9013 expression */
9014 const char *g = "string";
f053c89f 9015 pcpcc = &g + (g ? g-g : 0);
98418dba 9016 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
9017 ++pcpcc;
9018 ppc = (char**) pcpcc;
9019 pcpcc = (char const *const *) ppc;
98418dba
CW
9020 { /* SCO 3.2v4 cc rejects this. */
9021 char *t;
9022 char const *s = 0 ? (char *) 0 : (char const *) 0;
9023
9024 *t++ = 0;
ca81d7a0 9025 if (s) return 0;
98418dba
CW
9026 }
9027 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
9028 int x[] = {25, 17};
9029 const int *foo = &x[0];
9030 ++foo;
9031 }
9032 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9033 typedef const int *iptr;
9034 iptr p = 0;
9035 ++p;
9036 }
9037 { /* AIX XL C 1.02.0.0 rejects this saying
9038 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9039 struct s { int j; const int *ap[3]; };
9040 struct s *b; b->j = 5;
9041 }
9042 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9043 const int foo = 10;
ca81d7a0 9044 if (!foo) return 0;
98418dba 9045 }
f053c89f 9046 return !cs[0] && !zero.x;
98418dba
CW
9047#endif
9048
9049 ;
9050 return 0;
9051}
9052_ACEOF
9053rm -f conftest.$ac_objext
ca81d7a0
JD
9054if { (ac_try="$ac_compile"
9055case "(($ac_try" in
9056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9057 *) ac_try_echo=$ac_try;;
9058esac
9059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9060 (eval "$ac_compile") 2>conftest.er1
98418dba 9061 ac_status=$?
edfaf76d
LK
9062 grep -v '^ *+' conftest.er1 >conftest.err
9063 rm -f conftest.er1
9064 cat conftest.err >&5
c0d27fcc 9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9066 (exit $ac_status); } && {
9067 test -z "$ac_c_werror_flag" ||
9068 test ! -s conftest.err
9069 } && test -s conftest.$ac_objext; then
98418dba
CW
9070 ac_cv_c_const=yes
9071else
9072 echo "$as_me: failed program was:" >&5
19650fd6
AS
9073sed 's/^/| /' conftest.$ac_ext >&5
9074
ca81d7a0 9075 ac_cv_c_const=no
98418dba 9076fi
ca81d7a0
JD
9077
9078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9079fi
ca81d7a0
JD
9080{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9081echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
9082if test $ac_cv_c_const = no; then
9083
c0d27fcc 9084cat >>confdefs.h <<\_ACEOF
98418dba 9085#define const
c0d27fcc 9086_ACEOF
98418dba
CW
9087
9088fi
9089
ca81d7a0
JD
9090{ echo "$as_me:$LINENO: checking for void * support" >&5
9091echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
9092if test "${emacs_cv_void_star+set}" = set; then
9093 echo $ECHO_N "(cached) $ECHO_C" >&6
9094else
9095 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
98418dba 9101
98418dba
CW
9102int
9103main ()
9104{
9105void * foo;
9106 ;
9107 return 0;
9108}
9109_ACEOF
9110rm -f conftest.$ac_objext
ca81d7a0
JD
9111if { (ac_try="$ac_compile"
9112case "(($ac_try" in
9113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9114 *) ac_try_echo=$ac_try;;
9115esac
9116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9117 (eval "$ac_compile") 2>conftest.er1
98418dba 9118 ac_status=$?
edfaf76d
LK
9119 grep -v '^ *+' conftest.er1 >conftest.err
9120 rm -f conftest.er1
9121 cat conftest.err >&5
c0d27fcc 9122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9123 (exit $ac_status); } && {
9124 test -z "$ac_c_werror_flag" ||
9125 test ! -s conftest.err
9126 } && test -s conftest.$ac_objext; then
98418dba
CW
9127 emacs_cv_void_star=yes
9128else
9129 echo "$as_me: failed program was:" >&5
19650fd6
AS
9130sed 's/^/| /' conftest.$ac_ext >&5
9131
ca81d7a0 9132 emacs_cv_void_star=no
98418dba 9133fi
ca81d7a0
JD
9134
9135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9136fi
ca81d7a0
JD
9137{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9138echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9139if test $emacs_cv_void_star = yes; then
c0d27fcc 9140 cat >>confdefs.h <<\_ACEOF
98418dba 9141#define POINTER_TYPE void
c0d27fcc 9142_ACEOF
98418dba
CW
9143
9144else
c0d27fcc 9145 cat >>confdefs.h <<\_ACEOF
98418dba 9146#define POINTER_TYPE char
c0d27fcc 9147_ACEOF
98418dba
CW
9148
9149fi
9150
c0d27fcc 9151
4494a266
JD
9152
9153
cd958eb3 9154
ca81d7a0
JD
9155{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9156echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9157set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9158if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
c0d27fcc 9161 cat >conftest.make <<\_ACEOF
ca81d7a0 9162SHELL = /bin/sh
98418dba 9163all:
ca81d7a0 9164 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9165_ACEOF
98418dba 9166# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9167case `${MAKE-make} -f conftest.make 2>/dev/null` in
9168 *@@@%%%=?*=@@@%%%*)
9169 eval ac_cv_prog_make_${ac_make}_set=yes;;
9170 *)
9171 eval ac_cv_prog_make_${ac_make}_set=no;;
9172esac
98418dba
CW
9173rm -f conftest.make
9174fi
ca81d7a0
JD
9175if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9176 { echo "$as_me:$LINENO: result: yes" >&5
9177echo "${ECHO_T}yes" >&6; }
98418dba
CW
9178 SET_MAKE=
9179else
ca81d7a0
JD
9180 { echo "$as_me:$LINENO: result: no" >&5
9181echo "${ECHO_T}no" >&6; }
98418dba
CW
9182 SET_MAKE="MAKE=${MAKE-make}"
9183fi
9184
c0d27fcc 9185
ca81d7a0
JD
9186{ echo "$as_me:$LINENO: checking for long file names" >&5
9187echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9188if test "${ac_cv_sys_long_file_names+set}" = set; then
9189 echo $ECHO_N "(cached) $ECHO_C" >&6
9190else
9191 ac_cv_sys_long_file_names=yes
9192# Test for long file names in all the places we know might matter:
9193# . the current directory, where building will happen
9194# $prefix/lib where we will be installing things
9195# $exec_prefix/lib likewise
98418dba 9196# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9197# /tmp where it might want to write temporary files
9198# /var/tmp likewise
9199# /usr/tmp likewise
ca81d7a0
JD
9200for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9201 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9202 # in the usual case where exec_prefix is '${prefix}'.
9203 case $ac_dir in #(
9204 . | /* | ?:[\\/]*) ;; #(
9205 *) continue;;
9206 esac
9207 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9208 ac_xdir=$ac_dir/cf$$
ca81d7a0 9209 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9210 ac_tf1=$ac_xdir/conftest9012345
9211 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9212 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9213 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9214 rm -f -r "$ac_xdir" 2>/dev/null
9215 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9216done
9217fi
ca81d7a0
JD
9218{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9219echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9220if test $ac_cv_sys_long_file_names = yes; then
9221
c0d27fcc 9222cat >>confdefs.h <<\_ACEOF
98418dba 9223#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9224_ACEOF
98418dba
CW
9225
9226fi
9227
c0d27fcc 9228
98418dba
CW
9229#### Choose a window system.
9230
ca81d7a0
JD
9231{ echo "$as_me:$LINENO: checking for X" >&5
9232echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9233
c0d27fcc 9234
ca81d7a0 9235# Check whether --with-x was given.
98418dba 9236if test "${with_x+set}" = set; then
ca81d7a0
JD
9237 withval=$with_x;
9238fi
98418dba 9239
98418dba
CW
9240# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9241if test "x$with_x" = xno; then
9242 # The user explicitly disabled X.
9243 have_x=disabled
9244else
ca81d7a0
JD
9245 case $x_includes,$x_libraries in #(
9246 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9247echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9248 { (exit 1); exit 1; }; };; #(
9249 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9250 echo $ECHO_N "(cached) $ECHO_C" >&6
9251else
9252 # One or both of the vars are not set, and there is no cached value.
9253ac_x_includes=no ac_x_libraries=no
ca81d7a0 9254rm -f -r conftest.dir
98418dba
CW
9255if mkdir conftest.dir; then
9256 cd conftest.dir
c0d27fcc 9257 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9258incroot:
9259 @echo incroot='${INCROOT}'
9260usrlibdir:
9261 @echo usrlibdir='${USRLIBDIR}'
9262libdir:
9263 @echo libdir='${LIBDIR}'
9264_ACEOF
9265 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9266 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9267 for ac_var in incroot usrlibdir libdir; do
9268 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9269 done
98418dba
CW
9270 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9271 for ac_extension in a so sl; do
ca81d7a0
JD
9272 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9273 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9274 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9275 fi
9276 done
9277 # Screen out bogus values from the imake configuration. They are
9278 # bogus both because they are the default anyway, and because
9279 # using them would break gcc on systems where it needs fixed includes.
9280 case $ac_im_incroot in
ca81d7a0 9281 /usr/include) ac_x_includes= ;;
98418dba
CW
9282 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9283 esac
9284 case $ac_im_usrlibdir in
9285 /usr/lib | /lib) ;;
9286 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9287 esac
9288 fi
9289 cd ..
ca81d7a0 9290 rm -f -r conftest.dir
98418dba
CW
9291fi
9292
9293# Standard set of common directories for X headers.
9294# Check X11 before X11Rn because it is often a symlink to the current release.
9295ac_x_header_dirs='
9296/usr/X11/include
9297/usr/X11R6/include
9298/usr/X11R5/include
9299/usr/X11R4/include
9300
9301/usr/include/X11
9302/usr/include/X11R6
9303/usr/include/X11R5
9304/usr/include/X11R4
9305
9306/usr/local/X11/include
9307/usr/local/X11R6/include
9308/usr/local/X11R5/include
9309/usr/local/X11R4/include
9310
9311/usr/local/include/X11
9312/usr/local/include/X11R6
9313/usr/local/include/X11R5
9314/usr/local/include/X11R4
9315
9316/usr/X386/include
9317/usr/x386/include
9318/usr/XFree86/include/X11
9319
9320/usr/include
9321/usr/local/include
9322/usr/unsupported/include
9323/usr/athena/include
9324/usr/local/x11r5/include
9325/usr/lpp/Xamples/include
9326
9327/usr/openwin/include
9328/usr/openwin/share/include'
9329
9330if test "$ac_x_includes" = no; then
ca81d7a0 9331 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9332 # First, try using that file with no special directory specified.
9333 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9334/* confdefs.h. */
9335_ACEOF
9336cat confdefs.h >>conftest.$ac_ext
9337cat >>conftest.$ac_ext <<_ACEOF
9338/* end confdefs.h. */
ca81d7a0 9339#include <X11/Xlib.h>
98418dba 9340_ACEOF
ca81d7a0
JD
9341if { (ac_try="$ac_cpp conftest.$ac_ext"
9342case "(($ac_try" in
9343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9344 *) ac_try_echo=$ac_try;;
9345esac
9346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9347 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9348 ac_status=$?
6bae0ccf 9349 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9350 rm -f conftest.er1
9351 cat conftest.err >&5
c0d27fcc 9352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9353 (exit $ac_status); } >/dev/null && {
9354 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9355 test ! -s conftest.err
9356 }; then
98418dba
CW
9357 # We can compile using X headers with no special include directory.
9358ac_x_includes=
9359else
9360 echo "$as_me: failed program was:" >&5
19650fd6
AS
9361sed 's/^/| /' conftest.$ac_ext >&5
9362
98418dba 9363 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9364 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9365 ac_x_includes=$ac_dir
9366 break
9367 fi
9368done
9369fi
ca81d7a0 9370
98418dba
CW
9371rm -f conftest.err conftest.$ac_ext
9372fi # $ac_x_includes = no
9373
9374if test "$ac_x_libraries" = no; then
9375 # Check for the libraries.
9376 # See if we find them without any special options.
9377 # Don't add to $LIBS permanently.
9378 ac_save_LIBS=$LIBS
f053c89f 9379 LIBS="-lX11 $LIBS"
98418dba 9380 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9381/* confdefs.h. */
9382_ACEOF
9383cat confdefs.h >>conftest.$ac_ext
9384cat >>conftest.$ac_ext <<_ACEOF
9385/* end confdefs.h. */
ca81d7a0 9386#include <X11/Xlib.h>
98418dba
CW
9387int
9388main ()
9389{
ca81d7a0 9390XrmInitialize ()
98418dba
CW
9391 ;
9392 return 0;
9393}
9394_ACEOF
9395rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9396if { (ac_try="$ac_link"
9397case "(($ac_try" in
9398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9399 *) ac_try_echo=$ac_try;;
9400esac
9401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9402 (eval "$ac_link") 2>conftest.er1
98418dba 9403 ac_status=$?
edfaf76d
LK
9404 grep -v '^ *+' conftest.er1 >conftest.err
9405 rm -f conftest.er1
9406 cat conftest.err >&5
c0d27fcc 9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9408 (exit $ac_status); } && {
9409 test -z "$ac_c_werror_flag" ||
9410 test ! -s conftest.err
9411 } && test -s conftest$ac_exeext &&
9412 $as_test_x conftest$ac_exeext; then
98418dba
CW
9413 LIBS=$ac_save_LIBS
9414# We can link X programs with no special library path.
9415ac_x_libraries=
9416else
9417 echo "$as_me: failed program was:" >&5
19650fd6
AS
9418sed 's/^/| /' conftest.$ac_ext >&5
9419
ca81d7a0 9420 LIBS=$ac_save_LIBS
98418dba
CW
9421for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9422do
9423 # Don't even attempt the hair of trying to link an X program!
9424 for ac_extension in a so sl; do
f053c89f 9425 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9426 ac_x_libraries=$ac_dir
9427 break 2
9428 fi
9429 done
9430done
9431fi
ca81d7a0 9432
f053c89f 9433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9434 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9435fi # $ac_x_libraries = no
9436
ca81d7a0
JD
9437case $ac_x_includes,$ac_x_libraries in #(
9438 no,* | *,no | *\'*)
9439 # Didn't find X, or a directory has "'" in its name.
9440 ac_cv_have_x="have_x=no";; #(
9441 *)
9442 # Record where we found X for the cache.
9443 ac_cv_have_x="have_x=yes\
9444 ac_x_includes='$ac_x_includes'\
9445 ac_x_libraries='$ac_x_libraries'"
9446esac
98418dba 9447fi
ca81d7a0
JD
9448;; #(
9449 *) have_x=yes;;
9450 esac
98418dba
CW
9451 eval "$ac_cv_have_x"
9452fi # $with_x != no
9453
9454if test "$have_x" != yes; then
ca81d7a0
JD
9455 { echo "$as_me:$LINENO: result: $have_x" >&5
9456echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9457 no_x=yes
9458else
9459 # If each of the values was on the command line, it overrides each guess.
9460 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9461 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9462 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9463 ac_cv_have_x="have_x=yes\
9464 ac_x_includes='$x_includes'\
9465 ac_x_libraries='$x_libraries'"
9466 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9467echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9468fi
9469
9470if test "$no_x" = yes; then
9471 window_system=none
9472else
9473 window_system=x11
9474fi
9475
92d1ccf4
AS
9476if test "${x_libraries}" != NONE; then
9477 if test -n "${x_libraries}"; then
9478 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9479 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9480 fi
98418dba 9481 x_default_search_path=""
92d1ccf4
AS
9482 x_search_path=${x_libraries}
9483 if test -z "${x_search_path}"; then
9484 x_search_path=/usr/lib
9485 fi
9486 for x_library in `echo ${x_search_path}: | \
9487 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9488 x_search_path="\
9489${x_library}/X11/%L/%T/%N%C%S:\
9490${x_library}/X11/%l/%T/%N%C%S:\
9491${x_library}/X11/%T/%N%C%S:\
9492${x_library}/X11/%L/%T/%N%S:\
9493${x_library}/X11/%l/%T/%N%S:\
9494${x_library}/X11/%T/%N%S"
9495 if test x"${x_default_search_path}" = x; then
9496 x_default_search_path=${x_search_path}
9497 else
9498 x_default_search_path="${x_search_path}:${x_default_search_path}"
9499 fi
9500 done
9501fi
9502if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9503 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9504fi
9505
9506if test x"${x_includes}" = x; then
9507 bitmapdir=/usr/include/X11/bitmaps
9508else
9509 # accumulate include directories that have X11 bitmap subdirectories
9510 bmd_acc="dummyval"
9511 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9512 if test -d "${bmd}/X11/bitmaps"; then
9513 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9514 fi
9515 if test -d "${bmd}/bitmaps"; then
9516 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9517 fi
9518 done
9519 if test ${bmd_acc} != "dummyval"; then
9520 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9521 fi
9522fi
9523
5d6da11e 9524HAVE_CARBON=no
1d4d5604
YM
9525if test "${with_carbon}" != no; then
9526 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9527 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9528echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9529if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9530 echo $ECHO_N "(cached) $ECHO_C" >&6
9531fi
ca81d7a0
JD
9532{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9533echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9534else
9535 # Is the header compilable?
ca81d7a0
JD
9536{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9537echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9538cat >conftest.$ac_ext <<_ACEOF
9539/* confdefs.h. */
9540_ACEOF
9541cat confdefs.h >>conftest.$ac_ext
9542cat >>conftest.$ac_ext <<_ACEOF
9543/* end confdefs.h. */
9544$ac_includes_default
9545#include <Carbon/Carbon.h>
9546_ACEOF
9547rm -f conftest.$ac_objext
ca81d7a0
JD
9548if { (ac_try="$ac_compile"
9549case "(($ac_try" in
9550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9551 *) ac_try_echo=$ac_try;;
9552esac
9553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9554 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9555 ac_status=$?
edfaf76d
LK
9556 grep -v '^ *+' conftest.er1 >conftest.err
9557 rm -f conftest.er1
9558 cat conftest.err >&5
5d6da11e 9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9560 (exit $ac_status); } && {
9561 test -z "$ac_c_werror_flag" ||
9562 test ! -s conftest.err
9563 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9564 ac_header_compiler=yes
9565else
9566 echo "$as_me: failed program was:" >&5
9567sed 's/^/| /' conftest.$ac_ext >&5
9568
ca81d7a0 9569 ac_header_compiler=no
5d6da11e 9570fi
ca81d7a0
JD
9571
9572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9573{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9574echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9575
9576# Is the header present?
ca81d7a0
JD
9577{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9578echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9579cat >conftest.$ac_ext <<_ACEOF
9580/* confdefs.h. */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h. */
9585#include <Carbon/Carbon.h>
9586_ACEOF
ca81d7a0
JD
9587if { (ac_try="$ac_cpp conftest.$ac_ext"
9588case "(($ac_try" in
9589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9590 *) ac_try_echo=$ac_try;;
9591esac
9592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9593 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9594 ac_status=$?
9595 grep -v '^ *+' conftest.er1 >conftest.err
9596 rm -f conftest.er1
9597 cat conftest.err >&5
9598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9599 (exit $ac_status); } >/dev/null && {
9600 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9601 test ! -s conftest.err
9602 }; then
5d6da11e
YM
9603 ac_header_preproc=yes
9604else
9605 echo "$as_me: failed program was:" >&5
9606sed 's/^/| /' conftest.$ac_ext >&5
9607
9608 ac_header_preproc=no
9609fi
ca81d7a0 9610
5d6da11e 9611rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9612{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9613echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9614
9615# So? What about this header?
edfaf76d
LK
9616case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9617 yes:no: )
5d6da11e
YM
9618 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9619echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9620 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9621echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9622 ac_header_preproc=yes
5d6da11e 9623 ;;
edfaf76d 9624 no:yes:* )
5d6da11e
YM
9625 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9626echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9627 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9628echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9629 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9630echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9631 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9632echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9633 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9634echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9635 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9636echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9637
5d6da11e
YM
9638 ;;
9639esac
ca81d7a0
JD
9640{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9641echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9642if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9643 echo $ECHO_N "(cached) $ECHO_C" >&6
9644else
9645 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9646fi
ca81d7a0
JD
9647{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9648echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9649
9650fi
9651if test $ac_cv_header_Carbon_Carbon_h = yes; then
9652 HAVE_CARBON=yes
9653fi
9654
9655
1d4d5604
YM
9656fi
9657if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9658 if test "${with_carbon+set}" != set \
9659 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9660 for var in with_x with_x_toolkit with_gtk with_xim \
9661 with_xpm with_jpeg with_tiff with_gif with_png; do
9662 if eval test \"\${$var+set}\" = set; then
9663 HAVE_CARBON=no
9664 break
9665 fi
9666 done
5d6da11e
YM
9667 fi
9668fi
1d4d5604
YM
9669if test "${HAVE_CARBON}" = yes; then
9670 window_system=mac
9671fi
9672
9673case "${window_system}" in
9674 x11 )
9675 HAVE_X_WINDOWS=yes
9676 HAVE_X11=yes
9677 case "${with_x_toolkit}" in
9678 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9679 motif ) USE_X_TOOLKIT=MOTIF ;;
9680 gtk ) with_gtk=yes
9681 USE_X_TOOLKIT=none ;;
9682 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9683 * )
9684 if test x"$with_gtk" = xyes; then
9685 USE_X_TOOLKIT=none
9686 else
9687 USE_X_TOOLKIT=maybe
9688 fi
9689 ;;
1d4d5604
YM
9690 esac
9691 ;;
9692 mac | none )
9693 HAVE_X_WINDOWS=no
9694 HAVE_X11=no
9695 USE_X_TOOLKIT=none
9696 ;;
9697esac
9698
cfe440b8
JD
9699if test "$window_system" = none && test "X$with_x" != "Xno"; then
9700 # Extract the first word of "X", so it can be a program name with args.
9701set dummy X; ac_word=$2
9702{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9704if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9705 echo $ECHO_N "(cached) $ECHO_C" >&6
9706else
9707 if test -n "$HAVE_XSERVER"; then
9708 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9709else
9710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9711for as_dir in $PATH
9712do
9713 IFS=$as_save_IFS
9714 test -z "$as_dir" && as_dir=.
9715 for ac_exec_ext in '' $ac_executable_extensions; do
9716 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9717 ac_cv_prog_HAVE_XSERVER="true"
9718 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9719 break 2
9720 fi
9721done
9722done
9723IFS=$as_save_IFS
9724
9725 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9726fi
9727fi
9728HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9729if test -n "$HAVE_XSERVER"; then
9730 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9731echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9732else
9733 { echo "$as_me:$LINENO: result: no" >&5
9734echo "${ECHO_T}no" >&6; }
9735fi
9736
9737
9738 if test "$HAVE_XSERVER" = true ||
9739 test -n "$DISPLAY" ||
9740 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9741 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9742were found. You should install the relevant development files for X
9743and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9744sure you have development files for image handling, i.e.
9745tiff, gif, jpeg, png and xpm.
9746If you are sure you want Emacs compiled without X window support, pass
9747 --without-x
9748to configure." >&5
9749echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9750were found. You should install the relevant development files for X
9751and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9752sure you have development files for image handling, i.e.
9753tiff, gif, jpeg, png and xpm.
9754If you are sure you want Emacs compiled without X window support, pass
9755 --without-x
9756to configure." >&2;}
9757 { (exit 1); exit 1; }; }
9758 fi
9759fi
9760
1d4d5604
YM
9761### If we're using X11, we should use the X menu package.
9762HAVE_MENUS=no
9763case ${HAVE_X11} in
9764 yes ) HAVE_MENUS=yes ;;
9765esac
9766
9767if test "${opsys}" = "hpux9"; then
9768 case "${x_libraries}" in
9769 *X11R4* )
9770 opsysfile="s/hpux9-x11r4.h"
9771 ;;
9772 esac
9773fi
9774
9775if test "${opsys}" = "hpux9shr"; then
9776 case "${x_libraries}" in
9777 *X11R4* )
9778 opsysfile="s/hpux9shxr4.h"
9779 ;;
9780 esac
9781fi
5d6da11e 9782
98418dba
CW
9783### Compute the unexec source name from the object name.
9784UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9785
9786# Do the opsystem or machine files prohibit the use of the GNU malloc?
9787# Assume not, until told otherwise.
9788GNU_MALLOC=yes
9789doug_lea_malloc=yes
ca81d7a0
JD
9790{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9791echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9792if test "${ac_cv_func_malloc_get_state+set}" = set; then
9793 echo $ECHO_N "(cached) $ECHO_C" >&6
9794else
9795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
edfaf76d
LK
9801/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9802 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9803#define malloc_get_state innocuous_malloc_get_state
9804
98418dba 9805/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9806 which can conflict with char malloc_get_state (); below.
9807 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9808 <limits.h> exists even on freestanding compilers. */
edfaf76d 9809
19650fd6
AS
9810#ifdef __STDC__
9811# include <limits.h>
9812#else
9813# include <assert.h>
9814#endif
edfaf76d
LK
9815
9816#undef malloc_get_state
9817
ca81d7a0
JD
9818/* Override any GCC internal prototype to avoid an error.
9819 Use char because int might match the return type of a GCC
9820 builtin and then its argument prototype would still apply. */
98418dba
CW
9821#ifdef __cplusplus
9822extern "C"
9823#endif
98418dba 9824char malloc_get_state ();
98418dba
CW
9825/* The GNU C library defines this for functions which it implements
9826 to always fail with ENOSYS. Some functions are actually named
9827 something starting with __ and the normal name is an alias. */
ca81d7a0 9828#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9829choke me
98418dba
CW
9830#endif
9831
19650fd6
AS
9832int
9833main ()
9834{
ca81d7a0 9835return malloc_get_state ();
98418dba
CW
9836 ;
9837 return 0;
9838}
9839_ACEOF
9840rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9841if { (ac_try="$ac_link"
9842case "(($ac_try" in
9843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9844 *) ac_try_echo=$ac_try;;
9845esac
9846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9847 (eval "$ac_link") 2>conftest.er1
98418dba 9848 ac_status=$?
edfaf76d
LK
9849 grep -v '^ *+' conftest.er1 >conftest.err
9850 rm -f conftest.er1
9851 cat conftest.err >&5
c0d27fcc 9852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9853 (exit $ac_status); } && {
9854 test -z "$ac_c_werror_flag" ||
9855 test ! -s conftest.err
9856 } && test -s conftest$ac_exeext &&
9857 $as_test_x conftest$ac_exeext; then
98418dba
CW
9858 ac_cv_func_malloc_get_state=yes
9859else
9860 echo "$as_me: failed program was:" >&5
19650fd6
AS
9861sed 's/^/| /' conftest.$ac_ext >&5
9862
ca81d7a0 9863 ac_cv_func_malloc_get_state=no
98418dba 9864fi
ca81d7a0 9865
f053c89f 9866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9867 conftest$ac_exeext conftest.$ac_ext
98418dba 9868fi
ca81d7a0
JD
9869{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9870echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9871if test $ac_cv_func_malloc_get_state = yes; then
9872 :
9873else
9874 doug_lea_malloc=no
9875fi
9876
ca81d7a0
JD
9877{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9878echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9879if test "${ac_cv_func_malloc_set_state+set}" = set; then
9880 echo $ECHO_N "(cached) $ECHO_C" >&6
9881else
9882 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9883/* confdefs.h. */
9884_ACEOF
9885cat confdefs.h >>conftest.$ac_ext
9886cat >>conftest.$ac_ext <<_ACEOF
9887/* end confdefs.h. */
edfaf76d
LK
9888/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9889 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9890#define malloc_set_state innocuous_malloc_set_state
9891
98418dba 9892/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9893 which can conflict with char malloc_set_state (); below.
9894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9895 <limits.h> exists even on freestanding compilers. */
edfaf76d 9896
19650fd6
AS
9897#ifdef __STDC__
9898# include <limits.h>
9899#else
9900# include <assert.h>
9901#endif
edfaf76d
LK
9902
9903#undef malloc_set_state
9904
ca81d7a0
JD
9905/* Override any GCC internal prototype to avoid an error.
9906 Use char because int might match the return type of a GCC
9907 builtin and then its argument prototype would still apply. */
98418dba
CW
9908#ifdef __cplusplus
9909extern "C"
9910#endif
98418dba 9911char malloc_set_state ();
98418dba
CW
9912/* The GNU C library defines this for functions which it implements
9913 to always fail with ENOSYS. Some functions are actually named
9914 something starting with __ and the normal name is an alias. */
ca81d7a0 9915#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9916choke me
98418dba
CW
9917#endif
9918
19650fd6
AS
9919int
9920main ()
9921{
ca81d7a0 9922return malloc_set_state ();
98418dba
CW
9923 ;
9924 return 0;
9925}
9926_ACEOF
9927rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9928if { (ac_try="$ac_link"
9929case "(($ac_try" in
9930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9931 *) ac_try_echo=$ac_try;;
9932esac
9933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9934 (eval "$ac_link") 2>conftest.er1
98418dba 9935 ac_status=$?
edfaf76d
LK
9936 grep -v '^ *+' conftest.er1 >conftest.err
9937 rm -f conftest.er1
9938 cat conftest.err >&5
c0d27fcc 9939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9940 (exit $ac_status); } && {
9941 test -z "$ac_c_werror_flag" ||
9942 test ! -s conftest.err
9943 } && test -s conftest$ac_exeext &&
9944 $as_test_x conftest$ac_exeext; then
98418dba
CW
9945 ac_cv_func_malloc_set_state=yes
9946else
9947 echo "$as_me: failed program was:" >&5
19650fd6
AS
9948sed 's/^/| /' conftest.$ac_ext >&5
9949
ca81d7a0 9950 ac_cv_func_malloc_set_state=no
98418dba 9951fi
ca81d7a0 9952
f053c89f 9953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9954 conftest$ac_exeext conftest.$ac_ext
98418dba 9955fi
ca81d7a0
JD
9956{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9957echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9958if test $ac_cv_func_malloc_set_state = yes; then
9959 :
9960else
9961 doug_lea_malloc=no
9962fi
9963
ca81d7a0
JD
9964{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9965echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9966if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9967 echo $ECHO_N "(cached) $ECHO_C" >&6
9968else
9969 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
98418dba 9975extern void (* __after_morecore_hook)();
98418dba
CW
9976int
9977main ()
9978{
9979__after_morecore_hook = 0
9980 ;
9981 return 0;
9982}
9983_ACEOF
9984rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9985if { (ac_try="$ac_link"
9986case "(($ac_try" in
9987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9988 *) ac_try_echo=$ac_try;;
9989esac
9990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9991 (eval "$ac_link") 2>conftest.er1
98418dba 9992 ac_status=$?
edfaf76d
LK
9993 grep -v '^ *+' conftest.er1 >conftest.err
9994 rm -f conftest.er1
9995 cat conftest.err >&5
c0d27fcc 9996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9997 (exit $ac_status); } && {
9998 test -z "$ac_c_werror_flag" ||
9999 test ! -s conftest.err
10000 } && test -s conftest$ac_exeext &&
10001 $as_test_x conftest$ac_exeext; then
98418dba
CW
10002 emacs_cv_var___after_morecore_hook=yes
10003else
10004 echo "$as_me: failed program was:" >&5
19650fd6
AS
10005sed 's/^/| /' conftest.$ac_ext >&5
10006
ca81d7a0 10007 emacs_cv_var___after_morecore_hook=no
98418dba 10008fi
ca81d7a0 10009
f053c89f 10010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10011 conftest$ac_exeext conftest.$ac_ext
98418dba 10012fi
ca81d7a0
JD
10013{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
10014echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
10015if test $emacs_cv_var___after_morecore_hook = no; then
10016 doug_lea_malloc=no
10017fi
10018if test "${system_malloc}" = "yes"; then
10019 GNU_MALLOC=no
10020 GNU_MALLOC_reason="
10021 (The GNU allocators don't work with this system configuration.)"
10022fi
10023if test "$doug_lea_malloc" = "yes" ; then
10024 if test "$GNU_MALLOC" = yes ; then
10025 GNU_MALLOC_reason="
10026 (Using Doug Lea's new malloc from the GNU C Library.)"
10027 fi
b936fae4 10028
c0d27fcc 10029cat >>confdefs.h <<\_ACEOF
98418dba 10030#define DOUG_LEA_MALLOC 1
c0d27fcc 10031_ACEOF
98418dba
CW
10032
10033fi
10034
10035if test x"${REL_ALLOC}" = x; then
10036 REL_ALLOC=${GNU_MALLOC}
10037fi
10038
10039
c0d27fcc
MR
10040
10041
10042for ac_header in stdlib.h unistd.h
98418dba
CW
10043do
10044as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
10045if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10046 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10047echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10048if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 10049 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 10050fi
ca81d7a0
JD
10051ac_res=`eval echo '${'$as_ac_Header'}'`
10052 { echo "$as_me:$LINENO: result: $ac_res" >&5
10053echo "${ECHO_T}$ac_res" >&6; }
98418dba 10054else
c0d27fcc 10055 # Is the header compilable?
ca81d7a0
JD
10056{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10057echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 10058cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10059/* confdefs.h. */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h. */
98418dba
CW
10064$ac_includes_default
10065#include <$ac_header>
10066_ACEOF
10067rm -f conftest.$ac_objext
ca81d7a0
JD
10068if { (ac_try="$ac_compile"
10069case "(($ac_try" in
10070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10071 *) ac_try_echo=$ac_try;;
10072esac
10073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10074 (eval "$ac_compile") 2>conftest.er1
98418dba 10075 ac_status=$?
edfaf76d
LK
10076 grep -v '^ *+' conftest.er1 >conftest.err
10077 rm -f conftest.er1
10078 cat conftest.err >&5
c0d27fcc 10079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10080 (exit $ac_status); } && {
10081 test -z "$ac_c_werror_flag" ||
10082 test ! -s conftest.err
10083 } && test -s conftest.$ac_objext; then
c0d27fcc 10084 ac_header_compiler=yes
98418dba
CW
10085else
10086 echo "$as_me: failed program was:" >&5
19650fd6
AS
10087sed 's/^/| /' conftest.$ac_ext >&5
10088
ca81d7a0 10089 ac_header_compiler=no
98418dba 10090fi
ca81d7a0
JD
10091
10092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10093{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10094echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 10095
c0d27fcc 10096# Is the header present?
ca81d7a0
JD
10097{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10098echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 10099cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10100/* confdefs.h. */
10101_ACEOF
10102cat confdefs.h >>conftest.$ac_ext
10103cat >>conftest.$ac_ext <<_ACEOF
10104/* end confdefs.h. */
98418dba
CW
10105#include <$ac_header>
10106_ACEOF
ca81d7a0
JD
10107if { (ac_try="$ac_cpp conftest.$ac_ext"
10108case "(($ac_try" in
10109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10110 *) ac_try_echo=$ac_try;;
10111esac
10112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10113 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10114 ac_status=$?
6bae0ccf 10115 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10116 rm -f conftest.er1
10117 cat conftest.err >&5
c0d27fcc 10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10119 (exit $ac_status); } >/dev/null && {
10120 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10121 test ! -s conftest.err
10122 }; then
c0d27fcc 10123 ac_header_preproc=yes
98418dba
CW
10124else
10125 echo "$as_me: failed program was:" >&5
19650fd6
AS
10126sed 's/^/| /' conftest.$ac_ext >&5
10127
c0d27fcc 10128 ac_header_preproc=no
98418dba 10129fi
ca81d7a0 10130
98418dba 10131rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
10132{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10133echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10134
10135# So? What about this header?
edfaf76d
LK
10136case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10137 yes:no: )
c0d27fcc
MR
10138 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10139echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10140 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10141echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10142 ac_header_preproc=yes
10143 ;;
10144 no:yes:* )
10145 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10146echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10147 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10148echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10149 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10150echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10151 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10152echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10153 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10154echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10155 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10156echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 10157
19650fd6 10158 ;;
c0d27fcc 10159esac
ca81d7a0
JD
10160{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10161echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10162if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10163 echo $ECHO_N "(cached) $ECHO_C" >&6
10164else
edfaf76d 10165 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10166fi
ca81d7a0
JD
10167ac_res=`eval echo '${'$as_ac_Header'}'`
10168 { echo "$as_me:$LINENO: result: $ac_res" >&5
10169echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10170
10171fi
98418dba 10172if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10173 cat >>confdefs.h <<_ACEOF
98418dba 10174#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10175_ACEOF
98418dba
CW
10176
10177fi
c0d27fcc 10178
98418dba
CW
10179done
10180
c0d27fcc 10181
98418dba
CW
10182for ac_func in getpagesize
10183do
10184as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10185{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10186echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10187if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10188 echo $ECHO_N "(cached) $ECHO_C" >&6
10189else
10190 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10191/* confdefs.h. */
10192_ACEOF
10193cat confdefs.h >>conftest.$ac_ext
10194cat >>conftest.$ac_ext <<_ACEOF
10195/* end confdefs.h. */
edfaf76d
LK
10196/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10197 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10198#define $ac_func innocuous_$ac_func
10199
98418dba 10200/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10201 which can conflict with char $ac_func (); below.
10202 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10203 <limits.h> exists even on freestanding compilers. */
edfaf76d 10204
19650fd6
AS
10205#ifdef __STDC__
10206# include <limits.h>
10207#else
10208# include <assert.h>
10209#endif
edfaf76d
LK
10210
10211#undef $ac_func
10212
ca81d7a0
JD
10213/* Override any GCC internal prototype to avoid an error.
10214 Use char because int might match the return type of a GCC
10215 builtin and then its argument prototype would still apply. */
98418dba
CW
10216#ifdef __cplusplus
10217extern "C"
10218#endif
98418dba 10219char $ac_func ();
98418dba
CW
10220/* The GNU C library defines this for functions which it implements
10221 to always fail with ENOSYS. Some functions are actually named
10222 something starting with __ and the normal name is an alias. */
ca81d7a0 10223#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10224choke me
98418dba
CW
10225#endif
10226
19650fd6
AS
10227int
10228main ()
10229{
ca81d7a0 10230return $ac_func ();
98418dba
CW
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10236if { (ac_try="$ac_link"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
10241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10242 (eval "$ac_link") 2>conftest.er1
98418dba 10243 ac_status=$?
edfaf76d
LK
10244 grep -v '^ *+' conftest.er1 >conftest.err
10245 rm -f conftest.er1
10246 cat conftest.err >&5
c0d27fcc 10247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10248 (exit $ac_status); } && {
10249 test -z "$ac_c_werror_flag" ||
10250 test ! -s conftest.err
10251 } && test -s conftest$ac_exeext &&
10252 $as_test_x conftest$ac_exeext; then
98418dba
CW
10253 eval "$as_ac_var=yes"
10254else
10255 echo "$as_me: failed program was:" >&5
19650fd6
AS
10256sed 's/^/| /' conftest.$ac_ext >&5
10257
ca81d7a0 10258 eval "$as_ac_var=no"
98418dba 10259fi
ca81d7a0 10260
f053c89f 10261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10262 conftest$ac_exeext conftest.$ac_ext
98418dba 10263fi
ca81d7a0
JD
10264ac_res=`eval echo '${'$as_ac_var'}'`
10265 { echo "$as_me:$LINENO: result: $ac_res" >&5
10266echo "${ECHO_T}$ac_res" >&6; }
98418dba 10267if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10268 cat >>confdefs.h <<_ACEOF
98418dba 10269#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10270_ACEOF
98418dba
CW
10271
10272fi
10273done
10274
ca81d7a0
JD
10275{ echo "$as_me:$LINENO: checking for working mmap" >&5
10276echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10277if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 if test "$cross_compiling" = yes; then
10281 ac_cv_func_mmap_fixed_mapped=no
10282else
10283 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10284/* confdefs.h. */
10285_ACEOF
10286cat confdefs.h >>conftest.$ac_ext
10287cat >>conftest.$ac_ext <<_ACEOF
10288/* end confdefs.h. */
98418dba 10289$ac_includes_default
c0d27fcc
MR
10290/* malloc might have been renamed as rpl_malloc. */
10291#undef malloc
10292
98418dba
CW
10293/* Thanks to Mike Haertel and Jim Avera for this test.
10294 Here is a matrix of mmap possibilities:
10295 mmap private not fixed
10296 mmap private fixed at somewhere currently unmapped
10297 mmap private fixed at somewhere already mapped
10298 mmap shared not fixed
10299 mmap shared fixed at somewhere currently unmapped
10300 mmap shared fixed at somewhere already mapped
10301 For private mappings, we should verify that changes cannot be read()
10302 back from the file, nor mmap's back from the file at a different
10303 address. (There have been systems where private was not correctly
10304 implemented like the infamous i386 svr4.0, and systems where the
10305 VM page cache was not coherent with the file system buffer cache
10306 like early versions of FreeBSD and possibly contemporary NetBSD.)
10307 For shared mappings, we should conversely verify that changes get
c0d27fcc 10308 propagated back to all the places they're supposed to be.
98418dba
CW
10309
10310 Grep wants private fixed already mapped.
10311 The main things grep needs to know about mmap are:
10312 * does it exist and is it safe to write into the mmap'd area
10313 * how to use it (BSD variants) */
10314
10315#include <fcntl.h>
10316#include <sys/mman.h>
10317
f053c89f 10318#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10319char *malloc ();
10320#endif
10321
10322/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10323#ifndef HAVE_GETPAGESIZE
98418dba 10324/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10325# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10326# define HAVE_SYS_PARAM_H 1
10327# endif
10328
10329# ifdef _SC_PAGESIZE
10330# define getpagesize() sysconf(_SC_PAGESIZE)
10331# else /* no _SC_PAGESIZE */
f053c89f 10332# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10333# include <sys/param.h>
10334# ifdef EXEC_PAGESIZE
10335# define getpagesize() EXEC_PAGESIZE
10336# else /* no EXEC_PAGESIZE */
10337# ifdef NBPG
10338# define getpagesize() NBPG * CLSIZE
10339# ifndef CLSIZE
10340# define CLSIZE 1
10341# endif /* no CLSIZE */
10342# else /* no NBPG */
10343# ifdef NBPC
10344# define getpagesize() NBPC
10345# else /* no NBPC */
10346# ifdef PAGESIZE
10347# define getpagesize() PAGESIZE
10348# endif /* PAGESIZE */
10349# endif /* no NBPC */
10350# endif /* no NBPG */
10351# endif /* no EXEC_PAGESIZE */
10352# else /* no HAVE_SYS_PARAM_H */
10353# define getpagesize() 8192 /* punt totally */
10354# endif /* no HAVE_SYS_PARAM_H */
10355# endif /* no _SC_PAGESIZE */
10356
10357#endif /* no HAVE_GETPAGESIZE */
10358
10359int
10360main ()
10361{
10362 char *data, *data2, *data3;
10363 int i, pagesize;
10364 int fd;
10365
10366 pagesize = getpagesize ();
10367
10368 /* First, make a file with some known garbage in it. */
10369 data = (char *) malloc (pagesize);
10370 if (!data)
ca81d7a0 10371 return 1;
98418dba
CW
10372 for (i = 0; i < pagesize; ++i)
10373 *(data + i) = rand ();
10374 umask (0);
10375 fd = creat ("conftest.mmap", 0600);
10376 if (fd < 0)
ca81d7a0 10377 return 1;
98418dba 10378 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10379 return 1;
98418dba
CW
10380 close (fd);
10381
10382 /* Next, try to mmap the file at a fixed address which already has
10383 something else allocated at it. If we can, also make sure that
10384 we see the same garbage. */
10385 fd = open ("conftest.mmap", O_RDWR);
10386 if (fd < 0)
ca81d7a0 10387 return 1;
98418dba
CW
10388 data2 = (char *) malloc (2 * pagesize);
10389 if (!data2)
ca81d7a0
JD
10390 return 1;
10391 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10392 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10393 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10394 return 1;
98418dba
CW
10395 for (i = 0; i < pagesize; ++i)
10396 if (*(data + i) != *(data2 + i))
ca81d7a0 10397 return 1;
98418dba
CW
10398
10399 /* Finally, make sure that changes to the mapped area do not
10400 percolate back to the file as seen by read(). (This is a bug on
10401 some variants of i386 svr4.0.) */
10402 for (i = 0; i < pagesize; ++i)
10403 *(data2 + i) = *(data2 + i) + 1;
10404 data3 = (char *) malloc (pagesize);
10405 if (!data3)
ca81d7a0 10406 return 1;
98418dba 10407 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10408 return 1;
98418dba
CW
10409 for (i = 0; i < pagesize; ++i)
10410 if (*(data + i) != *(data3 + i))
ca81d7a0 10411 return 1;
98418dba 10412 close (fd);
ca81d7a0 10413 return 0;
98418dba
CW
10414}
10415_ACEOF
10416rm -f conftest$ac_exeext
ca81d7a0
JD
10417if { (ac_try="$ac_link"
10418case "(($ac_try" in
10419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10420 *) ac_try_echo=$ac_try;;
10421esac
10422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10423 (eval "$ac_link") 2>&5
98418dba 10424 ac_status=$?
c0d27fcc 10425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10427 { (case "(($ac_try" in
10428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10429 *) ac_try_echo=$ac_try;;
10430esac
10431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10432 (eval "$ac_try") 2>&5
98418dba 10433 ac_status=$?
c0d27fcc 10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10435 (exit $ac_status); }; }; then
10436 ac_cv_func_mmap_fixed_mapped=yes
10437else
10438 echo "$as_me: program exited with status $ac_status" >&5
10439echo "$as_me: failed program was:" >&5
19650fd6
AS
10440sed 's/^/| /' conftest.$ac_ext >&5
10441
c0d27fcc 10442( exit $ac_status )
98418dba
CW
10443ac_cv_func_mmap_fixed_mapped=no
10444fi
ca81d7a0 10445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10446fi
ca81d7a0
JD
10447
10448
98418dba 10449fi
ca81d7a0
JD
10450{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10451echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10452if test $ac_cv_func_mmap_fixed_mapped = yes; then
10453
c0d27fcc 10454cat >>confdefs.h <<\_ACEOF
98418dba 10455#define HAVE_MMAP 1
c0d27fcc 10456_ACEOF
98418dba
CW
10457
10458fi
10459rm -f conftest.mmap
10460
10461if test $use_mmap_for_buffers = yes; then
10462 REL_ALLOC=no
10463fi
10464
10465LIBS="$libsrc_libs $LIBS"
10466
c0d27fcc 10467
ca81d7a0
JD
10468{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10469echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10470if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10471 echo $ECHO_N "(cached) $ECHO_C" >&6
10472else
10473 ac_check_lib_save_LIBS=$LIBS
10474LIBS="-ldnet $LIBS"
10475cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10476/* confdefs.h. */
10477_ACEOF
10478cat confdefs.h >>conftest.$ac_ext
10479cat >>conftest.$ac_ext <<_ACEOF
10480/* end confdefs.h. */
98418dba 10481
ca81d7a0
JD
10482/* Override any GCC internal prototype to avoid an error.
10483 Use char because int might match the return type of a GCC
10484 builtin and then its argument prototype would still apply. */
98418dba
CW
10485#ifdef __cplusplus
10486extern "C"
10487#endif
98418dba 10488char dnet_ntoa ();
98418dba
CW
10489int
10490main ()
10491{
ca81d7a0 10492return dnet_ntoa ();
98418dba
CW
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10498if { (ac_try="$ac_link"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
10503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10504 (eval "$ac_link") 2>conftest.er1
98418dba 10505 ac_status=$?
edfaf76d
LK
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
c0d27fcc 10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest$ac_exeext &&
10514 $as_test_x conftest$ac_exeext; then
98418dba
CW
10515 ac_cv_lib_dnet_dnet_ntoa=yes
10516else
10517 echo "$as_me: failed program was:" >&5
19650fd6
AS
10518sed 's/^/| /' conftest.$ac_ext >&5
10519
ca81d7a0 10520 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10521fi
ca81d7a0 10522
f053c89f 10523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10524 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10525LIBS=$ac_check_lib_save_LIBS
10526fi
ca81d7a0
JD
10527{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10528echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10529if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10530 cat >>confdefs.h <<_ACEOF
98418dba 10531#define HAVE_LIBDNET 1
c0d27fcc 10532_ACEOF
98418dba
CW
10533
10534 LIBS="-ldnet $LIBS"
10535
10536fi
10537
c0d27fcc 10538
ca81d7a0
JD
10539{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10540echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10541if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10542 echo $ECHO_N "(cached) $ECHO_C" >&6
10543else
10544 ac_check_lib_save_LIBS=$LIBS
10545LIBS="-lXbsd $LIBS"
10546cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10547/* confdefs.h. */
10548_ACEOF
10549cat confdefs.h >>conftest.$ac_ext
10550cat >>conftest.$ac_ext <<_ACEOF
10551/* end confdefs.h. */
98418dba 10552
c0d27fcc 10553
98418dba
CW
10554int
10555main ()
10556{
ca81d7a0 10557return main ();
98418dba
CW
10558 ;
10559 return 0;
10560}
10561_ACEOF
10562rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10563if { (ac_try="$ac_link"
10564case "(($ac_try" in
10565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10566 *) ac_try_echo=$ac_try;;
10567esac
10568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10569 (eval "$ac_link") 2>conftest.er1
98418dba 10570 ac_status=$?
edfaf76d
LK
10571 grep -v '^ *+' conftest.er1 >conftest.err
10572 rm -f conftest.er1
10573 cat conftest.err >&5
c0d27fcc 10574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10575 (exit $ac_status); } && {
10576 test -z "$ac_c_werror_flag" ||
10577 test ! -s conftest.err
10578 } && test -s conftest$ac_exeext &&
10579 $as_test_x conftest$ac_exeext; then
98418dba
CW
10580 ac_cv_lib_Xbsd_main=yes
10581else
10582 echo "$as_me: failed program was:" >&5
19650fd6
AS
10583sed 's/^/| /' conftest.$ac_ext >&5
10584
ca81d7a0 10585 ac_cv_lib_Xbsd_main=no
98418dba 10586fi
ca81d7a0 10587
f053c89f 10588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10589 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10590LIBS=$ac_check_lib_save_LIBS
10591fi
ca81d7a0
JD
10592{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10593echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10594if test $ac_cv_lib_Xbsd_main = yes; then
10595 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10596fi
10597
c0d27fcc
MR
10598
10599
ca81d7a0
JD
10600{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10601echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10602if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10603 echo $ECHO_N "(cached) $ECHO_C" >&6
10604else
10605 ac_check_lib_save_LIBS=$LIBS
10606LIBS="-lpthreads $LIBS"
10607cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10608/* confdefs.h. */
10609_ACEOF
10610cat confdefs.h >>conftest.$ac_ext
10611cat >>conftest.$ac_ext <<_ACEOF
10612/* end confdefs.h. */
98418dba 10613
ca81d7a0
JD
10614/* Override any GCC internal prototype to avoid an error.
10615 Use char because int might match the return type of a GCC
10616 builtin and then its argument prototype would still apply. */
98418dba
CW
10617#ifdef __cplusplus
10618extern "C"
10619#endif
98418dba 10620char cma_open ();
98418dba
CW
10621int
10622main ()
10623{
ca81d7a0 10624return cma_open ();
98418dba
CW
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10630if { (ac_try="$ac_link"
10631case "(($ac_try" in
10632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10633 *) ac_try_echo=$ac_try;;
10634esac
10635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10636 (eval "$ac_link") 2>conftest.er1
98418dba 10637 ac_status=$?
edfaf76d
LK
10638 grep -v '^ *+' conftest.er1 >conftest.err
10639 rm -f conftest.er1
10640 cat conftest.err >&5
c0d27fcc 10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10642 (exit $ac_status); } && {
10643 test -z "$ac_c_werror_flag" ||
10644 test ! -s conftest.err
10645 } && test -s conftest$ac_exeext &&
10646 $as_test_x conftest$ac_exeext; then
98418dba
CW
10647 ac_cv_lib_pthreads_cma_open=yes
10648else
10649 echo "$as_me: failed program was:" >&5
19650fd6
AS
10650sed 's/^/| /' conftest.$ac_ext >&5
10651
ca81d7a0 10652 ac_cv_lib_pthreads_cma_open=no
98418dba 10653fi
ca81d7a0 10654
f053c89f 10655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10656 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10657LIBS=$ac_check_lib_save_LIBS
10658fi
ca81d7a0
JD
10659{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10660echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10661if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10662 cat >>confdefs.h <<_ACEOF
98418dba 10663#define HAVE_LIBPTHREADS 1
c0d27fcc 10664_ACEOF
98418dba
CW
10665
10666 LIBS="-lpthreads $LIBS"
10667
10668fi
10669
c0d27fcc 10670
ca81d7a0
JD
10671{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10672echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10673if test -d /usr/X386/include; then
10674 HAVE_XFREE386=yes
10675 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10676else
10677 HAVE_XFREE386=no
10678fi
ca81d7a0
JD
10679{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10680echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10681
55597d70
DL
10682
10683case ${host_os} in
10684aix*)
ca81d7a0
JD
10685 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10686echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10687if test "${gdb_cv_bigtoc+set}" = set; then
10688 echo $ECHO_N "(cached) $ECHO_C" >&6
10689else
10690
10691 case $GCC in
10692 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10693 *) gdb_cv_bigtoc=-bbigtoc ;;
10694 esac
10695
10696 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10698/* confdefs.h. */
10699_ACEOF
10700cat confdefs.h >>conftest.$ac_ext
10701cat >>conftest.$ac_ext <<_ACEOF
10702/* end confdefs.h. */
55597d70
DL
10703
10704int
10705main ()
10706{
10707int i;
10708 ;
10709 return 0;
10710}
10711_ACEOF
10712rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10713if { (ac_try="$ac_link"
10714case "(($ac_try" in
10715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10716 *) ac_try_echo=$ac_try;;
10717esac
10718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10719 (eval "$ac_link") 2>conftest.er1
55597d70 10720 ac_status=$?
edfaf76d
LK
10721 grep -v '^ *+' conftest.er1 >conftest.err
10722 rm -f conftest.er1
10723 cat conftest.err >&5
55597d70 10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10725 (exit $ac_status); } && {
10726 test -z "$ac_c_werror_flag" ||
10727 test ! -s conftest.err
10728 } && test -s conftest$ac_exeext &&
10729 $as_test_x conftest$ac_exeext; then
55597d70
DL
10730 :
10731else
10732 echo "$as_me: failed program was:" >&5
19650fd6
AS
10733sed 's/^/| /' conftest.$ac_ext >&5
10734
ca81d7a0 10735 gdb_cv_bigtoc=
55597d70 10736fi
ca81d7a0 10737
f053c89f 10738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10739 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10740
10741fi
ca81d7a0
JD
10742{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10743echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10744 ;;
10745esac
10746
ae1a998c
RS
10747# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10748# used for the tests that follow. We set them back to REAL_CFLAGS and
10749# REAL_CPPFLAGS later on.
98418dba
CW
10750
10751REAL_CPPFLAGS="$CPPFLAGS"
10752
10753if test "${HAVE_X11}" = "yes"; then
10754 DEFS="$C_SWITCH_X_SITE $DEFS"
10755 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10756 LIBS="$LIBX $LIBS"
10757 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10758 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10759
10760 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10761 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10762 # but it's more convenient here to set LD_RUN_PATH
10763 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10764 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10765 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10766 export LD_RUN_PATH
10767 fi
10768
10769 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10770 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10771echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
98418dba 10778
98418dba
CW
10779int
10780main ()
10781{
10782XOpenDisplay ("foo");
10783 ;
10784 return 0;
10785}
10786_ACEOF
10787rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10788if { (ac_try="$ac_link"
10789case "(($ac_try" in
10790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10791 *) ac_try_echo=$ac_try;;
10792esac
10793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10794 (eval "$ac_link") 2>conftest.er1
98418dba 10795 ac_status=$?
edfaf76d
LK
10796 grep -v '^ *+' conftest.er1 >conftest.err
10797 rm -f conftest.er1
10798 cat conftest.err >&5
c0d27fcc 10799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10800 (exit $ac_status); } && {
10801 test -z "$ac_c_werror_flag" ||
10802 test ! -s conftest.err
10803 } && test -s conftest$ac_exeext &&
10804 $as_test_x conftest$ac_exeext; then
35996d22 10805 xlinux_first_failure=no
98418dba
CW
10806else
10807 echo "$as_me: failed program was:" >&5
19650fd6
AS
10808sed 's/^/| /' conftest.$ac_ext >&5
10809
ca81d7a0 10810 xlinux_first_failure=yes
98418dba 10811fi
ca81d7a0 10812
f053c89f 10813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10814 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10815 if test "${xlinux_first_failure}" = "yes"; then
10816 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10817 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10818 OLD_CPPFLAGS="$CPPFLAGS"
10819 OLD_LIBS="$LIBS"
10820 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10821 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10822 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10823 LIBS="$LIBS -b i486-linuxaout"
10824 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10825/* confdefs.h. */
10826_ACEOF
10827cat confdefs.h >>conftest.$ac_ext
10828cat >>conftest.$ac_ext <<_ACEOF
10829/* end confdefs.h. */
98418dba 10830
98418dba
CW
10831int
10832main ()
10833{
10834XOpenDisplay ("foo");
10835 ;
10836 return 0;
10837}
10838_ACEOF
10839rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10840if { (ac_try="$ac_link"
10841case "(($ac_try" in
10842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10843 *) ac_try_echo=$ac_try;;
10844esac
10845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10846 (eval "$ac_link") 2>conftest.er1
98418dba 10847 ac_status=$?
edfaf76d
LK
10848 grep -v '^ *+' conftest.er1 >conftest.err
10849 rm -f conftest.er1
10850 cat conftest.err >&5
c0d27fcc 10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10852 (exit $ac_status); } && {
10853 test -z "$ac_c_werror_flag" ||
10854 test ! -s conftest.err
10855 } && test -s conftest$ac_exeext &&
10856 $as_test_x conftest$ac_exeext; then
98418dba
CW
10857 xlinux_second_failure=no
10858else
10859 echo "$as_me: failed program was:" >&5
19650fd6
AS
10860sed 's/^/| /' conftest.$ac_ext >&5
10861
ca81d7a0 10862 xlinux_second_failure=yes
98418dba 10863fi
ca81d7a0 10864
f053c89f 10865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10866 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10867 if test "${xlinux_second_failure}" = "yes"; then
10868 # If we get the same failure with -b, there is no use adding -b.
10869 # So take it out. This plays safe.
10870 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10871 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10872 CPPFLAGS="$OLD_CPPFLAGS"
10873 LIBS="$OLD_LIBS"
ca81d7a0
JD
10874 { echo "$as_me:$LINENO: result: no" >&5
10875echo "${ECHO_T}no" >&6; }
98418dba 10876 else
ca81d7a0
JD
10877 { echo "$as_me:$LINENO: result: yes" >&5
10878echo "${ECHO_T}yes" >&6; }
98418dba
CW
10879 fi
10880 else
ca81d7a0
JD
10881 { echo "$as_me:$LINENO: result: no" >&5
10882echo "${ECHO_T}no" >&6; }
98418dba
CW
10883 fi
10884 fi
10885
10886 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10887 # header files included from there.
ca81d7a0
JD
10888 { echo "$as_me:$LINENO: checking for Xkb" >&5
10889echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10890 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10891/* confdefs.h. */
10892_ACEOF
10893cat confdefs.h >>conftest.$ac_ext
10894cat >>conftest.$ac_ext <<_ACEOF
10895/* end confdefs.h. */
98418dba
CW
10896#include <X11/Xlib.h>
10897#include <X11/XKBlib.h>
98418dba
CW
10898int
10899main ()
10900{
10901XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10907if { (ac_try="$ac_link"
10908case "(($ac_try" in
10909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10910 *) ac_try_echo=$ac_try;;
10911esac
10912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10913 (eval "$ac_link") 2>conftest.er1
98418dba 10914 ac_status=$?
edfaf76d
LK
10915 grep -v '^ *+' conftest.er1 >conftest.err
10916 rm -f conftest.er1
10917 cat conftest.err >&5
c0d27fcc 10918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10919 (exit $ac_status); } && {
10920 test -z "$ac_c_werror_flag" ||
10921 test ! -s conftest.err
10922 } && test -s conftest$ac_exeext &&
10923 $as_test_x conftest$ac_exeext; then
98418dba
CW
10924 emacs_xkb=yes
10925else
10926 echo "$as_me: failed program was:" >&5
19650fd6
AS
10927sed 's/^/| /' conftest.$ac_ext >&5
10928
ca81d7a0 10929 emacs_xkb=no
98418dba 10930fi
ca81d7a0 10931
f053c89f 10932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10933 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10934 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10935echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10936 if test $emacs_xkb = yes; then
b936fae4 10937
c0d27fcc 10938cat >>confdefs.h <<\_ACEOF
98418dba 10939#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10940_ACEOF
98418dba
CW
10941
10942 fi
10943
c0d27fcc
MR
10944
10945
10946
10947
98418dba
CW
10948for ac_func in XrmSetDatabase XScreenResourceString \
10949XScreenNumberOfScreen XSetWMProtocols
10950do
10951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10952{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10954if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10955 echo $ECHO_N "(cached) $ECHO_C" >&6
10956else
10957 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10958/* confdefs.h. */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h. */
edfaf76d
LK
10963/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10964 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10965#define $ac_func innocuous_$ac_func
10966
98418dba 10967/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10968 which can conflict with char $ac_func (); below.
10969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10970 <limits.h> exists even on freestanding compilers. */
edfaf76d 10971
19650fd6
AS
10972#ifdef __STDC__
10973# include <limits.h>
10974#else
10975# include <assert.h>
10976#endif
edfaf76d
LK
10977
10978#undef $ac_func
10979
ca81d7a0
JD
10980/* Override any GCC internal prototype to avoid an error.
10981 Use char because int might match the return type of a GCC
10982 builtin and then its argument prototype would still apply. */
98418dba
CW
10983#ifdef __cplusplus
10984extern "C"
10985#endif
98418dba 10986char $ac_func ();
98418dba
CW
10987/* The GNU C library defines this for functions which it implements
10988 to always fail with ENOSYS. Some functions are actually named
10989 something starting with __ and the normal name is an alias. */
ca81d7a0 10990#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10991choke me
98418dba
CW
10992#endif
10993
19650fd6
AS
10994int
10995main ()
10996{
ca81d7a0 10997return $ac_func ();
98418dba
CW
10998 ;
10999 return 0;
11000}
11001_ACEOF
11002rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11003if { (ac_try="$ac_link"
11004case "(($ac_try" in
11005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11006 *) ac_try_echo=$ac_try;;
11007esac
11008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11009 (eval "$ac_link") 2>conftest.er1
98418dba 11010 ac_status=$?
edfaf76d
LK
11011 grep -v '^ *+' conftest.er1 >conftest.err
11012 rm -f conftest.er1
11013 cat conftest.err >&5
c0d27fcc 11014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11015 (exit $ac_status); } && {
11016 test -z "$ac_c_werror_flag" ||
11017 test ! -s conftest.err
11018 } && test -s conftest$ac_exeext &&
11019 $as_test_x conftest$ac_exeext; then
98418dba
CW
11020 eval "$as_ac_var=yes"
11021else
11022 echo "$as_me: failed program was:" >&5
19650fd6
AS
11023sed 's/^/| /' conftest.$ac_ext >&5
11024
ca81d7a0 11025 eval "$as_ac_var=no"
98418dba 11026fi
ca81d7a0 11027
f053c89f 11028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11029 conftest$ac_exeext conftest.$ac_ext
98418dba 11030fi
ca81d7a0
JD
11031ac_res=`eval echo '${'$as_ac_var'}'`
11032 { echo "$as_me:$LINENO: result: $ac_res" >&5
11033echo "${ECHO_T}$ac_res" >&6; }
98418dba 11034if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11035 cat >>confdefs.h <<_ACEOF
98418dba 11036#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11037_ACEOF
98418dba
CW
11038
11039fi
11040done
11041
11042fi
11043
11044if test "${window_system}" = "x11"; then
ca81d7a0
JD
11045 { echo "$as_me:$LINENO: checking X11 version 6" >&5
11046echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
11047 if test "${emacs_cv_x11_version_6+set}" = set; then
11048 echo $ECHO_N "(cached) $ECHO_C" >&6
11049else
11050 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11051/* confdefs.h. */
11052_ACEOF
11053cat confdefs.h >>conftest.$ac_ext
11054cat >>conftest.$ac_ext <<_ACEOF
11055/* end confdefs.h. */
98418dba 11056#include <X11/Xlib.h>
98418dba
CW
11057int
11058main ()
11059{
11060#if XlibSpecificationRelease < 6
11061fail;
11062#endif
11063
11064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11069if { (ac_try="$ac_link"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
11074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11075 (eval "$ac_link") 2>conftest.er1
98418dba 11076 ac_status=$?
edfaf76d
LK
11077 grep -v '^ *+' conftest.er1 >conftest.err
11078 rm -f conftest.er1
11079 cat conftest.err >&5
c0d27fcc 11080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11081 (exit $ac_status); } && {
11082 test -z "$ac_c_werror_flag" ||
11083 test ! -s conftest.err
11084 } && test -s conftest$ac_exeext &&
11085 $as_test_x conftest$ac_exeext; then
98418dba
CW
11086 emacs_cv_x11_version_6=yes
11087else
11088 echo "$as_me: failed program was:" >&5
19650fd6
AS
11089sed 's/^/| /' conftest.$ac_ext >&5
11090
ca81d7a0 11091 emacs_cv_x11_version_6=no
98418dba 11092fi
ca81d7a0 11093
f053c89f 11094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11095 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11096fi
11097
11098 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
11099 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11100echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11101
c0d27fcc 11102cat >>confdefs.h <<\_ACEOF
98418dba 11103#define HAVE_X11R6 1
c0d27fcc 11104_ACEOF
98418dba
CW
11105
11106 else
ca81d7a0
JD
11107 { echo "$as_me:$LINENO: result: before 6" >&5
11108echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11109 fi
11110fi
11111
11112if test "${window_system}" = "x11"; then
ca81d7a0
JD
11113 { echo "$as_me:$LINENO: checking X11 version 5" >&5
11114echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
11115 if test "${emacs_cv_x11_version_5+set}" = set; then
11116 echo $ECHO_N "(cached) $ECHO_C" >&6
11117else
11118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
98418dba 11124#include <X11/Xlib.h>
98418dba
CW
11125int
11126main ()
11127{
11128#if XlibSpecificationRelease < 5
11129fail;
11130#endif
11131
11132 ;
11133 return 0;
11134}
11135_ACEOF
11136rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11137if { (ac_try="$ac_link"
11138case "(($ac_try" in
11139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11140 *) ac_try_echo=$ac_try;;
11141esac
11142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11143 (eval "$ac_link") 2>conftest.er1
98418dba 11144 ac_status=$?
edfaf76d
LK
11145 grep -v '^ *+' conftest.er1 >conftest.err
11146 rm -f conftest.er1
11147 cat conftest.err >&5
c0d27fcc 11148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11149 (exit $ac_status); } && {
11150 test -z "$ac_c_werror_flag" ||
11151 test ! -s conftest.err
11152 } && test -s conftest$ac_exeext &&
11153 $as_test_x conftest$ac_exeext; then
98418dba
CW
11154 emacs_cv_x11_version_5=yes
11155else
11156 echo "$as_me: failed program was:" >&5
19650fd6
AS
11157sed 's/^/| /' conftest.$ac_ext >&5
11158
ca81d7a0 11159 emacs_cv_x11_version_5=no
98418dba 11160fi
ca81d7a0 11161
f053c89f 11162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11163 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11164fi
11165
11166 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
11167 { echo "$as_me:$LINENO: result: 5 or newer" >&5
11168echo "${ECHO_T}5 or newer" >&6; }
98418dba 11169 HAVE_X11R5=yes
b936fae4 11170
c0d27fcc 11171cat >>confdefs.h <<\_ACEOF
98418dba 11172#define HAVE_X11R5 1
c0d27fcc 11173_ACEOF
98418dba
CW
11174
11175 else
11176 HAVE_X11R5=no
ca81d7a0
JD
11177 { echo "$as_me:$LINENO: result: before 5" >&5
11178echo "${ECHO_T}before 5" >&6; }
98418dba
CW
11179 fi
11180fi
11181
0cfc0546
GM
11182### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11183HAVE_RSVG=no
ae0476ed 11184if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546
GM
11185 if test "${with_rsvg}" != "no"; then
11186 if test "X${with_pkg_config_prog}" != X; then
11187 PKG_CONFIG="${with_pkg_config_prog}"
11188 fi
11189
11190 RSVG_REQUIRED=2.0.0
11191 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11192
11193
11194 succeeded=no
11195
11196 if test -z "$PKG_CONFIG"; then
11197 # Extract the first word of "pkg-config", so it can be a program name with args.
11198set dummy pkg-config; ac_word=$2
11199{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11200echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11201if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11202 echo $ECHO_N "(cached) $ECHO_C" >&6
11203else
11204 case $PKG_CONFIG in
11205 [\\/]* | ?:[\\/]*)
11206 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11207 ;;
11208 *)
11209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11210for as_dir in $PATH
11211do
11212 IFS=$as_save_IFS
11213 test -z "$as_dir" && as_dir=.
11214 for ac_exec_ext in '' $ac_executable_extensions; do
11215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11216 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11217 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11218 break 2
11219 fi
11220done
11221done
11222IFS=$as_save_IFS
11223
11224 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11225 ;;
11226esac
11227fi
11228PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11229if test -n "$PKG_CONFIG"; then
11230 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11231echo "${ECHO_T}$PKG_CONFIG" >&6; }
11232else
11233 { echo "$as_me:$LINENO: result: no" >&5
11234echo "${ECHO_T}no" >&6; }
11235fi
11236
11237
11238 fi
11239
11240 if test "$PKG_CONFIG" = "no" ; then
11241 :
11242 else
11243 PKG_CONFIG_MIN_VERSION=0.9.0
11244 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11245 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
11246echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
11247
11248 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
11249 { echo "$as_me:$LINENO: result: yes" >&5
11250echo "${ECHO_T}yes" >&6; }
11251 succeeded=yes
11252
11253 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
11254echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
11255 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11256 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
11257echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
11258
11259 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
11260echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
11261 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11262 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
11263echo "${ECHO_T}$RSVG_LIBS" >&6; }
11264 else
11265 { echo "$as_me:$LINENO: result: no" >&5
11266echo "${ECHO_T}no" >&6; }
11267 RSVG_CFLAGS=""
11268 RSVG_LIBS=""
11269 ## If we have a custom action on failure, don't print errors, but
11270 ## do set a variable so people can do so.
11271 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
11272
11273 fi
11274
11275
11276
11277 else
11278 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11279 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11280 fi
11281 fi
11282
11283 if test $succeeded = yes; then
11284 :
11285 else
11286 :
11287 fi
11288
11289
11290
11291
11292 if test ".${RSVG_CFLAGS}" != "."; then
11293 HAVE_RSVG=yes
11294
11295cat >>confdefs.h <<\_ACEOF
11296#define HAVE_RSVG 1
11297_ACEOF
11298
11299 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11300 LIBS="$RSVG_LIBS $LIBS"
11301 fi
11302 fi
11303fi
11304
11305
488dd4c4 11306HAVE_GTK=no
8eeae1c9
JD
11307if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
11308 USE_X_TOOLKIT=none
11309fi
089a966d
GM
11310if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
11311 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 11312 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
11313 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
11314echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
11315 { (exit 1); exit 1; }; };
11316 fi
787eb67d
JD
11317 GLIB_REQUIRED=2.6
11318 GTK_REQUIRED=2.6
488dd4c4
JD
11319 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11320
11321 if test "X${with_pkg_config_prog}" != X; then
11322 PKG_CONFIG="${with_pkg_config_prog}"
11323 fi
11324
11325 succeeded=no
11326
11327 if test -z "$PKG_CONFIG"; then
11328 # Extract the first word of "pkg-config", so it can be a program name with args.
11329set dummy pkg-config; ac_word=$2
ca81d7a0
JD
11330{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11332if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11333 echo $ECHO_N "(cached) $ECHO_C" >&6
11334else
11335 case $PKG_CONFIG in
11336 [\\/]* | ?:[\\/]*)
11337 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11338 ;;
11339 *)
11340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341for as_dir in $PATH
11342do
11343 IFS=$as_save_IFS
11344 test -z "$as_dir" && as_dir=.
11345 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11347 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11349 break 2
11350 fi
11351done
11352done
ca81d7a0 11353IFS=$as_save_IFS
488dd4c4
JD
11354
11355 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11356 ;;
11357esac
11358fi
11359PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11360if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11361 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11362echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11363else
ca81d7a0
JD
11364 { echo "$as_me:$LINENO: result: no" >&5
11365echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11366fi
11367
ca81d7a0 11368
488dd4c4
JD
11369 fi
11370
11371 if test "$PKG_CONFIG" = "no" ; then
089a966d 11372 pkg_check_gtk=no
488dd4c4
JD
11373 else
11374 PKG_CONFIG_MIN_VERSION=0.9.0
11375 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11376 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11377echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11378
67db6aa2 11379 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11380 { echo "$as_me:$LINENO: result: yes" >&5
11381echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11382 succeeded=yes
11383
ca81d7a0
JD
11384 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11385echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11386 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11387 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11388echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11389
ca81d7a0
JD
11390 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11391echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11392 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11393 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11394echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11395 else
ca81d7a0
JD
11396 { echo "$as_me:$LINENO: result: no" >&5
11397echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11398 GTK_CFLAGS=""
11399 GTK_LIBS=""
11400 ## If we have a custom action on failure, don't print errors, but
11401 ## do set a variable so people can do so.
11402 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11403
488dd4c4
JD
11404 fi
11405
11406
11407
11408 else
11409 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11410 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11411 fi
11412 fi
11413
11414 if test $succeeded = yes; then
089a966d 11415 pkg_check_gtk=yes
488dd4c4 11416 else
089a966d
GM
11417 pkg_check_gtk=no
11418 fi
11419
11420 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11421 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11422echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11423 { (exit 1); exit 1; }; }
11424 fi
089a966d
GM
11425fi
11426
11427
11428if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11429
11430
11431
11432 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11433 CFLAGS="$CFLAGS $GTK_CFLAGS"
11434 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11435 GTK_COMPILES=no
57669b57 11436
8eeae1c9 11437for ac_func in gtk_main
57669b57
JD
11438do
11439as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11440{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11441echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11442if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11443 echo $ECHO_N "(cached) $ECHO_C" >&6
11444else
11445 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11446/* confdefs.h. */
11447_ACEOF
11448cat confdefs.h >>conftest.$ac_ext
11449cat >>conftest.$ac_ext <<_ACEOF
11450/* end confdefs.h. */
edfaf76d
LK
11451/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11452 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11453#define $ac_func innocuous_$ac_func
11454
57669b57
JD
11455/* System header to define __stub macros and hopefully few prototypes,
11456 which can conflict with char $ac_func (); below.
11457 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11458 <limits.h> exists even on freestanding compilers. */
edfaf76d 11459
57669b57
JD
11460#ifdef __STDC__
11461# include <limits.h>
11462#else
11463# include <assert.h>
11464#endif
edfaf76d
LK
11465
11466#undef $ac_func
11467
ca81d7a0
JD
11468/* Override any GCC internal prototype to avoid an error.
11469 Use char because int might match the return type of a GCC
11470 builtin and then its argument prototype would still apply. */
57669b57
JD
11471#ifdef __cplusplus
11472extern "C"
57669b57 11473#endif
57669b57
JD
11474char $ac_func ();
11475/* The GNU C library defines this for functions which it implements
11476 to always fail with ENOSYS. Some functions are actually named
11477 something starting with __ and the normal name is an alias. */
ca81d7a0 11478#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11479choke me
57669b57
JD
11480#endif
11481
11482int
11483main ()
11484{
ca81d7a0 11485return $ac_func ();
57669b57
JD
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11491if { (ac_try="$ac_link"
11492case "(($ac_try" in
11493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11494 *) ac_try_echo=$ac_try;;
11495esac
11496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11497 (eval "$ac_link") 2>conftest.er1
57669b57 11498 ac_status=$?
edfaf76d
LK
11499 grep -v '^ *+' conftest.er1 >conftest.err
11500 rm -f conftest.er1
11501 cat conftest.err >&5
57669b57 11502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11503 (exit $ac_status); } && {
11504 test -z "$ac_c_werror_flag" ||
11505 test ! -s conftest.err
11506 } && test -s conftest$ac_exeext &&
11507 $as_test_x conftest$ac_exeext; then
57669b57
JD
11508 eval "$as_ac_var=yes"
11509else
11510 echo "$as_me: failed program was:" >&5
11511sed 's/^/| /' conftest.$ac_ext >&5
11512
ca81d7a0 11513 eval "$as_ac_var=no"
57669b57 11514fi
ca81d7a0 11515
f053c89f 11516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11517 conftest$ac_exeext conftest.$ac_ext
57669b57 11518fi
ca81d7a0
JD
11519ac_res=`eval echo '${'$as_ac_var'}'`
11520 { echo "$as_me:$LINENO: result: $ac_res" >&5
11521echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11522if test `eval echo '${'$as_ac_var'}'` = yes; then
11523 cat >>confdefs.h <<_ACEOF
11524#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11525_ACEOF
8eeae1c9 11526 GTK_COMPILES=yes
57669b57
JD
11527fi
11528done
11529
8eeae1c9 11530 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11531 if test "$USE_X_TOOLKIT" != "maybe"; then
11532 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11533echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11534 { (exit 1); exit 1; }; };
089a966d
GM
11535 fi
11536 else
11537 HAVE_GTK=yes
488dd4c4
JD
11538
11539cat >>confdefs.h <<\_ACEOF
11540#define HAVE_GTK 1
11541_ACEOF
11542
089a966d
GM
11543 USE_X_TOOLKIT=none
11544 fi
11545
11546fi
11547
11548
11549if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11550
d0a80c21
JD
11551 if test "$with_toolkit_scroll_bars" != no; then
11552 with_toolkit_scroll_bars=yes
11553 fi
57669b57
JD
11554
11555 HAVE_GTK_MULTIDISPLAY=no
11556
11557for ac_func in gdk_display_open
11558do
11559as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11560{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11562if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11563 echo $ECHO_N "(cached) $ECHO_C" >&6
11564else
11565 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11566/* confdefs.h. */
11567_ACEOF
11568cat confdefs.h >>conftest.$ac_ext
11569cat >>conftest.$ac_ext <<_ACEOF
11570/* end confdefs.h. */
edfaf76d
LK
11571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11573#define $ac_func innocuous_$ac_func
11574
57669b57
JD
11575/* System header to define __stub macros and hopefully few prototypes,
11576 which can conflict with char $ac_func (); below.
11577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11578 <limits.h> exists even on freestanding compilers. */
edfaf76d 11579
57669b57
JD
11580#ifdef __STDC__
11581# include <limits.h>
11582#else
11583# include <assert.h>
11584#endif
edfaf76d
LK
11585
11586#undef $ac_func
11587
ca81d7a0
JD
11588/* Override any GCC internal prototype to avoid an error.
11589 Use char because int might match the return type of a GCC
11590 builtin and then its argument prototype would still apply. */
57669b57
JD
11591#ifdef __cplusplus
11592extern "C"
57669b57 11593#endif
57669b57
JD
11594char $ac_func ();
11595/* The GNU C library defines this for functions which it implements
11596 to always fail with ENOSYS. Some functions are actually named
11597 something starting with __ and the normal name is an alias. */
ca81d7a0 11598#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11599choke me
57669b57
JD
11600#endif
11601
11602int
11603main ()
11604{
ca81d7a0 11605return $ac_func ();
57669b57
JD
11606 ;
11607 return 0;
11608}
11609_ACEOF
11610rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11611if { (ac_try="$ac_link"
11612case "(($ac_try" in
11613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11614 *) ac_try_echo=$ac_try;;
11615esac
11616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11617 (eval "$ac_link") 2>conftest.er1
57669b57 11618 ac_status=$?
edfaf76d
LK
11619 grep -v '^ *+' conftest.er1 >conftest.err
11620 rm -f conftest.er1
11621 cat conftest.err >&5
57669b57 11622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11623 (exit $ac_status); } && {
11624 test -z "$ac_c_werror_flag" ||
11625 test ! -s conftest.err
11626 } && test -s conftest$ac_exeext &&
11627 $as_test_x conftest$ac_exeext; then
57669b57
JD
11628 eval "$as_ac_var=yes"
11629else
11630 echo "$as_me: failed program was:" >&5
11631sed 's/^/| /' conftest.$ac_ext >&5
11632
ca81d7a0 11633 eval "$as_ac_var=no"
57669b57 11634fi
ca81d7a0 11635
f053c89f 11636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11637 conftest$ac_exeext conftest.$ac_ext
57669b57 11638fi
ca81d7a0
JD
11639ac_res=`eval echo '${'$as_ac_var'}'`
11640 { echo "$as_me:$LINENO: result: $ac_res" >&5
11641echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11642if test `eval echo '${'$as_ac_var'}'` = yes; then
11643 cat >>confdefs.h <<_ACEOF
11644#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11645_ACEOF
11646 HAVE_GTK_MULTIDISPLAY=yes
11647fi
11648done
11649
11650 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11651
11652cat >>confdefs.h <<\_ACEOF
11653#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11654_ACEOF
11655
11656 fi
57669b57 11657
572a3cc2
JD
11658 HAVE_GTK_FILE_SELECTION=no
11659
11660for ac_func in gtk_file_selection_new
11661do
11662as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11663{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11664echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11665if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11666 echo $ECHO_N "(cached) $ECHO_C" >&6
11667else
11668 cat >conftest.$ac_ext <<_ACEOF
11669/* confdefs.h. */
11670_ACEOF
11671cat confdefs.h >>conftest.$ac_ext
11672cat >>conftest.$ac_ext <<_ACEOF
11673/* end confdefs.h. */
edfaf76d
LK
11674/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11675 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11676#define $ac_func innocuous_$ac_func
11677
572a3cc2
JD
11678/* System header to define __stub macros and hopefully few prototypes,
11679 which can conflict with char $ac_func (); below.
11680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11681 <limits.h> exists even on freestanding compilers. */
edfaf76d 11682
572a3cc2
JD
11683#ifdef __STDC__
11684# include <limits.h>
11685#else
11686# include <assert.h>
11687#endif
edfaf76d
LK
11688
11689#undef $ac_func
11690
ca81d7a0
JD
11691/* Override any GCC internal prototype to avoid an error.
11692 Use char because int might match the return type of a GCC
11693 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11694#ifdef __cplusplus
11695extern "C"
572a3cc2 11696#endif
572a3cc2
JD
11697char $ac_func ();
11698/* The GNU C library defines this for functions which it implements
11699 to always fail with ENOSYS. Some functions are actually named
11700 something starting with __ and the normal name is an alias. */
ca81d7a0 11701#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11702choke me
572a3cc2
JD
11703#endif
11704
11705int
11706main ()
11707{
ca81d7a0 11708return $ac_func ();
572a3cc2
JD
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11714if { (ac_try="$ac_link"
11715case "(($ac_try" in
11716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11717 *) ac_try_echo=$ac_try;;
11718esac
11719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11720 (eval "$ac_link") 2>conftest.er1
572a3cc2 11721 ac_status=$?
edfaf76d
LK
11722 grep -v '^ *+' conftest.er1 >conftest.err
11723 rm -f conftest.er1
11724 cat conftest.err >&5
572a3cc2 11725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11726 (exit $ac_status); } && {
11727 test -z "$ac_c_werror_flag" ||
11728 test ! -s conftest.err
11729 } && test -s conftest$ac_exeext &&
11730 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11731 eval "$as_ac_var=yes"
11732else
11733 echo "$as_me: failed program was:" >&5
11734sed 's/^/| /' conftest.$ac_ext >&5
11735
ca81d7a0 11736 eval "$as_ac_var=no"
572a3cc2 11737fi
ca81d7a0 11738
f053c89f 11739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11740 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11741fi
ca81d7a0
JD
11742ac_res=`eval echo '${'$as_ac_var'}'`
11743 { echo "$as_me:$LINENO: result: $ac_res" >&5
11744echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11745if test `eval echo '${'$as_ac_var'}'` = yes; then
11746 cat >>confdefs.h <<_ACEOF
11747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11748_ACEOF
11749 HAVE_GTK_FILE_SELECTION=yes
11750fi
11751done
11752
11753
11754 HAVE_GTK_FILE_CHOOSER=no
11755
11756for ac_func in gtk_file_chooser_dialog_new
11757do
11758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11759{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11761if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11762 echo $ECHO_N "(cached) $ECHO_C" >&6
11763else
11764 cat >conftest.$ac_ext <<_ACEOF
11765/* confdefs.h. */
11766_ACEOF
11767cat confdefs.h >>conftest.$ac_ext
11768cat >>conftest.$ac_ext <<_ACEOF
11769/* end confdefs.h. */
edfaf76d
LK
11770/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11771 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11772#define $ac_func innocuous_$ac_func
11773
572a3cc2
JD
11774/* System header to define __stub macros and hopefully few prototypes,
11775 which can conflict with char $ac_func (); below.
11776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11777 <limits.h> exists even on freestanding compilers. */
edfaf76d 11778
572a3cc2
JD
11779#ifdef __STDC__
11780# include <limits.h>
11781#else
11782# include <assert.h>
11783#endif
edfaf76d
LK
11784
11785#undef $ac_func
11786
ca81d7a0
JD
11787/* Override any GCC internal prototype to avoid an error.
11788 Use char because int might match the return type of a GCC
11789 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11790#ifdef __cplusplus
11791extern "C"
572a3cc2 11792#endif
572a3cc2
JD
11793char $ac_func ();
11794/* The GNU C library defines this for functions which it implements
11795 to always fail with ENOSYS. Some functions are actually named
11796 something starting with __ and the normal name is an alias. */
ca81d7a0 11797#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11798choke me
572a3cc2
JD
11799#endif
11800
11801int
11802main ()
11803{
ca81d7a0 11804return $ac_func ();
572a3cc2
JD
11805 ;
11806 return 0;
11807}
11808_ACEOF
11809rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11810if { (ac_try="$ac_link"
11811case "(($ac_try" in
11812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11813 *) ac_try_echo=$ac_try;;
11814esac
11815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11816 (eval "$ac_link") 2>conftest.er1
572a3cc2 11817 ac_status=$?
edfaf76d
LK
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
572a3cc2 11821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest$ac_exeext &&
11826 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11827 eval "$as_ac_var=yes"
11828else
11829 echo "$as_me: failed program was:" >&5
11830sed 's/^/| /' conftest.$ac_ext >&5
11831
ca81d7a0 11832 eval "$as_ac_var=no"
572a3cc2 11833fi
ca81d7a0 11834
f053c89f 11835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11836 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11837fi
ca81d7a0
JD
11838ac_res=`eval echo '${'$as_ac_var'}'`
11839 { echo "$as_me:$LINENO: result: $ac_res" >&5
11840echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11841if test `eval echo '${'$as_ac_var'}'` = yes; then
11842 cat >>confdefs.h <<_ACEOF
11843#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11844_ACEOF
11845 HAVE_GTK_FILE_CHOOSER=yes
11846fi
11847done
11848
11849
11850 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11851 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11852
11853cat >>confdefs.h <<\_ACEOF
11854#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11855_ACEOF
11856
b8bdffbe
JD
11857 fi
11858
11859 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11860 HAVE_GTK_AND_PTHREAD=no
11861
11862for ac_header in pthread.h
11863do
11864as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11865if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11866 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11867echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11868if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11869 echo $ECHO_N "(cached) $ECHO_C" >&6
11870fi
ca81d7a0
JD
11871ac_res=`eval echo '${'$as_ac_Header'}'`
11872 { echo "$as_me:$LINENO: result: $ac_res" >&5
11873echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11874else
11875 # Is the header compilable?
ca81d7a0
JD
11876{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11877echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11878cat >conftest.$ac_ext <<_ACEOF
11879/* confdefs.h. */
11880_ACEOF
11881cat confdefs.h >>conftest.$ac_ext
11882cat >>conftest.$ac_ext <<_ACEOF
11883/* end confdefs.h. */
11884$ac_includes_default
11885#include <$ac_header>
11886_ACEOF
11887rm -f conftest.$ac_objext
ca81d7a0
JD
11888if { (ac_try="$ac_compile"
11889case "(($ac_try" in
11890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11891 *) ac_try_echo=$ac_try;;
11892esac
11893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11894 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11895 ac_status=$?
edfaf76d
LK
11896 grep -v '^ *+' conftest.er1 >conftest.err
11897 rm -f conftest.er1
11898 cat conftest.err >&5
b8bdffbe 11899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11900 (exit $ac_status); } && {
11901 test -z "$ac_c_werror_flag" ||
11902 test ! -s conftest.err
11903 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11904 ac_header_compiler=yes
11905else
11906 echo "$as_me: failed program was:" >&5
11907sed 's/^/| /' conftest.$ac_ext >&5
11908
ca81d7a0 11909 ac_header_compiler=no
b8bdffbe 11910fi
ca81d7a0
JD
11911
11912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11913{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11914echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11915
11916# Is the header present?
ca81d7a0
JD
11917{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11918echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11919cat >conftest.$ac_ext <<_ACEOF
11920/* confdefs.h. */
11921_ACEOF
11922cat confdefs.h >>conftest.$ac_ext
11923cat >>conftest.$ac_ext <<_ACEOF
11924/* end confdefs.h. */
11925#include <$ac_header>
11926_ACEOF
ca81d7a0
JD
11927if { (ac_try="$ac_cpp conftest.$ac_ext"
11928case "(($ac_try" in
11929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11930 *) ac_try_echo=$ac_try;;
11931esac
11932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11933 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11934 ac_status=$?
11935 grep -v '^ *+' conftest.er1 >conftest.err
11936 rm -f conftest.er1
11937 cat conftest.err >&5
11938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11939 (exit $ac_status); } >/dev/null && {
11940 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11941 test ! -s conftest.err
11942 }; then
b8bdffbe
JD
11943 ac_header_preproc=yes
11944else
11945 echo "$as_me: failed program was:" >&5
11946sed 's/^/| /' conftest.$ac_ext >&5
11947
11948 ac_header_preproc=no
11949fi
ca81d7a0 11950
b8bdffbe 11951rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11952{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11953echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11954
11955# So? What about this header?
edfaf76d
LK
11956case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11957 yes:no: )
b8bdffbe
JD
11958 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11959echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11960 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11961echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11962 ac_header_preproc=yes
b8bdffbe 11963 ;;
edfaf76d 11964 no:yes:* )
b8bdffbe
JD
11965 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11966echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11967 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11968echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11969 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11970echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11971 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11972echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11973 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11974echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11975 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11976echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11977
b8bdffbe
JD
11978 ;;
11979esac
ca81d7a0
JD
11980{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11981echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11982if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11983 echo $ECHO_N "(cached) $ECHO_C" >&6
11984else
edfaf76d 11985 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11986fi
ca81d7a0
JD
11987ac_res=`eval echo '${'$as_ac_Header'}'`
11988 { echo "$as_me:$LINENO: result: $ac_res" >&5
11989echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11990
11991fi
11992if test `eval echo '${'$as_ac_Header'}'` = yes; then
11993 cat >>confdefs.h <<_ACEOF
11994#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11995_ACEOF
11996
11997fi
11998
11999done
12000
12001 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
12002 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
12003echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
12004if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
12005 echo $ECHO_N "(cached) $ECHO_C" >&6
12006else
12007 ac_check_lib_save_LIBS=$LIBS
12008LIBS="-lpthread $LIBS"
12009cat >conftest.$ac_ext <<_ACEOF
12010/* confdefs.h. */
12011_ACEOF
12012cat confdefs.h >>conftest.$ac_ext
12013cat >>conftest.$ac_ext <<_ACEOF
12014/* end confdefs.h. */
12015
ca81d7a0
JD
12016/* Override any GCC internal prototype to avoid an error.
12017 Use char because int might match the return type of a GCC
12018 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
12019#ifdef __cplusplus
12020extern "C"
12021#endif
b8bdffbe
JD
12022char pthread_self ();
12023int
12024main ()
12025{
ca81d7a0 12026return pthread_self ();
b8bdffbe
JD
12027 ;
12028 return 0;
12029}
12030_ACEOF
12031rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12032if { (ac_try="$ac_link"
12033case "(($ac_try" in
12034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12035 *) ac_try_echo=$ac_try;;
12036esac
12037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12038 (eval "$ac_link") 2>conftest.er1
b8bdffbe 12039 ac_status=$?
edfaf76d
LK
12040 grep -v '^ *+' conftest.er1 >conftest.err
12041 rm -f conftest.er1
12042 cat conftest.err >&5
b8bdffbe 12043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12044 (exit $ac_status); } && {
12045 test -z "$ac_c_werror_flag" ||
12046 test ! -s conftest.err
12047 } && test -s conftest$ac_exeext &&
12048 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
12049 ac_cv_lib_pthread_pthread_self=yes
12050else
12051 echo "$as_me: failed program was:" >&5
12052sed 's/^/| /' conftest.$ac_ext >&5
12053
ca81d7a0 12054 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 12055fi
ca81d7a0 12056
f053c89f 12057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12058 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
12059LIBS=$ac_check_lib_save_LIBS
12060fi
ca81d7a0
JD
12061{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
12062echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
12063if test $ac_cv_lib_pthread_pthread_self = yes; then
12064 HAVE_GTK_AND_PTHREAD=yes
12065fi
12066
12067 fi
12068 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
12069 case "${canonical}" in
12070 *-hpux*) ;;
12071 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
12072 esac
b8bdffbe
JD
12073
12074cat >>confdefs.h <<\_ACEOF
12075#define HAVE_GTK_AND_PTHREAD 1
12076_ACEOF
12077
12078 fi
57669b57 12079 fi
488dd4c4
JD
12080fi
12081
b3615392 12082HAVE_XAW3D=no
991a7602 12083if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
b3615392
MB
12084 if test x"${HAVE_X11R5}" != xyes; then
12085 USE_X_TOOLKIT=none
12086 else
ecb21060
MB
12087 if test "$with_xaw3d" != no; then
12088 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 12089echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
ecb21060 12090 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
12091 echo $ECHO_N "(cached) $ECHO_C" >&6
12092else
12093 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
98418dba
CW
12099
12100#include <X11/Intrinsic.h>
b3615392 12101#include <X11/Xaw3d/Simple.h>
98418dba
CW
12102int
12103main ()
12104{
12105
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12111if { (ac_try="$ac_link"
12112case "(($ac_try" in
12113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12114 *) ac_try_echo=$ac_try;;
12115esac
12116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12117 (eval "$ac_link") 2>conftest.er1
98418dba 12118 ac_status=$?
edfaf76d
LK
12119 grep -v '^ *+' conftest.er1 >conftest.err
12120 rm -f conftest.er1
12121 cat conftest.err >&5
c0d27fcc 12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12123 (exit $ac_status); } && {
12124 test -z "$ac_c_werror_flag" ||
12125 test ! -s conftest.err
12126 } && test -s conftest$ac_exeext &&
12127 $as_test_x conftest$ac_exeext; then
b3615392 12128 emacs_cv_xaw3d=yes
98418dba
CW
12129else
12130 echo "$as_me: failed program was:" >&5
19650fd6
AS
12131sed 's/^/| /' conftest.$ac_ext >&5
12132
b3615392 12133 emacs_cv_xaw3d=no
98418dba 12134fi
ca81d7a0 12135
f053c89f 12136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12137 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12138fi
12139
ecb21060
MB
12140 else
12141 emacs_cv_xaw3d=no
12142 fi
b3615392
MB
12143 if test $emacs_cv_xaw3d = yes; then
12144 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12145echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
98418dba 12146 USE_X_TOOLKIT=LUCID
b3615392 12147 HAVE_XAW3D=yes
9d89ffd0 12148
b3615392
MB
12149cat >>confdefs.h <<\_ACEOF
12150#define HAVE_XAW3D 1
12151_ACEOF
9d89ffd0 12152
98418dba 12153 else
b3615392 12154 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 12155echo "${ECHO_T}no" >&6; }
b3615392
MB
12156 { echo "$as_me:$LINENO: checking for libXaw" >&5
12157echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
12158 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 12159 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 12160else
b3615392 12161 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
12162/* confdefs.h. */
12163_ACEOF
12164cat confdefs.h >>conftest.$ac_ext
12165cat >>conftest.$ac_ext <<_ACEOF
12166/* end confdefs.h. */
b3615392
MB
12167
12168#include <X11/Intrinsic.h>
12169#include <X11/Xaw/Simple.h>
12170int
12171main ()
12172{
12173
12174 ;
12175 return 0;
12176}
9d89ffd0 12177_ACEOF
b3615392
MB
12178rm -f conftest.$ac_objext conftest$ac_exeext
12179if { (ac_try="$ac_link"
9d89ffd0
JD
12180case "(($ac_try" in
12181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12182 *) ac_try_echo=$ac_try;;
12183esac
12184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 12185 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
12186 ac_status=$?
12187 grep -v '^ *+' conftest.er1 >conftest.err
12188 rm -f conftest.er1
12189 cat conftest.err >&5
12190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12191 (exit $ac_status); } && {
12192 test -z "$ac_c_werror_flag" ||
12193 test ! -s conftest.err
b3615392
MB
12194 } && test -s conftest$ac_exeext &&
12195 $as_test_x conftest$ac_exeext; then
12196 emacs_cv_xaw=yes
9d89ffd0
JD
12197else
12198 echo "$as_me: failed program was:" >&5
12199sed 's/^/| /' conftest.$ac_ext >&5
12200
b3615392 12201 emacs_cv_xaw=no
9d89ffd0
JD
12202fi
12203
b3615392
MB
12204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12205 conftest$ac_exeext conftest.$ac_ext
12206fi
9d89ffd0 12207
b3615392
MB
12208 if test $emacs_cv_xaw = yes; then
12209 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12210echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
12211 USE_X_TOOLKIT=LUCID
12212 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
991a7602
MB
12213 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12214echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12215 { (exit 1); exit 1; }; }
12216 else
b3615392
MB
12217 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
12218echo "${ECHO_T}no; do not use toolkit by default" >&6; }
991a7602
MB
12219 USE_X_TOOLKIT=none
12220 fi
98418dba 12221 fi
98418dba
CW
12222 fi
12223fi
12224
12225X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12226
12227if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12228 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12229echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12230 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12231 echo $ECHO_N "(cached) $ECHO_C" >&6
12232else
12233 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12234/* confdefs.h. */
12235_ACEOF
12236cat confdefs.h >>conftest.$ac_ext
12237cat >>conftest.$ac_ext <<_ACEOF
12238/* end confdefs.h. */
98418dba 12239#include <X11/Intrinsic.h>
98418dba
CW
12240int
12241main ()
12242{
12243#if XtSpecificationRelease < 6
12244fail;
12245#endif
12246
12247 ;
12248 return 0;
12249}
12250_ACEOF
12251rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12252if { (ac_try="$ac_link"
12253case "(($ac_try" in
12254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12255 *) ac_try_echo=$ac_try;;
12256esac
12257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12258 (eval "$ac_link") 2>conftest.er1
98418dba 12259 ac_status=$?
edfaf76d
LK
12260 grep -v '^ *+' conftest.er1 >conftest.err
12261 rm -f conftest.er1
12262 cat conftest.err >&5
c0d27fcc 12263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12264 (exit $ac_status); } && {
12265 test -z "$ac_c_werror_flag" ||
12266 test ! -s conftest.err
12267 } && test -s conftest$ac_exeext &&
12268 $as_test_x conftest$ac_exeext; then
98418dba
CW
12269 emacs_cv_x11_toolkit_version_6=yes
12270else
12271 echo "$as_me: failed program was:" >&5
19650fd6
AS
12272sed 's/^/| /' conftest.$ac_ext >&5
12273
ca81d7a0 12274 emacs_cv_x11_toolkit_version_6=no
98418dba 12275fi
ca81d7a0 12276
f053c89f 12277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12278 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12279fi
12280
12281 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12282 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12283 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12284echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12285
c0d27fcc 12286cat >>confdefs.h <<\_ACEOF
98418dba 12287#define HAVE_X11XTR6 1
c0d27fcc 12288_ACEOF
98418dba
CW
12289
12290 else
ca81d7a0
JD
12291 { echo "$as_me:$LINENO: result: before 6" >&5
12292echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12293 fi
12294
12295 OLDLIBS="$LIBS"
12296 if test x$HAVE_X11XTR6 = xyes; then
12297 LIBS="-lXt -lSM -lICE $LIBS"
12298 else
12299 LIBS="-lXt $LIBS"
12300 fi
12301
ca81d7a0
JD
12302{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12303echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12304if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12305 echo $ECHO_N "(cached) $ECHO_C" >&6
12306else
12307 ac_check_lib_save_LIBS=$LIBS
12308LIBS="-lXmu $LIBS"
12309cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12310/* confdefs.h. */
12311_ACEOF
12312cat confdefs.h >>conftest.$ac_ext
12313cat >>conftest.$ac_ext <<_ACEOF
12314/* end confdefs.h. */
98418dba 12315
ca81d7a0
JD
12316/* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
98418dba
CW
12319#ifdef __cplusplus
12320extern "C"
12321#endif
98418dba 12322char XmuConvertStandardSelection ();
98418dba
CW
12323int
12324main ()
12325{
ca81d7a0 12326return XmuConvertStandardSelection ();
98418dba
CW
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12332if { (ac_try="$ac_link"
12333case "(($ac_try" in
12334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12335 *) ac_try_echo=$ac_try;;
12336esac
12337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12338 (eval "$ac_link") 2>conftest.er1
98418dba 12339 ac_status=$?
edfaf76d
LK
12340 grep -v '^ *+' conftest.er1 >conftest.err
12341 rm -f conftest.er1
12342 cat conftest.err >&5
c0d27fcc 12343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12344 (exit $ac_status); } && {
12345 test -z "$ac_c_werror_flag" ||
12346 test ! -s conftest.err
12347 } && test -s conftest$ac_exeext &&
12348 $as_test_x conftest$ac_exeext; then
98418dba
CW
12349 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12350else
12351 echo "$as_me: failed program was:" >&5
19650fd6
AS
12352sed 's/^/| /' conftest.$ac_ext >&5
12353
ca81d7a0 12354 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12355fi
ca81d7a0 12356
f053c89f 12357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12358 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12359LIBS=$ac_check_lib_save_LIBS
12360fi
ca81d7a0
JD
12361{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12362echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12363if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12364 cat >>confdefs.h <<_ACEOF
98418dba 12365#define HAVE_LIBXMU 1
c0d27fcc 12366_ACEOF
98418dba
CW
12367
12368 LIBS="-lXmu $LIBS"
12369
12370fi
12371
12372 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12373fi
12374
12375# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12376if test "${HAVE_X11}" = "yes"; then
12377 if test "${USE_X_TOOLKIT}" != "none"; then
12378
ca81d7a0
JD
12379{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12380echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12381if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12382 echo $ECHO_N "(cached) $ECHO_C" >&6
12383else
12384 ac_check_lib_save_LIBS=$LIBS
12385LIBS="-lXext $LIBS"
12386cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12387/* confdefs.h. */
12388_ACEOF
12389cat confdefs.h >>conftest.$ac_ext
12390cat >>conftest.$ac_ext <<_ACEOF
12391/* end confdefs.h. */
98418dba 12392
ca81d7a0
JD
12393/* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
98418dba
CW
12396#ifdef __cplusplus
12397extern "C"
12398#endif
98418dba 12399char XShapeQueryExtension ();
98418dba
CW
12400int
12401main ()
12402{
ca81d7a0 12403return XShapeQueryExtension ();
98418dba
CW
12404 ;
12405 return 0;
12406}
12407_ACEOF
12408rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12409if { (ac_try="$ac_link"
12410case "(($ac_try" in
12411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12412 *) ac_try_echo=$ac_try;;
12413esac
12414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12415 (eval "$ac_link") 2>conftest.er1
98418dba 12416 ac_status=$?
edfaf76d
LK
12417 grep -v '^ *+' conftest.er1 >conftest.err
12418 rm -f conftest.er1
12419 cat conftest.err >&5
c0d27fcc 12420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12421 (exit $ac_status); } && {
12422 test -z "$ac_c_werror_flag" ||
12423 test ! -s conftest.err
12424 } && test -s conftest$ac_exeext &&
12425 $as_test_x conftest$ac_exeext; then
98418dba
CW
12426 ac_cv_lib_Xext_XShapeQueryExtension=yes
12427else
12428 echo "$as_me: failed program was:" >&5
19650fd6
AS
12429sed 's/^/| /' conftest.$ac_ext >&5
12430
ca81d7a0 12431 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12432fi
ca81d7a0 12433
f053c89f 12434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12435 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12436LIBS=$ac_check_lib_save_LIBS
12437fi
ca81d7a0
JD
12438{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12439echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12440if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12441 cat >>confdefs.h <<_ACEOF
98418dba 12442#define HAVE_LIBXEXT 1
c0d27fcc 12443_ACEOF
98418dba
CW
12444
12445 LIBS="-lXext $LIBS"
12446
12447fi
12448
12449 fi
12450fi
12451
12452if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12453 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12454echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12455if test "${emacs_cv_motif_version_2_1+set}" = set; then
12456 echo $ECHO_N "(cached) $ECHO_C" >&6
12457else
12458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
98418dba 12464#include <Xm/Xm.h>
98418dba
CW
12465int
12466main ()
12467{
12468#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12469int x = 5;
12470#else
12471Motif version prior to 2.1.
12472#endif
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477rm -f conftest.$ac_objext
ca81d7a0
JD
12478if { (ac_try="$ac_compile"
12479case "(($ac_try" in
12480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12481 *) ac_try_echo=$ac_try;;
12482esac
12483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12484 (eval "$ac_compile") 2>conftest.er1
98418dba 12485 ac_status=$?
edfaf76d
LK
12486 grep -v '^ *+' conftest.er1 >conftest.err
12487 rm -f conftest.er1
12488 cat conftest.err >&5
c0d27fcc 12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12490 (exit $ac_status); } && {
12491 test -z "$ac_c_werror_flag" ||
12492 test ! -s conftest.err
12493 } && test -s conftest.$ac_objext; then
98418dba
CW
12494 emacs_cv_motif_version_2_1=yes
12495else
12496 echo "$as_me: failed program was:" >&5
19650fd6
AS
12497sed 's/^/| /' conftest.$ac_ext >&5
12498
ca81d7a0 12499 emacs_cv_motif_version_2_1=no
98418dba 12500fi
ca81d7a0
JD
12501
12502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12503fi
ca81d7a0
JD
12504{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12505echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12506 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12507 if test $emacs_cv_motif_version_2_1 = yes; then
12508 HAVE_LIBXP=no
b936fae4 12509
c0d27fcc 12510cat >>confdefs.h <<\_ACEOF
98418dba 12511#define HAVE_MOTIF_2_1 1
c0d27fcc 12512_ACEOF
98418dba 12513
ca81d7a0
JD
12514 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12515echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12516if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12517 echo $ECHO_N "(cached) $ECHO_C" >&6
12518else
12519 ac_check_lib_save_LIBS=$LIBS
12520LIBS="-lXp $LIBS"
12521cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12522/* confdefs.h. */
12523_ACEOF
12524cat confdefs.h >>conftest.$ac_ext
12525cat >>conftest.$ac_ext <<_ACEOF
12526/* end confdefs.h. */
98418dba 12527
ca81d7a0
JD
12528/* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
98418dba
CW
12531#ifdef __cplusplus
12532extern "C"
12533#endif
98418dba 12534char XpCreateContext ();
98418dba
CW
12535int
12536main ()
12537{
ca81d7a0 12538return XpCreateContext ();
98418dba
CW
12539 ;
12540 return 0;
12541}
12542_ACEOF
12543rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12544if { (ac_try="$ac_link"
12545case "(($ac_try" in
12546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12547 *) ac_try_echo=$ac_try;;
12548esac
12549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12550 (eval "$ac_link") 2>conftest.er1
98418dba 12551 ac_status=$?
edfaf76d
LK
12552 grep -v '^ *+' conftest.er1 >conftest.err
12553 rm -f conftest.er1
12554 cat conftest.err >&5
c0d27fcc 12555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12556 (exit $ac_status); } && {
12557 test -z "$ac_c_werror_flag" ||
12558 test ! -s conftest.err
12559 } && test -s conftest$ac_exeext &&
12560 $as_test_x conftest$ac_exeext; then
98418dba
CW
12561 ac_cv_lib_Xp_XpCreateContext=yes
12562else
12563 echo "$as_me: failed program was:" >&5
19650fd6
AS
12564sed 's/^/| /' conftest.$ac_ext >&5
12565
ca81d7a0 12566 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12567fi
ca81d7a0 12568
f053c89f 12569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12570 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12571LIBS=$ac_check_lib_save_LIBS
12572fi
ca81d7a0
JD
12573{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12574echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12575if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12576 HAVE_LIBXP=yes
12577fi
503d2be0 12578
98418dba 12579 if test ${HAVE_LIBXP} = yes; then
b936fae4 12580
c0d27fcc 12581cat >>confdefs.h <<\_ACEOF
98418dba 12582#define HAVE_LIBXP 1
c0d27fcc 12583_ACEOF
503d2be0 12584
98418dba 12585 fi
4693dbc9 12586 else
ca81d7a0
JD
12587 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12588echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12589if test "${emacs_cv_lesstif+set}" = set; then
12590 echo $ECHO_N "(cached) $ECHO_C" >&6
12591else
12592 # We put this in CFLAGS temporarily to precede other -I options
12593 # that might be in CFLAGS temporarily.
12594 # We put this in CPPFLAGS where it precedes the other -I options.
12595 OLD_CPPFLAGS=$CPPFLAGS
12596 OLD_CFLAGS=$CFLAGS
12597 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12598 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12599 cat >conftest.$ac_ext <<_ACEOF
12600/* confdefs.h. */
12601_ACEOF
12602cat confdefs.h >>conftest.$ac_ext
12603cat >>conftest.$ac_ext <<_ACEOF
12604/* end confdefs.h. */
12605#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12606int
12607main ()
12608{
12609int x = 5;
12610 ;
12611 return 0;
12612}
12613_ACEOF
12614rm -f conftest.$ac_objext
ca81d7a0
JD
12615if { (ac_try="$ac_compile"
12616case "(($ac_try" in
12617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12618 *) ac_try_echo=$ac_try;;
12619esac
12620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12621 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12622 ac_status=$?
edfaf76d
LK
12623 grep -v '^ *+' conftest.er1 >conftest.err
12624 rm -f conftest.er1
12625 cat conftest.err >&5
4693dbc9 12626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12627 (exit $ac_status); } && {
12628 test -z "$ac_c_werror_flag" ||
12629 test ! -s conftest.err
12630 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12631 emacs_cv_lesstif=yes
12632else
12633 echo "$as_me: failed program was:" >&5
12634sed 's/^/| /' conftest.$ac_ext >&5
12635
ca81d7a0 12636 emacs_cv_lesstif=no
4693dbc9 12637fi
ca81d7a0
JD
12638
12639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12640fi
ca81d7a0
JD
12641{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12642echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12643 if test $emacs_cv_lesstif = yes; then
12644 # Make sure this -I option remains in CPPFLAGS after it is set
12645 # back to REAL_CPPFLAGS.
12646 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12647 # have those other -I options anyway. Ultimately, having this
12648 # directory ultimately in CPPFLAGS will be enough.
12649 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12650 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12651 else
12652 CFLAGS=$OLD_CFLAGS
12653 CPPFLAGS=$OLD_CPPFLAGS
12654 fi
98418dba
CW
12655 fi
12656fi
12657
c0d27fcc
MR
12658
12659
98418dba
CW
12660USE_TOOLKIT_SCROLL_BARS=no
12661if test "${with_toolkit_scroll_bars}" != "no"; then
12662 if test "${USE_X_TOOLKIT}" != "none"; then
12663 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12664 cat >>confdefs.h <<\_ACEOF
98418dba 12665#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12666_ACEOF
98418dba
CW
12667
12668 HAVE_XAW3D=no
12669 USE_TOOLKIT_SCROLL_BARS=yes
12670 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12671 cat >>confdefs.h <<\_ACEOF
98418dba 12672#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12673_ACEOF
98418dba
CW
12674
12675 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12676 fi
488dd4c4
JD
12677 elif test "${HAVE_GTK}" = "yes"; then
12678 cat >>confdefs.h <<\_ACEOF
12679#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12680_ACEOF
12681
12682 USE_TOOLKIT_SCROLL_BARS=yes
12683 elif test "${HAVE_CARBON}" = "yes"; then
12684 cat >>confdefs.h <<\_ACEOF
12685#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12686_ACEOF
12687
12688 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12689 fi
12690fi
12691
abd39b57 12692cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12693/* confdefs.h. */
12694_ACEOF
12695cat confdefs.h >>conftest.$ac_ext
12696cat >>conftest.$ac_ext <<_ACEOF
12697/* end confdefs.h. */
12698
12699 #include <X11/Xlib.h>
12700 #include <X11/Xresource.h>
12701int
12702main ()
12703{
12704XIMProc callback;
12705 ;
12706 return 0;
12707}
12708_ACEOF
12709rm -f conftest.$ac_objext
ca81d7a0
JD
12710if { (ac_try="$ac_compile"
12711case "(($ac_try" in
12712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12713 *) ac_try_echo=$ac_try;;
12714esac
12715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12716 (eval "$ac_compile") 2>conftest.er1
abd39b57 12717 ac_status=$?
edfaf76d
LK
12718 grep -v '^ *+' conftest.er1 >conftest.err
12719 rm -f conftest.er1
12720 cat conftest.err >&5
abd39b57 12721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12722 (exit $ac_status); } && {
12723 test -z "$ac_c_werror_flag" ||
12724 test ! -s conftest.err
12725 } && test -s conftest.$ac_objext; then
abd39b57
AC
12726 HAVE_XIM=yes
12727
12728cat >>confdefs.h <<\_ACEOF
12729#define HAVE_XIM 1
12730_ACEOF
12731
12732else
12733 echo "$as_me: failed program was:" >&5
12734sed 's/^/| /' conftest.$ac_ext >&5
12735
ca81d7a0 12736 HAVE_XIM=no
abd39b57 12737fi
ca81d7a0
JD
12738
12739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12740
c0d27fcc 12741
98418dba 12742if test "${with_xim}" != "no"; then
b936fae4 12743
c0d27fcc 12744cat >>confdefs.h <<\_ACEOF
98418dba 12745#define USE_XIM 1
c0d27fcc 12746_ACEOF
98418dba 12747
793fa0d7 12748fi
abd39b57
AC
12749
12750
12751if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12752 late_CFLAGS=$CFLAGS
12753 if test "$GCC" = yes; then
12754 CFLAGS="$CFLAGS --pedantic-errors"
12755 fi
cffcede7 12756 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12757/* confdefs.h. */
12758_ACEOF
12759cat confdefs.h >>conftest.$ac_ext
12760cat >>conftest.$ac_ext <<_ACEOF
12761/* end confdefs.h. */
cffcede7
JD
12762
12763#include <X11/Xlib.h>
12764#include <X11/Xresource.h>
12765int
12766main ()
12767{
12768Display *display;
12769XrmDatabase db;
12770char *res_name;
12771char *res_class;
12772XIMProc callback;
12773XPointer *client_data;
849d80cf
DL
12774#ifndef __GNUC__
12775/* If we're not using GCC, it's probably not XFree86, and this is
12776 probably right, but we can't use something like --pedantic-errors. */
12777extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12778 char*, XIMProc, XPointer*);
12779#endif
cffcede7
JD
12780(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12781 client_data);
12782 ;
12783 return 0;
12784}
12785_ACEOF
12786rm -f conftest.$ac_objext
ca81d7a0
JD
12787if { (ac_try="$ac_compile"
12788case "(($ac_try" in
12789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12790 *) ac_try_echo=$ac_try;;
12791esac
12792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12793 (eval "$ac_compile") 2>conftest.er1
cffcede7 12794 ac_status=$?
edfaf76d
LK
12795 grep -v '^ *+' conftest.er1 >conftest.err
12796 rm -f conftest.er1
12797 cat conftest.err >&5
cffcede7 12798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12799 (exit $ac_status); } && {
12800 test -z "$ac_c_werror_flag" ||
12801 test ! -s conftest.err
12802 } && test -s conftest.$ac_objext; then
cffcede7
JD
12803 emacs_cv_arg6_star=yes
12804else
12805 echo "$as_me: failed program was:" >&5
19650fd6
AS
12806sed 's/^/| /' conftest.$ac_ext >&5
12807
ca81d7a0 12808
cffcede7 12809fi
ca81d7a0
JD
12810
12811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12812
12813 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12814 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12815#define XRegisterIMInstantiateCallback_arg6 XPointer*
12816_ACEOF
12817
12818 else
f57bd967 12819 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12820#define XRegisterIMInstantiateCallback_arg6 XPointer
12821_ACEOF
12822
12823 fi
849d80cf 12824 CFLAGS=$late_CFLAGS
45a4b03e
KH
12825fi
12826
12827### For font-backend
12828if test "${USE_FONT_BACKEND}" = "yes"; then
12829
12830
12831cat >>confdefs.h <<\_ACEOF
12832#define USE_FONT_BACKEND 1
12833_ACEOF
12834
12835
12836### Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12837HAVE_XFT=maybe
12838if test "${HAVE_X11}" = "yes"; then
12839 if test "x${with_freetype}" = "xno"; then
12840 with_xft="no";
12841 fi
12842 if test "x${with_xft}" != "xno"; then
12843
12844 if test "X${with_pkg_config_prog}" != X; then
12845 PKG_CONFIG="${with_pkg_config_prog}"
12846 fi
12847
12848
12849 succeeded=no
12850
12851 if test -z "$PKG_CONFIG"; then
12852 # Extract the first word of "pkg-config", so it can be a program name with args.
12853set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12854{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12855echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12856if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12857 echo $ECHO_N "(cached) $ECHO_C" >&6
12858else
12859 case $PKG_CONFIG in
12860 [\\/]* | ?:[\\/]*)
12861 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12862 ;;
12863 *)
12864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12865for as_dir in $PATH
12866do
12867 IFS=$as_save_IFS
12868 test -z "$as_dir" && as_dir=.
12869 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12870 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12871 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12872 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12873 break 2
12874 fi
12875done
12876done
c24fa7dc 12877IFS=$as_save_IFS
45a4b03e
KH
12878
12879 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12880 ;;
12881esac
12882fi
12883PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12884if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12885 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12886echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12887else
c24fa7dc
MB
12888 { echo "$as_me:$LINENO: result: no" >&5
12889echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12890fi
12891
c24fa7dc 12892
45a4b03e
KH
12893 fi
12894
12895 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12896 HAVE_XFT=no
45a4b03e
KH
12897 else
12898 PKG_CONFIG_MIN_VERSION=0.9.0
12899 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12900 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12901echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12902
c24fa7dc
MB
12903 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12904 { echo "$as_me:$LINENO: result: yes" >&5
12905echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12906 succeeded=yes
12907
c24fa7dc
MB
12908 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12909echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12910 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12911 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12912echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12913
c24fa7dc
MB
12914 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12915echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12916 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12917 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12918echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12919 else
c24fa7dc
MB
12920 { echo "$as_me:$LINENO: result: no" >&5
12921echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12922 XFT_CFLAGS=""
12923 XFT_LIBS=""
12924 ## If we have a custom action on failure, don't print errors, but
12925 ## do set a variable so people can do so.
12926 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12927
12928 fi
12929
12930
12931
12932 else
12933 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12934 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12935 fi
12936 fi
12937
12938 if test $succeeded = yes; then
12939 :
12940 else
12941 HAVE_XFT=no
12942 fi
12943
12944 if test "$HAVE_XFT" != no; then
12945 OLD_CPPFLAGS="$CPPFLAGS"
12946 OLD_CFLAGS="$CFLAGS"
12947 OLD_LIBS="$LIBS"
12948 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12949 CFLAGS="$CFLAGS $XFT_CFLAGS"
12950 LIBS="$XFT_LIBS $LIBS"
12951 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12952 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12953echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12954if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12956fi
c24fa7dc
MB
12957{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12958echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12959else
12960 # Is the header compilable?
c24fa7dc
MB
12961{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12962echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12963cat >conftest.$ac_ext <<_ACEOF
12964/* confdefs.h. */
12965_ACEOF
12966cat confdefs.h >>conftest.$ac_ext
12967cat >>conftest.$ac_ext <<_ACEOF
12968/* end confdefs.h. */
12969$ac_includes_default
12970#include <X11/Xft/Xft.h>
12971_ACEOF
12972rm -f conftest.$ac_objext
c24fa7dc
MB
12973if { (ac_try="$ac_compile"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
12978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12979 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12980 ac_status=$?
12981 grep -v '^ *+' conftest.er1 >conftest.err
12982 rm -f conftest.er1
12983 cat conftest.err >&5
12984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12985 (exit $ac_status); } && {
12986 test -z "$ac_c_werror_flag" ||
12987 test ! -s conftest.err
12988 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12989 ac_header_compiler=yes
12990else
12991 echo "$as_me: failed program was:" >&5
12992sed 's/^/| /' conftest.$ac_ext >&5
12993
c24fa7dc 12994 ac_header_compiler=no
45a4b03e 12995fi
c24fa7dc
MB
12996
12997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12999echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
13000
13001# Is the header present?
c24fa7dc
MB
13002{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
13003echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
13004cat >conftest.$ac_ext <<_ACEOF
13005/* confdefs.h. */
13006_ACEOF
13007cat confdefs.h >>conftest.$ac_ext
13008cat >>conftest.$ac_ext <<_ACEOF
13009/* end confdefs.h. */
13010#include <X11/Xft/Xft.h>
13011_ACEOF
c24fa7dc
MB
13012if { (ac_try="$ac_cpp conftest.$ac_ext"
13013case "(($ac_try" in
13014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13015 *) ac_try_echo=$ac_try;;
13016esac
13017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13018 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
13019 ac_status=$?
13020 grep -v '^ *+' conftest.er1 >conftest.err
13021 rm -f conftest.er1
13022 cat conftest.err >&5
13023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
13024 (exit $ac_status); } >/dev/null && {
13025 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13026 test ! -s conftest.err
13027 }; then
45a4b03e
KH
13028 ac_header_preproc=yes
13029else
13030 echo "$as_me: failed program was:" >&5
13031sed 's/^/| /' conftest.$ac_ext >&5
13032
13033 ac_header_preproc=no
13034fi
c24fa7dc 13035
45a4b03e 13036rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
13037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13038echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
13039
13040# So? What about this header?
13041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13042 yes:no: )
13043 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
13044echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13045 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
13046echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
13047 ac_header_preproc=yes
13048 ;;
13049 no:yes:* )
13050 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
13051echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
13052 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
13053echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
13054 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
13055echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
13056 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
13057echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
13058 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
13059echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
13060 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
13061echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 13062
45a4b03e
KH
13063 ;;
13064esac
c24fa7dc
MB
13065{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
13066echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
13067if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
13068 echo $ECHO_N "(cached) $ECHO_C" >&6
13069else
13070 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
13071fi
c24fa7dc
MB
13072{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
13073echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
13074
13075fi
13076if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
13077 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
13078echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
13079if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
13080 echo $ECHO_N "(cached) $ECHO_C" >&6
13081else
13082 ac_check_lib_save_LIBS=$LIBS
13083LIBS="-lXft $XFT_LIBS $LIBS"
13084cat >conftest.$ac_ext <<_ACEOF
13085/* confdefs.h. */
13086_ACEOF
13087cat confdefs.h >>conftest.$ac_ext
13088cat >>conftest.$ac_ext <<_ACEOF
13089/* end confdefs.h. */
13090
c24fa7dc
MB
13091/* Override any GCC internal prototype to avoid an error.
13092 Use char because int might match the return type of a GCC
13093 builtin and then its argument prototype would still apply. */
45a4b03e
KH
13094#ifdef __cplusplus
13095extern "C"
13096#endif
45a4b03e
KH
13097char XftFontOpen ();
13098int
13099main ()
13100{
c24fa7dc 13101return XftFontOpen ();
45a4b03e
KH
13102 ;
13103 return 0;
13104}
13105_ACEOF
13106rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
13107if { (ac_try="$ac_link"
13108case "(($ac_try" in
13109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13110 *) ac_try_echo=$ac_try;;
13111esac
13112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13113 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
13114 ac_status=$?
13115 grep -v '^ *+' conftest.er1 >conftest.err
13116 rm -f conftest.er1
13117 cat conftest.err >&5
13118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
13119 (exit $ac_status); } && {
13120 test -z "$ac_c_werror_flag" ||
13121 test ! -s conftest.err
13122 } && test -s conftest$ac_exeext &&
13123 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
13124 ac_cv_lib_Xft_XftFontOpen=yes
13125else
13126 echo "$as_me: failed program was:" >&5
13127sed 's/^/| /' conftest.$ac_ext >&5
13128
c24fa7dc 13129 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 13130fi
c24fa7dc
MB
13131
13132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
13133 conftest$ac_exeext conftest.$ac_ext
13134LIBS=$ac_check_lib_save_LIBS
13135fi
c24fa7dc
MB
13136{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13137echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
13138if test $ac_cv_lib_Xft_XftFontOpen = yes; then
13139 HAVE_XFT=yes
13140fi
13141
13142fi
13143
13144
13145
13146 if test "${HAVE_XFT}" = "yes"; then
13147
13148cat >>confdefs.h <<\_ACEOF
13149#define HAVE_XFT 1
13150_ACEOF
13151
13152
13153 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13154 else
13155 CFLAGS="$OLD_CPPFLAGS"
13156 CFLAGS="$OLD_CFLAGS"
13157 LIBS="$OLD_LIBS"
13158 fi
13159 fi
13160 fi
13161fi
13162
13163HAVE_FREETYPE=no
13164### Use -lfreetype if available, unless `--with-freetype=no'.
13165if test "${HAVE_XFT}" = "yes"; then
13166 HAVE_FREETYPE=yes
13167elif test "x${with_freetype}" != "xno"; then
13168 if test "X${with_pkg_config_prog}" != X; then
13169 PKG_CONFIG="${with_pkg_config_prog}"
13170 fi
13171
13172
13173 succeeded=no
13174
13175 if test -z "$PKG_CONFIG"; then
13176 # Extract the first word of "pkg-config", so it can be a program name with args.
13177set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13178{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13180if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13181 echo $ECHO_N "(cached) $ECHO_C" >&6
13182else
13183 case $PKG_CONFIG in
13184 [\\/]* | ?:[\\/]*)
13185 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13186 ;;
13187 *)
13188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189for as_dir in $PATH
13190do
13191 IFS=$as_save_IFS
13192 test -z "$as_dir" && as_dir=.
13193 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13194 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13195 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13196 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13197 break 2
13198 fi
13199done
13200done
c24fa7dc 13201IFS=$as_save_IFS
45a4b03e
KH
13202
13203 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13204 ;;
13205esac
13206fi
13207PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13208if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13209 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13210echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13211else
c24fa7dc
MB
13212 { echo "$as_me:$LINENO: result: no" >&5
13213echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13214fi
13215
c24fa7dc 13216
45a4b03e
KH
13217 fi
13218
13219 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13220 HAVE_FREETYPE=no
45a4b03e
KH
13221 else
13222 PKG_CONFIG_MIN_VERSION=0.9.0
13223 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13224 { echo "$as_me:$LINENO: checking for freetype2" >&5
13225echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13226
c24fa7dc
MB
13227 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13228 { echo "$as_me:$LINENO: result: yes" >&5
13229echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13230 succeeded=yes
13231
c24fa7dc
MB
13232 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13233echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13234 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13235 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13236echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13237
c24fa7dc
MB
13238 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13239echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13240 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13241 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13242echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13243 else
c24fa7dc
MB
13244 { echo "$as_me:$LINENO: result: no" >&5
13245echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13246 FREETYPE_CFLAGS=""
13247 FREETYPE_LIBS=""
13248 ## If we have a custom action on failure, don't print errors, but
13249 ## do set a variable so people can do so.
13250 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13251
13252 fi
13253
13254
13255
13256 else
13257 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13258 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13259 fi
13260 fi
13261
13262 if test $succeeded = yes; then
13263 HAVE_FREETYPE=yes
13264 else
13265 HAVE_FREETYPE=no
13266 fi
13267
13268 if test "${HAVE_FREETYPE}" = "yes"; then
13269
13270 succeeded=no
13271
13272 if test -z "$PKG_CONFIG"; then
13273 # Extract the first word of "pkg-config", so it can be a program name with args.
13274set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13277if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13278 echo $ECHO_N "(cached) $ECHO_C" >&6
13279else
13280 case $PKG_CONFIG in
13281 [\\/]* | ?:[\\/]*)
13282 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13283 ;;
13284 *)
13285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13286for as_dir in $PATH
13287do
13288 IFS=$as_save_IFS
13289 test -z "$as_dir" && as_dir=.
13290 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13292 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13294 break 2
13295 fi
13296done
13297done
c24fa7dc 13298IFS=$as_save_IFS
45a4b03e
KH
13299
13300 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13301 ;;
13302esac
13303fi
13304PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13305if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13306 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13307echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13308else
c24fa7dc
MB
13309 { echo "$as_me:$LINENO: result: no" >&5
13310echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13311fi
13312
c24fa7dc 13313
45a4b03e
KH
13314 fi
13315
13316 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13317 HAVE_FC=no
45a4b03e
KH
13318 else
13319 PKG_CONFIG_MIN_VERSION=0.9.0
13320 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13321 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13322echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13323
c24fa7dc
MB
13324 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13325 { echo "$as_me:$LINENO: result: yes" >&5
13326echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13327 succeeded=yes
13328
c24fa7dc
MB
13329 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13330echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13331 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13332 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13333echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13334
c24fa7dc
MB
13335 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13336echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13337 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13338 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13339echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13340 else
c24fa7dc
MB
13341 { echo "$as_me:$LINENO: result: no" >&5
13342echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13343 FONTCONFIG_CFLAGS=""
13344 FONTCONFIG_LIBS=""
13345 ## If we have a custom action on failure, don't print errors, but
13346 ## do set a variable so people can do so.
13347 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13348
13349 fi
13350
13351
13352
13353 else
13354 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13355 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13356 fi
13357 fi
13358
13359 if test $succeeded = yes; then
13360 HAVE_FC=yes
13361 else
13362 HAVE_FC=no
13363 fi
13364
13365 if test "${HAVE_FC}" = "no"; then
13366 HAVE_FREETYPE=no
13367 fi
13368 fi
13369fi
13370if test "${HAVE_FREETYPE}" = "yes"; then
13371
13372cat >>confdefs.h <<\_ACEOF
13373#define HAVE_FREETYPE 1
13374_ACEOF
13375
13376 # Extract the first word of "libotf-config", so it can be a program name with args.
13377set dummy libotf-config; ac_word=$2
c24fa7dc
MB
13378{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13380if test "${ac_cv_prog_HAVE_LIBOTF+set}" = set; then
13381 echo $ECHO_N "(cached) $ECHO_C" >&6
13382else
13383 if test -n "$HAVE_LIBOTF"; then
13384 ac_cv_prog_HAVE_LIBOTF="$HAVE_LIBOTF" # Let the user override the test.
13385else
13386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13387for as_dir in $PATH
13388do
13389 IFS=$as_save_IFS
13390 test -z "$as_dir" && as_dir=.
13391 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13393 ac_cv_prog_HAVE_LIBOTF="yes"
13394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13395 break 2
13396 fi
13397done
13398done
c24fa7dc 13399IFS=$as_save_IFS
45a4b03e
KH
13400
13401 test -z "$ac_cv_prog_HAVE_LIBOTF" && ac_cv_prog_HAVE_LIBOTF="no"
13402fi
13403fi
13404HAVE_LIBOTF=$ac_cv_prog_HAVE_LIBOTF
13405if test -n "$HAVE_LIBOTF"; then
c24fa7dc
MB
13406 { echo "$as_me:$LINENO: result: $HAVE_LIBOTF" >&5
13407echo "${ECHO_T}$HAVE_LIBOTF" >&6; }
45a4b03e 13408else
c24fa7dc
MB
13409 { echo "$as_me:$LINENO: result: no" >&5
13410echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13411fi
13412
c24fa7dc 13413
45a4b03e
KH
13414 if test "${HAVE_LIBOTF}" = "yes"; then
13415
6ed29d7b
KH
13416{ echo "$as_me:$LINENO: checking for OTF_get_features in -lotf" >&5
13417echo $ECHO_N "checking for OTF_get_features in -lotf... $ECHO_C" >&6; }
13418if test "${ac_cv_lib_otf_OTF_get_features+set}" = set; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
13420else
13421 ac_check_lib_save_LIBS=$LIBS
13422LIBS="-lotf $LIBS"
13423cat >conftest.$ac_ext <<_ACEOF
13424/* confdefs.h. */
13425_ACEOF
13426cat confdefs.h >>conftest.$ac_ext
13427cat >>conftest.$ac_ext <<_ACEOF
13428/* end confdefs.h. */
13429
13430/* Override any GCC internal prototype to avoid an error.
13431 Use char because int might match the return type of a GCC
13432 builtin and then its argument prototype would still apply. */
13433#ifdef __cplusplus
13434extern "C"
13435#endif
13436char OTF_get_features ();
13437int
13438main ()
13439{
13440return OTF_get_features ();
13441 ;
13442 return 0;
13443}
13444_ACEOF
13445rm -f conftest.$ac_objext conftest$ac_exeext
13446if { (ac_try="$ac_link"
13447case "(($ac_try" in
13448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13449 *) ac_try_echo=$ac_try;;
13450esac
13451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13452 (eval "$ac_link") 2>conftest.er1
13453 ac_status=$?
13454 grep -v '^ *+' conftest.er1 >conftest.err
13455 rm -f conftest.er1
13456 cat conftest.err >&5
13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13458 (exit $ac_status); } && {
13459 test -z "$ac_c_werror_flag" ||
13460 test ! -s conftest.err
13461 } && test -s conftest$ac_exeext &&
13462 $as_test_x conftest$ac_exeext; then
13463 ac_cv_lib_otf_OTF_get_features=yes
13464else
13465 echo "$as_me: failed program was:" >&5
13466sed 's/^/| /' conftest.$ac_ext >&5
13467
13468 ac_cv_lib_otf_OTF_get_features=no
13469fi
13470
13471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13472 conftest$ac_exeext conftest.$ac_ext
13473LIBS=$ac_check_lib_save_LIBS
13474fi
13475{ echo "$as_me:$LINENO: result: $ac_cv_lib_otf_OTF_get_features" >&5
13476echo "${ECHO_T}$ac_cv_lib_otf_OTF_get_features" >&6; }
13477if test $ac_cv_lib_otf_OTF_get_features = yes; then
13478 cat >>confdefs.h <<_ACEOF
13479#define HAVE_LIBOTF 1
13480_ACEOF
13481
13482 LIBS="-lotf $LIBS"
13483
13484else
13485 HAVE_LIBOTF=no
13486fi
13487
13488 if test "${HAVE_LIBOTF}" = "yes"; then
13489
45a4b03e
KH
13490cat >>confdefs.h <<\_ACEOF
13491#define HAVE_LIBOTF 1
13492_ACEOF
13493
6ed29d7b
KH
13494 LIBOTF_CFLAGS=`libotf-config --cflags`
13495 LIBOTF_LIBS=`libotf-config --libs`
13496 fi
45a4b03e
KH
13497 fi
13498fi
13499
13500
13501
13502
13503
13504
13505
98418dba
CW
13506fi
13507
13508### Use -lXpm if available, unless `--with-xpm=no'.
13509HAVE_XPM=no
13510if test "${HAVE_X11}" = "yes"; then
13511 if test "${with_xpm}" != "no"; then
c0d27fcc 13512 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13513 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13514echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13515if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13516 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13517fi
4c34eeee
MB
13518{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13519echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13520else
c0d27fcc 13521 # Is the header compilable?
4c34eeee
MB
13522{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13523echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
c0d27fcc
MR
13530$ac_includes_default
13531#include <X11/xpm.h>
13532_ACEOF
13533rm -f conftest.$ac_objext
4c34eeee
MB
13534if { (ac_try="$ac_compile"
13535case "(($ac_try" in
13536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13537 *) ac_try_echo=$ac_try;;
13538esac
13539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13540 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13541 ac_status=$?
edfaf76d
LK
13542 grep -v '^ *+' conftest.er1 >conftest.err
13543 rm -f conftest.er1
13544 cat conftest.err >&5
c0d27fcc 13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13546 (exit $ac_status); } && {
13547 test -z "$ac_c_werror_flag" ||
13548 test ! -s conftest.err
13549 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13550 ac_header_compiler=yes
13551else
13552 echo "$as_me: failed program was:" >&5
19650fd6
AS
13553sed 's/^/| /' conftest.$ac_ext >&5
13554
4c34eeee 13555 ac_header_compiler=no
c0d27fcc 13556fi
4c34eeee
MB
13557
13558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13559{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13560echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13561
13562# Is the header present?
4c34eeee
MB
13563{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13564echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13565cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13566/* confdefs.h. */
13567_ACEOF
13568cat confdefs.h >>conftest.$ac_ext
13569cat >>conftest.$ac_ext <<_ACEOF
13570/* end confdefs.h. */
98418dba
CW
13571#include <X11/xpm.h>
13572_ACEOF
4c34eeee
MB
13573if { (ac_try="$ac_cpp conftest.$ac_ext"
13574case "(($ac_try" in
13575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13576 *) ac_try_echo=$ac_try;;
13577esac
13578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13579 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13580 ac_status=$?
6bae0ccf 13581 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13582 rm -f conftest.er1
13583 cat conftest.err >&5
c0d27fcc 13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13585 (exit $ac_status); } >/dev/null && {
13586 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13587 test ! -s conftest.err
13588 }; then
c0d27fcc 13589 ac_header_preproc=yes
98418dba
CW
13590else
13591 echo "$as_me: failed program was:" >&5
19650fd6
AS
13592sed 's/^/| /' conftest.$ac_ext >&5
13593
c0d27fcc 13594 ac_header_preproc=no
98418dba 13595fi
4c34eeee 13596
98418dba 13597rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13598{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13599echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13600
13601# So? What about this header?
edfaf76d
LK
13602case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13603 yes:no: )
c0d27fcc
MR
13604 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13605echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13606 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13607echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13608 ac_header_preproc=yes
13609 ;;
13610 no:yes:* )
13611 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13612echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13613 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13614echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13615 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13616echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13617 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13618echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13619 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13620echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13621 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13622echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13623
19650fd6 13624 ;;
c0d27fcc 13625esac
4c34eeee
MB
13626{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13627echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13628if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13629 echo $ECHO_N "(cached) $ECHO_C" >&6
13630else
13631 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13632fi
4c34eeee
MB
13633{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13634echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13635
13636fi
98418dba 13637if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13638 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13639echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13640if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13641 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13642else
98418dba
CW
13643 ac_check_lib_save_LIBS=$LIBS
13644LIBS="-lXpm -lX11 $LIBS"
13645cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13646/* confdefs.h. */
13647_ACEOF
13648cat confdefs.h >>conftest.$ac_ext
13649cat >>conftest.$ac_ext <<_ACEOF
13650/* end confdefs.h. */
98418dba 13651
4c34eeee
MB
13652/* Override any GCC internal prototype to avoid an error.
13653 Use char because int might match the return type of a GCC
13654 builtin and then its argument prototype would still apply. */
503d2be0
AS
13655#ifdef __cplusplus
13656extern "C"
13657#endif
98418dba 13658char XpmReadFileToPixmap ();
503d2be0
AS
13659int
13660main ()
13661{
4c34eeee 13662return XpmReadFileToPixmap ();
503d2be0
AS
13663 ;
13664 return 0;
13665}
13666_ACEOF
13667rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13668if { (ac_try="$ac_link"
13669case "(($ac_try" in
13670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13671 *) ac_try_echo=$ac_try;;
13672esac
13673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13674 (eval "$ac_link") 2>conftest.er1
503d2be0 13675 ac_status=$?
edfaf76d
LK
13676 grep -v '^ *+' conftest.er1 >conftest.err
13677 rm -f conftest.er1
13678 cat conftest.err >&5
c0d27fcc 13679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13680 (exit $ac_status); } && {
13681 test -z "$ac_c_werror_flag" ||
13682 test ! -s conftest.err
13683 } && test -s conftest$ac_exeext &&
13684 $as_test_x conftest$ac_exeext; then
98418dba 13685 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13686else
13687 echo "$as_me: failed program was:" >&5
19650fd6
AS
13688sed 's/^/| /' conftest.$ac_ext >&5
13689
4c34eeee 13690 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13691fi
4c34eeee
MB
13692
13693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13694 conftest$ac_exeext conftest.$ac_ext
98418dba 13695LIBS=$ac_check_lib_save_LIBS
503d2be0 13696fi
4c34eeee
MB
13697{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13698echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13699if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13700 HAVE_XPM=yes
ba4481b5
DL
13701fi
13702
98418dba
CW
13703fi
13704
c0d27fcc 13705
98418dba 13706 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13707 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13708echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13709 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13710/* confdefs.h. */
13711_ACEOF
13712cat confdefs.h >>conftest.$ac_ext
13713cat >>conftest.$ac_ext <<_ACEOF
13714/* end confdefs.h. */
98418dba
CW
13715#include "X11/xpm.h"
13716#ifndef XpmReturnAllocPixels
13717no_return_alloc_pixels
503d2be0 13718#endif
ba4481b5 13719
98418dba
CW
13720_ACEOF
13721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13722 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13723 HAVE_XPM=no
13724else
13725 HAVE_XPM=yes
13726fi
13727rm -f conftest*
ba4481b5 13728
c0d27fcc 13729
98418dba 13730 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13731 { echo "$as_me:$LINENO: result: yes" >&5
13732echo "${ECHO_T}yes" >&6; }
98418dba 13733 else
4c34eeee
MB
13734 { echo "$as_me:$LINENO: result: no" >&5
13735echo "${ECHO_T}no" >&6; }
98418dba
CW
13736 fi
13737 fi
13738 fi
13739
13740 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13741
c0d27fcc 13742cat >>confdefs.h <<\_ACEOF
98418dba 13743#define HAVE_XPM 1
c0d27fcc 13744_ACEOF
98418dba
CW
13745
13746 fi
13747fi
13748
13749### Use -ljpeg if available, unless `--with-jpeg=no'.
13750HAVE_JPEG=no
13751if test "${HAVE_X11}" = "yes"; then
13752 if test "${with_jpeg}" != "no"; then
c0d27fcc 13753 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13754 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13755echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13756if test "${ac_cv_header_jerror_h+set}" = set; then
13757 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13758fi
ca81d7a0
JD
13759{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13760echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13761else
c0d27fcc 13762 # Is the header compilable?
ca81d7a0
JD
13763{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13764echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13765cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13766/* confdefs.h. */
13767_ACEOF
13768cat confdefs.h >>conftest.$ac_ext
13769cat >>conftest.$ac_ext <<_ACEOF
13770/* end confdefs.h. */
c0d27fcc
MR
13771$ac_includes_default
13772#include <jerror.h>
13773_ACEOF
13774rm -f conftest.$ac_objext
ca81d7a0
JD
13775if { (ac_try="$ac_compile"
13776case "(($ac_try" in
13777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13778 *) ac_try_echo=$ac_try;;
13779esac
13780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13781 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13782 ac_status=$?
edfaf76d
LK
13783 grep -v '^ *+' conftest.er1 >conftest.err
13784 rm -f conftest.er1
13785 cat conftest.err >&5
c0d27fcc 13786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13787 (exit $ac_status); } && {
13788 test -z "$ac_c_werror_flag" ||
13789 test ! -s conftest.err
13790 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13791 ac_header_compiler=yes
13792else
13793 echo "$as_me: failed program was:" >&5
19650fd6
AS
13794sed 's/^/| /' conftest.$ac_ext >&5
13795
ca81d7a0 13796 ac_header_compiler=no
c0d27fcc 13797fi
ca81d7a0
JD
13798
13799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13800{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13801echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13802
13803# Is the header present?
ca81d7a0
JD
13804{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13805echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13806cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13807/* confdefs.h. */
13808_ACEOF
13809cat confdefs.h >>conftest.$ac_ext
13810cat >>conftest.$ac_ext <<_ACEOF
13811/* end confdefs.h. */
98418dba
CW
13812#include <jerror.h>
13813_ACEOF
ca81d7a0
JD
13814if { (ac_try="$ac_cpp conftest.$ac_ext"
13815case "(($ac_try" in
13816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13817 *) ac_try_echo=$ac_try;;
13818esac
13819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13821 ac_status=$?
6bae0ccf 13822 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13823 rm -f conftest.er1
13824 cat conftest.err >&5
c0d27fcc 13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13826 (exit $ac_status); } >/dev/null && {
13827 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13828 test ! -s conftest.err
13829 }; then
c0d27fcc 13830 ac_header_preproc=yes
ba4481b5 13831else
98418dba 13832 echo "$as_me: failed program was:" >&5
19650fd6
AS
13833sed 's/^/| /' conftest.$ac_ext >&5
13834
c0d27fcc 13835 ac_header_preproc=no
98418dba 13836fi
ca81d7a0 13837
98418dba 13838rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13839{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13840echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13841
13842# So? What about this header?
edfaf76d
LK
13843case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13844 yes:no: )
c0d27fcc
MR
13845 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13846echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13847 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13848echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13849 ac_header_preproc=yes
19650fd6 13850 ;;
edfaf76d 13851 no:yes:* )
c0d27fcc
MR
13852 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13853echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13854 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13855echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13856 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13857echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13858 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13859echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13860 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13861echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13862 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13863echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13864
19650fd6 13865 ;;
c0d27fcc 13866esac
ca81d7a0
JD
13867{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13868echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13869if test "${ac_cv_header_jerror_h+set}" = set; then
13870 echo $ECHO_N "(cached) $ECHO_C" >&6
13871else
13872 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13873fi
ca81d7a0
JD
13874{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13875echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13876
13877fi
98418dba 13878if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13879 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13880echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13881if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13882 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13883else
98418dba
CW
13884 ac_check_lib_save_LIBS=$LIBS
13885LIBS="-ljpeg $LIBS"
13886cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13887/* confdefs.h. */
13888_ACEOF
13889cat confdefs.h >>conftest.$ac_ext
13890cat >>conftest.$ac_ext <<_ACEOF
13891/* end confdefs.h. */
98418dba 13892
ca81d7a0
JD
13893/* Override any GCC internal prototype to avoid an error.
13894 Use char because int might match the return type of a GCC
13895 builtin and then its argument prototype would still apply. */
98418dba
CW
13896#ifdef __cplusplus
13897extern "C"
13898#endif
98418dba 13899char jpeg_destroy_compress ();
503d2be0
AS
13900int
13901main ()
13902{
ca81d7a0 13903return jpeg_destroy_compress ();
503d2be0
AS
13904 ;
13905 return 0;
13906}
13907_ACEOF
13908rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13909if { (ac_try="$ac_link"
13910case "(($ac_try" in
13911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13912 *) ac_try_echo=$ac_try;;
13913esac
13914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13915 (eval "$ac_link") 2>conftest.er1
503d2be0 13916 ac_status=$?
edfaf76d
LK
13917 grep -v '^ *+' conftest.er1 >conftest.err
13918 rm -f conftest.er1
13919 cat conftest.err >&5
c0d27fcc 13920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13921 (exit $ac_status); } && {
13922 test -z "$ac_c_werror_flag" ||
13923 test ! -s conftest.err
13924 } && test -s conftest$ac_exeext &&
13925 $as_test_x conftest$ac_exeext; then
98418dba 13926 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13927else
503d2be0 13928 echo "$as_me: failed program was:" >&5
19650fd6
AS
13929sed 's/^/| /' conftest.$ac_ext >&5
13930
ca81d7a0 13931 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13932fi
ca81d7a0 13933
f053c89f 13934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13935 conftest$ac_exeext conftest.$ac_ext
98418dba 13936LIBS=$ac_check_lib_save_LIBS
ba4481b5 13937fi
ca81d7a0
JD
13938{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13939echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13940if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13941 HAVE_JPEG=yes
ba4481b5 13942fi
98418dba 13943
ba4481b5 13944fi
98418dba 13945
c0d27fcc 13946
ba4481b5 13947 fi
ba4481b5 13948
c0d27fcc 13949
98418dba 13950 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13951 cat >>confdefs.h <<\_ACEOF
98418dba 13952#define HAVE_JPEG 1
c0d27fcc 13953_ACEOF
98418dba
CW
13954
13955 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13956/* confdefs.h. */
13957_ACEOF
13958cat confdefs.h >>conftest.$ac_ext
13959cat >>conftest.$ac_ext <<_ACEOF
13960/* end confdefs.h. */
22044edf 13961#include <jpeglib.h>
98418dba
CW
13962 version=JPEG_LIB_VERSION
13963
13964_ACEOF
13965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13966 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13967 cat >>confdefs.h <<\_ACEOF
98418dba 13968#define HAVE_JPEG 1
c0d27fcc 13969_ACEOF
ba4481b5 13970
98418dba 13971else
c0d27fcc 13972 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13973echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13974 HAVE_JPEG=no
ba4481b5 13975fi
98418dba 13976rm -f conftest*
ba4481b5 13977
98418dba
CW
13978 fi
13979fi
503d2be0 13980
98418dba
CW
13981### Use -lpng if available, unless `--with-png=no'.
13982HAVE_PNG=no
13983if test "${HAVE_X11}" = "yes"; then
13984 if test "${with_png}" != "no"; then
f57bd967
DL
13985 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13986 # in /usr/include/libpng.
13987
13988
13989for ac_header in png.h libpng/png.h
13990do
13991as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13992if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13993 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13994echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13995if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13996 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13997fi
ca81d7a0
JD
13998ac_res=`eval echo '${'$as_ac_Header'}'`
13999 { echo "$as_me:$LINENO: result: $ac_res" >&5
14000echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14001else
c0d27fcc 14002 # Is the header compilable?
ca81d7a0
JD
14003{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14004echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 14005cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14006/* confdefs.h. */
14007_ACEOF
14008cat confdefs.h >>conftest.$ac_ext
14009cat >>conftest.$ac_ext <<_ACEOF
14010/* end confdefs.h. */
c0d27fcc 14011$ac_includes_default
f57bd967 14012#include <$ac_header>
c0d27fcc
MR
14013_ACEOF
14014rm -f conftest.$ac_objext
ca81d7a0
JD
14015if { (ac_try="$ac_compile"
14016case "(($ac_try" in
14017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14018 *) ac_try_echo=$ac_try;;
14019esac
14020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14021 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14022 ac_status=$?
edfaf76d
LK
14023 grep -v '^ *+' conftest.er1 >conftest.err
14024 rm -f conftest.er1
14025 cat conftest.err >&5
c0d27fcc 14026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14027 (exit $ac_status); } && {
14028 test -z "$ac_c_werror_flag" ||
14029 test ! -s conftest.err
14030 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14031 ac_header_compiler=yes
14032else
14033 echo "$as_me: failed program was:" >&5
19650fd6
AS
14034sed 's/^/| /' conftest.$ac_ext >&5
14035
ca81d7a0 14036 ac_header_compiler=no
c0d27fcc 14037fi
ca81d7a0
JD
14038
14039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14040{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14041echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14042
14043# Is the header present?
ca81d7a0
JD
14044{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
14045echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 14046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14047/* confdefs.h. */
14048_ACEOF
14049cat confdefs.h >>conftest.$ac_ext
14050cat >>conftest.$ac_ext <<_ACEOF
14051/* end confdefs.h. */
f57bd967 14052#include <$ac_header>
503d2be0 14053_ACEOF
ca81d7a0
JD
14054if { (ac_try="$ac_cpp conftest.$ac_ext"
14055case "(($ac_try" in
14056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14057 *) ac_try_echo=$ac_try;;
14058esac
14059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14060 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 14061 ac_status=$?
6bae0ccf 14062 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
14063 rm -f conftest.er1
14064 cat conftest.err >&5
c0d27fcc 14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14066 (exit $ac_status); } >/dev/null && {
14067 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14068 test ! -s conftest.err
14069 }; then
c0d27fcc 14070 ac_header_preproc=yes
503d2be0
AS
14071else
14072 echo "$as_me: failed program was:" >&5
19650fd6
AS
14073sed 's/^/| /' conftest.$ac_ext >&5
14074
c0d27fcc 14075 ac_header_preproc=no
ba4481b5 14076fi
ca81d7a0 14077
503d2be0 14078rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14079{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14080echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14081
14082# So? What about this header?
edfaf76d
LK
14083case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14084 yes:no: )
f57bd967
DL
14085 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14086echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14087 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14088echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14089 ac_header_preproc=yes
19650fd6 14090 ;;
edfaf76d 14091 no:yes:* )
f57bd967
DL
14092 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14093echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14094 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14095echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14096 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14097echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14098 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14099echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 14100 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14101echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14102 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14103echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14104
19650fd6 14105 ;;
c0d27fcc 14106esac
ca81d7a0
JD
14107{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14108echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14109if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
14110 echo $ECHO_N "(cached) $ECHO_C" >&6
14111else
edfaf76d 14112 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14113fi
ca81d7a0
JD
14114ac_res=`eval echo '${'$as_ac_Header'}'`
14115 { echo "$as_me:$LINENO: result: $ac_res" >&5
14116echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14117
ba4481b5 14118fi
f57bd967
DL
14119if test `eval echo '${'$as_ac_Header'}'` = yes; then
14120 cat >>confdefs.h <<_ACEOF
14121#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14122_ACEOF
c0d27fcc
MR
14123
14124fi
f57bd967
DL
14125
14126done
14127
14128 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
14129 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14130echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14131if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 14132 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14133else
98418dba
CW
14134 ac_check_lib_save_LIBS=$LIBS
14135LIBS="-lpng -lz -lm $LIBS"
14136cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14137/* confdefs.h. */
14138_ACEOF
14139cat confdefs.h >>conftest.$ac_ext
14140cat >>conftest.$ac_ext <<_ACEOF
14141/* end confdefs.h. */
98418dba 14142
ca81d7a0
JD
14143/* Override any GCC internal prototype to avoid an error.
14144 Use char because int might match the return type of a GCC
14145 builtin and then its argument prototype would still apply. */
503d2be0
AS
14146#ifdef __cplusplus
14147extern "C"
14148#endif
98418dba 14149char png_get_channels ();
503d2be0
AS
14150int
14151main ()
14152{
ca81d7a0 14153return png_get_channels ();
503d2be0
AS
14154 ;
14155 return 0;
14156}
14157_ACEOF
14158rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14159if { (ac_try="$ac_link"
14160case "(($ac_try" in
14161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14162 *) ac_try_echo=$ac_try;;
14163esac
14164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14165 (eval "$ac_link") 2>conftest.er1
503d2be0 14166 ac_status=$?
edfaf76d
LK
14167 grep -v '^ *+' conftest.er1 >conftest.err
14168 rm -f conftest.er1
14169 cat conftest.err >&5
c0d27fcc 14170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14171 (exit $ac_status); } && {
14172 test -z "$ac_c_werror_flag" ||
14173 test ! -s conftest.err
14174 } && test -s conftest$ac_exeext &&
14175 $as_test_x conftest$ac_exeext; then
98418dba 14176 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14177else
98418dba 14178 echo "$as_me: failed program was:" >&5
19650fd6
AS
14179sed 's/^/| /' conftest.$ac_ext >&5
14180
ca81d7a0 14181 ac_cv_lib_png_png_get_channels=no
73b77ee5 14182fi
ca81d7a0 14183
f053c89f 14184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14185 conftest$ac_exeext conftest.$ac_ext
98418dba 14186LIBS=$ac_check_lib_save_LIBS
73b77ee5 14187fi
ca81d7a0
JD
14188{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14189echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14190if test $ac_cv_lib_png_png_get_channels = yes; then
14191 HAVE_PNG=yes
73b77ee5 14192fi
503d2be0 14193
f57bd967 14194 fi
98418dba
CW
14195 fi
14196
14197 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14198
c0d27fcc 14199cat >>confdefs.h <<\_ACEOF
98418dba 14200#define HAVE_PNG 1
c0d27fcc 14201_ACEOF
73b77ee5 14202
98418dba 14203 fi
73b77ee5
GM
14204fi
14205
98418dba
CW
14206### Use -ltiff if available, unless `--with-tiff=no'.
14207HAVE_TIFF=no
14208if test "${HAVE_X11}" = "yes"; then
14209 if test "${with_tiff}" != "no"; then
c0d27fcc 14210 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14211 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14212echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14213if test "${ac_cv_header_tiffio_h+set}" = set; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14215fi
ca81d7a0
JD
14216{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14217echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14218else
c0d27fcc 14219 # Is the header compilable?
ca81d7a0
JD
14220{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14221echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14223/* confdefs.h. */
14224_ACEOF
14225cat confdefs.h >>conftest.$ac_ext
14226cat >>conftest.$ac_ext <<_ACEOF
14227/* end confdefs.h. */
c0d27fcc
MR
14228$ac_includes_default
14229#include <tiffio.h>
14230_ACEOF
14231rm -f conftest.$ac_objext
ca81d7a0
JD
14232if { (ac_try="$ac_compile"
14233case "(($ac_try" in
14234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14235 *) ac_try_echo=$ac_try;;
14236esac
14237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14238 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14239 ac_status=$?
edfaf76d
LK
14240 grep -v '^ *+' conftest.er1 >conftest.err
14241 rm -f conftest.er1
14242 cat conftest.err >&5
c0d27fcc 14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14244 (exit $ac_status); } && {
14245 test -z "$ac_c_werror_flag" ||
14246 test ! -s conftest.err
14247 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14248 ac_header_compiler=yes
14249else
14250 echo "$as_me: failed program was:" >&5
19650fd6
AS
14251sed 's/^/| /' conftest.$ac_ext >&5
14252
ca81d7a0 14253 ac_header_compiler=no
c0d27fcc 14254fi
ca81d7a0
JD
14255
14256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14258echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14259
14260# Is the header present?
ca81d7a0
JD
14261{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14262echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14263cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14264/* confdefs.h. */
14265_ACEOF
14266cat confdefs.h >>conftest.$ac_ext
14267cat >>conftest.$ac_ext <<_ACEOF
14268/* end confdefs.h. */
98418dba
CW
14269#include <tiffio.h>
14270_ACEOF
ca81d7a0
JD
14271if { (ac_try="$ac_cpp conftest.$ac_ext"
14272case "(($ac_try" in
14273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14274 *) ac_try_echo=$ac_try;;
14275esac
14276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14278 ac_status=$?
6bae0ccf 14279 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14280 rm -f conftest.er1
14281 cat conftest.err >&5
c0d27fcc 14282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14283 (exit $ac_status); } >/dev/null && {
14284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14285 test ! -s conftest.err
14286 }; then
c0d27fcc 14287 ac_header_preproc=yes
98418dba
CW
14288else
14289 echo "$as_me: failed program was:" >&5
19650fd6
AS
14290sed 's/^/| /' conftest.$ac_ext >&5
14291
c0d27fcc 14292 ac_header_preproc=no
98418dba 14293fi
ca81d7a0 14294
98418dba 14295rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14296{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14297echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14298
14299# So? What about this header?
edfaf76d
LK
14300case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14301 yes:no: )
c0d27fcc
MR
14302 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14303echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14304 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14305echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14306 ac_header_preproc=yes
19650fd6 14307 ;;
edfaf76d 14308 no:yes:* )
c0d27fcc
MR
14309 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14310echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14311 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14312echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14313 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14314echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14315 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14316echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14317 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14318echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14319 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14320echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14321
19650fd6 14322 ;;
c0d27fcc 14323esac
ca81d7a0
JD
14324{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14325echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14326if test "${ac_cv_header_tiffio_h+set}" = set; then
14327 echo $ECHO_N "(cached) $ECHO_C" >&6
14328else
14329 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14330fi
ca81d7a0
JD
14331{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14332echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14333
14334fi
98418dba
CW
14335if test $ac_cv_header_tiffio_h = yes; then
14336 tifflibs="-lz -lm"
14337 # At least one tiff package requires the jpeg library.
14338 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14339 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14340echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14341if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14342 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14343else
503d2be0 14344 ac_check_lib_save_LIBS=$LIBS
98418dba 14345LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14346cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14347/* confdefs.h. */
14348_ACEOF
14349cat confdefs.h >>conftest.$ac_ext
14350cat >>conftest.$ac_ext <<_ACEOF
14351/* end confdefs.h. */
503d2be0 14352
ca81d7a0
JD
14353/* Override any GCC internal prototype to avoid an error.
14354 Use char because int might match the return type of a GCC
14355 builtin and then its argument prototype would still apply. */
503d2be0
AS
14356#ifdef __cplusplus
14357extern "C"
14358#endif
98418dba 14359char TIFFGetVersion ();
503d2be0
AS
14360int
14361main ()
14362{
ca81d7a0 14363return TIFFGetVersion ();
503d2be0
AS
14364 ;
14365 return 0;
14366}
14367_ACEOF
14368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14369if { (ac_try="$ac_link"
14370case "(($ac_try" in
14371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14372 *) ac_try_echo=$ac_try;;
14373esac
14374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14375 (eval "$ac_link") 2>conftest.er1
503d2be0 14376 ac_status=$?
edfaf76d
LK
14377 grep -v '^ *+' conftest.er1 >conftest.err
14378 rm -f conftest.er1
14379 cat conftest.err >&5
c0d27fcc 14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14381 (exit $ac_status); } && {
14382 test -z "$ac_c_werror_flag" ||
14383 test ! -s conftest.err
14384 } && test -s conftest$ac_exeext &&
14385 $as_test_x conftest$ac_exeext; then
98418dba 14386 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14387else
14388 echo "$as_me: failed program was:" >&5
19650fd6
AS
14389sed 's/^/| /' conftest.$ac_ext >&5
14390
ca81d7a0 14391 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14392fi
ca81d7a0 14393
f053c89f 14394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14395 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14396LIBS=$ac_check_lib_save_LIBS
14397fi
ca81d7a0
JD
14398{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14399echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14400if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14401 HAVE_TIFF=yes
14402fi
14403
14404fi
73b77ee5 14405
c0d27fcc 14406
98418dba
CW
14407 fi
14408
14409 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14410
c0d27fcc 14411cat >>confdefs.h <<\_ACEOF
98418dba 14412#define HAVE_TIFF 1
c0d27fcc 14413_ACEOF
98418dba
CW
14414
14415 fi
73b77ee5
GM
14416fi
14417
9aeb8aaa 14418### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14419HAVE_GIF=no
9aeb8aaa
GM
14420if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14421 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14422 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14423echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14424if test "${ac_cv_header_gif_lib_h+set}" = set; then
14425 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14426fi
ca81d7a0
JD
14427{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14428echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14429else
c0d27fcc 14430 # Is the header compilable?
ca81d7a0
JD
14431{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14432echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14433cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14434/* confdefs.h. */
14435_ACEOF
14436cat confdefs.h >>conftest.$ac_ext
14437cat >>conftest.$ac_ext <<_ACEOF
14438/* end confdefs.h. */
c0d27fcc
MR
14439$ac_includes_default
14440#include <gif_lib.h>
14441_ACEOF
14442rm -f conftest.$ac_objext
ca81d7a0
JD
14443if { (ac_try="$ac_compile"
14444case "(($ac_try" in
14445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14446 *) ac_try_echo=$ac_try;;
14447esac
14448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14449 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14450 ac_status=$?
edfaf76d
LK
14451 grep -v '^ *+' conftest.er1 >conftest.err
14452 rm -f conftest.er1
14453 cat conftest.err >&5
c0d27fcc 14454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14455 (exit $ac_status); } && {
14456 test -z "$ac_c_werror_flag" ||
14457 test ! -s conftest.err
14458 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14459 ac_header_compiler=yes
14460else
14461 echo "$as_me: failed program was:" >&5
19650fd6
AS
14462sed 's/^/| /' conftest.$ac_ext >&5
14463
ca81d7a0 14464 ac_header_compiler=no
c0d27fcc 14465fi
ca81d7a0
JD
14466
14467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14469echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14470
14471# Is the header present?
ca81d7a0
JD
14472{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14473echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14474cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14475/* confdefs.h. */
14476_ACEOF
14477cat confdefs.h >>conftest.$ac_ext
14478cat >>conftest.$ac_ext <<_ACEOF
14479/* end confdefs.h. */
98418dba
CW
14480#include <gif_lib.h>
14481_ACEOF
ca81d7a0
JD
14482if { (ac_try="$ac_cpp conftest.$ac_ext"
14483case "(($ac_try" in
14484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14485 *) ac_try_echo=$ac_try;;
14486esac
14487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14488 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14489 ac_status=$?
6bae0ccf 14490 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14491 rm -f conftest.er1
14492 cat conftest.err >&5
c0d27fcc 14493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14494 (exit $ac_status); } >/dev/null && {
14495 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14496 test ! -s conftest.err
14497 }; then
c0d27fcc 14498 ac_header_preproc=yes
98418dba
CW
14499else
14500 echo "$as_me: failed program was:" >&5
19650fd6
AS
14501sed 's/^/| /' conftest.$ac_ext >&5
14502
c0d27fcc 14503 ac_header_preproc=no
98418dba 14504fi
ca81d7a0 14505
98418dba 14506rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14507{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14508echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14509
14510# So? What about this header?
edfaf76d
LK
14511case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14512 yes:no: )
c0d27fcc
MR
14513 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14514echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14515 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14516echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14517 ac_header_preproc=yes
19650fd6 14518 ;;
edfaf76d 14519 no:yes:* )
c0d27fcc
MR
14520 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14521echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14522 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14523echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14524 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14525echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14526 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14527echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14528 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14529echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14530 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14531echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14532
19650fd6 14533 ;;
c0d27fcc 14534esac
ca81d7a0
JD
14535{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14536echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14537if test "${ac_cv_header_gif_lib_h+set}" = set; then
14538 echo $ECHO_N "(cached) $ECHO_C" >&6
14539else
14540 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14541fi
ca81d7a0
JD
14542{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14543echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14544
14545fi
98418dba
CW
14546if test $ac_cv_header_gif_lib_h = yes; then
14547 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14548# Earlier versions can crash Emacs.
63175cd2
GM
14549 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14550echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14551if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14552 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14553else
503d2be0 14554 ac_check_lib_save_LIBS=$LIBS
63175cd2 14555LIBS="-lgif $LIBS"
503d2be0 14556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14557/* confdefs.h. */
14558_ACEOF
14559cat confdefs.h >>conftest.$ac_ext
14560cat >>conftest.$ac_ext <<_ACEOF
14561/* end confdefs.h. */
73b77ee5 14562
ca81d7a0
JD
14563/* Override any GCC internal prototype to avoid an error.
14564 Use char because int might match the return type of a GCC
14565 builtin and then its argument prototype would still apply. */
98418dba
CW
14566#ifdef __cplusplus
14567extern "C"
14568#endif
98418dba 14569char EGifPutExtensionLast ();
503d2be0
AS
14570int
14571main ()
14572{
ca81d7a0 14573return EGifPutExtensionLast ();
503d2be0
AS
14574 ;
14575 return 0;
14576}
14577_ACEOF
14578rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14579if { (ac_try="$ac_link"
14580case "(($ac_try" in
14581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14582 *) ac_try_echo=$ac_try;;
14583esac
14584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14585 (eval "$ac_link") 2>conftest.er1
503d2be0 14586 ac_status=$?
edfaf76d
LK
14587 grep -v '^ *+' conftest.er1 >conftest.err
14588 rm -f conftest.er1
14589 cat conftest.err >&5
c0d27fcc 14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14591 (exit $ac_status); } && {
14592 test -z "$ac_c_werror_flag" ||
14593 test ! -s conftest.err
14594 } && test -s conftest$ac_exeext &&
14595 $as_test_x conftest$ac_exeext; then
63175cd2 14596 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14597else
98418dba 14598 echo "$as_me: failed program was:" >&5
19650fd6
AS
14599sed 's/^/| /' conftest.$ac_ext >&5
14600
63175cd2 14601 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14602fi
ca81d7a0 14603
f053c89f 14604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14605 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14606LIBS=$ac_check_lib_save_LIBS
14607fi
63175cd2
GM
14608{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14609echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14610if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14611 HAVE_GIF=yes
9aeb8aaa 14612else
63175cd2 14613 try_libungif=yes
98418dba
CW
14614fi
14615
14616fi
14617
c0d27fcc 14618
9aeb8aaa
GM
14619
14620 if test "$HAVE_GIF" = yes; then
63175cd2 14621 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14622 fi
14623
63175cd2
GM
14624# If gif_lib.h but no libgif, try libungif.
14625 if test x"$try_libungif" = xyes; then
14626 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14627echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14628if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14629 echo $ECHO_N "(cached) $ECHO_C" >&6
14630else
14631 ac_check_lib_save_LIBS=$LIBS
63175cd2 14632LIBS="-lungif $LIBS"
9aeb8aaa
GM
14633cat >conftest.$ac_ext <<_ACEOF
14634/* confdefs.h. */
14635_ACEOF
14636cat confdefs.h >>conftest.$ac_ext
14637cat >>conftest.$ac_ext <<_ACEOF
14638/* end confdefs.h. */
14639
14640/* Override any GCC internal prototype to avoid an error.
14641 Use char because int might match the return type of a GCC
14642 builtin and then its argument prototype would still apply. */
14643#ifdef __cplusplus
14644extern "C"
14645#endif
14646char EGifPutExtensionLast ();
14647int
14648main ()
14649{
14650return EGifPutExtensionLast ();
14651 ;
14652 return 0;
14653}
14654_ACEOF
14655rm -f conftest.$ac_objext conftest$ac_exeext
14656if { (ac_try="$ac_link"
14657case "(($ac_try" in
14658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14659 *) ac_try_echo=$ac_try;;
14660esac
14661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14662 (eval "$ac_link") 2>conftest.er1
14663 ac_status=$?
14664 grep -v '^ *+' conftest.er1 >conftest.err
14665 rm -f conftest.er1
14666 cat conftest.err >&5
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); } && {
14669 test -z "$ac_c_werror_flag" ||
14670 test ! -s conftest.err
14671 } && test -s conftest$ac_exeext &&
14672 $as_test_x conftest$ac_exeext; then
63175cd2 14673 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14674else
14675 echo "$as_me: failed program was:" >&5
14676sed 's/^/| /' conftest.$ac_ext >&5
14677
63175cd2 14678 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14679fi
14680
9aeb8aaa
GM
14681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14682 conftest$ac_exeext conftest.$ac_ext
14683LIBS=$ac_check_lib_save_LIBS
14684fi
63175cd2
GM
14685{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14686echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14687if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14688 HAVE_GIF=yes
98418dba
CW
14689fi
14690
c0d27fcc 14691
9aeb8aaa
GM
14692 if test "$HAVE_GIF" = yes; then
14693
14694cat >>confdefs.h <<\_ACEOF
63175cd2 14695#define LIBGIF -lungif
9aeb8aaa
GM
14696_ACEOF
14697
63175cd2 14698 ac_gif_lib_name="-lungif"
9aeb8aaa 14699 fi
98418dba
CW
14700 fi
14701
14702 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14703
c0d27fcc 14704cat >>confdefs.h <<\_ACEOF
98418dba 14705#define HAVE_GIF 1
c0d27fcc 14706_ACEOF
98418dba
CW
14707
14708 fi
14709fi
14710
5afbeb22
JD
14711if test "${HAVE_X11}" = "yes"; then
14712 MISSING=""
14713 WITH_NO=""
14714 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14715 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14716 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14717 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14718 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14719 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14720 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14721 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14722 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14723 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14724
14725 if test "X${MISSING}" != X; then
1bb9a689 14726 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14727 $MISSING
86e73516 14728Maybe some development libraries/packages are missing?
5afbeb22
JD
14729If you don't want to link with them give
14730 $WITH_NO
14731as options to configure" >&5
1bb9a689 14732echo "$as_me: error: The following required libraries were not found:
5afbeb22 14733 $MISSING
86e73516 14734Maybe some development libraries/packages are missing?
5afbeb22
JD
14735If you don't want to link with them give
14736 $WITH_NO
14737as options to configure" >&2;}
86e73516 14738 { (exit 1); exit 1; }; }
98418dba
CW
14739 fi
14740fi
14741
79011b82
NR
14742### Use -lgpm if available, unless `--with-gpm=no'.
14743HAVE_GPM=no
14744if test "${with_gpm}" != "no"; then
14745 if test "${ac_cv_header_gpm_h+set}" = set; then
14746 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14747echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14748if test "${ac_cv_header_gpm_h+set}" = set; then
14749 echo $ECHO_N "(cached) $ECHO_C" >&6
14750fi
14751{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14752echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14753else
14754 # Is the header compilable?
14755{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14756echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14757cat >conftest.$ac_ext <<_ACEOF
14758/* confdefs.h. */
14759_ACEOF
14760cat confdefs.h >>conftest.$ac_ext
14761cat >>conftest.$ac_ext <<_ACEOF
14762/* end confdefs.h. */
14763$ac_includes_default
14764#include <gpm.h>
14765_ACEOF
14766rm -f conftest.$ac_objext
14767if { (ac_try="$ac_compile"
14768case "(($ac_try" in
14769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14770 *) ac_try_echo=$ac_try;;
14771esac
14772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14773 (eval "$ac_compile") 2>conftest.er1
14774 ac_status=$?
14775 grep -v '^ *+' conftest.er1 >conftest.err
14776 rm -f conftest.er1
14777 cat conftest.err >&5
14778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); } && {
14780 test -z "$ac_c_werror_flag" ||
14781 test ! -s conftest.err
14782 } && test -s conftest.$ac_objext; then
14783 ac_header_compiler=yes
14784else
14785 echo "$as_me: failed program was:" >&5
14786sed 's/^/| /' conftest.$ac_ext >&5
14787
14788 ac_header_compiler=no
14789fi
14790
14791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14792{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14793echo "${ECHO_T}$ac_header_compiler" >&6; }
14794
14795# Is the header present?
14796{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14797echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14798cat >conftest.$ac_ext <<_ACEOF
14799/* confdefs.h. */
14800_ACEOF
14801cat confdefs.h >>conftest.$ac_ext
14802cat >>conftest.$ac_ext <<_ACEOF
14803/* end confdefs.h. */
14804#include <gpm.h>
14805_ACEOF
14806if { (ac_try="$ac_cpp conftest.$ac_ext"
14807case "(($ac_try" in
14808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14809 *) ac_try_echo=$ac_try;;
14810esac
14811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14812 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14813 ac_status=$?
14814 grep -v '^ *+' conftest.er1 >conftest.err
14815 rm -f conftest.er1
14816 cat conftest.err >&5
14817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818 (exit $ac_status); } >/dev/null && {
14819 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14820 test ! -s conftest.err
14821 }; then
14822 ac_header_preproc=yes
14823else
14824 echo "$as_me: failed program was:" >&5
14825sed 's/^/| /' conftest.$ac_ext >&5
14826
14827 ac_header_preproc=no
14828fi
14829
14830rm -f conftest.err conftest.$ac_ext
14831{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14832echo "${ECHO_T}$ac_header_preproc" >&6; }
14833
14834# So? What about this header?
14835case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14836 yes:no: )
14837 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14838echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14839 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14840echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14841 ac_header_preproc=yes
14842 ;;
14843 no:yes:* )
14844 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14845echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14846 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14847echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14848 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14849echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14850 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14851echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14852 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14853echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14854 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14855echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14856
14857 ;;
14858esac
14859{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14860echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14861if test "${ac_cv_header_gpm_h+set}" = set; then
14862 echo $ECHO_N "(cached) $ECHO_C" >&6
14863else
14864 ac_cv_header_gpm_h=$ac_header_preproc
14865fi
14866{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14867echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14868
14869fi
14870if test $ac_cv_header_gpm_h = yes; then
14871 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14872echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14873if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14874 echo $ECHO_N "(cached) $ECHO_C" >&6
14875else
14876 ac_check_lib_save_LIBS=$LIBS
14877LIBS="-lgpm $LIBS"
14878cat >conftest.$ac_ext <<_ACEOF
14879/* confdefs.h. */
14880_ACEOF
14881cat confdefs.h >>conftest.$ac_ext
14882cat >>conftest.$ac_ext <<_ACEOF
14883/* end confdefs.h. */
14884
14885/* Override any GCC internal prototype to avoid an error.
14886 Use char because int might match the return type of a GCC
14887 builtin and then its argument prototype would still apply. */
14888#ifdef __cplusplus
14889extern "C"
14890#endif
14891char Gpm_Open ();
14892int
14893main ()
14894{
14895return Gpm_Open ();
14896 ;
14897 return 0;
14898}
14899_ACEOF
14900rm -f conftest.$ac_objext conftest$ac_exeext
14901if { (ac_try="$ac_link"
14902case "(($ac_try" in
14903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14904 *) ac_try_echo=$ac_try;;
14905esac
14906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14907 (eval "$ac_link") 2>conftest.er1
14908 ac_status=$?
14909 grep -v '^ *+' conftest.er1 >conftest.err
14910 rm -f conftest.er1
14911 cat conftest.err >&5
14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14913 (exit $ac_status); } && {
14914 test -z "$ac_c_werror_flag" ||
14915 test ! -s conftest.err
14916 } && test -s conftest$ac_exeext &&
14917 $as_test_x conftest$ac_exeext; then
14918 ac_cv_lib_gpm_Gpm_Open=yes
14919else
14920 echo "$as_me: failed program was:" >&5
14921sed 's/^/| /' conftest.$ac_ext >&5
14922
14923 ac_cv_lib_gpm_Gpm_Open=no
14924fi
14925
14926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14927 conftest$ac_exeext conftest.$ac_ext
14928LIBS=$ac_check_lib_save_LIBS
14929fi
14930{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14931echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14932if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14933 HAVE_GPM=yes
14934fi
14935
14936fi
14937
14938
14939fi
14940
14941if test "${HAVE_GPM}" = "yes"; then
14942
14943cat >>confdefs.h <<\_ACEOF
14944#define HAVE_GPM 1
14945_ACEOF
14946
14947fi
14948
cef11da2 14949if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14950 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14951echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14952if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14953 echo $ECHO_N "(cached) $ECHO_C" >&6
14954fi
ca81d7a0
JD
14955{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14956echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14957else
14958 # Is the header compilable?
ca81d7a0
JD
14959{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14960echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14961cat >conftest.$ac_ext <<_ACEOF
14962/* confdefs.h. */
14963_ACEOF
14964cat confdefs.h >>conftest.$ac_ext
14965cat >>conftest.$ac_ext <<_ACEOF
14966/* end confdefs.h. */
14967$ac_includes_default
14968#include <malloc/malloc.h>
14969_ACEOF
14970rm -f conftest.$ac_objext
ca81d7a0
JD
14971if { (ac_try="$ac_compile"
14972case "(($ac_try" in
14973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14974 *) ac_try_echo=$ac_try;;
14975esac
14976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14977 (eval "$ac_compile") 2>conftest.er1
cef11da2 14978 ac_status=$?
edfaf76d
LK
14979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
cef11da2 14982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14983 (exit $ac_status); } && {
14984 test -z "$ac_c_werror_flag" ||
14985 test ! -s conftest.err
14986 } && test -s conftest.$ac_objext; then
cef11da2
ST
14987 ac_header_compiler=yes
14988else
14989 echo "$as_me: failed program was:" >&5
14990sed 's/^/| /' conftest.$ac_ext >&5
14991
ca81d7a0 14992 ac_header_compiler=no
cef11da2 14993fi
ca81d7a0
JD
14994
14995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14996{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14997echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14998
14999# Is the header present?
ca81d7a0
JD
15000{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
15001echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
15002cat >conftest.$ac_ext <<_ACEOF
15003/* confdefs.h. */
15004_ACEOF
15005cat confdefs.h >>conftest.$ac_ext
15006cat >>conftest.$ac_ext <<_ACEOF
15007/* end confdefs.h. */
15008#include <malloc/malloc.h>
15009_ACEOF
ca81d7a0
JD
15010if { (ac_try="$ac_cpp conftest.$ac_ext"
15011case "(($ac_try" in
15012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15013 *) ac_try_echo=$ac_try;;
15014esac
15015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15016 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
15017 ac_status=$?
15018 grep -v '^ *+' conftest.er1 >conftest.err
15019 rm -f conftest.er1
15020 cat conftest.err >&5
15021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15022 (exit $ac_status); } >/dev/null && {
15023 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15024 test ! -s conftest.err
15025 }; then
cef11da2
ST
15026 ac_header_preproc=yes
15027else
15028 echo "$as_me: failed program was:" >&5
15029sed 's/^/| /' conftest.$ac_ext >&5
15030
15031 ac_header_preproc=no
15032fi
ca81d7a0 15033
cef11da2 15034rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15035{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15036echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
15037
15038# So? What about this header?
edfaf76d
LK
15039case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15040 yes:no: )
cef11da2
ST
15041 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
15042echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15043 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
15044echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
15045 ac_header_preproc=yes
cef11da2 15046 ;;
edfaf76d 15047 no:yes:* )
cef11da2
ST
15048 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
15049echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15050 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
15051echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
15052 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
15053echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
15054 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
15055echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
15056 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
15057echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15058 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
15059echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15060
cef11da2
ST
15061 ;;
15062esac
ca81d7a0
JD
15063{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
15064echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
15065if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
15066 echo $ECHO_N "(cached) $ECHO_C" >&6
15067else
15068 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 15069fi
ca81d7a0
JD
15070{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
15071echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 15072
7c9e5167 15073fi
cef11da2
ST
15074if test $ac_cv_header_malloc_malloc_h = yes; then
15075
15076cat >>confdefs.h <<\_ACEOF
15077#define HAVE_MALLOC_MALLOC_H 1
15078_ACEOF
15079
7c9e5167
JD
15080fi
15081
cef11da2
ST
15082
15083
5d6da11e 15084### Use Mac OS X Carbon API to implement GUI.
e0f712ba 15085if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
15086
15087cat >>confdefs.h <<\_ACEOF
e0f712ba 15088#define HAVE_CARBON 1
7c9e5167
JD
15089_ACEOF
15090
6a3a24fa
JD
15091 ## Specify the install directory
15092 carbon_appdir=
15093 if test "${carbon_appdir_x}" != ""; then
15094 case ${carbon_appdir_x} in
15095 y | ye | yes) carbon_appdir=/Applications ;;
15096 * ) carbon_appdir=${carbon_appdir_x} ;;
15097 esac
7c9e5167 15098 fi
8f417b3b
AS
15099 # We also have mouse menus.
15100 HAVE_MENUS=yes
e0f712ba
AC
15101fi
15102
98418dba
CW
15103### Use session management (-lSM -lICE) if available
15104HAVE_X_SM=no
15105if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15106 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15107 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15108echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15109if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15110 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15111fi
ca81d7a0
JD
15112{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15113echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15114else
c0d27fcc 15115 # Is the header compilable?
ca81d7a0
JD
15116{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15117echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15118cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15119/* confdefs.h. */
15120_ACEOF
15121cat confdefs.h >>conftest.$ac_ext
15122cat >>conftest.$ac_ext <<_ACEOF
15123/* end confdefs.h. */
c0d27fcc
MR
15124$ac_includes_default
15125#include <X11/SM/SMlib.h>
15126_ACEOF
15127rm -f conftest.$ac_objext
ca81d7a0
JD
15128if { (ac_try="$ac_compile"
15129case "(($ac_try" in
15130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15131 *) ac_try_echo=$ac_try;;
15132esac
15133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15134 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15135 ac_status=$?
edfaf76d
LK
15136 grep -v '^ *+' conftest.er1 >conftest.err
15137 rm -f conftest.er1
15138 cat conftest.err >&5
c0d27fcc 15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15140 (exit $ac_status); } && {
15141 test -z "$ac_c_werror_flag" ||
15142 test ! -s conftest.err
15143 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15144 ac_header_compiler=yes
15145else
15146 echo "$as_me: failed program was:" >&5
19650fd6
AS
15147sed 's/^/| /' conftest.$ac_ext >&5
15148
ca81d7a0 15149 ac_header_compiler=no
c0d27fcc 15150fi
ca81d7a0
JD
15151
15152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15153{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15154echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15155
15156# Is the header present?
ca81d7a0
JD
15157{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15158echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15159cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15160/* confdefs.h. */
15161_ACEOF
15162cat confdefs.h >>conftest.$ac_ext
15163cat >>conftest.$ac_ext <<_ACEOF
15164/* end confdefs.h. */
98418dba
CW
15165#include <X11/SM/SMlib.h>
15166_ACEOF
ca81d7a0
JD
15167if { (ac_try="$ac_cpp conftest.$ac_ext"
15168case "(($ac_try" in
15169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15170 *) ac_try_echo=$ac_try;;
15171esac
15172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15173 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15174 ac_status=$?
6bae0ccf 15175 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15176 rm -f conftest.er1
15177 cat conftest.err >&5
c0d27fcc 15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15179 (exit $ac_status); } >/dev/null && {
15180 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15181 test ! -s conftest.err
15182 }; then
c0d27fcc 15183 ac_header_preproc=yes
98418dba
CW
15184else
15185 echo "$as_me: failed program was:" >&5
19650fd6
AS
15186sed 's/^/| /' conftest.$ac_ext >&5
15187
c0d27fcc 15188 ac_header_preproc=no
98418dba 15189fi
ca81d7a0 15190
98418dba 15191rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15192{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15193echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15194
15195# So? What about this header?
edfaf76d
LK
15196case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15197 yes:no: )
c0d27fcc
MR
15198 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15199echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15200 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15201echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15202 ac_header_preproc=yes
19650fd6 15203 ;;
edfaf76d 15204 no:yes:* )
c0d27fcc
MR
15205 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15206echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15207 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15208echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15209 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15210echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15211 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15212echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15213 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15214echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15215 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15216echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15217
19650fd6 15218 ;;
c0d27fcc 15219esac
ca81d7a0
JD
15220{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15221echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15222if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15223 echo $ECHO_N "(cached) $ECHO_C" >&6
15224else
15225 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15226fi
ca81d7a0
JD
15227{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15228echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15229
15230fi
98418dba 15231if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15232 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15233echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15234if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15235 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15236else
503d2be0 15237 ac_check_lib_save_LIBS=$LIBS
1660500f 15238LIBS="-lSM -lICE $LIBS"
503d2be0 15239cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15240/* confdefs.h. */
15241_ACEOF
15242cat confdefs.h >>conftest.$ac_ext
15243cat >>conftest.$ac_ext <<_ACEOF
15244/* end confdefs.h. */
503d2be0 15245
ca81d7a0
JD
15246/* Override any GCC internal prototype to avoid an error.
15247 Use char because int might match the return type of a GCC
15248 builtin and then its argument prototype would still apply. */
503d2be0
AS
15249#ifdef __cplusplus
15250extern "C"
15251#endif
98418dba 15252char SmcOpenConnection ();
503d2be0
AS
15253int
15254main ()
15255{
ca81d7a0 15256return SmcOpenConnection ();
503d2be0
AS
15257 ;
15258 return 0;
15259}
15260_ACEOF
15261rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15262if { (ac_try="$ac_link"
15263case "(($ac_try" in
15264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15265 *) ac_try_echo=$ac_try;;
15266esac
15267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15268 (eval "$ac_link") 2>conftest.er1
503d2be0 15269 ac_status=$?
edfaf76d
LK
15270 grep -v '^ *+' conftest.er1 >conftest.err
15271 rm -f conftest.er1
15272 cat conftest.err >&5
c0d27fcc 15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15274 (exit $ac_status); } && {
15275 test -z "$ac_c_werror_flag" ||
15276 test ! -s conftest.err
15277 } && test -s conftest$ac_exeext &&
15278 $as_test_x conftest$ac_exeext; then
98418dba 15279 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15280else
15281 echo "$as_me: failed program was:" >&5
19650fd6
AS
15282sed 's/^/| /' conftest.$ac_ext >&5
15283
ca81d7a0 15284 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15285fi
ca81d7a0 15286
f053c89f 15287rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15288 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15289LIBS=$ac_check_lib_save_LIBS
15290fi
ca81d7a0
JD
15291{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15292echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15293if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15294 HAVE_X_SM=yes
73b77ee5
GM
15295fi
15296
73b77ee5 15297fi
73b77ee5 15298
c0d27fcc
MR
15299
15300
98418dba 15301 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15302
c0d27fcc 15303cat >>confdefs.h <<\_ACEOF
98418dba 15304#define HAVE_X_SM 1
c0d27fcc 15305_ACEOF
73b77ee5 15306
98418dba
CW
15307 case "$LIBS" in
15308 *-lSM*) ;;
15309 *) LIBS="-lSM -lICE $LIBS" ;;
15310 esac
73b77ee5 15311 fi
98418dba 15312fi
73b77ee5 15313
98418dba 15314# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15315{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15316echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15317if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15318 echo $ECHO_N "(cached) $ECHO_C" >&6
15319else
15320 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15321/* confdefs.h. */
15322_ACEOF
15323cat confdefs.h >>conftest.$ac_ext
15324cat >>conftest.$ac_ext <<_ACEOF
15325/* end confdefs.h. */
98418dba 15326#include <netdb.h>
503d2be0
AS
15327int
15328main ()
15329{
98418dba 15330return h_errno;
503d2be0
AS
15331 ;
15332 return 0;
15333}
15334_ACEOF
15335rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15336if { (ac_try="$ac_link"
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_link") 2>conftest.er1
503d2be0 15343 ac_status=$?
edfaf76d
LK
15344 grep -v '^ *+' conftest.er1 >conftest.err
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); } && {
15349 test -z "$ac_c_werror_flag" ||
15350 test ! -s conftest.err
15351 } && test -s conftest$ac_exeext &&
15352 $as_test_x conftest$ac_exeext; then
98418dba 15353 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15354else
503d2be0 15355 echo "$as_me: failed program was:" >&5
19650fd6
AS
15356sed 's/^/| /' conftest.$ac_ext >&5
15357
ca81d7a0 15358 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15359fi
ca81d7a0 15360
f053c89f 15361rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15362 conftest$ac_exeext conftest.$ac_ext
98418dba 15363fi
ca81d7a0
JD
15364{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15365echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15366if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15367
c0d27fcc 15368cat >>confdefs.h <<\_ACEOF
98418dba 15369#define HAVE_H_ERRNO 1
c0d27fcc 15370_ACEOF
73b77ee5 15371
98418dba
CW
15372fi
15373
15374# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15375# for constant arguments. Useless!
ca81d7a0
JD
15376{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15377echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15378if test "${ac_cv_working_alloca_h+set}" = set; then
15379 echo $ECHO_N "(cached) $ECHO_C" >&6
15380else
15381 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15382/* confdefs.h. */
15383_ACEOF
15384cat confdefs.h >>conftest.$ac_ext
15385cat >>conftest.$ac_ext <<_ACEOF
15386/* end confdefs.h. */
98418dba 15387#include <alloca.h>
503d2be0
AS
15388int
15389main ()
15390{
98418dba 15391char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15392 if (p) return 0;
503d2be0
AS
15393 ;
15394 return 0;
15395}
15396_ACEOF
15397rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15398if { (ac_try="$ac_link"
15399case "(($ac_try" in
15400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15401 *) ac_try_echo=$ac_try;;
15402esac
15403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15404 (eval "$ac_link") 2>conftest.er1
503d2be0 15405 ac_status=$?
edfaf76d
LK
15406 grep -v '^ *+' conftest.er1 >conftest.err
15407 rm -f conftest.er1
15408 cat conftest.err >&5
c0d27fcc 15409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15410 (exit $ac_status); } && {
15411 test -z "$ac_c_werror_flag" ||
15412 test ! -s conftest.err
15413 } && test -s conftest$ac_exeext &&
15414 $as_test_x conftest$ac_exeext; then
98418dba 15415 ac_cv_working_alloca_h=yes
73b77ee5 15416else
503d2be0 15417 echo "$as_me: failed program was:" >&5
19650fd6
AS
15418sed 's/^/| /' conftest.$ac_ext >&5
15419
ca81d7a0 15420 ac_cv_working_alloca_h=no
73b77ee5 15421fi
ca81d7a0 15422
f053c89f 15423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15424 conftest$ac_exeext conftest.$ac_ext
98418dba 15425fi
ca81d7a0
JD
15426{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15427echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15428if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15429
c0d27fcc 15430cat >>confdefs.h <<\_ACEOF
98418dba 15431#define HAVE_ALLOCA_H 1
c0d27fcc 15432_ACEOF
98418dba
CW
15433
15434fi
15435
ca81d7a0
JD
15436{ echo "$as_me:$LINENO: checking for alloca" >&5
15437echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15438if test "${ac_cv_func_alloca_works+set}" = set; then
15439 echo $ECHO_N "(cached) $ECHO_C" >&6
15440else
503d2be0 15441 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15442/* confdefs.h. */
15443_ACEOF
15444cat confdefs.h >>conftest.$ac_ext
15445cat >>conftest.$ac_ext <<_ACEOF
15446/* end confdefs.h. */
98418dba
CW
15447#ifdef __GNUC__
15448# define alloca __builtin_alloca
15449#else
15450# ifdef _MSC_VER
15451# include <malloc.h>
15452# define alloca _alloca
15453# else
f053c89f 15454# ifdef HAVE_ALLOCA_H
98418dba
CW
15455# include <alloca.h>
15456# else
15457# ifdef _AIX
15458 #pragma alloca
15459# else
15460# ifndef alloca /* predefined by HP cc +Olibcalls */
15461char *alloca ();
15462# endif
15463# endif
15464# endif
15465# endif
15466#endif
15467
503d2be0
AS
15468int
15469main ()
15470{
98418dba 15471char *p = (char *) alloca (1);
ca81d7a0 15472 if (p) return 0;
503d2be0
AS
15473 ;
15474 return 0;
15475}
15476_ACEOF
15477rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15478if { (ac_try="$ac_link"
15479case "(($ac_try" in
15480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15481 *) ac_try_echo=$ac_try;;
15482esac
15483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15484 (eval "$ac_link") 2>conftest.er1
503d2be0 15485 ac_status=$?
edfaf76d
LK
15486 grep -v '^ *+' conftest.er1 >conftest.err
15487 rm -f conftest.er1
15488 cat conftest.err >&5
c0d27fcc 15489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15490 (exit $ac_status); } && {
15491 test -z "$ac_c_werror_flag" ||
15492 test ! -s conftest.err
15493 } && test -s conftest$ac_exeext &&
15494 $as_test_x conftest$ac_exeext; then
98418dba 15495 ac_cv_func_alloca_works=yes
ac95a621 15496else
503d2be0 15497 echo "$as_me: failed program was:" >&5
19650fd6
AS
15498sed 's/^/| /' conftest.$ac_ext >&5
15499
ca81d7a0 15500 ac_cv_func_alloca_works=no
ac95a621 15501fi
ca81d7a0 15502
f053c89f 15503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15504 conftest$ac_exeext conftest.$ac_ext
98418dba 15505fi
ca81d7a0
JD
15506{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15507echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15508
98418dba
CW
15509if test $ac_cv_func_alloca_works = yes; then
15510
c0d27fcc 15511cat >>confdefs.h <<\_ACEOF
98418dba 15512#define HAVE_ALLOCA 1
c0d27fcc 15513_ACEOF
98418dba
CW
15514
15515else
15516 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15517# that cause trouble. Some versions do not even contain alloca or
15518# contain a buggy version. If you still want to use their alloca,
15519# use ar to extract alloca.o from them instead of compiling alloca.c.
15520
ca81d7a0 15521ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15522
c0d27fcc 15523cat >>confdefs.h <<\_ACEOF
98418dba 15524#define C_ALLOCA 1
c0d27fcc 15525_ACEOF
98418dba 15526
c0d27fcc 15527
ca81d7a0
JD
15528{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15529echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15530if test "${ac_cv_os_cray+set}" = set; then
15531 echo $ECHO_N "(cached) $ECHO_C" >&6
15532else
15533 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15534/* confdefs.h. */
15535_ACEOF
15536cat confdefs.h >>conftest.$ac_ext
15537cat >>conftest.$ac_ext <<_ACEOF
15538/* end confdefs.h. */
ca81d7a0 15539#if defined CRAY && ! defined CRAY2
98418dba
CW
15540webecray
15541#else
15542wenotbecray
15543#endif
15544
15545_ACEOF
15546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15547 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15548 ac_cv_os_cray=yes
15549else
15550 ac_cv_os_cray=no
15551fi
15552rm -f conftest*
ac95a621 15553
98418dba 15554fi
ca81d7a0
JD
15555{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15556echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15557if test $ac_cv_os_cray = yes; then
15558 for ac_func in _getb67 GETB67 getb67; do
15559 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15560{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15561echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15562if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15563 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15564else
503d2be0 15565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15566/* confdefs.h. */
15567_ACEOF
15568cat confdefs.h >>conftest.$ac_ext
15569cat >>conftest.$ac_ext <<_ACEOF
15570/* end confdefs.h. */
edfaf76d
LK
15571/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15572 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15573#define $ac_func innocuous_$ac_func
15574
73b77ee5 15575/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15576 which can conflict with char $ac_func (); below.
15577 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15578 <limits.h> exists even on freestanding compilers. */
edfaf76d 15579
19650fd6
AS
15580#ifdef __STDC__
15581# include <limits.h>
15582#else
15583# include <assert.h>
15584#endif
edfaf76d
LK
15585
15586#undef $ac_func
15587
ca81d7a0
JD
15588/* Override any GCC internal prototype to avoid an error.
15589 Use char because int might match the return type of a GCC
15590 builtin and then its argument prototype would still apply. */
503d2be0
AS
15591#ifdef __cplusplus
15592extern "C"
15593#endif
503d2be0 15594char $ac_func ();
73b77ee5
GM
15595/* The GNU C library defines this for functions which it implements
15596 to always fail with ENOSYS. Some functions are actually named
15597 something starting with __ and the normal name is an alias. */
ca81d7a0 15598#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15599choke me
73b77ee5
GM
15600#endif
15601
19650fd6
AS
15602int
15603main ()
15604{
ca81d7a0 15605return $ac_func ();
503d2be0
AS
15606 ;
15607 return 0;
15608}
15609_ACEOF
15610rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15611if { (ac_try="$ac_link"
15612case "(($ac_try" in
15613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15614 *) ac_try_echo=$ac_try;;
15615esac
15616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15617 (eval "$ac_link") 2>conftest.er1
503d2be0 15618 ac_status=$?
edfaf76d
LK
15619 grep -v '^ *+' conftest.er1 >conftest.err
15620 rm -f conftest.er1
15621 cat conftest.err >&5
c0d27fcc 15622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15623 (exit $ac_status); } && {
15624 test -z "$ac_c_werror_flag" ||
15625 test ! -s conftest.err
15626 } && test -s conftest$ac_exeext &&
15627 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15628 eval "$as_ac_var=yes"
15629else
15630 echo "$as_me: failed program was:" >&5
19650fd6
AS
15631sed 's/^/| /' conftest.$ac_ext >&5
15632
ca81d7a0 15633 eval "$as_ac_var=no"
503d2be0 15634fi
ca81d7a0 15635
f053c89f 15636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15637 conftest$ac_exeext conftest.$ac_ext
503d2be0 15638fi
ca81d7a0
JD
15639ac_res=`eval echo '${'$as_ac_var'}'`
15640 { echo "$as_me:$LINENO: result: $ac_res" >&5
15641echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15642if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15643
c0d27fcc 15644cat >>confdefs.h <<_ACEOF
98418dba 15645#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15646_ACEOF
98418dba
CW
15647
15648 break
73b77ee5 15649fi
73b77ee5 15650
98418dba 15651 done
73b77ee5
GM
15652fi
15653
ca81d7a0
JD
15654{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15655echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15656if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15657 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15658else
15659 if test "$cross_compiling" = yes; then
15660 ac_cv_c_stack_direction=0
73b77ee5 15661else
503d2be0 15662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15663/* confdefs.h. */
15664_ACEOF
15665cat confdefs.h >>conftest.$ac_ext
15666cat >>conftest.$ac_ext <<_ACEOF
15667/* end confdefs.h. */
ca81d7a0 15668$ac_includes_default
503d2be0 15669int
98418dba 15670find_stack_direction ()
503d2be0 15671{
98418dba
CW
15672 static char *addr = 0;
15673 auto char dummy;
15674 if (addr == 0)
15675 {
15676 addr = &dummy;
15677 return find_stack_direction ();
15678 }
73b77ee5 15679 else
98418dba
CW
15680 return (&dummy > addr) ? 1 : -1;
15681}
ba4481b5 15682
503d2be0
AS
15683int
15684main ()
15685{
ca81d7a0 15686 return find_stack_direction () < 0;
503d2be0
AS
15687}
15688_ACEOF
98418dba 15689rm -f conftest$ac_exeext
ca81d7a0
JD
15690if { (ac_try="$ac_link"
15691case "(($ac_try" in
15692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15693 *) ac_try_echo=$ac_try;;
15694esac
15695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15696 (eval "$ac_link") 2>&5
503d2be0 15697 ac_status=$?
c0d27fcc 15698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15699 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15700 { (case "(($ac_try" in
15701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15702 *) ac_try_echo=$ac_try;;
15703esac
15704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15705 (eval "$ac_try") 2>&5
503d2be0 15706 ac_status=$?
c0d27fcc 15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15708 (exit $ac_status); }; }; then
98418dba 15709 ac_cv_c_stack_direction=1
ba4481b5 15710else
98418dba
CW
15711 echo "$as_me: program exited with status $ac_status" >&5
15712echo "$as_me: failed program was:" >&5
19650fd6
AS
15713sed 's/^/| /' conftest.$ac_ext >&5
15714
c0d27fcc 15715( exit $ac_status )
98418dba 15716ac_cv_c_stack_direction=-1
ba4481b5 15717fi
ca81d7a0 15718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15719fi
ca81d7a0
JD
15720
15721
98418dba 15722fi
ca81d7a0
JD
15723{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15724echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15725
c0d27fcc 15726cat >>confdefs.h <<_ACEOF
98418dba 15727#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15728_ACEOF
15729
ba4481b5 15730
ba4481b5
DL
15731fi
15732
c0d27fcc 15733
611adb3e
GM
15734if test x"$ac_cv_func_alloca_works" != xyes; then
15735 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15736echo "$as_me: error: a system implementation of alloca is required " >&2;}
15737 { (exit 1); exit 1; }; }
15738fi
15739
98418dba
CW
15740# fmod, logb, and frexp are found in -lm on most systems.
15741# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15742
ca81d7a0
JD
15743{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15744echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15745if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15746 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15747else
98418dba
CW
15748 ac_check_lib_save_LIBS=$LIBS
15749LIBS="-lm $LIBS"
15750cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15751/* confdefs.h. */
15752_ACEOF
15753cat confdefs.h >>conftest.$ac_ext
15754cat >>conftest.$ac_ext <<_ACEOF
15755/* end confdefs.h. */
ba4481b5 15756
ca81d7a0
JD
15757/* Override any GCC internal prototype to avoid an error.
15758 Use char because int might match the return type of a GCC
15759 builtin and then its argument prototype would still apply. */
98418dba
CW
15760#ifdef __cplusplus
15761extern "C"
15762#endif
98418dba 15763char sqrt ();
503d2be0
AS
15764int
15765main ()
15766{
ca81d7a0 15767return sqrt ();
503d2be0
AS
15768 ;
15769 return 0;
15770}
15771_ACEOF
15772rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15773if { (ac_try="$ac_link"
15774case "(($ac_try" in
15775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15776 *) ac_try_echo=$ac_try;;
15777esac
15778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15779 (eval "$ac_link") 2>conftest.er1
503d2be0 15780 ac_status=$?
edfaf76d
LK
15781 grep -v '^ *+' conftest.er1 >conftest.err
15782 rm -f conftest.er1
15783 cat conftest.err >&5
c0d27fcc 15784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15785 (exit $ac_status); } && {
15786 test -z "$ac_c_werror_flag" ||
15787 test ! -s conftest.err
15788 } && test -s conftest$ac_exeext &&
15789 $as_test_x conftest$ac_exeext; then
98418dba 15790 ac_cv_lib_m_sqrt=yes
ba4481b5 15791else
503d2be0 15792 echo "$as_me: failed program was:" >&5
19650fd6
AS
15793sed 's/^/| /' conftest.$ac_ext >&5
15794
ca81d7a0 15795 ac_cv_lib_m_sqrt=no
ba4481b5 15796fi
ca81d7a0 15797
f053c89f 15798rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15799 conftest$ac_exeext conftest.$ac_ext
98418dba 15800LIBS=$ac_check_lib_save_LIBS
ba4481b5 15801fi
ca81d7a0
JD
15802{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15803echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15804if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15805 cat >>confdefs.h <<_ACEOF
98418dba 15806#define HAVE_LIBM 1
c0d27fcc 15807_ACEOF
98418dba
CW
15808
15809 LIBS="-lm $LIBS"
ba4481b5 15810
ba4481b5
DL
15811fi
15812
c0d27fcc 15813
55597d70
DL
15814# Check for mail-locking functions in a "mail" library. Probably this should
15815# have the same check as for liblockfile below.
98418dba 15816
ca81d7a0
JD
15817{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15818echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15819if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15820 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15821else
98418dba
CW
15822 ac_check_lib_save_LIBS=$LIBS
15823LIBS="-lmail $LIBS"
15824cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
98418dba 15830
ca81d7a0
JD
15831/* Override any GCC internal prototype to avoid an error.
15832 Use char because int might match the return type of a GCC
15833 builtin and then its argument prototype would still apply. */
98418dba
CW
15834#ifdef __cplusplus
15835extern "C"
15836#endif
98418dba 15837char maillock ();
503d2be0
AS
15838int
15839main ()
15840{
ca81d7a0 15841return maillock ();
503d2be0
AS
15842 ;
15843 return 0;
15844}
15845_ACEOF
15846rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15847if { (ac_try="$ac_link"
15848case "(($ac_try" in
15849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15850 *) ac_try_echo=$ac_try;;
15851esac
15852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15853 (eval "$ac_link") 2>conftest.er1
503d2be0 15854 ac_status=$?
edfaf76d
LK
15855 grep -v '^ *+' conftest.er1 >conftest.err
15856 rm -f conftest.er1
15857 cat conftest.err >&5
c0d27fcc 15858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15859 (exit $ac_status); } && {
15860 test -z "$ac_c_werror_flag" ||
15861 test ! -s conftest.err
15862 } && test -s conftest$ac_exeext &&
15863 $as_test_x conftest$ac_exeext; then
98418dba 15864 ac_cv_lib_mail_maillock=yes
ba4481b5 15865else
503d2be0 15866 echo "$as_me: failed program was:" >&5
19650fd6
AS
15867sed 's/^/| /' conftest.$ac_ext >&5
15868
ca81d7a0 15869 ac_cv_lib_mail_maillock=no
ba4481b5 15870fi
ca81d7a0 15871
f053c89f 15872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15873 conftest$ac_exeext conftest.$ac_ext
98418dba 15874LIBS=$ac_check_lib_save_LIBS
ba4481b5 15875fi
ca81d7a0
JD
15876{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15877echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15878if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15879 cat >>confdefs.h <<_ACEOF
98418dba 15880#define HAVE_LIBMAIL 1
c0d27fcc 15881_ACEOF
ba4481b5 15882
98418dba 15883 LIBS="-lmail $LIBS"
ba4481b5 15884
98418dba 15885fi
ba4481b5 15886
c0d27fcc 15887
ca81d7a0
JD
15888{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15889echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15890if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15891 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15892else
503d2be0 15893 ac_check_lib_save_LIBS=$LIBS
98418dba 15894LIBS="-llockfile $LIBS"
503d2be0 15895cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15896/* confdefs.h. */
15897_ACEOF
15898cat confdefs.h >>conftest.$ac_ext
15899cat >>conftest.$ac_ext <<_ACEOF
15900/* end confdefs.h. */
503d2be0 15901
ca81d7a0
JD
15902/* Override any GCC internal prototype to avoid an error.
15903 Use char because int might match the return type of a GCC
15904 builtin and then its argument prototype would still apply. */
503d2be0
AS
15905#ifdef __cplusplus
15906extern "C"
15907#endif
98418dba 15908char maillock ();
503d2be0
AS
15909int
15910main ()
15911{
ca81d7a0 15912return maillock ();
503d2be0
AS
15913 ;
15914 return 0;
15915}
15916_ACEOF
15917rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15918if { (ac_try="$ac_link"
15919case "(($ac_try" in
15920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15921 *) ac_try_echo=$ac_try;;
15922esac
15923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15924 (eval "$ac_link") 2>conftest.er1
503d2be0 15925 ac_status=$?
edfaf76d
LK
15926 grep -v '^ *+' conftest.er1 >conftest.err
15927 rm -f conftest.er1
15928 cat conftest.err >&5
c0d27fcc 15929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15930 (exit $ac_status); } && {
15931 test -z "$ac_c_werror_flag" ||
15932 test ! -s conftest.err
15933 } && test -s conftest$ac_exeext &&
15934 $as_test_x conftest$ac_exeext; then
98418dba 15935 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15936else
15937 echo "$as_me: failed program was:" >&5
19650fd6
AS
15938sed 's/^/| /' conftest.$ac_ext >&5
15939
ca81d7a0 15940 ac_cv_lib_lockfile_maillock=no
98418dba 15941fi
ca81d7a0 15942
f053c89f 15943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15944 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15945LIBS=$ac_check_lib_save_LIBS
15946fi
ca81d7a0
JD
15947{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15948echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15949if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15950 cat >>confdefs.h <<_ACEOF
98418dba 15951#define HAVE_LIBLOCKFILE 1
c0d27fcc 15952_ACEOF
98418dba
CW
15953
15954 LIBS="-llockfile $LIBS"
15955
15956fi
15957
15958# If we have the shared liblockfile, assume we must use it for mail
15959# locking (e.g. Debian). If we couldn't link against liblockfile
15960# (no liblockfile.a installed), ensure that we don't need to.
15961if test "$ac_cv_lib_lockfile_maillock" = no; then
15962 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15963set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15964{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15965echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15966if test "${ac_cv_prog_liblockfile+set}" = set; then
15967 echo $ECHO_N "(cached) $ECHO_C" >&6
15968else
15969 if test -n "$liblockfile"; then
15970 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15971else
c0d27fcc 15972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15973as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15974for as_dir in $as_dummy
c0d27fcc
MR
15975do
15976 IFS=$as_save_IFS
15977 test -z "$as_dir" && as_dir=.
15978 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15979 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15980 ac_cv_prog_liblockfile="yes"
15981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15982 break 2
15983 fi
15984done
98418dba 15985done
ca81d7a0 15986IFS=$as_save_IFS
98418dba
CW
15987
15988 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15989fi
503d2be0 15990fi
98418dba
CW
15991liblockfile=$ac_cv_prog_liblockfile
15992if test -n "$liblockfile"; then
ca81d7a0
JD
15993 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15994echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15995else
ca81d7a0
JD
15996 { echo "$as_me:$LINENO: result: no" >&5
15997echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15998fi
15999
ca81d7a0 16000
98418dba 16001 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 16002 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
16003This probably means that movemail could lose mail.
16004There may be a \`development' package to install containing liblockfile." >&5
16005echo "$as_me: error: Shared liblockfile found but can't link against it.
16006This probably means that movemail could lose mail.
16007There may be a \`development' package to install containing liblockfile." >&2;}
16008 { (exit 1); exit 1; }; }
98418dba 16009 else :
55597d70 16010 fi
98418dba 16011fi
503d2be0 16012
98418dba
CW
16013for ac_func in touchlock
16014do
16015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16016{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16018if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16019 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 16020else
98418dba 16021 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16022/* confdefs.h. */
16023_ACEOF
16024cat confdefs.h >>conftest.$ac_ext
16025cat >>conftest.$ac_ext <<_ACEOF
16026/* end confdefs.h. */
edfaf76d
LK
16027/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16028 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16029#define $ac_func innocuous_$ac_func
16030
98418dba 16031/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16032 which can conflict with char $ac_func (); below.
16033 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16034 <limits.h> exists even on freestanding compilers. */
edfaf76d 16035
19650fd6
AS
16036#ifdef __STDC__
16037# include <limits.h>
16038#else
16039# include <assert.h>
16040#endif
edfaf76d
LK
16041
16042#undef $ac_func
16043
ca81d7a0
JD
16044/* Override any GCC internal prototype to avoid an error.
16045 Use char because int might match the return type of a GCC
16046 builtin and then its argument prototype would still apply. */
503d2be0
AS
16047#ifdef __cplusplus
16048extern "C"
16049#endif
98418dba 16050char $ac_func ();
98418dba
CW
16051/* The GNU C library defines this for functions which it implements
16052 to always fail with ENOSYS. Some functions are actually named
16053 something starting with __ and the normal name is an alias. */
ca81d7a0 16054#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16055choke me
cd958eb3
MB
16056#endif
16057
19650fd6
AS
16058int
16059main ()
16060{
ca81d7a0 16061return $ac_func ();
503d2be0
AS
16062 ;
16063 return 0;
16064}
16065_ACEOF
16066rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16067if { (ac_try="$ac_link"
16068case "(($ac_try" in
16069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16070 *) ac_try_echo=$ac_try;;
16071esac
16072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16073 (eval "$ac_link") 2>conftest.er1
503d2be0 16074 ac_status=$?
edfaf76d
LK
16075 grep -v '^ *+' conftest.er1 >conftest.err
16076 rm -f conftest.er1
16077 cat conftest.err >&5
c0d27fcc 16078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16079 (exit $ac_status); } && {
16080 test -z "$ac_c_werror_flag" ||
16081 test ! -s conftest.err
16082 } && test -s conftest$ac_exeext &&
16083 $as_test_x conftest$ac_exeext; then
98418dba 16084 eval "$as_ac_var=yes"
503d2be0
AS
16085else
16086 echo "$as_me: failed program was:" >&5
19650fd6
AS
16087sed 's/^/| /' conftest.$ac_ext >&5
16088
ca81d7a0 16089 eval "$as_ac_var=no"
503d2be0 16090fi
ca81d7a0 16091
f053c89f 16092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16093 conftest$ac_exeext conftest.$ac_ext
503d2be0 16094fi
ca81d7a0
JD
16095ac_res=`eval echo '${'$as_ac_var'}'`
16096 { echo "$as_me:$LINENO: result: $ac_res" >&5
16097echo "${ECHO_T}$ac_res" >&6; }
98418dba 16098if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16099 cat >>confdefs.h <<_ACEOF
98418dba 16100#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16101_ACEOF
457b792c 16102
457b792c 16103fi
98418dba 16104done
457b792c 16105
c0d27fcc 16106
98418dba
CW
16107for ac_header in maillock.h
16108do
16109as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16110if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16111 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16113if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16114 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16115fi
ca81d7a0
JD
16116ac_res=`eval echo '${'$as_ac_Header'}'`
16117 { echo "$as_me:$LINENO: result: $ac_res" >&5
16118echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16119else
c0d27fcc 16120 # Is the header compilable?
ca81d7a0
JD
16121{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16122echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16124/* confdefs.h. */
16125_ACEOF
16126cat confdefs.h >>conftest.$ac_ext
16127cat >>conftest.$ac_ext <<_ACEOF
16128/* end confdefs.h. */
c0d27fcc
MR
16129$ac_includes_default
16130#include <$ac_header>
16131_ACEOF
16132rm -f conftest.$ac_objext
ca81d7a0
JD
16133if { (ac_try="$ac_compile"
16134case "(($ac_try" in
16135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16136 *) ac_try_echo=$ac_try;;
16137esac
16138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16139 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16140 ac_status=$?
edfaf76d
LK
16141 grep -v '^ *+' conftest.er1 >conftest.err
16142 rm -f conftest.er1
16143 cat conftest.err >&5
c0d27fcc 16144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16145 (exit $ac_status); } && {
16146 test -z "$ac_c_werror_flag" ||
16147 test ! -s conftest.err
16148 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16149 ac_header_compiler=yes
16150else
16151 echo "$as_me: failed program was:" >&5
19650fd6
AS
16152sed 's/^/| /' conftest.$ac_ext >&5
16153
ca81d7a0 16154 ac_header_compiler=no
c0d27fcc 16155fi
ca81d7a0
JD
16156
16157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16159echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16160
16161# Is the header present?
ca81d7a0
JD
16162{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16163echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16165/* confdefs.h. */
16166_ACEOF
16167cat confdefs.h >>conftest.$ac_ext
16168cat >>conftest.$ac_ext <<_ACEOF
16169/* end confdefs.h. */
98418dba 16170#include <$ac_header>
503d2be0 16171_ACEOF
ca81d7a0
JD
16172if { (ac_try="$ac_cpp conftest.$ac_ext"
16173case "(($ac_try" in
16174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16175 *) ac_try_echo=$ac_try;;
16176esac
16177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16178 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16179 ac_status=$?
6bae0ccf 16180 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16181 rm -f conftest.er1
16182 cat conftest.err >&5
c0d27fcc 16183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16184 (exit $ac_status); } >/dev/null && {
16185 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16186 test ! -s conftest.err
16187 }; then
c0d27fcc 16188 ac_header_preproc=yes
98418dba
CW
16189else
16190 echo "$as_me: failed program was:" >&5
19650fd6
AS
16191sed 's/^/| /' conftest.$ac_ext >&5
16192
c0d27fcc 16193 ac_header_preproc=no
503d2be0 16194fi
ca81d7a0 16195
98418dba 16196rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16197{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16198echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16199
16200# So? What about this header?
edfaf76d
LK
16201case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16202 yes:no: )
c0d27fcc
MR
16203 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16204echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16205 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16206echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16207 ac_header_preproc=yes
19650fd6 16208 ;;
edfaf76d 16209 no:yes:* )
c0d27fcc
MR
16210 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16211echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16212 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16213echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16214 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16215echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16216 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16217echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16218 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16219echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16220 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16221echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16222
19650fd6 16223 ;;
c0d27fcc 16224esac
ca81d7a0
JD
16225{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16226echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16227if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
16229else
edfaf76d 16230 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16231fi
ca81d7a0
JD
16232ac_res=`eval echo '${'$as_ac_Header'}'`
16233 { echo "$as_me:$LINENO: result: $ac_res" >&5
16234echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16235
16236fi
98418dba 16237if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16238 cat >>confdefs.h <<_ACEOF
98418dba 16239#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16240_ACEOF
48d4b120 16241
ba4481b5 16242fi
c0d27fcc 16243
98418dba
CW
16244done
16245
c0d27fcc
MR
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
22044edf
DL
16301
16302
c0d27fcc 16303
b0e44248
RB
16304
16305
973a76b1
DL
16306
16307
16308
cd958eb3 16309
25ca0bca 16310
ea92fc9f 16311
e2fcf543 16312
c0d27fcc
MR
16313
16314
98418dba 16315for ac_func in gethostname getdomainname dup2 \
e2fcf543 16316rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16317random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16318strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16319utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16320__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16321sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16322gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 16323memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
16324do
16325as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16326{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16327echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16328if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16329 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16330else
503d2be0 16331 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
edfaf76d
LK
16337/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16338 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16339#define $ac_func innocuous_$ac_func
16340
98418dba 16341/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16342 which can conflict with char $ac_func (); below.
16343 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16344 <limits.h> exists even on freestanding compilers. */
edfaf76d 16345
19650fd6
AS
16346#ifdef __STDC__
16347# include <limits.h>
16348#else
16349# include <assert.h>
16350#endif
edfaf76d
LK
16351
16352#undef $ac_func
16353
ca81d7a0
JD
16354/* Override any GCC internal prototype to avoid an error.
16355 Use char because int might match the return type of a GCC
16356 builtin and then its argument prototype would still apply. */
503d2be0
AS
16357#ifdef __cplusplus
16358extern "C"
16359#endif
98418dba 16360char $ac_func ();
98418dba
CW
16361/* The GNU C library defines this for functions which it implements
16362 to always fail with ENOSYS. Some functions are actually named
16363 something starting with __ and the normal name is an alias. */
ca81d7a0 16364#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16365choke me
98418dba
CW
16366#endif
16367
19650fd6
AS
16368int
16369main ()
16370{
ca81d7a0 16371return $ac_func ();
503d2be0
AS
16372 ;
16373 return 0;
16374}
16375_ACEOF
16376rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16377if { (ac_try="$ac_link"
16378case "(($ac_try" in
16379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16380 *) ac_try_echo=$ac_try;;
16381esac
16382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16383 (eval "$ac_link") 2>conftest.er1
503d2be0 16384 ac_status=$?
edfaf76d
LK
16385 grep -v '^ *+' conftest.er1 >conftest.err
16386 rm -f conftest.er1
16387 cat conftest.err >&5
c0d27fcc 16388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16389 (exit $ac_status); } && {
16390 test -z "$ac_c_werror_flag" ||
16391 test ! -s conftest.err
16392 } && test -s conftest$ac_exeext &&
16393 $as_test_x conftest$ac_exeext; then
98418dba 16394 eval "$as_ac_var=yes"
503d2be0
AS
16395else
16396 echo "$as_me: failed program was:" >&5
19650fd6
AS
16397sed 's/^/| /' conftest.$ac_ext >&5
16398
ca81d7a0 16399 eval "$as_ac_var=no"
503d2be0 16400fi
ca81d7a0 16401
f053c89f 16402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16403 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16404fi
ca81d7a0
JD
16405ac_res=`eval echo '${'$as_ac_var'}'`
16406 { echo "$as_me:$LINENO: result: $ac_res" >&5
16407echo "${ECHO_T}$ac_res" >&6; }
98418dba 16408if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16409 cat >>confdefs.h <<_ACEOF
98418dba 16410#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16411_ACEOF
ba4481b5 16412
ba4481b5 16413fi
98418dba 16414done
ba4481b5 16415
c0d27fcc
MR
16416
16417
98418dba
CW
16418for ac_header in sys/un.h
16419do
16420as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16421if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16422 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16423echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16424if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16425 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16426fi
ca81d7a0
JD
16427ac_res=`eval echo '${'$as_ac_Header'}'`
16428 { echo "$as_me:$LINENO: result: $ac_res" >&5
16429echo "${ECHO_T}$ac_res" >&6; }
98418dba 16430else
c0d27fcc 16431 # Is the header compilable?
ca81d7a0
JD
16432{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16433echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16434cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16435/* confdefs.h. */
16436_ACEOF
16437cat confdefs.h >>conftest.$ac_ext
16438cat >>conftest.$ac_ext <<_ACEOF
16439/* end confdefs.h. */
c0d27fcc
MR
16440$ac_includes_default
16441#include <$ac_header>
16442_ACEOF
16443rm -f conftest.$ac_objext
ca81d7a0
JD
16444if { (ac_try="$ac_compile"
16445case "(($ac_try" in
16446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16447 *) ac_try_echo=$ac_try;;
16448esac
16449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16450 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16451 ac_status=$?
edfaf76d
LK
16452 grep -v '^ *+' conftest.er1 >conftest.err
16453 rm -f conftest.er1
16454 cat conftest.err >&5
c0d27fcc 16455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16456 (exit $ac_status); } && {
16457 test -z "$ac_c_werror_flag" ||
16458 test ! -s conftest.err
16459 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16460 ac_header_compiler=yes
16461else
16462 echo "$as_me: failed program was:" >&5
19650fd6
AS
16463sed 's/^/| /' conftest.$ac_ext >&5
16464
ca81d7a0 16465 ac_header_compiler=no
c0d27fcc 16466fi
ca81d7a0
JD
16467
16468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16469{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16470echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16471
16472# Is the header present?
ca81d7a0
JD
16473{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16474echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16475cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16476/* confdefs.h. */
16477_ACEOF
16478cat confdefs.h >>conftest.$ac_ext
16479cat >>conftest.$ac_ext <<_ACEOF
16480/* end confdefs.h. */
98418dba 16481#include <$ac_header>
503d2be0 16482_ACEOF
ca81d7a0
JD
16483if { (ac_try="$ac_cpp conftest.$ac_ext"
16484case "(($ac_try" in
16485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16486 *) ac_try_echo=$ac_try;;
16487esac
16488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16489 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16490 ac_status=$?
6bae0ccf 16491 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16492 rm -f conftest.er1
16493 cat conftest.err >&5
c0d27fcc 16494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16495 (exit $ac_status); } >/dev/null && {
16496 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16497 test ! -s conftest.err
16498 }; then
c0d27fcc 16499 ac_header_preproc=yes
ba4481b5 16500else
503d2be0 16501 echo "$as_me: failed program was:" >&5
19650fd6
AS
16502sed 's/^/| /' conftest.$ac_ext >&5
16503
c0d27fcc 16504 ac_header_preproc=no
ba4481b5 16505fi
ca81d7a0 16506
503d2be0 16507rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16508{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16509echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16510
16511# So? What about this header?
edfaf76d
LK
16512case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16513 yes:no: )
c0d27fcc
MR
16514 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16515echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16516 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16517echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16518 ac_header_preproc=yes
19650fd6 16519 ;;
edfaf76d 16520 no:yes:* )
c0d27fcc
MR
16521 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16522echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16523 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16524echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16525 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16526echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16527 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16528echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16529 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16530echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16531 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16532echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16533
19650fd6 16534 ;;
c0d27fcc 16535esac
ca81d7a0
JD
16536{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16538if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16539 echo $ECHO_N "(cached) $ECHO_C" >&6
16540else
edfaf76d 16541 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16542fi
ca81d7a0
JD
16543ac_res=`eval echo '${'$as_ac_Header'}'`
16544 { echo "$as_me:$LINENO: result: $ac_res" >&5
16545echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16546
16547fi
925c2f3f 16548if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16549 cat >>confdefs.h <<_ACEOF
925c2f3f 16550#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16551_ACEOF
503d2be0 16552
925c2f3f 16553fi
c0d27fcc 16554
925c2f3f
EZ
16555done
16556
c0d27fcc
MR
16557
16558
16559
edfaf76d 16560
f053c89f
CY
16561
16562for ac_header in $ac_header_list
925c2f3f
EZ
16563do
16564as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16565if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16566 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16567echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16568if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16569 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16570fi
ca81d7a0
JD
16571ac_res=`eval echo '${'$as_ac_Header'}'`
16572 { echo "$as_me:$LINENO: result: $ac_res" >&5
16573echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16574else
c0d27fcc 16575 # Is the header compilable?
ca81d7a0
JD
16576{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16577echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16578cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16579/* confdefs.h. */
16580_ACEOF
16581cat confdefs.h >>conftest.$ac_ext
16582cat >>conftest.$ac_ext <<_ACEOF
16583/* end confdefs.h. */
c0d27fcc
MR
16584$ac_includes_default
16585#include <$ac_header>
16586_ACEOF
16587rm -f conftest.$ac_objext
ca81d7a0
JD
16588if { (ac_try="$ac_compile"
16589case "(($ac_try" in
16590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16591 *) ac_try_echo=$ac_try;;
16592esac
16593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16594 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16595 ac_status=$?
edfaf76d
LK
16596 grep -v '^ *+' conftest.er1 >conftest.err
16597 rm -f conftest.er1
16598 cat conftest.err >&5
c0d27fcc 16599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16600 (exit $ac_status); } && {
16601 test -z "$ac_c_werror_flag" ||
16602 test ! -s conftest.err
16603 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16604 ac_header_compiler=yes
16605else
16606 echo "$as_me: failed program was:" >&5
19650fd6
AS
16607sed 's/^/| /' conftest.$ac_ext >&5
16608
ca81d7a0 16609 ac_header_compiler=no
c0d27fcc 16610fi
ca81d7a0
JD
16611
16612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16613{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16614echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16615
16616# Is the header present?
ca81d7a0
JD
16617{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16618echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16620/* confdefs.h. */
16621_ACEOF
16622cat confdefs.h >>conftest.$ac_ext
16623cat >>conftest.$ac_ext <<_ACEOF
16624/* end confdefs.h. */
98418dba 16625#include <$ac_header>
503d2be0 16626_ACEOF
ca81d7a0
JD
16627if { (ac_try="$ac_cpp conftest.$ac_ext"
16628case "(($ac_try" in
16629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16630 *) ac_try_echo=$ac_try;;
16631esac
16632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16633 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16634 ac_status=$?
6bae0ccf 16635 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16636 rm -f conftest.er1
16637 cat conftest.err >&5
c0d27fcc 16638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16639 (exit $ac_status); } >/dev/null && {
16640 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16641 test ! -s conftest.err
16642 }; then
c0d27fcc 16643 ac_header_preproc=yes
98418dba
CW
16644else
16645 echo "$as_me: failed program was:" >&5
19650fd6
AS
16646sed 's/^/| /' conftest.$ac_ext >&5
16647
c0d27fcc 16648 ac_header_preproc=no
98418dba 16649fi
ca81d7a0 16650
98418dba 16651rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16652{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16653echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16654
16655# So? What about this header?
edfaf76d
LK
16656case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16657 yes:no: )
c0d27fcc
MR
16658 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16659echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16660 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16661echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16662 ac_header_preproc=yes
19650fd6 16663 ;;
edfaf76d 16664 no:yes:* )
c0d27fcc
MR
16665 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16666echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16667 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16668echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16669 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16670echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16671 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16672echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16673 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16674echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16675 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16676echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16677
19650fd6 16678 ;;
c0d27fcc 16679esac
ca81d7a0
JD
16680{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16681echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16682if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16683 echo $ECHO_N "(cached) $ECHO_C" >&6
16684else
edfaf76d 16685 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16686fi
ca81d7a0
JD
16687ac_res=`eval echo '${'$as_ac_Header'}'`
16688 { echo "$as_me:$LINENO: result: $ac_res" >&5
16689echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16690
16691fi
98418dba 16692if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16693 cat >>confdefs.h <<_ACEOF
98418dba 16694#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16695_ACEOF
98418dba
CW
16696
16697fi
c0d27fcc 16698
98418dba
CW
16699done
16700
c0d27fcc 16701
f053c89f
CY
16702
16703
16704
16705
16706
16707
16708
16709for ac_func in $ac_func_list
98418dba
CW
16710do
16711as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16712{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16713echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16714if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16715 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16716else
98418dba 16717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16718/* confdefs.h. */
16719_ACEOF
16720cat confdefs.h >>conftest.$ac_ext
16721cat >>conftest.$ac_ext <<_ACEOF
16722/* end confdefs.h. */
edfaf76d
LK
16723/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16725#define $ac_func innocuous_$ac_func
16726
98418dba 16727/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16728 which can conflict with char $ac_func (); below.
16729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16730 <limits.h> exists even on freestanding compilers. */
edfaf76d 16731
19650fd6
AS
16732#ifdef __STDC__
16733# include <limits.h>
16734#else
16735# include <assert.h>
16736#endif
edfaf76d
LK
16737
16738#undef $ac_func
16739
ca81d7a0
JD
16740/* Override any GCC internal prototype to avoid an error.
16741 Use char because int might match the return type of a GCC
16742 builtin and then its argument prototype would still apply. */
503d2be0
AS
16743#ifdef __cplusplus
16744extern "C"
16745#endif
98418dba 16746char $ac_func ();
98418dba
CW
16747/* The GNU C library defines this for functions which it implements
16748 to always fail with ENOSYS. Some functions are actually named
16749 something starting with __ and the normal name is an alias. */
ca81d7a0 16750#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16751choke me
98418dba
CW
16752#endif
16753
19650fd6
AS
16754int
16755main ()
16756{
ca81d7a0 16757return $ac_func ();
503d2be0
AS
16758 ;
16759 return 0;
16760}
16761_ACEOF
16762rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16763if { (ac_try="$ac_link"
16764case "(($ac_try" in
16765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16766 *) ac_try_echo=$ac_try;;
16767esac
16768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16769 (eval "$ac_link") 2>conftest.er1
503d2be0 16770 ac_status=$?
edfaf76d
LK
16771 grep -v '^ *+' conftest.er1 >conftest.err
16772 rm -f conftest.er1
16773 cat conftest.err >&5
c0d27fcc 16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16775 (exit $ac_status); } && {
16776 test -z "$ac_c_werror_flag" ||
16777 test ! -s conftest.err
16778 } && test -s conftest$ac_exeext &&
16779 $as_test_x conftest$ac_exeext; then
98418dba 16780 eval "$as_ac_var=yes"
503d2be0
AS
16781else
16782 echo "$as_me: failed program was:" >&5
19650fd6
AS
16783sed 's/^/| /' conftest.$ac_ext >&5
16784
ca81d7a0 16785 eval "$as_ac_var=no"
503d2be0 16786fi
ca81d7a0 16787
f053c89f 16788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16789 conftest$ac_exeext conftest.$ac_ext
ffe36136 16790fi
ca81d7a0
JD
16791ac_res=`eval echo '${'$as_ac_var'}'`
16792 { echo "$as_me:$LINENO: result: $ac_res" >&5
16793echo "${ECHO_T}$ac_res" >&6; }
98418dba 16794if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16795 cat >>confdefs.h <<_ACEOF
98418dba 16796#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16797_ACEOF
ffe36136 16798
ba4481b5 16799fi
98418dba 16800done
ba4481b5 16801
f053c89f
CY
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
ca81d7a0
JD
16818{ echo "$as_me:$LINENO: checking for working mktime" >&5
16819echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16820if test "${ac_cv_func_working_mktime+set}" = set; then
16821 echo $ECHO_N "(cached) $ECHO_C" >&6
16822else
16823 if test "$cross_compiling" = yes; then
16824 ac_cv_func_working_mktime=no
16825else
16826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16827/* confdefs.h. */
16828_ACEOF
16829cat confdefs.h >>conftest.$ac_ext
16830cat >>conftest.$ac_ext <<_ACEOF
16831/* end confdefs.h. */
98418dba 16832/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16833#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16834# include <sys/time.h>
16835# include <time.h>
16836#else
f053c89f 16837# ifdef HAVE_SYS_TIME_H
98418dba
CW
16838# include <sys/time.h>
16839# else
16840# include <time.h>
16841# endif
16842#endif
ba4481b5 16843
f053c89f 16844#include <stdlib.h>
edfaf76d 16845
f053c89f 16846#ifdef HAVE_UNISTD_H
98418dba
CW
16847# include <unistd.h>
16848#endif
ba4481b5 16849
f053c89f 16850#ifndef HAVE_ALARM
98418dba
CW
16851# define alarm(X) /* empty */
16852#endif
df645f7c 16853
98418dba
CW
16854/* Work around redefinition to rpl_putenv by other config tests. */
16855#undef putenv
df645f7c 16856
98418dba 16857static time_t time_t_max;
edfaf76d 16858static time_t time_t_min;
df645f7c 16859
98418dba 16860/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16861static char *tz_strings[] = {
16862 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16863 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16864};
16865#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16866
ca81d7a0 16867/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16868 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16869static int
98418dba
CW
16870spring_forward_gap ()
16871{
16872 /* glibc (up to about 1998-10-07) failed this test. */
16873 struct tm tm;
16874
16875 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16876 instead of "TZ=America/Vancouver" in order to detect the bug even
16877 on systems that don't support the Olson extension, or don't have the
16878 full zoneinfo tables installed. */
16879 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16880
16881 tm.tm_year = 98;
16882 tm.tm_mon = 3;
16883 tm.tm_mday = 5;
16884 tm.tm_hour = 2;
16885 tm.tm_min = 0;
16886 tm.tm_sec = 0;
16887 tm.tm_isdst = -1;
ca81d7a0 16888 return mktime (&tm) != (time_t) -1;
98418dba
CW
16889}
16890
ca81d7a0 16891static int
edfaf76d 16892mktime_test1 (now)
98418dba
CW
16893 time_t now;
16894{
16895 struct tm *lt;
ca81d7a0 16896 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16897}
16898
ca81d7a0 16899static int
edfaf76d
LK
16900mktime_test (now)
16901 time_t now;
16902{
ca81d7a0
JD
16903 return (mktime_test1 (now)
16904 && mktime_test1 ((time_t) (time_t_max - now))
16905 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16906}
16907
ca81d7a0 16908static int
98418dba
CW
16909irix_6_4_bug ()
16910{
16911 /* Based on code from Ariel Faigon. */
16912 struct tm tm;
16913 tm.tm_year = 96;
16914 tm.tm_mon = 3;
16915 tm.tm_mday = 0;
16916 tm.tm_hour = 0;
16917 tm.tm_min = 0;
16918 tm.tm_sec = 0;
16919 tm.tm_isdst = -1;
16920 mktime (&tm);
ca81d7a0 16921 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16922}
16923
ca81d7a0 16924static int
98418dba
CW
16925bigtime_test (j)
16926 int j;
16927{
16928 struct tm tm;
16929 time_t now;
16930 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16931 now = mktime (&tm);
16932 if (now != (time_t) -1)
16933 {
16934 struct tm *lt = localtime (&now);
16935 if (! (lt
16936 && lt->tm_year == tm.tm_year
16937 && lt->tm_mon == tm.tm_mon
16938 && lt->tm_mday == tm.tm_mday
16939 && lt->tm_hour == tm.tm_hour
16940 && lt->tm_min == tm.tm_min
16941 && lt->tm_sec == tm.tm_sec
16942 && lt->tm_yday == tm.tm_yday
16943 && lt->tm_wday == tm.tm_wday
16944 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16945 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16946 return 0;
98418dba 16947 }
ca81d7a0 16948 return 1;
98418dba
CW
16949}
16950
f053c89f
CY
16951static int
16952year_2050_test ()
16953{
16954 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16955 ignoring leap seconds. */
16956 unsigned long int answer = 2527315200UL;
16957
16958 struct tm tm;
16959 time_t t;
16960 tm.tm_year = 2050 - 1900;
16961 tm.tm_mon = 2 - 1;
16962 tm.tm_mday = 1;
16963 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16964 tm.tm_isdst = -1;
16965
16966 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16967 instead of "TZ=America/Vancouver" in order to detect the bug even
16968 on systems that don't support the Olson extension, or don't have the
16969 full zoneinfo tables installed. */
16970 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16971
16972 t = mktime (&tm);
16973
16974 /* Check that the result is either a failure, or close enough
16975 to the correct answer that we can assume the discrepancy is
16976 due to leap seconds. */
16977 return (t == (time_t) -1
16978 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16979}
16980
16981int
16982main ()
16983{
16984 time_t t, delta;
16985 int i, j;
16986
16987 /* This test makes some buggy mktime implementations loop.
16988 Give up after 60 seconds; a mktime slower than that
16989 isn't worth using anyway. */
16990 alarm (60);
16991
16992 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16993 continue;
16994 time_t_max--;
edfaf76d
LK
16995 if ((time_t) -1 < 0)
16996 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16997 continue;
98418dba
CW
16998 delta = time_t_max / 997; /* a suitable prime number */
16999 for (i = 0; i < N_STRINGS; i++)
17000 {
17001 if (tz_strings[i])
17002 putenv (tz_strings[i]);
503d2be0 17003
98418dba 17004 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
17005 if (! mktime_test (t))
17006 return 1;
17007 if (! (mktime_test ((time_t) 1)
17008 && mktime_test ((time_t) (60 * 60))
17009 && mktime_test ((time_t) (60 * 60 * 24))))
17010 return 1;
98418dba
CW
17011
17012 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
17013 if (! bigtime_test (j))
17014 return 1;
17015 if (! bigtime_test (j - 1))
17016 return 1;
98418dba 17017 }
f053c89f 17018 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
17019}
17020_ACEOF
98418dba 17021rm -f conftest$ac_exeext
ca81d7a0
JD
17022if { (ac_try="$ac_link"
17023case "(($ac_try" in
17024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17025 *) ac_try_echo=$ac_try;;
17026esac
17027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17028 (eval "$ac_link") 2>&5
503d2be0 17029 ac_status=$?
c0d27fcc 17030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
17032 { (case "(($ac_try" in
17033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17034 *) ac_try_echo=$ac_try;;
17035esac
17036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17037 (eval "$ac_try") 2>&5
503d2be0 17038 ac_status=$?
c0d27fcc 17039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17040 (exit $ac_status); }; }; then
98418dba 17041 ac_cv_func_working_mktime=yes
503d2be0 17042else
98418dba
CW
17043 echo "$as_me: program exited with status $ac_status" >&5
17044echo "$as_me: failed program was:" >&5
19650fd6
AS
17045sed 's/^/| /' conftest.$ac_ext >&5
17046
c0d27fcc 17047( exit $ac_status )
98418dba 17048ac_cv_func_working_mktime=no
503d2be0 17049fi
ca81d7a0 17050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17051fi
ca81d7a0
JD
17052
17053
ba4481b5 17054fi
ca81d7a0
JD
17055{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17056echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17057if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17058 case " $LIBOBJS " in
edfaf76d 17059 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17060 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17061 ;;
edfaf76d
LK
17062esac
17063
ba4481b5
DL
17064fi
17065
98418dba 17066if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17067
c0d27fcc 17068cat >>confdefs.h <<\_ACEOF
98418dba 17069#define BROKEN_MKTIME 1
c0d27fcc 17070_ACEOF
ba4481b5 17071
ba4481b5 17072fi
503d2be0 17073
98418dba
CW
17074ac_have_func=no # yes means we've found a way to get the load average.
17075
6bae0ccf
DL
17076# Make sure getloadavg.c is where it belongs, at configure-time.
17077test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17078 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17079echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17080 { (exit 1); exit 1; }; }
17081
98418dba
CW
17082ac_save_LIBS=$LIBS
17083
17084# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17085({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17086echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17087if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17088 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17089else
503d2be0 17090 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17091/* confdefs.h. */
17092_ACEOF
17093cat confdefs.h >>conftest.$ac_ext
17094cat >>conftest.$ac_ext <<_ACEOF
17095/* end confdefs.h. */
edfaf76d
LK
17096/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17097 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17098#define getloadavg innocuous_getloadavg
17099
98418dba 17100/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17101 which can conflict with char getloadavg (); below.
17102 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17103 <limits.h> exists even on freestanding compilers. */
edfaf76d 17104
19650fd6
AS
17105#ifdef __STDC__
17106# include <limits.h>
17107#else
17108# include <assert.h>
17109#endif
edfaf76d
LK
17110
17111#undef getloadavg
17112
ca81d7a0
JD
17113/* Override any GCC internal prototype to avoid an error.
17114 Use char because int might match the return type of a GCC
17115 builtin and then its argument prototype would still apply. */
503d2be0
AS
17116#ifdef __cplusplus
17117extern "C"
17118#endif
98418dba 17119char getloadavg ();
98418dba
CW
17120/* The GNU C library defines this for functions which it implements
17121 to always fail with ENOSYS. Some functions are actually named
17122 something starting with __ and the normal name is an alias. */
ca81d7a0 17123#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17124choke me
cd958eb3
MB
17125#endif
17126
19650fd6
AS
17127int
17128main ()
17129{
ca81d7a0 17130return getloadavg ();
503d2be0
AS
17131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17136if { (ac_try="$ac_link"
17137case "(($ac_try" in
17138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17139 *) ac_try_echo=$ac_try;;
17140esac
17141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17142 (eval "$ac_link") 2>conftest.er1
503d2be0 17143 ac_status=$?
edfaf76d
LK
17144 grep -v '^ *+' conftest.er1 >conftest.err
17145 rm -f conftest.er1
17146 cat conftest.err >&5
c0d27fcc 17147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17148 (exit $ac_status); } && {
17149 test -z "$ac_c_werror_flag" ||
17150 test ! -s conftest.err
17151 } && test -s conftest$ac_exeext &&
17152 $as_test_x conftest$ac_exeext; then
98418dba 17153 ac_cv_func_getloadavg=yes
503d2be0
AS
17154else
17155 echo "$as_me: failed program was:" >&5
19650fd6
AS
17156sed 's/^/| /' conftest.$ac_ext >&5
17157
ca81d7a0 17158 ac_cv_func_getloadavg=no
503d2be0 17159fi
ca81d7a0 17160
f053c89f 17161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17162 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17163fi
ca81d7a0
JD
17164{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17165echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17166if test $ac_cv_func_getloadavg = yes; then
17167 exit 0
17168else
17169 exit 1
ba4481b5 17170fi
98418dba 17171) && ac_have_func=yes
ba4481b5 17172
98418dba 17173# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17174
98418dba
CW
17175for ac_func in pstat_getdynamic
17176do
17177as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17178{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17179echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17180if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17181 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17182else
503d2be0 17183 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17184/* confdefs.h. */
17185_ACEOF
17186cat confdefs.h >>conftest.$ac_ext
17187cat >>conftest.$ac_ext <<_ACEOF
17188/* end confdefs.h. */
edfaf76d
LK
17189/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17191#define $ac_func innocuous_$ac_func
17192
98418dba 17193/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17194 which can conflict with char $ac_func (); below.
17195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17196 <limits.h> exists even on freestanding compilers. */
edfaf76d 17197
19650fd6
AS
17198#ifdef __STDC__
17199# include <limits.h>
17200#else
17201# include <assert.h>
17202#endif
edfaf76d
LK
17203
17204#undef $ac_func
17205
ca81d7a0
JD
17206/* Override any GCC internal prototype to avoid an error.
17207 Use char because int might match the return type of a GCC
17208 builtin and then its argument prototype would still apply. */
503d2be0
AS
17209#ifdef __cplusplus
17210extern "C"
17211#endif
98418dba 17212char $ac_func ();
98418dba
CW
17213/* The GNU C library defines this for functions which it implements
17214 to always fail with ENOSYS. Some functions are actually named
17215 something starting with __ and the normal name is an alias. */
ca81d7a0 17216#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17217choke me
98418dba
CW
17218#endif
17219
19650fd6
AS
17220int
17221main ()
17222{
ca81d7a0 17223return $ac_func ();
98418dba
CW
17224 ;
17225 return 0;
17226}
f21fadcc 17227_ACEOF
98418dba 17228rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17229if { (ac_try="$ac_link"
17230case "(($ac_try" in
17231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17232 *) ac_try_echo=$ac_try;;
17233esac
17234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17235 (eval "$ac_link") 2>conftest.er1
f21fadcc 17236 ac_status=$?
edfaf76d
LK
17237 grep -v '^ *+' conftest.er1 >conftest.err
17238 rm -f conftest.er1
17239 cat conftest.err >&5
c0d27fcc 17240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17241 (exit $ac_status); } && {
17242 test -z "$ac_c_werror_flag" ||
17243 test ! -s conftest.err
17244 } && test -s conftest$ac_exeext &&
17245 $as_test_x conftest$ac_exeext; then
98418dba 17246 eval "$as_ac_var=yes"
f21fadcc
JD
17247else
17248 echo "$as_me: failed program was:" >&5
19650fd6
AS
17249sed 's/^/| /' conftest.$ac_ext >&5
17250
ca81d7a0 17251 eval "$as_ac_var=no"
f21fadcc 17252fi
ca81d7a0 17253
f053c89f 17254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17255 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17256fi
ca81d7a0
JD
17257ac_res=`eval echo '${'$as_ac_var'}'`
17258 { echo "$as_me:$LINENO: result: $ac_res" >&5
17259echo "${ECHO_T}$ac_res" >&6; }
98418dba 17260if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17261 cat >>confdefs.h <<_ACEOF
98418dba 17262#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17263_ACEOF
98418dba
CW
17264
17265fi
17266done
17267
c0d27fcc 17268
98418dba
CW
17269# Solaris has libkstat which does not require root.
17270
ca81d7a0
JD
17271{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17272echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17273if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17274 echo $ECHO_N "(cached) $ECHO_C" >&6
17275else
17276 ac_check_lib_save_LIBS=$LIBS
98418dba 17277LIBS="-lkstat $LIBS"
f21fadcc 17278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17279/* confdefs.h. */
17280_ACEOF
17281cat confdefs.h >>conftest.$ac_ext
17282cat >>conftest.$ac_ext <<_ACEOF
17283/* end confdefs.h. */
f21fadcc 17284
ca81d7a0
JD
17285/* Override any GCC internal prototype to avoid an error.
17286 Use char because int might match the return type of a GCC
17287 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17288#ifdef __cplusplus
17289extern "C"
17290#endif
98418dba 17291char kstat_open ();
f21fadcc
JD
17292int
17293main ()
17294{
ca81d7a0 17295return kstat_open ();
f21fadcc
JD
17296 ;
17297 return 0;
17298}
17299_ACEOF
17300rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17301if { (ac_try="$ac_link"
17302case "(($ac_try" in
17303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17304 *) ac_try_echo=$ac_try;;
17305esac
17306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17307 (eval "$ac_link") 2>conftest.er1
f21fadcc 17308 ac_status=$?
edfaf76d
LK
17309 grep -v '^ *+' conftest.er1 >conftest.err
17310 rm -f conftest.er1
17311 cat conftest.err >&5
c0d27fcc 17312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17313 (exit $ac_status); } && {
17314 test -z "$ac_c_werror_flag" ||
17315 test ! -s conftest.err
17316 } && test -s conftest$ac_exeext &&
17317 $as_test_x conftest$ac_exeext; then
98418dba 17318 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17319else
17320 echo "$as_me: failed program was:" >&5
19650fd6
AS
17321sed 's/^/| /' conftest.$ac_ext >&5
17322
ca81d7a0 17323 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17324fi
ca81d7a0 17325
f053c89f 17326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17327 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17328LIBS=$ac_check_lib_save_LIBS
17329fi
ca81d7a0
JD
17330{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17331echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17332if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17333 cat >>confdefs.h <<_ACEOF
98418dba 17334#define HAVE_LIBKSTAT 1
c0d27fcc 17335_ACEOF
f21fadcc 17336
98418dba 17337 LIBS="-lkstat $LIBS"
f21fadcc 17338
f21fadcc
JD
17339fi
17340
98418dba
CW
17341test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17342
17343# Some systems with -lutil have (and need) -lkvm as well, some do not.
17344# On Solaris, -lkvm requires nlist from -lelf, so check that first
17345# to get the right answer into the cache.
17346# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17347if test $ac_have_func = no; then
ca81d7a0
JD
17348 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17349echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17350if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17351 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17352else
98418dba
CW
17353 ac_check_lib_save_LIBS=$LIBS
17354LIBS="-lelf $LIBS"
17355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17356/* confdefs.h. */
17357_ACEOF
17358cat confdefs.h >>conftest.$ac_ext
17359cat >>conftest.$ac_ext <<_ACEOF
17360/* end confdefs.h. */
98418dba 17361
ca81d7a0
JD
17362/* Override any GCC internal prototype to avoid an error.
17363 Use char because int might match the return type of a GCC
17364 builtin and then its argument prototype would still apply. */
98418dba
CW
17365#ifdef __cplusplus
17366extern "C"
17367#endif
98418dba 17368char elf_begin ();
503d2be0
AS
17369int
17370main ()
17371{
ca81d7a0 17372return elf_begin ();
503d2be0
AS
17373 ;
17374 return 0;
17375}
17376_ACEOF
17377rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17378if { (ac_try="$ac_link"
17379case "(($ac_try" in
17380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17381 *) ac_try_echo=$ac_try;;
17382esac
17383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17384 (eval "$ac_link") 2>conftest.er1
503d2be0 17385 ac_status=$?
edfaf76d
LK
17386 grep -v '^ *+' conftest.er1 >conftest.err
17387 rm -f conftest.er1
17388 cat conftest.err >&5
c0d27fcc 17389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17390 (exit $ac_status); } && {
17391 test -z "$ac_c_werror_flag" ||
17392 test ! -s conftest.err
17393 } && test -s conftest$ac_exeext &&
17394 $as_test_x conftest$ac_exeext; then
98418dba 17395 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17396else
503d2be0 17397 echo "$as_me: failed program was:" >&5
19650fd6
AS
17398sed 's/^/| /' conftest.$ac_ext >&5
17399
ca81d7a0 17400 ac_cv_lib_elf_elf_begin=no
ba4481b5 17401fi
ca81d7a0 17402
f053c89f 17403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17404 conftest$ac_exeext conftest.$ac_ext
98418dba 17405LIBS=$ac_check_lib_save_LIBS
ba4481b5 17406fi
ca81d7a0
JD
17407{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17408echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17409if test $ac_cv_lib_elf_elf_begin = yes; then
17410 LIBS="-lelf $LIBS"
ba4481b5
DL
17411fi
17412
98418dba
CW
17413fi
17414if test $ac_have_func = no; then
ca81d7a0
JD
17415 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17416echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17417if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17418 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17419else
98418dba
CW
17420 ac_check_lib_save_LIBS=$LIBS
17421LIBS="-lkvm $LIBS"
17422cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17423/* confdefs.h. */
17424_ACEOF
17425cat confdefs.h >>conftest.$ac_ext
17426cat >>conftest.$ac_ext <<_ACEOF
17427/* end confdefs.h. */
98418dba 17428
ca81d7a0
JD
17429/* Override any GCC internal prototype to avoid an error.
17430 Use char because int might match the return type of a GCC
17431 builtin and then its argument prototype would still apply. */
98418dba
CW
17432#ifdef __cplusplus
17433extern "C"
17434#endif
98418dba 17435char kvm_open ();
503d2be0
AS
17436int
17437main ()
17438{
ca81d7a0 17439return kvm_open ();
503d2be0
AS
17440 ;
17441 return 0;
17442}
17443_ACEOF
17444rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17445if { (ac_try="$ac_link"
17446case "(($ac_try" in
17447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17448 *) ac_try_echo=$ac_try;;
17449esac
17450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17451 (eval "$ac_link") 2>conftest.er1
503d2be0 17452 ac_status=$?
edfaf76d
LK
17453 grep -v '^ *+' conftest.er1 >conftest.err
17454 rm -f conftest.er1
17455 cat conftest.err >&5
c0d27fcc 17456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17457 (exit $ac_status); } && {
17458 test -z "$ac_c_werror_flag" ||
17459 test ! -s conftest.err
17460 } && test -s conftest$ac_exeext &&
17461 $as_test_x conftest$ac_exeext; then
98418dba 17462 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17463else
17464 echo "$as_me: failed program was:" >&5
19650fd6
AS
17465sed 's/^/| /' conftest.$ac_ext >&5
17466
ca81d7a0 17467 ac_cv_lib_kvm_kvm_open=no
503d2be0 17468fi
ca81d7a0 17469
f053c89f 17470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17471 conftest$ac_exeext conftest.$ac_ext
98418dba 17472LIBS=$ac_check_lib_save_LIBS
503d2be0 17473fi
ca81d7a0
JD
17474{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17475echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17476if test $ac_cv_lib_kvm_kvm_open = yes; then
17477 LIBS="-lkvm $LIBS"
ba4481b5
DL
17478fi
17479
98418dba 17480 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17481 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17482echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17483if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17484 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17485else
98418dba
CW
17486 ac_check_lib_save_LIBS=$LIBS
17487LIBS="-lutil $LIBS"
17488cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17489/* confdefs.h. */
17490_ACEOF
17491cat confdefs.h >>conftest.$ac_ext
17492cat >>conftest.$ac_ext <<_ACEOF
17493/* end confdefs.h. */
98418dba 17494
ca81d7a0
JD
17495/* Override any GCC internal prototype to avoid an error.
17496 Use char because int might match the return type of a GCC
17497 builtin and then its argument prototype would still apply. */
98418dba
CW
17498#ifdef __cplusplus
17499extern "C"
17500#endif
98418dba 17501char getloadavg ();
503d2be0
AS
17502int
17503main ()
17504{
ca81d7a0 17505return getloadavg ();
503d2be0
AS
17506 ;
17507 return 0;
17508}
17509_ACEOF
17510rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17511if { (ac_try="$ac_link"
17512case "(($ac_try" in
17513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17514 *) ac_try_echo=$ac_try;;
17515esac
17516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17517 (eval "$ac_link") 2>conftest.er1
503d2be0 17518 ac_status=$?
edfaf76d
LK
17519 grep -v '^ *+' conftest.er1 >conftest.err
17520 rm -f conftest.er1
17521 cat conftest.err >&5
c0d27fcc 17522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17523 (exit $ac_status); } && {
17524 test -z "$ac_c_werror_flag" ||
17525 test ! -s conftest.err
17526 } && test -s conftest$ac_exeext &&
17527 $as_test_x conftest$ac_exeext; then
35996d22
AS
17528 ac_cv_lib_util_getloadavg=yes
17529else
503d2be0 17530 echo "$as_me: failed program was:" >&5
19650fd6
AS
17531sed 's/^/| /' conftest.$ac_ext >&5
17532
ca81d7a0 17533 ac_cv_lib_util_getloadavg=no
ba4481b5 17534fi
ca81d7a0 17535
f053c89f 17536rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17537 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17538LIBS=$ac_check_lib_save_LIBS
17539fi
ca81d7a0
JD
17540{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17541echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17542if test $ac_cv_lib_util_getloadavg = yes; then
17543 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17544fi
503d2be0 17545
98418dba 17546fi
ba4481b5 17547
98418dba
CW
17548if test $ac_have_func = no; then
17549 # There is a commonly available library for RS/6000 AIX.
17550 # Since it is not a standard part of AIX, it might be installed locally.
17551 ac_getloadavg_LIBS=$LIBS
17552 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17553 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17554echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17555if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17556 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17557else
98418dba
CW
17558 ac_check_lib_save_LIBS=$LIBS
17559LIBS="-lgetloadavg $LIBS"
17560cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17561/* confdefs.h. */
17562_ACEOF
17563cat confdefs.h >>conftest.$ac_ext
17564cat >>conftest.$ac_ext <<_ACEOF
17565/* end confdefs.h. */
ba4481b5 17566
ca81d7a0
JD
17567/* Override any GCC internal prototype to avoid an error.
17568 Use char because int might match the return type of a GCC
17569 builtin and then its argument prototype would still apply. */
98418dba
CW
17570#ifdef __cplusplus
17571extern "C"
17572#endif
98418dba 17573char getloadavg ();
98418dba
CW
17574int
17575main ()
17576{
ca81d7a0 17577return getloadavg ();
98418dba
CW
17578 ;
17579 return 0;
17580}
503d2be0 17581_ACEOF
98418dba 17582rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17583if { (ac_try="$ac_link"
17584case "(($ac_try" in
17585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17586 *) ac_try_echo=$ac_try;;
17587esac
17588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17589 (eval "$ac_link") 2>conftest.er1
98418dba 17590 ac_status=$?
edfaf76d
LK
17591 grep -v '^ *+' conftest.er1 >conftest.err
17592 rm -f conftest.er1
17593 cat conftest.err >&5
c0d27fcc 17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17595 (exit $ac_status); } && {
17596 test -z "$ac_c_werror_flag" ||
17597 test ! -s conftest.err
17598 } && test -s conftest$ac_exeext &&
17599 $as_test_x conftest$ac_exeext; then
98418dba 17600 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17601else
98418dba 17602 echo "$as_me: failed program was:" >&5
19650fd6
AS
17603sed 's/^/| /' conftest.$ac_ext >&5
17604
ca81d7a0 17605 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17606fi
ca81d7a0 17607
f053c89f 17608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17609 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17610LIBS=$ac_check_lib_save_LIBS
17611fi
ca81d7a0
JD
17612{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17613echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17614if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17615 LIBS="-lgetloadavg $LIBS"
17616else
17617 LIBS=$ac_getloadavg_LIBS
ba4481b5 17618fi
ba4481b5
DL
17619
17620fi
98418dba
CW
17621
17622# Make sure it is really in the library, if we think we found it,
17623# otherwise set up the replacement function.
17624
17625for ac_func in getloadavg
17626do
17627as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17628{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17629echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17630if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17631 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17632else
503d2be0 17633 cat >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. */
edfaf76d
LK
17639/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17640 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17641#define $ac_func innocuous_$ac_func
17642
ba4481b5 17643/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17644 which can conflict with char $ac_func (); below.
17645 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17646 <limits.h> exists even on freestanding compilers. */
edfaf76d 17647
19650fd6
AS
17648#ifdef __STDC__
17649# include <limits.h>
17650#else
17651# include <assert.h>
17652#endif
edfaf76d
LK
17653
17654#undef $ac_func
17655
ca81d7a0
JD
17656/* Override any GCC internal prototype to avoid an error.
17657 Use char because int might match the return type of a GCC
17658 builtin and then its argument prototype would still apply. */
503d2be0
AS
17659#ifdef __cplusplus
17660extern "C"
17661#endif
503d2be0 17662char $ac_func ();
ba4481b5
DL
17663/* The GNU C library defines this for functions which it implements
17664 to always fail with ENOSYS. Some functions are actually named
17665 something starting with __ and the normal name is an alias. */
ca81d7a0 17666#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17667choke me
cd958eb3
MB
17668#endif
17669
19650fd6
AS
17670int
17671main ()
17672{
ca81d7a0 17673return $ac_func ();
503d2be0
AS
17674 ;
17675 return 0;
17676}
17677_ACEOF
17678rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17679if { (ac_try="$ac_link"
17680case "(($ac_try" in
17681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17682 *) ac_try_echo=$ac_try;;
17683esac
17684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17685 (eval "$ac_link") 2>conftest.er1
503d2be0 17686 ac_status=$?
edfaf76d
LK
17687 grep -v '^ *+' conftest.er1 >conftest.err
17688 rm -f conftest.er1
17689 cat conftest.err >&5
c0d27fcc 17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17691 (exit $ac_status); } && {
17692 test -z "$ac_c_werror_flag" ||
17693 test ! -s conftest.err
17694 } && test -s conftest$ac_exeext &&
17695 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17696 eval "$as_ac_var=yes"
17697else
17698 echo "$as_me: failed program was:" >&5
19650fd6
AS
17699sed 's/^/| /' conftest.$ac_ext >&5
17700
ca81d7a0 17701 eval "$as_ac_var=no"
503d2be0 17702fi
ca81d7a0 17703
f053c89f 17704rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17705 conftest$ac_exeext conftest.$ac_ext
503d2be0 17706fi
ca81d7a0
JD
17707ac_res=`eval echo '${'$as_ac_var'}'`
17708 { echo "$as_me:$LINENO: result: $ac_res" >&5
17709echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17710if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17711 cat >>confdefs.h <<_ACEOF
98418dba 17712#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17713_ACEOF
503d2be0 17714
98418dba 17715else
ca81d7a0 17716 case " $LIBOBJS " in
edfaf76d 17717 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17718 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17719 ;;
edfaf76d
LK
17720esac
17721
ba4481b5 17722
c0d27fcc 17723cat >>confdefs.h <<\_ACEOF
98418dba 17724#define C_GETLOADAVG 1
c0d27fcc 17725_ACEOF
ba4481b5 17726
98418dba
CW
17727# Figure out what our getloadavg.c needs.
17728ac_have_func=no
c0d27fcc 17729if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17730 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17731echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17732if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17733 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17734fi
ca81d7a0
JD
17735{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17736echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17737else
c0d27fcc 17738 # Is the header compilable?
ca81d7a0
JD
17739{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17740echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17741cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17742/* confdefs.h. */
17743_ACEOF
17744cat confdefs.h >>conftest.$ac_ext
17745cat >>conftest.$ac_ext <<_ACEOF
17746/* end confdefs.h. */
c0d27fcc
MR
17747$ac_includes_default
17748#include <sys/dg_sys_info.h>
17749_ACEOF
17750rm -f conftest.$ac_objext
ca81d7a0
JD
17751if { (ac_try="$ac_compile"
17752case "(($ac_try" in
17753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17754 *) ac_try_echo=$ac_try;;
17755esac
17756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17757 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17758 ac_status=$?
edfaf76d
LK
17759 grep -v '^ *+' conftest.er1 >conftest.err
17760 rm -f conftest.er1
17761 cat conftest.err >&5
c0d27fcc 17762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17763 (exit $ac_status); } && {
17764 test -z "$ac_c_werror_flag" ||
17765 test ! -s conftest.err
17766 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17767 ac_header_compiler=yes
17768else
17769 echo "$as_me: failed program was:" >&5
19650fd6
AS
17770sed 's/^/| /' conftest.$ac_ext >&5
17771
ca81d7a0 17772 ac_header_compiler=no
c0d27fcc 17773fi
ca81d7a0
JD
17774
17775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17776{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17777echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17778
17779# Is the header present?
ca81d7a0
JD
17780{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17781echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17782cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17783/* confdefs.h. */
17784_ACEOF
17785cat confdefs.h >>conftest.$ac_ext
17786cat >>conftest.$ac_ext <<_ACEOF
17787/* end confdefs.h. */
98418dba
CW
17788#include <sys/dg_sys_info.h>
17789_ACEOF
ca81d7a0
JD
17790if { (ac_try="$ac_cpp conftest.$ac_ext"
17791case "(($ac_try" in
17792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17793 *) ac_try_echo=$ac_try;;
17794esac
17795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17796 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17797 ac_status=$?
6bae0ccf 17798 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17799 rm -f conftest.er1
17800 cat conftest.err >&5
c0d27fcc 17801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17802 (exit $ac_status); } >/dev/null && {
17803 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17804 test ! -s conftest.err
17805 }; then
c0d27fcc 17806 ac_header_preproc=yes
98418dba
CW
17807else
17808 echo "$as_me: failed program was:" >&5
19650fd6
AS
17809sed 's/^/| /' conftest.$ac_ext >&5
17810
c0d27fcc 17811 ac_header_preproc=no
ba4481b5 17812fi
ca81d7a0 17813
98418dba 17814rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17815{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17816echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17817
17818# So? What about this header?
edfaf76d
LK
17819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17820 yes:no: )
c0d27fcc
MR
17821 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17822echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17823 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17824echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17825 ac_header_preproc=yes
19650fd6 17826 ;;
edfaf76d 17827 no:yes:* )
c0d27fcc
MR
17828 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17829echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17830 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17831echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17832 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17833echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17834 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17835echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17836 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17837echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17838 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17839echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17840
19650fd6 17841 ;;
c0d27fcc 17842esac
ca81d7a0
JD
17843{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17844echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17845if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17846 echo $ECHO_N "(cached) $ECHO_C" >&6
17847else
17848 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17849fi
ca81d7a0
JD
17850{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17851echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17852
17853fi
98418dba
CW
17854if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17855 ac_have_func=yes
ba4481b5 17856
c0d27fcc 17857cat >>confdefs.h <<\_ACEOF
98418dba 17858#define DGUX 1
c0d27fcc
MR
17859_ACEOF
17860
503d2be0 17861
ca81d7a0
JD
17862{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17863echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17864if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17865 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17866else
503d2be0 17867 ac_check_lib_save_LIBS=$LIBS
98418dba 17868LIBS="-ldgc $LIBS"
503d2be0 17869cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17870/* confdefs.h. */
17871_ACEOF
17872cat confdefs.h >>conftest.$ac_ext
17873cat >>conftest.$ac_ext <<_ACEOF
17874/* end confdefs.h. */
503d2be0 17875
ca81d7a0
JD
17876/* Override any GCC internal prototype to avoid an error.
17877 Use char because int might match the return type of a GCC
17878 builtin and then its argument prototype would still apply. */
503d2be0
AS
17879#ifdef __cplusplus
17880extern "C"
17881#endif
98418dba 17882char dg_sys_info ();
503d2be0
AS
17883int
17884main ()
17885{
ca81d7a0 17886return dg_sys_info ();
503d2be0
AS
17887 ;
17888 return 0;
17889}
17890_ACEOF
17891rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17892if { (ac_try="$ac_link"
17893case "(($ac_try" in
17894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17895 *) ac_try_echo=$ac_try;;
17896esac
17897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17898 (eval "$ac_link") 2>conftest.er1
503d2be0 17899 ac_status=$?
edfaf76d
LK
17900 grep -v '^ *+' conftest.er1 >conftest.err
17901 rm -f conftest.er1
17902 cat conftest.err >&5
c0d27fcc 17903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17904 (exit $ac_status); } && {
17905 test -z "$ac_c_werror_flag" ||
17906 test ! -s conftest.err
17907 } && test -s conftest$ac_exeext &&
17908 $as_test_x conftest$ac_exeext; then
98418dba 17909 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17910else
17911 echo "$as_me: failed program was:" >&5
19650fd6
AS
17912sed 's/^/| /' conftest.$ac_ext >&5
17913
ca81d7a0 17914 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17915fi
ca81d7a0 17916
f053c89f 17917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17918 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17919LIBS=$ac_check_lib_save_LIBS
17920fi
ca81d7a0
JD
17921{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17922echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17923if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17924 cat >>confdefs.h <<_ACEOF
98418dba 17925#define HAVE_LIBDGC 1
c0d27fcc 17926_ACEOF
ba4481b5 17927
98418dba 17928 LIBS="-ldgc $LIBS"
ba4481b5 17929
ba4481b5
DL
17930fi
17931
98418dba 17932fi
503d2be0 17933
c0d27fcc
MR
17934
17935
17936if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17937 { echo "$as_me:$LINENO: checking for locale.h" >&5
17938echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17939if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17940 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17941fi
ca81d7a0
JD
17942{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17943echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17944else
c0d27fcc 17945 # Is the header compilable?
ca81d7a0
JD
17946{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17947echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17948cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17949/* confdefs.h. */
17950_ACEOF
17951cat confdefs.h >>conftest.$ac_ext
17952cat >>conftest.$ac_ext <<_ACEOF
17953/* end confdefs.h. */
c0d27fcc
MR
17954$ac_includes_default
17955#include <locale.h>
17956_ACEOF
17957rm -f conftest.$ac_objext
ca81d7a0
JD
17958if { (ac_try="$ac_compile"
17959case "(($ac_try" in
17960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17961 *) ac_try_echo=$ac_try;;
17962esac
17963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17964 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17965 ac_status=$?
edfaf76d
LK
17966 grep -v '^ *+' conftest.er1 >conftest.err
17967 rm -f conftest.er1
17968 cat conftest.err >&5
c0d27fcc 17969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17970 (exit $ac_status); } && {
17971 test -z "$ac_c_werror_flag" ||
17972 test ! -s conftest.err
17973 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17974 ac_header_compiler=yes
17975else
17976 echo "$as_me: failed program was:" >&5
19650fd6
AS
17977sed 's/^/| /' conftest.$ac_ext >&5
17978
ca81d7a0 17979 ac_header_compiler=no
c0d27fcc 17980fi
ca81d7a0
JD
17981
17982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17983{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17984echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17985
17986# Is the header present?
ca81d7a0
JD
17987{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17988echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17989cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17990/* confdefs.h. */
17991_ACEOF
17992cat confdefs.h >>conftest.$ac_ext
17993cat >>conftest.$ac_ext <<_ACEOF
17994/* end confdefs.h. */
98418dba 17995#include <locale.h>
503d2be0 17996_ACEOF
ca81d7a0
JD
17997if { (ac_try="$ac_cpp conftest.$ac_ext"
17998case "(($ac_try" in
17999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18000 *) ac_try_echo=$ac_try;;
18001esac
18002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18003 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18004 ac_status=$?
6bae0ccf 18005 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18006 rm -f conftest.er1
18007 cat conftest.err >&5
c0d27fcc 18008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18009 (exit $ac_status); } >/dev/null && {
18010 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18011 test ! -s conftest.err
18012 }; then
c0d27fcc 18013 ac_header_preproc=yes
98418dba
CW
18014else
18015 echo "$as_me: failed program was:" >&5
19650fd6
AS
18016sed 's/^/| /' conftest.$ac_ext >&5
18017
c0d27fcc 18018 ac_header_preproc=no
ba4481b5 18019fi
ca81d7a0 18020
98418dba 18021rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18022{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18023echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18024
18025# So? What about this header?
edfaf76d
LK
18026case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18027 yes:no: )
c0d27fcc
MR
18028 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
18029echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18030 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
18031echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
18032 ac_header_preproc=yes
19650fd6 18033 ;;
edfaf76d 18034 no:yes:* )
c0d27fcc
MR
18035 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
18036echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18037 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
18038echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
18039 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
18040echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
18041 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
18042echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18043 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 18044echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18045 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
18046echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18047
19650fd6 18048 ;;
c0d27fcc 18049esac
ca81d7a0
JD
18050{ echo "$as_me:$LINENO: checking for locale.h" >&5
18051echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
18052if test "${ac_cv_header_locale_h+set}" = set; then
18053 echo $ECHO_N "(cached) $ECHO_C" >&6
18054else
18055 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18056fi
ca81d7a0
JD
18057{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18058echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18059
c0d27fcc
MR
18060fi
18061
18062
18063
98418dba 18064for ac_func in setlocale
ba4481b5 18065do
503d2be0 18066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18067{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18069if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18070 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18071else
503d2be0 18072 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18073/* confdefs.h. */
18074_ACEOF
18075cat confdefs.h >>conftest.$ac_ext
18076cat >>conftest.$ac_ext <<_ACEOF
18077/* end confdefs.h. */
edfaf76d
LK
18078/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18079 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18080#define $ac_func innocuous_$ac_func
18081
ba4481b5 18082/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18083 which can conflict with char $ac_func (); below.
18084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18085 <limits.h> exists even on freestanding compilers. */
edfaf76d 18086
19650fd6
AS
18087#ifdef __STDC__
18088# include <limits.h>
18089#else
18090# include <assert.h>
18091#endif
edfaf76d
LK
18092
18093#undef $ac_func
18094
ca81d7a0
JD
18095/* Override any GCC internal prototype to avoid an error.
18096 Use char because int might match the return type of a GCC
18097 builtin and then its argument prototype would still apply. */
503d2be0
AS
18098#ifdef __cplusplus
18099extern "C"
18100#endif
503d2be0 18101char $ac_func ();
ba4481b5
DL
18102/* The GNU C library defines this for functions which it implements
18103 to always fail with ENOSYS. Some functions are actually named
18104 something starting with __ and the normal name is an alias. */
ca81d7a0 18105#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18106choke me
ba4481b5
DL
18107#endif
18108
19650fd6
AS
18109int
18110main ()
18111{
ca81d7a0 18112return $ac_func ();
503d2be0
AS
18113 ;
18114 return 0;
18115}
18116_ACEOF
18117rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18118if { (ac_try="$ac_link"
18119case "(($ac_try" in
18120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18121 *) ac_try_echo=$ac_try;;
18122esac
18123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18124 (eval "$ac_link") 2>conftest.er1
503d2be0 18125 ac_status=$?
edfaf76d
LK
18126 grep -v '^ *+' conftest.er1 >conftest.err
18127 rm -f conftest.er1
18128 cat conftest.err >&5
c0d27fcc 18129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18130 (exit $ac_status); } && {
18131 test -z "$ac_c_werror_flag" ||
18132 test ! -s conftest.err
18133 } && test -s conftest$ac_exeext &&
18134 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18135 eval "$as_ac_var=yes"
18136else
18137 echo "$as_me: failed program was:" >&5
19650fd6
AS
18138sed 's/^/| /' conftest.$ac_ext >&5
18139
ca81d7a0 18140 eval "$as_ac_var=no"
503d2be0 18141fi
ca81d7a0 18142
f053c89f 18143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18144 conftest$ac_exeext conftest.$ac_ext
503d2be0 18145fi
ca81d7a0
JD
18146ac_res=`eval echo '${'$as_ac_var'}'`
18147 { echo "$as_me:$LINENO: result: $ac_res" >&5
18148echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18149if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18150 cat >>confdefs.h <<_ACEOF
503d2be0 18151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18152_ACEOF
ba4481b5 18153
ba4481b5
DL
18154fi
18155done
18156
c0d27fcc 18157
98418dba
CW
18158# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18159# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18160# Irix 4.0.5F has the header but not the library.
18161if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18162 ac_have_func=yes
18163
c0d27fcc 18164cat >>confdefs.h <<\_ACEOF
98418dba 18165#define SVR4 1
c0d27fcc 18166_ACEOF
98418dba
CW
18167
18168fi
18169
18170if test $ac_have_func = no; then
c0d27fcc 18171 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18172 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18173echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18174if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18175 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18176fi
ca81d7a0
JD
18177{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18178echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18179else
c0d27fcc 18180 # Is the header compilable?
ca81d7a0
JD
18181{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18182echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18184/* confdefs.h. */
18185_ACEOF
18186cat confdefs.h >>conftest.$ac_ext
18187cat >>conftest.$ac_ext <<_ACEOF
18188/* end confdefs.h. */
c0d27fcc
MR
18189$ac_includes_default
18190#include <inq_stats/cpustats.h>
18191_ACEOF
18192rm -f conftest.$ac_objext
ca81d7a0
JD
18193if { (ac_try="$ac_compile"
18194case "(($ac_try" in
18195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18196 *) ac_try_echo=$ac_try;;
18197esac
18198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18199 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18200 ac_status=$?
edfaf76d
LK
18201 grep -v '^ *+' conftest.er1 >conftest.err
18202 rm -f conftest.er1
18203 cat conftest.err >&5
c0d27fcc 18204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18205 (exit $ac_status); } && {
18206 test -z "$ac_c_werror_flag" ||
18207 test ! -s conftest.err
18208 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18209 ac_header_compiler=yes
18210else
18211 echo "$as_me: failed program was:" >&5
19650fd6
AS
18212sed 's/^/| /' conftest.$ac_ext >&5
18213
ca81d7a0 18214 ac_header_compiler=no
c0d27fcc 18215fi
ca81d7a0
JD
18216
18217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18218{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18219echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18220
18221# Is the header present?
ca81d7a0
JD
18222{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18223echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18224cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18225/* confdefs.h. */
18226_ACEOF
18227cat confdefs.h >>conftest.$ac_ext
18228cat >>conftest.$ac_ext <<_ACEOF
18229/* end confdefs.h. */
98418dba 18230#include <inq_stats/cpustats.h>
503d2be0 18231_ACEOF
ca81d7a0
JD
18232if { (ac_try="$ac_cpp conftest.$ac_ext"
18233case "(($ac_try" in
18234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18235 *) ac_try_echo=$ac_try;;
18236esac
18237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18238 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18239 ac_status=$?
6bae0ccf 18240 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18241 rm -f conftest.er1
18242 cat conftest.err >&5
c0d27fcc 18243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18244 (exit $ac_status); } >/dev/null && {
18245 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18246 test ! -s conftest.err
18247 }; then
c0d27fcc 18248 ac_header_preproc=yes
503d2be0
AS
18249else
18250 echo "$as_me: failed program was:" >&5
19650fd6
AS
18251sed 's/^/| /' conftest.$ac_ext >&5
18252
c0d27fcc 18253 ac_header_preproc=no
ba4481b5 18254fi
ca81d7a0 18255
503d2be0 18256rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18257{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18258echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18259
18260# So? What about this header?
edfaf76d
LK
18261case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18262 yes:no: )
c0d27fcc
MR
18263 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18264echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18265 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18266echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18267 ac_header_preproc=yes
19650fd6 18268 ;;
edfaf76d 18269 no:yes:* )
c0d27fcc
MR
18270 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18271echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18272 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18273echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18274 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18275echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18276 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18277echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18278 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18279echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18280 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18281echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18282
19650fd6 18283 ;;
c0d27fcc 18284esac
ca81d7a0
JD
18285{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18286echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18287if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18288 echo $ECHO_N "(cached) $ECHO_C" >&6
18289else
18290 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18291fi
ca81d7a0
JD
18292{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18293echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18294
18295fi
98418dba
CW
18296if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18297 ac_have_func=yes
ba4481b5 18298
c0d27fcc 18299cat >>confdefs.h <<\_ACEOF
98418dba 18300#define UMAX 1
c0d27fcc 18301_ACEOF
98418dba 18302
c0d27fcc
MR
18303
18304cat >>confdefs.h <<\_ACEOF
98418dba 18305#define UMAX4_3 1
c0d27fcc 18306_ACEOF
98418dba
CW
18307
18308fi
18309
c0d27fcc 18310
98418dba
CW
18311fi
18312
18313if test $ac_have_func = no; then
c0d27fcc 18314 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18315 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18316echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18317if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18318 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18319fi
ca81d7a0
JD
18320{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18321echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18322else
c0d27fcc 18323 # Is the header compilable?
ca81d7a0
JD
18324{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18325echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18326cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18327/* confdefs.h. */
18328_ACEOF
18329cat confdefs.h >>conftest.$ac_ext
18330cat >>conftest.$ac_ext <<_ACEOF
18331/* end confdefs.h. */
c0d27fcc
MR
18332$ac_includes_default
18333#include <sys/cpustats.h>
18334_ACEOF
18335rm -f conftest.$ac_objext
ca81d7a0
JD
18336if { (ac_try="$ac_compile"
18337case "(($ac_try" in
18338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18339 *) ac_try_echo=$ac_try;;
18340esac
18341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18342 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18343 ac_status=$?
edfaf76d
LK
18344 grep -v '^ *+' conftest.er1 >conftest.err
18345 rm -f conftest.er1
18346 cat conftest.err >&5
c0d27fcc 18347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18348 (exit $ac_status); } && {
18349 test -z "$ac_c_werror_flag" ||
18350 test ! -s conftest.err
18351 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18352 ac_header_compiler=yes
18353else
18354 echo "$as_me: failed program was:" >&5
19650fd6
AS
18355sed 's/^/| /' conftest.$ac_ext >&5
18356
ca81d7a0 18357 ac_header_compiler=no
c0d27fcc 18358fi
ca81d7a0
JD
18359
18360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18361{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18362echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18363
18364# Is the header present?
ca81d7a0
JD
18365{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18366echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18367cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18368/* confdefs.h. */
18369_ACEOF
18370cat confdefs.h >>conftest.$ac_ext
18371cat >>conftest.$ac_ext <<_ACEOF
18372/* end confdefs.h. */
98418dba
CW
18373#include <sys/cpustats.h>
18374_ACEOF
ca81d7a0
JD
18375if { (ac_try="$ac_cpp conftest.$ac_ext"
18376case "(($ac_try" in
18377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18378 *) ac_try_echo=$ac_try;;
18379esac
18380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18381 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18382 ac_status=$?
6bae0ccf 18383 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18384 rm -f conftest.er1
18385 cat conftest.err >&5
c0d27fcc 18386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18387 (exit $ac_status); } >/dev/null && {
18388 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18389 test ! -s conftest.err
18390 }; then
c0d27fcc 18391 ac_header_preproc=yes
98418dba
CW
18392else
18393 echo "$as_me: failed program was:" >&5
19650fd6
AS
18394sed 's/^/| /' conftest.$ac_ext >&5
18395
c0d27fcc 18396 ac_header_preproc=no
98418dba 18397fi
ca81d7a0 18398
98418dba 18399rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18400{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18401echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18402
18403# So? What about this header?
edfaf76d
LK
18404case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18405 yes:no: )
c0d27fcc
MR
18406 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18407echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18408 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18409echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18410 ac_header_preproc=yes
19650fd6 18411 ;;
edfaf76d 18412 no:yes:* )
c0d27fcc
MR
18413 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18414echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18415 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18416echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18417 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18418echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18419 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18420echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18421 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18422echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18423 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18424echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18425
19650fd6 18426 ;;
c0d27fcc 18427esac
ca81d7a0
JD
18428{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18429echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18430if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18431 echo $ECHO_N "(cached) $ECHO_C" >&6
18432else
18433 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18434fi
ca81d7a0
JD
18435{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18436echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18437
18438fi
98418dba 18439if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18440 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18441#define UMAX 1
c0d27fcc 18442_ACEOF
ba4481b5 18443
98418dba
CW
18444fi
18445
c0d27fcc 18446
98418dba
CW
18447fi
18448
18449if test $ac_have_func = no; then
18450
18451for ac_header in mach/mach.h
2c9dccc9
PJ
18452do
18453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18454if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18455 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18458 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18459fi
ca81d7a0
JD
18460ac_res=`eval echo '${'$as_ac_Header'}'`
18461 { echo "$as_me:$LINENO: result: $ac_res" >&5
18462echo "${ECHO_T}$ac_res" >&6; }
98418dba 18463else
c0d27fcc 18464 # Is the header compilable?
ca81d7a0
JD
18465{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18468/* confdefs.h. */
18469_ACEOF
18470cat confdefs.h >>conftest.$ac_ext
18471cat >>conftest.$ac_ext <<_ACEOF
18472/* end confdefs.h. */
c0d27fcc
MR
18473$ac_includes_default
18474#include <$ac_header>
18475_ACEOF
18476rm -f conftest.$ac_objext
ca81d7a0
JD
18477if { (ac_try="$ac_compile"
18478case "(($ac_try" in
18479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18480 *) ac_try_echo=$ac_try;;
18481esac
18482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18483 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18484 ac_status=$?
edfaf76d
LK
18485 grep -v '^ *+' conftest.er1 >conftest.err
18486 rm -f conftest.er1
18487 cat conftest.err >&5
c0d27fcc 18488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18489 (exit $ac_status); } && {
18490 test -z "$ac_c_werror_flag" ||
18491 test ! -s conftest.err
18492 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18493 ac_header_compiler=yes
18494else
18495 echo "$as_me: failed program was:" >&5
19650fd6
AS
18496sed 's/^/| /' conftest.$ac_ext >&5
18497
ca81d7a0 18498 ac_header_compiler=no
c0d27fcc 18499fi
ca81d7a0
JD
18500
18501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18502{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18503echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18504
18505# Is the header present?
ca81d7a0
JD
18506{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18507echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18509/* confdefs.h. */
18510_ACEOF
18511cat confdefs.h >>conftest.$ac_ext
18512cat >>conftest.$ac_ext <<_ACEOF
18513/* end confdefs.h. */
2c9dccc9
PJ
18514#include <$ac_header>
18515_ACEOF
ca81d7a0
JD
18516if { (ac_try="$ac_cpp conftest.$ac_ext"
18517case "(($ac_try" in
18518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18519 *) ac_try_echo=$ac_try;;
18520esac
18521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18522 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18523 ac_status=$?
6bae0ccf 18524 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18525 rm -f conftest.er1
18526 cat conftest.err >&5
c0d27fcc 18527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18528 (exit $ac_status); } >/dev/null && {
18529 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18530 test ! -s conftest.err
18531 }; then
c0d27fcc
MR
18532 ac_header_preproc=yes
18533else
18534 echo "$as_me: failed program was:" >&5
19650fd6
AS
18535sed 's/^/| /' conftest.$ac_ext >&5
18536
c0d27fcc
MR
18537 ac_header_preproc=no
18538fi
ca81d7a0 18539
c0d27fcc 18540rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18541{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18542echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18543
18544# So? What about this header?
edfaf76d
LK
18545case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18546 yes:no: )
c0d27fcc
MR
18547 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18548echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18549 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18550echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18551 ac_header_preproc=yes
19650fd6 18552 ;;
edfaf76d 18553 no:yes:* )
c0d27fcc
MR
18554 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18555echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18556 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18557echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18558 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18559echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18561echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18562 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18563echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18564 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18565echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18566
19650fd6 18567 ;;
c0d27fcc 18568esac
ca81d7a0
JD
18569{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18570echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18571if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18572 echo $ECHO_N "(cached) $ECHO_C" >&6
18573else
edfaf76d 18574 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18575fi
ca81d7a0
JD
18576ac_res=`eval echo '${'$as_ac_Header'}'`
18577 { echo "$as_me:$LINENO: result: $ac_res" >&5
18578echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18579
18580fi
18581if test `eval echo '${'$as_ac_Header'}'` = yes; then
18582 cat >>confdefs.h <<_ACEOF
18583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18584_ACEOF
18585
18586fi
18587
18588done
18589
18590fi
18591
18592
18593for ac_header in nlist.h
18594do
18595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18597 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18598echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18600 echo $ECHO_N "(cached) $ECHO_C" >&6
18601fi
ca81d7a0
JD
18602ac_res=`eval echo '${'$as_ac_Header'}'`
18603 { echo "$as_me:$LINENO: result: $ac_res" >&5
18604echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18605else
18606 # Is the header compilable?
ca81d7a0
JD
18607{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18608echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18609cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18610/* confdefs.h. */
18611_ACEOF
18612cat confdefs.h >>conftest.$ac_ext
18613cat >>conftest.$ac_ext <<_ACEOF
18614/* end confdefs.h. */
c0d27fcc
MR
18615$ac_includes_default
18616#include <$ac_header>
18617_ACEOF
18618rm -f conftest.$ac_objext
ca81d7a0
JD
18619if { (ac_try="$ac_compile"
18620case "(($ac_try" in
18621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18622 *) ac_try_echo=$ac_try;;
18623esac
18624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18625 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18626 ac_status=$?
edfaf76d
LK
18627 grep -v '^ *+' conftest.er1 >conftest.err
18628 rm -f conftest.er1
18629 cat conftest.err >&5
c0d27fcc 18630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18631 (exit $ac_status); } && {
18632 test -z "$ac_c_werror_flag" ||
18633 test ! -s conftest.err
18634 } && test -s conftest.$ac_objext; then
c0d27fcc 18635 ac_header_compiler=yes
2c9dccc9
PJ
18636else
18637 echo "$as_me: failed program was:" >&5
19650fd6
AS
18638sed 's/^/| /' conftest.$ac_ext >&5
18639
ca81d7a0 18640 ac_header_compiler=no
98418dba 18641fi
ca81d7a0
JD
18642
18643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18644{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18645echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18646
c0d27fcc 18647# Is the header present?
ca81d7a0
JD
18648{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18649echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18650cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18651/* confdefs.h. */
18652_ACEOF
18653cat confdefs.h >>conftest.$ac_ext
18654cat >>conftest.$ac_ext <<_ACEOF
18655/* end confdefs.h. */
503d2be0
AS
18656#include <$ac_header>
18657_ACEOF
ca81d7a0
JD
18658if { (ac_try="$ac_cpp conftest.$ac_ext"
18659case "(($ac_try" in
18660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18661 *) ac_try_echo=$ac_try;;
18662esac
18663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18664 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18665 ac_status=$?
6bae0ccf 18666 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18667 rm -f conftest.er1
18668 cat conftest.err >&5
c0d27fcc 18669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18670 (exit $ac_status); } >/dev/null && {
18671 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18672 test ! -s conftest.err
18673 }; then
c0d27fcc 18674 ac_header_preproc=yes
503d2be0
AS
18675else
18676 echo "$as_me: failed program was:" >&5
19650fd6
AS
18677sed 's/^/| /' conftest.$ac_ext >&5
18678
c0d27fcc 18679 ac_header_preproc=no
b5de8dc0 18680fi
ca81d7a0 18681
503d2be0 18682rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18683{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18684echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18685
18686# So? What about this header?
edfaf76d
LK
18687case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18688 yes:no: )
c0d27fcc
MR
18689 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18690echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18692echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18693 ac_header_preproc=yes
19650fd6 18694 ;;
edfaf76d 18695 no:yes:* )
c0d27fcc
MR
18696 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18697echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18698 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18699echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18700 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18701echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18702 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18703echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18704 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18705echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18706 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18707echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18708
19650fd6 18709 ;;
c0d27fcc 18710esac
ca81d7a0
JD
18711{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18712echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18713if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18714 echo $ECHO_N "(cached) $ECHO_C" >&6
18715else
edfaf76d 18716 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18717fi
ca81d7a0
JD
18718ac_res=`eval echo '${'$as_ac_Header'}'`
18719 { echo "$as_me:$LINENO: result: $ac_res" >&5
18720echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18721
18722fi
98418dba 18723if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18724 cat >>confdefs.h <<_ACEOF
98418dba 18725#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18726_ACEOF
ca81d7a0
JD
18727 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18728echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18729if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18730 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18731else
503d2be0 18732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18733/* confdefs.h. */
18734_ACEOF
18735cat confdefs.h >>conftest.$ac_ext
18736cat >>conftest.$ac_ext <<_ACEOF
18737/* end confdefs.h. */
98418dba 18738#include <nlist.h>
b5de8dc0 18739
503d2be0
AS
18740int
18741main ()
18742{
98418dba
CW
18743static struct nlist ac_aggr;
18744if (ac_aggr.n_un.n_name)
18745return 0;
503d2be0
AS
18746 ;
18747 return 0;
18748}
18749_ACEOF
98418dba 18750rm -f conftest.$ac_objext
ca81d7a0
JD
18751if { (ac_try="$ac_compile"
18752case "(($ac_try" in
18753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18754 *) ac_try_echo=$ac_try;;
18755esac
18756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18757 (eval "$ac_compile") 2>conftest.er1
503d2be0 18758 ac_status=$?
edfaf76d
LK
18759 grep -v '^ *+' conftest.er1 >conftest.err
18760 rm -f conftest.er1
18761 cat conftest.err >&5
c0d27fcc 18762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18763 (exit $ac_status); } && {
18764 test -z "$ac_c_werror_flag" ||
18765 test ! -s conftest.err
18766 } && test -s conftest.$ac_objext; then
edfaf76d 18767 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18768else
18769 echo "$as_me: failed program was:" >&5
19650fd6
AS
18770sed 's/^/| /' conftest.$ac_ext >&5
18771
ca81d7a0 18772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18773/* confdefs.h. */
18774_ACEOF
18775cat confdefs.h >>conftest.$ac_ext
18776cat >>conftest.$ac_ext <<_ACEOF
18777/* end confdefs.h. */
6bae0ccf
DL
18778#include <nlist.h>
18779
18780int
18781main ()
18782{
18783static struct nlist ac_aggr;
18784if (sizeof ac_aggr.n_un.n_name)
18785return 0;
18786 ;
18787 return 0;
18788}
18789_ACEOF
18790rm -f conftest.$ac_objext
ca81d7a0
JD
18791if { (ac_try="$ac_compile"
18792case "(($ac_try" in
18793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18794 *) ac_try_echo=$ac_try;;
18795esac
18796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18797 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18798 ac_status=$?
edfaf76d
LK
18799 grep -v '^ *+' conftest.er1 >conftest.err
18800 rm -f conftest.er1
18801 cat conftest.err >&5
6bae0ccf 18802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18803 (exit $ac_status); } && {
18804 test -z "$ac_c_werror_flag" ||
18805 test ! -s conftest.err
18806 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18807 ac_cv_member_struct_nlist_n_un_n_name=yes
18808else
18809 echo "$as_me: failed program was:" >&5
19650fd6
AS
18810sed 's/^/| /' conftest.$ac_ext >&5
18811
ca81d7a0 18812 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18813fi
ca81d7a0
JD
18814
18815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18816fi
ca81d7a0
JD
18817
18818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18819fi
ca81d7a0
JD
18820{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18821echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18822if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18823
c0d27fcc 18824cat >>confdefs.h <<_ACEOF
98418dba 18825#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18826_ACEOF
b5de8dc0 18827
c0d27fcc
MR
18828
18829cat >>confdefs.h <<\_ACEOF
98418dba 18830#define NLIST_NAME_UNION 1
c0d27fcc 18831_ACEOF
b5de8dc0 18832
98418dba 18833fi
b5de8dc0 18834
c0d27fcc 18835
98418dba 18836fi
c0d27fcc 18837
98418dba 18838done
b5de8dc0 18839
98418dba
CW
18840fi
18841done
b5de8dc0 18842
c0d27fcc 18843
98418dba 18844# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18845{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18846echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18847if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18848 echo $ECHO_N "(cached) $ECHO_C" >&6
18849else
18850 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18851/* confdefs.h. */
18852_ACEOF
18853cat confdefs.h >>conftest.$ac_ext
18854cat >>conftest.$ac_ext <<_ACEOF
18855/* end confdefs.h. */
6bae0ccf 18856#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18857#ifdef LDAV_PRIVILEGED
18858Yowza Am I SETGID yet
18859#endif
18860_ACEOF
18861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18862 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18863 ac_cv_func_getloadavg_setgid=yes
18864else
18865 ac_cv_func_getloadavg_setgid=no
18866fi
18867rm -f conftest*
b5de8dc0 18868
98418dba 18869fi
ca81d7a0
JD
18870{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18871echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18872if test $ac_cv_func_getloadavg_setgid = yes; then
18873 NEED_SETGID=true
b5de8dc0 18874
c0d27fcc 18875cat >>confdefs.h <<\_ACEOF
98418dba 18876#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18877_ACEOF
98418dba 18878
b5de8dc0 18879else
98418dba 18880 NEED_SETGID=false
b5de8dc0 18881fi
98418dba
CW
18882
18883if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18884 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18885echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18886if test "${ac_cv_group_kmem+set}" = set; then
18887 echo $ECHO_N "(cached) $ECHO_C" >&6
18888else
18889 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18890 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18891 # If we got an error (system does not support symlinks), try without -L.
18892 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18893 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18894 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18895 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18896 / /s/.* //;p;'`
18897
b5de8dc0 18898fi
ca81d7a0
JD
18899{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18900echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18901 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18902fi
98418dba
CW
18903if test "x$ac_save_LIBS" = x; then
18904 GETLOADAVG_LIBS=$LIBS
18905else
18906 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18907fi
98418dba 18908LIBS=$ac_save_LIBS
b5de8dc0 18909
c0d27fcc
MR
18910
18911
ca81d7a0
JD
18912{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18913echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18914if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18915 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18916else
b936fae4 18917 while :; do
503d2be0 18918 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18919/* confdefs.h. */
18920_ACEOF
18921cat confdefs.h >>conftest.$ac_ext
18922cat >>conftest.$ac_ext <<_ACEOF
18923/* end confdefs.h. */
bc3512d0 18924#include <stdio.h>
503d2be0
AS
18925int
18926main ()
18927{
bc3512d0 18928return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18929 ;
18930 return 0;
18931}
18932_ACEOF
f053c89f
CY
18933rm -f conftest.$ac_objext conftest$ac_exeext
18934if { (ac_try="$ac_link"
ca81d7a0
JD
18935case "(($ac_try" in
18936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18937 *) ac_try_echo=$ac_try;;
18938esac
18939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18940 (eval "$ac_link") 2>conftest.er1
b936fae4 18941 ac_status=$?
edfaf76d
LK
18942 grep -v '^ *+' conftest.er1 >conftest.err
18943 rm -f conftest.er1
18944 cat conftest.err >&5
c0d27fcc 18945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18946 (exit $ac_status); } && {
18947 test -z "$ac_c_werror_flag" ||
18948 test ! -s conftest.err
18949 } && test -s conftest$ac_exeext &&
18950 $as_test_x conftest$ac_exeext; then
18951 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18952else
18953 echo "$as_me: failed program was:" >&5
19650fd6
AS
18954sed 's/^/| /' conftest.$ac_ext >&5
18955
ca81d7a0 18956
b936fae4 18957fi
ca81d7a0 18958
f053c89f
CY
18959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18960 conftest$ac_exeext conftest.$ac_ext
b936fae4 18961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18962/* confdefs.h. */
18963_ACEOF
18964cat confdefs.h >>conftest.$ac_ext
18965cat >>conftest.$ac_ext <<_ACEOF
18966/* end confdefs.h. */
b936fae4 18967#define _LARGEFILE_SOURCE 1
bc3512d0 18968#include <stdio.h>
b936fae4
AS
18969int
18970main ()
18971{
bc3512d0 18972return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18973 ;
18974 return 0;
18975}
18976_ACEOF
f053c89f
CY
18977rm -f conftest.$ac_objext conftest$ac_exeext
18978if { (ac_try="$ac_link"
ca81d7a0
JD
18979case "(($ac_try" in
18980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18981 *) ac_try_echo=$ac_try;;
18982esac
18983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18984 (eval "$ac_link") 2>conftest.er1
b936fae4 18985 ac_status=$?
edfaf76d
LK
18986 grep -v '^ *+' conftest.er1 >conftest.err
18987 rm -f conftest.er1
18988 cat conftest.err >&5
c0d27fcc 18989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18990 (exit $ac_status); } && {
18991 test -z "$ac_c_werror_flag" ||
18992 test ! -s conftest.err
18993 } && test -s conftest$ac_exeext &&
18994 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18995 ac_cv_sys_largefile_source=1; break
18996else
18997 echo "$as_me: failed program was:" >&5
19650fd6
AS
18998sed 's/^/| /' conftest.$ac_ext >&5
18999
ca81d7a0 19000
b936fae4 19001fi
ca81d7a0 19002
f053c89f
CY
19003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19004 conftest$ac_exeext conftest.$ac_ext
19005 ac_cv_sys_largefile_source=unknown
b936fae4
AS
19006 break
19007done
19008fi
ca81d7a0
JD
19009{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19010echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
19011case $ac_cv_sys_largefile_source in #(
19012 no | unknown) ;;
19013 *)
c0d27fcc 19014cat >>confdefs.h <<_ACEOF
b936fae4 19015#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 19016_ACEOF
f053c89f
CY
19017;;
19018esac
b936fae4 19019rm -f conftest*
4c343001 19020
b936fae4
AS
19021# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19022# in glibc 2.1.3, but that breaks too many other things.
19023# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 19024if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 19025
c0d27fcc 19026cat >>confdefs.h <<\_ACEOF
b936fae4 19027#define HAVE_FSEEKO 1
c0d27fcc 19028_ACEOF
b936fae4 19029
4c343001
DL
19030fi
19031
c0d27fcc 19032
52dbaac8
PE
19033# Configure getopt.
19034# getopt.m4 serial 10
19035
19036# The getopt module assume you want GNU getopt, with getopt_long etc,
19037# rather than vanilla POSIX getopt. This means your your code should
19038# always include <getopt.h> for the getopt prototypes.
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050# Prerequisites of lib/getopt*.
19051
19052
19053
10a3b1a1 19054
52dbaac8
PE
19055 GETOPT_H=
19056
19057for ac_header in getopt.h
19058do
19059as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19060if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19061 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19062echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19063if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19064 echo $ECHO_N "(cached) $ECHO_C" >&6
19065fi
ca81d7a0
JD
19066ac_res=`eval echo '${'$as_ac_Header'}'`
19067 { echo "$as_me:$LINENO: result: $ac_res" >&5
19068echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19069else
19070 # Is the header compilable?
ca81d7a0
JD
19071{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19072echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19073cat >conftest.$ac_ext <<_ACEOF
19074/* confdefs.h. */
19075_ACEOF
19076cat confdefs.h >>conftest.$ac_ext
19077cat >>conftest.$ac_ext <<_ACEOF
19078/* end confdefs.h. */
19079$ac_includes_default
19080#include <$ac_header>
19081_ACEOF
19082rm -f conftest.$ac_objext
ca81d7a0
JD
19083if { (ac_try="$ac_compile"
19084case "(($ac_try" in
19085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19086 *) ac_try_echo=$ac_try;;
19087esac
19088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19089 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19090 ac_status=$?
19091 grep -v '^ *+' conftest.er1 >conftest.err
19092 rm -f conftest.er1
19093 cat conftest.err >&5
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19095 (exit $ac_status); } && {
19096 test -z "$ac_c_werror_flag" ||
19097 test ! -s conftest.err
19098 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19099 ac_header_compiler=yes
19100else
19101 echo "$as_me: failed program was:" >&5
19102sed 's/^/| /' conftest.$ac_ext >&5
19103
ca81d7a0 19104 ac_header_compiler=no
52dbaac8 19105fi
ca81d7a0
JD
19106
19107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19108{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19109echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19110
19111# Is the header present?
ca81d7a0
JD
19112{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19113echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19114cat >conftest.$ac_ext <<_ACEOF
19115/* confdefs.h. */
19116_ACEOF
19117cat confdefs.h >>conftest.$ac_ext
19118cat >>conftest.$ac_ext <<_ACEOF
19119/* end confdefs.h. */
19120#include <$ac_header>
19121_ACEOF
ca81d7a0
JD
19122if { (ac_try="$ac_cpp conftest.$ac_ext"
19123case "(($ac_try" in
19124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19125 *) ac_try_echo=$ac_try;;
19126esac
19127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19128 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19129 ac_status=$?
19130 grep -v '^ *+' conftest.er1 >conftest.err
19131 rm -f conftest.er1
19132 cat conftest.err >&5
19133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19134 (exit $ac_status); } >/dev/null && {
19135 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19136 test ! -s conftest.err
19137 }; then
52dbaac8
PE
19138 ac_header_preproc=yes
19139else
19140 echo "$as_me: failed program was:" >&5
19141sed 's/^/| /' conftest.$ac_ext >&5
19142
19143 ac_header_preproc=no
19144fi
ca81d7a0 19145
52dbaac8 19146rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19147{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19148echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19149
19150# So? What about this header?
19151case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19152 yes:no: )
19153 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19154echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19155 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19156echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19157 ac_header_preproc=yes
19158 ;;
19159 no:yes:* )
19160 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19161echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19162 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19163echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19164 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19165echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19166 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19167echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19168 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19169echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19170 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19171echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19172
52dbaac8
PE
19173 ;;
19174esac
ca81d7a0
JD
19175{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19176echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19177if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
19179else
19180 eval "$as_ac_Header=\$ac_header_preproc"
19181fi
ca81d7a0
JD
19182ac_res=`eval echo '${'$as_ac_Header'}'`
19183 { echo "$as_me:$LINENO: result: $ac_res" >&5
19184echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19185
19186fi
19187if test `eval echo '${'$as_ac_Header'}'` = yes; then
19188 cat >>confdefs.h <<_ACEOF
19189#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19190_ACEOF
19191
19192else
19193 GETOPT_H=getopt.h
19194fi
19195
19196done
19197
19198 if test -z "$GETOPT_H"; then
19199
19200for ac_func in getopt_long_only
19201do
19202as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19203{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19204echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19205if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19206 echo $ECHO_N "(cached) $ECHO_C" >&6
19207else
19208 cat >conftest.$ac_ext <<_ACEOF
19209/* confdefs.h. */
19210_ACEOF
19211cat confdefs.h >>conftest.$ac_ext
19212cat >>conftest.$ac_ext <<_ACEOF
19213/* end confdefs.h. */
19214/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19216#define $ac_func innocuous_$ac_func
19217
19218/* System header to define __stub macros and hopefully few prototypes,
19219 which can conflict with char $ac_func (); below.
19220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19221 <limits.h> exists even on freestanding compilers. */
19222
19223#ifdef __STDC__
19224# include <limits.h>
19225#else
19226# include <assert.h>
19227#endif
19228
19229#undef $ac_func
19230
ca81d7a0
JD
19231/* Override any GCC internal prototype to avoid an error.
19232 Use char because int might match the return type of a GCC
19233 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19234#ifdef __cplusplus
19235extern "C"
52dbaac8 19236#endif
52dbaac8
PE
19237char $ac_func ();
19238/* The GNU C library defines this for functions which it implements
19239 to always fail with ENOSYS. Some functions are actually named
19240 something starting with __ and the normal name is an alias. */
ca81d7a0 19241#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19242choke me
52dbaac8
PE
19243#endif
19244
19245int
19246main ()
19247{
ca81d7a0 19248return $ac_func ();
52dbaac8
PE
19249 ;
19250 return 0;
19251}
19252_ACEOF
19253rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19254if { (ac_try="$ac_link"
19255case "(($ac_try" in
19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19257 *) ac_try_echo=$ac_try;;
19258esac
19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19260 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19261 ac_status=$?
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19266 (exit $ac_status); } && {
19267 test -z "$ac_c_werror_flag" ||
19268 test ! -s conftest.err
19269 } && test -s conftest$ac_exeext &&
19270 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19271 eval "$as_ac_var=yes"
19272else
19273 echo "$as_me: failed program was:" >&5
19274sed 's/^/| /' conftest.$ac_ext >&5
19275
ca81d7a0 19276 eval "$as_ac_var=no"
52dbaac8 19277fi
ca81d7a0 19278
f053c89f 19279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19280 conftest$ac_exeext conftest.$ac_ext
19281fi
ca81d7a0
JD
19282ac_res=`eval echo '${'$as_ac_var'}'`
19283 { echo "$as_me:$LINENO: result: $ac_res" >&5
19284echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19285if test `eval echo '${'$as_ac_var'}'` = yes; then
19286 cat >>confdefs.h <<_ACEOF
19287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19288_ACEOF
19289
19290else
19291 GETOPT_H=getopt.h
19292fi
19293done
19294
19295 fi
19296
19297 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19298 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19299echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19300if test "${ac_cv_have_decl_optreset+set}" = set; then
19301 echo $ECHO_N "(cached) $ECHO_C" >&6
19302else
19303 cat >conftest.$ac_ext <<_ACEOF
19304/* confdefs.h. */
19305_ACEOF
19306cat confdefs.h >>conftest.$ac_ext
19307cat >>conftest.$ac_ext <<_ACEOF
19308/* end confdefs.h. */
19309#include <getopt.h>
19310
19311int
19312main ()
19313{
19314#ifndef optreset
f053c89f 19315 (void) optreset;
52dbaac8
PE
19316#endif
19317
19318 ;
19319 return 0;
19320}
19321_ACEOF
19322rm -f conftest.$ac_objext
ca81d7a0
JD
19323if { (ac_try="$ac_compile"
19324case "(($ac_try" in
19325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326 *) ac_try_echo=$ac_try;;
19327esac
19328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19329 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19330 ac_status=$?
19331 grep -v '^ *+' conftest.er1 >conftest.err
19332 rm -f conftest.er1
19333 cat conftest.err >&5
19334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19335 (exit $ac_status); } && {
19336 test -z "$ac_c_werror_flag" ||
19337 test ! -s conftest.err
19338 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19339 ac_cv_have_decl_optreset=yes
19340else
19341 echo "$as_me: failed program was:" >&5
19342sed 's/^/| /' conftest.$ac_ext >&5
19343
ca81d7a0 19344 ac_cv_have_decl_optreset=no
52dbaac8 19345fi
ca81d7a0
JD
19346
19347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19348fi
ca81d7a0
JD
19349{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19350echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19351if test $ac_cv_have_decl_optreset = yes; then
19352 GETOPT_H=getopt.h
19353fi
19354
19355 fi
19356
19357 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19358 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19359echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19360if test "${gl_cv_func_gnu_getopt+set}" = set; then
19361 echo $ECHO_N "(cached) $ECHO_C" >&6
19362else
19363 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19364 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19365echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19366if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19367 echo $ECHO_N "(cached) $ECHO_C" >&6
19368else
19369 cat >conftest.$ac_ext <<_ACEOF
19370/* confdefs.h. */
19371_ACEOF
19372cat confdefs.h >>conftest.$ac_ext
19373cat >>conftest.$ac_ext <<_ACEOF
19374/* end confdefs.h. */
19375#include <getopt.h>
19376
19377int
19378main ()
19379{
19380#ifndef getopt_clip
f053c89f 19381 (void) getopt_clip;
52dbaac8
PE
19382#endif
19383
19384 ;
19385 return 0;
19386}
19387_ACEOF
19388rm -f conftest.$ac_objext
ca81d7a0
JD
19389if { (ac_try="$ac_compile"
19390case "(($ac_try" in
19391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19392 *) ac_try_echo=$ac_try;;
19393esac
19394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19395 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19396 ac_status=$?
19397 grep -v '^ *+' conftest.er1 >conftest.err
19398 rm -f conftest.er1
19399 cat conftest.err >&5
19400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19401 (exit $ac_status); } && {
19402 test -z "$ac_c_werror_flag" ||
19403 test ! -s conftest.err
19404 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19405 ac_cv_have_decl_getopt_clip=yes
19406else
19407 echo "$as_me: failed program was:" >&5
19408sed 's/^/| /' conftest.$ac_ext >&5
19409
ca81d7a0 19410 ac_cv_have_decl_getopt_clip=no
52dbaac8 19411fi
ca81d7a0
JD
19412
19413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19414fi
ca81d7a0
JD
19415{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19416echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19417if test $ac_cv_have_decl_getopt_clip = yes; then
19418 gl_cv_func_gnu_getopt=no
19419else
19420 gl_cv_func_gnu_getopt=yes
19421fi
19422
19423else
19424 cat >conftest.$ac_ext <<_ACEOF
19425/* confdefs.h. */
19426_ACEOF
19427cat confdefs.h >>conftest.$ac_ext
19428cat >>conftest.$ac_ext <<_ACEOF
19429/* end confdefs.h. */
19430#include <getopt.h>
19431int
19432main ()
19433{
19434
19435 char *myargv[3];
19436 myargv[0] = "conftest";
19437 myargv[1] = "-+";
19438 myargv[2] = 0;
19439 return getopt (2, myargv, "+a") != '?';
19440
19441 ;
19442 return 0;
19443}
19444_ACEOF
19445rm -f conftest$ac_exeext
ca81d7a0
JD
19446if { (ac_try="$ac_link"
19447case "(($ac_try" in
19448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19449 *) ac_try_echo=$ac_try;;
19450esac
19451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19452 (eval "$ac_link") 2>&5
52dbaac8
PE
19453 ac_status=$?
19454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19456 { (case "(($ac_try" in
19457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19458 *) ac_try_echo=$ac_try;;
19459esac
19460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19461 (eval "$ac_try") 2>&5
52dbaac8
PE
19462 ac_status=$?
19463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19464 (exit $ac_status); }; }; then
19465 gl_cv_func_gnu_getopt=yes
19466else
19467 echo "$as_me: program exited with status $ac_status" >&5
19468echo "$as_me: failed program was:" >&5
19469sed 's/^/| /' conftest.$ac_ext >&5
19470
19471( exit $ac_status )
19472gl_cv_func_gnu_getopt=no
19473fi
ca81d7a0 19474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19475fi
ca81d7a0
JD
19476
19477
52dbaac8 19478fi
ca81d7a0
JD
19479{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19480echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19481 if test "$gl_cv_func_gnu_getopt" = "no"; then
19482 GETOPT_H=getopt.h
19483 fi
19484 fi
19485
19486
19487
19488 if test -n "$GETOPT_H"; then
19489
19490
19491 GETOPT_H=getopt.h
19492
19493cat >>confdefs.h <<\_ACEOF
19494#define __GETOPT_PREFIX rpl_
19495_ACEOF
19496
19497
19498
19499 :
19500 GETOPTOBJS='getopt.o getopt1.o'
19501
19502fi
19503
19504
19505
19506
ca81d7a0
JD
19507{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19508echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19509if test "${ac_cv_func_getpgrp_void+set}" = set; then
19510 echo $ECHO_N "(cached) $ECHO_C" >&6
19511else
19512 # Use it with a single arg.
19513cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19514/* confdefs.h. */
19515_ACEOF
19516cat confdefs.h >>conftest.$ac_ext
19517cat >>conftest.$ac_ext <<_ACEOF
19518/* end confdefs.h. */
cd958eb3
MB
19519$ac_includes_default
19520int
19521main ()
19522{
19523getpgrp (0);
19524 ;
19525 return 0;
19526}
19527_ACEOF
19528rm -f conftest.$ac_objext
ca81d7a0
JD
19529if { (ac_try="$ac_compile"
19530case "(($ac_try" in
19531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19532 *) ac_try_echo=$ac_try;;
19533esac
19534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19535 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19536 ac_status=$?
edfaf76d
LK
19537 grep -v '^ *+' conftest.er1 >conftest.err
19538 rm -f conftest.er1
19539 cat conftest.err >&5
cd958eb3 19540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19541 (exit $ac_status); } && {
19542 test -z "$ac_c_werror_flag" ||
19543 test ! -s conftest.err
19544 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19545 ac_cv_func_getpgrp_void=no
19546else
19547 echo "$as_me: failed program was:" >&5
19650fd6
AS
19548sed 's/^/| /' conftest.$ac_ext >&5
19549
ca81d7a0 19550 ac_cv_func_getpgrp_void=yes
cd958eb3 19551fi
ca81d7a0
JD
19552
19553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19554
19555fi
ca81d7a0
JD
19556{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19557echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19558if test $ac_cv_func_getpgrp_void = yes; then
19559
19560cat >>confdefs.h <<\_ACEOF
19561#define GETPGRP_VOID 1
19562_ACEOF
19563
19564fi
19565
19566
973a76b1
DL
19567
19568for ac_func in strftime
19569do
19570as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19571{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19572echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19573if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19574 echo $ECHO_N "(cached) $ECHO_C" >&6
19575else
19576 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19577/* confdefs.h. */
19578_ACEOF
19579cat confdefs.h >>conftest.$ac_ext
19580cat >>conftest.$ac_ext <<_ACEOF
19581/* end confdefs.h. */
edfaf76d
LK
19582/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19583 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19584#define $ac_func innocuous_$ac_func
19585
973a76b1 19586/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19587 which can conflict with char $ac_func (); below.
19588 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19589 <limits.h> exists even on freestanding compilers. */
edfaf76d 19590
19650fd6
AS
19591#ifdef __STDC__
19592# include <limits.h>
19593#else
19594# include <assert.h>
19595#endif
edfaf76d
LK
19596
19597#undef $ac_func
19598
ca81d7a0
JD
19599/* Override any GCC internal prototype to avoid an error.
19600 Use char because int might match the return type of a GCC
19601 builtin and then its argument prototype would still apply. */
973a76b1
DL
19602#ifdef __cplusplus
19603extern "C"
973a76b1 19604#endif
973a76b1
DL
19605char $ac_func ();
19606/* The GNU C library defines this for functions which it implements
19607 to always fail with ENOSYS. Some functions are actually named
19608 something starting with __ and the normal name is an alias. */
ca81d7a0 19609#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19610choke me
973a76b1
DL
19611#endif
19612
19650fd6
AS
19613int
19614main ()
19615{
ca81d7a0 19616return $ac_func ();
973a76b1
DL
19617 ;
19618 return 0;
19619}
19620_ACEOF
19621rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19622if { (ac_try="$ac_link"
19623case "(($ac_try" in
19624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19625 *) ac_try_echo=$ac_try;;
19626esac
19627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19628 (eval "$ac_link") 2>conftest.er1
973a76b1 19629 ac_status=$?
edfaf76d
LK
19630 grep -v '^ *+' conftest.er1 >conftest.err
19631 rm -f conftest.er1
19632 cat conftest.err >&5
973a76b1 19633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19634 (exit $ac_status); } && {
19635 test -z "$ac_c_werror_flag" ||
19636 test ! -s conftest.err
19637 } && test -s conftest$ac_exeext &&
19638 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19639 eval "$as_ac_var=yes"
19640else
19641 echo "$as_me: failed program was:" >&5
19650fd6
AS
19642sed 's/^/| /' conftest.$ac_ext >&5
19643
ca81d7a0 19644 eval "$as_ac_var=no"
973a76b1 19645fi
ca81d7a0 19646
f053c89f 19647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19648 conftest$ac_exeext conftest.$ac_ext
973a76b1 19649fi
ca81d7a0
JD
19650ac_res=`eval echo '${'$as_ac_var'}'`
19651 { echo "$as_me:$LINENO: result: $ac_res" >&5
19652echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19653if test `eval echo '${'$as_ac_var'}'` = yes; then
19654 cat >>confdefs.h <<_ACEOF
19655#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19656_ACEOF
19657
19658else
19659 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19660{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19661echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19662if test "${ac_cv_lib_intl_strftime+set}" = set; then
19663 echo $ECHO_N "(cached) $ECHO_C" >&6
19664else
19665 ac_check_lib_save_LIBS=$LIBS
19666LIBS="-lintl $LIBS"
19667cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19668/* confdefs.h. */
19669_ACEOF
19670cat confdefs.h >>conftest.$ac_ext
19671cat >>conftest.$ac_ext <<_ACEOF
19672/* end confdefs.h. */
973a76b1 19673
ca81d7a0
JD
19674/* Override any GCC internal prototype to avoid an error.
19675 Use char because int might match the return type of a GCC
19676 builtin and then its argument prototype would still apply. */
973a76b1
DL
19677#ifdef __cplusplus
19678extern "C"
19679#endif
973a76b1
DL
19680char strftime ();
19681int
19682main ()
19683{
ca81d7a0 19684return strftime ();
973a76b1
DL
19685 ;
19686 return 0;
19687}
19688_ACEOF
19689rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19690if { (ac_try="$ac_link"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
19695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19696 (eval "$ac_link") 2>conftest.er1
973a76b1 19697 ac_status=$?
edfaf76d
LK
19698 grep -v '^ *+' conftest.er1 >conftest.err
19699 rm -f conftest.er1
19700 cat conftest.err >&5
973a76b1 19701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19702 (exit $ac_status); } && {
19703 test -z "$ac_c_werror_flag" ||
19704 test ! -s conftest.err
19705 } && test -s conftest$ac_exeext &&
19706 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19707 ac_cv_lib_intl_strftime=yes
19708else
19709 echo "$as_me: failed program was:" >&5
19650fd6
AS
19710sed 's/^/| /' conftest.$ac_ext >&5
19711
ca81d7a0 19712 ac_cv_lib_intl_strftime=no
973a76b1 19713fi
ca81d7a0 19714
f053c89f 19715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19716 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19717LIBS=$ac_check_lib_save_LIBS
19718fi
ca81d7a0
JD
19719{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19720echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19721if test $ac_cv_lib_intl_strftime = yes; then
19722 cat >>confdefs.h <<\_ACEOF
19723#define HAVE_STRFTIME 1
19724_ACEOF
19725
19726LIBS="-lintl $LIBS"
19727fi
19728
19729fi
19730done
19731
19732
b936fae4
AS
19733# UNIX98 PTYs.
19734
19735for ac_func in grantpt
503d2be0
AS
19736do
19737as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19738{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19739echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19740if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19741 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19742else
503d2be0 19743 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19744/* confdefs.h. */
19745_ACEOF
19746cat confdefs.h >>conftest.$ac_ext
19747cat >>conftest.$ac_ext <<_ACEOF
19748/* end confdefs.h. */
edfaf76d
LK
19749/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19750 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19751#define $ac_func innocuous_$ac_func
19752
503d2be0 19753/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19754 which can conflict with char $ac_func (); below.
19755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19756 <limits.h> exists even on freestanding compilers. */
edfaf76d 19757
19650fd6
AS
19758#ifdef __STDC__
19759# include <limits.h>
19760#else
19761# include <assert.h>
19762#endif
edfaf76d
LK
19763
19764#undef $ac_func
19765
ca81d7a0
JD
19766/* Override any GCC internal prototype to avoid an error.
19767 Use char because int might match the return type of a GCC
19768 builtin and then its argument prototype would still apply. */
503d2be0
AS
19769#ifdef __cplusplus
19770extern "C"
19771#endif
503d2be0 19772char $ac_func ();
503d2be0
AS
19773/* The GNU C library defines this for functions which it implements
19774 to always fail with ENOSYS. Some functions are actually named
19775 something starting with __ and the normal name is an alias. */
ca81d7a0 19776#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19777choke me
503d2be0 19778#endif
4c343001 19779
19650fd6
AS
19780int
19781main ()
19782{
ca81d7a0 19783return $ac_func ();
503d2be0
AS
19784 ;
19785 return 0;
19786}
19787_ACEOF
19788rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19789if { (ac_try="$ac_link"
19790case "(($ac_try" in
19791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19792 *) ac_try_echo=$ac_try;;
19793esac
19794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19795 (eval "$ac_link") 2>conftest.er1
503d2be0 19796 ac_status=$?
edfaf76d
LK
19797 grep -v '^ *+' conftest.er1 >conftest.err
19798 rm -f conftest.er1
19799 cat conftest.err >&5
c0d27fcc 19800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19801 (exit $ac_status); } && {
19802 test -z "$ac_c_werror_flag" ||
19803 test ! -s conftest.err
19804 } && test -s conftest$ac_exeext &&
19805 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19806 eval "$as_ac_var=yes"
19807else
19808 echo "$as_me: failed program was:" >&5
19650fd6
AS
19809sed 's/^/| /' conftest.$ac_ext >&5
19810
ca81d7a0 19811 eval "$as_ac_var=no"
503d2be0 19812fi
ca81d7a0 19813
f053c89f 19814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19815 conftest$ac_exeext conftest.$ac_ext
503d2be0 19816fi
ca81d7a0
JD
19817ac_res=`eval echo '${'$as_ac_var'}'`
19818 { echo "$as_me:$LINENO: result: $ac_res" >&5
19819echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19820if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19821 cat >>confdefs.h <<_ACEOF
503d2be0 19822#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19823_ACEOF
4c343001
DL
19824
19825fi
503d2be0
AS
19826done
19827
c0d27fcc 19828
b936fae4 19829# PTY-related GNU extensions.
4c343001 19830
b936fae4
AS
19831for ac_func in getpt
19832do
19833as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19834{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19835echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19836if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19837 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19838else
b936fae4 19839 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19840/* confdefs.h. */
19841_ACEOF
19842cat confdefs.h >>conftest.$ac_ext
19843cat >>conftest.$ac_ext <<_ACEOF
19844/* end confdefs.h. */
edfaf76d
LK
19845/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19846 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19847#define $ac_func innocuous_$ac_func
19848
087121cc 19849/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19850 which can conflict with char $ac_func (); below.
19851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19852 <limits.h> exists even on freestanding compilers. */
edfaf76d 19853
19650fd6
AS
19854#ifdef __STDC__
19855# include <limits.h>
19856#else
19857# include <assert.h>
19858#endif
edfaf76d
LK
19859
19860#undef $ac_func
19861
ca81d7a0
JD
19862/* Override any GCC internal prototype to avoid an error.
19863 Use char because int might match the return type of a GCC
19864 builtin and then its argument prototype would still apply. */
503d2be0
AS
19865#ifdef __cplusplus
19866extern "C"
19867#endif
503d2be0 19868char $ac_func ();
087121cc
GM
19869/* The GNU C library defines this for functions which it implements
19870 to always fail with ENOSYS. Some functions are actually named
19871 something starting with __ and the normal name is an alias. */
ca81d7a0 19872#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19873choke me
087121cc
GM
19874#endif
19875
19650fd6
AS
19876int
19877main ()
19878{
ca81d7a0 19879return $ac_func ();
503d2be0
AS
19880 ;
19881 return 0;
19882}
19883_ACEOF
19884rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19885if { (ac_try="$ac_link"
19886case "(($ac_try" in
19887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19888 *) ac_try_echo=$ac_try;;
19889esac
19890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19891 (eval "$ac_link") 2>conftest.er1
503d2be0 19892 ac_status=$?
edfaf76d
LK
19893 grep -v '^ *+' conftest.er1 >conftest.err
19894 rm -f conftest.er1
19895 cat conftest.err >&5
c0d27fcc 19896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19897 (exit $ac_status); } && {
19898 test -z "$ac_c_werror_flag" ||
19899 test ! -s conftest.err
19900 } && test -s conftest$ac_exeext &&
19901 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19902 eval "$as_ac_var=yes"
19903else
19904 echo "$as_me: failed program was:" >&5
19650fd6
AS
19905sed 's/^/| /' conftest.$ac_ext >&5
19906
ca81d7a0 19907 eval "$as_ac_var=no"
503d2be0 19908fi
ca81d7a0 19909
f053c89f 19910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19911 conftest$ac_exeext conftest.$ac_ext
503d2be0 19912fi
ca81d7a0
JD
19913ac_res=`eval echo '${'$as_ac_var'}'`
19914 { echo "$as_me:$LINENO: result: $ac_res" >&5
19915echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19916if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19917 cat >>confdefs.h <<_ACEOF
503d2be0 19918#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19919_ACEOF
087121cc 19920
087121cc
GM
19921fi
19922done
19923
c0d27fcc 19924
ba4481b5
DL
19925# Check this now, so that we will NOT find the above functions in ncurses.
19926# That is because we have not set up to link ncurses in lib-src.
19927# It's better to believe a function is not available
19928# than to expect to find it in ncurses.
503d2be0 19929
ca81d7a0
JD
19930{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19931echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19932if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19933 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19934else
503d2be0 19935 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19936LIBS="-lncurses $LIBS"
503d2be0 19937cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19938/* confdefs.h. */
19939_ACEOF
19940cat confdefs.h >>conftest.$ac_ext
19941cat >>conftest.$ac_ext <<_ACEOF
19942/* end confdefs.h. */
503d2be0 19943
ca81d7a0
JD
19944/* Override any GCC internal prototype to avoid an error.
19945 Use char because int might match the return type of a GCC
19946 builtin and then its argument prototype would still apply. */
503d2be0
AS
19947#ifdef __cplusplus
19948extern "C"
19949#endif
503d2be0
AS
19950char tparm ();
19951int
19952main ()
19953{
ca81d7a0 19954return tparm ();
503d2be0
AS
19955 ;
19956 return 0;
19957}
19958_ACEOF
19959rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19960if { (ac_try="$ac_link"
19961case "(($ac_try" in
19962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19963 *) ac_try_echo=$ac_try;;
19964esac
19965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19966 (eval "$ac_link") 2>conftest.er1
503d2be0 19967 ac_status=$?
edfaf76d
LK
19968 grep -v '^ *+' conftest.er1 >conftest.err
19969 rm -f conftest.er1
19970 cat conftest.err >&5
c0d27fcc 19971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19972 (exit $ac_status); } && {
19973 test -z "$ac_c_werror_flag" ||
19974 test ! -s conftest.err
19975 } && test -s conftest$ac_exeext &&
19976 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19977 ac_cv_lib_ncurses_tparm=yes
19978else
19979 echo "$as_me: failed program was:" >&5
19650fd6
AS
19980sed 's/^/| /' conftest.$ac_ext >&5
19981
ca81d7a0 19982 ac_cv_lib_ncurses_tparm=no
503d2be0 19983fi
ca81d7a0 19984
f053c89f 19985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19986 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19987LIBS=$ac_check_lib_save_LIBS
19988fi
ca81d7a0
JD
19989{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19990echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19991if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19992 cat >>confdefs.h <<_ACEOF
503d2be0 19993#define HAVE_LIBNCURSES 1
c0d27fcc 19994_ACEOF
ba4481b5
DL
19995
19996 LIBS="-lncurses $LIBS"
19997
ba4481b5
DL
19998fi
19999
c0d27fcc 20000
bc3512d0
CY
20001# Do we have res_init, for detecting changes in /etc/resolv.conf?
20002
20003resolv=no
20004{ echo "$as_me:$LINENO: checking for res_init" >&5
20005echo $ECHO_N "checking for res_init... $ECHO_C" >&6; }
20006if test "${ac_cv_func_res_init+set}" = set; then
20007 echo $ECHO_N "(cached) $ECHO_C" >&6
20008else
20009 cat >conftest.$ac_ext <<_ACEOF
20010/* confdefs.h. */
20011_ACEOF
20012cat confdefs.h >>conftest.$ac_ext
20013cat >>conftest.$ac_ext <<_ACEOF
20014/* end confdefs.h. */
20015/* Define res_init to an innocuous variant, in case <limits.h> declares res_init.
20016 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20017#define res_init innocuous_res_init
20018
20019/* System header to define __stub macros and hopefully few prototypes,
20020 which can conflict with char res_init (); below.
20021 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20022 <limits.h> exists even on freestanding compilers. */
20023
20024#ifdef __STDC__
20025# include <limits.h>
20026#else
20027# include <assert.h>
20028#endif
20029
20030#undef res_init
20031
20032/* Override any GCC internal prototype to avoid an error.
20033 Use char because int might match the return type of a GCC
20034 builtin and then its argument prototype would still apply. */
20035#ifdef __cplusplus
20036extern "C"
20037#endif
20038char res_init ();
20039/* The GNU C library defines this for functions which it implements
20040 to always fail with ENOSYS. Some functions are actually named
20041 something starting with __ and the normal name is an alias. */
20042#if defined __stub_res_init || defined __stub___res_init
20043choke me
20044#endif
20045
20046int
20047main ()
20048{
20049return res_init ();
20050 ;
20051 return 0;
20052}
20053_ACEOF
20054rm -f conftest.$ac_objext conftest$ac_exeext
20055if { (ac_try="$ac_link"
20056case "(($ac_try" in
20057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20058 *) ac_try_echo=$ac_try;;
20059esac
20060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20061 (eval "$ac_link") 2>conftest.er1
20062 ac_status=$?
20063 grep -v '^ *+' conftest.er1 >conftest.err
20064 rm -f conftest.er1
20065 cat conftest.err >&5
20066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20067 (exit $ac_status); } && {
20068 test -z "$ac_c_werror_flag" ||
20069 test ! -s conftest.err
20070 } && test -s conftest$ac_exeext &&
20071 $as_test_x conftest$ac_exeext; then
20072 ac_cv_func_res_init=yes
20073else
20074 echo "$as_me: failed program was:" >&5
20075sed 's/^/| /' conftest.$ac_ext >&5
20076
20077 ac_cv_func_res_init=no
20078fi
20079
20080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20081 conftest$ac_exeext conftest.$ac_ext
20082fi
20083{ echo "$as_me:$LINENO: result: $ac_cv_func_res_init" >&5
20084echo "${ECHO_T}$ac_cv_func_res_init" >&6; }
20085if test $ac_cv_func_res_init = yes; then
20086 have_res_init=yes
20087else
20088 have_res_init=no
20089fi
20090
20091if test "$have_res_init" = no; then
20092 OLIBS="$LIBS"
20093 LIBS="$LIBS -lresolv"
20094 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
20095echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
20096 cat >conftest.$ac_ext <<_ACEOF
20097/* confdefs.h. */
20098_ACEOF
20099cat confdefs.h >>conftest.$ac_ext
20100cat >>conftest.$ac_ext <<_ACEOF
20101/* end confdefs.h. */
20102#include <netinet/in.h>
20103#include <arpa/nameser.h>
20104#include <resolv.h>
20105int
20106main ()
20107{
20108res_init();
20109 ;
20110 return 0;
20111}
20112_ACEOF
20113rm -f conftest.$ac_objext conftest$ac_exeext
20114if { (ac_try="$ac_link"
20115case "(($ac_try" in
20116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20117 *) ac_try_echo=$ac_try;;
20118esac
20119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20120 (eval "$ac_link") 2>conftest.er1
20121 ac_status=$?
20122 grep -v '^ *+' conftest.er1 >conftest.err
20123 rm -f conftest.er1
20124 cat conftest.err >&5
20125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20126 (exit $ac_status); } && {
20127 test -z "$ac_c_werror_flag" ||
20128 test ! -s conftest.err
20129 } && test -s conftest$ac_exeext &&
20130 $as_test_x conftest$ac_exeext; then
20131 have_res_init=yes
20132else
20133 echo "$as_me: failed program was:" >&5
20134sed 's/^/| /' conftest.$ac_ext >&5
20135
20136 have_res_init=no
20137fi
20138
20139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20140 conftest$ac_exeext conftest.$ac_ext
20141 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20142echo "${ECHO_T}$have_res_init" >&6; }
20143 if test "$have_res_init" = yes ; then
20144 resolv=yes
20145 fi
20146 LIBS="$OLIBS"
20147fi
20148
20149if test "$have_res_init" = yes; then
20150
20151cat >>confdefs.h <<\_ACEOF
20152#define HAVE_RES_INIT 1
20153_ACEOF
20154
20155fi
20156
84e70f78
KR
20157# Do we need the Hesiod library to provide the support routines?
20158if test "$with_hesiod" = yes ; then
20159 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
20160 { echo "$as_me:$LINENO: checking for res_send" >&5
20161echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
20162if test "${ac_cv_func_res_send+set}" = set; then
20163 echo $ECHO_N "(cached) $ECHO_C" >&6
20164else
20165 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20166/* confdefs.h. */
20167_ACEOF
20168cat confdefs.h >>conftest.$ac_ext
20169cat >>conftest.$ac_ext <<_ACEOF
20170/* end confdefs.h. */
edfaf76d
LK
20171/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20172 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20173#define res_send innocuous_res_send
20174
84e70f78 20175/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20176 which can conflict with char res_send (); below.
20177 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20178 <limits.h> exists even on freestanding compilers. */
edfaf76d 20179
19650fd6
AS
20180#ifdef __STDC__
20181# include <limits.h>
20182#else
20183# include <assert.h>
20184#endif
edfaf76d
LK
20185
20186#undef res_send
20187
ca81d7a0
JD
20188/* Override any GCC internal prototype to avoid an error.
20189 Use char because int might match the return type of a GCC
20190 builtin and then its argument prototype would still apply. */
84e70f78
KR
20191#ifdef __cplusplus
20192extern "C"
20193#endif
84e70f78 20194char res_send ();
84e70f78
KR
20195/* The GNU C library defines this for functions which it implements
20196 to always fail with ENOSYS. Some functions are actually named
20197 something starting with __ and the normal name is an alias. */
ca81d7a0 20198#if defined __stub_res_send || defined __stub___res_send
84e70f78 20199choke me
cd958eb3
MB
20200#endif
20201
19650fd6
AS
20202int
20203main ()
20204{
ca81d7a0 20205return res_send ();
84e70f78
KR
20206 ;
20207 return 0;
20208}
20209_ACEOF
20210rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20211if { (ac_try="$ac_link"
20212case "(($ac_try" in
20213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20214 *) ac_try_echo=$ac_try;;
20215esac
20216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20217 (eval "$ac_link") 2>conftest.er1
84e70f78 20218 ac_status=$?
edfaf76d
LK
20219 grep -v '^ *+' conftest.er1 >conftest.err
20220 rm -f conftest.er1
20221 cat conftest.err >&5
c0d27fcc 20222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20223 (exit $ac_status); } && {
20224 test -z "$ac_c_werror_flag" ||
20225 test ! -s conftest.err
20226 } && test -s conftest$ac_exeext &&
20227 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20228 ac_cv_func_res_send=yes
20229else
20230 echo "$as_me: failed program was:" >&5
19650fd6
AS
20231sed 's/^/| /' conftest.$ac_ext >&5
20232
ca81d7a0 20233 ac_cv_func_res_send=no
84e70f78 20234fi
ca81d7a0 20235
f053c89f 20236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20237 conftest$ac_exeext conftest.$ac_ext
84e70f78 20238fi
ca81d7a0
JD
20239{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20240echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20241if test $ac_cv_func_res_send = yes; then
20242 :
20243else
ca81d7a0
JD
20244 { echo "$as_me:$LINENO: checking for __res_send" >&5
20245echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20246if test "${ac_cv_func___res_send+set}" = set; then
20247 echo $ECHO_N "(cached) $ECHO_C" >&6
20248else
20249 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20250/* confdefs.h. */
20251_ACEOF
20252cat confdefs.h >>conftest.$ac_ext
20253cat >>conftest.$ac_ext <<_ACEOF
20254/* end confdefs.h. */
edfaf76d
LK
20255/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20256 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20257#define __res_send innocuous___res_send
20258
84e70f78 20259/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20260 which can conflict with char __res_send (); below.
20261 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20262 <limits.h> exists even on freestanding compilers. */
edfaf76d 20263
19650fd6
AS
20264#ifdef __STDC__
20265# include <limits.h>
20266#else
20267# include <assert.h>
20268#endif
edfaf76d
LK
20269
20270#undef __res_send
20271
ca81d7a0
JD
20272/* Override any GCC internal prototype to avoid an error.
20273 Use char because int might match the return type of a GCC
20274 builtin and then its argument prototype would still apply. */
84e70f78
KR
20275#ifdef __cplusplus
20276extern "C"
20277#endif
84e70f78 20278char __res_send ();
84e70f78
KR
20279/* The GNU C library defines this for functions which it implements
20280 to always fail with ENOSYS. Some functions are actually named
20281 something starting with __ and the normal name is an alias. */
ca81d7a0 20282#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20283choke me
84e70f78
KR
20284#endif
20285
19650fd6
AS
20286int
20287main ()
20288{
ca81d7a0 20289return __res_send ();
84e70f78
KR
20290 ;
20291 return 0;
20292}
20293_ACEOF
20294rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20295if { (ac_try="$ac_link"
20296case "(($ac_try" in
20297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20298 *) ac_try_echo=$ac_try;;
20299esac
20300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20301 (eval "$ac_link") 2>conftest.er1
84e70f78 20302 ac_status=$?
edfaf76d
LK
20303 grep -v '^ *+' conftest.er1 >conftest.err
20304 rm -f conftest.er1
20305 cat conftest.err >&5
c0d27fcc 20306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20307 (exit $ac_status); } && {
20308 test -z "$ac_c_werror_flag" ||
20309 test ! -s conftest.err
20310 } && test -s conftest$ac_exeext &&
20311 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20312 ac_cv_func___res_send=yes
20313else
20314 echo "$as_me: failed program was:" >&5
19650fd6
AS
20315sed 's/^/| /' conftest.$ac_ext >&5
20316
ca81d7a0 20317 ac_cv_func___res_send=no
84e70f78 20318fi
ca81d7a0 20319
f053c89f 20320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20321 conftest$ac_exeext conftest.$ac_ext
84e70f78 20322fi
ca81d7a0
JD
20323{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20324echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20325if test $ac_cv_func___res_send = yes; then
20326 :
20327else
ca81d7a0
JD
20328 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20329echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20330if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20331 echo $ECHO_N "(cached) $ECHO_C" >&6
20332else
20333 ac_check_lib_save_LIBS=$LIBS
20334LIBS="-lresolv $LIBS"
20335cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20336/* confdefs.h. */
20337_ACEOF
20338cat confdefs.h >>conftest.$ac_ext
20339cat >>conftest.$ac_ext <<_ACEOF
20340/* end confdefs.h. */
84e70f78 20341
ca81d7a0
JD
20342/* Override any GCC internal prototype to avoid an error.
20343 Use char because int might match the return type of a GCC
20344 builtin and then its argument prototype would still apply. */
84e70f78
KR
20345#ifdef __cplusplus
20346extern "C"
20347#endif
84e70f78
KR
20348char res_send ();
20349int
20350main ()
20351{
ca81d7a0 20352return res_send ();
84e70f78
KR
20353 ;
20354 return 0;
20355}
20356_ACEOF
20357rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20358if { (ac_try="$ac_link"
20359case "(($ac_try" in
20360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361 *) ac_try_echo=$ac_try;;
20362esac
20363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20364 (eval "$ac_link") 2>conftest.er1
84e70f78 20365 ac_status=$?
edfaf76d
LK
20366 grep -v '^ *+' conftest.er1 >conftest.err
20367 rm -f conftest.er1
20368 cat conftest.err >&5
c0d27fcc 20369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20370 (exit $ac_status); } && {
20371 test -z "$ac_c_werror_flag" ||
20372 test ! -s conftest.err
20373 } && test -s conftest$ac_exeext &&
20374 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20375 ac_cv_lib_resolv_res_send=yes
20376else
20377 echo "$as_me: failed program was:" >&5
19650fd6
AS
20378sed 's/^/| /' conftest.$ac_ext >&5
20379
ca81d7a0 20380 ac_cv_lib_resolv_res_send=no
84e70f78 20381fi
ca81d7a0 20382
f053c89f 20383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20384 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20385LIBS=$ac_check_lib_save_LIBS
20386fi
ca81d7a0
JD
20387{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20388echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20389if test $ac_cv_lib_resolv_res_send = yes; then
20390 resolv=yes
20391else
ca81d7a0
JD
20392 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20393echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20394if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20395 echo $ECHO_N "(cached) $ECHO_C" >&6
20396else
20397 ac_check_lib_save_LIBS=$LIBS
20398LIBS="-lresolv $LIBS"
20399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20400/* confdefs.h. */
20401_ACEOF
20402cat confdefs.h >>conftest.$ac_ext
20403cat >>conftest.$ac_ext <<_ACEOF
20404/* end confdefs.h. */
84e70f78 20405
ca81d7a0
JD
20406/* Override any GCC internal prototype to avoid an error.
20407 Use char because int might match the return type of a GCC
20408 builtin and then its argument prototype would still apply. */
84e70f78
KR
20409#ifdef __cplusplus
20410extern "C"
20411#endif
84e70f78
KR
20412char __res_send ();
20413int
20414main ()
20415{
ca81d7a0 20416return __res_send ();
84e70f78
KR
20417 ;
20418 return 0;
20419}
20420_ACEOF
20421rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20422if { (ac_try="$ac_link"
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_link") 2>conftest.er1
84e70f78 20429 ac_status=$?
edfaf76d
LK
20430 grep -v '^ *+' conftest.er1 >conftest.err
20431 rm -f conftest.er1
20432 cat conftest.err >&5
c0d27fcc 20433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20434 (exit $ac_status); } && {
20435 test -z "$ac_c_werror_flag" ||
20436 test ! -s conftest.err
20437 } && test -s conftest$ac_exeext &&
20438 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20439 ac_cv_lib_resolv___res_send=yes
20440else
20441 echo "$as_me: failed program was:" >&5
19650fd6
AS
20442sed 's/^/| /' conftest.$ac_ext >&5
20443
ca81d7a0 20444 ac_cv_lib_resolv___res_send=no
84e70f78 20445fi
ca81d7a0 20446
f053c89f 20447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20448 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20449LIBS=$ac_check_lib_save_LIBS
20450fi
ca81d7a0
JD
20451{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20452echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20453if test $ac_cv_lib_resolv___res_send = yes; then
20454 resolv=yes
20455fi
20456
20457fi
20458
20459fi
20460
20461fi
20462
20463 if test "$resolv" = yes ; then
20464 RESOLVLIB=-lresolv
84e70f78
KR
20465 else
20466 RESOLVLIB=
20467 fi
ca81d7a0
JD
20468 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20469echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20470if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20471 echo $ECHO_N "(cached) $ECHO_C" >&6
20472else
20473 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20474/* confdefs.h. */
20475_ACEOF
20476cat confdefs.h >>conftest.$ac_ext
20477cat >>conftest.$ac_ext <<_ACEOF
20478/* end confdefs.h. */
edfaf76d
LK
20479/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20481#define hes_getmailhost innocuous_hes_getmailhost
20482
84e70f78 20483/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20484 which can conflict with char hes_getmailhost (); below.
20485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20486 <limits.h> exists even on freestanding compilers. */
edfaf76d 20487
19650fd6
AS
20488#ifdef __STDC__
20489# include <limits.h>
20490#else
20491# include <assert.h>
20492#endif
edfaf76d
LK
20493
20494#undef hes_getmailhost
20495
ca81d7a0
JD
20496/* Override any GCC internal prototype to avoid an error.
20497 Use char because int might match the return type of a GCC
20498 builtin and then its argument prototype would still apply. */
84e70f78
KR
20499#ifdef __cplusplus
20500extern "C"
20501#endif
84e70f78 20502char hes_getmailhost ();
84e70f78
KR
20503/* The GNU C library defines this for functions which it implements
20504 to always fail with ENOSYS. Some functions are actually named
20505 something starting with __ and the normal name is an alias. */
ca81d7a0 20506#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20507choke me
cd958eb3
MB
20508#endif
20509
19650fd6
AS
20510int
20511main ()
20512{
ca81d7a0 20513return hes_getmailhost ();
84e70f78
KR
20514 ;
20515 return 0;
20516}
20517_ACEOF
20518rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20519if { (ac_try="$ac_link"
20520case "(($ac_try" in
20521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20522 *) ac_try_echo=$ac_try;;
20523esac
20524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20525 (eval "$ac_link") 2>conftest.er1
84e70f78 20526 ac_status=$?
edfaf76d
LK
20527 grep -v '^ *+' conftest.er1 >conftest.err
20528 rm -f conftest.er1
20529 cat conftest.err >&5
c0d27fcc 20530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20531 (exit $ac_status); } && {
20532 test -z "$ac_c_werror_flag" ||
20533 test ! -s conftest.err
20534 } && test -s conftest$ac_exeext &&
20535 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20536 ac_cv_func_hes_getmailhost=yes
20537else
20538 echo "$as_me: failed program was:" >&5
19650fd6
AS
20539sed 's/^/| /' conftest.$ac_ext >&5
20540
ca81d7a0 20541 ac_cv_func_hes_getmailhost=no
84e70f78 20542fi
ca81d7a0 20543
f053c89f 20544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20545 conftest$ac_exeext conftest.$ac_ext
84e70f78 20546fi
ca81d7a0
JD
20547{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20548echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20549if test $ac_cv_func_hes_getmailhost = yes; then
20550 :
20551else
ca81d7a0
JD
20552 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20553echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20554if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20555 echo $ECHO_N "(cached) $ECHO_C" >&6
20556else
20557 ac_check_lib_save_LIBS=$LIBS
20558LIBS="-lhesiod $RESOLVLIB $LIBS"
20559cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20560/* confdefs.h. */
20561_ACEOF
20562cat confdefs.h >>conftest.$ac_ext
20563cat >>conftest.$ac_ext <<_ACEOF
20564/* end confdefs.h. */
84e70f78 20565
ca81d7a0
JD
20566/* Override any GCC internal prototype to avoid an error.
20567 Use char because int might match the return type of a GCC
20568 builtin and then its argument prototype would still apply. */
84e70f78
KR
20569#ifdef __cplusplus
20570extern "C"
20571#endif
84e70f78
KR
20572char hes_getmailhost ();
20573int
20574main ()
20575{
ca81d7a0 20576return hes_getmailhost ();
84e70f78
KR
20577 ;
20578 return 0;
20579}
20580_ACEOF
20581rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20582if { (ac_try="$ac_link"
20583case "(($ac_try" in
20584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20585 *) ac_try_echo=$ac_try;;
20586esac
20587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20588 (eval "$ac_link") 2>conftest.er1
84e70f78 20589 ac_status=$?
edfaf76d
LK
20590 grep -v '^ *+' conftest.er1 >conftest.err
20591 rm -f conftest.er1
20592 cat conftest.err >&5
c0d27fcc 20593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20594 (exit $ac_status); } && {
20595 test -z "$ac_c_werror_flag" ||
20596 test ! -s conftest.err
20597 } && test -s conftest$ac_exeext &&
20598 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20599 ac_cv_lib_hesiod_hes_getmailhost=yes
20600else
20601 echo "$as_me: failed program was:" >&5
19650fd6
AS
20602sed 's/^/| /' conftest.$ac_ext >&5
20603
ca81d7a0 20604 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20605fi
ca81d7a0 20606
f053c89f 20607rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20608 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20609LIBS=$ac_check_lib_save_LIBS
20610fi
ca81d7a0
JD
20611{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20612echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20613if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20614
c0d27fcc 20615cat >>confdefs.h <<\_ACEOF
84e70f78 20616#define HAVE_LIBHESIOD 1
c0d27fcc 20617_ACEOF
84e70f78
KR
20618
20619else
20620 :
20621fi
20622
20623fi
20624
20625fi
20626
bc3512d0
CY
20627# Do we need libresolv (due to res_init or Hesiod)?
20628if test "$resolv" = yes ; then
20629
20630cat >>confdefs.h <<\_ACEOF
20631#define HAVE_LIBRESOLV 1
20632_ACEOF
20633
20634fi
20635
a21616bd
KR
20636# These tell us which Kerberos-related libraries to use.
20637if test "${with_kerberos+set}" = set; then
503d2be0 20638
ca81d7a0
JD
20639{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20640echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20641if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20642 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20643else
503d2be0 20644 ac_check_lib_save_LIBS=$LIBS
a21616bd 20645LIBS="-lcom_err $LIBS"
503d2be0 20646cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20647/* confdefs.h. */
20648_ACEOF
20649cat confdefs.h >>conftest.$ac_ext
20650cat >>conftest.$ac_ext <<_ACEOF
20651/* end confdefs.h. */
503d2be0 20652
ca81d7a0
JD
20653/* Override any GCC internal prototype to avoid an error.
20654 Use char because int might match the return type of a GCC
20655 builtin and then its argument prototype would still apply. */
503d2be0
AS
20656#ifdef __cplusplus
20657extern "C"
20658#endif
503d2be0
AS
20659char com_err ();
20660int
20661main ()
20662{
ca81d7a0 20663return com_err ();
503d2be0
AS
20664 ;
20665 return 0;
20666}
20667_ACEOF
20668rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20669if { (ac_try="$ac_link"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
20674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20675 (eval "$ac_link") 2>conftest.er1
503d2be0 20676 ac_status=$?
edfaf76d
LK
20677 grep -v '^ *+' conftest.er1 >conftest.err
20678 rm -f conftest.er1
20679 cat conftest.err >&5
c0d27fcc 20680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20681 (exit $ac_status); } && {
20682 test -z "$ac_c_werror_flag" ||
20683 test ! -s conftest.err
20684 } && test -s conftest$ac_exeext &&
20685 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20686 ac_cv_lib_com_err_com_err=yes
20687else
20688 echo "$as_me: failed program was:" >&5
19650fd6
AS
20689sed 's/^/| /' conftest.$ac_ext >&5
20690
ca81d7a0 20691 ac_cv_lib_com_err_com_err=no
503d2be0 20692fi
ca81d7a0 20693
f053c89f 20694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20695 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20696LIBS=$ac_check_lib_save_LIBS
20697fi
ca81d7a0
JD
20698{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20699echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20700if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20701 cat >>confdefs.h <<_ACEOF
503d2be0 20702#define HAVE_LIBCOM_ERR 1
c0d27fcc 20703_ACEOF
a21616bd
KR
20704
20705 LIBS="-lcom_err $LIBS"
20706
a21616bd
KR
20707fi
20708
c0d27fcc 20709
ca81d7a0
JD
20710{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20711echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20712if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20713 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20714else
503d2be0 20715 ac_check_lib_save_LIBS=$LIBS
a21616bd 20716LIBS="-lk5crypto $LIBS"
503d2be0 20717cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20718/* confdefs.h. */
20719_ACEOF
20720cat confdefs.h >>conftest.$ac_ext
20721cat >>conftest.$ac_ext <<_ACEOF
20722/* end confdefs.h. */
503d2be0 20723
ca81d7a0
JD
20724/* Override any GCC internal prototype to avoid an error.
20725 Use char because int might match the return type of a GCC
20726 builtin and then its argument prototype would still apply. */
503d2be0
AS
20727#ifdef __cplusplus
20728extern "C"
20729#endif
503d2be0
AS
20730char mit_des_cbc_encrypt ();
20731int
20732main ()
20733{
ca81d7a0 20734return mit_des_cbc_encrypt ();
503d2be0
AS
20735 ;
20736 return 0;
20737}
20738_ACEOF
20739rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20740if { (ac_try="$ac_link"
20741case "(($ac_try" in
20742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20743 *) ac_try_echo=$ac_try;;
20744esac
20745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20746 (eval "$ac_link") 2>conftest.er1
503d2be0 20747 ac_status=$?
edfaf76d
LK
20748 grep -v '^ *+' conftest.er1 >conftest.err
20749 rm -f conftest.er1
20750 cat conftest.err >&5
c0d27fcc 20751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20752 (exit $ac_status); } && {
20753 test -z "$ac_c_werror_flag" ||
20754 test ! -s conftest.err
20755 } && test -s conftest$ac_exeext &&
20756 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20757 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20758else
20759 echo "$as_me: failed program was:" >&5
19650fd6
AS
20760sed 's/^/| /' conftest.$ac_ext >&5
20761
ca81d7a0 20762 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20763fi
ca81d7a0 20764
f053c89f 20765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20766 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20767LIBS=$ac_check_lib_save_LIBS
20768fi
ca81d7a0
JD
20769{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20770echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20771if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20772 cat >>confdefs.h <<_ACEOF
503d2be0 20773#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20774_ACEOF
a21616bd
KR
20775
20776 LIBS="-lk5crypto $LIBS"
20777
a21616bd
KR
20778fi
20779
c0d27fcc 20780
ca81d7a0
JD
20781{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20782echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20783if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20784 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20785else
503d2be0 20786 ac_check_lib_save_LIBS=$LIBS
a21616bd 20787LIBS="-lcrypto $LIBS"
503d2be0 20788cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20789/* confdefs.h. */
20790_ACEOF
20791cat confdefs.h >>conftest.$ac_ext
20792cat >>conftest.$ac_ext <<_ACEOF
20793/* end confdefs.h. */
503d2be0 20794
ca81d7a0
JD
20795/* Override any GCC internal prototype to avoid an error.
20796 Use char because int might match the return type of a GCC
20797 builtin and then its argument prototype would still apply. */
503d2be0
AS
20798#ifdef __cplusplus
20799extern "C"
20800#endif
503d2be0
AS
20801char mit_des_cbc_encrypt ();
20802int
20803main ()
20804{
ca81d7a0 20805return mit_des_cbc_encrypt ();
503d2be0
AS
20806 ;
20807 return 0;
20808}
20809_ACEOF
20810rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20811if { (ac_try="$ac_link"
20812case "(($ac_try" in
20813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20814 *) ac_try_echo=$ac_try;;
20815esac
20816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20817 (eval "$ac_link") 2>conftest.er1
503d2be0 20818 ac_status=$?
edfaf76d
LK
20819 grep -v '^ *+' conftest.er1 >conftest.err
20820 rm -f conftest.er1
20821 cat conftest.err >&5
c0d27fcc 20822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20823 (exit $ac_status); } && {
20824 test -z "$ac_c_werror_flag" ||
20825 test ! -s conftest.err
20826 } && test -s conftest$ac_exeext &&
20827 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20828 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20829else
20830 echo "$as_me: failed program was:" >&5
19650fd6
AS
20831sed 's/^/| /' conftest.$ac_ext >&5
20832
ca81d7a0 20833 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20834fi
ca81d7a0 20835
f053c89f 20836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20837 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20838LIBS=$ac_check_lib_save_LIBS
20839fi
ca81d7a0
JD
20840{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20841echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20842if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20843 cat >>confdefs.h <<_ACEOF
503d2be0 20844#define HAVE_LIBCRYPTO 1
c0d27fcc 20845_ACEOF
a21616bd
KR
20846
20847 LIBS="-lcrypto $LIBS"
20848
a21616bd
KR
20849fi
20850
c0d27fcc 20851
ca81d7a0
JD
20852{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20853echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20854if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20855 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20856else
503d2be0 20857 ac_check_lib_save_LIBS=$LIBS
a21616bd 20858LIBS="-lkrb5 $LIBS"
503d2be0 20859cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20860/* confdefs.h. */
20861_ACEOF
20862cat confdefs.h >>conftest.$ac_ext
20863cat >>conftest.$ac_ext <<_ACEOF
20864/* end confdefs.h. */
a21616bd 20865
ca81d7a0
JD
20866/* Override any GCC internal prototype to avoid an error.
20867 Use char because int might match the return type of a GCC
20868 builtin and then its argument prototype would still apply. */
503d2be0
AS
20869#ifdef __cplusplus
20870extern "C"
20871#endif
503d2be0
AS
20872char krb5_init_context ();
20873int
20874main ()
20875{
ca81d7a0 20876return krb5_init_context ();
503d2be0
AS
20877 ;
20878 return 0;
20879}
20880_ACEOF
20881rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20882if { (ac_try="$ac_link"
20883case "(($ac_try" in
20884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20885 *) ac_try_echo=$ac_try;;
20886esac
20887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20888 (eval "$ac_link") 2>conftest.er1
503d2be0 20889 ac_status=$?
edfaf76d
LK
20890 grep -v '^ *+' conftest.er1 >conftest.err
20891 rm -f conftest.er1
20892 cat conftest.err >&5
c0d27fcc 20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20894 (exit $ac_status); } && {
20895 test -z "$ac_c_werror_flag" ||
20896 test ! -s conftest.err
20897 } && test -s conftest$ac_exeext &&
20898 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20899 ac_cv_lib_krb5_krb5_init_context=yes
20900else
20901 echo "$as_me: failed program was:" >&5
19650fd6
AS
20902sed 's/^/| /' conftest.$ac_ext >&5
20903
ca81d7a0 20904 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20905fi
ca81d7a0 20906
f053c89f 20907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20908 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20909LIBS=$ac_check_lib_save_LIBS
20910fi
ca81d7a0
JD
20911{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20912echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20913if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20914 cat >>confdefs.h <<_ACEOF
503d2be0 20915#define HAVE_LIBKRB5 1
c0d27fcc 20916_ACEOF
a21616bd
KR
20917
20918 LIBS="-lkrb5 $LIBS"
20919
a21616bd
KR
20920fi
20921
20922 if test "${with_kerberos5+set}" != set; then
503d2be0 20923
ca81d7a0
JD
20924{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20925echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20926if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20927 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20928else
503d2be0 20929 ac_check_lib_save_LIBS=$LIBS
a21616bd 20930LIBS="-ldes425 $LIBS"
503d2be0 20931cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20932/* confdefs.h. */
20933_ACEOF
20934cat confdefs.h >>conftest.$ac_ext
20935cat >>conftest.$ac_ext <<_ACEOF
20936/* end confdefs.h. */
503d2be0 20937
ca81d7a0
JD
20938/* Override any GCC internal prototype to avoid an error.
20939 Use char because int might match the return type of a GCC
20940 builtin and then its argument prototype would still apply. */
503d2be0
AS
20941#ifdef __cplusplus
20942extern "C"
20943#endif
503d2be0
AS
20944char des_cbc_encrypt ();
20945int
20946main ()
20947{
ca81d7a0 20948return des_cbc_encrypt ();
503d2be0
AS
20949 ;
20950 return 0;
20951}
20952_ACEOF
20953rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20954if { (ac_try="$ac_link"
20955case "(($ac_try" in
20956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20957 *) ac_try_echo=$ac_try;;
20958esac
20959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20960 (eval "$ac_link") 2>conftest.er1
503d2be0 20961 ac_status=$?
edfaf76d
LK
20962 grep -v '^ *+' conftest.er1 >conftest.err
20963 rm -f conftest.er1
20964 cat conftest.err >&5
c0d27fcc 20965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20966 (exit $ac_status); } && {
20967 test -z "$ac_c_werror_flag" ||
20968 test ! -s conftest.err
20969 } && test -s conftest$ac_exeext &&
20970 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20971 ac_cv_lib_des425_des_cbc_encrypt=yes
20972else
20973 echo "$as_me: failed program was:" >&5
19650fd6
AS
20974sed 's/^/| /' conftest.$ac_ext >&5
20975
ca81d7a0 20976 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20977fi
ca81d7a0 20978
f053c89f 20979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20980 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20981LIBS=$ac_check_lib_save_LIBS
20982fi
ca81d7a0
JD
20983{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20984echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20985if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20986 cat >>confdefs.h <<_ACEOF
503d2be0 20987#define HAVE_LIBDES425 1
c0d27fcc 20988_ACEOF
a21616bd
KR
20989
20990 LIBS="-ldes425 $LIBS"
20991
20992else
503d2be0 20993
ca81d7a0
JD
20994{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20995echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20996if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20997 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20998else
503d2be0 20999 ac_check_lib_save_LIBS=$LIBS
a21616bd 21000LIBS="-ldes $LIBS"
503d2be0 21001cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21002/* confdefs.h. */
21003_ACEOF
21004cat confdefs.h >>conftest.$ac_ext
21005cat >>conftest.$ac_ext <<_ACEOF
21006/* end confdefs.h. */
503d2be0 21007
ca81d7a0
JD
21008/* Override any GCC internal prototype to avoid an error.
21009 Use char because int might match the return type of a GCC
21010 builtin and then its argument prototype would still apply. */
503d2be0
AS
21011#ifdef __cplusplus
21012extern "C"
21013#endif
503d2be0
AS
21014char des_cbc_encrypt ();
21015int
21016main ()
21017{
ca81d7a0 21018return des_cbc_encrypt ();
503d2be0
AS
21019 ;
21020 return 0;
21021}
21022_ACEOF
21023rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21024if { (ac_try="$ac_link"
21025case "(($ac_try" in
21026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21027 *) ac_try_echo=$ac_try;;
21028esac
21029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21030 (eval "$ac_link") 2>conftest.er1
503d2be0 21031 ac_status=$?
edfaf76d
LK
21032 grep -v '^ *+' conftest.er1 >conftest.err
21033 rm -f conftest.er1
21034 cat conftest.err >&5
c0d27fcc 21035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21036 (exit $ac_status); } && {
21037 test -z "$ac_c_werror_flag" ||
21038 test ! -s conftest.err
21039 } && test -s conftest$ac_exeext &&
21040 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21041 ac_cv_lib_des_des_cbc_encrypt=yes
21042else
21043 echo "$as_me: failed program was:" >&5
19650fd6
AS
21044sed 's/^/| /' conftest.$ac_ext >&5
21045
ca81d7a0 21046 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 21047fi
ca81d7a0 21048
f053c89f 21049rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21050 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21051LIBS=$ac_check_lib_save_LIBS
21052fi
ca81d7a0
JD
21053{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
21054echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 21055if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 21056 cat >>confdefs.h <<_ACEOF
503d2be0 21057#define HAVE_LIBDES 1
c0d27fcc 21058_ACEOF
a21616bd
KR
21059
21060 LIBS="-ldes $LIBS"
21061
a21616bd
KR
21062fi
21063
21064fi
21065
c0d27fcc 21066
ca81d7a0
JD
21067{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
21068echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
21069if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
21070 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21071else
503d2be0 21072 ac_check_lib_save_LIBS=$LIBS
a21616bd 21073LIBS="-lkrb4 $LIBS"
503d2be0 21074cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21075/* confdefs.h. */
21076_ACEOF
21077cat confdefs.h >>conftest.$ac_ext
21078cat >>conftest.$ac_ext <<_ACEOF
21079/* end confdefs.h. */
503d2be0 21080
ca81d7a0
JD
21081/* Override any GCC internal prototype to avoid an error.
21082 Use char because int might match the return type of a GCC
21083 builtin and then its argument prototype would still apply. */
503d2be0
AS
21084#ifdef __cplusplus
21085extern "C"
21086#endif
503d2be0
AS
21087char krb_get_cred ();
21088int
21089main ()
21090{
f053c89f 21091return krb_get_cred ();
503d2be0
AS
21092 ;
21093 return 0;
21094}
21095_ACEOF
21096rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
21097if { (ac_try="$ac_link"
21098case "(($ac_try" in
ca81d7a0
JD
21099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21100 *) ac_try_echo=$ac_try;;
21101esac
21102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21103 (eval "$ac_link") 2>conftest.er1
503d2be0 21104 ac_status=$?
edfaf76d
LK
21105 grep -v '^ *+' conftest.er1 >conftest.err
21106 rm -f conftest.er1
21107 cat conftest.err >&5
c0d27fcc 21108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21109 (exit $ac_status); } && {
21110 test -z "$ac_c_werror_flag" ||
21111 test ! -s conftest.err
21112 } && test -s conftest$ac_exeext &&
21113 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21114 ac_cv_lib_krb4_krb_get_cred=yes
21115else
21116 echo "$as_me: failed program was:" >&5
19650fd6
AS
21117sed 's/^/| /' conftest.$ac_ext >&5
21118
ca81d7a0 21119 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21120fi
ca81d7a0 21121
f053c89f 21122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21123 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21124LIBS=$ac_check_lib_save_LIBS
21125fi
ca81d7a0
JD
21126{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21127echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 21128if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21129 cat >>confdefs.h <<_ACEOF
503d2be0 21130#define HAVE_LIBKRB4 1
c0d27fcc 21131_ACEOF
a21616bd
KR
21132
21133 LIBS="-lkrb4 $LIBS"
21134
21135else
503d2be0 21136
ca81d7a0
JD
21137{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21138echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
21139if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
21140 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21141else
503d2be0 21142 ac_check_lib_save_LIBS=$LIBS
a21616bd 21143LIBS="-lkrb $LIBS"
503d2be0 21144cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21145/* confdefs.h. */
21146_ACEOF
21147cat confdefs.h >>conftest.$ac_ext
21148cat >>conftest.$ac_ext <<_ACEOF
21149/* end confdefs.h. */
503d2be0 21150
ca81d7a0
JD
21151/* Override any GCC internal prototype to avoid an error.
21152 Use char because int might match the return type of a GCC
21153 builtin and then its argument prototype would still apply. */
503d2be0
AS
21154#ifdef __cplusplus
21155extern "C"
21156#endif
503d2be0
AS
21157char krb_get_cred ();
21158int
21159main ()
21160{
ca81d7a0 21161return krb_get_cred ();
503d2be0
AS
21162 ;
21163 return 0;
21164}
21165_ACEOF
21166rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21167if { (ac_try="$ac_link"
21168case "(($ac_try" in
21169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21170 *) ac_try_echo=$ac_try;;
21171esac
21172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21173 (eval "$ac_link") 2>conftest.er1
503d2be0 21174 ac_status=$?
edfaf76d
LK
21175 grep -v '^ *+' conftest.er1 >conftest.err
21176 rm -f conftest.er1
21177 cat conftest.err >&5
c0d27fcc 21178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21179 (exit $ac_status); } && {
21180 test -z "$ac_c_werror_flag" ||
21181 test ! -s conftest.err
21182 } && test -s conftest$ac_exeext &&
21183 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21184 ac_cv_lib_krb_krb_get_cred=yes
21185else
21186 echo "$as_me: failed program was:" >&5
19650fd6
AS
21187sed 's/^/| /' conftest.$ac_ext >&5
21188
ca81d7a0 21189 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21190fi
ca81d7a0 21191
f053c89f 21192rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21193 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21194LIBS=$ac_check_lib_save_LIBS
21195fi
ca81d7a0
JD
21196{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21197echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21198if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21199 cat >>confdefs.h <<_ACEOF
503d2be0 21200#define HAVE_LIBKRB 1
c0d27fcc 21201_ACEOF
a21616bd
KR
21202
21203 LIBS="-lkrb $LIBS"
21204
a21616bd
KR
21205fi
21206
21207fi
21208
21209 fi
21210
21211 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
21212
21213for ac_header in krb5.h
a21616bd 21214do
503d2be0 21215as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21216if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21217 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21218echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21219if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21220 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21221fi
ca81d7a0
JD
21222ac_res=`eval echo '${'$as_ac_Header'}'`
21223 { echo "$as_me:$LINENO: result: $ac_res" >&5
21224echo "${ECHO_T}$ac_res" >&6; }
98418dba 21225else
c0d27fcc 21226 # Is the header compilable?
ca81d7a0
JD
21227{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21228echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21229cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21230/* confdefs.h. */
21231_ACEOF
21232cat confdefs.h >>conftest.$ac_ext
21233cat >>conftest.$ac_ext <<_ACEOF
21234/* end confdefs.h. */
c0d27fcc
MR
21235$ac_includes_default
21236#include <$ac_header>
21237_ACEOF
21238rm -f conftest.$ac_objext
ca81d7a0
JD
21239if { (ac_try="$ac_compile"
21240case "(($ac_try" in
21241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21242 *) ac_try_echo=$ac_try;;
21243esac
21244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21245 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21246 ac_status=$?
edfaf76d
LK
21247 grep -v '^ *+' conftest.er1 >conftest.err
21248 rm -f conftest.er1
21249 cat conftest.err >&5
c0d27fcc 21250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21251 (exit $ac_status); } && {
21252 test -z "$ac_c_werror_flag" ||
21253 test ! -s conftest.err
21254 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21255 ac_header_compiler=yes
21256else
21257 echo "$as_me: failed program was:" >&5
19650fd6
AS
21258sed 's/^/| /' conftest.$ac_ext >&5
21259
ca81d7a0 21260 ac_header_compiler=no
c0d27fcc 21261fi
ca81d7a0
JD
21262
21263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21264{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21265echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21266
21267# Is the header present?
ca81d7a0
JD
21268{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21269echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21270cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21271/* confdefs.h. */
21272_ACEOF
21273cat confdefs.h >>conftest.$ac_ext
21274cat >>conftest.$ac_ext <<_ACEOF
21275/* end confdefs.h. */
503d2be0
AS
21276#include <$ac_header>
21277_ACEOF
ca81d7a0
JD
21278if { (ac_try="$ac_cpp conftest.$ac_ext"
21279case "(($ac_try" in
21280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21281 *) ac_try_echo=$ac_try;;
21282esac
21283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21284 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21285 ac_status=$?
6bae0ccf 21286 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21287 rm -f conftest.er1
21288 cat conftest.err >&5
c0d27fcc 21289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21290 (exit $ac_status); } >/dev/null && {
21291 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21292 test ! -s conftest.err
21293 }; then
c0d27fcc 21294 ac_header_preproc=yes
503d2be0
AS
21295else
21296 echo "$as_me: failed program was:" >&5
19650fd6
AS
21297sed 's/^/| /' conftest.$ac_ext >&5
21298
c0d27fcc 21299 ac_header_preproc=no
a21616bd 21300fi
ca81d7a0 21301
503d2be0 21302rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21303{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21304echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21305
21306# So? What about this header?
edfaf76d
LK
21307case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21308 yes:no: )
c0d27fcc
MR
21309 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21310echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21311 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21312echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21313 ac_header_preproc=yes
19650fd6 21314 ;;
edfaf76d 21315 no:yes:* )
c0d27fcc
MR
21316 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21317echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21318 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21319echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21320 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21321echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21322 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21323echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21324 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21325echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21326 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21327echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21328
19650fd6 21329 ;;
c0d27fcc 21330esac
ca81d7a0
JD
21331{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21332echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21333if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21334 echo $ECHO_N "(cached) $ECHO_C" >&6
21335else
edfaf76d 21336 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21337fi
ca81d7a0
JD
21338ac_res=`eval echo '${'$as_ac_Header'}'`
21339 { echo "$as_me:$LINENO: result: $ac_res" >&5
21340echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21341
21342fi
503d2be0 21343if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21344 cat >>confdefs.h <<_ACEOF
503d2be0 21345#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21346_ACEOF
503d2be0 21347
a21616bd 21348fi
c0d27fcc 21349
a21616bd
KR
21350done
21351
21352 else
503d2be0
AS
21353
21354for ac_header in des.h
a21616bd 21355do
503d2be0 21356as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21357if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21358 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21359echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21360if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21361 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21362fi
ca81d7a0
JD
21363ac_res=`eval echo '${'$as_ac_Header'}'`
21364 { echo "$as_me:$LINENO: result: $ac_res" >&5
21365echo "${ECHO_T}$ac_res" >&6; }
98418dba 21366else
c0d27fcc 21367 # Is the header compilable?
ca81d7a0
JD
21368{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21369echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21371/* confdefs.h. */
21372_ACEOF
21373cat confdefs.h >>conftest.$ac_ext
21374cat >>conftest.$ac_ext <<_ACEOF
21375/* end confdefs.h. */
c0d27fcc
MR
21376$ac_includes_default
21377#include <$ac_header>
21378_ACEOF
21379rm -f conftest.$ac_objext
ca81d7a0
JD
21380if { (ac_try="$ac_compile"
21381case "(($ac_try" in
21382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21383 *) ac_try_echo=$ac_try;;
21384esac
21385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21386 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21387 ac_status=$?
edfaf76d
LK
21388 grep -v '^ *+' conftest.er1 >conftest.err
21389 rm -f conftest.er1
21390 cat conftest.err >&5
c0d27fcc 21391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21392 (exit $ac_status); } && {
21393 test -z "$ac_c_werror_flag" ||
21394 test ! -s conftest.err
21395 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21396 ac_header_compiler=yes
21397else
21398 echo "$as_me: failed program was:" >&5
19650fd6
AS
21399sed 's/^/| /' conftest.$ac_ext >&5
21400
ca81d7a0 21401 ac_header_compiler=no
c0d27fcc 21402fi
ca81d7a0
JD
21403
21404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21405{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21406echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21407
21408# Is the header present?
ca81d7a0
JD
21409{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21410echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21411cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21412/* confdefs.h. */
21413_ACEOF
21414cat confdefs.h >>conftest.$ac_ext
21415cat >>conftest.$ac_ext <<_ACEOF
21416/* end confdefs.h. */
503d2be0
AS
21417#include <$ac_header>
21418_ACEOF
ca81d7a0
JD
21419if { (ac_try="$ac_cpp conftest.$ac_ext"
21420case "(($ac_try" in
21421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21422 *) ac_try_echo=$ac_try;;
21423esac
21424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21425 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21426 ac_status=$?
6bae0ccf 21427 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21428 rm -f conftest.er1
21429 cat conftest.err >&5
c0d27fcc 21430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21431 (exit $ac_status); } >/dev/null && {
21432 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21433 test ! -s conftest.err
21434 }; then
c0d27fcc 21435 ac_header_preproc=yes
503d2be0
AS
21436else
21437 echo "$as_me: failed program was:" >&5
19650fd6
AS
21438sed 's/^/| /' conftest.$ac_ext >&5
21439
c0d27fcc 21440 ac_header_preproc=no
a21616bd 21441fi
ca81d7a0 21442
503d2be0 21443rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21444{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21445echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21446
21447# So? What about this header?
edfaf76d
LK
21448case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21449 yes:no: )
c0d27fcc
MR
21450 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21451echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21452 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21453echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21454 ac_header_preproc=yes
19650fd6 21455 ;;
edfaf76d 21456 no:yes:* )
c0d27fcc
MR
21457 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21458echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21459 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21460echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21461 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21462echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21463 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21464echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21465 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21466echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21467 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21468echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21469
19650fd6 21470 ;;
c0d27fcc 21471esac
ca81d7a0
JD
21472{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21473echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21474if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21475 echo $ECHO_N "(cached) $ECHO_C" >&6
21476else
edfaf76d 21477 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21478fi
ca81d7a0
JD
21479ac_res=`eval echo '${'$as_ac_Header'}'`
21480 { echo "$as_me:$LINENO: result: $ac_res" >&5
21481echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21482
21483fi
503d2be0 21484if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21485 cat >>confdefs.h <<_ACEOF
503d2be0 21486#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21487_ACEOF
503d2be0 21488
a21616bd 21489else
503d2be0
AS
21490
21491for ac_header in kerberosIV/des.h
a21616bd 21492do
503d2be0 21493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21494if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21495 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21497if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21499fi
ca81d7a0
JD
21500ac_res=`eval echo '${'$as_ac_Header'}'`
21501 { echo "$as_me:$LINENO: result: $ac_res" >&5
21502echo "${ECHO_T}$ac_res" >&6; }
98418dba 21503else
c0d27fcc 21504 # Is the header compilable?
ca81d7a0
JD
21505{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21506echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21508/* confdefs.h. */
21509_ACEOF
21510cat confdefs.h >>conftest.$ac_ext
21511cat >>conftest.$ac_ext <<_ACEOF
21512/* end confdefs.h. */
c0d27fcc
MR
21513$ac_includes_default
21514#include <$ac_header>
21515_ACEOF
21516rm -f conftest.$ac_objext
ca81d7a0
JD
21517if { (ac_try="$ac_compile"
21518case "(($ac_try" in
21519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21520 *) ac_try_echo=$ac_try;;
21521esac
21522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21523 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21524 ac_status=$?
edfaf76d
LK
21525 grep -v '^ *+' conftest.er1 >conftest.err
21526 rm -f conftest.er1
21527 cat conftest.err >&5
c0d27fcc 21528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21529 (exit $ac_status); } && {
21530 test -z "$ac_c_werror_flag" ||
21531 test ! -s conftest.err
21532 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21533 ac_header_compiler=yes
21534else
21535 echo "$as_me: failed program was:" >&5
19650fd6
AS
21536sed 's/^/| /' conftest.$ac_ext >&5
21537
ca81d7a0 21538 ac_header_compiler=no
c0d27fcc 21539fi
ca81d7a0
JD
21540
21541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21542{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21543echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21544
21545# Is the header present?
ca81d7a0
JD
21546{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21547echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21548cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21549/* confdefs.h. */
21550_ACEOF
21551cat confdefs.h >>conftest.$ac_ext
21552cat >>conftest.$ac_ext <<_ACEOF
21553/* end confdefs.h. */
503d2be0
AS
21554#include <$ac_header>
21555_ACEOF
ca81d7a0
JD
21556if { (ac_try="$ac_cpp conftest.$ac_ext"
21557case "(($ac_try" in
21558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21559 *) ac_try_echo=$ac_try;;
21560esac
21561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21563 ac_status=$?
6bae0ccf 21564 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21565 rm -f conftest.er1
21566 cat conftest.err >&5
c0d27fcc 21567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21568 (exit $ac_status); } >/dev/null && {
21569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21570 test ! -s conftest.err
21571 }; then
c0d27fcc 21572 ac_header_preproc=yes
503d2be0
AS
21573else
21574 echo "$as_me: failed program was:" >&5
19650fd6
AS
21575sed 's/^/| /' conftest.$ac_ext >&5
21576
c0d27fcc 21577 ac_header_preproc=no
a21616bd 21578fi
ca81d7a0 21579
503d2be0 21580rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21581{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21582echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21583
21584# So? What about this header?
edfaf76d
LK
21585case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21586 yes:no: )
c0d27fcc
MR
21587 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21588echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21589 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21590echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21591 ac_header_preproc=yes
19650fd6 21592 ;;
edfaf76d 21593 no:yes:* )
c0d27fcc
MR
21594 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21595echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21596 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21597echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21598 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21599echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21600 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21601echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21603echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21604 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21605echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21606
19650fd6 21607 ;;
c0d27fcc 21608esac
ca81d7a0
JD
21609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21612 echo $ECHO_N "(cached) $ECHO_C" >&6
21613else
edfaf76d 21614 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21615fi
ca81d7a0
JD
21616ac_res=`eval echo '${'$as_ac_Header'}'`
21617 { echo "$as_me:$LINENO: result: $ac_res" >&5
21618echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21619
21620fi
503d2be0 21621if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21622 cat >>confdefs.h <<_ACEOF
503d2be0 21623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21624_ACEOF
503d2be0 21625
a21616bd 21626else
503d2be0
AS
21627
21628for ac_header in kerberos/des.h
a21616bd 21629do
503d2be0 21630as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21631if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21632 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21633echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21634if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21635 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21636fi
ca81d7a0
JD
21637ac_res=`eval echo '${'$as_ac_Header'}'`
21638 { echo "$as_me:$LINENO: result: $ac_res" >&5
21639echo "${ECHO_T}$ac_res" >&6; }
98418dba 21640else
c0d27fcc 21641 # Is the header compilable?
ca81d7a0
JD
21642{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21643echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21645/* confdefs.h. */
21646_ACEOF
21647cat confdefs.h >>conftest.$ac_ext
21648cat >>conftest.$ac_ext <<_ACEOF
21649/* end confdefs.h. */
c0d27fcc
MR
21650$ac_includes_default
21651#include <$ac_header>
21652_ACEOF
21653rm -f conftest.$ac_objext
ca81d7a0
JD
21654if { (ac_try="$ac_compile"
21655case "(($ac_try" in
21656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21657 *) ac_try_echo=$ac_try;;
21658esac
21659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21660 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21661 ac_status=$?
edfaf76d
LK
21662 grep -v '^ *+' conftest.er1 >conftest.err
21663 rm -f conftest.er1
21664 cat conftest.err >&5
c0d27fcc 21665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21666 (exit $ac_status); } && {
21667 test -z "$ac_c_werror_flag" ||
21668 test ! -s conftest.err
21669 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21670 ac_header_compiler=yes
21671else
21672 echo "$as_me: failed program was:" >&5
19650fd6
AS
21673sed 's/^/| /' conftest.$ac_ext >&5
21674
ca81d7a0 21675 ac_header_compiler=no
c0d27fcc 21676fi
ca81d7a0
JD
21677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21679{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21680echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21681
21682# Is the header present?
ca81d7a0
JD
21683{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21686/* confdefs.h. */
21687_ACEOF
21688cat confdefs.h >>conftest.$ac_ext
21689cat >>conftest.$ac_ext <<_ACEOF
21690/* end confdefs.h. */
503d2be0
AS
21691#include <$ac_header>
21692_ACEOF
ca81d7a0
JD
21693if { (ac_try="$ac_cpp conftest.$ac_ext"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
21698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21700 ac_status=$?
6bae0ccf 21701 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21702 rm -f conftest.er1
21703 cat conftest.err >&5
c0d27fcc 21704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21705 (exit $ac_status); } >/dev/null && {
21706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21707 test ! -s conftest.err
21708 }; then
c0d27fcc 21709 ac_header_preproc=yes
503d2be0
AS
21710else
21711 echo "$as_me: failed program was:" >&5
19650fd6
AS
21712sed 's/^/| /' conftest.$ac_ext >&5
21713
c0d27fcc 21714 ac_header_preproc=no
a21616bd 21715fi
ca81d7a0 21716
503d2be0 21717rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21718{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21719echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21720
21721# So? What about this header?
edfaf76d
LK
21722case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21723 yes:no: )
c0d27fcc
MR
21724 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21725echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21727echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21728 ac_header_preproc=yes
19650fd6 21729 ;;
edfaf76d 21730 no:yes:* )
c0d27fcc
MR
21731 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21732echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21733 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21734echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21735 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21736echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21737 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21738echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21739 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21740echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21741 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21742echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21743
19650fd6 21744 ;;
c0d27fcc 21745esac
ca81d7a0
JD
21746{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21747echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21748if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21749 echo $ECHO_N "(cached) $ECHO_C" >&6
21750else
edfaf76d 21751 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21752fi
ca81d7a0
JD
21753ac_res=`eval echo '${'$as_ac_Header'}'`
21754 { echo "$as_me:$LINENO: result: $ac_res" >&5
21755echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21756
21757fi
503d2be0 21758if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21759 cat >>confdefs.h <<_ACEOF
503d2be0 21760#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21761_ACEOF
a21616bd
KR
21762
21763fi
c0d27fcc 21764
a21616bd
KR
21765done
21766
98418dba 21767fi
c0d27fcc 21768
925c2f3f
EZ
21769done
21770
98418dba 21771fi
c0d27fcc 21772
925c2f3f 21773done
98418dba 21774
c0d27fcc 21775
925c2f3f
EZ
21776for ac_header in krb.h
21777do
21778as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21779if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21780 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21783 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21784fi
ca81d7a0
JD
21785ac_res=`eval echo '${'$as_ac_Header'}'`
21786 { echo "$as_me:$LINENO: result: $ac_res" >&5
21787echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21788else
21789 # Is the header compilable?
ca81d7a0
JD
21790{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21791echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21792cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21793/* confdefs.h. */
21794_ACEOF
21795cat confdefs.h >>conftest.$ac_ext
21796cat >>conftest.$ac_ext <<_ACEOF
21797/* end confdefs.h. */
c0d27fcc
MR
21798$ac_includes_default
21799#include <$ac_header>
21800_ACEOF
21801rm -f conftest.$ac_objext
ca81d7a0
JD
21802if { (ac_try="$ac_compile"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
21807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21808 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21809 ac_status=$?
edfaf76d
LK
21810 grep -v '^ *+' conftest.er1 >conftest.err
21811 rm -f conftest.er1
21812 cat conftest.err >&5
c0d27fcc 21813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21814 (exit $ac_status); } && {
21815 test -z "$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 } && test -s conftest.$ac_objext; then
c0d27fcc 21818 ac_header_compiler=yes
925c2f3f 21819else
c0d27fcc 21820 echo "$as_me: failed program was:" >&5
19650fd6
AS
21821sed 's/^/| /' conftest.$ac_ext >&5
21822
ca81d7a0 21823 ac_header_compiler=no
c0d27fcc 21824fi
ca81d7a0
JD
21825
21826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21827{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21828echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21829
21830# Is the header present?
ca81d7a0
JD
21831{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21832echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21833cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
503d2be0
AS
21839#include <$ac_header>
21840_ACEOF
ca81d7a0
JD
21841if { (ac_try="$ac_cpp conftest.$ac_ext"
21842case "(($ac_try" in
21843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21844 *) ac_try_echo=$ac_try;;
21845esac
21846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21847 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21848 ac_status=$?
6bae0ccf 21849 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21850 rm -f conftest.er1
21851 cat conftest.err >&5
c0d27fcc 21852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21853 (exit $ac_status); } >/dev/null && {
21854 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21855 test ! -s conftest.err
21856 }; then
c0d27fcc 21857 ac_header_preproc=yes
503d2be0
AS
21858else
21859 echo "$as_me: failed program was:" >&5
19650fd6
AS
21860sed 's/^/| /' conftest.$ac_ext >&5
21861
c0d27fcc 21862 ac_header_preproc=no
a21616bd 21863fi
ca81d7a0 21864
503d2be0 21865rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21866{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21867echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21868
21869# So? What about this header?
edfaf76d
LK
21870case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21871 yes:no: )
c0d27fcc
MR
21872 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21873echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21874 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21875echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21876 ac_header_preproc=yes
19650fd6 21877 ;;
edfaf76d 21878 no:yes:* )
c0d27fcc
MR
21879 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21880echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21881 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21882echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21883 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21884echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21885 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21886echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21887 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21888echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21889 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21890echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21891
19650fd6 21892 ;;
c0d27fcc 21893esac
ca81d7a0
JD
21894{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21895echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21896if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21897 echo $ECHO_N "(cached) $ECHO_C" >&6
21898else
edfaf76d 21899 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21900fi
ca81d7a0
JD
21901ac_res=`eval echo '${'$as_ac_Header'}'`
21902 { echo "$as_me:$LINENO: result: $ac_res" >&5
21903echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21904
21905fi
503d2be0 21906if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21907 cat >>confdefs.h <<_ACEOF
503d2be0 21908#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21909_ACEOF
503d2be0 21910
a21616bd 21911else
503d2be0
AS
21912
21913for ac_header in kerberosIV/krb.h
a21616bd 21914do
503d2be0 21915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21916if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21917 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21918echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21919if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21920 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21921fi
ca81d7a0
JD
21922ac_res=`eval echo '${'$as_ac_Header'}'`
21923 { echo "$as_me:$LINENO: result: $ac_res" >&5
21924echo "${ECHO_T}$ac_res" >&6; }
98418dba 21925else
c0d27fcc 21926 # Is the header compilable?
ca81d7a0
JD
21927{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21928echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21929cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21930/* confdefs.h. */
21931_ACEOF
21932cat confdefs.h >>conftest.$ac_ext
21933cat >>conftest.$ac_ext <<_ACEOF
21934/* end confdefs.h. */
c0d27fcc
MR
21935$ac_includes_default
21936#include <$ac_header>
21937_ACEOF
21938rm -f conftest.$ac_objext
ca81d7a0
JD
21939if { (ac_try="$ac_compile"
21940case "(($ac_try" in
21941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21942 *) ac_try_echo=$ac_try;;
21943esac
21944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21945 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21946 ac_status=$?
edfaf76d
LK
21947 grep -v '^ *+' conftest.er1 >conftest.err
21948 rm -f conftest.er1
21949 cat conftest.err >&5
c0d27fcc 21950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21951 (exit $ac_status); } && {
21952 test -z "$ac_c_werror_flag" ||
21953 test ! -s conftest.err
21954 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21955 ac_header_compiler=yes
21956else
21957 echo "$as_me: failed program was:" >&5
19650fd6
AS
21958sed 's/^/| /' conftest.$ac_ext >&5
21959
ca81d7a0 21960 ac_header_compiler=no
c0d27fcc 21961fi
ca81d7a0
JD
21962
21963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21964{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21965echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21966
21967# Is the header present?
ca81d7a0
JD
21968{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21969echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21971/* confdefs.h. */
21972_ACEOF
21973cat confdefs.h >>conftest.$ac_ext
21974cat >>conftest.$ac_ext <<_ACEOF
21975/* end confdefs.h. */
503d2be0
AS
21976#include <$ac_header>
21977_ACEOF
ca81d7a0
JD
21978if { (ac_try="$ac_cpp conftest.$ac_ext"
21979case "(($ac_try" in
21980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21981 *) ac_try_echo=$ac_try;;
21982esac
21983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21984 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21985 ac_status=$?
6bae0ccf 21986 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21987 rm -f conftest.er1
21988 cat conftest.err >&5
c0d27fcc 21989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21990 (exit $ac_status); } >/dev/null && {
21991 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21992 test ! -s conftest.err
21993 }; then
c0d27fcc 21994 ac_header_preproc=yes
503d2be0
AS
21995else
21996 echo "$as_me: failed program was:" >&5
19650fd6
AS
21997sed 's/^/| /' conftest.$ac_ext >&5
21998
c0d27fcc 21999 ac_header_preproc=no
a21616bd 22000fi
ca81d7a0 22001
503d2be0 22002rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22003{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22004echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22005
22006# So? What about this header?
edfaf76d
LK
22007case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22008 yes:no: )
c0d27fcc
MR
22009 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22010echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22011 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22012echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22013 ac_header_preproc=yes
19650fd6 22014 ;;
edfaf76d 22015 no:yes:* )
c0d27fcc
MR
22016 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22017echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22018 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22019echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22020 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22021echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22022 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22023echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22024 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22025echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22026 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22027echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22028
19650fd6 22029 ;;
c0d27fcc 22030esac
ca81d7a0
JD
22031{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22032echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22033if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22034 echo $ECHO_N "(cached) $ECHO_C" >&6
22035else
edfaf76d 22036 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22037fi
ca81d7a0
JD
22038ac_res=`eval echo '${'$as_ac_Header'}'`
22039 { echo "$as_me:$LINENO: result: $ac_res" >&5
22040echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22041
22042fi
503d2be0 22043if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22044 cat >>confdefs.h <<_ACEOF
503d2be0 22045#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22046_ACEOF
503d2be0 22047
a21616bd 22048else
503d2be0
AS
22049
22050for ac_header in kerberos/krb.h
a21616bd 22051do
503d2be0 22052as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22053if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22054 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22055echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22056if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22057 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22058fi
ca81d7a0
JD
22059ac_res=`eval echo '${'$as_ac_Header'}'`
22060 { echo "$as_me:$LINENO: result: $ac_res" >&5
22061echo "${ECHO_T}$ac_res" >&6; }
98418dba 22062else
c0d27fcc 22063 # Is the header compilable?
ca81d7a0
JD
22064{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22065echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22066cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22067/* confdefs.h. */
22068_ACEOF
22069cat confdefs.h >>conftest.$ac_ext
22070cat >>conftest.$ac_ext <<_ACEOF
22071/* end confdefs.h. */
c0d27fcc
MR
22072$ac_includes_default
22073#include <$ac_header>
22074_ACEOF
22075rm -f conftest.$ac_objext
ca81d7a0
JD
22076if { (ac_try="$ac_compile"
22077case "(($ac_try" in
22078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22079 *) ac_try_echo=$ac_try;;
22080esac
22081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22082 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22083 ac_status=$?
edfaf76d
LK
22084 grep -v '^ *+' conftest.er1 >conftest.err
22085 rm -f conftest.er1
22086 cat conftest.err >&5
c0d27fcc 22087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22088 (exit $ac_status); } && {
22089 test -z "$ac_c_werror_flag" ||
22090 test ! -s conftest.err
22091 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22092 ac_header_compiler=yes
22093else
22094 echo "$as_me: failed program was:" >&5
19650fd6
AS
22095sed 's/^/| /' conftest.$ac_ext >&5
22096
ca81d7a0 22097 ac_header_compiler=no
c0d27fcc 22098fi
ca81d7a0
JD
22099
22100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22101{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22102echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22103
22104# Is the header present?
ca81d7a0
JD
22105{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22106echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22107cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22108/* confdefs.h. */
22109_ACEOF
22110cat confdefs.h >>conftest.$ac_ext
22111cat >>conftest.$ac_ext <<_ACEOF
22112/* end confdefs.h. */
503d2be0
AS
22113#include <$ac_header>
22114_ACEOF
ca81d7a0
JD
22115if { (ac_try="$ac_cpp conftest.$ac_ext"
22116case "(($ac_try" in
22117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22118 *) ac_try_echo=$ac_try;;
22119esac
22120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22121 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22122 ac_status=$?
6bae0ccf 22123 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22124 rm -f conftest.er1
22125 cat conftest.err >&5
c0d27fcc 22126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22127 (exit $ac_status); } >/dev/null && {
22128 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22129 test ! -s conftest.err
22130 }; then
c0d27fcc 22131 ac_header_preproc=yes
503d2be0
AS
22132else
22133 echo "$as_me: failed program was:" >&5
19650fd6
AS
22134sed 's/^/| /' conftest.$ac_ext >&5
22135
c0d27fcc 22136 ac_header_preproc=no
a21616bd 22137fi
ca81d7a0 22138
503d2be0 22139rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22140{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22141echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22142
22143# So? What about this header?
edfaf76d
LK
22144case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22145 yes:no: )
35996d22
AS
22146 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22147echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22148 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22149echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22150 ac_header_preproc=yes
19650fd6 22151 ;;
edfaf76d 22152 no:yes:* )
c0d27fcc
MR
22153 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22154echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22155 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22156echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22157 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22158echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22159 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22160echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22161 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22162echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22163 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22164echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22165
19650fd6 22166 ;;
c0d27fcc 22167esac
ca81d7a0
JD
22168{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22169echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22170if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22171 echo $ECHO_N "(cached) $ECHO_C" >&6
22172else
edfaf76d 22173 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22174fi
ca81d7a0
JD
22175ac_res=`eval echo '${'$as_ac_Header'}'`
22176 { echo "$as_me:$LINENO: result: $ac_res" >&5
22177echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22178
22179fi
503d2be0 22180if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22181 cat >>confdefs.h <<_ACEOF
503d2be0 22182#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22183_ACEOF
503d2be0 22184
a21616bd 22185fi
c0d27fcc 22186
a21616bd
KR
22187done
22188
22189fi
c0d27fcc 22190
a21616bd
KR
22191done
22192
22193fi
c0d27fcc 22194
a21616bd
KR
22195done
22196
22197 fi
503d2be0
AS
22198
22199for ac_header in com_err.h
a21616bd 22200do
503d2be0 22201as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22202if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22203 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22204echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22205if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22206 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22207fi
ca81d7a0
JD
22208ac_res=`eval echo '${'$as_ac_Header'}'`
22209 { echo "$as_me:$LINENO: result: $ac_res" >&5
22210echo "${ECHO_T}$ac_res" >&6; }
98418dba 22211else
c0d27fcc 22212 # Is the header compilable?
ca81d7a0
JD
22213{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22214echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22215cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22216/* confdefs.h. */
22217_ACEOF
22218cat confdefs.h >>conftest.$ac_ext
22219cat >>conftest.$ac_ext <<_ACEOF
22220/* end confdefs.h. */
c0d27fcc
MR
22221$ac_includes_default
22222#include <$ac_header>
22223_ACEOF
22224rm -f conftest.$ac_objext
ca81d7a0
JD
22225if { (ac_try="$ac_compile"
22226case "(($ac_try" in
22227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22228 *) ac_try_echo=$ac_try;;
22229esac
22230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22231 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22232 ac_status=$?
22233 grep -v '^ *+' conftest.er1 >conftest.err
22234 rm -f conftest.er1
22235 cat conftest.err >&5
22236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22237 (exit $ac_status); } && {
22238 test -z "$ac_c_werror_flag" ||
22239 test ! -s conftest.err
22240 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22241 ac_header_compiler=yes
22242else
22243 echo "$as_me: failed program was:" >&5
19650fd6
AS
22244sed 's/^/| /' conftest.$ac_ext >&5
22245
ca81d7a0 22246 ac_header_compiler=no
c0d27fcc 22247fi
ca81d7a0
JD
22248
22249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22250{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22251echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22252
22253# Is the header present?
ca81d7a0
JD
22254{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22255echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22256cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22257/* confdefs.h. */
22258_ACEOF
22259cat confdefs.h >>conftest.$ac_ext
22260cat >>conftest.$ac_ext <<_ACEOF
22261/* end confdefs.h. */
503d2be0
AS
22262#include <$ac_header>
22263_ACEOF
ca81d7a0
JD
22264if { (ac_try="$ac_cpp conftest.$ac_ext"
22265case "(($ac_try" in
22266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22267 *) ac_try_echo=$ac_try;;
22268esac
22269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22270 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22271 ac_status=$?
6bae0ccf 22272 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22273 rm -f conftest.er1
22274 cat conftest.err >&5
c0d27fcc 22275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22276 (exit $ac_status); } >/dev/null && {
22277 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22278 test ! -s conftest.err
22279 }; then
c0d27fcc 22280 ac_header_preproc=yes
503d2be0
AS
22281else
22282 echo "$as_me: failed program was:" >&5
19650fd6
AS
22283sed 's/^/| /' conftest.$ac_ext >&5
22284
c0d27fcc 22285 ac_header_preproc=no
a21616bd 22286fi
ca81d7a0 22287
503d2be0 22288rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22289{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22290echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22291
22292# So? What about this header?
edfaf76d
LK
22293case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22294 yes:no: )
c0d27fcc
MR
22295 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22296echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22297 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22298echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22299 ac_header_preproc=yes
19650fd6 22300 ;;
edfaf76d 22301 no:yes:* )
c0d27fcc
MR
22302 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22303echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22304 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22305echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22306 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22307echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22308 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22309echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22310 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22311echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22312 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22313echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22314
19650fd6 22315 ;;
c0d27fcc 22316esac
ca81d7a0
JD
22317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22320 echo $ECHO_N "(cached) $ECHO_C" >&6
22321else
edfaf76d 22322 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22323fi
ca81d7a0
JD
22324ac_res=`eval echo '${'$as_ac_Header'}'`
22325 { echo "$as_me:$LINENO: result: $ac_res" >&5
22326echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22327
22328fi
503d2be0 22329if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22330 cat >>confdefs.h <<_ACEOF
503d2be0 22331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22332_ACEOF
503d2be0 22333
a21616bd 22334fi
c0d27fcc 22335
a21616bd
KR
22336done
22337
22338fi
22339
ba4481b5
DL
22340# Solaris requires -lintl if you want strerror (which calls dgettext)
22341# to return localized messages.
503d2be0 22342
ca81d7a0
JD
22343{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22344echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22345if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22346 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22347else
503d2be0 22348 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22349LIBS="-lintl $LIBS"
503d2be0 22350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22351/* confdefs.h. */
22352_ACEOF
22353cat confdefs.h >>conftest.$ac_ext
22354cat >>conftest.$ac_ext <<_ACEOF
22355/* end confdefs.h. */
503d2be0 22356
ca81d7a0
JD
22357/* Override any GCC internal prototype to avoid an error.
22358 Use char because int might match the return type of a GCC
22359 builtin and then its argument prototype would still apply. */
503d2be0
AS
22360#ifdef __cplusplus
22361extern "C"
22362#endif
503d2be0
AS
22363char dgettext ();
22364int
22365main ()
22366{
ca81d7a0 22367return dgettext ();
503d2be0
AS
22368 ;
22369 return 0;
22370}
22371_ACEOF
22372rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22373if { (ac_try="$ac_link"
22374case "(($ac_try" in
22375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22376 *) ac_try_echo=$ac_try;;
22377esac
22378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22379 (eval "$ac_link") 2>conftest.er1
503d2be0 22380 ac_status=$?
edfaf76d
LK
22381 grep -v '^ *+' conftest.er1 >conftest.err
22382 rm -f conftest.er1
22383 cat conftest.err >&5
c0d27fcc 22384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22385 (exit $ac_status); } && {
22386 test -z "$ac_c_werror_flag" ||
22387 test ! -s conftest.err
22388 } && test -s conftest$ac_exeext &&
22389 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22390 ac_cv_lib_intl_dgettext=yes
22391else
22392 echo "$as_me: failed program was:" >&5
19650fd6
AS
22393sed 's/^/| /' conftest.$ac_ext >&5
22394
ca81d7a0 22395 ac_cv_lib_intl_dgettext=no
503d2be0 22396fi
ca81d7a0 22397
f053c89f 22398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22399 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22400LIBS=$ac_check_lib_save_LIBS
22401fi
ca81d7a0
JD
22402{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22403echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22404if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22405 cat >>confdefs.h <<_ACEOF
503d2be0 22406#define HAVE_LIBINTL 1
c0d27fcc 22407_ACEOF
ba4481b5
DL
22408
22409 LIBS="-lintl $LIBS"
22410
ba4481b5
DL
22411fi
22412
c0d27fcc 22413
ca81d7a0
JD
22414{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22415echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22416if test "${emacs_cv_localtime_cache+set}" = set; then
22417 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22418else
22419 if test x$ac_cv_func_tzset = xyes; then
22420if test "$cross_compiling" = yes; then
22421 # If we have tzset, assume the worst when cross-compiling.
22422emacs_cv_localtime_cache=yes
22423else
503d2be0 22424 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22425/* confdefs.h. */
22426_ACEOF
22427cat confdefs.h >>conftest.$ac_ext
22428cat >>conftest.$ac_ext <<_ACEOF
22429/* end confdefs.h. */
ba4481b5 22430#include <time.h>
ba4481b5
DL
22431extern char **environ;
22432unset_TZ ()
22433{
22434 char **from, **to;
22435 for (to = from = environ; (*to = *from); from++)
22436 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22437 to++;
22438}
22439char TZ_GMT0[] = "TZ=GMT0";
22440char TZ_PST8[] = "TZ=PST8";
22441main()
22442{
22443 time_t now = time ((time_t *) 0);
22444 int hour_GMT0, hour_unset;
22445 if (putenv (TZ_GMT0) != 0)
22446 exit (1);
22447 hour_GMT0 = localtime (&now)->tm_hour;
22448 unset_TZ ();
22449 hour_unset = localtime (&now)->tm_hour;
22450 if (putenv (TZ_PST8) != 0)
22451 exit (1);
22452 if (localtime (&now)->tm_hour == hour_GMT0)
22453 exit (1);
22454 unset_TZ ();
22455 if (localtime (&now)->tm_hour != hour_unset)
22456 exit (1);
22457 exit (0);
22458}
503d2be0
AS
22459_ACEOF
22460rm -f conftest$ac_exeext
ca81d7a0
JD
22461if { (ac_try="$ac_link"
22462case "(($ac_try" in
22463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22464 *) ac_try_echo=$ac_try;;
22465esac
22466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22467 (eval "$ac_link") 2>&5
503d2be0 22468 ac_status=$?
c0d27fcc 22469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22470 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22471 { (case "(($ac_try" in
22472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22473 *) ac_try_echo=$ac_try;;
22474esac
22475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22476 (eval "$ac_try") 2>&5
503d2be0 22477 ac_status=$?
c0d27fcc 22478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22479 (exit $ac_status); }; }; then
ba4481b5
DL
22480 emacs_cv_localtime_cache=no
22481else
503d2be0
AS
22482 echo "$as_me: program exited with status $ac_status" >&5
22483echo "$as_me: failed program was:" >&5
19650fd6
AS
22484sed 's/^/| /' conftest.$ac_ext >&5
22485
c0d27fcc 22486( exit $ac_status )
503d2be0 22487emacs_cv_localtime_cache=yes
ba4481b5 22488fi
ca81d7a0 22489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22490fi
ca81d7a0
JD
22491
22492
ba4481b5
DL
22493else
22494 # If we lack tzset, report that localtime does not cache TZ,
22495 # since we can't invalidate the cache if we don't have tzset.
22496 emacs_cv_localtime_cache=no
22497fi
22498fi
ca81d7a0
JD
22499{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22500echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22501if test $emacs_cv_localtime_cache = yes; then
b936fae4 22502
c0d27fcc 22503cat >>confdefs.h <<\_ACEOF
ba4481b5 22504#define LOCALTIME_CACHE 1
c0d27fcc 22505_ACEOF
ba4481b5
DL
22506
22507fi
22508
22509if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22510
22511for ac_func in gettimeofday
48d4b120 22512do
503d2be0 22513as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22514{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22515echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22516if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22517 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22518else
503d2be0 22519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22520/* confdefs.h. */
22521_ACEOF
22522cat confdefs.h >>conftest.$ac_ext
22523cat >>conftest.$ac_ext <<_ACEOF
22524/* end confdefs.h. */
edfaf76d
LK
22525/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22526 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22527#define $ac_func innocuous_$ac_func
22528
48d4b120 22529/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22530 which can conflict with char $ac_func (); below.
22531 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22532 <limits.h> exists even on freestanding compilers. */
edfaf76d 22533
19650fd6
AS
22534#ifdef __STDC__
22535# include <limits.h>
22536#else
22537# include <assert.h>
22538#endif
edfaf76d
LK
22539
22540#undef $ac_func
22541
ca81d7a0
JD
22542/* Override any GCC internal prototype to avoid an error.
22543 Use char because int might match the return type of a GCC
22544 builtin and then its argument prototype would still apply. */
503d2be0
AS
22545#ifdef __cplusplus
22546extern "C"
22547#endif
503d2be0 22548char $ac_func ();
48d4b120
DL
22549/* The GNU C library defines this for functions which it implements
22550 to always fail with ENOSYS. Some functions are actually named
22551 something starting with __ and the normal name is an alias. */
ca81d7a0 22552#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22553choke me
cd958eb3
MB
22554#endif
22555
19650fd6
AS
22556int
22557main ()
22558{
ca81d7a0 22559return $ac_func ();
503d2be0
AS
22560 ;
22561 return 0;
22562}
22563_ACEOF
22564rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22565if { (ac_try="$ac_link"
22566case "(($ac_try" in
22567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22568 *) ac_try_echo=$ac_try;;
22569esac
22570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22571 (eval "$ac_link") 2>conftest.er1
503d2be0 22572 ac_status=$?
edfaf76d
LK
22573 grep -v '^ *+' conftest.er1 >conftest.err
22574 rm -f conftest.er1
22575 cat conftest.err >&5
c0d27fcc 22576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22577 (exit $ac_status); } && {
22578 test -z "$ac_c_werror_flag" ||
22579 test ! -s conftest.err
22580 } && test -s conftest$ac_exeext &&
22581 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22582 eval "$as_ac_var=yes"
22583else
22584 echo "$as_me: failed program was:" >&5
19650fd6
AS
22585sed 's/^/| /' conftest.$ac_ext >&5
22586
ca81d7a0 22587 eval "$as_ac_var=no"
503d2be0 22588fi
ca81d7a0 22589
f053c89f 22590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22591 conftest$ac_exeext conftest.$ac_ext
503d2be0 22592fi
ca81d7a0
JD
22593ac_res=`eval echo '${'$as_ac_var'}'`
22594 { echo "$as_me:$LINENO: result: $ac_res" >&5
22595echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22596if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22597 cat >>confdefs.h <<_ACEOF
503d2be0 22598#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22599_ACEOF
48d4b120 22600
48d4b120
DL
22601fi
22602done
22603
b936fae4 22604 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22605 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22606echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22607if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22608 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22609else
503d2be0 22610 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22611/* confdefs.h. */
22612_ACEOF
22613cat confdefs.h >>conftest.$ac_ext
22614cat >>conftest.$ac_ext <<_ACEOF
22615/* end confdefs.h. */
ba4481b5 22616
a3f08d9e
DL
22617#ifdef TIME_WITH_SYS_TIME
22618#include <sys/time.h>
22619#include <time.h>
22620#else
22621#ifdef HAVE_SYS_TIME_H
22622#include <sys/time.h>
22623#else
22624#include <time.h>
22625#endif
22626#endif
503d2be0
AS
22627int
22628main ()
22629{
a3f08d9e 22630struct timeval time;
b936fae4 22631 gettimeofday (&time, 0);
503d2be0
AS
22632 ;
22633 return 0;
22634}
22635_ACEOF
22636rm -f conftest.$ac_objext
f053c89f
CY
22637if { (ac_try="$ac_compile"
22638case "(($ac_try" in
ca81d7a0
JD
22639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22640 *) ac_try_echo=$ac_try;;
22641esac
22642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22643 (eval "$ac_compile") 2>conftest.er1
503d2be0 22644 ac_status=$?
edfaf76d
LK
22645 grep -v '^ *+' conftest.er1 >conftest.err
22646 rm -f conftest.er1
22647 cat conftest.err >&5
c0d27fcc 22648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22649 (exit $ac_status); } && {
22650 test -z "$ac_c_werror_flag" ||
22651 test ! -s conftest.err
22652 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22653 emacs_cv_gettimeofday_two_arguments=yes
22654else
503d2be0 22655 echo "$as_me: failed program was:" >&5
19650fd6
AS
22656sed 's/^/| /' conftest.$ac_ext >&5
22657
ca81d7a0 22658 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22659fi
ca81d7a0
JD
22660
22661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22662fi
ca81d7a0
JD
22663{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22664echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22665 if test $emacs_cv_gettimeofday_two_arguments = no; then
22666
c0d27fcc 22667cat >>confdefs.h <<\_ACEOF
ba4481b5 22668#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22669_ACEOF
ba4481b5 22670
b936fae4 22671 fi
ba4481b5
DL
22672 fi
22673fi
22674
22675ok_so_far=yes
ca81d7a0
JD
22676{ echo "$as_me:$LINENO: checking for socket" >&5
22677echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22678if test "${ac_cv_func_socket+set}" = set; then
22679 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22680else
503d2be0 22681 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22682/* confdefs.h. */
22683_ACEOF
22684cat confdefs.h >>conftest.$ac_ext
22685cat >>conftest.$ac_ext <<_ACEOF
22686/* end confdefs.h. */
edfaf76d
LK
22687/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22688 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22689#define socket innocuous_socket
22690
ba4481b5 22691/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22692 which can conflict with char socket (); below.
22693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22694 <limits.h> exists even on freestanding compilers. */
edfaf76d 22695
19650fd6
AS
22696#ifdef __STDC__
22697# include <limits.h>
22698#else
22699# include <assert.h>
22700#endif
edfaf76d
LK
22701
22702#undef socket
22703
ca81d7a0
JD
22704/* Override any GCC internal prototype to avoid an error.
22705 Use char because int might match the return type of a GCC
22706 builtin and then its argument prototype would still apply. */
503d2be0
AS
22707#ifdef __cplusplus
22708extern "C"
22709#endif
503d2be0 22710char socket ();
ba4481b5
DL
22711/* The GNU C library defines this for functions which it implements
22712 to always fail with ENOSYS. Some functions are actually named
22713 something starting with __ and the normal name is an alias. */
ca81d7a0 22714#if defined __stub_socket || defined __stub___socket
ba4481b5 22715choke me
cd958eb3
MB
22716#endif
22717
19650fd6
AS
22718int
22719main ()
22720{
ca81d7a0 22721return socket ();
503d2be0
AS
22722 ;
22723 return 0;
22724}
22725_ACEOF
22726rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22727if { (ac_try="$ac_link"
22728case "(($ac_try" in
22729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22730 *) ac_try_echo=$ac_try;;
22731esac
22732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22733 (eval "$ac_link") 2>conftest.er1
503d2be0 22734 ac_status=$?
edfaf76d
LK
22735 grep -v '^ *+' conftest.er1 >conftest.err
22736 rm -f conftest.er1
22737 cat conftest.err >&5
c0d27fcc 22738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22739 (exit $ac_status); } && {
22740 test -z "$ac_c_werror_flag" ||
22741 test ! -s conftest.err
22742 } && test -s conftest$ac_exeext &&
22743 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22744 ac_cv_func_socket=yes
22745else
22746 echo "$as_me: failed program was:" >&5
19650fd6
AS
22747sed 's/^/| /' conftest.$ac_ext >&5
22748
ca81d7a0 22749 ac_cv_func_socket=no
503d2be0 22750fi
ca81d7a0 22751
f053c89f 22752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22753 conftest$ac_exeext conftest.$ac_ext
503d2be0 22754fi
ca81d7a0
JD
22755{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22756echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22757if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22758 :
22759else
503d2be0 22760 ok_so_far=no
ba4481b5
DL
22761fi
22762
22763if test $ok_so_far = yes; then
c0d27fcc 22764 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22765 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22766echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22767if test "${ac_cv_header_netinet_in_h+set}" = set; then
22768 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22769fi
ca81d7a0
JD
22770{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22771echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22772else
c0d27fcc 22773 # Is the header compilable?
ca81d7a0
JD
22774{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22775echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22776cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22777/* confdefs.h. */
22778_ACEOF
22779cat confdefs.h >>conftest.$ac_ext
22780cat >>conftest.$ac_ext <<_ACEOF
22781/* end confdefs.h. */
c0d27fcc
MR
22782$ac_includes_default
22783#include <netinet/in.h>
22784_ACEOF
22785rm -f conftest.$ac_objext
ca81d7a0
JD
22786if { (ac_try="$ac_compile"
22787case "(($ac_try" in
22788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22789 *) ac_try_echo=$ac_try;;
22790esac
22791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22792 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22793 ac_status=$?
edfaf76d
LK
22794 grep -v '^ *+' conftest.er1 >conftest.err
22795 rm -f conftest.er1
22796 cat conftest.err >&5
c0d27fcc 22797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22798 (exit $ac_status); } && {
22799 test -z "$ac_c_werror_flag" ||
22800 test ! -s conftest.err
22801 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22802 ac_header_compiler=yes
22803else
22804 echo "$as_me: failed program was:" >&5
19650fd6
AS
22805sed 's/^/| /' conftest.$ac_ext >&5
22806
ca81d7a0 22807 ac_header_compiler=no
c0d27fcc 22808fi
ca81d7a0
JD
22809
22810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22811{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22812echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22813
22814# Is the header present?
ca81d7a0
JD
22815{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22816echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22817cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22818/* confdefs.h. */
22819_ACEOF
22820cat confdefs.h >>conftest.$ac_ext
22821cat >>conftest.$ac_ext <<_ACEOF
22822/* end confdefs.h. */
ba4481b5 22823#include <netinet/in.h>
503d2be0 22824_ACEOF
ca81d7a0
JD
22825if { (ac_try="$ac_cpp conftest.$ac_ext"
22826case "(($ac_try" in
22827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22828 *) ac_try_echo=$ac_try;;
22829esac
22830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22831 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22832 ac_status=$?
6bae0ccf 22833 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22834 rm -f conftest.er1
22835 cat conftest.err >&5
c0d27fcc 22836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22837 (exit $ac_status); } >/dev/null && {
22838 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22839 test ! -s conftest.err
22840 }; then
c0d27fcc 22841 ac_header_preproc=yes
ba4481b5 22842else
503d2be0 22843 echo "$as_me: failed program was:" >&5
19650fd6
AS
22844sed 's/^/| /' conftest.$ac_ext >&5
22845
c0d27fcc 22846 ac_header_preproc=no
ba4481b5 22847fi
ca81d7a0 22848
503d2be0 22849rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22850{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22851echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22852
22853# So? What about this header?
edfaf76d
LK
22854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22855 yes:no: )
c0d27fcc
MR
22856 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22857echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22858 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22859echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22860 ac_header_preproc=yes
19650fd6 22861 ;;
edfaf76d 22862 no:yes:* )
c0d27fcc
MR
22863 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22864echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22865 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22866echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22867 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22868echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22869 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22870echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22871 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22872echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22873 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22874echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22875
19650fd6 22876 ;;
c0d27fcc 22877esac
ca81d7a0
JD
22878{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22879echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22880if test "${ac_cv_header_netinet_in_h+set}" = set; then
22881 echo $ECHO_N "(cached) $ECHO_C" >&6
22882else
22883 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22884fi
ca81d7a0
JD
22885{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22886echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22887
22888fi
503d2be0 22889if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22890 :
22891else
503d2be0 22892 ok_so_far=no
ba4481b5
DL
22893fi
22894
c0d27fcc 22895
ba4481b5
DL
22896fi
22897if test $ok_so_far = yes; then
c0d27fcc 22898 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22899 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22900echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22901if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22902 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22903fi
ca81d7a0
JD
22904{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22905echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22906else
c0d27fcc 22907 # Is the header compilable?
ca81d7a0
JD
22908{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22909echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22910cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22911/* confdefs.h. */
22912_ACEOF
22913cat confdefs.h >>conftest.$ac_ext
22914cat >>conftest.$ac_ext <<_ACEOF
22915/* end confdefs.h. */
c0d27fcc
MR
22916$ac_includes_default
22917#include <arpa/inet.h>
22918_ACEOF
22919rm -f conftest.$ac_objext
ca81d7a0
JD
22920if { (ac_try="$ac_compile"
22921case "(($ac_try" in
22922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22923 *) ac_try_echo=$ac_try;;
22924esac
22925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22926 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22927 ac_status=$?
edfaf76d
LK
22928 grep -v '^ *+' conftest.er1 >conftest.err
22929 rm -f conftest.er1
22930 cat conftest.err >&5
c0d27fcc 22931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22932 (exit $ac_status); } && {
22933 test -z "$ac_c_werror_flag" ||
22934 test ! -s conftest.err
22935 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22936 ac_header_compiler=yes
22937else
22938 echo "$as_me: failed program was:" >&5
19650fd6
AS
22939sed 's/^/| /' conftest.$ac_ext >&5
22940
ca81d7a0 22941 ac_header_compiler=no
c0d27fcc 22942fi
ca81d7a0
JD
22943
22944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22945{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22946echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22947
22948# Is the header present?
ca81d7a0
JD
22949{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22950echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22951cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22952/* confdefs.h. */
22953_ACEOF
22954cat confdefs.h >>conftest.$ac_ext
22955cat >>conftest.$ac_ext <<_ACEOF
22956/* end confdefs.h. */
ba4481b5 22957#include <arpa/inet.h>
503d2be0 22958_ACEOF
ca81d7a0
JD
22959if { (ac_try="$ac_cpp conftest.$ac_ext"
22960case "(($ac_try" in
22961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22962 *) ac_try_echo=$ac_try;;
22963esac
22964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22965 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22966 ac_status=$?
6bae0ccf 22967 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22968 rm -f conftest.er1
22969 cat conftest.err >&5
c0d27fcc 22970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22971 (exit $ac_status); } >/dev/null && {
22972 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22973 test ! -s conftest.err
22974 }; then
c0d27fcc 22975 ac_header_preproc=yes
ba4481b5 22976else
503d2be0 22977 echo "$as_me: failed program was:" >&5
19650fd6
AS
22978sed 's/^/| /' conftest.$ac_ext >&5
22979
c0d27fcc 22980 ac_header_preproc=no
ba4481b5 22981fi
ca81d7a0 22982
503d2be0 22983rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22984{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22985echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22986
22987# So? What about this header?
edfaf76d
LK
22988case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22989 yes:no: )
c0d27fcc
MR
22990 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22991echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22992 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22993echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22994 ac_header_preproc=yes
19650fd6 22995 ;;
edfaf76d 22996 no:yes:* )
c0d27fcc
MR
22997 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22998echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22999 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23000echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23001 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23002echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23003 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23004echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23005 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23006echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23007 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23008echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23009
19650fd6 23010 ;;
c0d27fcc 23011esac
ca81d7a0
JD
23012{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23013echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23014if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23015 echo $ECHO_N "(cached) $ECHO_C" >&6
23016else
23017 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23018fi
ca81d7a0
JD
23019{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23020echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23021
23022fi
503d2be0 23023if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23024 :
23025else
503d2be0 23026 ok_so_far=no
ba4481b5
DL
23027fi
23028
c0d27fcc 23029
ba4481b5
DL
23030fi
23031if test $ok_so_far = yes; then
b936fae4 23032
c0d27fcc 23033cat >>confdefs.h <<\_ACEOF
ba4481b5 23034#define HAVE_INET_SOCKETS 1
c0d27fcc 23035_ACEOF
ba4481b5
DL
23036
23037fi
23038
2d2b6695 23039
7862d3a8 23040for ac_header in sys/ioctl.h
2d2b6695
KS
23041do
23042as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23043if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23044 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23045echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23046if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23047 echo $ECHO_N "(cached) $ECHO_C" >&6
23048fi
ca81d7a0
JD
23049ac_res=`eval echo '${'$as_ac_Header'}'`
23050 { echo "$as_me:$LINENO: result: $ac_res" >&5
23051echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23052else
23053 # Is the header compilable?
ca81d7a0
JD
23054{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23055echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23056cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23057/* confdefs.h. */
23058_ACEOF
23059cat confdefs.h >>conftest.$ac_ext
23060cat >>conftest.$ac_ext <<_ACEOF
23061/* end confdefs.h. */
23062$ac_includes_default
23063#include <$ac_header>
23064_ACEOF
23065rm -f conftest.$ac_objext
ca81d7a0
JD
23066if { (ac_try="$ac_compile"
23067case "(($ac_try" in
23068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23069 *) ac_try_echo=$ac_try;;
23070esac
23071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23072 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23073 ac_status=$?
edfaf76d
LK
23074 grep -v '^ *+' conftest.er1 >conftest.err
23075 rm -f conftest.er1
23076 cat conftest.err >&5
2d2b6695 23077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23078 (exit $ac_status); } && {
23079 test -z "$ac_c_werror_flag" ||
23080 test ! -s conftest.err
23081 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23082 ac_header_compiler=yes
23083else
23084 echo "$as_me: failed program was:" >&5
23085sed 's/^/| /' conftest.$ac_ext >&5
23086
ca81d7a0 23087 ac_header_compiler=no
2d2b6695 23088fi
ca81d7a0
JD
23089
23090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23091{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23092echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23093
23094# Is the header present?
ca81d7a0
JD
23095{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23096echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23097cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23098/* confdefs.h. */
23099_ACEOF
23100cat confdefs.h >>conftest.$ac_ext
23101cat >>conftest.$ac_ext <<_ACEOF
23102/* end confdefs.h. */
23103#include <$ac_header>
23104_ACEOF
ca81d7a0
JD
23105if { (ac_try="$ac_cpp conftest.$ac_ext"
23106case "(($ac_try" in
23107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23108 *) ac_try_echo=$ac_try;;
23109esac
23110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23111 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23112 ac_status=$?
23113 grep -v '^ *+' conftest.er1 >conftest.err
23114 rm -f conftest.er1
23115 cat conftest.err >&5
23116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23117 (exit $ac_status); } >/dev/null && {
23118 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23119 test ! -s conftest.err
23120 }; then
2d2b6695
KS
23121 ac_header_preproc=yes
23122else
23123 echo "$as_me: failed program was:" >&5
23124sed 's/^/| /' conftest.$ac_ext >&5
23125
23126 ac_header_preproc=no
23127fi
ca81d7a0 23128
2d2b6695 23129rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23130{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23131echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23132
23133# So? What about this header?
edfaf76d
LK
23134case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23135 yes:no: )
2d2b6695
KS
23136 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23137echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23138 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23139echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23140 ac_header_preproc=yes
2d2b6695 23141 ;;
edfaf76d 23142 no:yes:* )
2d2b6695
KS
23143 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23144echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23145 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23146echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23147 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23148echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23149 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23150echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23151 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23152echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23153 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23154echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23155
2d2b6695
KS
23156 ;;
23157esac
ca81d7a0
JD
23158{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23159echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23160if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23161 echo $ECHO_N "(cached) $ECHO_C" >&6
23162else
edfaf76d 23163 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23164fi
ca81d7a0
JD
23165ac_res=`eval echo '${'$as_ac_Header'}'`
23166 { echo "$as_me:$LINENO: result: $ac_res" >&5
23167echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23168
23169fi
23170if test `eval echo '${'$as_ac_Header'}'` = yes; then
23171 cat >>confdefs.h <<_ACEOF
23172#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23173_ACEOF
23174
23175fi
23176
23177done
23178
23179
ba4481b5 23180if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23181
c0d27fcc 23182cat >>confdefs.h <<\_ACEOF
ba4481b5 23183#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23184_ACEOF
ba4481b5
DL
23185
23186fi
23187
ca81d7a0
JD
23188{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23189echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23190if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23191 { echo "$as_me:$LINENO: result: yes" >&5
23192echo "${ECHO_T}yes" >&6; }
b936fae4 23193
c0d27fcc 23194cat >>confdefs.h <<\_ACEOF
3d9fec71 23195#define HAVE_DEV_PTMX 1
c0d27fcc 23196_ACEOF
3d9fec71
DL
23197
23198else
ca81d7a0
JD
23199 { echo "$as_me:$LINENO: result: no" >&5
23200echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23201fi
23202
ca81d7a0
JD
23203{ echo "$as_me:$LINENO: checking for pid_t" >&5
23204echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23205if test "${ac_cv_type_pid_t+set}" = set; then
23206 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23207else
503d2be0 23208 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23209/* confdefs.h. */
23210_ACEOF
23211cat confdefs.h >>conftest.$ac_ext
23212cat >>conftest.$ac_ext <<_ACEOF
23213/* end confdefs.h. */
503d2be0 23214$ac_includes_default
ca81d7a0 23215typedef pid_t ac__type_new_;
503d2be0
AS
23216int
23217main ()
23218{
ca81d7a0 23219if ((ac__type_new_ *) 0)
503d2be0 23220 return 0;
ca81d7a0 23221if (sizeof (ac__type_new_))
503d2be0
AS
23222 return 0;
23223 ;
23224 return 0;
23225}
23226_ACEOF
23227rm -f conftest.$ac_objext
ca81d7a0
JD
23228if { (ac_try="$ac_compile"
23229case "(($ac_try" in
23230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23231 *) ac_try_echo=$ac_try;;
23232esac
23233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23234 (eval "$ac_compile") 2>conftest.er1
503d2be0 23235 ac_status=$?
edfaf76d
LK
23236 grep -v '^ *+' conftest.er1 >conftest.err
23237 rm -f conftest.er1
23238 cat conftest.err >&5
c0d27fcc 23239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23240 (exit $ac_status); } && {
23241 test -z "$ac_c_werror_flag" ||
23242 test ! -s conftest.err
23243 } && test -s conftest.$ac_objext; then
647847ea
DL
23244 ac_cv_type_pid_t=yes
23245else
503d2be0 23246 echo "$as_me: failed program was:" >&5
19650fd6
AS
23247sed 's/^/| /' conftest.$ac_ext >&5
23248
ca81d7a0 23249 ac_cv_type_pid_t=no
647847ea 23250fi
ca81d7a0
JD
23251
23252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23253fi
ca81d7a0
JD
23254{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23255echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23256if test $ac_cv_type_pid_t = yes; then
23257 :
23258else
23259
c0d27fcc 23260cat >>confdefs.h <<_ACEOF
647847ea 23261#define pid_t int
c0d27fcc 23262_ACEOF
647847ea
DL
23263
23264fi
23265
c0d27fcc 23266
ca81d7a0 23267for ac_header in vfork.h
503d2be0
AS
23268do
23269as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23270if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23271 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23272echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23273if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23274 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23275fi
ca81d7a0
JD
23276ac_res=`eval echo '${'$as_ac_Header'}'`
23277 { echo "$as_me:$LINENO: result: $ac_res" >&5
23278echo "${ECHO_T}$ac_res" >&6; }
98418dba 23279else
c0d27fcc 23280 # Is the header compilable?
ca81d7a0
JD
23281{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23282echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23283cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23284/* confdefs.h. */
23285_ACEOF
23286cat confdefs.h >>conftest.$ac_ext
23287cat >>conftest.$ac_ext <<_ACEOF
23288/* end confdefs.h. */
c0d27fcc
MR
23289$ac_includes_default
23290#include <$ac_header>
23291_ACEOF
23292rm -f conftest.$ac_objext
ca81d7a0
JD
23293if { (ac_try="$ac_compile"
23294case "(($ac_try" in
23295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23296 *) ac_try_echo=$ac_try;;
23297esac
23298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23299 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23300 ac_status=$?
edfaf76d
LK
23301 grep -v '^ *+' conftest.er1 >conftest.err
23302 rm -f conftest.er1
23303 cat conftest.err >&5
c0d27fcc 23304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23305 (exit $ac_status); } && {
23306 test -z "$ac_c_werror_flag" ||
23307 test ! -s conftest.err
23308 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23309 ac_header_compiler=yes
23310else
23311 echo "$as_me: failed program was:" >&5
19650fd6
AS
23312sed 's/^/| /' conftest.$ac_ext >&5
23313
ca81d7a0 23314 ac_header_compiler=no
c0d27fcc 23315fi
ca81d7a0
JD
23316
23317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23318{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23319echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23320
23321# Is the header present?
ca81d7a0
JD
23322{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23323echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23324cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23325/* confdefs.h. */
23326_ACEOF
23327cat confdefs.h >>conftest.$ac_ext
23328cat >>conftest.$ac_ext <<_ACEOF
23329/* end confdefs.h. */
503d2be0
AS
23330#include <$ac_header>
23331_ACEOF
ca81d7a0
JD
23332if { (ac_try="$ac_cpp conftest.$ac_ext"
23333case "(($ac_try" in
23334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23335 *) ac_try_echo=$ac_try;;
23336esac
23337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23338 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23339 ac_status=$?
6bae0ccf 23340 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23341 rm -f conftest.er1
23342 cat conftest.err >&5
c0d27fcc 23343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23344 (exit $ac_status); } >/dev/null && {
23345 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23346 test ! -s conftest.err
23347 }; then
c0d27fcc 23348 ac_header_preproc=yes
647847ea 23349else
503d2be0 23350 echo "$as_me: failed program was:" >&5
19650fd6
AS
23351sed 's/^/| /' conftest.$ac_ext >&5
23352
c0d27fcc 23353 ac_header_preproc=no
647847ea 23354fi
ca81d7a0 23355
503d2be0 23356rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23357{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23358echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23359
23360# So? What about this header?
edfaf76d
LK
23361case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23362 yes:no: )
c0d27fcc
MR
23363 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23364echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23365 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23366echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23367 ac_header_preproc=yes
19650fd6 23368 ;;
edfaf76d 23369 no:yes:* )
c0d27fcc
MR
23370 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23371echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23372 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23373echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23374 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23375echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23376 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23377echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23378 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23379echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23380 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23381echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23382
19650fd6 23383 ;;
c0d27fcc 23384esac
ca81d7a0
JD
23385{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23388 echo $ECHO_N "(cached) $ECHO_C" >&6
23389else
edfaf76d 23390 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23391fi
ca81d7a0
JD
23392ac_res=`eval echo '${'$as_ac_Header'}'`
23393 { echo "$as_me:$LINENO: result: $ac_res" >&5
23394echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23395
23396fi
503d2be0 23397if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23398 cat >>confdefs.h <<_ACEOF
503d2be0 23399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23400_ACEOF
647847ea 23401
73b77ee5 23402fi
c0d27fcc 23403
503d2be0 23404done
73b77ee5 23405
c0d27fcc
MR
23406
23407
503d2be0
AS
23408for ac_func in fork vfork
23409do
23410as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23411{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23412echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23413if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23414 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23415else
503d2be0 23416 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23417/* confdefs.h. */
23418_ACEOF
23419cat confdefs.h >>conftest.$ac_ext
23420cat >>conftest.$ac_ext <<_ACEOF
23421/* end confdefs.h. */
edfaf76d
LK
23422/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23423 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23424#define $ac_func innocuous_$ac_func
23425
fa0b693c 23426/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23427 which can conflict with char $ac_func (); below.
23428 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23429 <limits.h> exists even on freestanding compilers. */
edfaf76d 23430
19650fd6
AS
23431#ifdef __STDC__
23432# include <limits.h>
23433#else
23434# include <assert.h>
23435#endif
edfaf76d
LK
23436
23437#undef $ac_func
23438
ca81d7a0
JD
23439/* Override any GCC internal prototype to avoid an error.
23440 Use char because int might match the return type of a GCC
23441 builtin and then its argument prototype would still apply. */
503d2be0
AS
23442#ifdef __cplusplus
23443extern "C"
23444#endif
503d2be0 23445char $ac_func ();
fa0b693c
GM
23446/* The GNU C library defines this for functions which it implements
23447 to always fail with ENOSYS. Some functions are actually named
23448 something starting with __ and the normal name is an alias. */
ca81d7a0 23449#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23450choke me
fa0b693c
GM
23451#endif
23452
19650fd6
AS
23453int
23454main ()
23455{
ca81d7a0 23456return $ac_func ();
503d2be0
AS
23457 ;
23458 return 0;
23459}
23460_ACEOF
23461rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23462if { (ac_try="$ac_link"
23463case "(($ac_try" in
23464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23465 *) ac_try_echo=$ac_try;;
23466esac
23467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23468 (eval "$ac_link") 2>conftest.er1
503d2be0 23469 ac_status=$?
edfaf76d
LK
23470 grep -v '^ *+' conftest.er1 >conftest.err
23471 rm -f conftest.er1
23472 cat conftest.err >&5
c0d27fcc 23473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23474 (exit $ac_status); } && {
23475 test -z "$ac_c_werror_flag" ||
23476 test ! -s conftest.err
23477 } && test -s conftest$ac_exeext &&
23478 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23479 eval "$as_ac_var=yes"
23480else
23481 echo "$as_me: failed program was:" >&5
19650fd6
AS
23482sed 's/^/| /' conftest.$ac_ext >&5
23483
ca81d7a0 23484 eval "$as_ac_var=no"
503d2be0 23485fi
ca81d7a0 23486
f053c89f 23487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23488 conftest$ac_exeext conftest.$ac_ext
503d2be0 23489fi
ca81d7a0
JD
23490ac_res=`eval echo '${'$as_ac_var'}'`
23491 { echo "$as_me:$LINENO: result: $ac_res" >&5
23492echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23493if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23494 cat >>confdefs.h <<_ACEOF
503d2be0 23495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23496_ACEOF
503d2be0 23497
fa0b693c 23498fi
503d2be0 23499done
fa0b693c 23500
503d2be0 23501if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23502 { echo "$as_me:$LINENO: checking for working fork" >&5
23503echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23504if test "${ac_cv_func_fork_works+set}" = set; then
23505 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23506else
503d2be0
AS
23507 if test "$cross_compiling" = yes; then
23508 ac_cv_func_fork_works=cross
23509else
23510 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23511/* confdefs.h. */
23512_ACEOF
23513cat confdefs.h >>conftest.$ac_ext
23514cat >>conftest.$ac_ext <<_ACEOF
23515/* end confdefs.h. */
23516$ac_includes_default
23517int
23518main ()
23519{
23520
23521 /* By Ruediger Kuhlmann. */
23522 return fork () < 0;
23523
23524 ;
23525 return 0;
23526}
503d2be0
AS
23527_ACEOF
23528rm -f conftest$ac_exeext
ca81d7a0
JD
23529if { (ac_try="$ac_link"
23530case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
23534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23535 (eval "$ac_link") 2>&5
503d2be0 23536 ac_status=$?
c0d27fcc 23537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23539 { (case "(($ac_try" in
23540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23541 *) ac_try_echo=$ac_try;;
23542esac
23543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23544 (eval "$ac_try") 2>&5
503d2be0 23545 ac_status=$?
c0d27fcc 23546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23547 (exit $ac_status); }; }; then
23548 ac_cv_func_fork_works=yes
23549else
23550 echo "$as_me: program exited with status $ac_status" >&5
23551echo "$as_me: failed program was:" >&5
19650fd6
AS
23552sed 's/^/| /' conftest.$ac_ext >&5
23553
c0d27fcc 23554( exit $ac_status )
503d2be0
AS
23555ac_cv_func_fork_works=no
23556fi
ca81d7a0 23557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23558fi
ca81d7a0
JD
23559
23560
503d2be0 23561fi
ca81d7a0
JD
23562{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23563echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23564
6bae0ccf
DL
23565else
23566 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23567fi
23568if test "x$ac_cv_func_fork_works" = xcross; then
23569 case $host in
23570 *-*-amigaos* | *-*-msdosdjgpp*)
23571 # Override, as these systems have only a dummy fork() stub
23572 ac_cv_func_fork_works=no
23573 ;;
23574 *)
23575 ac_cv_func_fork_works=yes
23576 ;;
23577 esac
c0d27fcc
MR
23578 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23579echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23580fi
73b77ee5 23581ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23582if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23583 { echo "$as_me:$LINENO: checking for working vfork" >&5
23584echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23585if test "${ac_cv_func_vfork_works+set}" = set; then
23586 echo $ECHO_N "(cached) $ECHO_C" >&6
23587else
23588 if test "$cross_compiling" = yes; then
23589 ac_cv_func_vfork_works=cross
fa0b693c 23590else
503d2be0 23591 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23592/* confdefs.h. */
23593_ACEOF
23594cat confdefs.h >>conftest.$ac_ext
23595cat >>conftest.$ac_ext <<_ACEOF
23596/* end confdefs.h. */
73b77ee5 23597/* Thanks to Paul Eggert for this test. */
ca81d7a0 23598$ac_includes_default
19650fd6 23599#include <sys/wait.h>
f053c89f 23600#ifdef HAVE_VFORK_H
503d2be0 23601# include <vfork.h>
73b77ee5
GM
23602#endif
23603/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23604 argument registers are propagated back to the parent. The compiler
23605 is told about this with #include <vfork.h>, but some compilers
23606 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23607 static variable whose address is put into a register that is
23608 clobbered by the vfork. */
19650fd6 23609static void
fa0b693c 23610#ifdef __cplusplus
73b77ee5 23611sparc_address_test (int arg)
503d2be0 23612# else
73b77ee5 23613sparc_address_test (arg) int arg;
fa0b693c 23614#endif
fa0b693c 23615{
73b77ee5
GM
23616 static pid_t child;
23617 if (!child) {
23618 child = vfork ();
23619 if (child < 0) {
23620 perror ("vfork");
23621 _exit(2);
23622 }
23623 if (!child) {
23624 arg = getpid();
23625 write(-1, "", 0);
23626 _exit (arg);
23627 }
23628 }
23629}
503d2be0
AS
23630
23631int
23632main ()
23633{
73b77ee5
GM
23634 pid_t parent = getpid ();
23635 pid_t child;
fa0b693c 23636
19650fd6 23637 sparc_address_test (0);
fa0b693c 23638
73b77ee5 23639 child = vfork ();
fa0b693c 23640
73b77ee5 23641 if (child == 0) {
503d2be0
AS
23642 /* Here is another test for sparc vfork register problems. This
23643 test uses lots of local variables, at least as many local
23644 variables as main has allocated so far including compiler
23645 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23646 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23647 reuse the register of parent for one of the local variables,
23648 since it will think that parent can't possibly be used any more
23649 in this routine. Assigning to the local variable will thus
23650 munge parent in the parent process. */
73b77ee5
GM
23651 pid_t
23652 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23653 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23654 /* Convince the compiler that p..p7 are live; otherwise, it might
23655 use the same hardware register for all 8 local variables. */
23656 if (p != p1 || p != p2 || p != p3 || p != p4
23657 || p != p5 || p != p6 || p != p7)
23658 _exit(1);
fa0b693c 23659
503d2be0
AS
23660 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23661 from child file descriptors. If the child closes a descriptor
23662 before it execs or exits, this munges the parent's descriptor
23663 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23664 _exit(close(fileno(stdout)) != 0);
23665 } else {
23666 int status;
23667 struct stat st;
23668
23669 while (wait(&status) != child)
23670 ;
ca81d7a0 23671 return (
73b77ee5
GM
23672 /* Was there some problem with vforking? */
23673 child < 0
23674
23675 /* Did the child fail? (This shouldn't happen.) */
23676 || status
23677
23678 /* Did the vfork/compiler bug occur? */
23679 || parent != getpid()
fa0b693c 23680
73b77ee5
GM
23681 /* Did the file descriptor bug occur? */
23682 || fstat(fileno(stdout), &st) != 0
23683 );
23684 }
23685}
503d2be0
AS
23686_ACEOF
23687rm -f conftest$ac_exeext
ca81d7a0
JD
23688if { (ac_try="$ac_link"
23689case "(($ac_try" in
23690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23691 *) ac_try_echo=$ac_try;;
23692esac
23693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23694 (eval "$ac_link") 2>&5
503d2be0 23695 ac_status=$?
c0d27fcc 23696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23698 { (case "(($ac_try" in
23699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23700 *) ac_try_echo=$ac_try;;
23701esac
23702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23703 (eval "$ac_try") 2>&5
503d2be0 23704 ac_status=$?
c0d27fcc 23705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23706 (exit $ac_status); }; }; then
73b77ee5 23707 ac_cv_func_vfork_works=yes
fa0b693c 23708else
503d2be0
AS
23709 echo "$as_me: program exited with status $ac_status" >&5
23710echo "$as_me: failed program was:" >&5
19650fd6
AS
23711sed 's/^/| /' conftest.$ac_ext >&5
23712
c0d27fcc 23713( exit $ac_status )
503d2be0
AS
23714ac_cv_func_vfork_works=no
23715fi
ca81d7a0 23716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23717fi
ca81d7a0
JD
23718
23719
fa0b693c 23720fi
ca81d7a0
JD
23721{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23722echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23723
503d2be0
AS
23724fi;
23725if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23726 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23727 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23728echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23729fi
23730
503d2be0
AS
23731if test "x$ac_cv_func_vfork_works" = xyes; then
23732
c0d27fcc 23733cat >>confdefs.h <<\_ACEOF
503d2be0 23734#define HAVE_WORKING_VFORK 1
c0d27fcc 23735_ACEOF
503d2be0
AS
23736
23737else
23738
c0d27fcc 23739cat >>confdefs.h <<\_ACEOF
73b77ee5 23740#define vfork fork
c0d27fcc 23741_ACEOF
fa0b693c
GM
23742
23743fi
503d2be0
AS
23744if test "x$ac_cv_func_fork_works" = xyes; then
23745
c0d27fcc 23746cat >>confdefs.h <<\_ACEOF
503d2be0 23747#define HAVE_WORKING_FORK 1
c0d27fcc 23748_ACEOF
fa0b693c 23749
503d2be0 23750fi
647847ea 23751
c0d27fcc 23752
ca81d7a0
JD
23753{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23754echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23755if test "${emacs_cv_langinfo_codeset+set}" = set; then
23756 echo $ECHO_N "(cached) $ECHO_C" >&6
23757else
23758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23759/* confdefs.h. */
23760_ACEOF
23761cat confdefs.h >>conftest.$ac_ext
23762cat >>conftest.$ac_ext <<_ACEOF
23763/* end confdefs.h. */
6a3a24fa
JD
23764#include <langinfo.h>
23765int
23766main ()
23767{
23768char* cs = nl_langinfo(CODESET);
23769 ;
23770 return 0;
23771}
23772_ACEOF
23773rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23774if { (ac_try="$ac_link"
23775case "(($ac_try" in
23776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23777 *) ac_try_echo=$ac_try;;
23778esac
23779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23780 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23781 ac_status=$?
edfaf76d
LK
23782 grep -v '^ *+' conftest.er1 >conftest.err
23783 rm -f conftest.er1
23784 cat conftest.err >&5
6a3a24fa 23785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23786 (exit $ac_status); } && {
23787 test -z "$ac_c_werror_flag" ||
23788 test ! -s conftest.err
23789 } && test -s conftest$ac_exeext &&
23790 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23791 emacs_cv_langinfo_codeset=yes
23792else
23793 echo "$as_me: failed program was:" >&5
19650fd6
AS
23794sed 's/^/| /' conftest.$ac_ext >&5
23795
ca81d7a0 23796 emacs_cv_langinfo_codeset=no
6a3a24fa 23797fi
ca81d7a0 23798
f053c89f 23799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23800 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23801
23802fi
ca81d7a0
JD
23803{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23804echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23805if test $emacs_cv_langinfo_codeset = yes; then
23806
23807cat >>confdefs.h <<\_ACEOF
23808#define HAVE_LANGINFO_CODESET 1
23809_ACEOF
23810
23811fi
23812
ca81d7a0
JD
23813{ echo "$as_me:$LINENO: checking for size_t" >&5
23814echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23815if test "${ac_cv_type_size_t+set}" = set; then
23816 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23817else
503d2be0 23818 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23819/* confdefs.h. */
23820_ACEOF
23821cat confdefs.h >>conftest.$ac_ext
23822cat >>conftest.$ac_ext <<_ACEOF
23823/* end confdefs.h. */
503d2be0 23824$ac_includes_default
ca81d7a0 23825typedef size_t ac__type_new_;
503d2be0
AS
23826int
23827main ()
23828{
ca81d7a0 23829if ((ac__type_new_ *) 0)
503d2be0 23830 return 0;
ca81d7a0 23831if (sizeof (ac__type_new_))
503d2be0
AS
23832 return 0;
23833 ;
23834 return 0;
23835}
23836_ACEOF
23837rm -f conftest.$ac_objext
ca81d7a0
JD
23838if { (ac_try="$ac_compile"
23839case "(($ac_try" in
23840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23841 *) ac_try_echo=$ac_try;;
23842esac
23843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23844 (eval "$ac_compile") 2>conftest.er1
503d2be0 23845 ac_status=$?
edfaf76d
LK
23846 grep -v '^ *+' conftest.er1 >conftest.err
23847 rm -f conftest.er1
23848 cat conftest.err >&5
c0d27fcc 23849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23850 (exit $ac_status); } && {
23851 test -z "$ac_c_werror_flag" ||
23852 test ! -s conftest.err
23853 } && test -s conftest.$ac_objext; then
8730a8da
DL
23854 ac_cv_type_size_t=yes
23855else
503d2be0 23856 echo "$as_me: failed program was:" >&5
19650fd6
AS
23857sed 's/^/| /' conftest.$ac_ext >&5
23858
ca81d7a0 23859 ac_cv_type_size_t=no
8730a8da 23860fi
ca81d7a0
JD
23861
23862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23863fi
ca81d7a0
JD
23864{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23865echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23866if test $ac_cv_type_size_t = yes; then
503d2be0 23867
c0d27fcc
MR
23868cat >>confdefs.h <<_ACEOF
23869#define HAVE_SIZE_T 1
23870_ACEOF
23871
8730a8da
DL
23872
23873fi
23874
c0d27fcc 23875
ca81d7a0
JD
23876{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23877echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23878if test "${ac_cv_type_mbstate_t+set}" = set; then
23879 echo $ECHO_N "(cached) $ECHO_C" >&6
23880else
23881 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23882/* confdefs.h. */
23883_ACEOF
23884cat confdefs.h >>conftest.$ac_ext
23885cat >>conftest.$ac_ext <<_ACEOF
23886/* end confdefs.h. */
973a76b1
DL
23887$ac_includes_default
23888# include <wchar.h>
23889int
23890main ()
23891{
23892mbstate_t x; return sizeof x;
23893 ;
23894 return 0;
23895}
23896_ACEOF
23897rm -f conftest.$ac_objext
ca81d7a0
JD
23898if { (ac_try="$ac_compile"
23899case "(($ac_try" in
23900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23901 *) ac_try_echo=$ac_try;;
23902esac
23903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23904 (eval "$ac_compile") 2>conftest.er1
973a76b1 23905 ac_status=$?
edfaf76d
LK
23906 grep -v '^ *+' conftest.er1 >conftest.err
23907 rm -f conftest.er1
23908 cat conftest.err >&5
973a76b1 23909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23910 (exit $ac_status); } && {
23911 test -z "$ac_c_werror_flag" ||
23912 test ! -s conftest.err
23913 } && test -s conftest.$ac_objext; then
973a76b1
DL
23914 ac_cv_type_mbstate_t=yes
23915else
23916 echo "$as_me: failed program was:" >&5
19650fd6
AS
23917sed 's/^/| /' conftest.$ac_ext >&5
23918
ca81d7a0 23919 ac_cv_type_mbstate_t=no
973a76b1 23920fi
ca81d7a0
JD
23921
23922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23923fi
ca81d7a0
JD
23924{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23925echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23926 if test $ac_cv_type_mbstate_t = yes; then
23927
23928cat >>confdefs.h <<\_ACEOF
23929#define HAVE_MBSTATE_T 1
23930_ACEOF
23931
23932 else
23933
23934cat >>confdefs.h <<\_ACEOF
23935#define mbstate_t int
23936_ACEOF
23937
23938 fi
23939
ca81d7a0
JD
23940{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23941echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23942if test "${emacs_cv_c_restrict+set}" = set; then
23943 echo $ECHO_N "(cached) $ECHO_C" >&6
23944else
23945 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23946/* confdefs.h. */
23947_ACEOF
23948cat confdefs.h >>conftest.$ac_ext
23949cat >>conftest.$ac_ext <<_ACEOF
23950/* end confdefs.h. */
22044edf
DL
23951void fred (int *restrict x);
23952int
23953main ()
23954{
b936fae4 23955
22044edf
DL
23956 ;
23957 return 0;
23958}
c0d27fcc 23959_ACEOF
22044edf 23960rm -f conftest.$ac_objext
ca81d7a0
JD
23961if { (ac_try="$ac_compile"
23962case "(($ac_try" in
23963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23964 *) ac_try_echo=$ac_try;;
23965esac
23966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23967 (eval "$ac_compile") 2>conftest.er1
22044edf 23968 ac_status=$?
edfaf76d
LK
23969 grep -v '^ *+' conftest.er1 >conftest.err
23970 rm -f conftest.er1
23971 cat conftest.err >&5
22044edf 23972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23973 (exit $ac_status); } && {
23974 test -z "$ac_c_werror_flag" ||
23975 test ! -s conftest.err
23976 } && test -s conftest.$ac_objext; then
22044edf
DL
23977 emacs_cv_c_restrict=yes
23978else
23979 echo "$as_me: failed program was:" >&5
19650fd6
AS
23980sed 's/^/| /' conftest.$ac_ext >&5
23981
ca81d7a0 23982 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23983/* confdefs.h. */
23984_ACEOF
23985cat confdefs.h >>conftest.$ac_ext
23986cat >>conftest.$ac_ext <<_ACEOF
23987/* end confdefs.h. */
22044edf
DL
23988void fred (int *__restrict x);
23989int
23990main ()
23991{
c0d27fcc 23992
22044edf
DL
23993 ;
23994 return 0;
23995}
c0d27fcc 23996_ACEOF
22044edf 23997rm -f conftest.$ac_objext
ca81d7a0
JD
23998if { (ac_try="$ac_compile"
23999case "(($ac_try" in
24000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24001 *) ac_try_echo=$ac_try;;
24002esac
24003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24004 (eval "$ac_compile") 2>conftest.er1
22044edf 24005 ac_status=$?
edfaf76d
LK
24006 grep -v '^ *+' conftest.er1 >conftest.err
24007 rm -f conftest.er1
24008 cat conftest.err >&5
22044edf 24009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24010 (exit $ac_status); } && {
24011 test -z "$ac_c_werror_flag" ||
24012 test ! -s conftest.err
24013 } && test -s conftest.$ac_objext; then
22044edf
DL
24014 emacs_cv_c_restrict=__restrict
24015else
24016 echo "$as_me: failed program was:" >&5
19650fd6
AS
24017sed 's/^/| /' conftest.$ac_ext >&5
24018
ca81d7a0 24019 emacs_cv_c_restrict=no
ba4481b5 24020fi
ca81d7a0
JD
24021
24022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24023fi
ca81d7a0
JD
24024
24025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24026fi
ca81d7a0
JD
24027{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24028echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24029case "$emacs_cv_c_restrict" in
24030 yes) emacs_restrict=restrict;;
24031 no) emacs_restrict="";;
24032 *) emacs_restrict="$emacs_cv_c_restrict";;
24033esac
24034if test "$emacs_restrict" != __restrict; then
b936fae4 24035
22044edf
DL
24036cat >>confdefs.h <<_ACEOF
24037#define __restrict $emacs_restrict
c0d27fcc 24038_ACEOF
ba4481b5
DL
24039
24040fi
ba4481b5 24041
ca81d7a0
JD
24042{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24043echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24044if test "${emacs_cv_c_restrict_arr+set}" = set; then
24045 echo $ECHO_N "(cached) $ECHO_C" >&6
24046else
24047 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24048/* confdefs.h. */
24049_ACEOF
24050cat confdefs.h >>conftest.$ac_ext
24051cat >>conftest.$ac_ext <<_ACEOF
24052/* end confdefs.h. */
22044edf
DL
24053void fred (int x[__restrict]);
24054int
24055main ()
24056{
b936fae4 24057
22044edf
DL
24058 ;
24059 return 0;
24060}
c0d27fcc 24061_ACEOF
22044edf 24062rm -f conftest.$ac_objext
ca81d7a0
JD
24063if { (ac_try="$ac_compile"
24064case "(($ac_try" in
24065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24066 *) ac_try_echo=$ac_try;;
24067esac
24068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24069 (eval "$ac_compile") 2>conftest.er1
22044edf 24070 ac_status=$?
edfaf76d
LK
24071 grep -v '^ *+' conftest.er1 >conftest.err
24072 rm -f conftest.er1
24073 cat conftest.err >&5
22044edf 24074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24075 (exit $ac_status); } && {
24076 test -z "$ac_c_werror_flag" ||
24077 test ! -s conftest.err
24078 } && test -s conftest.$ac_objext; then
22044edf
DL
24079 emacs_cv_c_restrict_arr=yes
24080else
24081 echo "$as_me: failed program was:" >&5
19650fd6
AS
24082sed 's/^/| /' conftest.$ac_ext >&5
24083
ca81d7a0 24084 emacs_cv_c_restrict_arr=no
ba4481b5 24085fi
ca81d7a0
JD
24086
24087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24088fi
ca81d7a0
JD
24089{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24090echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24091if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24092
c0d27fcc 24093cat >>confdefs.h <<\_ACEOF
22044edf 24094#define __restrict_arr __restrict
c0d27fcc 24095_ACEOF
ba4481b5 24096
ba4481b5
DL
24097fi
24098
c0d27fcc 24099
c0d27fcc 24100
22044edf
DL
24101# Set up the CFLAGS for real compilation, so we can substitute it.
24102CFLAGS="$REAL_CFLAGS"
24103CPPFLAGS="$REAL_CPPFLAGS"
24104
24105#### Find out which version of Emacs this is.
24106version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24107 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24108if test x"${version}" = x; then
24109 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24110echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24111 { (exit 1); exit 1; }; }
24112fi
24113
24114### Specify what sort of things we'll be editing into Makefile and config.h.
24115### Use configuration here uncanonicalized to avoid exceeding size limits.
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
6a3a24fa 24148
22044edf
DL
24149
24150
24151cat >>confdefs.h <<_ACEOF
24152#define EMACS_CONFIGURATION "${canonical}"
24153_ACEOF
24154
24155
24156cat >>confdefs.h <<_ACEOF
24157#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24158_ACEOF
24159
24160
24161cat >>confdefs.h <<_ACEOF
24162#define config_machfile "${machfile}"
24163_ACEOF
24164
24165
24166cat >>confdefs.h <<_ACEOF
24167#define config_opsysfile "${opsysfile}"
24168_ACEOF
24169
24170
24171cat >>confdefs.h <<_ACEOF
24172#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24173_ACEOF
24174
24175
24176cat >>confdefs.h <<_ACEOF
24177#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24178_ACEOF
24179
24180
24181cat >>confdefs.h <<_ACEOF
24182#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24183_ACEOF
24184
24185
24186cat >>confdefs.h <<_ACEOF
24187#define UNEXEC_SRC ${UNEXEC_SRC}
24188_ACEOF
24189
24190
24191if test "${HAVE_X_WINDOWS}" = "yes" ; then
24192
24193cat >>confdefs.h <<\_ACEOF
24194#define HAVE_X_WINDOWS 1
24195_ACEOF
24196
24197fi
24198if test "${USE_X_TOOLKIT}" != "none" ; then
24199
24200cat >>confdefs.h <<\_ACEOF
24201#define USE_X_TOOLKIT 1
24202_ACEOF
24203
24204fi
24205if test "${HAVE_X11}" = "yes" ; then
24206
24207cat >>confdefs.h <<\_ACEOF
24208#define HAVE_X11 1
24209_ACEOF
24210
24211fi
24212if test "${HAVE_XFREE386}" = "yes" ; then
24213
24214cat >>confdefs.h <<\_ACEOF
24215#define HAVE_XFREE386 1
24216_ACEOF
24217
24218fi
24219if test "${HAVE_MENUS}" = "yes" ; then
24220
24221cat >>confdefs.h <<\_ACEOF
24222#define HAVE_MENUS 1
24223_ACEOF
24224
24225fi
24226if test "${GNU_MALLOC}" = "yes" ; then
24227
24228cat >>confdefs.h <<\_ACEOF
24229#define GNU_MALLOC 1
24230_ACEOF
24231
24232fi
24233if test "${REL_ALLOC}" = "yes" ; then
24234
24235cat >>confdefs.h <<\_ACEOF
24236#define REL_ALLOC 1
24237_ACEOF
24238
24239fi
24240
24241
24242
c0d27fcc
MR
24243
24244
5afbeb22 24245
ba4481b5 24246#### Report on what we decided to do.
488dd4c4
JD
24247#### Report GTK as a toolkit, even if it doesn't use Xt.
24248#### It makes printing result more understandable as using GTK sets
24249#### toolkit_scroll_bars to yes by default.
24250if test "${HAVE_GTK}" = "yes"; then
24251 USE_X_TOOLKIT=GTK
24252fi
24253
ba4481b5
DL
24254echo "
24255Configured for \`${canonical}'.
24256
24257 Where should the build process find the source code? ${srcdir}
24258 What operating system and machine description files should Emacs use?
24259 \`${opsysfile}' and \`${machfile}'
24260 What compiler should emacs be built with? ${CC} ${CFLAGS}
24261 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24262 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24263 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24264 What window system should Emacs use? ${window_system}
8e967cf7 24265 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24266
24267if test -n "${x_includes}"; then
24268echo " Where do we find X Windows header files? ${x_includes}"
24269else
24270echo " Where do we find X Windows header files? Standard dirs"
24271fi
24272if test -n "${x_libraries}"; then
24273echo " Where do we find X Windows libraries? ${x_libraries}"
24274else
24275echo " Where do we find X Windows libraries? Standard dirs"
24276fi
24277
24278echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24279echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24280echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24281echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24282echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24283echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24284echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24285echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
24286echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24287echo
24288
d0098f13
JD
24289if test $USE_XASSERTS = yes; then
24290 echo " Compiling with asserts turned on."
d0098f13
JD
24291 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
24292 echo
24293fi
05cf15c6 24294
a2d3b5bd
JD
24295if test "$USE_X_TOOLKIT" = GTK; then
24296 case "$canonical" in
24297 *cygwin*)
24298 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24299 will probably get a crash on startup. If this happens, please use another
24300 toolkit for Emacs. See etc/PROBLEMS for more information."
24301 ;;
24302 esac
24303fi
24304
05cf15c6 24305
05cf15c6 24306
ba4481b5
DL
24307# Remove any trailing slashes in these variables.
24308test "${prefix}" != NONE &&
24309 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24310test "${exec_prefix}" != NONE &&
24311 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24312
d0e9bfd2
GM
24313## Check if the C preprocessor will convert `..' to `. .'. If so, set
24314## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24315## from Makefile.c can correctly provide the arg `-traditional' to the
24316## C preprocessor.
24317
503d2be0 24318cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24319/* confdefs.h. */
24320_ACEOF
24321cat confdefs.h >>conftest.$ac_ext
24322cat >>conftest.$ac_ext <<_ACEOF
24323/* end confdefs.h. */
d0e9bfd2 24324yes..yes
503d2be0 24325_ACEOF
d0e9bfd2 24326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24327 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24328 CPP_NEED_TRADITIONAL=no
24329else
d0e9bfd2
GM
24330 CPP_NEED_TRADITIONAL=yes
24331fi
24332rm -f conftest*
24333
c0d27fcc 24334
f657c21b 24335ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
24336
24337ac_config_commands="$ac_config_commands default"
24338
503d2be0 24339cat >confcache <<\_ACEOF
ba4481b5
DL
24340# This file is a shell script that caches the results of configure
24341# tests run on this system so they can be shared between configure
503d2be0
AS
24342# scripts and configure runs, see configure's option --config-cache.
24343# It is not useful on other systems. If it contains results you don't
24344# want to keep, you may remove or edit it.
ba4481b5 24345#
503d2be0
AS
24346# config.status only pays attention to the cache file if you give it
24347# the --recheck option to rerun configure.
ba4481b5 24348#
6bae0ccf 24349# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24350# loading this file, other *unset* `ac_cv_foo' will be assigned the
24351# following values.
24352
24353_ACEOF
24354
ba4481b5
DL
24355# The following way of writing the cache mishandles newlines in values,
24356# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24357# So, we kill variables containing newlines.
ba4481b5
DL
24358# Ultrix sh set writes to stderr and can't be redirected directly,
24359# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24360(
24361 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24362 eval ac_val=\$$ac_var
24363 case $ac_val in #(
24364 *${as_nl}*)
24365 case $ac_var in #(
24366 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24367echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24368 esac
24369 case $ac_var in #(
24370 _ | IFS | as_nl) ;; #(
24371 *) $as_unset $ac_var ;;
24372 esac ;;
24373 esac
24374 done
24375
503d2be0 24376 (set) 2>&1 |
ca81d7a0
JD
24377 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24378 *${as_nl}ac_space=\ *)
503d2be0
AS
24379 # `set' does not quote correctly, so add quotes (double-quote
24380 # substitution turns \\\\ into \\, and sed turns \\ into \).
24381 sed -n \
edfaf76d
LK
24382 "s/'/'\\\\''/g;
24383 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24384 ;; #(
503d2be0
AS
24385 *)
24386 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24387 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24388 ;;
ca81d7a0
JD
24389 esac |
24390 sort
24391) |
503d2be0 24392 sed '
ca81d7a0 24393 /^ac_cv_env_/b end
503d2be0 24394 t clear
ca81d7a0 24395 :clear
503d2be0
AS
24396 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24397 t end
ca81d7a0
JD
24398 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24399 :end' >>confcache
24400if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24401 if test -w "$cache_file"; then
24402 test "x$cache_file" != "x/dev/null" &&
24403 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24404echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24405 cat confcache >$cache_file
ba4481b5 24406 else
ca81d7a0
JD
24407 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24408echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24409 fi
24410fi
24411rm -f confcache
24412
ba4481b5
DL
24413test "x$prefix" = xNONE && prefix=$ac_default_prefix
24414# Let make expand exec_prefix.
24415test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24416
ba4481b5
DL
24417DEFS=-DHAVE_CONFIG_H
24418
6bae0ccf
DL
24419ac_libobjs=
24420ac_ltlibobjs=
24421for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24422 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24423 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24424 ac_i=`echo "$ac_i" | sed "$ac_script"`
24425 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24426 # will be set to the directory where LIBOBJS objects are built.
24427 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24428 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24429done
24430LIBOBJS=$ac_libobjs
24431
24432LTLIBOBJS=$ac_ltlibobjs
24433
24434
c0d27fcc 24435
ba4481b5 24436: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24437ac_clean_files_save=$ac_clean_files
24438ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24439{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24440echo "$as_me: creating $CONFIG_STATUS" >&6;}
24441cat >$CONFIG_STATUS <<_ACEOF
24442#! $SHELL
c0d27fcc 24443# Generated by $as_me.
ba4481b5 24444# Run this file to recreate the current configuration.
ba4481b5 24445# Compiler output produced by configure, useful for debugging
503d2be0 24446# configure, is in config.log if it exists.
ba4481b5 24447
503d2be0 24448debug=false
19650fd6
AS
24449ac_cs_recheck=false
24450ac_cs_silent=false
503d2be0 24451SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24452_ACEOF
24453
24454cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24455## --------------------- ##
24456## M4sh Initialization. ##
24457## --------------------- ##
24458
f053c89f
CY
24459# Be more Bourne compatible
24460DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24461if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24462 emulate sh
24463 NULLCMD=:
6bae0ccf
DL
24464 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24465 # is contrary to our usage. Disable this feature.
24466 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24467 setopt NO_GLOB_SUBST
24468else
f053c89f
CY
24469 case `(set -o) 2>/dev/null` in
24470 *posix*) set -o posix ;;
24471esac
24472
503d2be0 24473fi
f053c89f
CY
24474
24475
503d2be0 24476
ca81d7a0
JD
24477
24478# PATH needs CR
24479# Avoid depending upon Character Ranges.
24480as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24481as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24482as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24483as_cr_digits='0123456789'
24484as_cr_alnum=$as_cr_Letters$as_cr_digits
24485
24486# The user is always right.
24487if test "${PATH_SEPARATOR+set}" != set; then
24488 echo "#! /bin/sh" >conf$$.sh
24489 echo "exit 0" >>conf$$.sh
24490 chmod +x conf$$.sh
24491 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24492 PATH_SEPARATOR=';'
24493 else
24494 PATH_SEPARATOR=:
24495 fi
24496 rm -f conf$$.sh
503d2be0
AS
24497fi
24498
c0d27fcc 24499# Support unset when possible.
edfaf76d 24500if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24501 as_unset=unset
24502else
24503 as_unset=false
24504fi
24505
6bae0ccf 24506
ca81d7a0
JD
24507# IFS
24508# We need space, tab and new line, in precisely that order. Quoting is
24509# there to prevent editors from complaining about space-tab.
24510# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24511# splitting by setting IFS to empty value.)
24512as_nl='
24513'
24514IFS=" "" $as_nl"
24515
24516# Find who we are. Look in the path if we contain no directory separator.
24517case $0 in
24518 *[\\/]* ) as_myself=$0 ;;
24519 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24520for as_dir in $PATH
24521do
24522 IFS=$as_save_IFS
24523 test -z "$as_dir" && as_dir=.
24524 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24525done
24526IFS=$as_save_IFS
24527
24528 ;;
24529esac
24530# We did not find ourselves, most probably we were run as `sh COMMAND'
24531# in which case we are not to be found in the path.
24532if test "x$as_myself" = x; then
24533 as_myself=$0
24534fi
24535if test ! -f "$as_myself"; then
24536 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24537 { (exit 1); exit 1; }
24538fi
24539
6bae0ccf 24540# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24541for as_var in ENV MAIL MAILPATH
24542do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24543done
6bae0ccf
DL
24544PS1='$ '
24545PS2='> '
24546PS4='+ '
24547
24548# NLS nuisances.
19650fd6
AS
24549for as_var in \
24550 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24551 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24552 LC_TELEPHONE LC_TIME
6bae0ccf 24553do
edfaf76d 24554 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24555 eval $as_var=C; export $as_var
24556 else
ca81d7a0 24557 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24558 fi
24559done
24560
24561# Required to use basename.
ca81d7a0
JD
24562if expr a : '\(a\)' >/dev/null 2>&1 &&
24563 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24564 as_expr=expr
24565else
24566 as_expr=false
24567fi
24568
ca81d7a0 24569if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24570 as_basename=basename
24571else
24572 as_basename=false
24573fi
c0d27fcc
MR
24574
24575
503d2be0 24576# Name of the executable.
ca81d7a0 24577as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24578$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24579 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24580 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24581echo X/"$0" |
ca81d7a0
JD
24582 sed '/^.*\/\([^/][^/]*\)\/*$/{
24583 s//\1/
24584 q
24585 }
24586 /^X\/\(\/\/\)$/{
24587 s//\1/
24588 q
24589 }
24590 /^X\/\(\/\).*/{
24591 s//\1/
24592 q
24593 }
24594 s/.*/./; q'`
c0d27fcc 24595
ca81d7a0
JD
24596# CDPATH.
24597$as_unset CDPATH
c0d27fcc
MR
24598
24599
c0d27fcc 24600
c0d27fcc 24601 as_lineno_1=$LINENO
c0d27fcc 24602 as_lineno_2=$LINENO
c0d27fcc 24603 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24604 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24605
24606 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24607 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24608 # line-number line after each line using $LINENO; the second 'sed'
24609 # does the real work. The second script uses 'N' to pair each
24610 # line-number line with the line containing $LINENO, and appends
24611 # trailing '-' during substitution so that $LINENO is not a special
24612 # case at line end.
c0d27fcc 24613 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24614 # scripts with optimization help from Paolo Bonzini. Blame Lee
24615 # E. McMahon (1931-1989) for sed's syntax. :-)
24616 sed -n '
24617 p
24618 /[$]LINENO/=
24619 ' <$as_myself |
c0d27fcc 24620 sed '
ca81d7a0
JD
24621 s/[$]LINENO.*/&-/
24622 t lineno
24623 b
24624 :lineno
c0d27fcc 24625 N
ca81d7a0
JD
24626 :loop
24627 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24628 t loop
ca81d7a0 24629 s/-\n.*//
c0d27fcc 24630 ' >$as_me.lineno &&
ca81d7a0
JD
24631 chmod +x "$as_me.lineno" ||
24632 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24633 { (exit 1); exit 1; }; }
24634
24635 # Don't try to exec as it changes $[0], causing all sort of problems
24636 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24637 # original and so on. Autoconf is especially sensitive to this).
24638 . "./$as_me.lineno"
c0d27fcc
MR
24639 # Exit status is that of the last command.
24640 exit
24641}
24642
24643
ca81d7a0
JD
24644if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24645 as_dirname=dirname
24646else
24647 as_dirname=false
24648fi
24649
24650ECHO_C= ECHO_N= ECHO_T=
24651case `echo -n x` in
24652-n*)
24653 case `echo 'x\c'` in
24654 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24655 *) ECHO_C='\c';;
24656 esac;;
24657*)
24658 ECHO_N='-n';;
c0d27fcc 24659esac
503d2be0 24660
ca81d7a0
JD
24661if expr a : '\(a\)' >/dev/null 2>&1 &&
24662 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24663 as_expr=expr
24664else
24665 as_expr=false
24666fi
24667
24668rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24669if test -d conf$$.dir; then
24670 rm -f conf$$.dir/conf$$.file
24671else
24672 rm -f conf$$.dir
24673 mkdir conf$$.dir
24674fi
503d2be0
AS
24675echo >conf$$.file
24676if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24677 as_ln_s='ln -s'
24678 # ... but there are two gotchas:
24679 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24680 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24681 # In both cases, we have to default to `cp -p'.
24682 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24683 as_ln_s='cp -p'
503d2be0
AS
24684elif ln conf$$.file conf$$ 2>/dev/null; then
24685 as_ln_s=ln
24686else
24687 as_ln_s='cp -p'
24688fi
ca81d7a0
JD
24689rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24690rmdir conf$$.dir 2>/dev/null
503d2be0 24691
6bae0ccf
DL
24692if mkdir -p . 2>/dev/null; then
24693 as_mkdir_p=:
24694else
edfaf76d 24695 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24696 as_mkdir_p=false
24697fi
24698
f053c89f
CY
24699if test -x / >/dev/null 2>&1; then
24700 as_test_x='test -x'
ca81d7a0 24701else
f053c89f
CY
24702 if ls -dL / >/dev/null 2>&1; then
24703 as_ls_L_option=L
24704 else
24705 as_ls_L_option=
24706 fi
24707 as_test_x='
24708 eval sh -c '\''
24709 if test -d "$1"; then
24710 test -d "$1/.";
24711 else
24712 case $1 in
24713 -*)set "./$1";;
24714 esac;
24715 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24716 ???[sx]*):;;*)false;;esac;fi
24717 '\'' sh
24718 '
ca81d7a0 24719fi
f053c89f 24720as_executable_p=$as_test_x
503d2be0 24721
c0d27fcc 24722# Sed expression to map a string onto a valid CPP name.
edfaf76d 24723as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24724
24725# Sed expression to map a string onto a valid variable name.
edfaf76d 24726as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24727
503d2be0 24728
503d2be0
AS
24729exec 6>&1
24730
ca81d7a0 24731# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24732# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24733# values after options handling.
24734ac_log="
c0d27fcc 24735This file was extended by $as_me, which was
f053c89f 24736generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24737
24738 CONFIG_FILES = $CONFIG_FILES
24739 CONFIG_HEADERS = $CONFIG_HEADERS
24740 CONFIG_LINKS = $CONFIG_LINKS
24741 CONFIG_COMMANDS = $CONFIG_COMMANDS
24742 $ $0 $@
24743
ca81d7a0
JD
24744on `(hostname || uname -n) 2>/dev/null | sed 1q`
24745"
24746
503d2be0
AS
24747_ACEOF
24748
ca81d7a0 24749cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24750# Files that config.status was made for.
ca81d7a0
JD
24751config_files="$ac_config_files"
24752config_headers="$ac_config_headers"
24753config_commands="$ac_config_commands"
503d2be0 24754
ca81d7a0 24755_ACEOF
503d2be0 24756
c0d27fcc 24757cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24758ac_cs_usage="\
24759\`$as_me' instantiates files from templates according to the
24760current configuration.
24761
24762Usage: $0 [OPTIONS] [FILE]...
24763
24764 -h, --help print this help, then exit
f053c89f 24765 -V, --version print version number and configuration settings, then exit
19650fd6 24766 -q, --quiet do not print progress messages
503d2be0
AS
24767 -d, --debug don't remove temporary files
24768 --recheck update $as_me by reconfiguring in the same conditions
24769 --file=FILE[:TEMPLATE]
edfaf76d 24770 instantiate the configuration file FILE
503d2be0 24771 --header=FILE[:TEMPLATE]
edfaf76d 24772 instantiate the configuration header FILE
503d2be0
AS
24773
24774Configuration files:
24775$config_files
24776
24777Configuration headers:
24778$config_headers
24779
24780Configuration commands:
24781$config_commands
24782
24783Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24784
ca81d7a0 24785_ACEOF
c0d27fcc 24786cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24787ac_cs_version="\\
24788config.status
f053c89f 24789configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24790 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24791
ca81d7a0 24792Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24793This config.status script is free software; the Free Software Foundation
24794gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24795
24796ac_pwd='$ac_pwd'
24797srcdir='$srcdir'
24798INSTALL='$INSTALL'
c0d27fcc 24799_ACEOF
503d2be0 24800
c0d27fcc 24801cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24802# If no file are specified by the user, then we need to provide default
24803# value. By we need to know if files were specified by the user.
24804ac_need_defaults=:
24805while test $# != 0
ba4481b5 24806do
503d2be0
AS
24807 case $1 in
24808 --*=*)
ca81d7a0
JD
24809 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24810 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24811 ac_shift=:
24812 ;;
ca81d7a0 24813 *)
6bae0ccf
DL
24814 ac_option=$1
24815 ac_optarg=$2
24816 ac_shift=shift
503d2be0 24817 ;;
503d2be0
AS
24818 esac
24819
6bae0ccf 24820 case $ac_option in
503d2be0 24821 # Handling of the options.
19650fd6
AS
24822 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24823 ac_cs_recheck=: ;;
ca81d7a0
JD
24824 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24825 echo "$ac_cs_version"; exit ;;
24826 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24827 debug=: ;;
24828 --file | --fil | --fi | --f )
6bae0ccf
DL
24829 $ac_shift
24830 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24831 ac_need_defaults=false;;
24832 --header | --heade | --head | --hea )
6bae0ccf
DL
24833 $ac_shift
24834 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24835 ac_need_defaults=false;;
ca81d7a0
JD
24836 --he | --h)
24837 # Conflict between --help and --header
24838 { echo "$as_me: error: ambiguous option: $1
24839Try \`$0 --help' for more information." >&2
24840 { (exit 1); exit 1; }; };;
24841 --help | --hel | -h )
24842 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24843 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24844 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24845 ac_cs_silent=: ;;
503d2be0
AS
24846
24847 # This is an error.
ca81d7a0
JD
24848 -*) { echo "$as_me: error: unrecognized option: $1
24849Try \`$0 --help' for more information." >&2
503d2be0
AS
24850 { (exit 1); exit 1; }; } ;;
24851
ca81d7a0
JD
24852 *) ac_config_targets="$ac_config_targets $1"
24853 ac_need_defaults=false ;;
503d2be0 24854
ba4481b5 24855 esac
503d2be0 24856 shift
ba4481b5
DL
24857done
24858
19650fd6
AS
24859ac_configure_extra_args=
24860
24861if $ac_cs_silent; then
24862 exec 6>/dev/null
24863 ac_configure_extra_args="$ac_configure_extra_args --silent"
24864fi
24865
24866_ACEOF
24867cat >>$CONFIG_STATUS <<_ACEOF
24868if \$ac_cs_recheck; then
ca81d7a0
JD
24869 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24870 CONFIG_SHELL=$SHELL
24871 export CONFIG_SHELL
24872 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24873fi
24874
503d2be0 24875_ACEOF
ca81d7a0
JD
24876cat >>$CONFIG_STATUS <<\_ACEOF
24877exec 5>>config.log
24878{
24879 echo
24880 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24881## Running $as_me. ##
24882_ASBOX
24883 echo "$ac_log"
24884} >&5
ba4481b5 24885
ca81d7a0 24886_ACEOF
c0d27fcc 24887cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24888#
ca81d7a0 24889# INIT-COMMANDS
503d2be0 24890#
503d2be0
AS
24891GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24892
c0d27fcc
MR
24893_ACEOF
24894
c0d27fcc 24895cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24896
24897# Handling of arguments.
503d2be0
AS
24898for ac_config_target in $ac_config_targets
24899do
ca81d7a0
JD
24900 case $ac_config_target in
24901 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24902 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24903 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24904 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24905 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24906 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24907 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24908 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24909 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24910 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24911 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24912 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24913 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24914
c0d27fcc 24915 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24916echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24917 { (exit 1); exit 1; }; };;
24918 esac
ba4481b5 24919done
503d2be0 24920
ca81d7a0 24921
503d2be0
AS
24922# If the user did not use the arguments to specify the items to instantiate,
24923# then the envvar interface is used. Set only those that are not.
24924# We use the long form for the default assignment because of an extremely
24925# bizarre bug on SunOS 4.1.3.
24926if $ac_need_defaults; then
24927 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24928 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24929 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24930fi
503d2be0 24931
19650fd6 24932# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24933# simply because there is no reason against having it here, and in addition,
19650fd6 24934# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24935# Hook for its removal unless debugging.
24936# Note that there is a small window in which the directory will not be cleaned:
24937# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24938$debug ||
24939{
ca81d7a0
JD
24940 tmp=
24941 trap 'exit_status=$?
24942 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24943' 0
503d2be0
AS
24944 trap '{ (exit 1); exit 1; }' 1 2 13 15
24945}
503d2be0 24946# Create a (secure) tmp directory for tmp files.
19650fd6 24947
503d2be0 24948{
ca81d7a0 24949 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24950 test -n "$tmp" && test -d "$tmp"
24951} ||
24952{
ca81d7a0
JD
24953 tmp=./conf$$-$RANDOM
24954 (umask 077 && mkdir "$tmp")
503d2be0
AS
24955} ||
24956{
19650fd6 24957 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24958 { (exit 1); exit 1; }
24959}
24960
503d2be0 24961#
ca81d7a0 24962# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24963#
24964
24965# No need to generate the scripts if there are no CONFIG_FILES.
24966# This happens for instance when ./config.status config.h
ca81d7a0
JD
24967if test -n "$CONFIG_FILES"; then
24968
24969_ACEOF
24970
24971
24972
24973ac_delim='%!_!# '
24974for ac_last_try in false false false false false :; do
24975 cat >conf$$subs.sed <<_ACEOF
24976SHELL!$SHELL$ac_delim
24977PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24978PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24979PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24980PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24981PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24982PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24983exec_prefix!$exec_prefix$ac_delim
24984prefix!$prefix$ac_delim
24985program_transform_name!$program_transform_name$ac_delim
24986bindir!$bindir$ac_delim
24987sbindir!$sbindir$ac_delim
24988libexecdir!$libexecdir$ac_delim
24989datarootdir!$datarootdir$ac_delim
24990datadir!$datadir$ac_delim
24991sysconfdir!$sysconfdir$ac_delim
24992sharedstatedir!$sharedstatedir$ac_delim
24993localstatedir!$localstatedir$ac_delim
24994includedir!$includedir$ac_delim
24995oldincludedir!$oldincludedir$ac_delim
24996docdir!$docdir$ac_delim
24997infodir!$infodir$ac_delim
24998htmldir!$htmldir$ac_delim
24999dvidir!$dvidir$ac_delim
25000pdfdir!$pdfdir$ac_delim
25001psdir!$psdir$ac_delim
25002libdir!$libdir$ac_delim
25003localedir!$localedir$ac_delim
25004mandir!$mandir$ac_delim
25005DEFS!$DEFS$ac_delim
25006ECHO_C!$ECHO_C$ac_delim
25007ECHO_N!$ECHO_N$ac_delim
25008ECHO_T!$ECHO_T$ac_delim
25009LIBS!$LIBS$ac_delim
25010build_alias!$build_alias$ac_delim
25011host_alias!$host_alias$ac_delim
25012target_alias!$target_alias$ac_delim
25013MAINT!$MAINT$ac_delim
25014build!$build$ac_delim
25015build_cpu!$build_cpu$ac_delim
25016build_vendor!$build_vendor$ac_delim
25017build_os!$build_os$ac_delim
25018host!$host$ac_delim
25019host_cpu!$host_cpu$ac_delim
25020host_vendor!$host_vendor$ac_delim
25021host_os!$host_os$ac_delim
25022CC!$CC$ac_delim
25023CFLAGS!$CFLAGS$ac_delim
25024LDFLAGS!$LDFLAGS$ac_delim
25025CPPFLAGS!$CPPFLAGS$ac_delim
25026ac_ct_CC!$ac_ct_CC$ac_delim
25027EXEEXT!$EXEEXT$ac_delim
25028OBJEXT!$OBJEXT$ac_delim
25029CPP!$CPP$ac_delim
25030GREP!$GREP$ac_delim
25031EGREP!$EGREP$ac_delim
25032LN_S!$LN_S$ac_delim
25033INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25034INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25035INSTALL_DATA!$INSTALL_DATA$ac_delim
25036RANLIB!$RANLIB$ac_delim
25037INSTALL_INFO!$INSTALL_INFO$ac_delim
25038GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25039MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25040LIBSOUND!$LIBSOUND$ac_delim
25041PKG_CONFIG!$PKG_CONFIG$ac_delim
25042ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25043ALSA_LIBS!$ALSA_LIBS$ac_delim
25044CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25045SET_MAKE!$SET_MAKE$ac_delim
25046XMKMF!$XMKMF$ac_delim
cfe440b8 25047HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25048RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25049RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25050GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25051GTK_LIBS!$GTK_LIBS$ac_delim
c24fa7dc
MB
25052XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25053XFT_LIBS!$XFT_LIBS$ac_delim
25054FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25055FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25056FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25057FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
25058HAVE_LIBOTF!$HAVE_LIBOTF$ac_delim
25059LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25060LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
ca81d7a0
JD
25061ALLOCA!$ALLOCA$ac_delim
25062liblockfile!$liblockfile$ac_delim
25063LIBOBJS!$LIBOBJS$ac_delim
25064NEED_SETGID!$NEED_SETGID$ac_delim
25065KMEM_GROUP!$KMEM_GROUP$ac_delim
25066GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25067GETOPT_H!$GETOPT_H$ac_delim
25068GETOPTOBJS!$GETOPTOBJS$ac_delim
25069version!$version$ac_delim
25070configuration!$configuration$ac_delim
25071canonical!$canonical$ac_delim
25072srcdir!$srcdir$ac_delim
ca81d7a0
JD
25073_ACEOF
25074
25075 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25076 break
25077 elif $ac_last_try; then
25078 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25079echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25080 { (exit 1); exit 1; }; }
25081 else
25082 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25083 fi
ca81d7a0
JD
25084done
25085
25086ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25087if test -n "$ac_eof"; then
25088 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25089 ac_eof=`expr $ac_eof + 1`
25090fi
503d2be0 25091
c0d27fcc 25092cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25093cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25094/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25095_ACEOF
25096sed '
25097s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25098s/^/s,@/; s/!/@,|#_!!_#|/
25099:n
25100t n
25101s/'"$ac_delim"'$/,g/; t
25102s/$/\\/; p
25103N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25104' >>$CONFIG_STATUS <conf$$subs.sed
25105rm -f conf$$subs.sed
25106cat >>$CONFIG_STATUS <<_ACEOF
25107CEOF$ac_eof
25108_ACEOF
503d2be0 25109
ca81d7a0
JD
25110
25111ac_delim='%!_!# '
25112for ac_last_try in false false false false false :; do
25113 cat >conf$$subs.sed <<_ACEOF
1bb9a689
MB
25114lispdir!$lispdir$ac_delim
25115locallisppath!$locallisppath$ac_delim
25116lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25117x_default_search_path!$x_default_search_path$ac_delim
25118etcdir!$etcdir$ac_delim
25119archlibdir!$archlibdir$ac_delim
25120bitmapdir!$bitmapdir$ac_delim
25121gamedir!$gamedir$ac_delim
25122gameuser!$gameuser$ac_delim
25123c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25124c_switch_machine!$c_switch_machine$ac_delim
25125LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25126LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25127C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25128X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25129machfile!$machfile$ac_delim
25130opsysfile!$opsysfile$ac_delim
25131carbon_appdir!$carbon_appdir$ac_delim
25132LTLIBOBJS!$LTLIBOBJS$ac_delim
25133_ACEOF
503d2be0 25134
1bb9a689 25135 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
c24fa7dc
MB
25136 break
25137 elif $ac_last_try; then
25138 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25139echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25140 { (exit 1); exit 1; }; }
25141 else
25142 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25143 fi
ca81d7a0
JD
25144done
25145
25146ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25147if test -n "$ac_eof"; then
25148 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25149 ac_eof=`expr $ac_eof + 1`
25150fi
ba4481b5 25151
ca81d7a0
JD
25152cat >>$CONFIG_STATUS <<_ACEOF
25153cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25154/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25155_ACEOF
25156sed '
25157s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25158s/^/s,@/; s/!/@,|#_!!_#|/
25159:n
25160t n
25161s/'"$ac_delim"'$/,g/; t
25162s/$/\\/; p
25163N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25164' >>$CONFIG_STATUS <conf$$subs.sed
25165rm -f conf$$subs.sed
25166cat >>$CONFIG_STATUS <<_ACEOF
25167:end
25168s/|#_!!_#|//g
25169CEOF$ac_eof
c0d27fcc 25170_ACEOF
ca81d7a0
JD
25171
25172
25173# VPATH may cause trouble with some makes, so we remove $(srcdir),
25174# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25175# trailing colons and then remove the whole line if VPATH becomes empty
25176# (actually we leave an empty line to preserve line numbers).
25177if test "x$srcdir" = x.; then
25178 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25179s/:*\$(srcdir):*/:/
25180s/:*\${srcdir}:*/:/
25181s/:*@srcdir@:*/:/
25182s/^\([^=]*=[ ]*\):*/\1/
25183s/:*$//
25184s/^[^=]*=[ ]*$//
25185}'
25186fi
25187
c0d27fcc 25188cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25189fi # test -n "$CONFIG_FILES"
25190
25191
25192for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25193do
25194 case $ac_tag in
25195 :[FHLC]) ac_mode=$ac_tag; continue;;
25196 esac
25197 case $ac_mode$ac_tag in
25198 :[FHL]*:*);;
25199 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25200echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25201 { (exit 1); exit 1; }; };;
25202 :[FH]-) ac_tag=-:-;;
25203 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25204 esac
25205 ac_save_IFS=$IFS
25206 IFS=:
25207 set x $ac_tag
25208 IFS=$ac_save_IFS
25209 shift
25210 ac_file=$1
25211 shift
25212
25213 case $ac_mode in
25214 :L) ac_source=$1;;
25215 :[FH])
25216 ac_file_inputs=
25217 for ac_f
25218 do
25219 case $ac_f in
25220 -) ac_f="$tmp/stdin";;
25221 *) # Look for the file first in the build tree, then in the source tree
25222 # (if the path is not absolute). The absolute path cannot be DOS-style,
25223 # because $ac_f cannot contain `:'.
25224 test -f "$ac_f" ||
25225 case $ac_f in
25226 [\\/$]*) false;;
25227 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25228 esac ||
25229 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25230echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25231 { (exit 1); exit 1; }; };;
25232 esac
25233 ac_file_inputs="$ac_file_inputs $ac_f"
25234 done
25235
25236 # Let's still pretend it is `configure' which instantiates (i.e., don't
25237 # use $as_me), people would be surprised to read:
25238 # /* config.h. Generated by config.status. */
25239 configure_input="Generated from "`IFS=:
25240 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25241 if test x"$ac_file" != x-; then
25242 configure_input="$ac_file. $configure_input"
25243 { echo "$as_me:$LINENO: creating $ac_file" >&5
25244echo "$as_me: creating $ac_file" >&6;}
25245 fi
25246
25247 case $ac_tag in
25248 *:-:* | *:-) cat >"$tmp/stdin";;
25249 esac
25250 ;;
ba4481b5
DL
25251 esac
25252
ca81d7a0 25253 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25254$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25255 X"$ac_file" : 'X\(//\)[^/]' \| \
25256 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25257 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25258echo X"$ac_file" |
ca81d7a0
JD
25259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25260 s//\1/
25261 q
25262 }
25263 /^X\(\/\/\)[^/].*/{
25264 s//\1/
25265 q
25266 }
25267 /^X\(\/\/\)$/{
25268 s//\1/
25269 q
25270 }
25271 /^X\(\/\).*/{
25272 s//\1/
25273 q
25274 }
25275 s/.*/./; q'`
25276 { as_dir="$ac_dir"
25277 case $as_dir in #(
25278 -*) as_dir=./$as_dir;;
25279 esac
25280 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25281 as_dirs=
ca81d7a0
JD
25282 while :; do
25283 case $as_dir in #(
25284 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25285 *) as_qdir=$as_dir;;
25286 esac
25287 as_dirs="'$as_qdir' $as_dirs"
25288 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25289$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25290 X"$as_dir" : 'X\(//\)[^/]' \| \
25291 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25292 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25293echo X"$as_dir" |
ca81d7a0
JD
25294 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25295 s//\1/
25296 q
25297 }
25298 /^X\(\/\/\)[^/].*/{
25299 s//\1/
25300 q
25301 }
25302 /^X\(\/\/\)$/{
25303 s//\1/
25304 q
25305 }
25306 /^X\(\/\).*/{
25307 s//\1/
25308 q
25309 }
25310 s/.*/./; q'`
25311 test -d "$as_dir" && break
6bae0ccf 25312 done
ca81d7a0
JD
25313 test -z "$as_dirs" || eval "mkdir $as_dirs"
25314 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25315echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25316 { (exit 1); exit 1; }; }; }
c0d27fcc 25317 ac_builddir=.
98418dba 25318
ca81d7a0
JD
25319case "$ac_dir" in
25320.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25321*)
c0d27fcc 25322 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25323 # A ".." for each directory in $ac_dir_suffix.
25324 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25325 case $ac_top_builddir_sub in
25326 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25327 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25328 esac ;;
25329esac
25330ac_abs_top_builddir=$ac_pwd
25331ac_abs_builddir=$ac_pwd$ac_dir_suffix
25332# for backward compatibility:
25333ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25334
25335case $srcdir in
ca81d7a0 25336 .) # We are building in place.
c0d27fcc 25337 ac_srcdir=.
ca81d7a0
JD
25338 ac_top_srcdir=$ac_top_builddir_sub
25339 ac_abs_top_srcdir=$ac_pwd ;;
25340 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25341 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25342 ac_top_srcdir=$srcdir
25343 ac_abs_top_srcdir=$srcdir ;;
25344 *) # Relative name.
25345 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25346 ac_top_srcdir=$ac_top_build_prefix$srcdir
25347 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25348esac
ca81d7a0 25349ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25350
c0d27fcc 25351
ca81d7a0
JD
25352 case $ac_mode in
25353 :F)
25354 #
25355 # CONFIG_FILE
25356 #
ba4481b5 25357
503d2be0
AS
25358 case $INSTALL in
25359 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25360 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25361 esac
ca81d7a0 25362_ACEOF
ba4481b5 25363
ca81d7a0
JD
25364cat >>$CONFIG_STATUS <<\_ACEOF
25365# If the template does not know about datarootdir, expand it.
25366# FIXME: This hack should be removed a few years after 2.60.
25367ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25368
ca81d7a0
JD
25369case `sed -n '/datarootdir/ {
25370 p
25371 q
25372}
25373/@datadir@/p
25374/@docdir@/p
25375/@infodir@/p
25376/@localedir@/p
25377/@mandir@/p
25378' $ac_file_inputs` in
25379*datarootdir*) ac_datarootdir_seen=yes;;
25380*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25381 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25382echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25383_ACEOF
ca81d7a0
JD
25384cat >>$CONFIG_STATUS <<_ACEOF
25385 ac_datarootdir_hack='
25386 s&@datadir@&$datadir&g
25387 s&@docdir@&$docdir&g
25388 s&@infodir@&$infodir&g
25389 s&@localedir@&$localedir&g
25390 s&@mandir@&$mandir&g
25391 s&\\\${datarootdir}&$datarootdir&g' ;;
25392esac
c0d27fcc 25393_ACEOF
ca81d7a0
JD
25394
25395# Neutralize VPATH when `$srcdir' = `.'.
25396# Shell code in configure.ac might set extrasub.
25397# FIXME: do we really want to maintain this feature?
c0d27fcc 25398cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25399 sed "$ac_vpsub
25400$extrasub
c0d27fcc
MR
25401_ACEOF
25402cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25403:t
25404/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25405s&@configure_input@&$configure_input&;t t
25406s&@top_builddir@&$ac_top_builddir_sub&;t t
25407s&@srcdir@&$ac_srcdir&;t t
25408s&@abs_srcdir@&$ac_abs_srcdir&;t t
25409s&@top_srcdir@&$ac_top_srcdir&;t t
25410s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25411s&@builddir@&$ac_builddir&;t t
25412s&@abs_builddir@&$ac_abs_builddir&;t t
25413s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25414s&@INSTALL@&$ac_INSTALL&;t t
25415$ac_datarootdir_hack
25416" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25417
25418test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25419 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25420 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25421 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25422which seems to be undefined. Please make sure it is defined." >&5
25423echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25424which seems to be undefined. Please make sure it is defined." >&2;}
25425
25426 rm -f "$tmp/stdin"
503d2be0 25427 case $ac_file in
ca81d7a0
JD
25428 -) cat "$tmp/out"; rm -f "$tmp/out";;
25429 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25430 esac
ca81d7a0
JD
25431 ;;
25432 :H)
25433 #
25434 # CONFIG_HEADER
25435 #
25436_ACEOF
25437
25438# Transform confdefs.h into a sed script `conftest.defines', that
25439# substitutes the proper values into config.h.in to produce config.h.
25440rm -f conftest.defines conftest.tail
25441# First, append a space to every undef/define line, to ease matching.
25442echo 's/$/ /' >conftest.defines
25443# Then, protect against being on the right side of a sed subst, or in
25444# an unquoted here document, in config.status. If some macros were
25445# called several times there might be several #defines for the same
25446# symbol, which is useless. But do not sort them, since the last
25447# AC_DEFINE must be honored.
25448ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25449# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25450# NAME is the cpp macro being defined, VALUE is the value it is being given.
25451# PARAMS is the parameter list in the macro definition--in most cases, it's
25452# just an empty string.
25453ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25454ac_dB='\\)[ (].*,\\1define\\2'
25455ac_dC=' '
25456ac_dD=' ,'
25457
25458uniq confdefs.h |
25459 sed -n '
25460 t rset
25461 :rset
25462 s/^[ ]*#[ ]*define[ ][ ]*//
25463 t ok
25464 d
25465 :ok
25466 s/[\\&,]/\\&/g
25467 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25468 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25469 ' >>conftest.defines
25470
25471# Remove the space that was appended to ease matching.
25472# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25473# example, in the case of _POSIX_SOURCE, which is predefined and required
25474# on some systems where configure will not decide to define it.
ca81d7a0
JD
25475# (The regexp can be short, since the line contains either #define or #undef.)
25476echo 's/ $//
25477s,^[ #]*u.*,/* & */,' >>conftest.defines
25478
25479# Break up conftest.defines:
25480ac_max_sed_lines=50
25481
25482# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25483# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25484# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25485# et cetera.
25486ac_in='$ac_file_inputs'
25487ac_out='"$tmp/out1"'
25488ac_nxt='"$tmp/out2"'
25489
25490while :
503d2be0 25491do
ca81d7a0
JD
25492 # Write a here document:
25493 cat >>$CONFIG_STATUS <<_ACEOF
25494 # First, check the format of the line:
25495 cat >"\$tmp/defines.sed" <<\\CEOF
25496/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25497/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25498b
25499:def
25500_ACEOF
25501 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25502 echo 'CEOF
ca81d7a0
JD
25503 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25504 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25505 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25506 grep . conftest.tail >/dev/null || break
503d2be0
AS
25507 rm -f conftest.defines
25508 mv conftest.tail conftest.defines
25509done
ca81d7a0 25510rm -f conftest.defines conftest.tail
503d2be0 25511
ca81d7a0 25512echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25513cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25514 if test x"$ac_file" != x-; then
ca81d7a0
JD
25515 echo "/* $configure_input */" >"$tmp/config.h"
25516 cat "$ac_result" >>"$tmp/config.h"
25517 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25518 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25519echo "$as_me: $ac_file is unchanged" >&6;}
25520 else
503d2be0 25521 rm -f $ac_file
ca81d7a0 25522 mv "$tmp/config.h" $ac_file
ba4481b5 25523 fi
503d2be0 25524 else
ca81d7a0
JD
25525 echo "/* $configure_input */"
25526 cat "$ac_result"
ba4481b5 25527 fi
ca81d7a0
JD
25528 rm -f "$tmp/out12"
25529 ;;
edfaf76d 25530
ca81d7a0
JD
25531 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25532echo "$as_me: executing $ac_file commands" >&6;}
25533 ;;
25534 esac
ba4481b5 25535
c0d27fcc 25536
ca81d7a0
JD
25537 case $ac_file$ac_mode in
25538 "default":C)
ba4481b5
DL
25539
25540### Make the necessary directories, if they don't exist.
25541for dir in etc lisp ; do
25542 test -d ${dir} || mkdir ${dir}
25543done
25544
25545# Build src/Makefile from ${srcdir}/src/Makefile.c
25546# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25547# This must be done after src/config.h is built, since we rely on that file.
25548
25549# Now get this: Some word that is part of the ${srcdir} directory name
25550# or the ${configuration} value might, just might, happen to be an
25551# identifier like `sun4' or `i386' or something, and be predefined by
25552# the C preprocessor to some helpful value like 1, or maybe the empty
25553# string. Needless to say consequent macro substitutions are less
25554# than conducive to the makefile finding the correct directory.
25555undefs="`echo $top_srcdir $configuration $canonical |
25556sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25557 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25558`"
25559
25560echo creating src/epaths.h
4aa6b955 25561${MAKE-make} epaths-force
ba4481b5 25562
1c203d4c
DL
25563# As of 2000-11-19, newest development versions of GNU cpp preprocess
25564# `..' to `. .' unless invoked with -traditional
25565
d0e9bfd2 25566if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25567 CPPFLAGS="$CPPFLAGS -traditional"
25568fi
25569
ba4481b5
DL
25570echo creating lib-src/Makefile
25571( cd lib-src
25572 rm -f junk.c junk1.c junk2.c
25573 sed -e '/start of cpp stuff/q' \
25574 < Makefile.c > junk1.c
25575 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25576 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25577 < Makefile.c > junk.c
503d2be0 25578 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25579 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25580 cat junk1.c junk2.c > Makefile.new
25581 rm -f junk.c junk1.c junk2.c
25582 chmod 444 Makefile.new
25583 mv -f Makefile.new Makefile
25584)
25585
25586echo creating src/Makefile
25587( cd src
25588 rm -f junk.c junk1.c junk2.c
25589 sed -e '/start of cpp stuff/q' \
25590 < Makefile.c > junk1.c
25591 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25592 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25593 < Makefile.c > junk.c
f36014a2
KH
25594 if test -f ${srcdir}/admin/unidata/UnicodeData.txt; then
25595 CPPFLAGS="$CPPFLAGS -DHAVE_UNIDATA"
25596 fi
503d2be0 25597 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25598 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25599 cat junk1.c junk2.c > Makefile.new
25600 rm -f junk.c junk1.c junk2.c
25601 chmod 444 Makefile.new
25602 mv -f Makefile.new Makefile
25603)
25604
503d2be0 25605if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25606 echo creating src/.gdbinit
503d2be0 25607 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25608fi
25609
25610# This is how we know whether to re-run configure in certain cases.
25611touch src/config.stamp
25612
503d2be0 25613 ;;
ca81d7a0 25614
503d2be0 25615 esac
ca81d7a0 25616done # for ac_tag
503d2be0 25617
ba4481b5 25618
503d2be0 25619{ (exit 0); exit 0; }
c0d27fcc 25620_ACEOF
ba4481b5 25621chmod +x $CONFIG_STATUS
503d2be0
AS
25622ac_clean_files=$ac_clean_files_save
25623
c0d27fcc 25624
503d2be0
AS
25625# configure is writing to config.log, and then calls config.status.
25626# config.status does its own redirection, appending to config.log.
25627# Unfortunately, on DOS this fails, as config.log is still kept open
25628# by configure, so config.status won't be able to write to it; its
25629# output is simply discarded. So we exec the FD to /dev/null,
25630# effectively closing config.log, so it can be properly (re)opened and
25631# appended to by config.status. When coming back to configure, we
25632# need to make the FD available again.
25633if test "$no_create" != yes; then
25634 ac_cs_success=:
19650fd6
AS
25635 ac_config_status_args=
25636 test "$silent" = yes &&
25637 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25638 exec 5>/dev/null
19650fd6 25639 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25640 exec 5>>config.log
25641 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25642 # would make configure fail if this is the last instruction.
25643 $ac_cs_success || { (exit 1); exit 1; }
25644fi
f5f47add 25645
c0d27fcc 25646