(Version, mh-version): Update for release 8.1.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
5d374ce1 3# Generated by GNU Autoconf 2.61 for emacs 23.0.60.
ba4481b5 4#
ca81d7a0
JD
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 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 572# Identity of this package.
9cf8f393
JD
573PACKAGE_NAME='emacs'
574PACKAGE_TARNAME='emacs'
5d374ce1
AS
575PACKAGE_VERSION='23.0.60'
576PACKAGE_STRING='emacs 23.0.60'
9cf8f393 577PACKAGE_BUGREPORT=''
c0d27fcc 578
503d2be0
AS
579ac_unique_file="src/lisp.h"
580# Factoring default headers for most tests.
581ac_includes_default="\
582#include <stdio.h>
f053c89f 583#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
584# include <sys/types.h>
585#endif
f053c89f 586#ifdef HAVE_SYS_STAT_H
503d2be0
AS
587# include <sys/stat.h>
588#endif
f053c89f 589#ifdef STDC_HEADERS
503d2be0
AS
590# include <stdlib.h>
591# include <stddef.h>
592#else
f053c89f 593# ifdef HAVE_STDLIB_H
503d2be0
AS
594# include <stdlib.h>
595# endif
596#endif
f053c89f
CY
597#ifdef HAVE_STRING_H
598# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
599# include <memory.h>
600# endif
601# include <string.h>
602#endif
f053c89f 603#ifdef HAVE_STRINGS_H
503d2be0
AS
604# include <strings.h>
605#endif
f053c89f 606#ifdef HAVE_INTTYPES_H
503d2be0 607# include <inttypes.h>
503d2be0 608#endif
f053c89f 609#ifdef HAVE_STDINT_H
ca81d7a0 610# include <stdint.h>
503d2be0 611#endif
f053c89f 612#ifdef HAVE_UNISTD_H
503d2be0
AS
613# include <unistd.h>
614#endif"
ba4481b5 615
a51f4969 616ac_config_libobj_dir=src
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
131e4133
MA
695DBUS_CFLAGS
696DBUS_LIBS
c24fa7dc
MB
697XFT_CFLAGS
698XFT_LIBS
699FREETYPE_CFLAGS
700FREETYPE_LIBS
701FONTCONFIG_CFLAGS
702FONTCONFIG_LIBS
c24fa7dc
MB
703LIBOTF_CFLAGS
704LIBOTF_LIBS
7f0942ba
KH
705M17N_FLT_CFLAGS
706M17N_FLT_LIBS
c24fa7dc
MB
707ALLOCA
708liblockfile
709LIBOBJS
710NEED_SETGID
711KMEM_GROUP
712GETLOADAVG_LIBS
713GETOPT_H
714GETOPTOBJS
715version
716configuration
717canonical
718srcdir
719lispdir
720locallisppath
721lisppath
722x_default_search_path
723etcdir
724archlibdir
725bitmapdir
726gamedir
727gameuser
728c_switch_system
729c_switch_machine
730LD_SWITCH_X_SITE
731LD_SWITCH_X_SITE_AUX
732C_SWITCH_X_SITE
733X_TOOLKIT_TYPE
734machfile
735opsysfile
edfda783 736ns_appdir
06b62770
AR
737ns_appbindir
738ns_appresdir
739ns_appsrc
facfbbbd 740GNUSTEP_MAKEFILES
48fad8e8
DN
741GNU_OBJC_CFLAGS
742LIB_SRC_EXTRA_INSTALLABLES
c24fa7dc 743LTLIBOBJS'
6bae0ccf 744ac_subst_files=''
ca81d7a0
JD
745 ac_precious_vars='build_alias
746host_alias
747target_alias
748CC
749CFLAGS
750LDFLAGS
f053c89f 751LIBS
ca81d7a0
JD
752CPPFLAGS
753CPP
754XMKMF'
755
c0d27fcc 756
ba4481b5 757# Initialize some variables set by options.
503d2be0
AS
758ac_init_help=
759ac_init_version=false
ba4481b5
DL
760# The variables have the same names as the options, with
761# dashes changed to underlines.
503d2be0 762cache_file=/dev/null
ba4481b5 763exec_prefix=NONE
ba4481b5 764no_create=
ba4481b5
DL
765no_recursion=
766prefix=NONE
767program_prefix=NONE
768program_suffix=NONE
769program_transform_name=s,x,x,
770silent=
771site=
772srcdir=
ba4481b5
DL
773verbose=
774x_includes=NONE
775x_libraries=NONE
503d2be0
AS
776
777# Installation directory options.
778# These are left unexpanded so users can "make install exec_prefix=/foo"
779# and all the variables that are supposed to be based on exec_prefix
780# by default will actually change.
781# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 782# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
783bindir='${exec_prefix}/bin'
784sbindir='${exec_prefix}/sbin'
785libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
786datarootdir='${prefix}/share'
787datadir='${datarootdir}'
ba4481b5
DL
788sysconfdir='${prefix}/etc'
789sharedstatedir='${prefix}/com'
790localstatedir='${prefix}/var'
ba4481b5
DL
791includedir='${prefix}/include'
792oldincludedir='/usr/include'
9cf8f393 793docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
794infodir='${datarootdir}/info'
795htmldir='${docdir}'
796dvidir='${docdir}'
797pdfdir='${docdir}'
798psdir='${docdir}'
799libdir='${exec_prefix}/lib'
800localedir='${datarootdir}/locale'
801mandir='${datarootdir}/man'
ba4481b5 802
ba4481b5 803ac_prev=
ca81d7a0 804ac_dashdash=
ba4481b5
DL
805for ac_option
806do
ba4481b5
DL
807 # If the previous option needs an argument, assign it.
808 if test -n "$ac_prev"; then
ca81d7a0 809 eval $ac_prev=\$ac_option
ba4481b5
DL
810 ac_prev=
811 continue
812 fi
813
ca81d7a0
JD
814 case $ac_option in
815 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
816 *) ac_optarg=yes ;;
817 esac
ba4481b5
DL
818
819 # Accept the important Cygnus configure options, so we can diagnose typos.
820
ca81d7a0
JD
821 case $ac_dashdash$ac_option in
822 --)
823 ac_dashdash=yes ;;
ba4481b5
DL
824
825 -bindir | --bindir | --bindi | --bind | --bin | --bi)
826 ac_prev=bindir ;;
827 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 828 bindir=$ac_optarg ;;
ba4481b5
DL
829
830 -build | --build | --buil | --bui | --bu)
503d2be0 831 ac_prev=build_alias ;;
ba4481b5 832 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 833 build_alias=$ac_optarg ;;
ba4481b5
DL
834
835 -cache-file | --cache-file | --cache-fil | --cache-fi \
836 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
837 ac_prev=cache_file ;;
838 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
839 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
840 cache_file=$ac_optarg ;;
841
842 --config-cache | -C)
843 cache_file=config.cache ;;
ba4481b5 844
ca81d7a0 845 -datadir | --datadir | --datadi | --datad)
ba4481b5 846 ac_prev=datadir ;;
ca81d7a0 847 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 848 datadir=$ac_optarg ;;
ba4481b5 849
ca81d7a0
JD
850 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
851 | --dataroo | --dataro | --datar)
852 ac_prev=datarootdir ;;
853 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
854 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
855 datarootdir=$ac_optarg ;;
856
ba4481b5 857 -disable-* | --disable-*)
503d2be0 858 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 859 # Reject names that are not valid shell variable names.
f053c89f 860 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
861 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
862 { (exit 1); exit 1; }; }
f053c89f 863 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
864 eval enable_$ac_feature=no ;;
865
866 -docdir | --docdir | --docdi | --doc | --do)
867 ac_prev=docdir ;;
868 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
869 docdir=$ac_optarg ;;
870
871 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
872 ac_prev=dvidir ;;
873 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
874 dvidir=$ac_optarg ;;
ba4481b5
DL
875
876 -enable-* | --enable-*)
503d2be0 877 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 878 # Reject names that are not valid shell variable names.
f053c89f 879 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
880 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
881 { (exit 1); exit 1; }; }
f053c89f 882 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 883 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
884
885 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
886 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
887 | --exec | --exe | --ex)
888 ac_prev=exec_prefix ;;
889 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
890 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
891 | --exec=* | --exe=* | --ex=*)
503d2be0 892 exec_prefix=$ac_optarg ;;
ba4481b5
DL
893
894 -gas | --gas | --ga | --g)
895 # Obsolete; use --with-gas.
896 with_gas=yes ;;
897
503d2be0
AS
898 -help | --help | --hel | --he | -h)
899 ac_init_help=long ;;
900 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
901 ac_init_help=recursive ;;
902 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
903 ac_init_help=short ;;
ba4481b5
DL
904
905 -host | --host | --hos | --ho)
503d2be0 906 ac_prev=host_alias ;;
ba4481b5 907 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 908 host_alias=$ac_optarg ;;
ba4481b5 909
ca81d7a0
JD
910 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
911 ac_prev=htmldir ;;
912 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
913 | --ht=*)
914 htmldir=$ac_optarg ;;
915
ba4481b5
DL
916 -includedir | --includedir | --includedi | --included | --include \
917 | --includ | --inclu | --incl | --inc)
918 ac_prev=includedir ;;
919 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
920 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 921 includedir=$ac_optarg ;;
ba4481b5
DL
922
923 -infodir | --infodir | --infodi | --infod | --info | --inf)
924 ac_prev=infodir ;;
925 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 926 infodir=$ac_optarg ;;
ba4481b5
DL
927
928 -libdir | --libdir | --libdi | --libd)
929 ac_prev=libdir ;;
930 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 931 libdir=$ac_optarg ;;
ba4481b5
DL
932
933 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
934 | --libexe | --libex | --libe)
935 ac_prev=libexecdir ;;
936 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
937 | --libexe=* | --libex=* | --libe=*)
503d2be0 938 libexecdir=$ac_optarg ;;
ba4481b5 939
ca81d7a0
JD
940 -localedir | --localedir | --localedi | --localed | --locale)
941 ac_prev=localedir ;;
942 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
943 localedir=$ac_optarg ;;
944
ba4481b5 945 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 946 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
947 ac_prev=localstatedir ;;
948 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 949 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 950 localstatedir=$ac_optarg ;;
ba4481b5
DL
951
952 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
953 ac_prev=mandir ;;
954 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 955 mandir=$ac_optarg ;;
ba4481b5
DL
956
957 -nfp | --nfp | --nf)
958 # Obsolete; use --without-fp.
959 with_fp=no ;;
960
961 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 962 | --no-cr | --no-c | -n)
ba4481b5
DL
963 no_create=yes ;;
964
965 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
966 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
967 no_recursion=yes ;;
968
969 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
970 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
971 | --oldin | --oldi | --old | --ol | --o)
972 ac_prev=oldincludedir ;;
973 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
974 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
975 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 976 oldincludedir=$ac_optarg ;;
ba4481b5
DL
977
978 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
979 ac_prev=prefix ;;
980 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 981 prefix=$ac_optarg ;;
ba4481b5
DL
982
983 -program-prefix | --program-prefix | --program-prefi | --program-pref \
984 | --program-pre | --program-pr | --program-p)
985 ac_prev=program_prefix ;;
986 -program-prefix=* | --program-prefix=* | --program-prefi=* \
987 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 988 program_prefix=$ac_optarg ;;
ba4481b5
DL
989
990 -program-suffix | --program-suffix | --program-suffi | --program-suff \
991 | --program-suf | --program-su | --program-s)
992 ac_prev=program_suffix ;;
993 -program-suffix=* | --program-suffix=* | --program-suffi=* \
994 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 995 program_suffix=$ac_optarg ;;
ba4481b5
DL
996
997 -program-transform-name | --program-transform-name \
998 | --program-transform-nam | --program-transform-na \
999 | --program-transform-n | --program-transform- \
1000 | --program-transform | --program-transfor \
1001 | --program-transfo | --program-transf \
1002 | --program-trans | --program-tran \
1003 | --progr-tra | --program-tr | --program-t)
1004 ac_prev=program_transform_name ;;
1005 -program-transform-name=* | --program-transform-name=* \
1006 | --program-transform-nam=* | --program-transform-na=* \
1007 | --program-transform-n=* | --program-transform-=* \
1008 | --program-transform=* | --program-transfor=* \
1009 | --program-transfo=* | --program-transf=* \
1010 | --program-trans=* | --program-tran=* \
1011 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1012 program_transform_name=$ac_optarg ;;
ba4481b5 1013
ca81d7a0
JD
1014 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1015 ac_prev=pdfdir ;;
1016 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1017 pdfdir=$ac_optarg ;;
1018
1019 -psdir | --psdir | --psdi | --psd | --ps)
1020 ac_prev=psdir ;;
1021 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1022 psdir=$ac_optarg ;;
1023
ba4481b5
DL
1024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1025 | -silent | --silent | --silen | --sile | --sil)
1026 silent=yes ;;
1027
1028 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1029 ac_prev=sbindir ;;
1030 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1031 | --sbi=* | --sb=*)
503d2be0 1032 sbindir=$ac_optarg ;;
ba4481b5
DL
1033
1034 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1035 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1036 | --sharedst | --shareds | --shared | --share | --shar \
1037 | --sha | --sh)
1038 ac_prev=sharedstatedir ;;
1039 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1040 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1041 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1042 | --sha=* | --sh=*)
503d2be0 1043 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1044
1045 -site | --site | --sit)
1046 ac_prev=site ;;
1047 -site=* | --site=* | --sit=*)
503d2be0 1048 site=$ac_optarg ;;
ba4481b5
DL
1049
1050 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1051 ac_prev=srcdir ;;
1052 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1053 srcdir=$ac_optarg ;;
ba4481b5
DL
1054
1055 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1056 | --syscon | --sysco | --sysc | --sys | --sy)
1057 ac_prev=sysconfdir ;;
1058 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1059 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1060 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1061
1062 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1063 ac_prev=target_alias ;;
ba4481b5 1064 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1065 target_alias=$ac_optarg ;;
ba4481b5
DL
1066
1067 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1068 verbose=yes ;;
1069
503d2be0
AS
1070 -version | --version | --versio | --versi | --vers | -V)
1071 ac_init_version=: ;;
ba4481b5
DL
1072
1073 -with-* | --with-*)
503d2be0 1074 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
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=\$ac_optarg ;;
ba4481b5
DL
1081
1082 -without-* | --without-*)
503d2be0 1083 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1084 # Reject names that are not valid shell variable names.
f053c89f 1085 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1086 { echo "$as_me: error: invalid package name: $ac_package" >&2
1087 { (exit 1); exit 1; }; }
f053c89f 1088 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1089 eval with_$ac_package=no ;;
ba4481b5
DL
1090
1091 --x)
1092 # Obsolete; use --with-x.
1093 with_x=yes ;;
1094
1095 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1096 | --x-incl | --x-inc | --x-in | --x-i)
1097 ac_prev=x_includes ;;
1098 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1099 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1100 x_includes=$ac_optarg ;;
ba4481b5
DL
1101
1102 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1103 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1104 ac_prev=x_libraries ;;
1105 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1106 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1107 x_libraries=$ac_optarg ;;
ba4481b5 1108
503d2be0
AS
1109 -*) { echo "$as_me: error: unrecognized option: $ac_option
1110Try \`$0 --help' for more information." >&2
1111 { (exit 1); exit 1; }; }
ba4481b5
DL
1112 ;;
1113
503d2be0
AS
1114 *=*)
1115 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1116 # Reject names that are not valid shell variable names.
1117 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1118 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1119 { (exit 1); exit 1; }; }
ca81d7a0 1120 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1121 export $ac_envvar ;;
1122
ba4481b5 1123 *)
503d2be0
AS
1124 # FIXME: should be removed in autoconf 3.0.
1125 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1126 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1127 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1128 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1129 ;;
1130
1131 esac
1132done
1133
1134if test -n "$ac_prev"; then
503d2be0
AS
1135 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1136 { echo "$as_me: error: missing argument to $ac_option" >&2
1137 { (exit 1); exit 1; }; }
ba4481b5 1138fi
ba4481b5 1139
ca81d7a0
JD
1140# Be sure to have absolute directory names.
1141for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1142 datadir sysconfdir sharedstatedir localstatedir includedir \
1143 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1144 libdir localedir mandir
ba4481b5 1145do
ca81d7a0 1146 eval ac_val=\$$ac_var
503d2be0 1147 case $ac_val in
ca81d7a0
JD
1148 [\\/$]* | ?:[\\/]* ) continue;;
1149 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1150 esac
ca81d7a0
JD
1151 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1152 { (exit 1); exit 1; }; }
ba4481b5
DL
1153done
1154
503d2be0
AS
1155# There might be people who depend on the old broken behavior: `$host'
1156# used to hold the argument of --host etc.
c0d27fcc 1157# FIXME: To remove some day.
503d2be0
AS
1158build=$build_alias
1159host=$host_alias
1160target=$target_alias
1161
c0d27fcc 1162# FIXME: To remove some day.
503d2be0
AS
1163if test "x$host_alias" != x; then
1164 if test "x$build_alias" = x; then
1165 cross_compiling=maybe
1166 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1167 If a cross compiler is detected then cross compile mode will be used." >&2
1168 elif test "x$build_alias" != "x$host_alias"; then
1169 cross_compiling=yes
1170 fi
1171fi
ba4481b5 1172
503d2be0
AS
1173ac_tool_prefix=
1174test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1175
503d2be0 1176test "$silent" = yes && exec 6>/dev/null
ba4481b5 1177
c0d27fcc 1178
ca81d7a0
JD
1179ac_pwd=`pwd` && test -n "$ac_pwd" &&
1180ac_ls_di=`ls -di .` &&
1181ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1182 { echo "$as_me: error: Working directory cannot be determined" >&2
1183 { (exit 1); exit 1; }; }
1184test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1185 { echo "$as_me: error: pwd does not report name of working directory" >&2
1186 { (exit 1); exit 1; }; }
1187
1188
ba4481b5
DL
1189# Find the source files, if location was not specified.
1190if test -z "$srcdir"; then
1191 ac_srcdir_defaulted=yes
ca81d7a0
JD
1192 # Try the directory containing this script, then the parent directory.
1193 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1194$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1195 X"$0" : 'X\(//\)[^/]' \| \
1196 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1197 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1198echo X"$0" |
ca81d7a0
JD
1199 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)[^/].*/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\/\)$/{
1208 s//\1/
1209 q
1210 }
1211 /^X\(\/\).*/{
1212 s//\1/
1213 q
1214 }
1215 s/.*/./; q'`
ba4481b5 1216 srcdir=$ac_confdir
ca81d7a0 1217 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1218 srcdir=..
1219 fi
1220else
1221 ac_srcdir_defaulted=no
1222fi
ca81d7a0
JD
1223if test ! -r "$srcdir/$ac_unique_file"; then
1224 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1225 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1226 { (exit 1); exit 1; }; }
ba4481b5 1227fi
ca81d7a0
JD
1228ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1229ac_abs_confdir=`(
1230 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1231 { (exit 1); exit 1; }; }
ca81d7a0
JD
1232 pwd)`
1233# When building in place, set srcdir=.
1234if test "$ac_abs_confdir" = "$ac_pwd"; then
1235 srcdir=.
1236fi
1237# Remove unnecessary trailing slashes from srcdir.
1238# Double slashes in file names in object file debugging info
1239# mess up M-x gdb in Emacs.
1240case $srcdir in
1241*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1242esac
1243for ac_var in $ac_precious_vars; do
1244 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1245 eval ac_env_${ac_var}_value=\$${ac_var}
1246 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1247 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1248done
503d2be0
AS
1249
1250#
1251# Report the --help message.
1252#
1253if test "$ac_init_help" = "long"; then
1254 # Omit some internal or obsolete options to make the list less imposing.
1255 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1256 cat <<_ACEOF
5d374ce1 1257\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1258
1259Usage: $0 [OPTION]... [VAR=VALUE]...
1260
1261To assign environment variables (e.g., CC, CFLAGS...), specify them as
1262VAR=VALUE. See below for descriptions of some of the useful variables.
1263
1264Defaults for the options are specified in brackets.
1265
1266Configuration:
1267 -h, --help display this help and exit
1268 --help=short display options specific to this package
1269 --help=recursive display the short help of all the included packages
1270 -V, --version display version information and exit
1271 -q, --quiet, --silent do not print \`checking...' messages
1272 --cache-file=FILE cache test results in FILE [disabled]
1273 -C, --config-cache alias for \`--cache-file=config.cache'
1274 -n, --no-create do not create output files
1275 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1276
503d2be0
AS
1277Installation directories:
1278 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1279 [$ac_default_prefix]
503d2be0 1280 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1281 [PREFIX]
503d2be0
AS
1282
1283By default, \`make install' will install all the files in
1284\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1285an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1286for instance \`--prefix=\$HOME'.
1287
1288For better control, use the options below.
1289
1290Fine tuning of the installation directories:
1291 --bindir=DIR user executables [EPREFIX/bin]
1292 --sbindir=DIR system admin executables [EPREFIX/sbin]
1293 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1294 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1295 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1296 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1297 --libdir=DIR object code libraries [EPREFIX/lib]
1298 --includedir=DIR C header files [PREFIX/include]
1299 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1300 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1301 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1302 --infodir=DIR info documentation [DATAROOTDIR/info]
1303 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1304 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1305 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1306 --htmldir=DIR html documentation [DOCDIR]
1307 --dvidir=DIR dvi documentation [DOCDIR]
1308 --pdfdir=DIR pdf documentation [DOCDIR]
1309 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1310_ACEOF
503d2be0 1311
c0d27fcc 1312 cat <<\_ACEOF
503d2be0 1313
ba5da88a
PJ
1314Program names:
1315 --program-prefix=PREFIX prepend PREFIX to installed program names
1316 --program-suffix=SUFFIX append SUFFIX to installed program names
1317 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1318
503d2be0
AS
1319X features:
1320 --x-includes=DIR X include files are in DIR
1321 --x-libraries=DIR X library files are in DIR
1322
1323System types:
1324 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1325 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1326_ACEOF
503d2be0
AS
1327fi
1328
1329if test -n "$ac_init_help"; then
9cf8f393 1330 case $ac_init_help in
5d374ce1 1331 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1332 esac
c0d27fcc 1333 cat <<\_ACEOF
503d2be0
AS
1334
1335Optional Features:
1336 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1337 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1338 --enable-cocoa-experimental-ctrl-g
1339 enable experimental improved ctrl-g recognition
1340 --disable-ns-self-contained
1341 disable self contained build under NeXTstep
d0098f13 1342 --enable-asserts compile code with asserts enabled
709e90de
AS
1343 --enable-maintainer-mode
1344 enable make rules and dependencies not useful (and
1345 sometimes confusing) to the casual installer
9adfabc2
LK
1346 --enable-locallisppath=PATH
1347 directories Emacs should search for lisp files
1348 specific to this site
503d2be0
AS
1349 --disable-largefile omit support for large files
1350
1351Optional Packages:
1352 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1353 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1354 --without-pop don't support POP mail retrieval with movemail
1355 --with-kerberos support Kerberos-authenticated POP
1356 --with-kerberos5 support Kerberos version 5 authenticated POP
1357 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1358 --without-sound don't compile with sound support
a51f4969 1359 --without-sync-input Process async input synchronously
49adb60f
TTN
1360 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1361 motif, gtk, no)
c8467c40
GM
1362 --without-xpm don't compile with XPM image support
1363 --without-jpeg don't compile with JPEG image support
1364 --without-tiff don't compile with TIFF image support
1365 --without-gif don't compile with GIF image support
1366 --without-png don't compile with PNG image support
1367 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1368 --without-freetype don't use Freetype for local font support
1369 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1370 --without-libotf don't use libotf for OpenType font support
1371 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1372 --without-toolkit-scroll-bars
cc227489 1373 don't use Motif or Xaw3d scroll bars
c982cf7d 1374 --without-xaw3d don't use Xaw3d
cc227489 1375 --without-xim don't use X11 XIM
edfda783 1376 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1377 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1378 console
b5a922de 1379 --without-dbus don't compile with D-Bus support
921fbdf0 1380 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1381
00b9c927
MO
1382 --with-pkg-config-prog=PATH
1383 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1384 --with-x use the X Window System
1385
1386Some influential environment variables:
1387 CC C compiler command
1388 CFLAGS C compiler flags
1389 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1390 nonstandard directory <lib dir>
f053c89f 1391 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1392 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1393 you have headers in a nonstandard directory <include dir>
503d2be0 1394 CPP C preprocessor
ca81d7a0 1395 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1396
1397Use these variables to override the choices made by `configure' or to help
1398it to find libraries and programs with nonstandard names/locations.
1399
c0d27fcc 1400_ACEOF
ca81d7a0 1401ac_status=$?
503d2be0
AS
1402fi
1403
1404if test "$ac_init_help" = "recursive"; then
1405 # If there are subdirs, report their specific --help.
c0d27fcc 1406 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1407 test -d "$ac_dir" || continue
c0d27fcc
MR
1408 ac_builddir=.
1409
ca81d7a0
JD
1410case "$ac_dir" in
1411.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1412*)
c0d27fcc 1413 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1414 # A ".." for each directory in $ac_dir_suffix.
1415 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1416 case $ac_top_builddir_sub in
1417 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1418 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1419 esac ;;
1420esac
1421ac_abs_top_builddir=$ac_pwd
1422ac_abs_builddir=$ac_pwd$ac_dir_suffix
1423# for backward compatibility:
1424ac_top_builddir=$ac_top_build_prefix
503d2be0 1425
c0d27fcc 1426case $srcdir in
ca81d7a0 1427 .) # We are building in place.
c0d27fcc 1428 ac_srcdir=.
ca81d7a0
JD
1429 ac_top_srcdir=$ac_top_builddir_sub
1430 ac_abs_top_srcdir=$ac_pwd ;;
1431 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1432 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1433 ac_top_srcdir=$srcdir
1434 ac_abs_top_srcdir=$srcdir ;;
1435 *) # Relative name.
1436 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1437 ac_top_srcdir=$ac_top_build_prefix$srcdir
1438 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1439esac
ca81d7a0
JD
1440ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1441
1442 cd "$ac_dir" || { ac_status=$?; continue; }
1443 # Check for guested configure.
1444 if test -f "$ac_srcdir/configure.gnu"; then
1445 echo &&
1446 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1447 elif test -f "$ac_srcdir/configure"; then
1448 echo &&
1449 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1450 else
c0d27fcc 1451 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1452 fi || ac_status=$?
1453 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1454 done
1455fi
1456
ca81d7a0 1457test -n "$ac_init_help" && exit $ac_status
503d2be0 1458if $ac_init_version; then
c0d27fcc 1459 cat <<\_ACEOF
5d374ce1 1460emacs configure 23.0.60
f053c89f 1461generated by GNU Autoconf 2.61
503d2be0 1462
ca81d7a0
JD
1463Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14642002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1465This configure script is free software; the Free Software Foundation
1466gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1467_ACEOF
ca81d7a0 1468 exit
503d2be0 1469fi
ca81d7a0 1470cat >config.log <<_ACEOF
503d2be0
AS
1471This file contains any messages produced by compilers while
1472running configure, to aid debugging if configure makes a mistake.
1473
5d374ce1 1474It was created by emacs $as_me 23.0.60, which was
f053c89f 1475generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1476
1477 $ $0 $@
1478
c0d27fcc 1479_ACEOF
ca81d7a0 1480exec 5>>config.log
503d2be0
AS
1481{
1482cat <<_ASUNAME
c0d27fcc
MR
1483## --------- ##
1484## Platform. ##
1485## --------- ##
503d2be0
AS
1486
1487hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1488uname -m = `(uname -m) 2>/dev/null || echo unknown`
1489uname -r = `(uname -r) 2>/dev/null || echo unknown`
1490uname -s = `(uname -s) 2>/dev/null || echo unknown`
1491uname -v = `(uname -v) 2>/dev/null || echo unknown`
1492
1493/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1494/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1495
1496/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1497/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1498/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1499/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1500/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1501/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1502/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1503
925c2f3f 1504_ASUNAME
c0d27fcc
MR
1505
1506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1507for as_dir in $PATH
1508do
1509 IFS=$as_save_IFS
1510 test -z "$as_dir" && as_dir=.
1511 echo "PATH: $as_dir"
1512done
ca81d7a0 1513IFS=$as_save_IFS
c0d27fcc 1514
503d2be0
AS
1515} >&5
1516
c0d27fcc
MR
1517cat >&5 <<_ACEOF
1518
1519
1520## ----------- ##
1521## Core tests. ##
1522## ----------- ##
1523
1524_ACEOF
503d2be0 1525
503d2be0
AS
1526
1527# Keep a trace of the command line.
1528# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1529# Strip out --silent because we don't want to record it for future runs.
503d2be0 1530# Also quote any args containing shell meta-characters.
19650fd6 1531# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1532ac_configure_args=
19650fd6
AS
1533ac_configure_args0=
1534ac_configure_args1=
19650fd6
AS
1535ac_must_keep_next=false
1536for ac_pass in 1 2
503d2be0 1537do
19650fd6
AS
1538 for ac_arg
1539 do
1540 case $ac_arg in
1541 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1542 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1543 | -silent | --silent | --silen | --sile | --sil)
1544 continue ;;
ca81d7a0 1545 *\'*)
19650fd6
AS
1546 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1547 esac
1548 case $ac_pass in
1549 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1550 2)
1551 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1552 if test $ac_must_keep_next = true; then
edfaf76d 1553 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1554 else
edfaf76d
LK
1555 case $ac_arg in
1556 *=* | --config-cache | -C | -disable-* | --disable-* \
1557 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1558 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1559 | -with-* | --with-* | -without-* | --without-* | --x)
1560 case "$ac_configure_args0 " in
1561 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1562 esac
1563 ;;
1564 -* ) ac_must_keep_next=true ;;
1565 esac
19650fd6 1566 fi
ca81d7a0 1567 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1568 ;;
1569 esac
1570 done
503d2be0 1571done
19650fd6
AS
1572$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1573$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1574
1575# When interrupted or exit'd, cleanup temporary files, and complete
1576# config.log. We remove comments because anyway the quotes in there
1577# would cause problems or look ugly.
ca81d7a0
JD
1578# WARNING: Use '\'' to represent an apostrophe within the trap.
1579# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1580trap 'exit_status=$?
1581 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1582 {
1583 echo
6bae0ccf 1584
c0d27fcc
MR
1585 cat <<\_ASBOX
1586## ---------------- ##
1587## Cache variables. ##
1588## ---------------- ##
1589_ASBOX
1590 echo
1591 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1592(
1593 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1594 eval ac_val=\$$ac_var
1595 case $ac_val in #(
1596 *${as_nl}*)
1597 case $ac_var in #(
1598 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1599echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1600 esac
1601 case $ac_var in #(
1602 _ | IFS | as_nl) ;; #(
1603 *) $as_unset $ac_var ;;
1604 esac ;;
1605 esac
1606 done
503d2be0 1607 (set) 2>&1 |
ca81d7a0
JD
1608 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1609 *${as_nl}ac_space=\ *)
503d2be0 1610 sed -n \
ca81d7a0
JD
1611 "s/'\''/'\''\\\\'\'''\''/g;
1612 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1613 ;; #(
503d2be0 1614 *)
ca81d7a0 1615 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1616 ;;
ca81d7a0
JD
1617 esac |
1618 sort
1619)
c0d27fcc 1620 echo
6bae0ccf
DL
1621
1622 cat <<\_ASBOX
1623## ----------------- ##
1624## Output variables. ##
1625## ----------------- ##
1626_ASBOX
1627 echo
1628 for ac_var in $ac_subst_vars
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
1638 if test -n "$ac_subst_files"; then
1639 cat <<\_ASBOX
ca81d7a0
JD
1640## ------------------- ##
1641## File substitutions. ##
1642## ------------------- ##
6bae0ccf
DL
1643_ASBOX
1644 echo
1645 for ac_var in $ac_subst_files
1646 do
ca81d7a0
JD
1647 eval ac_val=\$$ac_var
1648 case $ac_val in
1649 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1650 esac
1651 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1652 done | sort
1653 echo
1654 fi
1655
c0d27fcc
MR
1656 if test -s confdefs.h; then
1657 cat <<\_ASBOX
1658## ----------- ##
1659## confdefs.h. ##
1660## ----------- ##
1661_ASBOX
1662 echo
ca81d7a0 1663 cat confdefs.h
c0d27fcc
MR
1664 echo
1665 fi
1666 test "$ac_signal" != 0 &&
1667 echo "$as_me: caught signal $ac_signal"
1668 echo "$as_me: exit $exit_status"
1669 } >&5
ca81d7a0
JD
1670 rm -f core *.core core.conftest.* &&
1671 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1672 exit $exit_status
ca81d7a0 1673' 0
503d2be0
AS
1674for ac_signal in 1 2 13 15; do
1675 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1676done
1677ac_signal=0
1678
1679# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1680rm -f -r conftest* confdefs.h
ba4481b5 1681
c0d27fcc
MR
1682# Predefined preprocessor variables.
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_NAME "$PACKAGE_NAME"
1686_ACEOF
1687
1688
1689cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1691_ACEOF
1692
1693
1694cat >>confdefs.h <<_ACEOF
1695#define PACKAGE_VERSION "$PACKAGE_VERSION"
1696_ACEOF
1697
1698
1699cat >>confdefs.h <<_ACEOF
1700#define PACKAGE_STRING "$PACKAGE_STRING"
1701_ACEOF
1702
1703
1704cat >>confdefs.h <<_ACEOF
1705#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1706_ACEOF
1707
1708
503d2be0 1709# Let the site file select an alternate cache file if it wants to.
ba4481b5 1710# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1711if test -n "$CONFIG_SITE"; then
1712 set x "$CONFIG_SITE"
1713elif test "x$prefix" != xNONE; then
1714 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1715else
1716 set x "$ac_default_prefix/share/config.site" \
1717 "$ac_default_prefix/etc/config.site"
ba4481b5 1718fi
ca81d7a0
JD
1719shift
1720for ac_site_file
1721do
ba4481b5 1722 if test -r "$ac_site_file"; then
c0d27fcc 1723 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1724echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1725 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1726 . "$ac_site_file"
1727 fi
1728done
1729
1730if test -r "$cache_file"; then
503d2be0
AS
1731 # Some versions of bash will fail to source /dev/null (special
1732 # files actually), so we avoid doing that.
1733 if test -f "$cache_file"; then
c0d27fcc 1734 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1735echo "$as_me: loading cache $cache_file" >&6;}
1736 case $cache_file in
ca81d7a0
JD
1737 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1738 *) . "./$cache_file";;
503d2be0
AS
1739 esac
1740 fi
ba4481b5 1741else
c0d27fcc 1742 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1743echo "$as_me: creating cache $cache_file" >&6;}
1744 >$cache_file
1745fi
1746
f053c89f
CY
1747ac_header_list="$ac_header_list sys/time.h"
1748ac_header_list="$ac_header_list unistd.h"
1749ac_func_list="$ac_func_list alarm"
503d2be0
AS
1750# Check that the precious variables saved in the cache have kept the same
1751# value.
1752ac_cache_corrupted=false
ca81d7a0 1753for ac_var in $ac_precious_vars; do
503d2be0
AS
1754 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1755 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1756 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1757 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1758 case $ac_old_set,$ac_new_set in
1759 set,)
c0d27fcc 1760 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1761echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1762 ac_cache_corrupted=: ;;
1763 ,set)
c0d27fcc 1764 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1765echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1766 ac_cache_corrupted=: ;;
1767 ,);;
1768 *)
1769 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1770 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1771echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1772 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1773echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1774 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1775echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1776 ac_cache_corrupted=:
503d2be0
AS
1777 fi;;
1778 esac
c0d27fcc 1779 # Pass precious variables to config.status.
503d2be0
AS
1780 if test "$ac_new_set" = set; then
1781 case $ac_new_val in
ca81d7a0 1782 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1783 *) ac_arg=$ac_var=$ac_new_val ;;
1784 esac
1785 case " $ac_configure_args " in
1786 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1787 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1788 esac
1789 fi
1790done
1791if $ac_cache_corrupted; then
c0d27fcc 1792 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1793echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1794 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1795echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1796 { (exit 1); exit 1; }; }
ba4481b5
DL
1797fi
1798
c0d27fcc
MR
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
9cf8f393
JD
1810
1811
1812
1813
1814
1815
1816
1817
c0d27fcc
MR
1818
1819
1820
1821
1822
ca81d7a0
JD
1823ac_ext=c
1824ac_cpp='$CPP $CPPFLAGS'
1825ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1826ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1827ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1828
6bae0ccf 1829
ca81d7a0 1830ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1831
c0d27fcc 1832
9fb1ba80 1833
ba5da88a 1834test "$program_prefix" != NONE &&
ca81d7a0 1835 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1836# Use a double $ so make ignores it.
1837test "$program_suffix" != NONE &&
ca81d7a0 1838 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1839# Double any \ or $. echo might interpret backslashes.
1840# By default was `s,x,x', remove it if useless.
1841cat <<\_ACEOF >conftest.sed
1842s/[\\$]/&&/g;s/;s,x,x,$//
1843_ACEOF
1844program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1845rm -f conftest.sed
ba5da88a 1846
c0d27fcc 1847
ba4481b5
DL
1848lispdir='${datadir}/emacs/${version}/lisp'
1849locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1850'${datadir}/emacs/site-lisp'
1851lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1852etcdir='${datadir}/emacs/${version}/etc'
1853archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1854docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1855gamedir='${localstatedir}/games/emacs'
98418dba
CW
1856
1857gameuser=games
1858
c0d27fcc 1859
49adb60f 1860
00b9c927 1861
ca81d7a0 1862# Check whether --with-pop was given.
ba4481b5 1863if test "${with_pop+set}" = set; then
00b9c927 1864 withval=$with_pop;
3d9fec71 1865else
00b9c927
MO
1866 with_pop=yes
1867fi
1868
1869if test "$with_pop" = yes; then
1870 cat >>confdefs.h <<\_ACEOF
3d9fec71 1871#define MAIL_USE_POP 1
c0d27fcc 1872_ACEOF
3d9fec71 1873
ca81d7a0 1874fi
ba4481b5 1875
c0d27fcc 1876
c0d27fcc 1877
ca81d7a0 1878# Check whether --with-kerberos was given.
a21616bd 1879if test "${with_kerberos+set}" = set; then
00b9c927
MO
1880 withval=$with_kerberos;
1881else
1882 with_kerberos=no
1883fi
1884
ff1095d1 1885if test "$with_kerberos" != no; then
54e6585f 1886 cat >>confdefs.h <<\_ACEOF
a21616bd 1887#define KERBEROS 1
c0d27fcc 1888_ACEOF
a21616bd 1889
ca81d7a0 1890fi
c0d27fcc 1891
c0d27fcc 1892
49adb60f 1893
ca81d7a0 1894# Check whether --with-kerberos5 was given.
a21616bd 1895if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1896 withval=$with_kerberos5;
1897else
1898 with_kerberos5=no
1899fi
1900
ff1095d1
AR
1901if test "${with_kerberos5}" != no; then
1902 if test "${with_kerberos}" = no; then
a21616bd 1903 with_kerberos=yes
c0d27fcc 1904 cat >>confdefs.h <<\_ACEOF
a21616bd 1905#define KERBEROS 1
c0d27fcc 1906_ACEOF
a21616bd
KR
1907
1908 fi
b936fae4 1909
c0d27fcc 1910cat >>confdefs.h <<\_ACEOF
a21616bd 1911#define KERBEROS5 1
c0d27fcc 1912_ACEOF
a21616bd 1913
ca81d7a0 1914fi
b936fae4 1915
49adb60f 1916
ca81d7a0
JD
1917# Check whether --with-hesiod was given.
1918if test "${with_hesiod+set}" = set; then
00b9c927
MO
1919 withval=$with_hesiod;
1920else
1921 with_hesiod=no
1922fi
1923
ff1095d1 1924if test "$with_hesiod" != no; then
54e6585f 1925
c0d27fcc 1926cat >>confdefs.h <<\_ACEOF
ba4481b5 1927#define HESIOD 1
c0d27fcc 1928_ACEOF
ba4481b5 1929
ca81d7a0 1930fi
c0d27fcc 1931
c0d27fcc 1932
ca81d7a0 1933# Check whether --with-sound was given.
2c9dccc9 1934if test "${with_sound+set}" = set; then
ca81d7a0 1935 withval=$with_sound;
00b9c927
MO
1936else
1937 with_sound=yes
ca81d7a0 1938fi
2c9dccc9 1939
2c9dccc9 1940
c0d27fcc 1941
a51f4969
SM
1942# Check whether --with-sync-input was given.
1943if test "${with_sync_input+set}" = set; then
1944 withval=$with_sync_input;
1945else
1946 with_sync_input=yes
1947fi
1948
1949if test "$with_sync_input" = yes; then
1950
1951cat >>confdefs.h <<\_ACEOF
1952#define SYNC_INPUT 1
1953_ACEOF
1954
1955fi
1956
1957
ca81d7a0 1958# Check whether --with-x-toolkit was given.
ba4481b5 1959if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1960 withval=$with_x_toolkit; case "${withval}" in
089a966d 1961 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1962 n | no ) val=no ;;
1963 l | lu | luc | luci | lucid ) val=lucid ;;
1964 a | at | ath | athe | athen | athena ) val=athena ;;
1965 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1966 g | gt | gtk ) val=gtk ;;
ba4481b5 1967 * )
29d69661 1968{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1969this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1970\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1971echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1972this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1973\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1974 { (exit 1); exit 1; }; }
ba4481b5
DL
1975 ;;
1976 esac
1977 with_x_toolkit=$val
1978
ca81d7a0 1979fi
8eeae1c9 1980
ba4481b5 1981
49adb60f 1982
ca81d7a0 1983# Check whether --with-xpm was given.
ba4481b5 1984if test "${with_xpm+set}" = set; then
ca81d7a0 1985 withval=$with_xpm;
00b9c927 1986else
c8467c40 1987 with_xpm=yes
ca81d7a0 1988fi
503d2be0 1989
ba4481b5 1990
ca81d7a0 1991# Check whether --with-jpeg was given.
ba4481b5 1992if test "${with_jpeg+set}" = set; then
ca81d7a0 1993 withval=$with_jpeg;
00b9c927 1994else
c8467c40 1995 with_jpeg=yes
ca81d7a0 1996fi
503d2be0 1997
ba4481b5 1998
ca81d7a0 1999# Check whether --with-tiff was given.
ba4481b5 2000if test "${with_tiff+set}" = set; then
ca81d7a0 2001 withval=$with_tiff;
00b9c927 2002else
c8467c40 2003 with_tiff=yes
ca81d7a0 2004fi
503d2be0 2005
ba4481b5 2006
ca81d7a0 2007# Check whether --with-gif was given.
ba4481b5 2008if test "${with_gif+set}" = set; then
ca81d7a0 2009 withval=$with_gif;
00b9c927 2010else
c8467c40 2011 with_gif=yes
ca81d7a0 2012fi
503d2be0 2013
ba4481b5 2014
ca81d7a0 2015# Check whether --with-png was given.
ba4481b5 2016if test "${with_png+set}" = set; then
ca81d7a0 2017 withval=$with_png;
00b9c927 2018else
c8467c40 2019 with_png=yes
ca81d7a0 2020fi
503d2be0 2021
ba4481b5 2022
0cfc0546
GM
2023# Check whether --with-rsvg was given.
2024if test "${with_rsvg+set}" = set; then
2025 withval=$with_rsvg;
00b9c927 2026else
c8467c40 2027 with_rsvg=yes
0cfc0546
GM
2028fi
2029
2030
c8467c40 2031
c24fa7dc 2032# Check whether --with-freetype was given.
45a4b03e 2033if test "${with_freetype+set}" = set; then
c24fa7dc 2034 withval=$with_freetype;
d235ca2f 2035else
4efcc8d1 2036 with_freetype=yes
c24fa7dc 2037fi
45a4b03e 2038
45a4b03e 2039
c24fa7dc 2040# Check whether --with-xft was given.
45a4b03e 2041if test "${with_xft+set}" = set; then
c24fa7dc 2042 withval=$with_xft;
d235ca2f 2043else
4efcc8d1 2044 with_xft=yes
c24fa7dc 2045fi
45a4b03e 2046
45a4b03e 2047
d235ca2f
MB
2048# Check whether --with-libotf was given.
2049if test "${with_libotf+set}" = set; then
2050 withval=$with_libotf;
2051else
2052 with_libotf=yes
79011b82
NR
2053fi
2054
2055
d235ca2f
MB
2056# Check whether --with-m17n-flt was given.
2057if test "${with_m17n_flt+set}" = set; then
2058 withval=$with_m17n_flt;
2059else
2060 with_m17n_flt=yes
0cfc0546
GM
2061fi
2062
2063
d235ca2f 2064
ca81d7a0 2065# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2066if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2067 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2068else
2069 with_toolkit_scroll_bars=yes
ca81d7a0 2070fi
503d2be0 2071
ba4481b5 2072
e35a28cd
TTN
2073# Check whether --with-xaw3d was given.
2074if test "${with_xaw3d+set}" = set; then
2075 withval=$with_xaw3d;
00b9c927
MO
2076else
2077 with_xaw3d=yes
c982cf7d
JD
2078fi
2079
2080
ca81d7a0 2081# Check whether --with-xim was given.
1d36487c 2082if test "${with_xim+set}" = set; then
ca81d7a0 2083 withval=$with_xim;
00b9c927
MO
2084else
2085 with_xim=yes
ca81d7a0 2086fi
1d36487c 2087
ba4481b5 2088
edfda783
AR
2089# Check whether --with-ns was given.
2090if test "${with_ns+set}" = set; then
2091 withval=$with_ns;
2092else
2093 with_ns=no
2094fi
2095
2096
c8467c40
GM
2097
2098# Check whether --with-gpm was given.
2099if test "${with_gpm+set}" = set; then
2100 withval=$with_gpm;
2101else
2102 with_gpm=yes
ca81d7a0 2103fi
e0f712ba 2104
49adb60f 2105
131e4133
MA
2106# Check whether --with-dbus was given.
2107if test "${with_dbus+set}" = set; then
2108 withval=$with_dbus;
00b9c927 2109else
b5a922de 2110 with_dbus=yes
131e4133
MA
2111fi
2112
2113
921fbdf0
GM
2114## For the times when you want to build Emacs but don't have
2115## a suitable makeinfo, and can live without the manuals.
2116
2117# Check whether --with-makeinfo was given.
2118if test "${with_makeinfo+set}" = set; then
2119 withval=$with_makeinfo;
2120else
2121 with_makeinfo=yes
2122fi
2123
2124
e70b2110 2125
9d2818d6
DN
2126# Check whether --with-gtk was given.
2127if test "${with_gtk+set}" = set; then
2128 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2129specify a toolkit." >&5
2130echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2131specify a toolkit." >&2;}
2132 { (exit 1); exit 1; }; }
2133fi
2134
2135
2136
2137# Check whether --with-gcc was given.
2138if test "${with_gcc+set}" = set; then
2139 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2140variable to specify a compiler." >&5
9d2818d6 2141echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2142variable to specify a compiler." >&2;}
9d2818d6
DN
2143 { (exit 1); exit 1; }; }
2144fi
2145
2146
2147
00b9c927
MO
2148# Check whether --with-pkg-config-prog was given.
2149if test "${with_pkg_config_prog+set}" = set; then
2150 withval=$with_pkg_config_prog;
e70b2110
KH
2151fi
2152
00b9c927
MO
2153if test "X${with_pkg_config_prog}" != X; then
2154 if test "${with_pkg_config_prog}" != yes; then
2155 PKG_CONFIG="${with_pkg_config_prog}"
2156 fi
2157fi
e70b2110 2158
edfda783
AR
2159# Check whether --enable-cocoa-experimental-ctrl-g was given.
2160if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
6b8bc489 2161 enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=$enableval
edfda783
AR
2162else
2163 EN_COCOA_EXPERIMENTAL_CTRL_G=no
2164fi
2165
2166
06b62770
AR
2167# Check whether --enable-ns-self-contained was given.
2168if test "${enable_ns_self_contained+set}" = set; then
6b8bc489 2169 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
06b62770
AR
2170else
2171 EN_NS_SELF_CONTAINED=yes
2172fi
2173
2174
c24fa7dc 2175# Check whether --enable-asserts was given.
d0098f13 2176if test "${enable_asserts+set}" = set; then
ca81d7a0 2177 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2178else
2179 USE_XASSERTS=no
ca81d7a0 2180fi
8eeae1c9 2181
d0098f13 2182
ca81d7a0 2183# Check whether --enable-maintainer-mode was given.
19650fd6 2184if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2185 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2186else
2187 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2188fi
2189
19650fd6
AS
2190if test $USE_MAINTAINER_MODE = yes; then
2191 MAINT=
2192else
2193 MAINT=#
2194fi
2195
2196
ca81d7a0 2197# Check whether --enable-locallisppath was given.
9adfabc2 2198if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2199 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2200 locallisppath=
2201elif test "${enableval}" != "yes"; then
2202 locallisppath=${enableval}
2203fi
ca81d7a0
JD
2204fi
2205
9adfabc2 2206
ba4481b5 2207#### Make srcdir absolute, if it isn't already. It's important to
17494071 2208#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2209#### give you automounter prefixes, which can go away. We do all this
2210#### so Emacs can find its files when run uninstalled.
17494071
GM
2211## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2212unset CDPATH
ba4481b5
DL
2213case "${srcdir}" in
2214 /* ) ;;
2215 . )
2216 ## We may be able to use the $PWD environment variable to make this
2217 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2218 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2219 ## but that tested only for a well-formed and valid PWD,
2220 ## it did not object when PWD was well-formed and valid but just wrong.
2221 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2222 then
2223 srcdir="$PWD"
2224 else
2225 srcdir="`(cd ${srcdir}; pwd)`"
2226 fi
2227 ;;
2228 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2229esac
2230
2231#### Check if the source directory already has a configured system in it.
2232if test `pwd` != `(cd ${srcdir} && pwd)` \
2233 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2234 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2235 as a build directory right now; it has been configured in its own
2236 right. To configure in another directory as well, you MUST
2237 use GNU make. If you do not have GNU make, then you must
2238 now do \`make distclean' in ${srcdir},
2239 and then run $0 again." >&5
2240echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2241 as a build directory right now; it has been configured in its own
2242 right. To configure in another directory as well, you MUST
2243 use GNU make. If you do not have GNU make, then you must
2244 now do \`make distclean' in ${srcdir},
503d2be0 2245 and then run $0 again." >&2;}
ba4481b5
DL
2246fi
2247
2248#### Given the configuration name, set machfile and opsysfile to the
2249#### names of the m/*.h and s/*.h files we should use.
2250
2251### Canonicalize the configuration name.
2252
2253ac_aux_dir=
ca81d7a0
JD
2254for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2255 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2256 ac_aux_dir=$ac_dir
2257 ac_install_sh="$ac_aux_dir/install-sh -c"
2258 break
ca81d7a0 2259 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2260 ac_aux_dir=$ac_dir
2261 ac_install_sh="$ac_aux_dir/install.sh -c"
2262 break
ca81d7a0 2263 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2264 ac_aux_dir=$ac_dir
2265 ac_install_sh="$ac_aux_dir/shtool install -c"
2266 break
ba4481b5
DL
2267 fi
2268done
2269if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2270 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2271echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2272 { (exit 1); exit 1; }; }
ba4481b5 2273fi
ca81d7a0
JD
2274
2275# These three variables are undocumented and unsupported,
2276# and are intended to be withdrawn in a future Autoconf release.
2277# They can cause serious problems if a builder's source tree is in a directory
2278# whose full name contains unusual characters.
2279ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2280ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2281ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2282
ba4481b5
DL
2283
2284# Make sure we can run config.sub.
ca81d7a0
JD
2285$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2286 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2287echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2288 { (exit 1); exit 1; }; }
2289
ca81d7a0
JD
2290{ echo "$as_me:$LINENO: checking build system type" >&5
2291echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2292if test "${ac_cv_build+set}" = set; then
2293 echo $ECHO_N "(cached) $ECHO_C" >&6
2294else
ca81d7a0
JD
2295 ac_build_alias=$build_alias
2296test "x$ac_build_alias" = x &&
2297 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2298test "x$ac_build_alias" = x &&
c0d27fcc 2299 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2300echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2301 { (exit 1); exit 1; }; }
ca81d7a0
JD
2302ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2303 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2304echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2305 { (exit 1); exit 1; }; }
2306
2307fi
ca81d7a0
JD
2308{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2309echo "${ECHO_T}$ac_cv_build" >&6; }
2310case $ac_cv_build in
2311*-*-*) ;;
2312*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2313echo "$as_me: error: invalid value of canonical build" >&2;}
2314 { (exit 1); exit 1; }; };;
2315esac
503d2be0 2316build=$ac_cv_build
ca81d7a0
JD
2317ac_save_IFS=$IFS; IFS='-'
2318set x $ac_cv_build
2319shift
2320build_cpu=$1
2321build_vendor=$2
2322shift; shift
2323# Remember, the first character of IFS is used to create $*,
2324# except with old shells:
2325build_os=$*
2326IFS=$ac_save_IFS
2327case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2328
2329
2330{ echo "$as_me:$LINENO: checking host system type" >&5
2331echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2332if test "${ac_cv_host+set}" = set; then
2333 echo $ECHO_N "(cached) $ECHO_C" >&6
2334else
ca81d7a0
JD
2335 if test "x$host_alias" = x; then
2336 ac_cv_host=$ac_cv_build
2337else
2338 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2339 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2340echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2341 { (exit 1); exit 1; }; }
ca81d7a0 2342fi
503d2be0
AS
2343
2344fi
ca81d7a0
JD
2345{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2346echo "${ECHO_T}$ac_cv_host" >&6; }
2347case $ac_cv_host in
2348*-*-*) ;;
2349*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2350echo "$as_me: error: invalid value of canonical host" >&2;}
2351 { (exit 1); exit 1; }; };;
2352esac
503d2be0 2353host=$ac_cv_host
ca81d7a0
JD
2354ac_save_IFS=$IFS; IFS='-'
2355set x $ac_cv_host
2356shift
2357host_cpu=$1
2358host_vendor=$2
2359shift; shift
2360# Remember, the first character of IFS is used to create $*,
2361# except with old shells:
2362host_os=$*
2363IFS=$ac_save_IFS
2364case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2365
c0d27fcc 2366
ba4481b5 2367canonical=$host
1770dcdc 2368configuration=${host_alias-${build_alias-$host}}
ba4481b5 2369
c0d27fcc 2370
22044edf 2371
ba4481b5
DL
2372### If you add support for a new configuration, add code to this
2373### switch statement to recognize your configuration name and select
2374### the appropriate operating system and machine description files.
2375
2376### You would hope that you could choose an m/*.h file pretty much
2377### based on the machine portion of the configuration name, and an s-
2378### file based on the operating system portion. However, it turns out
2379### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2380### example mips.h is MIPS
2381### So we basically have to have a special case for each
ba4481b5
DL
2382### configuration name.
2383###
2384### As far as handling version numbers on operating systems is
2385### concerned, make sure things will fail in a fixable way. If
2386### /etc/MACHINES doesn't say anything about version numbers, be
2387### prepared to handle anything reasonably. If version numbers
2388### matter, be sure /etc/MACHINES says something about it.
2389###
2390### Eric Raymond says we should accept strings like "sysvr4" to mean
2391### "System V Release 4"; he writes, "The old convention encouraged
2392### confusion between `system' and `release' levels'."
2393
2394machine='' opsys='' unported=no
2395case "${canonical}" in
2396
1096bcc0 2397 ## FreeBSD ports
6b0273cd 2398 *-*-freebsd* )
1096bcc0
GM
2399 opsys=freebsd
2400 case "${canonical}" in
2401 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2402 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2403 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2404 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2405 sparc64-*-freebsd*) machine=sparc ;;
2406 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2407 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2408 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2409 esac
2410 ;;
2411
1b275743
GM
2412 ## FreeBSD kernel + glibc based userland
2413 *-*-kfreebsd*gnu* )
2414 opsys=gnu-kfreebsd
2415 case "${canonical}" in
2416 alpha*-*-kfreebsd*) machine=alpha ;;
2417 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2418 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2419 sparc64-*-kfreebsd*) machine=sparc ;;
2420 powerpc-*-kfreebsd*) machine=macppc ;;
2421 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2422 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2423 esac
2424 ;;
2425
ba4481b5
DL
2426 ## NetBSD ports
2427 *-*-netbsd* )
2428 opsys=netbsd
dd038e26 2429 if test -f /usr/lib/crti.o; then
f57bd967
DL
2430
2431cat >>confdefs.h <<\_ACEOF
2432#define HAVE_CRTIN
dd038e26
AS
2433_ACEOF
2434
2435 fi
2436
ba4481b5
DL
2437 case "${canonical}" in
2438 alpha*-*-netbsd*) machine=alpha ;;
2439 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2440 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2441 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2442 vax-*-netbsd*) machine=vax ;;
2df636f4 2443 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2444 x86_64-*-netbsd*) machine=amdx86-64 ;;
2445 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2446 esac
2447 ;;
2448
2449 ## OpenBSD ports
2450 *-*-openbsd* )
2451 opsys=openbsd
2452 case "${canonical}" in
2453 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2454 arm-*-openbsd*) machine=arm ;;
85410b02 2455 i386-*-openbsd*) machine=intel386 ;;
85410b02 2456 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2457 sparc*-*-openbsd*) machine=sparc ;;
2458 vax-*-openbsd*) machine=vax ;;
2459 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2460 esac
2461 ;;
2462
10a3b1a1
EZ
2463 ## LynxOS ports
2464 *-*-lynxos* )
2465 opsys=lynxos
2466 case "${canonical}" in
2467 i[3456]86-*-lynxos*) machine=intel386 ;;
2468 powerpc-*-lynxos*) machine=powerpc ;;
2469 esac
2470 ;;
2471
ba4481b5
DL
2472 alpha*-*-linux-gnu* )
2473 machine=alpha opsys=gnu-linux
2474 ;;
2475
c4bb2108
DL
2476 arm*-*-linux-gnu* )
2477 machine=arm opsys=gnu-linux
2478 ;;
2479
040c474e
CY
2480 ## Apple Darwin / Mac OS X
2481 *-apple-darwin* )
2482 case "${canonical}" in
2483 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2484 powerpc-* ) machine=macppc ;;
040c474e
CY
2485 * ) unported=yes ;;
2486 esac
2487 opsys=darwin
2488 # Define CPP as follows to make autoconf work correctly.
2489 CPP="${CC-cc} -E -no-cpp-precomp"
2490 # Use fink packages if available.
2491 if test -d /sw/include && test -d /sw/lib; then
2492 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2493 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2494 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2495 fi
2496 ;;
2497
6fbb6db1 2498 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2499 hppa*-hp-hpux10.2* )
2500 machine=hp800 opsys=hpux10-20
2501 ;;
6fbb6db1
GM
2502 hppa*-hp-hpux1[1-9]* )
2503 machine=hp800 opsys=hpux11
2504 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2505 ;;
2506
409d9577
GM
2507 hppa*-*-linux-gnu* )
2508 machine=hp800 opsys=gnu-linux
2509 ;;
2510
ba4481b5 2511 ## IBM machines
55597d70 2512 s390-*-linux-gnu* )
138f0859
GM
2513 machine=ibms390 opsys=gnu-linux
2514 ;;
bcdb1378
EZ
2515 s390x-*-linux-gnu* )
2516 machine=ibms390x opsys=gnu-linux
2517 ;;
ba4481b5
DL
2518 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2519 machine=ibmrs6000 opsys=aix4-2
2520 ;;
67bf991b
CY
2521 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2522 machine=ibmrs6000 opsys=aix4-2
2523 ;;
55597d70 2524 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2525 machine=ibmrs6000 opsys=aix4-2
2526 ;;
26a42dac
DN
2527 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2528 machine=ibmrs6000 opsys=aix4-2
2529 ;;
ba4481b5 2530
c76e04a8
GM
2531 ## Macintosh PowerPC
2532 powerpc*-*-linux-gnu* )
2533 machine=macppc opsys=gnu-linux
2534 ;;
2535
ba4481b5 2536 ## Silicon Graphics machines
ba4481b5 2537 ## Iris 4D
ba4481b5
DL
2538 mips-sgi-irix6.5 )
2539 machine=iris4d opsys=irix6-5
946173ad
DL
2540 # Without defining _LANGUAGE_C, things get masked out in the headers
2541 # so that, for instance, grepping for `free' in stdlib.h fails and
2542 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2543 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2544 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2545 ;;
ba4481b5 2546
ba4481b5
DL
2547 ## Suns
2548 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2549 machine=sparc opsys=gnu-linux
2550 ;;
2551
176fe5fc 2552 *-sun-solaris* \
ba4481b5
DL
2553 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2554 | rs6000-*-solaris2*)
2555 case "${canonical}" in
ba4481b5 2556 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2557 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2558 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2559 sparc* ) machine=sparc ;;
2560 * ) unported=yes ;;
2561 esac
2562 case "${canonical}" in
ba4481b5
DL
2563 *-sunos5.3* | *-solaris2.3* )
2564 opsys=sol2-3
2565 NON_GNU_CPP=/usr/ccs/lib/cpp
2566 ;;
2567 *-sunos5.4* | *-solaris2.4* )
2568 opsys=sol2-4
2569 NON_GNU_CPP=/usr/ccs/lib/cpp
2570 RANLIB="ar -ts"
2571 ;;
2572 *-sunos5.5* | *-solaris2.5* )
2573 opsys=sol2-5
2574 NON_GNU_CPP=/usr/ccs/lib/cpp
2575 RANLIB="ar -ts"
2576 ;;
8e967cf7
MR
2577 *-sunos5.6* | *-solaris2.6* )
2578 opsys=sol2-6
2579 NON_GNU_CPP=/usr/ccs/lib/cpp
2580 RANLIB="ar -ts"
2581 ;;
ba4481b5 2582 *-sunos5* | *-solaris* )
9e71690e 2583 opsys=sol2-6
089a966d
GM
2584 emacs_check_sunpro_c=yes
2585 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2586 ;;
ba4481b5
DL
2587 esac
2588 ## Watch out for a compiler that we know will not work.
2589 case "${canonical}" in
2590 *-solaris* | *-sunos5* )
2591 if [ "x$CC" = x/usr/ucb/cc ]; then
2592 ## /usr/ucb/cc doesn't work;
2593 ## we should find some other compiler that does work.
2594 unset CC
2595 fi
2596 ;;
2597 *) ;;
2598 esac
2599 ;;
ba4481b5 2600
ba4481b5
DL
2601 ## Vaxen.
2602 vax-dec-* )
2603 machine=vax
2604 case "${canonical}" in
ba4481b5
DL
2605 *-vms* ) opsys=vms ;;
2606 * ) unported=yes
2607 esac
2608 ;;
2609
f4988be7
GM
2610 ## IA-64
2611 ia64*-*-linux* )
2612 machine=ia64 opsys=gnu-linux
2613 ;;
2614
ba4481b5
DL
2615 ## Intel 386 machines where we don't care about the manufacturer
2616 i[3456]86-*-* )
2617 machine=intel386
2618 case "${canonical}" in
c60ee5e7 2619 *-cygwin ) opsys=cygwin ;;
eae54018 2620 *-darwin* ) opsys=darwin
23fd4483
ST
2621 CPP="${CC-cc} -E -no-cpp-precomp"
2622 ;;
ba4481b5 2623 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2624 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2625 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2626 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2627 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2628 esac
2629 ;;
2630
2631 ## m68k Linux-based GNU system
2632 m68k-*-linux-gnu* )
2633 machine=m68k opsys=gnu-linux
2634 ;;
2635
2636 ## Mips Linux-based GNU system
cd958eb3 2637 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2638 machine=mips opsys=gnu-linux
2639 ;;
2640
598a2813
AS
2641 ## AMD x86-64 Linux-based GNU system
2642 x86_64-*-linux-gnu* )
24b01ec4 2643 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2644 ;;
2645
94218e27 2646 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2647 xtensa*-*-linux-gnu* )
94218e27
DN
2648 machine=xtensa opsys=gnu-linux
2649 ;;
2650
ba4481b5
DL
2651 * )
2652 unported=yes
2653 ;;
2654esac
2655
2656### If the code above didn't choose an operating system, just choose
2657### an operating system based on the configuration name. You really
2658### only want to use this when you have no idea what the right
2659### operating system is; if you know what operating systems a machine
2660### runs, it's cleaner to make it explicit in the case statement
2661### above.
2662if test x"${opsys}" = x; then
2663 case "${canonical}" in
2664 *-gnu* ) opsys=gnu ;;
ba4481b5 2665 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2666 *-sysv5uw* ) opsys=unixware ;;
2667 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2668 *-sysv4.1* | *-sysvr4.1* )
2669 NON_GNU_CPP=/usr/lib/cpp
2670 opsys=usg5-4 ;;
2671 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2672 if [ x$NON_GNU_CPP = x ]; then
2673 if [ -f /usr/ccs/lib/cpp ]; then
2674 NON_GNU_CPP=/usr/ccs/lib/cpp
2675 else
2676 NON_GNU_CPP=/lib/cpp
2677 fi
2678 fi
2679 opsys=usg5-4-2 ;;
2680 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2681 * )
2682 unported=yes
2683 ;;
2684 esac
2685fi
2686
c0d27fcc 2687
22044edf 2688
ba4481b5 2689if test $unported = yes; then
c0d27fcc 2690 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2691Check \`etc/MACHINES' for recognized configuration names." >&5
2692echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2693Check \`etc/MACHINES' for recognized configuration names." >&2;}
2694 { (exit 1); exit 1; }; }
ba4481b5
DL
2695fi
2696
2697machfile="m/${machine}.h"
2698opsysfile="s/${opsys}.h"
2699
c0d27fcc 2700
ba4481b5
DL
2701#### Choose a compiler.
2702test -n "$CC" && cc_specified=yes
2703
2704# Save the value of CFLAGS that the user specified.
2705SPECIFIED_CFLAGS="$CFLAGS"
2706
503d2be0
AS
2707ac_ext=c
2708ac_cpp='$CPP $CPPFLAGS'
2709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2711ac_compiler_gnu=$ac_cv_c_compiler_gnu
2712if test -n "$ac_tool_prefix"; then
2713 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2714set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2715{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2716echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2717if test "${ac_cv_prog_CC+set}" = set; then
2718 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2719else
2720 if test -n "$CC"; then
2721 ac_cv_prog_CC="$CC" # Let the user override the test.
2722else
c0d27fcc
MR
2723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724for as_dir in $PATH
2725do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2730 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2731 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734done
503d2be0 2735done
ca81d7a0 2736IFS=$as_save_IFS
503d2be0 2737
ba4481b5
DL
2738fi
2739fi
503d2be0 2740CC=$ac_cv_prog_CC
ba4481b5 2741if test -n "$CC"; then
ca81d7a0
JD
2742 { echo "$as_me:$LINENO: result: $CC" >&5
2743echo "${ECHO_T}$CC" >&6; }
503d2be0 2744else
ca81d7a0
JD
2745 { echo "$as_me:$LINENO: result: no" >&5
2746echo "${ECHO_T}no" >&6; }
503d2be0
AS
2747fi
2748
ca81d7a0 2749
503d2be0
AS
2750fi
2751if test -z "$ac_cv_prog_CC"; then
2752 ac_ct_CC=$CC
2753 # Extract the first word of "gcc", so it can be a program name with args.
2754set dummy gcc; ac_word=$2
ca81d7a0
JD
2755{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2757if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2758 echo $ECHO_N "(cached) $ECHO_C" >&6
2759else
2760 if test -n "$ac_ct_CC"; then
2761 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2762else
c0d27fcc
MR
2763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2764for as_dir in $PATH
2765do
2766 IFS=$as_save_IFS
2767 test -z "$as_dir" && as_dir=.
2768 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2769 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2770 ac_cv_prog_ac_ct_CC="gcc"
2771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2772 break 2
2773 fi
2774done
503d2be0 2775done
ca81d7a0 2776IFS=$as_save_IFS
503d2be0
AS
2777
2778fi
2779fi
2780ac_ct_CC=$ac_cv_prog_ac_ct_CC
2781if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2782 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2783echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2784else
ca81d7a0
JD
2785 { echo "$as_me:$LINENO: result: no" >&5
2786echo "${ECHO_T}no" >&6; }
503d2be0
AS
2787fi
2788
ca81d7a0
JD
2789 if test "x$ac_ct_CC" = x; then
2790 CC=""
2791 else
2792 case $cross_compiling:$ac_tool_warned in
2793yes:)
2794{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2795whose name does not start with the host triplet. If you think this
2796configuration is useful to you, please write to autoconf@gnu.org." >&5
2797echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2798whose name does not start with the host triplet. If you think this
2799configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2800ac_tool_warned=yes ;;
2801esac
2802 CC=$ac_ct_CC
2803 fi
503d2be0
AS
2804else
2805 CC="$ac_cv_prog_CC"
ba4481b5
DL
2806fi
2807
2808if test -z "$CC"; then
ca81d7a0
JD
2809 if test -n "$ac_tool_prefix"; then
2810 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2811set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2812{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2813echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2814if test "${ac_cv_prog_CC+set}" = set; then
2815 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2816else
2817 if test -n "$CC"; then
2818 ac_cv_prog_CC="$CC" # Let the user override the test.
2819else
c0d27fcc
MR
2820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821for as_dir in $PATH
2822do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2826 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2827 ac_cv_prog_CC="${ac_tool_prefix}cc"
2828 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831done
503d2be0 2832done
ca81d7a0 2833IFS=$as_save_IFS
503d2be0
AS
2834
2835fi
2836fi
2837CC=$ac_cv_prog_CC
2838if test -n "$CC"; then
ca81d7a0
JD
2839 { echo "$as_me:$LINENO: result: $CC" >&5
2840echo "${ECHO_T}$CC" >&6; }
503d2be0 2841else
ca81d7a0
JD
2842 { echo "$as_me:$LINENO: result: no" >&5
2843echo "${ECHO_T}no" >&6; }
503d2be0
AS
2844fi
2845
503d2be0 2846
ca81d7a0 2847 fi
503d2be0
AS
2848fi
2849if test -z "$CC"; then
2850 # Extract the first word of "cc", so it can be a program name with args.
2851set dummy cc; ac_word=$2
ca81d7a0
JD
2852{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2853echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2854if test "${ac_cv_prog_CC+set}" = set; then
2855 echo $ECHO_N "(cached) $ECHO_C" >&6
2856else
2857 if test -n "$CC"; then
2858 ac_cv_prog_CC="$CC" # Let the user override the test.
2859else
2860 ac_prog_rejected=no
c0d27fcc
MR
2861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2862for as_dir in $PATH
2863do
2864 IFS=$as_save_IFS
2865 test -z "$as_dir" && as_dir=.
2866 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2868 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2869 ac_prog_rejected=yes
2870 continue
2871 fi
2872 ac_cv_prog_CC="cc"
2873 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2874 break 2
2875 fi
2876done
503d2be0 2877done
ca81d7a0 2878IFS=$as_save_IFS
503d2be0 2879
ba4481b5
DL
2880if test $ac_prog_rejected = yes; then
2881 # We found a bogon in the path, so make sure we never use it.
2882 set dummy $ac_cv_prog_CC
2883 shift
503d2be0 2884 if test $# != 0; then
ba4481b5
DL
2885 # We chose a different compiler from the bogus one.
2886 # However, it has the same basename, so the bogon will be chosen
2887 # first if we set CC to just the basename; use the full file name.
2888 shift
6bae0ccf 2889 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2890 fi
2891fi
2892fi
2893fi
503d2be0 2894CC=$ac_cv_prog_CC
ba4481b5 2895if test -n "$CC"; then
ca81d7a0
JD
2896 { echo "$as_me:$LINENO: result: $CC" >&5
2897echo "${ECHO_T}$CC" >&6; }
ba4481b5 2898else
ca81d7a0
JD
2899 { echo "$as_me:$LINENO: result: no" >&5
2900echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2901fi
2902
ca81d7a0 2903
503d2be0
AS
2904fi
2905if test -z "$CC"; then
2906 if test -n "$ac_tool_prefix"; then
ca81d7a0 2907 for ac_prog in cl.exe
503d2be0
AS
2908 do
2909 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2910set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2911{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2912echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2913if test "${ac_cv_prog_CC+set}" = set; then
2914 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2915else
2916 if test -n "$CC"; then
2917 ac_cv_prog_CC="$CC" # Let the user override the test.
2918else
c0d27fcc
MR
2919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2920for as_dir in $PATH
2921do
2922 IFS=$as_save_IFS
2923 test -z "$as_dir" && as_dir=.
2924 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2925 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2926 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2927 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2928 break 2
2929 fi
2930done
503d2be0 2931done
ca81d7a0 2932IFS=$as_save_IFS
503d2be0 2933
c4bb2108
DL
2934fi
2935fi
503d2be0 2936CC=$ac_cv_prog_CC
c4bb2108 2937if test -n "$CC"; then
ca81d7a0
JD
2938 { echo "$as_me:$LINENO: result: $CC" >&5
2939echo "${ECHO_T}$CC" >&6; }
c4bb2108 2940else
ca81d7a0
JD
2941 { echo "$as_me:$LINENO: result: no" >&5
2942echo "${ECHO_T}no" >&6; }
503d2be0
AS
2943fi
2944
ca81d7a0 2945
503d2be0
AS
2946 test -n "$CC" && break
2947 done
2948fi
2949if test -z "$CC"; then
2950 ac_ct_CC=$CC
ca81d7a0 2951 for ac_prog in cl.exe
503d2be0
AS
2952do
2953 # Extract the first word of "$ac_prog", so it can be a program name with args.
2954set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2955{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2956echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2957if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2958 echo $ECHO_N "(cached) $ECHO_C" >&6
2959else
2960 if test -n "$ac_ct_CC"; then
2961 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2962else
c0d27fcc
MR
2963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2964for as_dir in $PATH
2965do
2966 IFS=$as_save_IFS
2967 test -z "$as_dir" && as_dir=.
2968 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2969 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2970 ac_cv_prog_ac_ct_CC="$ac_prog"
2971 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2972 break 2
2973 fi
2974done
503d2be0 2975done
ca81d7a0 2976IFS=$as_save_IFS
503d2be0 2977
c4bb2108 2978fi
503d2be0
AS
2979fi
2980ac_ct_CC=$ac_cv_prog_ac_ct_CC
2981if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2982 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2983echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2984else
ca81d7a0
JD
2985 { echo "$as_me:$LINENO: result: no" >&5
2986echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2987fi
2988
ca81d7a0 2989
503d2be0
AS
2990 test -n "$ac_ct_CC" && break
2991done
ba4481b5 2992
ca81d7a0
JD
2993 if test "x$ac_ct_CC" = x; then
2994 CC=""
2995 else
2996 case $cross_compiling:$ac_tool_warned in
2997yes:)
2998{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2999whose name does not start with the host triplet. If you think this
3000configuration is useful to you, please write to autoconf@gnu.org." >&5
3001echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3002whose name does not start with the host triplet. If you think this
3003configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3004ac_tool_warned=yes ;;
3005esac
3006 CC=$ac_ct_CC
3007 fi
503d2be0
AS
3008fi
3009
3010fi
ba4481b5 3011
c0d27fcc 3012
19650fd6
AS
3013test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3014See \`config.log' for more details." >&5
3015echo "$as_me: error: no acceptable C compiler found in \$PATH
3016See \`config.log' for more details." >&2;}
503d2be0 3017 { (exit 1); exit 1; }; }
c4bb2108 3018
503d2be0 3019# Provide some information about the compiler.
ca81d7a0 3020echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3021ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3022{ (ac_try="$ac_compiler --version >&5"
3023case "(($ac_try" in
3024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025 *) ac_try_echo=$ac_try;;
3026esac
3027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3028 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3029 ac_status=$?
c0d27fcc 3030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3031 (exit $ac_status); }
ca81d7a0
JD
3032{ (ac_try="$ac_compiler -v >&5"
3033case "(($ac_try" in
3034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3035 *) ac_try_echo=$ac_try;;
3036esac
3037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3038 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3039 ac_status=$?
c0d27fcc 3040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3041 (exit $ac_status); }
ca81d7a0
JD
3042{ (ac_try="$ac_compiler -V >&5"
3043case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046esac
3047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3048 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3049 ac_status=$?
c0d27fcc 3050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3051 (exit $ac_status); }
3052
3053cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3054/* confdefs.h. */
3055_ACEOF
3056cat confdefs.h >>conftest.$ac_ext
3057cat >>conftest.$ac_ext <<_ACEOF
3058/* end confdefs.h. */
c4bb2108 3059
503d2be0
AS
3060int
3061main ()
3062{
3063
3064 ;
3065 return 0;
3066}
3067_ACEOF
3068ac_clean_files_save=$ac_clean_files
19650fd6 3069ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3070# Try to create an executable without -o first, disregard a.out.
3071# It will help us diagnose broken compilers, and finding out an intuition
3072# of exeext.
ca81d7a0
JD
3073{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3074echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3075ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3076#
3077# List of possible output files, starting from the most likely.
3078# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3079# only as a last resort. b.out is created by i960 compilers.
3080ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3081#
3082# The IRIX 6 linker writes into existing files which may not be
3083# executable, retaining their permissions. Remove them first so a
3084# subsequent execution test works.
3085ac_rmfiles=
3086for ac_file in $ac_files
3087do
3088 case $ac_file in
3089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3090 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3091 esac
3092done
3093rm -f $ac_rmfiles
3094
3095if { (ac_try="$ac_link_default"
3096case "(($ac_try" in
3097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3098 *) ac_try_echo=$ac_try;;
3099esac
3100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3101 (eval "$ac_link_default") 2>&5
503d2be0 3102 ac_status=$?
c0d27fcc 3103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3104 (exit $ac_status); }; then
ca81d7a0
JD
3105 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3106# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3107# in a Makefile. We should not override ac_cv_exeext if it was cached,
3108# so that the user can short-circuit this test for compilers unknown to
3109# Autoconf.
f053c89f 3110for ac_file in $ac_files ''
19650fd6 3111do
6bae0ccf 3112 test -f "$ac_file" || continue
503d2be0 3113 case $ac_file in
ca81d7a0 3114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3115 ;;
19650fd6 3116 [ab].out )
edfaf76d
LK
3117 # We found the default executable, but exeext='' is most
3118 # certainly right.
3119 break;;
19650fd6 3120 *.* )
ca81d7a0
JD
3121 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3122 then :; else
3123 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3124 fi
3125 # We set ac_cv_exeext here because the later test for it is not
3126 # safe: cross compilers may not add the suffix if given an `-o'
3127 # argument, so we may need to know it at that point already.
3128 # Even if this section looks crufty: it has the advantage of
3129 # actually working.
edfaf76d 3130 break;;
19650fd6 3131 * )
edfaf76d 3132 break;;
503d2be0
AS
3133 esac
3134done
ca81d7a0
JD
3135test "$ac_cv_exeext" = no && ac_cv_exeext=
3136
503d2be0 3137else
f053c89f
CY
3138 ac_file=''
3139fi
3140
3141{ echo "$as_me:$LINENO: result: $ac_file" >&5
3142echo "${ECHO_T}$ac_file" >&6; }
3143if test -z "$ac_file"; then
503d2be0 3144 echo "$as_me: failed program was:" >&5
19650fd6
AS
3145sed 's/^/| /' conftest.$ac_ext >&5
3146
6bae0ccf 3147{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3148See \`config.log' for more details." >&5
6bae0ccf 3149echo "$as_me: error: C compiler cannot create executables
19650fd6 3150See \`config.log' for more details." >&2;}
503d2be0
AS
3151 { (exit 77); exit 77; }; }
3152fi
3153
3154ac_exeext=$ac_cv_exeext
503d2be0 3155
ca81d7a0 3156# Check that the compiler produces executables we can run. If not, either
503d2be0 3157# the compiler is broken, or we cross compile.
ca81d7a0
JD
3158{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3159echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3160# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3161# If not cross compiling, check that we can run a simple program.
3162if test "$cross_compiling" != yes; then
3163 if { ac_try='./$ac_file'
ca81d7a0
JD
3164 { (case "(($ac_try" in
3165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3166 *) ac_try_echo=$ac_try;;
3167esac
3168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3169 (eval "$ac_try") 2>&5
503d2be0 3170 ac_status=$?
c0d27fcc 3171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3172 (exit $ac_status); }; }; then
3173 cross_compiling=no
ba4481b5 3174 else
503d2be0
AS
3175 if test "$cross_compiling" = maybe; then
3176 cross_compiling=yes
3177 else
c0d27fcc 3178 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3179If you meant to cross compile, use \`--host'.
3180See \`config.log' for more details." >&5
503d2be0 3181echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3182If you meant to cross compile, use \`--host'.
3183See \`config.log' for more details." >&2;}
503d2be0
AS
3184 { (exit 1); exit 1; }; }
3185 fi
ba4481b5 3186 fi
503d2be0 3187fi
ca81d7a0
JD
3188{ echo "$as_me:$LINENO: result: yes" >&5
3189echo "${ECHO_T}yes" >&6; }
503d2be0 3190
19650fd6 3191rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3192ac_clean_files=$ac_clean_files_save
ca81d7a0 3193# Check that the compiler produces executables we can run. If not, either
503d2be0 3194# the compiler is broken, or we cross compile.
ca81d7a0
JD
3195{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3196echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3197{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3198echo "${ECHO_T}$cross_compiling" >&6; }
3199
3200{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3201echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3202if { (ac_try="$ac_link"
3203case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206esac
3207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3208 (eval "$ac_link") 2>&5
503d2be0 3209 ac_status=$?
c0d27fcc 3210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3211 (exit $ac_status); }; then
3212 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3213# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3214# work properly (i.e., refer to `conftest.exe'), while it won't with
3215# `rm'.
6bae0ccf
DL
3216for ac_file in conftest.exe conftest conftest.*; do
3217 test -f "$ac_file" || continue
503d2be0 3218 case $ac_file in
ca81d7a0 3219 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3220 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3221 break;;
503d2be0
AS
3222 * ) break;;
3223 esac
3224done
ba4481b5 3225else
19650fd6
AS
3226 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3227See \`config.log' for more details." >&5
3228echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3229See \`config.log' for more details." >&2;}
503d2be0 3230 { (exit 1); exit 1; }; }
ba4481b5 3231fi
ba4481b5 3232
503d2be0 3233rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3234{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3235echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3236
503d2be0
AS
3237rm -f conftest.$ac_ext
3238EXEEXT=$ac_cv_exeext
3239ac_exeext=$EXEEXT
ca81d7a0
JD
3240{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3241echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3242if test "${ac_cv_objext+set}" = set; then
3243 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3244else
503d2be0 3245 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3246/* confdefs.h. */
3247_ACEOF
3248cat confdefs.h >>conftest.$ac_ext
3249cat >>conftest.$ac_ext <<_ACEOF
3250/* end confdefs.h. */
ba4481b5 3251
503d2be0
AS
3252int
3253main ()
3254{
ba4481b5 3255
503d2be0
AS
3256 ;
3257 return 0;
3258}
3259_ACEOF
3260rm -f conftest.o conftest.obj
ca81d7a0
JD
3261if { (ac_try="$ac_compile"
3262case "(($ac_try" in
3263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3264 *) ac_try_echo=$ac_try;;
3265esac
3266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3267 (eval "$ac_compile") 2>&5
503d2be0 3268 ac_status=$?
c0d27fcc 3269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3270 (exit $ac_status); }; then
ca81d7a0
JD
3271 for ac_file in conftest.o conftest.obj conftest.*; do
3272 test -f "$ac_file" || continue;
503d2be0 3273 case $ac_file in
ca81d7a0 3274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3275 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3276 break;;
3277 esac
3278done
c4bb2108 3279else
503d2be0 3280 echo "$as_me: failed program was:" >&5
19650fd6
AS
3281sed 's/^/| /' conftest.$ac_ext >&5
3282
3283{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3284See \`config.log' for more details." >&5
3285echo "$as_me: error: cannot compute suffix of object files: cannot compile
3286See \`config.log' for more details." >&2;}
503d2be0 3287 { (exit 1); exit 1; }; }
c4bb2108
DL
3288fi
3289
503d2be0
AS
3290rm -f conftest.$ac_cv_objext conftest.$ac_ext
3291fi
ca81d7a0
JD
3292{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3293echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3294OBJEXT=$ac_cv_objext
3295ac_objext=$OBJEXT
ca81d7a0
JD
3296{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3297echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3298if test "${ac_cv_c_compiler_gnu+set}" = set; then
3299 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3300else
503d2be0 3301 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3302/* confdefs.h. */
3303_ACEOF
3304cat confdefs.h >>conftest.$ac_ext
3305cat >>conftest.$ac_ext <<_ACEOF
3306/* end confdefs.h. */
503d2be0
AS
3307
3308int
3309main ()
3310{
3311#ifndef __GNUC__
3312 choke me
3313#endif
3314
3315 ;
3316 return 0;
3317}
3318_ACEOF
3319rm -f conftest.$ac_objext
ca81d7a0
JD
3320if { (ac_try="$ac_compile"
3321case "(($ac_try" in
3322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3323 *) ac_try_echo=$ac_try;;
3324esac
3325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3326 (eval "$ac_compile") 2>conftest.er1
503d2be0 3327 ac_status=$?
edfaf76d
LK
3328 grep -v '^ *+' conftest.er1 >conftest.err
3329 rm -f conftest.er1
3330 cat conftest.err >&5
c0d27fcc 3331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3332 (exit $ac_status); } && {
3333 test -z "$ac_c_werror_flag" ||
3334 test ! -s conftest.err
3335 } && test -s conftest.$ac_objext; then
503d2be0
AS
3336 ac_compiler_gnu=yes
3337else
3338 echo "$as_me: failed program was:" >&5
19650fd6
AS
3339sed 's/^/| /' conftest.$ac_ext >&5
3340
ca81d7a0 3341 ac_compiler_gnu=no
503d2be0 3342fi
ca81d7a0
JD
3343
3344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3345ac_cv_c_compiler_gnu=$ac_compiler_gnu
3346
3347fi
ca81d7a0
JD
3348{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3349echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3350GCC=`test $ac_compiler_gnu = yes && echo yes`
3351ac_test_CFLAGS=${CFLAGS+set}
3352ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3353{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3354echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3355if test "${ac_cv_prog_cc_g+set}" = set; then
3356 echo $ECHO_N "(cached) $ECHO_C" >&6
3357else
ca81d7a0
JD
3358 ac_save_c_werror_flag=$ac_c_werror_flag
3359 ac_c_werror_flag=yes
3360 ac_cv_prog_cc_g=no
3361 CFLAGS="-g"
3362 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3363/* confdefs.h. */
3364_ACEOF
3365cat confdefs.h >>conftest.$ac_ext
3366cat >>conftest.$ac_ext <<_ACEOF
3367/* end confdefs.h. */
503d2be0
AS
3368
3369int
3370main ()
3371{
3372
3373 ;
3374 return 0;
3375}
3376_ACEOF
3377rm -f conftest.$ac_objext
ca81d7a0
JD
3378if { (ac_try="$ac_compile"
3379case "(($ac_try" in
3380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3381 *) ac_try_echo=$ac_try;;
3382esac
3383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3384 (eval "$ac_compile") 2>conftest.er1
503d2be0 3385 ac_status=$?
edfaf76d
LK
3386 grep -v '^ *+' conftest.er1 >conftest.err
3387 rm -f conftest.er1
3388 cat conftest.err >&5
c0d27fcc 3389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3390 (exit $ac_status); } && {
3391 test -z "$ac_c_werror_flag" ||
3392 test ! -s conftest.err
3393 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3394 ac_cv_prog_cc_g=yes
3395else
503d2be0 3396 echo "$as_me: failed program was:" >&5
19650fd6
AS
3397sed 's/^/| /' conftest.$ac_ext >&5
3398
ca81d7a0
JD
3399 CFLAGS=""
3400 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3401/* confdefs.h. */
3402_ACEOF
3403cat confdefs.h >>conftest.$ac_ext
3404cat >>conftest.$ac_ext <<_ACEOF
3405/* end confdefs.h. */
edfaf76d 3406
6bae0ccf
DL
3407int
3408main ()
3409{
ca81d7a0 3410
6bae0ccf
DL
3411 ;
3412 return 0;
3413}
3414_ACEOF
ca81d7a0
JD
3415rm -f conftest.$ac_objext
3416if { (ac_try="$ac_compile"
3417case "(($ac_try" in
3418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419 *) ac_try_echo=$ac_try;;
3420esac
3421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3422 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3423 ac_status=$?
edfaf76d
LK
3424 grep -v '^ *+' conftest.er1 >conftest.err
3425 rm -f conftest.er1
3426 cat conftest.err >&5
edfaf76d 3427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3428 (exit $ac_status); } && {
3429 test -z "$ac_c_werror_flag" ||
3430 test ! -s conftest.err
3431 } && test -s conftest.$ac_objext; then
ca81d7a0 3432 :
6bae0ccf
DL
3433else
3434 echo "$as_me: failed program was:" >&5
19650fd6
AS
3435sed 's/^/| /' conftest.$ac_ext >&5
3436
ca81d7a0
JD
3437 ac_c_werror_flag=$ac_save_c_werror_flag
3438 CFLAGS="-g"
3439 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3440/* confdefs.h. */
19650fd6
AS
3441_ACEOF
3442cat confdefs.h >>conftest.$ac_ext
3443cat >>conftest.$ac_ext <<_ACEOF
3444/* end confdefs.h. */
ca81d7a0 3445
503d2be0
AS
3446int
3447main ()
3448{
ca81d7a0 3449
503d2be0
AS
3450 ;
3451 return 0;
3452}
3453_ACEOF
3454rm -f conftest.$ac_objext
ca81d7a0
JD
3455if { (ac_try="$ac_compile"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
3460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3461 (eval "$ac_compile") 2>conftest.er1
503d2be0 3462 ac_status=$?
edfaf76d
LK
3463 grep -v '^ *+' conftest.er1 >conftest.err
3464 rm -f conftest.er1
3465 cat conftest.err >&5
c0d27fcc 3466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3467 (exit $ac_status); } && {
3468 test -z "$ac_c_werror_flag" ||
3469 test ! -s conftest.err
3470 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3471 ac_cv_prog_cc_g=yes
3472else
503d2be0 3473 echo "$as_me: failed program was:" >&5
19650fd6
AS
3474sed 's/^/| /' conftest.$ac_ext >&5
3475
ca81d7a0 3476
ba4481b5 3477fi
ca81d7a0
JD
3478
3479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3480fi
3481
3482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3483fi
3484
3485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3486 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3487fi
ca81d7a0
JD
3488{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3489echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3490if test "$ac_test_CFLAGS" = set; then
503d2be0 3491 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3492elif test $ac_cv_prog_cc_g = yes; then
3493 if test "$GCC" = yes; then
ba4481b5
DL
3494 CFLAGS="-g -O2"
3495 else
c4bb2108 3496 CFLAGS="-g"
ba4481b5 3497 fi
22afa6e8 3498else
c4bb2108
DL
3499 if test "$GCC" = yes; then
3500 CFLAGS="-O2"
3501 else
3502 CFLAGS=
3503 fi
ba4481b5 3504fi
ca81d7a0
JD
3505{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3506echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3507if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3508 echo $ECHO_N "(cached) $ECHO_C" >&6
3509else
ca81d7a0 3510 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3511ac_save_CC=$CC
3512cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3513/* confdefs.h. */
3514_ACEOF
3515cat confdefs.h >>conftest.$ac_ext
3516cat >>conftest.$ac_ext <<_ACEOF
3517/* end confdefs.h. */
6bae0ccf
DL
3518#include <stdarg.h>
3519#include <stdio.h>
3520#include <sys/types.h>
3521#include <sys/stat.h>
3522/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3523struct buf { int x; };
3524FILE * (*rcsopen) (struct buf *, struct stat *, int);
3525static char *e (p, i)
3526 char **p;
3527 int i;
3528{
3529 return p[i];
3530}
3531static char *f (char * (*g) (char **, int), char **p, ...)
3532{
3533 char *s;
3534 va_list v;
3535 va_start (v,p);
3536 s = g (p, va_arg (v,int));
3537 va_end (v);
3538 return s;
3539}
edfaf76d
LK
3540
3541/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3542 function prototypes and stuff, but not '\xHH' hex character constants.
3543 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3544 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3545 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3546 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3547 that's true only with -std. */
edfaf76d
LK
3548int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3549
ca81d7a0
JD
3550/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3551 inside strings and character constants. */
3552#define FOO(x) 'x'
3553int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3554
6bae0ccf
DL
3555int test (int i, double x);
3556struct s1 {int (*f) (int a);};
3557struct s2 {int (*f) (double a);};
3558int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3559int argc;
3560char **argv;
3561int
3562main ()
3563{
3564return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3565 ;
3566 return 0;
3567}
3568_ACEOF
ca81d7a0
JD
3569for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3570 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3571do
3572 CC="$ac_save_CC $ac_arg"
3573 rm -f conftest.$ac_objext
ca81d7a0
JD
3574if { (ac_try="$ac_compile"
3575case "(($ac_try" in
3576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3577 *) ac_try_echo=$ac_try;;
3578esac
3579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3580 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3581 ac_status=$?
edfaf76d
LK
3582 grep -v '^ *+' conftest.er1 >conftest.err
3583 rm -f conftest.er1
3584 cat conftest.err >&5
6bae0ccf 3585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3586 (exit $ac_status); } && {
3587 test -z "$ac_c_werror_flag" ||
3588 test ! -s conftest.err
3589 } && test -s conftest.$ac_objext; then
ca81d7a0 3590 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3591else
3592 echo "$as_me: failed program was:" >&5
19650fd6
AS
3593sed 's/^/| /' conftest.$ac_ext >&5
3594
ca81d7a0 3595
6bae0ccf 3596fi
ca81d7a0
JD
3597
3598rm -f core conftest.err conftest.$ac_objext
3599 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3600done
ca81d7a0 3601rm -f conftest.$ac_ext
6bae0ccf
DL
3602CC=$ac_save_CC
3603
3604fi
ca81d7a0
JD
3605# AC_CACHE_VAL
3606case "x$ac_cv_prog_cc_c89" in
3607 x)
3608 { echo "$as_me:$LINENO: result: none needed" >&5
3609echo "${ECHO_T}none needed" >&6; } ;;
3610 xno)
3611 { echo "$as_me:$LINENO: result: unsupported" >&5
3612echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3613 *)
ca81d7a0
JD
3614 CC="$CC $ac_cv_prog_cc_c89"
3615 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3616echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3617esac
3618
19650fd6 3619
503d2be0
AS
3620ac_ext=c
3621ac_cpp='$CPP $CPPFLAGS'
3622ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3623ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3624ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3625
c0d27fcc 3626
ba4481b5
DL
3627# On Suns, sometimes $CPP names a directory.
3628if test -n "$CPP" && test -d "$CPP"; then
3629 CPP=
3630fi
3631
089a966d
GM
3632## If not using gcc, and on Solaris, and no CPP specified, see if
3633## using a Sun compiler, which needs -Xs to prevent whitespace.
3634if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3635 test x"$CPP" = x; then
3636 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3637echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3638
3639if test "${emacs_cv_sunpro_c+set}" = set; then
3640 echo $ECHO_N "(cached) $ECHO_C" >&6
3641else
3642 cat >conftest.$ac_ext <<_ACEOF
3643/* confdefs.h. */
3644_ACEOF
3645cat confdefs.h >>conftest.$ac_ext
3646cat >>conftest.$ac_ext <<_ACEOF
3647/* end confdefs.h. */
3648
3649int
3650main ()
3651{
3652#ifndef __SUNPRO_C
3653fail;
3654#endif
3655
3656 ;
3657 return 0;
3658}
3659_ACEOF
3660rm -f conftest.$ac_objext conftest$ac_exeext
3661if { (ac_try="$ac_link"
3662case "(($ac_try" in
3663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3664 *) ac_try_echo=$ac_try;;
3665esac
3666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3667 (eval "$ac_link") 2>conftest.er1
3668 ac_status=$?
3669 grep -v '^ *+' conftest.er1 >conftest.err
3670 rm -f conftest.er1
3671 cat conftest.err >&5
3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673 (exit $ac_status); } && {
3674 test -z "$ac_c_werror_flag" ||
3675 test ! -s conftest.err
3676 } && test -s conftest$ac_exeext &&
3677 $as_test_x conftest$ac_exeext; then
3678 emacs_cv_sunpro_c=yes
3679else
3680 echo "$as_me: failed program was:" >&5
3681sed 's/^/| /' conftest.$ac_ext >&5
3682
3683 emacs_cv_sunpro_c=no
3684fi
3685
3686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3687 conftest$ac_exeext conftest.$ac_ext
3688fi
3689
3690 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3691echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3692
3693 if test x"$emacs_cv_sunpro_c" = xyes; then
3694 NON_GNU_CPP="$CC -E -Xs"
3695 fi
3696fi
3697
ba4481b5
DL
3698#### Some systems specify a CPP to use unless we are using GCC.
3699#### Now that we know whether we are using GCC, we can decide whether
3700#### to use that one.
3701if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3702then
3703 CPP="$NON_GNU_CPP"
3704fi
3705
3706#### Some systems specify a CC to use unless we are using GCC.
3707#### Now that we know whether we are using GCC, we can decide whether
3708#### to use that one.
3709if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3710 test x$cc_specified != xyes
3711then
3712 CC="$NON_GNU_CC"
3713fi
3714
3715if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3716then
3717 CC="$CC $GCC_TEST_OPTIONS"
3718fi
3719
3720if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3721then
3722 CC="$CC $NON_GCC_TEST_OPTIONS"
3723fi
3724
a51f4969
SM
3725
3726cat >>confdefs.h <<\_ACEOF
3727#define _GNU_SOURCE 1
3728_ACEOF
3729
3730
e143ad11
AS
3731ac_ext=c
3732ac_cpp='$CPP $CPPFLAGS'
3733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3735ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3736{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3737echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3738# On Suns, sometimes $CPP names a directory.
3739if test -n "$CPP" && test -d "$CPP"; then
3740 CPP=
3741fi
3742if test -z "$CPP"; then
3743 if test "${ac_cv_prog_CPP+set}" = set; then
3744 echo $ECHO_N "(cached) $ECHO_C" >&6
3745else
3746 # Double quotes because CPP needs to be expanded
3747 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3748 do
3749 ac_preproc_ok=false
3750for ac_c_preproc_warn_flag in '' yes
3751do
3752 # Use a header file that comes with gcc, so configuring glibc
3753 # with a fresh cross-compiler works.
3754 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3755 # <limits.h> exists even on freestanding compilers.
3756 # On the NeXT, cc -E runs the code through the compiler's parser,
3757 # not just through cpp. "Syntax error" is here to catch this case.
3758 cat >conftest.$ac_ext <<_ACEOF
3759/* confdefs.h. */
3760_ACEOF
3761cat confdefs.h >>conftest.$ac_ext
3762cat >>conftest.$ac_ext <<_ACEOF
3763/* end confdefs.h. */
3764#ifdef __STDC__
3765# include <limits.h>
3766#else
3767# include <assert.h>
3768#endif
3769 Syntax error
3770_ACEOF
ca81d7a0
JD
3771if { (ac_try="$ac_cpp conftest.$ac_ext"
3772case "(($ac_try" in
3773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3774 *) ac_try_echo=$ac_try;;
3775esac
3776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3777 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3778 ac_status=$?
3779 grep -v '^ *+' conftest.er1 >conftest.err
3780 rm -f conftest.er1
3781 cat conftest.err >&5
3782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3783 (exit $ac_status); } >/dev/null && {
3784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3785 test ! -s conftest.err
3786 }; then
e143ad11
AS
3787 :
3788else
3789 echo "$as_me: failed program was:" >&5
3790sed 's/^/| /' conftest.$ac_ext >&5
3791
3792 # Broken: fails on valid input.
3793continue
3794fi
ca81d7a0 3795
e143ad11
AS
3796rm -f conftest.err conftest.$ac_ext
3797
ca81d7a0 3798 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3799 # can be detected and how.
3800 cat >conftest.$ac_ext <<_ACEOF
3801/* confdefs.h. */
3802_ACEOF
3803cat confdefs.h >>conftest.$ac_ext
3804cat >>conftest.$ac_ext <<_ACEOF
3805/* end confdefs.h. */
3806#include <ac_nonexistent.h>
3807_ACEOF
ca81d7a0
JD
3808if { (ac_try="$ac_cpp conftest.$ac_ext"
3809case "(($ac_try" in
3810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3811 *) ac_try_echo=$ac_try;;
3812esac
3813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3815 ac_status=$?
3816 grep -v '^ *+' conftest.er1 >conftest.err
3817 rm -f conftest.er1
3818 cat conftest.err >&5
3819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3820 (exit $ac_status); } >/dev/null && {
3821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3822 test ! -s conftest.err
3823 }; then
e143ad11
AS
3824 # Broken: success on invalid input.
3825continue
3826else
3827 echo "$as_me: failed program was:" >&5
3828sed 's/^/| /' conftest.$ac_ext >&5
3829
3830 # Passes both tests.
3831ac_preproc_ok=:
3832break
3833fi
ca81d7a0 3834
e143ad11
AS
3835rm -f conftest.err conftest.$ac_ext
3836
3837done
3838# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3839rm -f conftest.err conftest.$ac_ext
3840if $ac_preproc_ok; then
3841 break
3842fi
3843
3844 done
3845 ac_cv_prog_CPP=$CPP
3846
3847fi
3848 CPP=$ac_cv_prog_CPP
3849else
3850 ac_cv_prog_CPP=$CPP
3851fi
ca81d7a0
JD
3852{ echo "$as_me:$LINENO: result: $CPP" >&5
3853echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3854ac_preproc_ok=false
3855for ac_c_preproc_warn_flag in '' yes
3856do
3857 # Use a header file that comes with gcc, so configuring glibc
3858 # with a fresh cross-compiler works.
3859 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3860 # <limits.h> exists even on freestanding compilers.
3861 # On the NeXT, cc -E runs the code through the compiler's parser,
3862 # not just through cpp. "Syntax error" is here to catch this case.
3863 cat >conftest.$ac_ext <<_ACEOF
3864/* confdefs.h. */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h. */
3869#ifdef __STDC__
3870# include <limits.h>
3871#else
3872# include <assert.h>
3873#endif
3874 Syntax error
3875_ACEOF
ca81d7a0
JD
3876if { (ac_try="$ac_cpp conftest.$ac_ext"
3877case "(($ac_try" in
3878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3879 *) ac_try_echo=$ac_try;;
3880esac
3881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3882 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3883 ac_status=$?
3884 grep -v '^ *+' conftest.er1 >conftest.err
3885 rm -f conftest.er1
3886 cat conftest.err >&5
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3888 (exit $ac_status); } >/dev/null && {
3889 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3890 test ! -s conftest.err
3891 }; then
e143ad11
AS
3892 :
3893else
3894 echo "$as_me: failed program was:" >&5
3895sed 's/^/| /' conftest.$ac_ext >&5
3896
3897 # Broken: fails on valid input.
3898continue
3899fi
ca81d7a0 3900
e143ad11
AS
3901rm -f conftest.err conftest.$ac_ext
3902
ca81d7a0 3903 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3904 # can be detected and how.
3905 cat >conftest.$ac_ext <<_ACEOF
3906/* confdefs.h. */
3907_ACEOF
3908cat confdefs.h >>conftest.$ac_ext
3909cat >>conftest.$ac_ext <<_ACEOF
3910/* end confdefs.h. */
3911#include <ac_nonexistent.h>
3912_ACEOF
ca81d7a0
JD
3913if { (ac_try="$ac_cpp conftest.$ac_ext"
3914case "(($ac_try" in
3915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3916 *) ac_try_echo=$ac_try;;
3917esac
3918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3919 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3920 ac_status=$?
3921 grep -v '^ *+' conftest.er1 >conftest.err
3922 rm -f conftest.er1
3923 cat conftest.err >&5
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3925 (exit $ac_status); } >/dev/null && {
3926 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3927 test ! -s conftest.err
3928 }; then
e143ad11
AS
3929 # Broken: success on invalid input.
3930continue
3931else
3932 echo "$as_me: failed program was:" >&5
3933sed 's/^/| /' conftest.$ac_ext >&5
3934
3935 # Passes both tests.
3936ac_preproc_ok=:
3937break
3938fi
ca81d7a0 3939
e143ad11
AS
3940rm -f conftest.err conftest.$ac_ext
3941
3942done
3943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3944rm -f conftest.err conftest.$ac_ext
3945if $ac_preproc_ok; then
3946 :
3947else
3948 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3949See \`config.log' for more details." >&5
3950echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3951See \`config.log' for more details." >&2;}
3952 { (exit 1); exit 1; }; }
3953fi
3954
3955ac_ext=c
3956ac_cpp='$CPP $CPPFLAGS'
3957ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3958ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3959ac_compiler_gnu=$ac_cv_c_compiler_gnu
3960
3961
ca81d7a0
JD
3962{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3963echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3964if test "${ac_cv_path_GREP+set}" = set; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
3966else
3967 # Extract the first word of "grep ggrep" to use in msg output
3968if test -z "$GREP"; then
3969set dummy grep ggrep; ac_prog_name=$2
3970if test "${ac_cv_path_GREP+set}" = set; then
3971 echo $ECHO_N "(cached) $ECHO_C" >&6
3972else
3973 ac_path_GREP_found=false
3974# Loop through the user's path and test for each of PROGNAME-LIST
3975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3976for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3977do
3978 IFS=$as_save_IFS
3979 test -z "$as_dir" && as_dir=.
3980 for ac_prog in grep ggrep; do
3981 for ac_exec_ext in '' $ac_executable_extensions; do
3982 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 3983 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
3984 # Check for GNU ac_path_GREP and select it if it is found.
3985 # Check for GNU $ac_path_GREP
3986case `"$ac_path_GREP" --version 2>&1` in
3987*GNU*)
3988 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3989*)
3990 ac_count=0
3991 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3992 while :
3993 do
3994 cat "conftest.in" "conftest.in" >"conftest.tmp"
3995 mv "conftest.tmp" "conftest.in"
3996 cp "conftest.in" "conftest.nl"
3997 echo 'GREP' >> "conftest.nl"
3998 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3999 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4000 ac_count=`expr $ac_count + 1`
4001 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4002 # Best one so far, save it but keep looking for a better one
4003 ac_cv_path_GREP="$ac_path_GREP"
4004 ac_path_GREP_max=$ac_count
4005 fi
4006 # 10*(2^10) chars as input seems more than enough
4007 test $ac_count -gt 10 && break
4008 done
4009 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4010esac
4011
4012
4013 $ac_path_GREP_found && break 3
4014 done
4015done
4016
4017done
4018IFS=$as_save_IFS
4019
4020
4021fi
4022
4023GREP="$ac_cv_path_GREP"
4024if test -z "$GREP"; then
4025 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4026echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4027 { (exit 1); exit 1; }; }
4028fi
4029
4030else
4031 ac_cv_path_GREP=$GREP
4032fi
4033
4034
4035fi
4036{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4037echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4038 GREP="$ac_cv_path_GREP"
4039
4040
4041{ echo "$as_me:$LINENO: checking for egrep" >&5
4042echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4043if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4044 echo $ECHO_N "(cached) $ECHO_C" >&6
4045else
ca81d7a0
JD
4046 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4047 then ac_cv_path_EGREP="$GREP -E"
4048 else
4049 # Extract the first word of "egrep" to use in msg output
4050if test -z "$EGREP"; then
4051set dummy egrep; ac_prog_name=$2
4052if test "${ac_cv_path_EGREP+set}" = set; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
4054else
4055 ac_path_EGREP_found=false
4056# Loop through the user's path and test for each of PROGNAME-LIST
4057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4058for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4059do
4060 IFS=$as_save_IFS
4061 test -z "$as_dir" && as_dir=.
4062 for ac_prog in egrep; do
4063 for ac_exec_ext in '' $ac_executable_extensions; do
4064 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4065 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4066 # Check for GNU ac_path_EGREP and select it if it is found.
4067 # Check for GNU $ac_path_EGREP
4068case `"$ac_path_EGREP" --version 2>&1` in
4069*GNU*)
4070 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4071*)
4072 ac_count=0
4073 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4074 while :
4075 do
4076 cat "conftest.in" "conftest.in" >"conftest.tmp"
4077 mv "conftest.tmp" "conftest.in"
4078 cp "conftest.in" "conftest.nl"
4079 echo 'EGREP' >> "conftest.nl"
4080 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4081 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4082 ac_count=`expr $ac_count + 1`
4083 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4084 # Best one so far, save it but keep looking for a better one
4085 ac_cv_path_EGREP="$ac_path_EGREP"
4086 ac_path_EGREP_max=$ac_count
e143ad11 4087 fi
ca81d7a0
JD
4088 # 10*(2^10) chars as input seems more than enough
4089 test $ac_count -gt 10 && break
4090 done
4091 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4092esac
4093
4094
4095 $ac_path_EGREP_found && break 3
4096 done
4097done
4098
4099done
4100IFS=$as_save_IFS
4101
4102
e143ad11 4103fi
e143ad11 4104
ca81d7a0
JD
4105EGREP="$ac_cv_path_EGREP"
4106if test -z "$EGREP"; then
4107 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4108echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4109 { (exit 1); exit 1; }; }
4110fi
e143ad11 4111
ca81d7a0
JD
4112else
4113 ac_cv_path_EGREP=$EGREP
4114fi
e143ad11 4115
ca81d7a0
JD
4116
4117 fi
8eeae1c9 4118fi
ca81d7a0
JD
4119{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4120echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4121 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4122
4123
4124
ca81d7a0
JD
4125{ echo "$as_me:$LINENO: checking for AIX" >&5
4126echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4127cat >conftest.$ac_ext <<_ACEOF
4128/* confdefs.h. */
4129_ACEOF
4130cat confdefs.h >>conftest.$ac_ext
4131cat >>conftest.$ac_ext <<_ACEOF
4132/* end confdefs.h. */
4133#ifdef _AIX
4134 yes
4135#endif
4136
4137_ACEOF
4138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4139 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4140 { echo "$as_me:$LINENO: result: yes" >&5
4141echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4142cat >>confdefs.h <<\_ACEOF
4143#define _ALL_SOURCE 1
4144_ACEOF
4145
4146else
ca81d7a0
JD
4147 { echo "$as_me:$LINENO: result: no" >&5
4148echo "${ECHO_T}no" >&6; }
e143ad11 4149fi
a51f4969
SM
4150rm -f conftest*
4151
4152
4153{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4154echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4155if test "${ac_cv_header_stdc+set}" = set; then
4156 echo $ECHO_N "(cached) $ECHO_C" >&6
4157else
4158 cat >conftest.$ac_ext <<_ACEOF
4159/* confdefs.h. */
4160_ACEOF
4161cat confdefs.h >>conftest.$ac_ext
4162cat >>conftest.$ac_ext <<_ACEOF
4163/* end confdefs.h. */
4164#include <stdlib.h>
4165#include <stdarg.h>
4166#include <string.h>
4167#include <float.h>
4168
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
4177rm -f conftest.$ac_objext
4178if { (ac_try="$ac_compile"
4179case "(($ac_try" in
4180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4181 *) ac_try_echo=$ac_try;;
4182esac
4183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4184 (eval "$ac_compile") 2>conftest.er1
4185 ac_status=$?
4186 grep -v '^ *+' conftest.er1 >conftest.err
4187 rm -f conftest.er1
4188 cat conftest.err >&5
4189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4190 (exit $ac_status); } && {
4191 test -z "$ac_c_werror_flag" ||
4192 test ! -s conftest.err
4193 } && test -s conftest.$ac_objext; then
4194 ac_cv_header_stdc=yes
4195else
4196 echo "$as_me: failed program was:" >&5
4197sed 's/^/| /' conftest.$ac_ext >&5
4198
4199 ac_cv_header_stdc=no
4200fi
4201
4202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203
4204if test $ac_cv_header_stdc = yes; then
4205 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4206 cat >conftest.$ac_ext <<_ACEOF
4207/* confdefs.h. */
4208_ACEOF
4209cat confdefs.h >>conftest.$ac_ext
4210cat >>conftest.$ac_ext <<_ACEOF
4211/* end confdefs.h. */
4212#include <string.h>
4213
4214_ACEOF
4215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4216 $EGREP "memchr" >/dev/null 2>&1; then
4217 :
4218else
4219 ac_cv_header_stdc=no
4220fi
4221rm -f conftest*
4222
4223fi
4224
4225if test $ac_cv_header_stdc = yes; then
4226 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4227 cat >conftest.$ac_ext <<_ACEOF
4228/* confdefs.h. */
4229_ACEOF
4230cat confdefs.h >>conftest.$ac_ext
4231cat >>conftest.$ac_ext <<_ACEOF
4232/* end confdefs.h. */
4233#include <stdlib.h>
4234
4235_ACEOF
4236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4237 $EGREP "free" >/dev/null 2>&1; then
4238 :
4239else
4240 ac_cv_header_stdc=no
4241fi
4242rm -f conftest*
4243
4244fi
4245
4246if test $ac_cv_header_stdc = yes; then
4247 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4248 if test "$cross_compiling" = yes; then
4249 :
4250else
4251 cat >conftest.$ac_ext <<_ACEOF
4252/* confdefs.h. */
4253_ACEOF
4254cat confdefs.h >>conftest.$ac_ext
4255cat >>conftest.$ac_ext <<_ACEOF
4256/* end confdefs.h. */
4257#include <ctype.h>
4258#include <stdlib.h>
4259#if ((' ' & 0x0FF) == 0x020)
4260# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4261# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4262#else
4263# define ISLOWER(c) \
4264 (('a' <= (c) && (c) <= 'i') \
4265 || ('j' <= (c) && (c) <= 'r') \
4266 || ('s' <= (c) && (c) <= 'z'))
4267# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4268#endif
4269
4270#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4271int
4272main ()
4273{
4274 int i;
4275 for (i = 0; i < 256; i++)
4276 if (XOR (islower (i), ISLOWER (i))
4277 || toupper (i) != TOUPPER (i))
4278 return 2;
4279 return 0;
4280}
4281_ACEOF
4282rm -f conftest$ac_exeext
4283if { (ac_try="$ac_link"
4284case "(($ac_try" in
4285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4286 *) ac_try_echo=$ac_try;;
4287esac
4288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4289 (eval "$ac_link") 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4293 { (case "(($ac_try" in
4294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4295 *) ac_try_echo=$ac_try;;
4296esac
4297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4298 (eval "$ac_try") 2>&5
4299 ac_status=$?
4300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4301 (exit $ac_status); }; }; then
4302 :
4303else
4304 echo "$as_me: program exited with status $ac_status" >&5
4305echo "$as_me: failed program was:" >&5
4306sed 's/^/| /' conftest.$ac_ext >&5
4307
4308( exit $ac_status )
4309ac_cv_header_stdc=no
4310fi
4311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4312fi
4313
4314
4315fi
4316fi
4317{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4318echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4319if test $ac_cv_header_stdc = yes; then
4320
4321cat >>confdefs.h <<\_ACEOF
4322#define STDC_HEADERS 1
4323_ACEOF
4324
4325fi
4326
4327# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4338 inttypes.h stdint.h unistd.h
4339do
4340as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4341{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4343if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4344 echo $ECHO_N "(cached) $ECHO_C" >&6
4345else
4346 cat >conftest.$ac_ext <<_ACEOF
4347/* confdefs.h. */
4348_ACEOF
4349cat confdefs.h >>conftest.$ac_ext
4350cat >>conftest.$ac_ext <<_ACEOF
4351/* end confdefs.h. */
4352$ac_includes_default
4353
4354#include <$ac_header>
4355_ACEOF
4356rm -f conftest.$ac_objext
4357if { (ac_try="$ac_compile"
4358case "(($ac_try" in
4359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4360 *) ac_try_echo=$ac_try;;
4361esac
4362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4363 (eval "$ac_compile") 2>conftest.er1
4364 ac_status=$?
4365 grep -v '^ *+' conftest.er1 >conftest.err
4366 rm -f conftest.er1
4367 cat conftest.err >&5
4368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369 (exit $ac_status); } && {
4370 test -z "$ac_c_werror_flag" ||
4371 test ! -s conftest.err
4372 } && test -s conftest.$ac_objext; then
4373 eval "$as_ac_Header=yes"
4374else
4375 echo "$as_me: failed program was:" >&5
4376sed 's/^/| /' conftest.$ac_ext >&5
4377
4378 eval "$as_ac_Header=no"
4379fi
4380
4381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382fi
4383ac_res=`eval echo '${'$as_ac_Header'}'`
4384 { echo "$as_me:$LINENO: result: $ac_res" >&5
4385echo "${ECHO_T}$ac_res" >&6; }
4386if test `eval echo '${'$as_ac_Header'}'` = yes; then
4387 cat >>confdefs.h <<_ACEOF
4388#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4389_ACEOF
4390
4391fi
4392
4393done
4394
4395
4396if test "${ac_cv_header_minix_config_h+set}" = set; then
4397 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4398echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4399if test "${ac_cv_header_minix_config_h+set}" = set; then
4400 echo $ECHO_N "(cached) $ECHO_C" >&6
4401fi
4402{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4403echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4404else
4405 # Is the header compilable?
4406{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4407echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4408cat >conftest.$ac_ext <<_ACEOF
4409/* confdefs.h. */
4410_ACEOF
4411cat confdefs.h >>conftest.$ac_ext
4412cat >>conftest.$ac_ext <<_ACEOF
4413/* end confdefs.h. */
4414$ac_includes_default
4415#include <minix/config.h>
4416_ACEOF
4417rm -f conftest.$ac_objext
4418if { (ac_try="$ac_compile"
4419case "(($ac_try" in
4420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4421 *) ac_try_echo=$ac_try;;
4422esac
4423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4424 (eval "$ac_compile") 2>conftest.er1
4425 ac_status=$?
4426 grep -v '^ *+' conftest.er1 >conftest.err
4427 rm -f conftest.er1
4428 cat conftest.err >&5
4429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4430 (exit $ac_status); } && {
4431 test -z "$ac_c_werror_flag" ||
4432 test ! -s conftest.err
4433 } && test -s conftest.$ac_objext; then
4434 ac_header_compiler=yes
4435else
4436 echo "$as_me: failed program was:" >&5
4437sed 's/^/| /' conftest.$ac_ext >&5
4438
4439 ac_header_compiler=no
4440fi
4441
4442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4443{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4444echo "${ECHO_T}$ac_header_compiler" >&6; }
4445
4446# Is the header present?
4447{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4448echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4449cat >conftest.$ac_ext <<_ACEOF
4450/* confdefs.h. */
4451_ACEOF
4452cat confdefs.h >>conftest.$ac_ext
4453cat >>conftest.$ac_ext <<_ACEOF
4454/* end confdefs.h. */
4455#include <minix/config.h>
4456_ACEOF
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
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
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
4473 ac_header_preproc=yes
4474else
4475 echo "$as_me: failed program was:" >&5
4476sed 's/^/| /' conftest.$ac_ext >&5
4477
4478 ac_header_preproc=no
4479fi
4480
4481rm -f conftest.err conftest.$ac_ext
4482{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4483echo "${ECHO_T}$ac_header_preproc" >&6; }
4484
4485# So? What about this header?
4486case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4487 yes:no: )
4488 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4489echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4490 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4491echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4492 ac_header_preproc=yes
4493 ;;
4494 no:yes:* )
4495 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4496echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4497 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4498echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4499 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4500echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4501 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4502echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4503 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4504echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4505 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4506echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4507
4508 ;;
4509esac
4510{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4511echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4512if test "${ac_cv_header_minix_config_h+set}" = set; then
4513 echo $ECHO_N "(cached) $ECHO_C" >&6
4514else
4515 ac_cv_header_minix_config_h=$ac_header_preproc
4516fi
4517{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4518echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4519
4520fi
4521if test $ac_cv_header_minix_config_h = yes; then
4522 MINIX=yes
4523else
4524 MINIX=
4525fi
4526
4527
4528if test "$MINIX" = yes; then
4529
4530cat >>confdefs.h <<\_ACEOF
4531#define _POSIX_SOURCE 1
4532_ACEOF
4533
4534
4535cat >>confdefs.h <<\_ACEOF
4536#define _POSIX_1_SOURCE 2
4537_ACEOF
4538
4539
4540cat >>confdefs.h <<\_ACEOF
4541#define _MINIX 1
4542_ACEOF
4543
4544fi
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4557echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4558if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4559 echo $ECHO_N "(cached) $ECHO_C" >&6
4560else
4561 cat >conftest.$ac_ext <<_ACEOF
4562/* confdefs.h. */
4563_ACEOF
4564cat confdefs.h >>conftest.$ac_ext
4565cat >>conftest.$ac_ext <<_ACEOF
4566/* end confdefs.h. */
4567
4568# define __EXTENSIONS__ 1
4569 $ac_includes_default
4570int
4571main ()
4572{
4573
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
4579if { (ac_try="$ac_compile"
4580case "(($ac_try" in
4581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4582 *) ac_try_echo=$ac_try;;
4583esac
4584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4585 (eval "$ac_compile") 2>conftest.er1
4586 ac_status=$?
4587 grep -v '^ *+' conftest.er1 >conftest.err
4588 rm -f conftest.er1
4589 cat conftest.err >&5
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4591 (exit $ac_status); } && {
4592 test -z "$ac_c_werror_flag" ||
4593 test ! -s conftest.err
4594 } && test -s conftest.$ac_objext; then
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 echo "$as_me: failed program was:" >&5
4598sed 's/^/| /' conftest.$ac_ext >&5
4599
4600 ac_cv_safe_to_define___extensions__=no
4601fi
e143ad11 4602
a51f4969
SM
4603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4604fi
4605{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4606echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4607 test $ac_cv_safe_to_define___extensions__ = yes &&
4608 cat >>confdefs.h <<\_ACEOF
4609#define __EXTENSIONS__ 1
4610_ACEOF
e143ad11 4611
a51f4969
SM
4612 cat >>confdefs.h <<\_ACEOF
4613#define _POSIX_PTHREAD_SEMANTICS 1
4614_ACEOF
e143ad11 4615
a51f4969
SM
4616 cat >>confdefs.h <<\_ACEOF
4617#define _TANDEM_SOURCE 1
e143ad11
AS
4618_ACEOF
4619
4620
4621
01abe918 4622### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4623{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4624echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4625SAVE_CFLAGS="$CFLAGS"
4626CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4627cat >conftest.$ac_ext <<_ACEOF
4628/* confdefs.h. */
4629_ACEOF
4630cat confdefs.h >>conftest.$ac_ext
4631cat >>conftest.$ac_ext <<_ACEOF
4632/* end confdefs.h. */
4633
4634int
4635main ()
4636{
4637
4638 ;
4639 return 0;
4640}
4641_ACEOF
4642rm -f conftest.$ac_objext
ca81d7a0
JD
4643if { (ac_try="$ac_compile"
4644case "(($ac_try" in
4645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4646 *) ac_try_echo=$ac_try;;
4647esac
4648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4649 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4650 ac_status=$?
4651 grep -v '^ *+' conftest.er1 >conftest.err
4652 rm -f conftest.er1
4653 cat conftest.err >&5
4654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4655 (exit $ac_status); } && {
4656 test -z "$ac_c_werror_flag" ||
4657 test ! -s conftest.err
4658 } && test -s conftest.$ac_objext; then
01abe918
CY
4659 has_option=yes
4660else
4661 echo "$as_me: failed program was:" >&5
4662sed 's/^/| /' conftest.$ac_ext >&5
4663
ca81d7a0 4664 has_option=no
01abe918 4665fi
ca81d7a0
JD
4666
4667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4668if test $has_option = yes; then
4669 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4670fi
ca81d7a0
JD
4671{ echo "$as_me:$LINENO: result: $has_option" >&5
4672echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4673CFLAGS="$SAVE_CFLAGS"
4674unset has_option
4675unset SAVE_CFLAGS
4676
6a3a24fa 4677#### Some other nice autoconf tests.
ba4481b5 4678
ca81d7a0
JD
4679{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4680echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4681LN_S=$as_ln_s
4682if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4683 { echo "$as_me:$LINENO: result: yes" >&5
4684echo "${ECHO_T}yes" >&6; }
ba4481b5 4685else
ca81d7a0
JD
4686 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4687echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4688fi
4689
503d2be0
AS
4690ac_ext=c
4691ac_cpp='$CPP $CPPFLAGS'
4692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4694ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4695{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4696echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4697# On Suns, sometimes $CPP names a directory.
4698if test -n "$CPP" && test -d "$CPP"; then
4699 CPP=
4700fi
4701if test -z "$CPP"; then
503d2be0
AS
4702 if test "${ac_cv_prog_CPP+set}" = set; then
4703 echo $ECHO_N "(cached) $ECHO_C" >&6
4704else
4705 # Double quotes because CPP needs to be expanded
4706 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4707 do
4708 ac_preproc_ok=false
4709for ac_c_preproc_warn_flag in '' yes
4710do
4711 # Use a header file that comes with gcc, so configuring glibc
4712 # with a fresh cross-compiler works.
19650fd6
AS
4713 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4714 # <limits.h> exists even on freestanding compilers.
ba4481b5 4715 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4716 # not just through cpp. "Syntax error" is here to catch this case.
4717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4718/* confdefs.h. */
4719_ACEOF
4720cat confdefs.h >>conftest.$ac_ext
4721cat >>conftest.$ac_ext <<_ACEOF
4722/* end confdefs.h. */
4723#ifdef __STDC__
4724# include <limits.h>
4725#else
4726# include <assert.h>
4727#endif
edfaf76d 4728 Syntax error
503d2be0 4729_ACEOF
ca81d7a0
JD
4730if { (ac_try="$ac_cpp conftest.$ac_ext"
4731case "(($ac_try" in
4732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4733 *) ac_try_echo=$ac_try;;
4734esac
4735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4737 ac_status=$?
6bae0ccf 4738 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4739 rm -f conftest.er1
4740 cat conftest.err >&5
c0d27fcc 4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4742 (exit $ac_status); } >/dev/null && {
4743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4744 test ! -s conftest.err
4745 }; then
ba4481b5
DL
4746 :
4747else
503d2be0 4748 echo "$as_me: failed program was:" >&5
19650fd6
AS
4749sed 's/^/| /' conftest.$ac_ext >&5
4750
503d2be0
AS
4751 # Broken: fails on valid input.
4752continue
4753fi
ca81d7a0 4754
503d2be0
AS
4755rm -f conftest.err conftest.$ac_ext
4756
ca81d7a0 4757 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4758 # can be detected and how.
4759 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4760/* confdefs.h. */
4761_ACEOF
4762cat confdefs.h >>conftest.$ac_ext
4763cat >>conftest.$ac_ext <<_ACEOF
4764/* end confdefs.h. */
503d2be0
AS
4765#include <ac_nonexistent.h>
4766_ACEOF
ca81d7a0
JD
4767if { (ac_try="$ac_cpp conftest.$ac_ext"
4768case "(($ac_try" in
4769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4770 *) ac_try_echo=$ac_try;;
4771esac
4772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4774 ac_status=$?
6bae0ccf 4775 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4776 rm -f conftest.er1
4777 cat conftest.err >&5
c0d27fcc 4778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4779 (exit $ac_status); } >/dev/null && {
4780 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4781 test ! -s conftest.err
4782 }; then
503d2be0
AS
4783 # Broken: success on invalid input.
4784continue
c4bb2108 4785else
503d2be0 4786 echo "$as_me: failed program was:" >&5
19650fd6
AS
4787sed 's/^/| /' conftest.$ac_ext >&5
4788
503d2be0
AS
4789 # Passes both tests.
4790ac_preproc_ok=:
4791break
4792fi
ca81d7a0 4793
503d2be0
AS
4794rm -f conftest.err conftest.$ac_ext
4795
4796done
4797# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4798rm -f conftest.err conftest.$ac_ext
4799if $ac_preproc_ok; then
4800 break
4801fi
4802
4803 done
4804 ac_cv_prog_CPP=$CPP
4805
4806fi
4807 CPP=$ac_cv_prog_CPP
4808else
4809 ac_cv_prog_CPP=$CPP
4810fi
ca81d7a0
JD
4811{ echo "$as_me:$LINENO: result: $CPP" >&5
4812echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4813ac_preproc_ok=false
4814for ac_c_preproc_warn_flag in '' yes
4815do
4816 # Use a header file that comes with gcc, so configuring glibc
4817 # with a fresh cross-compiler works.
19650fd6
AS
4818 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4819 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4820 # On the NeXT, cc -E runs the code through the compiler's parser,
4821 # not just through cpp. "Syntax error" is here to catch this case.
4822 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4823/* confdefs.h. */
4824_ACEOF
4825cat confdefs.h >>conftest.$ac_ext
4826cat >>conftest.$ac_ext <<_ACEOF
4827/* end confdefs.h. */
4828#ifdef __STDC__
4829# include <limits.h>
4830#else
4831# include <assert.h>
4832#endif
edfaf76d 4833 Syntax error
503d2be0 4834_ACEOF
ca81d7a0
JD
4835if { (ac_try="$ac_cpp conftest.$ac_ext"
4836case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
4840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4842 ac_status=$?
6bae0ccf 4843 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4844 rm -f conftest.er1
4845 cat conftest.err >&5
c0d27fcc 4846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4847 (exit $ac_status); } >/dev/null && {
4848 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4849 test ! -s conftest.err
4850 }; then
ba4481b5
DL
4851 :
4852else
503d2be0 4853 echo "$as_me: failed program was:" >&5
19650fd6
AS
4854sed 's/^/| /' conftest.$ac_ext >&5
4855
503d2be0
AS
4856 # Broken: fails on valid input.
4857continue
4858fi
ca81d7a0 4859
503d2be0
AS
4860rm -f conftest.err conftest.$ac_ext
4861
ca81d7a0 4862 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4863 # can be detected and how.
4864 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4865/* confdefs.h. */
4866_ACEOF
4867cat confdefs.h >>conftest.$ac_ext
4868cat >>conftest.$ac_ext <<_ACEOF
4869/* end confdefs.h. */
503d2be0
AS
4870#include <ac_nonexistent.h>
4871_ACEOF
ca81d7a0
JD
4872if { (ac_try="$ac_cpp conftest.$ac_ext"
4873case "(($ac_try" in
4874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4875 *) ac_try_echo=$ac_try;;
4876esac
4877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4878 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4879 ac_status=$?
6bae0ccf 4880 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4881 rm -f conftest.er1
4882 cat conftest.err >&5
c0d27fcc 4883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4884 (exit $ac_status); } >/dev/null && {
4885 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4886 test ! -s conftest.err
4887 }; then
503d2be0
AS
4888 # Broken: success on invalid input.
4889continue
4890else
4891 echo "$as_me: failed program was:" >&5
19650fd6
AS
4892sed 's/^/| /' conftest.$ac_ext >&5
4893
503d2be0
AS
4894 # Passes both tests.
4895ac_preproc_ok=:
4896break
ba4481b5 4897fi
ca81d7a0 4898
503d2be0
AS
4899rm -f conftest.err conftest.$ac_ext
4900
4901done
4902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4903rm -f conftest.err conftest.$ac_ext
4904if $ac_preproc_ok; then
4905 :
ba4481b5 4906else
19650fd6
AS
4907 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4908See \`config.log' for more details." >&5
4909echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4910See \`config.log' for more details." >&2;}
503d2be0 4911 { (exit 1); exit 1; }; }
ba4481b5 4912fi
503d2be0
AS
4913
4914ac_ext=c
4915ac_cpp='$CPP $CPPFLAGS'
4916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4918ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4919
4920# Find a good install program. We prefer a C program (faster),
4921# so one script is as good as another. But avoid the broken or
4922# incompatible versions:
4923# SysV /etc/install, /usr/sbin/install
4924# SunOS /usr/etc/install
4925# IRIX /sbin/install
4926# AIX /bin/install
503d2be0 4927# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4928# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4929# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4930# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4931# OS/2's system install, which has a completely different semantic
ba4481b5 4932# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4933{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4934echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4935if test -z "$INSTALL"; then
503d2be0
AS
4936if test "${ac_cv_path_install+set}" = set; then
4937 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4938else
c0d27fcc
MR
4939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4940for as_dir in $PATH
4941do
4942 IFS=$as_save_IFS
4943 test -z "$as_dir" && as_dir=.
4944 # Account for people who put trailing slashes in PATH elements.
4945case $as_dir/ in
4946 ./ | .// | /cC/* | \
4947 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4948 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4949 /usr/ucb/* ) ;;
4950 *)
4951 # OSF1 and SCO ODT 3.0 have their own names for install.
4952 # Don't use installbsd from OSF since it installs stuff as root
4953 # by default.
4954 for ac_prog in ginstall scoinst install; do
4955 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4956 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4957 if test $ac_prog = install &&
4958 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4959 # AIX install. It has an incompatible calling convention.
4960 :
4961 elif test $ac_prog = install &&
4962 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4963 # program-specific install script used by HP pwplus--don't use.
4964 :
4965 else
4966 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4967 break 3
4968 fi
4969 fi
ba4481b5 4970 done
c0d27fcc
MR
4971 done
4972 ;;
4973esac
4974done
ca81d7a0 4975IFS=$as_save_IFS
c0d27fcc 4976
ba4481b5
DL
4977
4978fi
4979 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4980 INSTALL=$ac_cv_path_install
ba4481b5 4981 else
ca81d7a0
JD
4982 # As a last resort, use the slow shell script. Don't cache a
4983 # value for INSTALL within a source directory, because that will
ba4481b5 4984 # break other packages using the cache if that directory is
ca81d7a0 4985 # removed, or if the value is a relative name.
503d2be0 4986 INSTALL=$ac_install_sh
ba4481b5
DL
4987 fi
4988fi
ca81d7a0
JD
4989{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4990echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4991
4992# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4993# It thinks the first close brace ends the variable substitution.
4994test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4995
503d2be0 4996test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4997
ba4481b5
DL
4998test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4999
c0d27fcc
MR
5000if test "x$RANLIB" = x; then
5001 if test -n "$ac_tool_prefix"; then
5002 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5003set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5004{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5005echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5006if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5007 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5008else
5009 if test -n "$RANLIB"; then
5010 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5011else
c0d27fcc
MR
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5019 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5020 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
503d2be0 5024done
ca81d7a0 5025IFS=$as_save_IFS
503d2be0 5026
7397acc4
DL
5027fi
5028fi
503d2be0 5029RANLIB=$ac_cv_prog_RANLIB
7397acc4 5030if test -n "$RANLIB"; then
ca81d7a0
JD
5031 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5032echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5033else
ca81d7a0
JD
5034 { echo "$as_me:$LINENO: result: no" >&5
5035echo "${ECHO_T}no" >&6; }
503d2be0
AS
5036fi
5037
ca81d7a0 5038
503d2be0
AS
5039fi
5040if test -z "$ac_cv_prog_RANLIB"; then
5041 ac_ct_RANLIB=$RANLIB
5042 # Extract the first word of "ranlib", so it can be a program name with args.
5043set dummy ranlib; ac_word=$2
ca81d7a0
JD
5044{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5045echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5046if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5047 echo $ECHO_N "(cached) $ECHO_C" >&6
5048else
5049 if test -n "$ac_ct_RANLIB"; then
5050 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5051else
c0d27fcc
MR
5052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in $PATH
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5058 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5059 ac_cv_prog_ac_ct_RANLIB="ranlib"
5060 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063done
503d2be0 5064done
ca81d7a0 5065IFS=$as_save_IFS
503d2be0 5066
503d2be0
AS
5067fi
5068fi
5069ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5070if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5071 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5072echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5073else
ca81d7a0
JD
5074 { echo "$as_me:$LINENO: result: no" >&5
5075echo "${ECHO_T}no" >&6; }
503d2be0
AS
5076fi
5077
ca81d7a0
JD
5078 if test "x$ac_ct_RANLIB" = x; then
5079 RANLIB=":"
5080 else
5081 case $cross_compiling:$ac_tool_warned in
5082yes:)
5083{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5084whose name does not start with the host triplet. If you think this
5085configuration is useful to you, please write to autoconf@gnu.org." >&5
5086echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5087whose name does not start with the host triplet. If you think this
5088configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5089ac_tool_warned=yes ;;
5090esac
5091 RANLIB=$ac_ct_RANLIB
5092 fi
7397acc4 5093else
503d2be0 5094 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5095fi
5096
5097fi
9e71690e
DK
5098# Extract the first word of "install-info", so it can be a program name with args.
5099set dummy install-info; ac_word=$2
ca81d7a0
JD
5100{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5102if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104else
5105 case $INSTALL_INFO in
5106 [\\/]* | ?:[\\/]*)
5107 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5108 ;;
5109 *)
5110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
5115 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5117 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5118 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5119 break 2
5120 fi
5121done
5122done
ca81d7a0 5123IFS=$as_save_IFS
9e71690e
DK
5124
5125 ;;
5126esac
5127fi
5128INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5129if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5130 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5131echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5132else
ca81d7a0
JD
5133 { echo "$as_me:$LINENO: result: no" >&5
5134echo "${ECHO_T}no" >&6; }
9e71690e
DK
5135fi
5136
ca81d7a0 5137
9e71690e
DK
5138# Extract the first word of "install-info", so it can be a program name with args.
5139set dummy install-info; ac_word=$2
ca81d7a0
JD
5140{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5141echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5142if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5143 echo $ECHO_N "(cached) $ECHO_C" >&6
5144else
5145 case $INSTALL_INFO in
5146 [\\/]* | ?:[\\/]*)
5147 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5148 ;;
5149 *)
5150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5151for as_dir in /usr/sbin
5152do
5153 IFS=$as_save_IFS
5154 test -z "$as_dir" && as_dir=.
5155 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5156 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5157 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5158 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5159 break 2
5160 fi
5161done
5162done
ca81d7a0 5163IFS=$as_save_IFS
9e71690e
DK
5164
5165 ;;
5166esac
5167fi
5168INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5169if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5170 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5171echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5172else
ca81d7a0
JD
5173 { echo "$as_me:$LINENO: result: no" >&5
5174echo "${ECHO_T}no" >&6; }
9e71690e
DK
5175fi
5176
ca81d7a0 5177
9e71690e
DK
5178# Extract the first word of "install-info", so it can be a program name with args.
5179set dummy install-info; ac_word=$2
ca81d7a0
JD
5180{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5181echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5182if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5183 echo $ECHO_N "(cached) $ECHO_C" >&6
5184else
5185 case $INSTALL_INFO in
5186 [\\/]* | ?:[\\/]*)
5187 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5188 ;;
5189 *)
5190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in /sbin
5192do
5193 IFS=$as_save_IFS
5194 test -z "$as_dir" && as_dir=.
5195 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5196 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5197 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5198 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5199 break 2
5200 fi
5201done
5202done
ca81d7a0 5203IFS=$as_save_IFS
9e71690e
DK
5204
5205 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5206 ;;
5207esac
5208fi
5209INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5210if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5211 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5212echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5213else
ca81d7a0
JD
5214 { echo "$as_me:$LINENO: result: no" >&5
5215echo "${ECHO_T}no" >&6; }
9e71690e
DK
5216fi
5217
ca81d7a0 5218
8ae52ca6
RF
5219# Extract the first word of "gzip", so it can be a program name with args.
5220set dummy gzip; ac_word=$2
ca81d7a0
JD
5221{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5222echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5223if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5224 echo $ECHO_N "(cached) $ECHO_C" >&6
5225else
46e35e9f 5226 case $GZIP_PROG in
8ae52ca6 5227 [\\/]* | ?:[\\/]*)
46e35e9f 5228 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5229 ;;
5230 *)
5231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232for as_dir in $PATH
5233do
5234 IFS=$as_save_IFS
5235 test -z "$as_dir" && as_dir=.
5236 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5237 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5238 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5239 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5240 break 2
5241 fi
5242done
5243done
ca81d7a0 5244IFS=$as_save_IFS
8ae52ca6
RF
5245
5246 ;;
5247esac
5248fi
46e35e9f 5249GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5250if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5251 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5252echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5253else
ca81d7a0
JD
5254 { echo "$as_me:$LINENO: result: no" >&5
5255echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5256fi
5257
ba4481b5 5258
c0d27fcc 5259
ca81d7a0 5260
1bb9a689
MB
5261## Need makeinfo >= 4.6 (?) to build the manuals.
5262# Extract the first word of "makeinfo", so it can be a program name with args.
5263set dummy makeinfo; ac_word=$2
5264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5266if test "${ac_cv_path_MAKEINFO+set}" = set; then
5267 echo $ECHO_N "(cached) $ECHO_C" >&6
5268else
5269 case $MAKEINFO in
5270 [\\/]* | ?:[\\/]*)
5271 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5272 ;;
5273 *)
5274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275for as_dir in $PATH
5276do
5277 IFS=$as_save_IFS
5278 test -z "$as_dir" && as_dir=.
5279 for ac_exec_ext in '' $ac_executable_extensions; do
5280 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5281 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5283 break 2
5284 fi
5285done
5286done
5287IFS=$as_save_IFS
5288
5289 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5290 ;;
5291esac
5292fi
5293MAKEINFO=$ac_cv_path_MAKEINFO
5294if test -n "$MAKEINFO"; then
5295 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5296echo "${ECHO_T}$MAKEINFO" >&6; }
5297else
5298 { echo "$as_me:$LINENO: result: no" >&5
5299echo "${ECHO_T}no" >&6; }
5300fi
5301
5302
5303if test "$MAKEINFO" != "no" && \
d4840f44 5304 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
5305 MAKEINFO=no
5306fi
5307
e1b89931
GM
5308## Makeinfo is unusual. For a released Emacs, the manuals are
5309## pre-built, and not deleted by the normal clean rules. makeinfo is
5310## therefore in the category of "special tools" not normally required, which
5311## configure does not have to check for (eg autoconf itself).
5312## In a CVS checkout on the other hand, the manuals are not included.
5313## So makeinfo is a requirement to build from CVS, and configure
5314## should test for it as it does for any other build requirement.
5315## We use the presence of $srcdir/info/emacs to distinguish a release,
5316## with pre-built manuals, from a CVS checkout.
5317if test "$MAKEINFO" = "no"; then
5318 if test "x${with_makeinfo}" = "xno"; then
5319 MAKEINFO=off
5320 elif ! test -e $srcdir/info/emacs; then
5321 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5322source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5323Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5324with the \`--without-makeinfo' option to build without the manuals. " >&5
5325echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5326source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5327Either install a suitable version of makeinfo, or re-run configure
e1b89931 5328with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5329 { (exit 1); exit 1; }; }
e1b89931 5330 fi
921fbdf0 5331fi
1bb9a689
MB
5332
5333
8e967cf7
MR
5334if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5335then
5336 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5337fi
5338
5339if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5340then
5341 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5342fi
5343
c0d27fcc 5344
fe239f0f 5345late_LDFLAGS=$LDFLAGS
4af002d6 5346if test "$GCC" = yes; then
fe239f0f
AS
5347 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5348else
5349 LDFLAGS="$LDFLAGS -znocombreloc"
5350fi
5351
ca81d7a0
JD
5352{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5353echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5354cat >conftest.$ac_ext <<_ACEOF
5355main(){return 0;}
5356_ACEOF
5357rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5358if { (ac_try="$ac_link"
5359case "(($ac_try" in
5360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5361 *) ac_try_echo=$ac_try;;
5362esac
5363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5364 (eval "$ac_link") 2>conftest.er1
fe239f0f 5365 ac_status=$?
edfaf76d
LK
5366 grep -v '^ *+' conftest.er1 >conftest.err
5367 rm -f conftest.er1
5368 cat conftest.err >&5
fe239f0f 5369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5370 (exit $ac_status); } && {
5371 test -z "$ac_c_werror_flag" ||
5372 test ! -s conftest.err
5373 } && test -s conftest$ac_exeext &&
5374 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5375 { echo "$as_me:$LINENO: result: yes" >&5
5376echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5377else
5378 echo "$as_me: failed program was:" >&5
5379sed 's/^/| /' conftest.$ac_ext >&5
5380
ca81d7a0
JD
5381 LDFLAGS=$late_LDFLAGS
5382 { echo "$as_me:$LINENO: result: no" >&5
5383echo "${ECHO_T}no" >&6; }
fe239f0f 5384fi
ca81d7a0 5385
f053c89f 5386rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5387 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5388
3b33a005
DL
5389#### Extract some information from the operating system and machine files.
5390
c0d27fcc 5391{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5392 - which libraries the lib-src programs will want, and
503d2be0
AS
5393 - whether the GNU malloc routines are usable..." >&5
5394echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5395 - which libraries the lib-src programs will want, and
503d2be0 5396 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5397
5398### First figure out CFLAGS (which we use for running the compiler here)
5399### and REAL_CFLAGS (which we use for real compilation).
5400### The two are the same except on a few systems, where they are made
5401### different to work around various lossages. For example,
5402### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5403### as implying static linking.
5404
5405### If the CFLAGS env var is specified, we use that value
5406### instead of the default.
5407
5408### It's not important that this name contain the PID; you can't run
5409### two configures in the same directory and have anything work
5410### anyway.
5411tempcname="conftest.c"
5412
5413echo '
5414#include "'${srcdir}'/src/'${opsysfile}'"
5415#include "'${srcdir}'/src/'${machfile}'"
5416#ifndef LIBS_MACHINE
5417#define LIBS_MACHINE
5418#endif
5419#ifndef LIBS_SYSTEM
5420#define LIBS_SYSTEM
5421#endif
5422#ifndef C_SWITCH_SYSTEM
5423#define C_SWITCH_SYSTEM
5424#endif
5425#ifndef C_SWITCH_MACHINE
5426#define C_SWITCH_MACHINE
5427#endif
5428configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5429configure___ c_switch_system=C_SWITCH_SYSTEM
5430configure___ c_switch_machine=C_SWITCH_MACHINE
5431
5432#ifndef LIB_X11_LIB
5433#define LIB_X11_LIB -lX11
5434#endif
5435
3b33a005
DL
5436#ifndef LIBX11_SYSTEM
5437#define LIBX11_SYSTEM
5438#endif
9d2818d6 5439configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5440
5441#ifdef UNEXEC
5442configure___ unexec=UNEXEC
5443#else
5444configure___ unexec=unexec.o
5445#endif
5446
5447#ifdef SYSTEM_MALLOC
5448configure___ system_malloc=yes
5449#else
5450configure___ system_malloc=no
5451#endif
5452
ef9e4345
GM
5453#ifdef USE_MMAP_FOR_BUFFERS
5454configure___ use_mmap_for_buffers=yes
73b77ee5 5455#else
ef9e4345 5456configure___ use_mmap_for_buffers=no
73b77ee5
GM
5457#endif
5458
3b33a005
DL
5459#ifndef C_DEBUG_SWITCH
5460#define C_DEBUG_SWITCH -g
5461#endif
5462
5463#ifndef C_OPTIMIZE_SWITCH
5464#ifdef __GNUC__
5465#define C_OPTIMIZE_SWITCH -O2
5466#else
5467#define C_OPTIMIZE_SWITCH -O
5468#endif
5469#endif
5470
01abe918
CY
5471#ifndef C_WARNINGS_SWITCH
5472#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5473#endif
5474
3b33a005
DL
5475#ifndef LD_SWITCH_MACHINE
5476#define LD_SWITCH_MACHINE
5477#endif
5478
5479#ifndef LD_SWITCH_SYSTEM
5480#define LD_SWITCH_SYSTEM
5481#endif
5482
5483#ifndef LD_SWITCH_X_SITE_AUX
5484#define LD_SWITCH_X_SITE_AUX
503d2be0 5485#endif
3b33a005
DL
5486
5487configure___ ld_switch_system=LD_SWITCH_SYSTEM
5488configure___ ld_switch_machine=LD_SWITCH_MACHINE
5489
5490#ifdef THIS_IS_CONFIGURE
5491
5492/* Get the CFLAGS for tests in configure. */
5493#ifdef __GNUC__
5494configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5495#else
5496configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5497#endif
5498
5499#else /* not THIS_IS_CONFIGURE */
5500
5501/* Get the CFLAGS for real compilation. */
5502#ifdef __GNUC__
01abe918 5503configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5504#else
5505configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5506#endif
5507
5508#endif /* not THIS_IS_CONFIGURE */
5509' > ${tempcname}
5510
5511# The value of CPP is a quoted variable reference, so we need to do this
5512# to get its actual value...
5513CPP=`eval "echo $CPP"`
5514eval `${CPP} -Isrc ${tempcname} \
5515 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5516if test "x$SPECIFIED_CFLAGS" = x; then
5517 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5518 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5519else
5520 REAL_CFLAGS="$CFLAGS"
5521fi
5522rm ${tempcname}
5523
5524ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5525
5526### Make sure subsequent tests use flags consistent with the build flags.
5527
5528if test x"${OVERRIDE_CPPFLAGS}" != x; then
5529 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5530else
5531 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5532fi
5533
6bae0ccf
DL
5534
5535
ca81d7a0 5536# Check whether --enable-largefile was given.
f4988be7 5537if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5538 enableval=$enable_largefile;
5539fi
f4988be7 5540
503d2be0 5541if test "$enable_largefile" != no; then
f4988be7 5542
ca81d7a0
JD
5543 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5544echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5545if test "${ac_cv_sys_largefile_CC+set}" = set; then
5546 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5547else
f4988be7 5548 ac_cv_sys_largefile_CC=no
503d2be0
AS
5549 if test "$GCC" != yes; then
5550 ac_save_CC=$CC
5551 while :; do
ca81d7a0
JD
5552 # IRIX 6.2 and later do not support large files by default,
5553 # so use the C compiler's -n32 option if that helps.
edfaf76d 5554 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5555/* confdefs.h. */
5556_ACEOF
5557cat confdefs.h >>conftest.$ac_ext
5558cat >>conftest.$ac_ext <<_ACEOF
5559/* end confdefs.h. */
f4988be7 5560#include <sys/types.h>
503d2be0
AS
5561 /* Check that off_t can represent 2**63 - 1 correctly.
5562 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5563 since some C++ compilers masquerading as C compilers
5564 incorrectly reject 9223372036854775807. */
5565#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5566 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5567 && LARGE_OFF_T % 2147483647 == 1)
5568 ? 1 : -1];
5569int
5570main ()
5571{
f4988be7 5572
503d2be0
AS
5573 ;
5574 return 0;
5575}
5576_ACEOF
ca81d7a0
JD
5577 rm -f conftest.$ac_objext
5578if { (ac_try="$ac_compile"
5579case "(($ac_try" in
5580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5581 *) ac_try_echo=$ac_try;;
5582esac
5583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5584 (eval "$ac_compile") 2>conftest.er1
503d2be0 5585 ac_status=$?
edfaf76d
LK
5586 grep -v '^ *+' conftest.er1 >conftest.err
5587 rm -f conftest.er1
5588 cat conftest.err >&5
c0d27fcc 5589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5590 (exit $ac_status); } && {
5591 test -z "$ac_c_werror_flag" ||
5592 test ! -s conftest.err
5593 } && test -s conftest.$ac_objext; then
503d2be0 5594 break
b192d653 5595else
503d2be0 5596 echo "$as_me: failed program was:" >&5
19650fd6
AS
5597sed 's/^/| /' conftest.$ac_ext >&5
5598
ca81d7a0 5599
503d2be0 5600fi
ca81d7a0
JD
5601
5602rm -f core conftest.err conftest.$ac_objext
5603 CC="$CC -n32"
5604 rm -f conftest.$ac_objext
5605if { (ac_try="$ac_compile"
5606case "(($ac_try" in
5607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5608 *) ac_try_echo=$ac_try;;
5609esac
5610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5611 (eval "$ac_compile") 2>conftest.er1
503d2be0 5612 ac_status=$?
edfaf76d
LK
5613 grep -v '^ *+' conftest.er1 >conftest.err
5614 rm -f conftest.er1
5615 cat conftest.err >&5
c0d27fcc 5616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5617 (exit $ac_status); } && {
5618 test -z "$ac_c_werror_flag" ||
5619 test ! -s conftest.err
5620 } && test -s conftest.$ac_objext; then
503d2be0
AS
5621 ac_cv_sys_largefile_CC=' -n32'; break
5622else
5623 echo "$as_me: failed program was:" >&5
19650fd6
AS
5624sed 's/^/| /' conftest.$ac_ext >&5
5625
ca81d7a0 5626
503d2be0 5627fi
ca81d7a0
JD
5628
5629rm -f core conftest.err conftest.$ac_objext
edfaf76d 5630 break
503d2be0
AS
5631 done
5632 CC=$ac_save_CC
5633 rm -f conftest.$ac_ext
5634 fi
b192d653 5635fi
ca81d7a0
JD
5636{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5637echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5638 if test "$ac_cv_sys_largefile_CC" != no; then
5639 CC=$CC$ac_cv_sys_largefile_CC
5640 fi
b192d653 5641
ca81d7a0
JD
5642 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5643echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5644if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5646else
503d2be0 5647 while :; do
503d2be0 5648 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5649/* confdefs.h. */
5650_ACEOF
5651cat confdefs.h >>conftest.$ac_ext
5652cat >>conftest.$ac_ext <<_ACEOF
5653/* end confdefs.h. */
f4988be7 5654#include <sys/types.h>
503d2be0
AS
5655 /* Check that off_t can represent 2**63 - 1 correctly.
5656 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5657 since some C++ compilers masquerading as C compilers
5658 incorrectly reject 9223372036854775807. */
5659#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5660 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5661 && LARGE_OFF_T % 2147483647 == 1)
5662 ? 1 : -1];
5663int
5664main ()
5665{
f4988be7 5666
503d2be0
AS
5667 ;
5668 return 0;
5669}
5670_ACEOF
5671rm -f conftest.$ac_objext
ca81d7a0
JD
5672if { (ac_try="$ac_compile"
5673case "(($ac_try" in
5674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5675 *) ac_try_echo=$ac_try;;
5676esac
5677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5678 (eval "$ac_compile") 2>conftest.er1
503d2be0 5679 ac_status=$?
edfaf76d
LK
5680 grep -v '^ *+' conftest.er1 >conftest.err
5681 rm -f conftest.er1
5682 cat conftest.err >&5
c0d27fcc 5683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5684 (exit $ac_status); } && {
5685 test -z "$ac_c_werror_flag" ||
5686 test ! -s conftest.err
5687 } && test -s conftest.$ac_objext; then
5688 ac_cv_sys_file_offset_bits=no; break
f4988be7 5689else
503d2be0 5690 echo "$as_me: failed program was:" >&5
19650fd6
AS
5691sed 's/^/| /' conftest.$ac_ext >&5
5692
ca81d7a0 5693
503d2be0 5694fi
ca81d7a0
JD
5695
5696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
f4988be7
GM
5703#define _FILE_OFFSET_BITS 64
5704#include <sys/types.h>
503d2be0
AS
5705 /* Check that off_t can represent 2**63 - 1 correctly.
5706 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5707 since some C++ compilers masquerading as C compilers
5708 incorrectly reject 9223372036854775807. */
5709#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5710 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5711 && LARGE_OFF_T % 2147483647 == 1)
5712 ? 1 : -1];
5713int
5714main ()
5715{
5716
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
ca81d7a0
JD
5722if { (ac_try="$ac_compile"
5723case "(($ac_try" in
5724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725 *) ac_try_echo=$ac_try;;
5726esac
5727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5728 (eval "$ac_compile") 2>conftest.er1
503d2be0 5729 ac_status=$?
edfaf76d
LK
5730 grep -v '^ *+' conftest.er1 >conftest.err
5731 rm -f conftest.er1
5732 cat conftest.err >&5
c0d27fcc 5733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5734 (exit $ac_status); } && {
5735 test -z "$ac_c_werror_flag" ||
5736 test ! -s conftest.err
5737 } && test -s conftest.$ac_objext; then
503d2be0
AS
5738 ac_cv_sys_file_offset_bits=64; break
5739else
5740 echo "$as_me: failed program was:" >&5
19650fd6
AS
5741sed 's/^/| /' conftest.$ac_ext >&5
5742
ca81d7a0 5743
503d2be0 5744fi
ca81d7a0
JD
5745
5746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5747 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5748 break
5749done
ba4481b5 5750fi
ca81d7a0
JD
5751{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5752echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5753case $ac_cv_sys_file_offset_bits in #(
5754 no | unknown) ;;
5755 *)
c0d27fcc 5756cat >>confdefs.h <<_ACEOF
f4988be7 5757#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5758_ACEOF
f053c89f
CY
5759;;
5760esac
503d2be0 5761rm -f conftest*
f053c89f
CY
5762 if test $ac_cv_sys_file_offset_bits = unknown; then
5763 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5764echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5765if test "${ac_cv_sys_large_files+set}" = set; then
5766 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5767else
503d2be0 5768 while :; do
503d2be0 5769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
503d2be0
AS
5775#include <sys/types.h>
5776 /* Check that off_t can represent 2**63 - 1 correctly.
5777 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5778 since some C++ compilers masquerading as C compilers
5779 incorrectly reject 9223372036854775807. */
5780#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5781 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5782 && LARGE_OFF_T % 2147483647 == 1)
5783 ? 1 : -1];
5784int
5785main ()
5786{
ba4481b5 5787
503d2be0
AS
5788 ;
5789 return 0;
5790}
5791_ACEOF
5792rm -f conftest.$ac_objext
ca81d7a0
JD
5793if { (ac_try="$ac_compile"
5794case "(($ac_try" in
5795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5796 *) ac_try_echo=$ac_try;;
5797esac
5798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5799 (eval "$ac_compile") 2>conftest.er1
503d2be0 5800 ac_status=$?
edfaf76d
LK
5801 grep -v '^ *+' conftest.er1 >conftest.err
5802 rm -f conftest.er1
5803 cat conftest.err >&5
c0d27fcc 5804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5805 (exit $ac_status); } && {
5806 test -z "$ac_c_werror_flag" ||
5807 test ! -s conftest.err
5808 } && test -s conftest.$ac_objext; then
5809 ac_cv_sys_large_files=no; break
ba4481b5 5810else
503d2be0 5811 echo "$as_me: failed program was:" >&5
19650fd6
AS
5812sed 's/^/| /' conftest.$ac_ext >&5
5813
ca81d7a0 5814
503d2be0 5815fi
ca81d7a0
JD
5816
5817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5818 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5819/* confdefs.h. */
5820_ACEOF
5821cat confdefs.h >>conftest.$ac_ext
5822cat >>conftest.$ac_ext <<_ACEOF
5823/* end confdefs.h. */
f4988be7 5824#define _LARGE_FILES 1
503d2be0
AS
5825#include <sys/types.h>
5826 /* Check that off_t can represent 2**63 - 1 correctly.
5827 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5828 since some C++ compilers masquerading as C compilers
5829 incorrectly reject 9223372036854775807. */
5830#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5831 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5832 && LARGE_OFF_T % 2147483647 == 1)
5833 ? 1 : -1];
5834int
5835main ()
5836{
f4988be7 5837
503d2be0
AS
5838 ;
5839 return 0;
5840}
5841_ACEOF
5842rm -f conftest.$ac_objext
ca81d7a0
JD
5843if { (ac_try="$ac_compile"
5844case "(($ac_try" in
5845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5846 *) ac_try_echo=$ac_try;;
5847esac
5848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5849 (eval "$ac_compile") 2>conftest.er1
503d2be0 5850 ac_status=$?
edfaf76d
LK
5851 grep -v '^ *+' conftest.er1 >conftest.err
5852 rm -f conftest.er1
5853 cat conftest.err >&5
c0d27fcc 5854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5855 (exit $ac_status); } && {
5856 test -z "$ac_c_werror_flag" ||
5857 test ! -s conftest.err
5858 } && test -s conftest.$ac_objext; then
503d2be0
AS
5859 ac_cv_sys_large_files=1; break
5860else
5861 echo "$as_me: failed program was:" >&5
19650fd6
AS
5862sed 's/^/| /' conftest.$ac_ext >&5
5863
ca81d7a0 5864
503d2be0 5865fi
ca81d7a0
JD
5866
5867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5868 ac_cv_sys_large_files=unknown
503d2be0
AS
5869 break
5870done
ba4481b5 5871fi
ca81d7a0
JD
5872{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5873echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5874case $ac_cv_sys_large_files in #(
5875 no | unknown) ;;
5876 *)
c0d27fcc 5877cat >>confdefs.h <<_ACEOF
f4988be7 5878#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5879_ACEOF
f053c89f
CY
5880;;
5881esac
503d2be0 5882rm -f conftest*
f053c89f 5883 fi
503d2be0 5884fi
ba4481b5 5885
c0d27fcc 5886
439f58ee 5887
55e6d9b2 5888### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5889### be located in either /usr/lib64 or /usr/lib.
5890case "${canonical}" in
55e6d9b2 5891 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5892 if test -d /usr/lib64; then
5893
5894cat >>confdefs.h <<\_ACEOF
55e6d9b2 5895#define HAVE_LIB64_DIR 1
bc5d9888
CY
5896_ACEOF
5897
5898fi
5899esac
5900
439f58ee
JD
5901
5902
5903
2c9dccc9
PJ
5904if test "${with_sound}" != "no"; then
5905 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5906
5907
5908
5909for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5910do
5911as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5912if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5913 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5914echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5915if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5916 echo $ECHO_N "(cached) $ECHO_C" >&6
5917fi
ca81d7a0
JD
5918ac_res=`eval echo '${'$as_ac_Header'}'`
5919 { echo "$as_me:$LINENO: result: $ac_res" >&5
5920echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5921else
5922 # Is the header compilable?
ca81d7a0
JD
5923{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5924echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5925cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5926/* confdefs.h. */
5927_ACEOF
5928cat confdefs.h >>conftest.$ac_ext
5929cat >>conftest.$ac_ext <<_ACEOF
5930/* end confdefs.h. */
c0d27fcc 5931$ac_includes_default
98418dba 5932#include <$ac_header>
503d2be0 5933_ACEOF
c0d27fcc 5934rm -f conftest.$ac_objext
ca81d7a0
JD
5935if { (ac_try="$ac_compile"
5936case "(($ac_try" in
5937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5938 *) ac_try_echo=$ac_try;;
5939esac
5940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5941 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5942 ac_status=$?
edfaf76d
LK
5943 grep -v '^ *+' conftest.er1 >conftest.err
5944 rm -f conftest.er1
5945 cat conftest.err >&5
c0d27fcc 5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5947 (exit $ac_status); } && {
5948 test -z "$ac_c_werror_flag" ||
5949 test ! -s conftest.err
5950 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5951 ac_header_compiler=yes
5952else
5953 echo "$as_me: failed program was:" >&5
19650fd6
AS
5954sed 's/^/| /' conftest.$ac_ext >&5
5955
ca81d7a0 5956 ac_header_compiler=no
c0d27fcc 5957fi
ca81d7a0
JD
5958
5959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5960{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5961echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5962
5963# Is the header present?
ca81d7a0
JD
5964{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5965echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5966cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5967/* confdefs.h. */
5968_ACEOF
5969cat confdefs.h >>conftest.$ac_ext
5970cat >>conftest.$ac_ext <<_ACEOF
5971/* end confdefs.h. */
c0d27fcc
MR
5972#include <$ac_header>
5973_ACEOF
ca81d7a0
JD
5974if { (ac_try="$ac_cpp conftest.$ac_ext"
5975case "(($ac_try" in
5976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5977 *) ac_try_echo=$ac_try;;
5978esac
5979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5980 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5981 ac_status=$?
6bae0ccf 5982 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5983 rm -f conftest.er1
5984 cat conftest.err >&5
c0d27fcc 5985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5986 (exit $ac_status); } >/dev/null && {
5987 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5988 test ! -s conftest.err
5989 }; then
c0d27fcc 5990 ac_header_preproc=yes
f4988be7 5991else
503d2be0 5992 echo "$as_me: failed program was:" >&5
19650fd6
AS
5993sed 's/^/| /' conftest.$ac_ext >&5
5994
c0d27fcc 5995 ac_header_preproc=no
f4988be7 5996fi
ca81d7a0 5997
98418dba 5998rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
5999{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6000echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6001
6002# So? What about this header?
edfaf76d
LK
6003case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6004 yes:no: )
c0d27fcc
MR
6005 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6006echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6007 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6008echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6009 ac_header_preproc=yes
19650fd6 6010 ;;
edfaf76d 6011 no:yes:* )
c0d27fcc
MR
6012 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6013echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6014 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6015echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6016 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6017echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6018 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6019echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6020 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6021echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6022 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6023echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6024
19650fd6 6025 ;;
c0d27fcc 6026esac
ca81d7a0
JD
6027{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6028echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6029if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6030 echo $ECHO_N "(cached) $ECHO_C" >&6
6031else
edfaf76d 6032 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6033fi
ca81d7a0
JD
6034ac_res=`eval echo '${'$as_ac_Header'}'`
6035 { echo "$as_me:$LINENO: result: $ac_res" >&5
6036echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6037
6038fi
98418dba 6039if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6040 cat >>confdefs.h <<_ACEOF
98418dba 6041#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6042_ACEOF
f4988be7
GM
6043
6044fi
c0d27fcc 6045
98418dba
CW
6046done
6047
6048 # Emulation library used on NetBSD.
ca81d7a0
JD
6049 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6050echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6051if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6052 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6053else
98418dba
CW
6054 ac_check_lib_save_LIBS=$LIBS
6055LIBS="-lossaudio $LIBS"
6056cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6057/* confdefs.h. */
6058_ACEOF
6059cat confdefs.h >>conftest.$ac_ext
6060cat >>conftest.$ac_ext <<_ACEOF
6061/* end confdefs.h. */
98418dba 6062
ca81d7a0
JD
6063/* Override any GCC internal prototype to avoid an error.
6064 Use char because int might match the return type of a GCC
6065 builtin and then its argument prototype would still apply. */
98418dba
CW
6066#ifdef __cplusplus
6067extern "C"
f4988be7 6068#endif
98418dba 6069char _oss_ioctl ();
503d2be0
AS
6070int
6071main ()
6072{
ca81d7a0 6073return _oss_ioctl ();
503d2be0
AS
6074 ;
6075 return 0;
6076}
6077_ACEOF
98418dba 6078rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6079if { (ac_try="$ac_link"
6080case "(($ac_try" in
6081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6082 *) ac_try_echo=$ac_try;;
6083esac
6084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6085 (eval "$ac_link") 2>conftest.er1
503d2be0 6086 ac_status=$?
edfaf76d
LK
6087 grep -v '^ *+' conftest.er1 >conftest.err
6088 rm -f conftest.er1
6089 cat conftest.err >&5
c0d27fcc 6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6091 (exit $ac_status); } && {
6092 test -z "$ac_c_werror_flag" ||
6093 test ! -s conftest.err
6094 } && test -s conftest$ac_exeext &&
6095 $as_test_x conftest$ac_exeext; then
98418dba 6096 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6097else
503d2be0 6098 echo "$as_me: failed program was:" >&5
19650fd6
AS
6099sed 's/^/| /' conftest.$ac_ext >&5
6100
ca81d7a0 6101 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6102fi
ca81d7a0 6103
f053c89f 6104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6105 conftest$ac_exeext conftest.$ac_ext
98418dba 6106LIBS=$ac_check_lib_save_LIBS
f4988be7 6107fi
ca81d7a0
JD
6108{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6109echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6110if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6111 LIBSOUND=-lossaudio
6112else
6113 LIBSOUND=
6114fi
6115
c0d27fcc 6116
439f58ee
JD
6117
6118 ALSA_REQUIRED=1.0.0
6119 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6120
6121 succeeded=no
6122
00b9c927 6123 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6124set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6125{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6126echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6127if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6128 echo $ECHO_N "(cached) $ECHO_C" >&6
6129else
6130 case $PKG_CONFIG in
6131 [\\/]* | ?:[\\/]*)
6132 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6133 ;;
6134 *)
6135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH
6137do
6138 IFS=$as_save_IFS
6139 test -z "$as_dir" && as_dir=.
6140 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6141 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6142 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6143 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6144 break 2
6145 fi
6146done
6147done
ca81d7a0 6148IFS=$as_save_IFS
439f58ee
JD
6149
6150 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6151 ;;
6152esac
6153fi
6154PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6155if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6156 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6157echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6158else
ca81d7a0
JD
6159 { echo "$as_me:$LINENO: result: no" >&5
6160echo "${ECHO_T}no" >&6; }
439f58ee
JD
6161fi
6162
ca81d7a0 6163
439f58ee
JD
6164
6165 if test "$PKG_CONFIG" = "no" ; then
6166 HAVE_ALSA=no
6167 else
6168 PKG_CONFIG_MIN_VERSION=0.9.0
6169 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6170 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6171echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6172
67db6aa2 6173 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6174 { echo "$as_me:$LINENO: result: yes" >&5
6175echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6176 succeeded=yes
6177
ca81d7a0
JD
6178 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6179echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6180 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6181 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6182echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6183
ca81d7a0
JD
6184 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6185echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6186 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6187 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6188echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6189 else
ca81d7a0
JD
6190 { echo "$as_me:$LINENO: result: no" >&5
6191echo "${ECHO_T}no" >&6; }
439f58ee
JD
6192 ALSA_CFLAGS=""
6193 ALSA_LIBS=""
6194 ## If we have a custom action on failure, don't print errors, but
6195 ## do set a variable so people can do so.
6196 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6197
6198 fi
6199
6200
6201
6202 else
6203 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6204 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6205 fi
6206 fi
6207
6208 if test $succeeded = yes; then
6209 HAVE_ALSA=yes
6210 else
6211 HAVE_ALSA=no
6212 fi
6213
6214 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6215 SAVE_CFLAGS="$CFLAGS"
6216 SAVE_LDFLAGS="$LDFLAGS"
6217 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6218 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6219 cat >conftest.$ac_ext <<_ACEOF
6220/* confdefs.h. */
6221_ACEOF
6222cat confdefs.h >>conftest.$ac_ext
6223cat >>conftest.$ac_ext <<_ACEOF
6224/* end confdefs.h. */
6225#include <asoundlib.h>
6226int
6227main ()
6228{
6229snd_lib_error_set_handler (0);
6230 ;
6231 return 0;
6232}
6233_ACEOF
6234rm -f conftest.$ac_objext
6235if { (ac_try="$ac_compile"
6236case "(($ac_try" in
6237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6238 *) ac_try_echo=$ac_try;;
6239esac
6240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6241 (eval "$ac_compile") 2>conftest.er1
6242 ac_status=$?
6243 grep -v '^ *+' conftest.er1 >conftest.err
6244 rm -f conftest.er1
6245 cat conftest.err >&5
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6247 (exit $ac_status); } && {
6248 test -z "$ac_c_werror_flag" ||
6249 test ! -s conftest.err
6250 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6251 emacs_alsa_normal=yes
6252else
6253 echo "$as_me: failed program was:" >&5
6254sed 's/^/| /' conftest.$ac_ext >&5
6255
6256 emacs_alsa_normal=no
6257fi
6258
6259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6260 if test "$emacs_alsa_normal" != yes; then
6261 cat >conftest.$ac_ext <<_ACEOF
6262/* confdefs.h. */
6263_ACEOF
6264cat confdefs.h >>conftest.$ac_ext
6265cat >>conftest.$ac_ext <<_ACEOF
6266/* end confdefs.h. */
6267#include <alsa/asoundlib.h>
6268int
6269main ()
6270{
6271snd_lib_error_set_handler (0);
6272 ;
6273 return 0;
6274}
6275_ACEOF
6276rm -f conftest.$ac_objext
6277if { (ac_try="$ac_compile"
6278case "(($ac_try" in
6279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6280 *) ac_try_echo=$ac_try;;
6281esac
6282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6283 (eval "$ac_compile") 2>conftest.er1
6284 ac_status=$?
6285 grep -v '^ *+' conftest.er1 >conftest.err
6286 rm -f conftest.er1
6287 cat conftest.err >&5
6288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6289 (exit $ac_status); } && {
6290 test -z "$ac_c_werror_flag" ||
6291 test ! -s conftest.err
6292 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6293 emacs_alsa_subdir=yes
6294else
6295 echo "$as_me: failed program was:" >&5
6296sed 's/^/| /' conftest.$ac_ext >&5
6297
6298 emacs_alsa_subdir=no
6299fi
6300
6301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6302 if test "$emacs_alsa_subdir" != yes; then
6303 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6304echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6305 { (exit 1); exit 1; }; }
6306 fi
6307 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6308 fi
6309
6310 CFLAGS="$SAVE_CFLAGS"
6311 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6312 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6313 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6314
6315cat >>confdefs.h <<\_ACEOF
6316#define HAVE_ALSA 1
6317_ACEOF
6318
6319 fi
6320
f4988be7 6321fi
c0d27fcc
MR
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
22044edf
DL
6340
6341
973a76b1 6342
cffcede7 6343
551ffc27 6344
226e2359 6345
c0d27fcc 6346
f4988be7 6347
98418dba
CW
6348for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6349 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6350 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6351 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6352 sys/utsname.h pwd.h
98418dba
CW
6353do
6354as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6356 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6358if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6359 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6360fi
ca81d7a0
JD
6361ac_res=`eval echo '${'$as_ac_Header'}'`
6362 { echo "$as_me:$LINENO: result: $ac_res" >&5
6363echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6364else
c0d27fcc 6365 # Is the header compilable?
ca81d7a0
JD
6366{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6367echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6368cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6369/* confdefs.h. */
6370_ACEOF
6371cat confdefs.h >>conftest.$ac_ext
6372cat >>conftest.$ac_ext <<_ACEOF
6373/* end confdefs.h. */
c0d27fcc
MR
6374$ac_includes_default
6375#include <$ac_header>
6376_ACEOF
6377rm -f conftest.$ac_objext
ca81d7a0
JD
6378if { (ac_try="$ac_compile"
6379case "(($ac_try" in
6380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6381 *) ac_try_echo=$ac_try;;
6382esac
6383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6384 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6385 ac_status=$?
edfaf76d
LK
6386 grep -v '^ *+' conftest.er1 >conftest.err
6387 rm -f conftest.er1
6388 cat conftest.err >&5
c0d27fcc 6389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6390 (exit $ac_status); } && {
6391 test -z "$ac_c_werror_flag" ||
6392 test ! -s conftest.err
6393 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6394 ac_header_compiler=yes
6395else
6396 echo "$as_me: failed program was:" >&5
19650fd6
AS
6397sed 's/^/| /' conftest.$ac_ext >&5
6398
ca81d7a0 6399 ac_header_compiler=no
c0d27fcc 6400fi
ca81d7a0
JD
6401
6402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6403{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6404echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6405
6406# Is the header present?
ca81d7a0
JD
6407{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6408echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6409cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6410/* confdefs.h. */
6411_ACEOF
6412cat confdefs.h >>conftest.$ac_ext
6413cat >>conftest.$ac_ext <<_ACEOF
6414/* end confdefs.h. */
98418dba 6415#include <$ac_header>
503d2be0 6416_ACEOF
ca81d7a0
JD
6417if { (ac_try="$ac_cpp conftest.$ac_ext"
6418case "(($ac_try" in
6419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6420 *) ac_try_echo=$ac_try;;
6421esac
6422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6424 ac_status=$?
6bae0ccf 6425 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6426 rm -f conftest.er1
6427 cat conftest.err >&5
c0d27fcc 6428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6429 (exit $ac_status); } >/dev/null && {
6430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6431 test ! -s conftest.err
6432 }; then
c0d27fcc 6433 ac_header_preproc=yes
34ec9ebe 6434else
503d2be0 6435 echo "$as_me: failed program was:" >&5
19650fd6
AS
6436sed 's/^/| /' conftest.$ac_ext >&5
6437
c0d27fcc 6438 ac_header_preproc=no
34ec9ebe 6439fi
ca81d7a0 6440
98418dba 6441rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6442{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6443echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6444
6445# So? What about this header?
edfaf76d
LK
6446case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6447 yes:no: )
c0d27fcc
MR
6448 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6449echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6450 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6451echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6452 ac_header_preproc=yes
19650fd6 6453 ;;
edfaf76d 6454 no:yes:* )
c0d27fcc
MR
6455 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6456echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6457 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6458echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6459 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6460echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6462echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6464echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6465 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6466echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6467
19650fd6 6468 ;;
c0d27fcc 6469esac
ca81d7a0
JD
6470{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6471echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6472if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6473 echo $ECHO_N "(cached) $ECHO_C" >&6
6474else
edfaf76d 6475 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6476fi
ca81d7a0
JD
6477ac_res=`eval echo '${'$as_ac_Header'}'`
6478 { echo "$as_me:$LINENO: result: $ac_res" >&5
6479echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6480
6481fi
98418dba 6482if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6483 cat >>confdefs.h <<_ACEOF
98418dba 6484#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6485_ACEOF
34ec9ebe 6486
98418dba 6487fi
c0d27fcc 6488
98418dba
CW
6489done
6490
22044edf 6491
ca81d7a0
JD
6492{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6493echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6494cat >conftest.$ac_ext <<_ACEOF
6495/* confdefs.h. */
6496_ACEOF
6497cat confdefs.h >>conftest.$ac_ext
6498cat >>conftest.$ac_ext <<_ACEOF
6499/* end confdefs.h. */
6500#include <sys/personality.h>
6501int
6502main ()
6503{
6504personality (PER_LINUX32)
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509rm -f conftest.$ac_objext
ca81d7a0
JD
6510if { (ac_try="$ac_compile"
6511case "(($ac_try" in
6512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6513 *) ac_try_echo=$ac_try;;
6514esac
6515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6516 (eval "$ac_compile") 2>conftest.er1
f17e308a 6517 ac_status=$?
edfaf76d
LK
6518 grep -v '^ *+' conftest.er1 >conftest.err
6519 rm -f conftest.er1
6520 cat conftest.err >&5
f17e308a 6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6522 (exit $ac_status); } && {
6523 test -z "$ac_c_werror_flag" ||
6524 test ! -s conftest.err
6525 } && test -s conftest.$ac_objext; then
f17e308a
JD
6526 emacs_cv_personality_linux32=yes
6527else
6528 echo "$as_me: failed program was:" >&5
6529sed 's/^/| /' conftest.$ac_ext >&5
6530
ca81d7a0 6531 emacs_cv_personality_linux32=no
f17e308a 6532fi
ca81d7a0
JD
6533
6534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6535{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6536echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6537
6538if test $emacs_cv_personality_linux32 = yes; then
6539
6540cat >>confdefs.h <<\_ACEOF
6541#define HAVE_PERSONALITY_LINUX32 1
6542_ACEOF
6543
6544fi
6545
6546
22044edf
DL
6547for ac_header in term.h
6548do
6549as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6550{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6551echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6552if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6553 echo $ECHO_N "(cached) $ECHO_C" >&6
6554else
6555 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6556/* confdefs.h. */
6557_ACEOF
6558cat confdefs.h >>conftest.$ac_ext
6559cat >>conftest.$ac_ext <<_ACEOF
6560/* end confdefs.h. */
22044edf
DL
6561#include <$ac_header>
6562_ACEOF
ca81d7a0
JD
6563if { (ac_try="$ac_cpp conftest.$ac_ext"
6564case "(($ac_try" in
6565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6566 *) ac_try_echo=$ac_try;;
6567esac
6568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6570 ac_status=$?
6571 grep -v '^ *+' conftest.er1 >conftest.err
6572 rm -f conftest.er1
6573 cat conftest.err >&5
6574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6575 (exit $ac_status); } >/dev/null && {
6576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6577 test ! -s conftest.err
6578 }; then
22044edf
DL
6579 eval "$as_ac_Header=yes"
6580else
6581 echo "$as_me: failed program was:" >&5
19650fd6
AS
6582sed 's/^/| /' conftest.$ac_ext >&5
6583
22044edf
DL
6584 eval "$as_ac_Header=no"
6585fi
ca81d7a0 6586
22044edf
DL
6587rm -f conftest.err conftest.$ac_ext
6588fi
ca81d7a0
JD
6589ac_res=`eval echo '${'$as_ac_Header'}'`
6590 { echo "$as_me:$LINENO: result: $ac_res" >&5
6591echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6592if test `eval echo '${'$as_ac_Header'}'` = yes; then
6593 cat >>confdefs.h <<_ACEOF
6594#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6595_ACEOF
6596
6597fi
6598
6599done
6600
ca81d7a0
JD
6601{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6602echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6603if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6604 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6605else
503d2be0 6606 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6607/* confdefs.h. */
6608_ACEOF
6609cat confdefs.h >>conftest.$ac_ext
6610cat >>conftest.$ac_ext <<_ACEOF
6611/* end confdefs.h. */
98418dba
CW
6612#include <stdlib.h>
6613#include <stdarg.h>
6614#include <string.h>
6615#include <float.h>
6616
19650fd6
AS
6617int
6618main ()
6619{
6620
6621 ;
6622 return 0;
6623}
98418dba 6624_ACEOF
19650fd6 6625rm -f conftest.$ac_objext
ca81d7a0
JD
6626if { (ac_try="$ac_compile"
6627case "(($ac_try" in
6628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6629 *) ac_try_echo=$ac_try;;
6630esac
6631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6632 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6633 ac_status=$?
edfaf76d
LK
6634 grep -v '^ *+' conftest.er1 >conftest.err
6635 rm -f conftest.er1
6636 cat conftest.err >&5
cd958eb3 6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6638 (exit $ac_status); } && {
6639 test -z "$ac_c_werror_flag" ||
6640 test ! -s conftest.err
6641 } && test -s conftest.$ac_objext; then
98418dba 6642 ac_cv_header_stdc=yes
ba4481b5 6643else
503d2be0 6644 echo "$as_me: failed program was:" >&5
19650fd6
AS
6645sed 's/^/| /' conftest.$ac_ext >&5
6646
ca81d7a0 6647 ac_cv_header_stdc=no
ba4481b5 6648fi
ca81d7a0
JD
6649
6650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6651
6652if test $ac_cv_header_stdc = yes; then
6653 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6654 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6655/* confdefs.h. */
6656_ACEOF
6657cat confdefs.h >>conftest.$ac_ext
6658cat >>conftest.$ac_ext <<_ACEOF
6659/* end confdefs.h. */
98418dba
CW
6660#include <string.h>
6661
6662_ACEOF
6663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6664 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6665 :
6666else
6667 ac_cv_header_stdc=no
ba4481b5 6668fi
98418dba 6669rm -f conftest*
ba4481b5
DL
6670
6671fi
6672
98418dba
CW
6673if test $ac_cv_header_stdc = yes; then
6674 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6675 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6676/* confdefs.h. */
6677_ACEOF
6678cat confdefs.h >>conftest.$ac_ext
6679cat >>conftest.$ac_ext <<_ACEOF
6680/* end confdefs.h. */
98418dba
CW
6681#include <stdlib.h>
6682
6683_ACEOF
6684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6685 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6686 :
6687else
6688 ac_cv_header_stdc=no
6689fi
6690rm -f conftest*
6691
6692fi
6693
6694if test $ac_cv_header_stdc = yes; then
6695 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6696 if test "$cross_compiling" = yes; then
6697 :
d42122a3 6698else
503d2be0 6699 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6700/* confdefs.h. */
6701_ACEOF
6702cat confdefs.h >>conftest.$ac_ext
6703cat >>conftest.$ac_ext <<_ACEOF
6704/* end confdefs.h. */
98418dba 6705#include <ctype.h>
ca81d7a0 6706#include <stdlib.h>
98418dba
CW
6707#if ((' ' & 0x0FF) == 0x020)
6708# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6709# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6710#else
19650fd6 6711# define ISLOWER(c) \
edfaf76d
LK
6712 (('a' <= (c) && (c) <= 'i') \
6713 || ('j' <= (c) && (c) <= 'r') \
6714 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6715# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6716#endif
6717
6718#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6719int
6720main ()
6721{
98418dba
CW
6722 int i;
6723 for (i = 0; i < 256; i++)
6724 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6725 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6726 return 2;
6727 return 0;
503d2be0
AS
6728}
6729_ACEOF
98418dba 6730rm -f conftest$ac_exeext
ca81d7a0
JD
6731if { (ac_try="$ac_link"
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_link") 2>&5
503d2be0 6738 ac_status=$?
c0d27fcc 6739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6740 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6741 { (case "(($ac_try" in
6742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6743 *) ac_try_echo=$ac_try;;
6744esac
6745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6746 (eval "$ac_try") 2>&5
503d2be0 6747 ac_status=$?
c0d27fcc 6748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6749 (exit $ac_status); }; }; then
98418dba 6750 :
d42122a3 6751else
98418dba
CW
6752 echo "$as_me: program exited with status $ac_status" >&5
6753echo "$as_me: failed program was:" >&5
19650fd6
AS
6754sed 's/^/| /' conftest.$ac_ext >&5
6755
c0d27fcc 6756( exit $ac_status )
98418dba 6757ac_cv_header_stdc=no
d42122a3 6758fi
ca81d7a0 6759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6760fi
ca81d7a0
JD
6761
6762
98418dba
CW
6763fi
6764fi
ca81d7a0
JD
6765{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6766echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6767if test $ac_cv_header_stdc = yes; then
6768
c0d27fcc 6769cat >>confdefs.h <<\_ACEOF
98418dba 6770#define STDC_HEADERS 1
c0d27fcc 6771_ACEOF
d42122a3
DL
6772
6773fi
6774
ca81d7a0
JD
6775{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6776echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6777if test "${ac_cv_header_time+set}" = set; then
503d2be0 6778 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6779else
503d2be0 6780 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6781/* confdefs.h. */
6782_ACEOF
6783cat confdefs.h >>conftest.$ac_ext
6784cat >>conftest.$ac_ext <<_ACEOF
6785/* end confdefs.h. */
ba4481b5 6786#include <sys/types.h>
98418dba 6787#include <sys/time.h>
ba4481b5 6788#include <time.h>
503d2be0
AS
6789
6790int
6791main ()
6792{
98418dba
CW
6793if ((struct tm *) 0)
6794return 0;
503d2be0
AS
6795 ;
6796 return 0;
6797}
6798_ACEOF
6799rm -f conftest.$ac_objext
ca81d7a0
JD
6800if { (ac_try="$ac_compile"
6801case "(($ac_try" in
6802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6803 *) ac_try_echo=$ac_try;;
6804esac
6805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6806 (eval "$ac_compile") 2>conftest.er1
503d2be0 6807 ac_status=$?
edfaf76d
LK
6808 grep -v '^ *+' conftest.er1 >conftest.err
6809 rm -f conftest.er1
6810 cat conftest.err >&5
c0d27fcc 6811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6812 (exit $ac_status); } && {
6813 test -z "$ac_c_werror_flag" ||
6814 test ! -s conftest.err
6815 } && test -s conftest.$ac_objext; then
98418dba 6816 ac_cv_header_time=yes
ba4481b5 6817else
503d2be0 6818 echo "$as_me: failed program was:" >&5
19650fd6
AS
6819sed 's/^/| /' conftest.$ac_ext >&5
6820
ca81d7a0 6821 ac_cv_header_time=no
ba4481b5 6822fi
ca81d7a0
JD
6823
6824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6825fi
ca81d7a0
JD
6826{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6827echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6828if test $ac_cv_header_time = yes; then
503d2be0 6829
c0d27fcc 6830cat >>confdefs.h <<\_ACEOF
98418dba 6831#define TIME_WITH_SYS_TIME 1
c0d27fcc 6832_ACEOF
ba4481b5
DL
6833
6834fi
6835
ca81d7a0
JD
6836{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6837echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6838if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6839 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6840else
503d2be0 6841 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6842/* confdefs.h. */
6843_ACEOF
6844cat confdefs.h >>conftest.$ac_ext
6845cat >>conftest.$ac_ext <<_ACEOF
6846/* end confdefs.h. */
cd958eb3
MB
6847$ac_includes_default
6848int
6849main ()
6850{
6851#ifndef sys_siglist
f053c89f 6852 (void) sys_siglist;
98418dba 6853#endif
503d2be0 6854
cd958eb3
MB
6855 ;
6856 return 0;
6857}
6858_ACEOF
6859rm -f conftest.$ac_objext
ca81d7a0
JD
6860if { (ac_try="$ac_compile"
6861case "(($ac_try" in
6862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6863 *) ac_try_echo=$ac_try;;
6864esac
6865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6866 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6867 ac_status=$?
edfaf76d
LK
6868 grep -v '^ *+' conftest.er1 >conftest.err
6869 rm -f conftest.er1
6870 cat conftest.err >&5
cd958eb3 6871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6872 (exit $ac_status); } && {
6873 test -z "$ac_c_werror_flag" ||
6874 test ! -s conftest.err
6875 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6876 ac_cv_have_decl_sys_siglist=yes
6877else
6878 echo "$as_me: failed program was:" >&5
19650fd6
AS
6879sed 's/^/| /' conftest.$ac_ext >&5
6880
ca81d7a0 6881 ac_cv_have_decl_sys_siglist=no
cd958eb3 6882fi
ca81d7a0
JD
6883
6884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6885fi
ca81d7a0
JD
6886{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6887echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6888if test $ac_cv_have_decl_sys_siglist = yes; then
6889
6890cat >>confdefs.h <<_ACEOF
6891#define HAVE_DECL_SYS_SIGLIST 1
6892_ACEOF
6893
6894
6895else
6896 cat >>confdefs.h <<_ACEOF
6897#define HAVE_DECL_SYS_SIGLIST 0
6898_ACEOF
6899
6900
6901fi
6902
6903
6904if test $ac_cv_have_decl_sys_siglist != yes; then
6905 # For Tru64, at least:
ca81d7a0
JD
6906 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6907echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6908if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6909 echo $ECHO_N "(cached) $ECHO_C" >&6
6910else
6911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6912/* confdefs.h. */
6913_ACEOF
6914cat confdefs.h >>conftest.$ac_ext
6915cat >>conftest.$ac_ext <<_ACEOF
6916/* end confdefs.h. */
cd958eb3 6917$ac_includes_default
503d2be0
AS
6918int
6919main ()
6920{
cd958eb3 6921#ifndef __sys_siglist
f053c89f 6922 (void) __sys_siglist;
cd958eb3
MB
6923#endif
6924
503d2be0
AS
6925 ;
6926 return 0;
6927}
6928_ACEOF
6929rm -f conftest.$ac_objext
ca81d7a0
JD
6930if { (ac_try="$ac_compile"
6931case "(($ac_try" in
6932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6933 *) ac_try_echo=$ac_try;;
6934esac
6935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6936 (eval "$ac_compile") 2>conftest.er1
503d2be0 6937 ac_status=$?
edfaf76d
LK
6938 grep -v '^ *+' conftest.er1 >conftest.err
6939 rm -f conftest.er1
6940 cat conftest.err >&5
c0d27fcc 6941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6942 (exit $ac_status); } && {
6943 test -z "$ac_c_werror_flag" ||
6944 test ! -s conftest.err
6945 } && test -s conftest.$ac_objext; then
cd958eb3 6946 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6947else
503d2be0 6948 echo "$as_me: failed program was:" >&5
19650fd6
AS
6949sed 's/^/| /' conftest.$ac_ext >&5
6950
ca81d7a0 6951 ac_cv_have_decl___sys_siglist=no
ba4481b5 6952fi
ca81d7a0
JD
6953
6954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6955fi
ca81d7a0
JD
6956{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6957echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6958if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6959
cd958eb3
MB
6960cat >>confdefs.h <<_ACEOF
6961#define HAVE_DECL___SYS_SIGLIST 1
6962_ACEOF
6963
6964
6965else
6966 cat >>confdefs.h <<_ACEOF
6967#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6968_ACEOF
503d2be0 6969
cd958eb3 6970
ba4481b5
DL
6971fi
6972
cd958eb3
MB
6973
6974 if test $ac_cv_have_decl___sys_siglist = yes; then
6975
6976cat >>confdefs.h <<\_ACEOF
6977#define sys_siglist __sys_siglist
6978_ACEOF
6979
6980 fi
6981fi
ca81d7a0
JD
6982{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6983echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6984if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6985 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6986else
503d2be0 6987 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
98418dba
CW
6993#include <sys/types.h>
6994#include <sys/wait.h>
6995#ifndef WEXITSTATUS
ca81d7a0 6996# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
6997#endif
6998#ifndef WIFEXITED
6999# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7000#endif
503d2be0
AS
7001
7002int
7003main ()
7004{
98418dba
CW
7005 int s;
7006 wait (&s);
7007 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7008 ;
7009 return 0;
7010}
7011_ACEOF
98418dba 7012rm -f conftest.$ac_objext
ca81d7a0
JD
7013if { (ac_try="$ac_compile"
7014case "(($ac_try" in
7015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7016 *) ac_try_echo=$ac_try;;
7017esac
7018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7019 (eval "$ac_compile") 2>conftest.er1
503d2be0 7020 ac_status=$?
edfaf76d
LK
7021 grep -v '^ *+' conftest.er1 >conftest.err
7022 rm -f conftest.er1
7023 cat conftest.err >&5
c0d27fcc 7024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7025 (exit $ac_status); } && {
7026 test -z "$ac_c_werror_flag" ||
7027 test ! -s conftest.err
7028 } && test -s conftest.$ac_objext; then
98418dba 7029 ac_cv_header_sys_wait_h=yes
ba4481b5 7030else
503d2be0 7031 echo "$as_me: failed program was:" >&5
19650fd6
AS
7032sed 's/^/| /' conftest.$ac_ext >&5
7033
ca81d7a0 7034 ac_cv_header_sys_wait_h=no
ba4481b5 7035fi
ca81d7a0
JD
7036
7037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7038fi
ca81d7a0
JD
7039{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7040echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7041if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7042
c0d27fcc 7043cat >>confdefs.h <<\_ACEOF
98418dba 7044#define HAVE_SYS_WAIT_H 1
c0d27fcc 7045_ACEOF
ba4481b5 7046
ba4481b5
DL
7047fi
7048
c0d27fcc 7049
ca81d7a0
JD
7050{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7051echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7052if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7053 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7054else
503d2be0 7055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7056/* confdefs.h. */
7057_ACEOF
7058cat confdefs.h >>conftest.$ac_ext
7059cat >>conftest.$ac_ext <<_ACEOF
7060/* end confdefs.h. */
98418dba
CW
7061#ifdef TIME_WITH_SYS_TIME
7062#include <sys/time.h>
7063#include <time.h>
7064#else
7065#ifdef HAVE_SYS_TIME_H
7066#include <sys/time.h>
7067#else
1113b624 7068#include <time.h>
98418dba
CW
7069#endif
7070#endif
7071#ifdef HAVE_UTIME_H
7072#include <utime.h>
7073#endif
503d2be0
AS
7074int
7075main ()
7076{
98418dba 7077static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7078 ;
7079 return 0;
7080}
7081_ACEOF
98418dba 7082rm -f conftest.$ac_objext
ca81d7a0
JD
7083if { (ac_try="$ac_compile"
7084case "(($ac_try" in
7085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7086 *) ac_try_echo=$ac_try;;
7087esac
7088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7089 (eval "$ac_compile") 2>conftest.er1
503d2be0 7090 ac_status=$?
edfaf76d
LK
7091 grep -v '^ *+' conftest.er1 >conftest.err
7092 rm -f conftest.er1
7093 cat conftest.err >&5
c0d27fcc 7094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7095 (exit $ac_status); } && {
7096 test -z "$ac_c_werror_flag" ||
7097 test ! -s conftest.err
7098 } && test -s conftest.$ac_objext; then
98418dba 7099 emacs_cv_struct_utimbuf=yes
1113b624 7100else
503d2be0 7101 echo "$as_me: failed program was:" >&5
19650fd6
AS
7102sed 's/^/| /' conftest.$ac_ext >&5
7103
ca81d7a0 7104 emacs_cv_struct_utimbuf=no
1113b624 7105fi
ca81d7a0
JD
7106
7107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7108fi
ca81d7a0
JD
7109{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7110echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7111if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7112
c0d27fcc 7113cat >>confdefs.h <<\_ACEOF
98418dba 7114#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7115_ACEOF
1113b624
PE
7116
7117fi
ba4481b5 7118
ca81d7a0
JD
7119{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7120echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7121if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7123else
98418dba 7124 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7125/* confdefs.h. */
7126_ACEOF
7127cat confdefs.h >>conftest.$ac_ext
7128cat >>conftest.$ac_ext <<_ACEOF
7129/* end confdefs.h. */
7397acc4 7130#include <sys/types.h>
98418dba 7131#include <signal.h>
98418dba 7132
503d2be0
AS
7133int
7134main ()
7135{
ca81d7a0 7136return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7137 ;
7138 return 0;
7139}
7140_ACEOF
98418dba 7141rm -f conftest.$ac_objext
ca81d7a0
JD
7142if { (ac_try="$ac_compile"
7143case "(($ac_try" in
7144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7145 *) ac_try_echo=$ac_try;;
7146esac
7147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7148 (eval "$ac_compile") 2>conftest.er1
503d2be0 7149 ac_status=$?
edfaf76d
LK
7150 grep -v '^ *+' conftest.er1 >conftest.err
7151 rm -f conftest.er1
7152 cat conftest.err >&5
c0d27fcc 7153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7154 (exit $ac_status); } && {
7155 test -z "$ac_c_werror_flag" ||
7156 test ! -s conftest.err
7157 } && test -s conftest.$ac_objext; then
ca81d7a0 7158 ac_cv_type_signal=int
503d2be0
AS
7159else
7160 echo "$as_me: failed program was:" >&5
19650fd6
AS
7161sed 's/^/| /' conftest.$ac_ext >&5
7162
ca81d7a0 7163 ac_cv_type_signal=void
503d2be0 7164fi
ca81d7a0
JD
7165
7166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7167fi
ca81d7a0
JD
7168{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7169echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7170
c0d27fcc 7171cat >>confdefs.h <<_ACEOF
98418dba 7172#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7173_ACEOF
7174
503d2be0 7175
c0d27fcc 7176
ca81d7a0
JD
7177{ echo "$as_me:$LINENO: checking for speed_t" >&5
7178echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7179if test "${emacs_cv_speed_t+set}" = set; then
7180 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7181else
98418dba 7182 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7183/* confdefs.h. */
7184_ACEOF
7185cat confdefs.h >>conftest.$ac_ext
7186cat >>conftest.$ac_ext <<_ACEOF
7187/* end confdefs.h. */
98418dba 7188#include <termios.h>
98418dba
CW
7189int
7190main ()
7191{
7192speed_t x = 1;
7193 ;
7194 return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext
ca81d7a0
JD
7198if { (ac_try="$ac_compile"
7199case "(($ac_try" in
7200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7201 *) ac_try_echo=$ac_try;;
7202esac
7203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7204 (eval "$ac_compile") 2>conftest.er1
98418dba 7205 ac_status=$?
edfaf76d
LK
7206 grep -v '^ *+' conftest.er1 >conftest.err
7207 rm -f conftest.er1
7208 cat conftest.err >&5
c0d27fcc 7209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7210 (exit $ac_status); } && {
7211 test -z "$ac_c_werror_flag" ||
7212 test ! -s conftest.err
7213 } && test -s conftest.$ac_objext; then
98418dba
CW
7214 emacs_cv_speed_t=yes
7215else
7216 echo "$as_me: failed program was:" >&5
19650fd6
AS
7217sed 's/^/| /' conftest.$ac_ext >&5
7218
ca81d7a0 7219 emacs_cv_speed_t=no
98418dba 7220fi
ca81d7a0
JD
7221
7222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7223fi
ca81d7a0
JD
7224{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7225echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7226if test $emacs_cv_speed_t = yes; then
b936fae4 7227
c0d27fcc 7228cat >>confdefs.h <<\_ACEOF
98418dba 7229#define HAVE_SPEED_T 1
c0d27fcc 7230_ACEOF
98418dba 7231
7397acc4
DL
7232fi
7233
ca81d7a0
JD
7234{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7235echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7236if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7237 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7238else
503d2be0 7239 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
98418dba
CW
7245#ifdef TIME_WITH_SYS_TIME
7246#include <sys/time.h>
7247#include <time.h>
7248#else
7249#ifdef HAVE_SYS_TIME_H
7250#include <sys/time.h>
7251#else
7252#include <time.h>
7253#endif
7254#endif
503d2be0
AS
7255int
7256main ()
7257{
98418dba 7258static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7259 ;
7260 return 0;
7261}
7262_ACEOF
7263rm -f conftest.$ac_objext
ca81d7a0
JD
7264if { (ac_try="$ac_compile"
7265case "(($ac_try" in
7266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7267 *) ac_try_echo=$ac_try;;
7268esac
7269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7270 (eval "$ac_compile") 2>conftest.er1
503d2be0 7271 ac_status=$?
edfaf76d
LK
7272 grep -v '^ *+' conftest.er1 >conftest.err
7273 rm -f conftest.er1
7274 cat conftest.err >&5
c0d27fcc 7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7276 (exit $ac_status); } && {
7277 test -z "$ac_c_werror_flag" ||
7278 test ! -s conftest.err
7279 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7280 emacs_cv_struct_timeval=yes
7281else
503d2be0 7282 echo "$as_me: failed program was:" >&5
19650fd6
AS
7283sed 's/^/| /' conftest.$ac_ext >&5
7284
ca81d7a0 7285 emacs_cv_struct_timeval=no
7397acc4 7286fi
ca81d7a0
JD
7287
7288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7289fi
ca81d7a0
JD
7290{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7291echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7292HAVE_TIMEVAL=$emacs_cv_struct_timeval
7293if test $emacs_cv_struct_timeval = yes; then
b936fae4 7294
c0d27fcc 7295cat >>confdefs.h <<\_ACEOF
98418dba 7296#define HAVE_TIMEVAL 1
c0d27fcc 7297_ACEOF
7397acc4
DL
7298
7299fi
7300
ca81d7a0
JD
7301{ echo "$as_me:$LINENO: checking for struct exception" >&5
7302echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7303if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7304 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7305else
503d2be0 7306 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7307/* confdefs.h. */
7308_ACEOF
7309cat confdefs.h >>conftest.$ac_ext
7310cat >>conftest.$ac_ext <<_ACEOF
7311/* end confdefs.h. */
98418dba 7312#include <math.h>
503d2be0
AS
7313int
7314main ()
7315{
98418dba 7316static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7317 ;
7318 return 0;
ba4481b5 7319}
503d2be0
AS
7320_ACEOF
7321rm -f conftest.$ac_objext
ca81d7a0
JD
7322if { (ac_try="$ac_compile"
7323case "(($ac_try" in
7324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7325 *) ac_try_echo=$ac_try;;
7326esac
7327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7328 (eval "$ac_compile") 2>conftest.er1
503d2be0 7329 ac_status=$?
edfaf76d
LK
7330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
c0d27fcc 7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7334 (exit $ac_status); } && {
7335 test -z "$ac_c_werror_flag" ||
7336 test ! -s conftest.err
7337 } && test -s conftest.$ac_objext; then
98418dba 7338 emacs_cv_struct_exception=yes
ba4481b5 7339else
503d2be0 7340 echo "$as_me: failed program was:" >&5
19650fd6
AS
7341sed 's/^/| /' conftest.$ac_ext >&5
7342
ca81d7a0 7343 emacs_cv_struct_exception=no
ba4481b5 7344fi
ca81d7a0
JD
7345
7346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7347fi
ca81d7a0
JD
7348{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7349echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7350HAVE_EXCEPTION=$emacs_cv_struct_exception
7351if test $emacs_cv_struct_exception != yes; then
b936fae4 7352
c0d27fcc 7353cat >>confdefs.h <<\_ACEOF
98418dba 7354#define NO_MATHERR 1
c0d27fcc 7355_ACEOF
ba4481b5
DL
7356
7357fi
7358
7862d3a8
AS
7359
7360for ac_header in sys/socket.h
7361do
7362as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7363if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7364 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7365echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7366if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7367 echo $ECHO_N "(cached) $ECHO_C" >&6
7368fi
ca81d7a0
JD
7369ac_res=`eval echo '${'$as_ac_Header'}'`
7370 { echo "$as_me:$LINENO: result: $ac_res" >&5
7371echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7372else
7373 # Is the header compilable?
ca81d7a0
JD
7374{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7375echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7376cat >conftest.$ac_ext <<_ACEOF
7377/* confdefs.h. */
7378_ACEOF
7379cat confdefs.h >>conftest.$ac_ext
7380cat >>conftest.$ac_ext <<_ACEOF
7381/* end confdefs.h. */
7382$ac_includes_default
7383#include <$ac_header>
7384_ACEOF
7385rm -f conftest.$ac_objext
ca81d7a0
JD
7386if { (ac_try="$ac_compile"
7387case "(($ac_try" in
7388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7389 *) ac_try_echo=$ac_try;;
7390esac
7391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7392 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7393 ac_status=$?
edfaf76d
LK
7394 grep -v '^ *+' conftest.er1 >conftest.err
7395 rm -f conftest.er1
7396 cat conftest.err >&5
7862d3a8 7397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7398 (exit $ac_status); } && {
7399 test -z "$ac_c_werror_flag" ||
7400 test ! -s conftest.err
7401 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7402 ac_header_compiler=yes
7403else
7404 echo "$as_me: failed program was:" >&5
7405sed 's/^/| /' conftest.$ac_ext >&5
7406
ca81d7a0 7407 ac_header_compiler=no
7862d3a8 7408fi
ca81d7a0
JD
7409
7410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7411{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7412echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7413
7414# Is the header present?
ca81d7a0
JD
7415{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7416echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7417cat >conftest.$ac_ext <<_ACEOF
7418/* confdefs.h. */
7419_ACEOF
7420cat confdefs.h >>conftest.$ac_ext
7421cat >>conftest.$ac_ext <<_ACEOF
7422/* end confdefs.h. */
7423#include <$ac_header>
7424_ACEOF
ca81d7a0
JD
7425if { (ac_try="$ac_cpp conftest.$ac_ext"
7426case "(($ac_try" in
7427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7428 *) ac_try_echo=$ac_try;;
7429esac
7430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7431 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7432 ac_status=$?
7433 grep -v '^ *+' conftest.er1 >conftest.err
7434 rm -f conftest.er1
7435 cat conftest.err >&5
7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7437 (exit $ac_status); } >/dev/null && {
7438 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7439 test ! -s conftest.err
7440 }; then
7862d3a8
AS
7441 ac_header_preproc=yes
7442else
7443 echo "$as_me: failed program was:" >&5
7444sed 's/^/| /' conftest.$ac_ext >&5
7445
7446 ac_header_preproc=no
7447fi
ca81d7a0 7448
7862d3a8 7449rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7450{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7451echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7452
7453# So? What about this header?
edfaf76d
LK
7454case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7455 yes:no: )
7862d3a8
AS
7456 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7457echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7458 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7459echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7460 ac_header_preproc=yes
7862d3a8 7461 ;;
edfaf76d 7462 no:yes:* )
7862d3a8
AS
7463 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7464echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7465 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7466echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7467 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7468echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7469 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7470echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7471 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7472echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7473 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7474echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7475
7862d3a8
AS
7476 ;;
7477esac
ca81d7a0
JD
7478{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7479echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7480if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7481 echo $ECHO_N "(cached) $ECHO_C" >&6
7482else
edfaf76d 7483 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7484fi
ca81d7a0
JD
7485ac_res=`eval echo '${'$as_ac_Header'}'`
7486 { echo "$as_me:$LINENO: result: $ac_res" >&5
7487echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7488
7489fi
7490if test `eval echo '${'$as_ac_Header'}'` = yes; then
7491 cat >>confdefs.h <<_ACEOF
7492#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7493_ACEOF
7494
7495fi
7496
7497done
7498
7499
7500for ac_header in net/if.h
7501do
7502as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7503{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7505if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7506 echo $ECHO_N "(cached) $ECHO_C" >&6
7507else
7508 cat >conftest.$ac_ext <<_ACEOF
7509/* confdefs.h. */
7510_ACEOF
7511cat confdefs.h >>conftest.$ac_ext
7512cat >>conftest.$ac_ext <<_ACEOF
7513/* end confdefs.h. */
7514$ac_includes_default
7515#if HAVE_SYS_SOCKET_H
7516#include <sys/socket.h>
7517#endif
7518
7519#include <$ac_header>
7520_ACEOF
7521rm -f conftest.$ac_objext
ca81d7a0
JD
7522if { (ac_try="$ac_compile"
7523case "(($ac_try" in
7524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7525 *) ac_try_echo=$ac_try;;
7526esac
7527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7528 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7529 ac_status=$?
edfaf76d
LK
7530 grep -v '^ *+' conftest.er1 >conftest.err
7531 rm -f conftest.er1
7532 cat conftest.err >&5
7862d3a8 7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7534 (exit $ac_status); } && {
7535 test -z "$ac_c_werror_flag" ||
7536 test ! -s conftest.err
7537 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7538 eval "$as_ac_Header=yes"
7539else
7540 echo "$as_me: failed program was:" >&5
7541sed 's/^/| /' conftest.$ac_ext >&5
7542
ca81d7a0 7543 eval "$as_ac_Header=no"
7862d3a8 7544fi
ca81d7a0
JD
7545
7546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7547fi
ca81d7a0
JD
7548ac_res=`eval echo '${'$as_ac_Header'}'`
7549 { echo "$as_me:$LINENO: result: $ac_res" >&5
7550echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7551if test `eval echo '${'$as_ac_Header'}'` = yes; then
7552 cat >>confdefs.h <<_ACEOF
7553#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7554_ACEOF
7555
7556fi
7557
7558done
7559
7560
ca81d7a0
JD
7561{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7562echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7563if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7564 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7565else
503d2be0 7566 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
98418dba
CW
7572#include <sys/types.h>
7573#include <time.h>
7397acc4 7574
503d2be0
AS
7575int
7576main ()
7577{
f053c89f
CY
7578struct tm tm;
7579 int *p = &tm.tm_sec;
7580 return !p;
503d2be0
AS
7581 ;
7582 return 0;
7583}
7584_ACEOF
7585rm -f conftest.$ac_objext
ca81d7a0
JD
7586if { (ac_try="$ac_compile"
7587case "(($ac_try" in
7588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7589 *) ac_try_echo=$ac_try;;
7590esac
7591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7592 (eval "$ac_compile") 2>conftest.er1
503d2be0 7593 ac_status=$?
edfaf76d
LK
7594 grep -v '^ *+' conftest.er1 >conftest.err
7595 rm -f conftest.er1
7596 cat conftest.err >&5
c0d27fcc 7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7598 (exit $ac_status); } && {
7599 test -z "$ac_c_werror_flag" ||
7600 test ! -s conftest.err
7601 } && test -s conftest.$ac_objext; then
35996d22
AS
7602 ac_cv_struct_tm=time.h
7603else
503d2be0 7604 echo "$as_me: failed program was:" >&5
19650fd6
AS
7605sed 's/^/| /' conftest.$ac_ext >&5
7606
ca81d7a0 7607 ac_cv_struct_tm=sys/time.h
7397acc4 7608fi
ca81d7a0
JD
7609
7610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7611fi
ca81d7a0
JD
7612{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7613echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7614if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7615
c0d27fcc 7616cat >>confdefs.h <<\_ACEOF
98418dba 7617#define TM_IN_SYS_TIME 1
c0d27fcc 7618_ACEOF
7397acc4
DL
7619
7620fi
ba4481b5 7621
ca81d7a0
JD
7622{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7623echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7624if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7625 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7626else
98418dba 7627 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7628/* confdefs.h. */
7629_ACEOF
7630cat confdefs.h >>conftest.$ac_ext
7631cat >>conftest.$ac_ext <<_ACEOF
7632/* end confdefs.h. */
98418dba
CW
7633#include <sys/types.h>
7634#include <$ac_cv_struct_tm>
ba4481b5 7635
c0d27fcc 7636
98418dba
CW
7637int
7638main ()
7639{
7640static struct tm ac_aggr;
7641if (ac_aggr.tm_zone)
7642return 0;
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
ca81d7a0
JD
7648if { (ac_try="$ac_compile"
7649case "(($ac_try" in
7650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651 *) ac_try_echo=$ac_try;;
7652esac
7653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7654 (eval "$ac_compile") 2>conftest.er1
98418dba 7655 ac_status=$?
edfaf76d
LK
7656 grep -v '^ *+' conftest.er1 >conftest.err
7657 rm -f conftest.er1
7658 cat conftest.err >&5
c0d27fcc 7659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7660 (exit $ac_status); } && {
7661 test -z "$ac_c_werror_flag" ||
7662 test ! -s conftest.err
7663 } && test -s conftest.$ac_objext; then
98418dba 7664 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7665else
98418dba 7666 echo "$as_me: failed program was:" >&5
19650fd6
AS
7667sed 's/^/| /' conftest.$ac_ext >&5
7668
ca81d7a0 7669 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7670/* confdefs.h. */
7671_ACEOF
7672cat confdefs.h >>conftest.$ac_ext
7673cat >>conftest.$ac_ext <<_ACEOF
7674/* end confdefs.h. */
6bae0ccf
DL
7675#include <sys/types.h>
7676#include <$ac_cv_struct_tm>
7677
7678
7679int
7680main ()
7681{
7682static struct tm ac_aggr;
7683if (sizeof ac_aggr.tm_zone)
7684return 0;
7685 ;
7686 return 0;
7687}
7688_ACEOF
7689rm -f conftest.$ac_objext
ca81d7a0
JD
7690if { (ac_try="$ac_compile"
7691case "(($ac_try" in
7692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7693 *) ac_try_echo=$ac_try;;
7694esac
7695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7696 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7697 ac_status=$?
edfaf76d
LK
7698 grep -v '^ *+' conftest.er1 >conftest.err
7699 rm -f conftest.er1
7700 cat conftest.err >&5
6bae0ccf 7701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7702 (exit $ac_status); } && {
7703 test -z "$ac_c_werror_flag" ||
7704 test ! -s conftest.err
7705 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7706 ac_cv_member_struct_tm_tm_zone=yes
7707else
7708 echo "$as_me: failed program was:" >&5
19650fd6
AS
7709sed 's/^/| /' conftest.$ac_ext >&5
7710
ca81d7a0 7711 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7712fi
ca81d7a0
JD
7713
7714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7715fi
ca81d7a0
JD
7716
7717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7718fi
ca81d7a0
JD
7719{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7720echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7721if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7722
c0d27fcc 7723cat >>confdefs.h <<_ACEOF
98418dba 7724#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7725_ACEOF
7726
ba4481b5 7727
98418dba 7728fi
ba4481b5 7729
98418dba 7730if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7731
c0d27fcc 7732cat >>confdefs.h <<\_ACEOF
98418dba 7733#define HAVE_TM_ZONE 1
c0d27fcc 7734_ACEOF
ba4481b5 7735
ba4481b5 7736else
ca81d7a0
JD
7737 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7738echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7739if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7740 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7741else
98418dba 7742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7743/* confdefs.h. */
7744_ACEOF
7745cat confdefs.h >>conftest.$ac_ext
7746cat >>conftest.$ac_ext <<_ACEOF
7747/* end confdefs.h. */
98418dba 7748#include <time.h>
98418dba 7749
98418dba
CW
7750int
7751main ()
7752{
ca81d7a0 7753#ifndef tzname
f053c89f 7754 (void) tzname;
ca81d7a0
JD
7755#endif
7756
6bae0ccf
DL
7757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
ca81d7a0
JD
7762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
7767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7768 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7769 ac_status=$?
edfaf76d
LK
7770 grep -v '^ *+' conftest.er1 >conftest.err
7771 rm -f conftest.er1
7772 cat conftest.err >&5
6bae0ccf 7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7774 (exit $ac_status); } && {
7775 test -z "$ac_c_werror_flag" ||
7776 test ! -s conftest.err
7777 } && test -s conftest.$ac_objext; then
ca81d7a0 7778 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7779else
7780 echo "$as_me: failed program was:" >&5
19650fd6
AS
7781sed 's/^/| /' conftest.$ac_ext >&5
7782
ca81d7a0 7783 ac_cv_have_decl_tzname=no
ba4481b5 7784fi
ca81d7a0
JD
7785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7787fi
ca81d7a0
JD
7788{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7789echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7790if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7791
c0d27fcc 7792cat >>confdefs.h <<_ACEOF
ca81d7a0 7793#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7794_ACEOF
7795
ba4481b5 7796
ca81d7a0
JD
7797else
7798 cat >>confdefs.h <<_ACEOF
7799#define HAVE_DECL_TZNAME 0
7800_ACEOF
ba4481b5 7801
ba4481b5 7802
98418dba 7803fi
ba4481b5 7804
ca81d7a0
JD
7805
7806 { echo "$as_me:$LINENO: checking for tzname" >&5
7807echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7808if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7810else
98418dba 7811 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7812/* confdefs.h. */
7813_ACEOF
7814cat confdefs.h >>conftest.$ac_ext
7815cat >>conftest.$ac_ext <<_ACEOF
7816/* end confdefs.h. */
98418dba 7817#include <time.h>
ca81d7a0
JD
7818#if !HAVE_DECL_TZNAME
7819extern char *tzname[];
98418dba
CW
7820#endif
7821
98418dba
CW
7822int
7823main ()
7824{
ca81d7a0 7825return tzname[0][0];
98418dba
CW
7826 ;
7827 return 0;
7828}
7829_ACEOF
7830rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7831if { (ac_try="$ac_link"
7832case "(($ac_try" in
7833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7834 *) ac_try_echo=$ac_try;;
7835esac
7836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7837 (eval "$ac_link") 2>conftest.er1
98418dba 7838 ac_status=$?
edfaf76d
LK
7839 grep -v '^ *+' conftest.er1 >conftest.err
7840 rm -f conftest.er1
7841 cat conftest.err >&5
c0d27fcc 7842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7843 (exit $ac_status); } && {
7844 test -z "$ac_c_werror_flag" ||
7845 test ! -s conftest.err
7846 } && test -s conftest$ac_exeext &&
7847 $as_test_x conftest$ac_exeext; then
98418dba
CW
7848 ac_cv_var_tzname=yes
7849else
7850 echo "$as_me: failed program was:" >&5
19650fd6
AS
7851sed 's/^/| /' conftest.$ac_ext >&5
7852
ca81d7a0 7853 ac_cv_var_tzname=no
ba4481b5 7854fi
6bae0ccf 7855
f053c89f 7856rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7857 conftest$ac_exeext conftest.$ac_ext
98418dba 7858fi
ca81d7a0
JD
7859{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7860echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7861 if test $ac_cv_var_tzname = yes; then
ba4481b5 7862
c0d27fcc 7863cat >>confdefs.h <<\_ACEOF
98418dba 7864#define HAVE_TZNAME 1
c0d27fcc 7865_ACEOF
503d2be0 7866
98418dba
CW
7867 fi
7868fi
503d2be0 7869
ca81d7a0
JD
7870{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7871echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7872if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7873 echo $ECHO_N "(cached) $ECHO_C" >&6
7874else
7875 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7876/* confdefs.h. */
7877_ACEOF
7878cat confdefs.h >>conftest.$ac_ext
7879cat >>conftest.$ac_ext <<_ACEOF
7880/* end confdefs.h. */
98418dba 7881#include <time.h>
b936fae4 7882
98418dba
CW
7883int
7884main ()
7885{
b936fae4
AS
7886static struct tm ac_aggr;
7887if (ac_aggr.tm_gmtoff)
7888return 0;
98418dba
CW
7889 ;
7890 return 0;
7891}
7892_ACEOF
b936fae4 7893rm -f conftest.$ac_objext
ca81d7a0
JD
7894if { (ac_try="$ac_compile"
7895case "(($ac_try" in
7896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7897 *) ac_try_echo=$ac_try;;
7898esac
7899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7900 (eval "$ac_compile") 2>conftest.er1
98418dba 7901 ac_status=$?
edfaf76d
LK
7902 grep -v '^ *+' conftest.er1 >conftest.err
7903 rm -f conftest.er1
7904 cat conftest.err >&5
c0d27fcc 7905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7906 (exit $ac_status); } && {
7907 test -z "$ac_c_werror_flag" ||
7908 test ! -s conftest.err
7909 } && test -s conftest.$ac_objext; then
b936fae4 7910 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7911else
7912 echo "$as_me: failed program was:" >&5
19650fd6
AS
7913sed 's/^/| /' conftest.$ac_ext >&5
7914
ca81d7a0 7915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7916/* confdefs.h. */
7917_ACEOF
7918cat confdefs.h >>conftest.$ac_ext
7919cat >>conftest.$ac_ext <<_ACEOF
7920/* end confdefs.h. */
6bae0ccf
DL
7921#include <time.h>
7922
8799b3e4
CW
7923int
7924main ()
7925{
6bae0ccf
DL
7926static struct tm ac_aggr;
7927if (sizeof ac_aggr.tm_gmtoff)
7928return 0;
8799b3e4
CW
7929 ;
7930 return 0;
7931}
7932_ACEOF
6bae0ccf 7933rm -f conftest.$ac_objext
ca81d7a0
JD
7934if { (ac_try="$ac_compile"
7935case "(($ac_try" in
7936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7937 *) ac_try_echo=$ac_try;;
7938esac
7939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7940 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7941 ac_status=$?
edfaf76d
LK
7942 grep -v '^ *+' conftest.er1 >conftest.err
7943 rm -f conftest.er1
7944 cat conftest.err >&5
c0d27fcc 7945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7946 (exit $ac_status); } && {
7947 test -z "$ac_c_werror_flag" ||
7948 test ! -s conftest.err
7949 } && test -s conftest.$ac_objext; then
6bae0ccf 7950 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7951else
7952 echo "$as_me: failed program was:" >&5
19650fd6
AS
7953sed 's/^/| /' conftest.$ac_ext >&5
7954
ca81d7a0 7955 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7956fi
ca81d7a0
JD
7957
7958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7959fi
ca81d7a0
JD
7960
7961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7962fi
ca81d7a0
JD
7963{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7964echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7965if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7966
7967cat >>confdefs.h <<\_ACEOF
7968#define HAVE_TM_GMTOFF 1
7969_ACEOF
7970
7971fi
7972
ca81d7a0
JD
7973{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7974echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7975if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7976 echo $ECHO_N "(cached) $ECHO_C" >&6
7977else
7978 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7979/* confdefs.h. */
7980_ACEOF
7981cat confdefs.h >>conftest.$ac_ext
7982cat >>conftest.$ac_ext <<_ACEOF
7983/* end confdefs.h. */
7862d3a8
AS
7984$ac_includes_default
7985#if HAVE_SYS_SOCKET_H
7986#include <sys/socket.h>
7987#endif
7988#if HAVE_NET_IF_H
96f3a036 7989#include <net/if.h>
7862d3a8 7990#endif
96f3a036
DL
7991
7992int
7993main ()
7994{
7995static struct ifreq ac_aggr;
7996if (ac_aggr.ifr_flags)
7997return 0;
7998 ;
7999 return 0;
8000}
8001_ACEOF
8002rm -f conftest.$ac_objext
ca81d7a0
JD
8003if { (ac_try="$ac_compile"
8004case "(($ac_try" in
8005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8006 *) ac_try_echo=$ac_try;;
8007esac
8008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8009 (eval "$ac_compile") 2>conftest.er1
96f3a036 8010 ac_status=$?
edfaf76d
LK
8011 grep -v '^ *+' conftest.er1 >conftest.err
8012 rm -f conftest.er1
8013 cat conftest.err >&5
96f3a036 8014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8015 (exit $ac_status); } && {
8016 test -z "$ac_c_werror_flag" ||
8017 test ! -s conftest.err
8018 } && test -s conftest.$ac_objext; then
96f3a036
DL
8019 ac_cv_member_struct_ifreq_ifr_flags=yes
8020else
8021 echo "$as_me: failed program was:" >&5
8022sed 's/^/| /' conftest.$ac_ext >&5
8023
ca81d7a0 8024 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8025/* confdefs.h. */
8026_ACEOF
8027cat confdefs.h >>conftest.$ac_ext
8028cat >>conftest.$ac_ext <<_ACEOF
8029/* end confdefs.h. */
7862d3a8
AS
8030$ac_includes_default
8031#if HAVE_SYS_SOCKET_H
8032#include <sys/socket.h>
8033#endif
8034#if HAVE_NET_IF_H
96f3a036 8035#include <net/if.h>
7862d3a8 8036#endif
96f3a036
DL
8037
8038int
8039main ()
8040{
8041static struct ifreq ac_aggr;
8042if (sizeof ac_aggr.ifr_flags)
8043return 0;
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext
ca81d7a0
JD
8049if { (ac_try="$ac_compile"
8050case "(($ac_try" in
8051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8052 *) ac_try_echo=$ac_try;;
8053esac
8054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8055 (eval "$ac_compile") 2>conftest.er1
96f3a036 8056 ac_status=$?
edfaf76d
LK
8057 grep -v '^ *+' conftest.er1 >conftest.err
8058 rm -f conftest.er1
8059 cat conftest.err >&5
96f3a036 8060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8061 (exit $ac_status); } && {
8062 test -z "$ac_c_werror_flag" ||
8063 test ! -s conftest.err
8064 } && test -s conftest.$ac_objext; then
96f3a036
DL
8065 ac_cv_member_struct_ifreq_ifr_flags=yes
8066else
8067 echo "$as_me: failed program was:" >&5
8068sed 's/^/| /' conftest.$ac_ext >&5
8069
ca81d7a0 8070 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8071fi
ca81d7a0
JD
8072
8073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8074fi
ca81d7a0
JD
8075
8076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8077fi
ca81d7a0
JD
8078{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8079echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8080if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8081
8082cat >>confdefs.h <<_ACEOF
8083#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8084_ACEOF
8085
8086
8087fi
ca81d7a0
JD
8088{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8089echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8090if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8091 echo $ECHO_N "(cached) $ECHO_C" >&6
8092else
8093 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
7862d3a8
AS
8099$ac_includes_default
8100#if HAVE_SYS_SOCKET_H
8101#include <sys/socket.h>
8102#endif
8103#if HAVE_NET_IF_H
96f3a036 8104#include <net/if.h>
7862d3a8 8105#endif
96f3a036
DL
8106
8107int
8108main ()
8109{
8110static struct ifreq ac_aggr;
8111if (ac_aggr.ifr_hwaddr)
8112return 0;
8113 ;
8114 return 0;
8115}
8116_ACEOF
8117rm -f conftest.$ac_objext
ca81d7a0
JD
8118if { (ac_try="$ac_compile"
8119case "(($ac_try" in
8120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8121 *) ac_try_echo=$ac_try;;
8122esac
8123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8124 (eval "$ac_compile") 2>conftest.er1
96f3a036 8125 ac_status=$?
edfaf76d
LK
8126 grep -v '^ *+' conftest.er1 >conftest.err
8127 rm -f conftest.er1
8128 cat conftest.err >&5
96f3a036 8129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8130 (exit $ac_status); } && {
8131 test -z "$ac_c_werror_flag" ||
8132 test ! -s conftest.err
8133 } && test -s conftest.$ac_objext; then
96f3a036
DL
8134 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8135else
8136 echo "$as_me: failed program was:" >&5
8137sed 's/^/| /' conftest.$ac_ext >&5
8138
ca81d7a0 8139 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8140/* confdefs.h. */
8141_ACEOF
8142cat confdefs.h >>conftest.$ac_ext
8143cat >>conftest.$ac_ext <<_ACEOF
8144/* end confdefs.h. */
7862d3a8
AS
8145$ac_includes_default
8146#if HAVE_SYS_SOCKET_H
8147#include <sys/socket.h>
8148#endif
8149#if HAVE_NET_IF_H
96f3a036 8150#include <net/if.h>
7862d3a8 8151#endif
96f3a036
DL
8152
8153int
8154main ()
8155{
8156static struct ifreq ac_aggr;
8157if (sizeof ac_aggr.ifr_hwaddr)
8158return 0;
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
ca81d7a0
JD
8164if { (ac_try="$ac_compile"
8165case "(($ac_try" in
8166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8167 *) ac_try_echo=$ac_try;;
8168esac
8169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8170 (eval "$ac_compile") 2>conftest.er1
96f3a036 8171 ac_status=$?
edfaf76d
LK
8172 grep -v '^ *+' conftest.er1 >conftest.err
8173 rm -f conftest.er1
8174 cat conftest.err >&5
96f3a036 8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8176 (exit $ac_status); } && {
8177 test -z "$ac_c_werror_flag" ||
8178 test ! -s conftest.err
8179 } && test -s conftest.$ac_objext; then
96f3a036
DL
8180 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8181else
8182 echo "$as_me: failed program was:" >&5
8183sed 's/^/| /' conftest.$ac_ext >&5
8184
ca81d7a0 8185 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8186fi
ca81d7a0
JD
8187
8188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8189fi
ca81d7a0
JD
8190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8192fi
ca81d7a0
JD
8193{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8194echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8195if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8196
8197cat >>confdefs.h <<_ACEOF
8198#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8199_ACEOF
8200
8201
8202fi
ca81d7a0
JD
8203{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8204echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8205if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8206 echo $ECHO_N "(cached) $ECHO_C" >&6
8207else
8208 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8209/* confdefs.h. */
8210_ACEOF
8211cat confdefs.h >>conftest.$ac_ext
8212cat >>conftest.$ac_ext <<_ACEOF
8213/* end confdefs.h. */
7862d3a8
AS
8214$ac_includes_default
8215#if HAVE_SYS_SOCKET_H
8216#include <sys/socket.h>
8217#endif
8218#if HAVE_NET_IF_H
96f3a036 8219#include <net/if.h>
7862d3a8 8220#endif
96f3a036
DL
8221
8222int
8223main ()
8224{
8225static struct ifreq ac_aggr;
8226if (ac_aggr.ifr_netmask)
8227return 0;
8228 ;
8229 return 0;
8230}
8231_ACEOF
8232rm -f conftest.$ac_objext
ca81d7a0
JD
8233if { (ac_try="$ac_compile"
8234case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;;
8237esac
8238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8239 (eval "$ac_compile") 2>conftest.er1
96f3a036 8240 ac_status=$?
edfaf76d
LK
8241 grep -v '^ *+' conftest.er1 >conftest.err
8242 rm -f conftest.er1
8243 cat conftest.err >&5
96f3a036 8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8245 (exit $ac_status); } && {
8246 test -z "$ac_c_werror_flag" ||
8247 test ! -s conftest.err
8248 } && test -s conftest.$ac_objext; then
96f3a036
DL
8249 ac_cv_member_struct_ifreq_ifr_netmask=yes
8250else
8251 echo "$as_me: failed program was:" >&5
8252sed 's/^/| /' conftest.$ac_ext >&5
8253
ca81d7a0 8254 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8255/* confdefs.h. */
8256_ACEOF
8257cat confdefs.h >>conftest.$ac_ext
8258cat >>conftest.$ac_ext <<_ACEOF
8259/* end confdefs.h. */
7862d3a8
AS
8260$ac_includes_default
8261#if HAVE_SYS_SOCKET_H
8262#include <sys/socket.h>
8263#endif
8264#if HAVE_NET_IF_H
96f3a036 8265#include <net/if.h>
7862d3a8 8266#endif
96f3a036
DL
8267
8268int
8269main ()
8270{
8271static struct ifreq ac_aggr;
8272if (sizeof ac_aggr.ifr_netmask)
8273return 0;
8274 ;
8275 return 0;
8276}
8277_ACEOF
8278rm -f conftest.$ac_objext
ca81d7a0
JD
8279if { (ac_try="$ac_compile"
8280case "(($ac_try" in
8281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8282 *) ac_try_echo=$ac_try;;
8283esac
8284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8285 (eval "$ac_compile") 2>conftest.er1
96f3a036 8286 ac_status=$?
edfaf76d
LK
8287 grep -v '^ *+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
96f3a036 8290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8291 (exit $ac_status); } && {
8292 test -z "$ac_c_werror_flag" ||
8293 test ! -s conftest.err
8294 } && test -s conftest.$ac_objext; then
96f3a036
DL
8295 ac_cv_member_struct_ifreq_ifr_netmask=yes
8296else
8297 echo "$as_me: failed program was:" >&5
8298sed 's/^/| /' conftest.$ac_ext >&5
8299
ca81d7a0 8300 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8301fi
ca81d7a0
JD
8302
8303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8304fi
ca81d7a0
JD
8305
8306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8307fi
ca81d7a0
JD
8308{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8309echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8310if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8311
8312cat >>confdefs.h <<_ACEOF
8313#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8314_ACEOF
8315
8316
8317fi
ca81d7a0
JD
8318{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8319echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8320if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8321 echo $ECHO_N "(cached) $ECHO_C" >&6
8322else
8323 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8324/* confdefs.h. */
8325_ACEOF
8326cat confdefs.h >>conftest.$ac_ext
8327cat >>conftest.$ac_ext <<_ACEOF
8328/* end confdefs.h. */
7862d3a8
AS
8329$ac_includes_default
8330#if HAVE_SYS_SOCKET_H
8331#include <sys/socket.h>
8332#endif
8333#if HAVE_NET_IF_H
96f3a036 8334#include <net/if.h>
7862d3a8 8335#endif
96f3a036
DL
8336
8337int
8338main ()
8339{
8340static struct ifreq ac_aggr;
8341if (ac_aggr.ifr_broadaddr)
8342return 0;
8343 ;
8344 return 0;
8345}
8346_ACEOF
8347rm -f conftest.$ac_objext
ca81d7a0
JD
8348if { (ac_try="$ac_compile"
8349case "(($ac_try" in
8350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8351 *) ac_try_echo=$ac_try;;
8352esac
8353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8354 (eval "$ac_compile") 2>conftest.er1
96f3a036 8355 ac_status=$?
edfaf76d
LK
8356 grep -v '^ *+' conftest.er1 >conftest.err
8357 rm -f conftest.er1
8358 cat conftest.err >&5
96f3a036 8359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8360 (exit $ac_status); } && {
8361 test -z "$ac_c_werror_flag" ||
8362 test ! -s conftest.err
8363 } && test -s conftest.$ac_objext; then
96f3a036
DL
8364 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8365else
8366 echo "$as_me: failed program was:" >&5
8367sed 's/^/| /' conftest.$ac_ext >&5
8368
ca81d7a0 8369 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8370/* confdefs.h. */
8371_ACEOF
8372cat confdefs.h >>conftest.$ac_ext
8373cat >>conftest.$ac_ext <<_ACEOF
8374/* end confdefs.h. */
7862d3a8
AS
8375$ac_includes_default
8376#if HAVE_SYS_SOCKET_H
8377#include <sys/socket.h>
8378#endif
8379#if HAVE_NET_IF_H
96f3a036 8380#include <net/if.h>
7862d3a8 8381#endif
96f3a036
DL
8382
8383int
8384main ()
8385{
8386static struct ifreq ac_aggr;
8387if (sizeof ac_aggr.ifr_broadaddr)
8388return 0;
8389 ;
8390 return 0;
8391}
8392_ACEOF
8393rm -f conftest.$ac_objext
ca81d7a0
JD
8394if { (ac_try="$ac_compile"
8395case "(($ac_try" in
8396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8397 *) ac_try_echo=$ac_try;;
8398esac
8399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8400 (eval "$ac_compile") 2>conftest.er1
96f3a036 8401 ac_status=$?
edfaf76d
LK
8402 grep -v '^ *+' conftest.er1 >conftest.err
8403 rm -f conftest.er1
8404 cat conftest.err >&5
96f3a036 8405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8406 (exit $ac_status); } && {
8407 test -z "$ac_c_werror_flag" ||
8408 test ! -s conftest.err
8409 } && test -s conftest.$ac_objext; then
96f3a036
DL
8410 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8411else
8412 echo "$as_me: failed program was:" >&5
8413sed 's/^/| /' conftest.$ac_ext >&5
8414
ca81d7a0 8415 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8416fi
ca81d7a0
JD
8417
8418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8419fi
ca81d7a0
JD
8420
8421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8422fi
ca81d7a0
JD
8423{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8424echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8425if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8426
8427cat >>confdefs.h <<_ACEOF
8428#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8429_ACEOF
8430
8431
8432fi
ca81d7a0
JD
8433{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8434echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8435if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8436 echo $ECHO_N "(cached) $ECHO_C" >&6
8437else
8438 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8439/* confdefs.h. */
8440_ACEOF
8441cat confdefs.h >>conftest.$ac_ext
8442cat >>conftest.$ac_ext <<_ACEOF
8443/* end confdefs.h. */
7862d3a8
AS
8444$ac_includes_default
8445#if HAVE_SYS_SOCKET_H
8446#include <sys/socket.h>
8447#endif
8448#if HAVE_NET_IF_H
96f3a036 8449#include <net/if.h>
7862d3a8 8450#endif
96f3a036
DL
8451
8452int
8453main ()
8454{
8455static struct ifreq ac_aggr;
8456if (ac_aggr.ifr_addr)
8457return 0;
8458 ;
8459 return 0;
8460}
8461_ACEOF
8462rm -f conftest.$ac_objext
ca81d7a0
JD
8463if { (ac_try="$ac_compile"
8464case "(($ac_try" in
8465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8466 *) ac_try_echo=$ac_try;;
8467esac
8468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8469 (eval "$ac_compile") 2>conftest.er1
96f3a036 8470 ac_status=$?
edfaf76d
LK
8471 grep -v '^ *+' conftest.er1 >conftest.err
8472 rm -f conftest.er1
8473 cat conftest.err >&5
96f3a036 8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8475 (exit $ac_status); } && {
8476 test -z "$ac_c_werror_flag" ||
8477 test ! -s conftest.err
8478 } && test -s conftest.$ac_objext; then
96f3a036
DL
8479 ac_cv_member_struct_ifreq_ifr_addr=yes
8480else
8481 echo "$as_me: failed program was:" >&5
8482sed 's/^/| /' conftest.$ac_ext >&5
8483
ca81d7a0 8484 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8485/* confdefs.h. */
8486_ACEOF
8487cat confdefs.h >>conftest.$ac_ext
8488cat >>conftest.$ac_ext <<_ACEOF
8489/* end confdefs.h. */
7862d3a8
AS
8490$ac_includes_default
8491#if HAVE_SYS_SOCKET_H
8492#include <sys/socket.h>
8493#endif
8494#if HAVE_NET_IF_H
96f3a036 8495#include <net/if.h>
7862d3a8 8496#endif
96f3a036
DL
8497
8498int
8499main ()
8500{
8501static struct ifreq ac_aggr;
8502if (sizeof ac_aggr.ifr_addr)
8503return 0;
8504 ;
8505 return 0;
8506}
8507_ACEOF
8508rm -f conftest.$ac_objext
ca81d7a0
JD
8509if { (ac_try="$ac_compile"
8510case "(($ac_try" in
8511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8512 *) ac_try_echo=$ac_try;;
8513esac
8514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8515 (eval "$ac_compile") 2>conftest.er1
96f3a036 8516 ac_status=$?
edfaf76d
LK
8517 grep -v '^ *+' conftest.er1 >conftest.err
8518 rm -f conftest.er1
8519 cat conftest.err >&5
96f3a036 8520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8521 (exit $ac_status); } && {
8522 test -z "$ac_c_werror_flag" ||
8523 test ! -s conftest.err
8524 } && test -s conftest.$ac_objext; then
96f3a036
DL
8525 ac_cv_member_struct_ifreq_ifr_addr=yes
8526else
8527 echo "$as_me: failed program was:" >&5
8528sed 's/^/| /' conftest.$ac_ext >&5
8529
ca81d7a0 8530 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8531fi
ca81d7a0
JD
8532
8533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8534fi
ca81d7a0
JD
8535
8536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8537fi
ca81d7a0
JD
8538{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8539echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8540if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8541
8542cat >>confdefs.h <<_ACEOF
8543#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8544_ACEOF
8545
8546
8547fi
8548
8799b3e4 8549
8799b3e4 8550
ca81d7a0
JD
8551{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8552echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8553if test "$ac_cv_prog_cc_c89" != no; then
8554 { echo "$as_me:$LINENO: result: yes" >&5
8555echo "${ECHO_T}yes" >&6; }
98418dba 8556
c0d27fcc 8557cat >>confdefs.h <<\_ACEOF
98418dba 8558#define PROTOTYPES 1
c0d27fcc
MR
8559_ACEOF
8560
8561
8562cat >>confdefs.h <<\_ACEOF
8563#define __PROTOTYPES 1
8564_ACEOF
98418dba
CW
8565
8566else
ca81d7a0
JD
8567 { echo "$as_me:$LINENO: result: no" >&5
8568echo "${ECHO_T}no" >&6; }
98418dba
CW
8569fi
8570
ca81d7a0
JD
8571{ echo "$as_me:$LINENO: checking for working volatile" >&5
8572echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8573if test "${ac_cv_c_volatile+set}" = set; then
8574 echo $ECHO_N "(cached) $ECHO_C" >&6
8575else
8576 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8577/* confdefs.h. */
8578_ACEOF
8579cat confdefs.h >>conftest.$ac_ext
8580cat >>conftest.$ac_ext <<_ACEOF
8581/* end confdefs.h. */
98418dba 8582
98418dba
CW
8583int
8584main ()
8585{
8586
8587volatile int x;
ca81d7a0
JD
8588int * volatile y = (int *) 0;
8589return !x && !y;
98418dba
CW
8590 ;
8591 return 0;
8592}
8593_ACEOF
8594rm -f conftest.$ac_objext
ca81d7a0
JD
8595if { (ac_try="$ac_compile"
8596case "(($ac_try" in
8597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8598 *) ac_try_echo=$ac_try;;
8599esac
8600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8601 (eval "$ac_compile") 2>conftest.er1
98418dba 8602 ac_status=$?
edfaf76d
LK
8603 grep -v '^ *+' conftest.er1 >conftest.err
8604 rm -f conftest.er1
8605 cat conftest.err >&5
c0d27fcc 8606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8607 (exit $ac_status); } && {
8608 test -z "$ac_c_werror_flag" ||
8609 test ! -s conftest.err
8610 } && test -s conftest.$ac_objext; then
98418dba
CW
8611 ac_cv_c_volatile=yes
8612else
8613 echo "$as_me: failed program was:" >&5
19650fd6
AS
8614sed 's/^/| /' conftest.$ac_ext >&5
8615
ca81d7a0 8616 ac_cv_c_volatile=no
98418dba 8617fi
ca81d7a0
JD
8618
8619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8620fi
ca81d7a0
JD
8621{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8622echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8623if test $ac_cv_c_volatile = no; then
8624
c0d27fcc 8625cat >>confdefs.h <<\_ACEOF
98418dba 8626#define volatile
c0d27fcc 8627_ACEOF
98418dba
CW
8628
8629fi
8630
ca81d7a0
JD
8631{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8632echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8633if test "${ac_cv_c_const+set}" = set; then
8634 echo $ECHO_N "(cached) $ECHO_C" >&6
8635else
8636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8637/* confdefs.h. */
8638_ACEOF
8639cat confdefs.h >>conftest.$ac_ext
8640cat >>conftest.$ac_ext <<_ACEOF
8641/* end confdefs.h. */
98418dba 8642
98418dba
CW
8643int
8644main ()
8645{
8646/* FIXME: Include the comments suggested by Paul. */
8647#ifndef __cplusplus
8648 /* Ultrix mips cc rejects this. */
8649 typedef int charset[2];
f053c89f 8650 const charset cs;
98418dba 8651 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8652 char const *const *pcpcc;
8653 char **ppc;
98418dba
CW
8654 /* NEC SVR4.0.2 mips cc rejects this. */
8655 struct point {int x, y;};
8656 static struct point const zero = {0,0};
8657 /* AIX XL C 1.02.0.0 rejects this.
8658 It does not let you subtract one const X* pointer from another in
8659 an arm of an if-expression whose if-part is not a constant
8660 expression */
8661 const char *g = "string";
f053c89f 8662 pcpcc = &g + (g ? g-g : 0);
98418dba 8663 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8664 ++pcpcc;
8665 ppc = (char**) pcpcc;
8666 pcpcc = (char const *const *) ppc;
98418dba
CW
8667 { /* SCO 3.2v4 cc rejects this. */
8668 char *t;
8669 char const *s = 0 ? (char *) 0 : (char const *) 0;
8670
8671 *t++ = 0;
ca81d7a0 8672 if (s) return 0;
98418dba
CW
8673 }
8674 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8675 int x[] = {25, 17};
8676 const int *foo = &x[0];
8677 ++foo;
8678 }
8679 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8680 typedef const int *iptr;
8681 iptr p = 0;
8682 ++p;
8683 }
8684 { /* AIX XL C 1.02.0.0 rejects this saying
8685 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8686 struct s { int j; const int *ap[3]; };
8687 struct s *b; b->j = 5;
8688 }
8689 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8690 const int foo = 10;
ca81d7a0 8691 if (!foo) return 0;
98418dba 8692 }
f053c89f 8693 return !cs[0] && !zero.x;
98418dba
CW
8694#endif
8695
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
98418dba 8708 ac_status=$?
edfaf76d
LK
8709 grep -v '^ *+' conftest.er1 >conftest.err
8710 rm -f conftest.er1
8711 cat conftest.err >&5
c0d27fcc 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
98418dba
CW
8717 ac_cv_c_const=yes
8718else
8719 echo "$as_me: failed program was:" >&5
19650fd6
AS
8720sed 's/^/| /' conftest.$ac_ext >&5
8721
ca81d7a0 8722 ac_cv_c_const=no
98418dba 8723fi
ca81d7a0
JD
8724
8725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8726fi
ca81d7a0
JD
8727{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8728echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8729if test $ac_cv_c_const = no; then
8730
c0d27fcc 8731cat >>confdefs.h <<\_ACEOF
98418dba 8732#define const
c0d27fcc 8733_ACEOF
98418dba
CW
8734
8735fi
8736
ca81d7a0
JD
8737{ echo "$as_me:$LINENO: checking for void * support" >&5
8738echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8739if test "${emacs_cv_void_star+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
98418dba 8748
98418dba
CW
8749int
8750main ()
8751{
8752void * foo;
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757rm -f conftest.$ac_objext
ca81d7a0
JD
8758if { (ac_try="$ac_compile"
8759case "(($ac_try" in
8760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8761 *) ac_try_echo=$ac_try;;
8762esac
8763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8764 (eval "$ac_compile") 2>conftest.er1
98418dba 8765 ac_status=$?
edfaf76d
LK
8766 grep -v '^ *+' conftest.er1 >conftest.err
8767 rm -f conftest.er1
8768 cat conftest.err >&5
c0d27fcc 8769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8770 (exit $ac_status); } && {
8771 test -z "$ac_c_werror_flag" ||
8772 test ! -s conftest.err
8773 } && test -s conftest.$ac_objext; then
98418dba
CW
8774 emacs_cv_void_star=yes
8775else
8776 echo "$as_me: failed program was:" >&5
19650fd6
AS
8777sed 's/^/| /' conftest.$ac_ext >&5
8778
ca81d7a0 8779 emacs_cv_void_star=no
98418dba 8780fi
ca81d7a0
JD
8781
8782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8783fi
ca81d7a0
JD
8784{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8785echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8786if test $emacs_cv_void_star = yes; then
c0d27fcc 8787 cat >>confdefs.h <<\_ACEOF
98418dba 8788#define POINTER_TYPE void
c0d27fcc 8789_ACEOF
98418dba
CW
8790
8791else
c0d27fcc 8792 cat >>confdefs.h <<\_ACEOF
98418dba 8793#define POINTER_TYPE char
c0d27fcc 8794_ACEOF
98418dba
CW
8795
8796fi
8797
c0d27fcc 8798
4494a266
JD
8799
8800
cd958eb3 8801
ca81d7a0
JD
8802{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8803echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8804set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8805if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8806 echo $ECHO_N "(cached) $ECHO_C" >&6
8807else
c0d27fcc 8808 cat >conftest.make <<\_ACEOF
ca81d7a0 8809SHELL = /bin/sh
98418dba 8810all:
ca81d7a0 8811 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8812_ACEOF
98418dba 8813# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8814case `${MAKE-make} -f conftest.make 2>/dev/null` in
8815 *@@@%%%=?*=@@@%%%*)
8816 eval ac_cv_prog_make_${ac_make}_set=yes;;
8817 *)
8818 eval ac_cv_prog_make_${ac_make}_set=no;;
8819esac
98418dba
CW
8820rm -f conftest.make
8821fi
ca81d7a0
JD
8822if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8823 { echo "$as_me:$LINENO: result: yes" >&5
8824echo "${ECHO_T}yes" >&6; }
98418dba
CW
8825 SET_MAKE=
8826else
ca81d7a0
JD
8827 { echo "$as_me:$LINENO: result: no" >&5
8828echo "${ECHO_T}no" >&6; }
98418dba
CW
8829 SET_MAKE="MAKE=${MAKE-make}"
8830fi
8831
c0d27fcc 8832
ca81d7a0
JD
8833{ echo "$as_me:$LINENO: checking for long file names" >&5
8834echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8835if test "${ac_cv_sys_long_file_names+set}" = set; then
8836 echo $ECHO_N "(cached) $ECHO_C" >&6
8837else
8838 ac_cv_sys_long_file_names=yes
8839# Test for long file names in all the places we know might matter:
8840# . the current directory, where building will happen
8841# $prefix/lib where we will be installing things
8842# $exec_prefix/lib likewise
98418dba 8843# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8844# /tmp where it might want to write temporary files
8845# /var/tmp likewise
8846# /usr/tmp likewise
ca81d7a0
JD
8847for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8848 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8849 # in the usual case where exec_prefix is '${prefix}'.
8850 case $ac_dir in #(
8851 . | /* | ?:[\\/]*) ;; #(
8852 *) continue;;
8853 esac
8854 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8855 ac_xdir=$ac_dir/cf$$
ca81d7a0 8856 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8857 ac_tf1=$ac_xdir/conftest9012345
8858 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8859 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8860 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8861 rm -f -r "$ac_xdir" 2>/dev/null
8862 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8863done
8864fi
ca81d7a0
JD
8865{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8866echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8867if test $ac_cv_sys_long_file_names = yes; then
8868
c0d27fcc 8869cat >>confdefs.h <<\_ACEOF
98418dba 8870#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8871_ACEOF
98418dba
CW
8872
8873fi
8874
c0d27fcc 8875
98418dba
CW
8876#### Choose a window system.
8877
ca81d7a0
JD
8878{ echo "$as_me:$LINENO: checking for X" >&5
8879echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8880
c0d27fcc 8881
ca81d7a0 8882# Check whether --with-x was given.
98418dba 8883if test "${with_x+set}" = set; then
ca81d7a0
JD
8884 withval=$with_x;
8885fi
98418dba 8886
98418dba
CW
8887# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8888if test "x$with_x" = xno; then
8889 # The user explicitly disabled X.
8890 have_x=disabled
8891else
ca81d7a0
JD
8892 case $x_includes,$x_libraries in #(
8893 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8894echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8895 { (exit 1); exit 1; }; };; #(
8896 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8897 echo $ECHO_N "(cached) $ECHO_C" >&6
8898else
8899 # One or both of the vars are not set, and there is no cached value.
8900ac_x_includes=no ac_x_libraries=no
ca81d7a0 8901rm -f -r conftest.dir
98418dba
CW
8902if mkdir conftest.dir; then
8903 cd conftest.dir
c0d27fcc 8904 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8905incroot:
8906 @echo incroot='${INCROOT}'
8907usrlibdir:
8908 @echo usrlibdir='${USRLIBDIR}'
8909libdir:
8910 @echo libdir='${LIBDIR}'
8911_ACEOF
8912 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8913 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8914 for ac_var in incroot usrlibdir libdir; do
8915 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8916 done
98418dba
CW
8917 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8918 for ac_extension in a so sl; do
ca81d7a0
JD
8919 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8920 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8921 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8922 fi
8923 done
8924 # Screen out bogus values from the imake configuration. They are
8925 # bogus both because they are the default anyway, and because
8926 # using them would break gcc on systems where it needs fixed includes.
8927 case $ac_im_incroot in
ca81d7a0 8928 /usr/include) ac_x_includes= ;;
98418dba
CW
8929 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8930 esac
8931 case $ac_im_usrlibdir in
8932 /usr/lib | /lib) ;;
8933 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8934 esac
8935 fi
8936 cd ..
ca81d7a0 8937 rm -f -r conftest.dir
98418dba
CW
8938fi
8939
8940# Standard set of common directories for X headers.
8941# Check X11 before X11Rn because it is often a symlink to the current release.
8942ac_x_header_dirs='
8943/usr/X11/include
8944/usr/X11R6/include
8945/usr/X11R5/include
8946/usr/X11R4/include
8947
8948/usr/include/X11
8949/usr/include/X11R6
8950/usr/include/X11R5
8951/usr/include/X11R4
8952
8953/usr/local/X11/include
8954/usr/local/X11R6/include
8955/usr/local/X11R5/include
8956/usr/local/X11R4/include
8957
8958/usr/local/include/X11
8959/usr/local/include/X11R6
8960/usr/local/include/X11R5
8961/usr/local/include/X11R4
8962
8963/usr/X386/include
8964/usr/x386/include
8965/usr/XFree86/include/X11
8966
8967/usr/include
8968/usr/local/include
8969/usr/unsupported/include
8970/usr/athena/include
8971/usr/local/x11r5/include
8972/usr/lpp/Xamples/include
8973
8974/usr/openwin/include
8975/usr/openwin/share/include'
8976
8977if test "$ac_x_includes" = no; then
ca81d7a0 8978 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8979 # First, try using that file with no special directory specified.
8980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8981/* confdefs.h. */
8982_ACEOF
8983cat confdefs.h >>conftest.$ac_ext
8984cat >>conftest.$ac_ext <<_ACEOF
8985/* end confdefs.h. */
ca81d7a0 8986#include <X11/Xlib.h>
98418dba 8987_ACEOF
ca81d7a0
JD
8988if { (ac_try="$ac_cpp conftest.$ac_ext"
8989case "(($ac_try" in
8990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8991 *) ac_try_echo=$ac_try;;
8992esac
8993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8994 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 8995 ac_status=$?
6bae0ccf 8996 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8997 rm -f conftest.er1
8998 cat conftest.err >&5
c0d27fcc 8999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9000 (exit $ac_status); } >/dev/null && {
9001 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9002 test ! -s conftest.err
9003 }; then
98418dba
CW
9004 # We can compile using X headers with no special include directory.
9005ac_x_includes=
9006else
9007 echo "$as_me: failed program was:" >&5
19650fd6
AS
9008sed 's/^/| /' conftest.$ac_ext >&5
9009
98418dba 9010 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9011 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9012 ac_x_includes=$ac_dir
9013 break
9014 fi
9015done
9016fi
ca81d7a0 9017
98418dba
CW
9018rm -f conftest.err conftest.$ac_ext
9019fi # $ac_x_includes = no
9020
9021if test "$ac_x_libraries" = no; then
9022 # Check for the libraries.
9023 # See if we find them without any special options.
9024 # Don't add to $LIBS permanently.
9025 ac_save_LIBS=$LIBS
f053c89f 9026 LIBS="-lX11 $LIBS"
98418dba 9027 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9028/* confdefs.h. */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h. */
ca81d7a0 9033#include <X11/Xlib.h>
98418dba
CW
9034int
9035main ()
9036{
ca81d7a0 9037XrmInitialize ()
98418dba
CW
9038 ;
9039 return 0;
9040}
9041_ACEOF
9042rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9043if { (ac_try="$ac_link"
9044case "(($ac_try" in
9045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9046 *) ac_try_echo=$ac_try;;
9047esac
9048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9049 (eval "$ac_link") 2>conftest.er1
98418dba 9050 ac_status=$?
edfaf76d
LK
9051 grep -v '^ *+' conftest.er1 >conftest.err
9052 rm -f conftest.er1
9053 cat conftest.err >&5
c0d27fcc 9054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9055 (exit $ac_status); } && {
9056 test -z "$ac_c_werror_flag" ||
9057 test ! -s conftest.err
9058 } && test -s conftest$ac_exeext &&
9059 $as_test_x conftest$ac_exeext; then
98418dba
CW
9060 LIBS=$ac_save_LIBS
9061# We can link X programs with no special library path.
9062ac_x_libraries=
9063else
9064 echo "$as_me: failed program was:" >&5
19650fd6
AS
9065sed 's/^/| /' conftest.$ac_ext >&5
9066
ca81d7a0 9067 LIBS=$ac_save_LIBS
98418dba
CW
9068for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9069do
9070 # Don't even attempt the hair of trying to link an X program!
9071 for ac_extension in a so sl; do
f053c89f 9072 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9073 ac_x_libraries=$ac_dir
9074 break 2
9075 fi
9076 done
9077done
9078fi
ca81d7a0 9079
f053c89f 9080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9081 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9082fi # $ac_x_libraries = no
9083
ca81d7a0
JD
9084case $ac_x_includes,$ac_x_libraries in #(
9085 no,* | *,no | *\'*)
9086 # Didn't find X, or a directory has "'" in its name.
9087 ac_cv_have_x="have_x=no";; #(
9088 *)
9089 # Record where we found X for the cache.
9090 ac_cv_have_x="have_x=yes\
9091 ac_x_includes='$ac_x_includes'\
9092 ac_x_libraries='$ac_x_libraries'"
9093esac
98418dba 9094fi
ca81d7a0
JD
9095;; #(
9096 *) have_x=yes;;
9097 esac
98418dba
CW
9098 eval "$ac_cv_have_x"
9099fi # $with_x != no
9100
9101if test "$have_x" != yes; then
ca81d7a0
JD
9102 { echo "$as_me:$LINENO: result: $have_x" >&5
9103echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9104 no_x=yes
9105else
9106 # If each of the values was on the command line, it overrides each guess.
9107 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9108 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9109 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9110 ac_cv_have_x="have_x=yes\
9111 ac_x_includes='$x_includes'\
9112 ac_x_libraries='$x_libraries'"
9113 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9114echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9115fi
9116
9117if test "$no_x" = yes; then
9118 window_system=none
9119else
9120 window_system=x11
9121fi
9122
a8cd2496
GM
9123## Workaround for bug in autoconf <= 2.62.
9124## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9125## No need to do anything special for these standard directories.
921fbdf0 9126## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9127if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9128
9129 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9130
9131fi
9132
92d1ccf4
AS
9133if test "${x_libraries}" != NONE; then
9134 if test -n "${x_libraries}"; then
9135 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9136 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9137 fi
98418dba 9138 x_default_search_path=""
92d1ccf4
AS
9139 x_search_path=${x_libraries}
9140 if test -z "${x_search_path}"; then
9141 x_search_path=/usr/lib
9142 fi
9143 for x_library in `echo ${x_search_path}: | \
9144 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9145 x_search_path="\
9146${x_library}/X11/%L/%T/%N%C%S:\
9147${x_library}/X11/%l/%T/%N%C%S:\
9148${x_library}/X11/%T/%N%C%S:\
9149${x_library}/X11/%L/%T/%N%S:\
9150${x_library}/X11/%l/%T/%N%S:\
9151${x_library}/X11/%T/%N%S"
9152 if test x"${x_default_search_path}" = x; then
9153 x_default_search_path=${x_search_path}
9154 else
9155 x_default_search_path="${x_search_path}:${x_default_search_path}"
9156 fi
9157 done
9158fi
9159if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9160 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9161fi
9162
9163if test x"${x_includes}" = x; then
9164 bitmapdir=/usr/include/X11/bitmaps
9165else
9166 # accumulate include directories that have X11 bitmap subdirectories
9167 bmd_acc="dummyval"
9168 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9169 if test -d "${bmd}/X11/bitmaps"; then
9170 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9171 fi
9172 if test -d "${bmd}/bitmaps"; then
9173 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9174 fi
9175 done
9176 if test ${bmd_acc} != "dummyval"; then
9177 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9178 fi
9179fi
9180
edfda783 9181HAVE_NS=no
ff1095d1
AR
9182NS_IMPL_COCOA=no
9183NS_IMPL_GNUSTEP=no
edfda783
AR
9184tmp_CPPFLAGS="$CPPFLAGS"
9185tmp_CFLAGS="$CFLAGS"
9186CPPFLAGS="$CPPFLAGS -x objective-c"
9187CFLAGS="$CFLAGS -x objective-c"
9188if test "${with_ns}" != no; then
9189 if test "${opsys}" = darwin; then
ff1095d1 9190 NS_IMPL_COCOA=yes
06b62770
AR
9191 ns_appdir=`pwd`/nextstep/Emacs.app
9192 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9193 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9194 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
edfda783 9195 elif test -f /etc/GNUstep/GNUstep.conf; then
ff1095d1 9196 NS_IMPL_GNUSTEP=yes
06b62770
AR
9197 ns_appdir=`pwd`/nextstep/Emacs.app
9198 ns_appbindir=`pwd`/nextstep/Emacs.app
9199 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9200 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7a55ab54 9201 GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
edfda783
AR
9202 GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
9203 GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9204 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9205 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9206 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9207 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9208 fi
9209 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9210 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9211echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9212if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9213 echo $ECHO_N "(cached) $ECHO_C" >&6
9214fi
9215{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9216echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9217else
9218 # Is the header compilable?
9219{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9220echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
9221cat >conftest.$ac_ext <<_ACEOF
9222/* confdefs.h. */
9223_ACEOF
9224cat confdefs.h >>conftest.$ac_ext
9225cat >>conftest.$ac_ext <<_ACEOF
9226/* end confdefs.h. */
9227$ac_includes_default
9228#include <AppKit/AppKit.h>
9229_ACEOF
9230rm -f conftest.$ac_objext
9231if { (ac_try="$ac_compile"
9232case "(($ac_try" in
9233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234 *) ac_try_echo=$ac_try;;
9235esac
9236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9237 (eval "$ac_compile") 2>conftest.er1
9238 ac_status=$?
9239 grep -v '^ *+' conftest.er1 >conftest.err
9240 rm -f conftest.er1
9241 cat conftest.err >&5
9242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243 (exit $ac_status); } && {
9244 test -z "$ac_c_werror_flag" ||
9245 test ! -s conftest.err
9246 } && test -s conftest.$ac_objext; then
9247 ac_header_compiler=yes
9248else
9249 echo "$as_me: failed program was:" >&5
9250sed 's/^/| /' conftest.$ac_ext >&5
9251
9252 ac_header_compiler=no
9253fi
9254
9255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9256{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9257echo "${ECHO_T}$ac_header_compiler" >&6; }
9258
9259# Is the header present?
9260{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9261echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9262cat >conftest.$ac_ext <<_ACEOF
9263/* confdefs.h. */
9264_ACEOF
9265cat confdefs.h >>conftest.$ac_ext
9266cat >>conftest.$ac_ext <<_ACEOF
9267/* end confdefs.h. */
9268#include <AppKit/AppKit.h>
9269_ACEOF
9270if { (ac_try="$ac_cpp conftest.$ac_ext"
9271case "(($ac_try" in
9272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9273 *) ac_try_echo=$ac_try;;
9274esac
9275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9276 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9277 ac_status=$?
9278 grep -v '^ *+' conftest.er1 >conftest.err
9279 rm -f conftest.er1
9280 cat conftest.err >&5
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); } >/dev/null && {
9283 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9284 test ! -s conftest.err
9285 }; then
9286 ac_header_preproc=yes
9287else
9288 echo "$as_me: failed program was:" >&5
9289sed 's/^/| /' conftest.$ac_ext >&5
9290
9291 ac_header_preproc=no
9292fi
9293
9294rm -f conftest.err conftest.$ac_ext
9295{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9296echo "${ECHO_T}$ac_header_preproc" >&6; }
9297
9298# So? What about this header?
9299case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9300 yes:no: )
9301 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9302echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9303 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9304echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9305 ac_header_preproc=yes
9306 ;;
9307 no:yes:* )
9308 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9309echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9310 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9311echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9312 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9313echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9314 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9315echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9316 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9317echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9318 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9319echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9320
9321 ;;
9322esac
9323{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9324echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9325if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9326 echo $ECHO_N "(cached) $ECHO_C" >&6
9327else
9328 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9329fi
9330{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9331echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9332
9333fi
9334if test $ac_cv_header_AppKit_AppKit_h = yes; then
9335 HAVE_NS=yes
9336fi
9337
9338
d5e2f8fe 9339 NS_HAVE_NSINTEGER=yes
519c4a9a
CY
9340 cat >conftest.$ac_ext <<_ACEOF
9341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
9346#include <Foundation/NSObjCRuntime.h>
9347int
9348main ()
9349{
9350NSInteger i;
9351 ;
9352 return 0;
9353}
9354_ACEOF
9355rm -f conftest.$ac_objext
9356if { (ac_try="$ac_compile"
9357case "(($ac_try" in
9358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359 *) ac_try_echo=$ac_try;;
9360esac
9361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9362 (eval "$ac_compile") 2>conftest.er1
9363 ac_status=$?
9364 grep -v '^ *+' conftest.er1 >conftest.err
9365 rm -f conftest.er1
9366 cat conftest.err >&5
9367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368 (exit $ac_status); } && {
9369 test -z "$ac_c_werror_flag" ||
9370 test ! -s conftest.err
9371 } && test -s conftest.$ac_objext; then
d5e2f8fe 9372 ns_have_nsinteger=yes
519c4a9a
CY
9373else
9374 echo "$as_me: failed program was:" >&5
9375sed 's/^/| /' conftest.$ac_ext >&5
9376
d5e2f8fe 9377 ns_have_nsinteger=no
519c4a9a
CY
9378fi
9379
9380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d5e2f8fe
AR
9381 if test $ns_have_nsinteger = no; then
9382 NS_HAVE_NSINTEGER=no
519c4a9a 9383 fi
edfda783
AR
9384fi
9385if test "${HAVE_NS}" = yes; then
9386 window_system=nextstep
9387 with_xft=no
9388 with_freetype=no
06b62770
AR
9389 # set up packaging dirs
9390 exec_prefix=${ns_appbindir}
9391 libexecdir=${ns_appbindir}/libexec
9392 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9393 prefix=${ns_appresdir}
9394 fi
edfda783
AR
9395fi
9396CFLAGS="$tmp_CFLAGS"
9397CPPFLAGS="$tmp_CPPFLAGS"
9398
1d4d5604
YM
9399case "${window_system}" in
9400 x11 )
9401 HAVE_X_WINDOWS=yes
9402 HAVE_X11=yes
9403 case "${with_x_toolkit}" in
9404 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9405 motif ) USE_X_TOOLKIT=MOTIF ;;
9406 gtk ) with_gtk=yes
9407 USE_X_TOOLKIT=none ;;
9408 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9409 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9410 esac
9411 ;;
9e2a2647 9412 nextstep | none )
1d4d5604
YM
9413 HAVE_X_WINDOWS=no
9414 HAVE_X11=no
9415 USE_X_TOOLKIT=none
9416 ;;
9417esac
9418
cfe440b8
JD
9419if test "$window_system" = none && test "X$with_x" != "Xno"; then
9420 # Extract the first word of "X", so it can be a program name with args.
9421set dummy X; ac_word=$2
9422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9424if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9425 echo $ECHO_N "(cached) $ECHO_C" >&6
9426else
9427 if test -n "$HAVE_XSERVER"; then
9428 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9429else
9430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9431for as_dir in $PATH
9432do
9433 IFS=$as_save_IFS
9434 test -z "$as_dir" && as_dir=.
9435 for ac_exec_ext in '' $ac_executable_extensions; do
9436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9437 ac_cv_prog_HAVE_XSERVER="true"
9438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9439 break 2
9440 fi
9441done
9442done
9443IFS=$as_save_IFS
9444
9445 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9446fi
9447fi
9448HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9449if test -n "$HAVE_XSERVER"; then
9450 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9451echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9452else
9453 { echo "$as_me:$LINENO: result: no" >&5
9454echo "${ECHO_T}no" >&6; }
9455fi
9456
9457
9458 if test "$HAVE_XSERVER" = true ||
9459 test -n "$DISPLAY" ||
9460 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9461 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9462were found. You should install the relevant development files for X
9463and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9464sure you have development files for image handling, i.e.
9465tiff, gif, jpeg, png and xpm.
9466If you are sure you want Emacs compiled without X window support, pass
9467 --without-x
9468to configure." >&5
9469echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9470were found. You should install the relevant development files for X
9471and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9472sure you have development files for image handling, i.e.
9473tiff, gif, jpeg, png and xpm.
9474If you are sure you want Emacs compiled without X window support, pass
9475 --without-x
9476to configure." >&2;}
9477 { (exit 1); exit 1; }; }
9478 fi
9479fi
9480
1d4d5604
YM
9481### If we're using X11, we should use the X menu package.
9482HAVE_MENUS=no
9483case ${HAVE_X11} in
9484 yes ) HAVE_MENUS=yes ;;
9485esac
9486
98418dba
CW
9487# Do the opsystem or machine files prohibit the use of the GNU malloc?
9488# Assume not, until told otherwise.
9489GNU_MALLOC=yes
9490doug_lea_malloc=yes
ca81d7a0
JD
9491{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9492echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9493if test "${ac_cv_func_malloc_get_state+set}" = set; then
9494 echo $ECHO_N "(cached) $ECHO_C" >&6
9495else
9496 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9497/* confdefs.h. */
9498_ACEOF
9499cat confdefs.h >>conftest.$ac_ext
9500cat >>conftest.$ac_ext <<_ACEOF
9501/* end confdefs.h. */
edfaf76d
LK
9502/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9503 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9504#define malloc_get_state innocuous_malloc_get_state
9505
98418dba 9506/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9507 which can conflict with char malloc_get_state (); below.
9508 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9509 <limits.h> exists even on freestanding compilers. */
edfaf76d 9510
19650fd6
AS
9511#ifdef __STDC__
9512# include <limits.h>
9513#else
9514# include <assert.h>
9515#endif
edfaf76d
LK
9516
9517#undef malloc_get_state
9518
ca81d7a0
JD
9519/* Override any GCC internal prototype to avoid an error.
9520 Use char because int might match the return type of a GCC
9521 builtin and then its argument prototype would still apply. */
98418dba
CW
9522#ifdef __cplusplus
9523extern "C"
9524#endif
98418dba 9525char malloc_get_state ();
98418dba
CW
9526/* The GNU C library defines this for functions which it implements
9527 to always fail with ENOSYS. Some functions are actually named
9528 something starting with __ and the normal name is an alias. */
ca81d7a0 9529#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9530choke me
98418dba
CW
9531#endif
9532
19650fd6
AS
9533int
9534main ()
9535{
ca81d7a0 9536return malloc_get_state ();
98418dba
CW
9537 ;
9538 return 0;
9539}
9540_ACEOF
9541rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9542if { (ac_try="$ac_link"
9543case "(($ac_try" in
9544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9545 *) ac_try_echo=$ac_try;;
9546esac
9547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9548 (eval "$ac_link") 2>conftest.er1
98418dba 9549 ac_status=$?
edfaf76d
LK
9550 grep -v '^ *+' conftest.er1 >conftest.err
9551 rm -f conftest.er1
9552 cat conftest.err >&5
c0d27fcc 9553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9554 (exit $ac_status); } && {
9555 test -z "$ac_c_werror_flag" ||
9556 test ! -s conftest.err
9557 } && test -s conftest$ac_exeext &&
9558 $as_test_x conftest$ac_exeext; then
98418dba
CW
9559 ac_cv_func_malloc_get_state=yes
9560else
9561 echo "$as_me: failed program was:" >&5
19650fd6
AS
9562sed 's/^/| /' conftest.$ac_ext >&5
9563
ca81d7a0 9564 ac_cv_func_malloc_get_state=no
98418dba 9565fi
ca81d7a0 9566
f053c89f 9567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9568 conftest$ac_exeext conftest.$ac_ext
98418dba 9569fi
ca81d7a0
JD
9570{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9571echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9572if test $ac_cv_func_malloc_get_state = yes; then
9573 :
9574else
9575 doug_lea_malloc=no
9576fi
9577
ca81d7a0
JD
9578{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9579echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9580if test "${ac_cv_func_malloc_set_state+set}" = set; then
9581 echo $ECHO_N "(cached) $ECHO_C" >&6
9582else
9583 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9584/* confdefs.h. */
9585_ACEOF
9586cat confdefs.h >>conftest.$ac_ext
9587cat >>conftest.$ac_ext <<_ACEOF
9588/* end confdefs.h. */
edfaf76d
LK
9589/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9590 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9591#define malloc_set_state innocuous_malloc_set_state
9592
98418dba 9593/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9594 which can conflict with char malloc_set_state (); below.
9595 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9596 <limits.h> exists even on freestanding compilers. */
edfaf76d 9597
19650fd6
AS
9598#ifdef __STDC__
9599# include <limits.h>
9600#else
9601# include <assert.h>
9602#endif
edfaf76d
LK
9603
9604#undef malloc_set_state
9605
ca81d7a0
JD
9606/* Override any GCC internal prototype to avoid an error.
9607 Use char because int might match the return type of a GCC
9608 builtin and then its argument prototype would still apply. */
98418dba
CW
9609#ifdef __cplusplus
9610extern "C"
9611#endif
98418dba 9612char malloc_set_state ();
98418dba
CW
9613/* The GNU C library defines this for functions which it implements
9614 to always fail with ENOSYS. Some functions are actually named
9615 something starting with __ and the normal name is an alias. */
ca81d7a0 9616#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9617choke me
98418dba
CW
9618#endif
9619
19650fd6
AS
9620int
9621main ()
9622{
ca81d7a0 9623return malloc_set_state ();
98418dba
CW
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9629if { (ac_try="$ac_link"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
9634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635 (eval "$ac_link") 2>conftest.er1
98418dba 9636 ac_status=$?
edfaf76d
LK
9637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
c0d27fcc 9640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest$ac_exeext &&
9645 $as_test_x conftest$ac_exeext; then
98418dba
CW
9646 ac_cv_func_malloc_set_state=yes
9647else
9648 echo "$as_me: failed program was:" >&5
19650fd6
AS
9649sed 's/^/| /' conftest.$ac_ext >&5
9650
ca81d7a0 9651 ac_cv_func_malloc_set_state=no
98418dba 9652fi
ca81d7a0 9653
f053c89f 9654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9655 conftest$ac_exeext conftest.$ac_ext
98418dba 9656fi
ca81d7a0
JD
9657{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9658echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9659if test $ac_cv_func_malloc_set_state = yes; then
9660 :
9661else
9662 doug_lea_malloc=no
9663fi
9664
ca81d7a0
JD
9665{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9666echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9667if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9668 echo $ECHO_N "(cached) $ECHO_C" >&6
9669else
9670 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
98418dba 9676extern void (* __after_morecore_hook)();
98418dba
CW
9677int
9678main ()
9679{
9680__after_morecore_hook = 0
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9686if { (ac_try="$ac_link"
9687case "(($ac_try" in
9688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9689 *) ac_try_echo=$ac_try;;
9690esac
9691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9692 (eval "$ac_link") 2>conftest.er1
98418dba 9693 ac_status=$?
edfaf76d
LK
9694 grep -v '^ *+' conftest.er1 >conftest.err
9695 rm -f conftest.er1
9696 cat conftest.err >&5
c0d27fcc 9697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9698 (exit $ac_status); } && {
9699 test -z "$ac_c_werror_flag" ||
9700 test ! -s conftest.err
9701 } && test -s conftest$ac_exeext &&
9702 $as_test_x conftest$ac_exeext; then
98418dba
CW
9703 emacs_cv_var___after_morecore_hook=yes
9704else
9705 echo "$as_me: failed program was:" >&5
19650fd6
AS
9706sed 's/^/| /' conftest.$ac_ext >&5
9707
ca81d7a0 9708 emacs_cv_var___after_morecore_hook=no
98418dba 9709fi
ca81d7a0 9710
f053c89f 9711rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9712 conftest$ac_exeext conftest.$ac_ext
98418dba 9713fi
ca81d7a0
JD
9714{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9715echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9716if test $emacs_cv_var___after_morecore_hook = no; then
9717 doug_lea_malloc=no
9718fi
9719if test "${system_malloc}" = "yes"; then
9720 GNU_MALLOC=no
9721 GNU_MALLOC_reason="
9722 (The GNU allocators don't work with this system configuration.)"
9723fi
9724if test "$doug_lea_malloc" = "yes" ; then
9725 if test "$GNU_MALLOC" = yes ; then
9726 GNU_MALLOC_reason="
9727 (Using Doug Lea's new malloc from the GNU C Library.)"
9728 fi
b936fae4 9729
c0d27fcc 9730cat >>confdefs.h <<\_ACEOF
98418dba 9731#define DOUG_LEA_MALLOC 1
c0d27fcc 9732_ACEOF
98418dba
CW
9733
9734fi
9735
9736if test x"${REL_ALLOC}" = x; then
9737 REL_ALLOC=${GNU_MALLOC}
9738fi
9739
9740
c0d27fcc
MR
9741
9742
9743for ac_header in stdlib.h unistd.h
98418dba
CW
9744do
9745as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9746if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9747 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9748echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9749if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9750 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9751fi
ca81d7a0
JD
9752ac_res=`eval echo '${'$as_ac_Header'}'`
9753 { echo "$as_me:$LINENO: result: $ac_res" >&5
9754echo "${ECHO_T}$ac_res" >&6; }
98418dba 9755else
c0d27fcc 9756 # Is the header compilable?
ca81d7a0
JD
9757{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9758echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9759cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9760/* confdefs.h. */
9761_ACEOF
9762cat confdefs.h >>conftest.$ac_ext
9763cat >>conftest.$ac_ext <<_ACEOF
9764/* end confdefs.h. */
98418dba
CW
9765$ac_includes_default
9766#include <$ac_header>
9767_ACEOF
9768rm -f conftest.$ac_objext
ca81d7a0
JD
9769if { (ac_try="$ac_compile"
9770case "(($ac_try" in
9771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9772 *) ac_try_echo=$ac_try;;
9773esac
9774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9775 (eval "$ac_compile") 2>conftest.er1
98418dba 9776 ac_status=$?
edfaf76d
LK
9777 grep -v '^ *+' conftest.er1 >conftest.err
9778 rm -f conftest.er1
9779 cat conftest.err >&5
c0d27fcc 9780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9781 (exit $ac_status); } && {
9782 test -z "$ac_c_werror_flag" ||
9783 test ! -s conftest.err
9784 } && test -s conftest.$ac_objext; then
c0d27fcc 9785 ac_header_compiler=yes
98418dba
CW
9786else
9787 echo "$as_me: failed program was:" >&5
19650fd6
AS
9788sed 's/^/| /' conftest.$ac_ext >&5
9789
ca81d7a0 9790 ac_header_compiler=no
98418dba 9791fi
ca81d7a0
JD
9792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9794{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9795echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9796
c0d27fcc 9797# Is the header present?
ca81d7a0
JD
9798{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9799echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9800cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9801/* confdefs.h. */
9802_ACEOF
9803cat confdefs.h >>conftest.$ac_ext
9804cat >>conftest.$ac_ext <<_ACEOF
9805/* end confdefs.h. */
98418dba
CW
9806#include <$ac_header>
9807_ACEOF
ca81d7a0
JD
9808if { (ac_try="$ac_cpp conftest.$ac_ext"
9809case "(($ac_try" in
9810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9811 *) ac_try_echo=$ac_try;;
9812esac
9813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9815 ac_status=$?
6bae0ccf 9816 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9817 rm -f conftest.er1
9818 cat conftest.err >&5
c0d27fcc 9819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9820 (exit $ac_status); } >/dev/null && {
9821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9822 test ! -s conftest.err
9823 }; then
c0d27fcc 9824 ac_header_preproc=yes
98418dba
CW
9825else
9826 echo "$as_me: failed program was:" >&5
19650fd6
AS
9827sed 's/^/| /' conftest.$ac_ext >&5
9828
c0d27fcc 9829 ac_header_preproc=no
98418dba 9830fi
ca81d7a0 9831
98418dba 9832rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9833{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9834echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9835
9836# So? What about this header?
edfaf76d
LK
9837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9838 yes:no: )
c0d27fcc
MR
9839 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9840echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9841 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9842echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9843 ac_header_preproc=yes
9844 ;;
9845 no:yes:* )
9846 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9847echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9848 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9849echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9850 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9851echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9852 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9853echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9854 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9855echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9856 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9857echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9858
19650fd6 9859 ;;
c0d27fcc 9860esac
ca81d7a0
JD
9861{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9862echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9863if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9864 echo $ECHO_N "(cached) $ECHO_C" >&6
9865else
edfaf76d 9866 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9867fi
ca81d7a0
JD
9868ac_res=`eval echo '${'$as_ac_Header'}'`
9869 { echo "$as_me:$LINENO: result: $ac_res" >&5
9870echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9871
9872fi
98418dba 9873if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9874 cat >>confdefs.h <<_ACEOF
98418dba 9875#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9876_ACEOF
98418dba
CW
9877
9878fi
c0d27fcc 9879
98418dba
CW
9880done
9881
c0d27fcc 9882
98418dba
CW
9883for ac_func in getpagesize
9884do
9885as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9886{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9887echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9888if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9889 echo $ECHO_N "(cached) $ECHO_C" >&6
9890else
9891 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9892/* confdefs.h. */
9893_ACEOF
9894cat confdefs.h >>conftest.$ac_ext
9895cat >>conftest.$ac_ext <<_ACEOF
9896/* end confdefs.h. */
edfaf76d
LK
9897/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9898 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9899#define $ac_func innocuous_$ac_func
9900
98418dba 9901/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9902 which can conflict with char $ac_func (); below.
9903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9904 <limits.h> exists even on freestanding compilers. */
edfaf76d 9905
19650fd6
AS
9906#ifdef __STDC__
9907# include <limits.h>
9908#else
9909# include <assert.h>
9910#endif
edfaf76d
LK
9911
9912#undef $ac_func
9913
ca81d7a0
JD
9914/* Override any GCC internal prototype to avoid an error.
9915 Use char because int might match the return type of a GCC
9916 builtin and then its argument prototype would still apply. */
98418dba
CW
9917#ifdef __cplusplus
9918extern "C"
9919#endif
98418dba 9920char $ac_func ();
98418dba
CW
9921/* The GNU C library defines this for functions which it implements
9922 to always fail with ENOSYS. Some functions are actually named
9923 something starting with __ and the normal name is an alias. */
ca81d7a0 9924#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9925choke me
98418dba
CW
9926#endif
9927
19650fd6
AS
9928int
9929main ()
9930{
ca81d7a0 9931return $ac_func ();
98418dba
CW
9932 ;
9933 return 0;
9934}
9935_ACEOF
9936rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9937if { (ac_try="$ac_link"
9938case "(($ac_try" in
9939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9940 *) ac_try_echo=$ac_try;;
9941esac
9942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9943 (eval "$ac_link") 2>conftest.er1
98418dba 9944 ac_status=$?
edfaf76d
LK
9945 grep -v '^ *+' conftest.er1 >conftest.err
9946 rm -f conftest.er1
9947 cat conftest.err >&5
c0d27fcc 9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9949 (exit $ac_status); } && {
9950 test -z "$ac_c_werror_flag" ||
9951 test ! -s conftest.err
9952 } && test -s conftest$ac_exeext &&
9953 $as_test_x conftest$ac_exeext; then
98418dba
CW
9954 eval "$as_ac_var=yes"
9955else
9956 echo "$as_me: failed program was:" >&5
19650fd6
AS
9957sed 's/^/| /' conftest.$ac_ext >&5
9958
ca81d7a0 9959 eval "$as_ac_var=no"
98418dba 9960fi
ca81d7a0 9961
f053c89f 9962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9963 conftest$ac_exeext conftest.$ac_ext
98418dba 9964fi
ca81d7a0
JD
9965ac_res=`eval echo '${'$as_ac_var'}'`
9966 { echo "$as_me:$LINENO: result: $ac_res" >&5
9967echo "${ECHO_T}$ac_res" >&6; }
98418dba 9968if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9969 cat >>confdefs.h <<_ACEOF
98418dba 9970#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9971_ACEOF
98418dba
CW
9972
9973fi
9974done
9975
ca81d7a0
JD
9976{ echo "$as_me:$LINENO: checking for working mmap" >&5
9977echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9978if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9979 echo $ECHO_N "(cached) $ECHO_C" >&6
9980else
9981 if test "$cross_compiling" = yes; then
9982 ac_cv_func_mmap_fixed_mapped=no
9983else
9984 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
98418dba 9990$ac_includes_default
c0d27fcc
MR
9991/* malloc might have been renamed as rpl_malloc. */
9992#undef malloc
9993
98418dba
CW
9994/* Thanks to Mike Haertel and Jim Avera for this test.
9995 Here is a matrix of mmap possibilities:
9996 mmap private not fixed
9997 mmap private fixed at somewhere currently unmapped
9998 mmap private fixed at somewhere already mapped
9999 mmap shared not fixed
10000 mmap shared fixed at somewhere currently unmapped
10001 mmap shared fixed at somewhere already mapped
10002 For private mappings, we should verify that changes cannot be read()
10003 back from the file, nor mmap's back from the file at a different
10004 address. (There have been systems where private was not correctly
10005 implemented like the infamous i386 svr4.0, and systems where the
10006 VM page cache was not coherent with the file system buffer cache
10007 like early versions of FreeBSD and possibly contemporary NetBSD.)
10008 For shared mappings, we should conversely verify that changes get
c0d27fcc 10009 propagated back to all the places they're supposed to be.
98418dba
CW
10010
10011 Grep wants private fixed already mapped.
10012 The main things grep needs to know about mmap are:
10013 * does it exist and is it safe to write into the mmap'd area
10014 * how to use it (BSD variants) */
10015
10016#include <fcntl.h>
10017#include <sys/mman.h>
10018
f053c89f 10019#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10020char *malloc ();
10021#endif
10022
10023/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10024#ifndef HAVE_GETPAGESIZE
98418dba 10025/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10026# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10027# define HAVE_SYS_PARAM_H 1
10028# endif
10029
10030# ifdef _SC_PAGESIZE
10031# define getpagesize() sysconf(_SC_PAGESIZE)
10032# else /* no _SC_PAGESIZE */
f053c89f 10033# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10034# include <sys/param.h>
10035# ifdef EXEC_PAGESIZE
10036# define getpagesize() EXEC_PAGESIZE
10037# else /* no EXEC_PAGESIZE */
10038# ifdef NBPG
10039# define getpagesize() NBPG * CLSIZE
10040# ifndef CLSIZE
10041# define CLSIZE 1
10042# endif /* no CLSIZE */
10043# else /* no NBPG */
10044# ifdef NBPC
10045# define getpagesize() NBPC
10046# else /* no NBPC */
10047# ifdef PAGESIZE
10048# define getpagesize() PAGESIZE
10049# endif /* PAGESIZE */
10050# endif /* no NBPC */
10051# endif /* no NBPG */
10052# endif /* no EXEC_PAGESIZE */
10053# else /* no HAVE_SYS_PARAM_H */
10054# define getpagesize() 8192 /* punt totally */
10055# endif /* no HAVE_SYS_PARAM_H */
10056# endif /* no _SC_PAGESIZE */
10057
10058#endif /* no HAVE_GETPAGESIZE */
10059
10060int
10061main ()
10062{
10063 char *data, *data2, *data3;
10064 int i, pagesize;
10065 int fd;
10066
10067 pagesize = getpagesize ();
10068
10069 /* First, make a file with some known garbage in it. */
10070 data = (char *) malloc (pagesize);
10071 if (!data)
ca81d7a0 10072 return 1;
98418dba
CW
10073 for (i = 0; i < pagesize; ++i)
10074 *(data + i) = rand ();
10075 umask (0);
10076 fd = creat ("conftest.mmap", 0600);
10077 if (fd < 0)
ca81d7a0 10078 return 1;
98418dba 10079 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10080 return 1;
98418dba
CW
10081 close (fd);
10082
10083 /* Next, try to mmap the file at a fixed address which already has
10084 something else allocated at it. If we can, also make sure that
10085 we see the same garbage. */
10086 fd = open ("conftest.mmap", O_RDWR);
10087 if (fd < 0)
ca81d7a0 10088 return 1;
98418dba
CW
10089 data2 = (char *) malloc (2 * pagesize);
10090 if (!data2)
ca81d7a0
JD
10091 return 1;
10092 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10093 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10094 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10095 return 1;
98418dba
CW
10096 for (i = 0; i < pagesize; ++i)
10097 if (*(data + i) != *(data2 + i))
ca81d7a0 10098 return 1;
98418dba
CW
10099
10100 /* Finally, make sure that changes to the mapped area do not
10101 percolate back to the file as seen by read(). (This is a bug on
10102 some variants of i386 svr4.0.) */
10103 for (i = 0; i < pagesize; ++i)
10104 *(data2 + i) = *(data2 + i) + 1;
10105 data3 = (char *) malloc (pagesize);
10106 if (!data3)
ca81d7a0 10107 return 1;
98418dba 10108 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10109 return 1;
98418dba
CW
10110 for (i = 0; i < pagesize; ++i)
10111 if (*(data + i) != *(data3 + i))
ca81d7a0 10112 return 1;
98418dba 10113 close (fd);
ca81d7a0 10114 return 0;
98418dba
CW
10115}
10116_ACEOF
10117rm -f conftest$ac_exeext
ca81d7a0
JD
10118if { (ac_try="$ac_link"
10119case "(($ac_try" in
10120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10121 *) ac_try_echo=$ac_try;;
10122esac
10123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10124 (eval "$ac_link") 2>&5
98418dba 10125 ac_status=$?
c0d27fcc 10126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10128 { (case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
10132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10133 (eval "$ac_try") 2>&5
98418dba 10134 ac_status=$?
c0d27fcc 10135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10136 (exit $ac_status); }; }; then
10137 ac_cv_func_mmap_fixed_mapped=yes
10138else
10139 echo "$as_me: program exited with status $ac_status" >&5
10140echo "$as_me: failed program was:" >&5
19650fd6
AS
10141sed 's/^/| /' conftest.$ac_ext >&5
10142
c0d27fcc 10143( exit $ac_status )
98418dba
CW
10144ac_cv_func_mmap_fixed_mapped=no
10145fi
ca81d7a0 10146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10147fi
ca81d7a0
JD
10148
10149
98418dba 10150fi
ca81d7a0
JD
10151{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10152echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10153if test $ac_cv_func_mmap_fixed_mapped = yes; then
10154
c0d27fcc 10155cat >>confdefs.h <<\_ACEOF
98418dba 10156#define HAVE_MMAP 1
c0d27fcc 10157_ACEOF
98418dba
CW
10158
10159fi
10160rm -f conftest.mmap
10161
10162if test $use_mmap_for_buffers = yes; then
10163 REL_ALLOC=no
10164fi
10165
10166LIBS="$libsrc_libs $LIBS"
10167
c0d27fcc 10168
ca81d7a0
JD
10169{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10170echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10171if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10172 echo $ECHO_N "(cached) $ECHO_C" >&6
10173else
10174 ac_check_lib_save_LIBS=$LIBS
10175LIBS="-ldnet $LIBS"
10176cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10177/* confdefs.h. */
10178_ACEOF
10179cat confdefs.h >>conftest.$ac_ext
10180cat >>conftest.$ac_ext <<_ACEOF
10181/* end confdefs.h. */
98418dba 10182
ca81d7a0
JD
10183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
98418dba
CW
10186#ifdef __cplusplus
10187extern "C"
10188#endif
98418dba 10189char dnet_ntoa ();
98418dba
CW
10190int
10191main ()
10192{
ca81d7a0 10193return dnet_ntoa ();
98418dba
CW
10194 ;
10195 return 0;
10196}
10197_ACEOF
10198rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10199if { (ac_try="$ac_link"
10200case "(($ac_try" in
10201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10202 *) ac_try_echo=$ac_try;;
10203esac
10204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10205 (eval "$ac_link") 2>conftest.er1
98418dba 10206 ac_status=$?
edfaf76d
LK
10207 grep -v '^ *+' conftest.er1 >conftest.err
10208 rm -f conftest.er1
10209 cat conftest.err >&5
c0d27fcc 10210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10211 (exit $ac_status); } && {
10212 test -z "$ac_c_werror_flag" ||
10213 test ! -s conftest.err
10214 } && test -s conftest$ac_exeext &&
10215 $as_test_x conftest$ac_exeext; then
98418dba
CW
10216 ac_cv_lib_dnet_dnet_ntoa=yes
10217else
10218 echo "$as_me: failed program was:" >&5
19650fd6
AS
10219sed 's/^/| /' conftest.$ac_ext >&5
10220
ca81d7a0 10221 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10222fi
ca81d7a0 10223
f053c89f 10224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10225 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10226LIBS=$ac_check_lib_save_LIBS
10227fi
ca81d7a0
JD
10228{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10229echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10230if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10231 cat >>confdefs.h <<_ACEOF
98418dba 10232#define HAVE_LIBDNET 1
c0d27fcc 10233_ACEOF
98418dba
CW
10234
10235 LIBS="-ldnet $LIBS"
10236
10237fi
10238
c0d27fcc 10239
ca81d7a0
JD
10240{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10241echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10242if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10243 echo $ECHO_N "(cached) $ECHO_C" >&6
10244else
10245 ac_check_lib_save_LIBS=$LIBS
10246LIBS="-lXbsd $LIBS"
10247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10248/* confdefs.h. */
10249_ACEOF
10250cat confdefs.h >>conftest.$ac_ext
10251cat >>conftest.$ac_ext <<_ACEOF
10252/* end confdefs.h. */
98418dba 10253
c0d27fcc 10254
98418dba
CW
10255int
10256main ()
10257{
ca81d7a0 10258return main ();
98418dba
CW
10259 ;
10260 return 0;
10261}
10262_ACEOF
10263rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10264if { (ac_try="$ac_link"
10265case "(($ac_try" in
10266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10267 *) ac_try_echo=$ac_try;;
10268esac
10269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10270 (eval "$ac_link") 2>conftest.er1
98418dba 10271 ac_status=$?
edfaf76d
LK
10272 grep -v '^ *+' conftest.er1 >conftest.err
10273 rm -f conftest.er1
10274 cat conftest.err >&5
c0d27fcc 10275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10276 (exit $ac_status); } && {
10277 test -z "$ac_c_werror_flag" ||
10278 test ! -s conftest.err
10279 } && test -s conftest$ac_exeext &&
10280 $as_test_x conftest$ac_exeext; then
98418dba
CW
10281 ac_cv_lib_Xbsd_main=yes
10282else
10283 echo "$as_me: failed program was:" >&5
19650fd6
AS
10284sed 's/^/| /' conftest.$ac_ext >&5
10285
ca81d7a0 10286 ac_cv_lib_Xbsd_main=no
98418dba 10287fi
ca81d7a0 10288
f053c89f 10289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10290 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10291LIBS=$ac_check_lib_save_LIBS
10292fi
ca81d7a0
JD
10293{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10294echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10295if test $ac_cv_lib_Xbsd_main = yes; then
10296 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10297fi
10298
c0d27fcc
MR
10299
10300
ca81d7a0
JD
10301{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10302echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10303if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
10305else
10306 ac_check_lib_save_LIBS=$LIBS
10307LIBS="-lpthreads $LIBS"
10308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10309/* confdefs.h. */
10310_ACEOF
10311cat confdefs.h >>conftest.$ac_ext
10312cat >>conftest.$ac_ext <<_ACEOF
10313/* end confdefs.h. */
98418dba 10314
ca81d7a0
JD
10315/* Override any GCC internal prototype to avoid an error.
10316 Use char because int might match the return type of a GCC
10317 builtin and then its argument prototype would still apply. */
98418dba
CW
10318#ifdef __cplusplus
10319extern "C"
10320#endif
98418dba 10321char cma_open ();
98418dba
CW
10322int
10323main ()
10324{
ca81d7a0 10325return cma_open ();
98418dba
CW
10326 ;
10327 return 0;
10328}
10329_ACEOF
10330rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10331if { (ac_try="$ac_link"
10332case "(($ac_try" in
10333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10334 *) ac_try_echo=$ac_try;;
10335esac
10336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10337 (eval "$ac_link") 2>conftest.er1
98418dba 10338 ac_status=$?
edfaf76d
LK
10339 grep -v '^ *+' conftest.er1 >conftest.err
10340 rm -f conftest.er1
10341 cat conftest.err >&5
c0d27fcc 10342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10343 (exit $ac_status); } && {
10344 test -z "$ac_c_werror_flag" ||
10345 test ! -s conftest.err
10346 } && test -s conftest$ac_exeext &&
10347 $as_test_x conftest$ac_exeext; then
98418dba
CW
10348 ac_cv_lib_pthreads_cma_open=yes
10349else
10350 echo "$as_me: failed program was:" >&5
19650fd6
AS
10351sed 's/^/| /' conftest.$ac_ext >&5
10352
ca81d7a0 10353 ac_cv_lib_pthreads_cma_open=no
98418dba 10354fi
ca81d7a0 10355
f053c89f 10356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10357 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10358LIBS=$ac_check_lib_save_LIBS
10359fi
ca81d7a0
JD
10360{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10361echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10362if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10363 cat >>confdefs.h <<_ACEOF
98418dba 10364#define HAVE_LIBPTHREADS 1
c0d27fcc 10365_ACEOF
98418dba
CW
10366
10367 LIBS="-lpthreads $LIBS"
10368
10369fi
10370
c0d27fcc 10371
55597d70
DL
10372
10373case ${host_os} in
10374aix*)
ca81d7a0
JD
10375 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10376echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10377if test "${gdb_cv_bigtoc+set}" = set; then
10378 echo $ECHO_N "(cached) $ECHO_C" >&6
10379else
10380
10381 case $GCC in
10382 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10383 *) gdb_cv_bigtoc=-bbigtoc ;;
10384 esac
10385
10386 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10387 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10388/* confdefs.h. */
10389_ACEOF
10390cat confdefs.h >>conftest.$ac_ext
10391cat >>conftest.$ac_ext <<_ACEOF
10392/* end confdefs.h. */
55597d70
DL
10393
10394int
10395main ()
10396{
10397int i;
10398 ;
10399 return 0;
10400}
10401_ACEOF
10402rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10403if { (ac_try="$ac_link"
10404case "(($ac_try" in
10405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10406 *) ac_try_echo=$ac_try;;
10407esac
10408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10409 (eval "$ac_link") 2>conftest.er1
55597d70 10410 ac_status=$?
edfaf76d
LK
10411 grep -v '^ *+' conftest.er1 >conftest.err
10412 rm -f conftest.er1
10413 cat conftest.err >&5
55597d70 10414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10415 (exit $ac_status); } && {
10416 test -z "$ac_c_werror_flag" ||
10417 test ! -s conftest.err
10418 } && test -s conftest$ac_exeext &&
10419 $as_test_x conftest$ac_exeext; then
55597d70
DL
10420 :
10421else
10422 echo "$as_me: failed program was:" >&5
19650fd6
AS
10423sed 's/^/| /' conftest.$ac_ext >&5
10424
ca81d7a0 10425 gdb_cv_bigtoc=
55597d70 10426fi
ca81d7a0 10427
f053c89f 10428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10429 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10430
10431fi
ca81d7a0
JD
10432{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10433echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10434 ;;
10435esac
10436
ae1a998c
RS
10437# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10438# used for the tests that follow. We set them back to REAL_CFLAGS and
10439# REAL_CPPFLAGS later on.
98418dba
CW
10440
10441REAL_CPPFLAGS="$CPPFLAGS"
10442
10443if test "${HAVE_X11}" = "yes"; then
10444 DEFS="$C_SWITCH_X_SITE $DEFS"
10445 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10446 LIBS="$LIBX $LIBS"
10447 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10448 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10449
10450 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10451 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10452 # but it's more convenient here to set LD_RUN_PATH
10453 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10454 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10455 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10456 export LD_RUN_PATH
10457 fi
10458
10459 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10460 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10461echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10462 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10463/* confdefs.h. */
10464_ACEOF
10465cat confdefs.h >>conftest.$ac_ext
10466cat >>conftest.$ac_ext <<_ACEOF
10467/* end confdefs.h. */
98418dba 10468
98418dba
CW
10469int
10470main ()
10471{
10472XOpenDisplay ("foo");
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10478if { (ac_try="$ac_link"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
10483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10484 (eval "$ac_link") 2>conftest.er1
98418dba 10485 ac_status=$?
edfaf76d
LK
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
c0d27fcc 10489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest$ac_exeext &&
10494 $as_test_x conftest$ac_exeext; then
35996d22 10495 xlinux_first_failure=no
98418dba
CW
10496else
10497 echo "$as_me: failed program was:" >&5
19650fd6
AS
10498sed 's/^/| /' conftest.$ac_ext >&5
10499
ca81d7a0 10500 xlinux_first_failure=yes
98418dba 10501fi
ca81d7a0 10502
f053c89f 10503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10504 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10505 if test "${xlinux_first_failure}" = "yes"; then
10506 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10507 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10508 OLD_CPPFLAGS="$CPPFLAGS"
10509 OLD_LIBS="$LIBS"
10510 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10511 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10512 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10513 LIBS="$LIBS -b i486-linuxaout"
10514 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10515/* confdefs.h. */
10516_ACEOF
10517cat confdefs.h >>conftest.$ac_ext
10518cat >>conftest.$ac_ext <<_ACEOF
10519/* end confdefs.h. */
98418dba 10520
98418dba
CW
10521int
10522main ()
10523{
10524XOpenDisplay ("foo");
10525 ;
10526 return 0;
10527}
10528_ACEOF
10529rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10530if { (ac_try="$ac_link"
10531case "(($ac_try" in
10532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10533 *) ac_try_echo=$ac_try;;
10534esac
10535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10536 (eval "$ac_link") 2>conftest.er1
98418dba 10537 ac_status=$?
edfaf76d
LK
10538 grep -v '^ *+' conftest.er1 >conftest.err
10539 rm -f conftest.er1
10540 cat conftest.err >&5
c0d27fcc 10541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10542 (exit $ac_status); } && {
10543 test -z "$ac_c_werror_flag" ||
10544 test ! -s conftest.err
10545 } && test -s conftest$ac_exeext &&
10546 $as_test_x conftest$ac_exeext; then
98418dba
CW
10547 xlinux_second_failure=no
10548else
10549 echo "$as_me: failed program was:" >&5
19650fd6
AS
10550sed 's/^/| /' conftest.$ac_ext >&5
10551
ca81d7a0 10552 xlinux_second_failure=yes
98418dba 10553fi
ca81d7a0 10554
f053c89f 10555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10556 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10557 if test "${xlinux_second_failure}" = "yes"; then
10558 # If we get the same failure with -b, there is no use adding -b.
10559 # So take it out. This plays safe.
10560 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10561 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10562 CPPFLAGS="$OLD_CPPFLAGS"
10563 LIBS="$OLD_LIBS"
ca81d7a0
JD
10564 { echo "$as_me:$LINENO: result: no" >&5
10565echo "${ECHO_T}no" >&6; }
98418dba 10566 else
ca81d7a0
JD
10567 { echo "$as_me:$LINENO: result: yes" >&5
10568echo "${ECHO_T}yes" >&6; }
98418dba
CW
10569 fi
10570 else
ca81d7a0
JD
10571 { echo "$as_me:$LINENO: result: no" >&5
10572echo "${ECHO_T}no" >&6; }
98418dba
CW
10573 fi
10574 fi
10575
10576 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10577 # header files included from there.
ca81d7a0
JD
10578 { echo "$as_me:$LINENO: checking for Xkb" >&5
10579echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10580 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10581/* confdefs.h. */
10582_ACEOF
10583cat confdefs.h >>conftest.$ac_ext
10584cat >>conftest.$ac_ext <<_ACEOF
10585/* end confdefs.h. */
98418dba
CW
10586#include <X11/Xlib.h>
10587#include <X11/XKBlib.h>
98418dba
CW
10588int
10589main ()
10590{
10591XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10597if { (ac_try="$ac_link"
10598case "(($ac_try" in
10599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10600 *) ac_try_echo=$ac_try;;
10601esac
10602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10603 (eval "$ac_link") 2>conftest.er1
98418dba 10604 ac_status=$?
edfaf76d
LK
10605 grep -v '^ *+' conftest.er1 >conftest.err
10606 rm -f conftest.er1
10607 cat conftest.err >&5
c0d27fcc 10608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10609 (exit $ac_status); } && {
10610 test -z "$ac_c_werror_flag" ||
10611 test ! -s conftest.err
10612 } && test -s conftest$ac_exeext &&
10613 $as_test_x conftest$ac_exeext; then
98418dba
CW
10614 emacs_xkb=yes
10615else
10616 echo "$as_me: failed program was:" >&5
19650fd6
AS
10617sed 's/^/| /' conftest.$ac_ext >&5
10618
ca81d7a0 10619 emacs_xkb=no
98418dba 10620fi
ca81d7a0 10621
f053c89f 10622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10623 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10624 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10625echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10626 if test $emacs_xkb = yes; then
b936fae4 10627
c0d27fcc 10628cat >>confdefs.h <<\_ACEOF
98418dba 10629#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10630_ACEOF
98418dba
CW
10631
10632 fi
10633
c0d27fcc
MR
10634
10635
10636
10637
98418dba
CW
10638for ac_func in XrmSetDatabase XScreenResourceString \
10639XScreenNumberOfScreen XSetWMProtocols
10640do
10641as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10642{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10643echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10644if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10645 echo $ECHO_N "(cached) $ECHO_C" >&6
10646else
10647 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10648/* confdefs.h. */
10649_ACEOF
10650cat confdefs.h >>conftest.$ac_ext
10651cat >>conftest.$ac_ext <<_ACEOF
10652/* end confdefs.h. */
edfaf76d
LK
10653/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10654 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10655#define $ac_func innocuous_$ac_func
10656
98418dba 10657/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10658 which can conflict with char $ac_func (); below.
10659 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10660 <limits.h> exists even on freestanding compilers. */
edfaf76d 10661
19650fd6
AS
10662#ifdef __STDC__
10663# include <limits.h>
10664#else
10665# include <assert.h>
10666#endif
edfaf76d
LK
10667
10668#undef $ac_func
10669
ca81d7a0
JD
10670/* Override any GCC internal prototype to avoid an error.
10671 Use char because int might match the return type of a GCC
10672 builtin and then its argument prototype would still apply. */
98418dba
CW
10673#ifdef __cplusplus
10674extern "C"
10675#endif
98418dba 10676char $ac_func ();
98418dba
CW
10677/* The GNU C library defines this for functions which it implements
10678 to always fail with ENOSYS. Some functions are actually named
10679 something starting with __ and the normal name is an alias. */
ca81d7a0 10680#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10681choke me
98418dba
CW
10682#endif
10683
19650fd6
AS
10684int
10685main ()
10686{
ca81d7a0 10687return $ac_func ();
98418dba
CW
10688 ;
10689 return 0;
10690}
10691_ACEOF
10692rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10693if { (ac_try="$ac_link"
10694case "(($ac_try" in
10695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10696 *) ac_try_echo=$ac_try;;
10697esac
10698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10699 (eval "$ac_link") 2>conftest.er1
98418dba 10700 ac_status=$?
edfaf76d
LK
10701 grep -v '^ *+' conftest.er1 >conftest.err
10702 rm -f conftest.er1
10703 cat conftest.err >&5
c0d27fcc 10704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10705 (exit $ac_status); } && {
10706 test -z "$ac_c_werror_flag" ||
10707 test ! -s conftest.err
10708 } && test -s conftest$ac_exeext &&
10709 $as_test_x conftest$ac_exeext; then
98418dba
CW
10710 eval "$as_ac_var=yes"
10711else
10712 echo "$as_me: failed program was:" >&5
19650fd6
AS
10713sed 's/^/| /' conftest.$ac_ext >&5
10714
ca81d7a0 10715 eval "$as_ac_var=no"
98418dba 10716fi
ca81d7a0 10717
f053c89f 10718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10719 conftest$ac_exeext conftest.$ac_ext
98418dba 10720fi
ca81d7a0
JD
10721ac_res=`eval echo '${'$as_ac_var'}'`
10722 { echo "$as_me:$LINENO: result: $ac_res" >&5
10723echo "${ECHO_T}$ac_res" >&6; }
98418dba 10724if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10725 cat >>confdefs.h <<_ACEOF
98418dba 10726#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10727_ACEOF
98418dba
CW
10728
10729fi
10730done
10731
10732fi
10733
10734if test "${window_system}" = "x11"; then
ca81d7a0
JD
10735 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10736echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10737 if test "${emacs_cv_x11_version_6+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
10739else
10740 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10741/* confdefs.h. */
10742_ACEOF
10743cat confdefs.h >>conftest.$ac_ext
10744cat >>conftest.$ac_ext <<_ACEOF
10745/* end confdefs.h. */
98418dba 10746#include <X11/Xlib.h>
98418dba
CW
10747int
10748main ()
10749{
10750#if XlibSpecificationRelease < 6
10751fail;
10752#endif
10753
10754 ;
10755 return 0;
10756}
10757_ACEOF
10758rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10759if { (ac_try="$ac_link"
10760case "(($ac_try" in
10761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10762 *) ac_try_echo=$ac_try;;
10763esac
10764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10765 (eval "$ac_link") 2>conftest.er1
98418dba 10766 ac_status=$?
edfaf76d
LK
10767 grep -v '^ *+' conftest.er1 >conftest.err
10768 rm -f conftest.er1
10769 cat conftest.err >&5
c0d27fcc 10770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10771 (exit $ac_status); } && {
10772 test -z "$ac_c_werror_flag" ||
10773 test ! -s conftest.err
10774 } && test -s conftest$ac_exeext &&
10775 $as_test_x conftest$ac_exeext; then
98418dba
CW
10776 emacs_cv_x11_version_6=yes
10777else
10778 echo "$as_me: failed program was:" >&5
19650fd6
AS
10779sed 's/^/| /' conftest.$ac_ext >&5
10780
ca81d7a0 10781 emacs_cv_x11_version_6=no
98418dba 10782fi
ca81d7a0 10783
f053c89f 10784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10785 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10786fi
10787
10788 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10789 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10790echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10791
c0d27fcc 10792cat >>confdefs.h <<\_ACEOF
98418dba 10793#define HAVE_X11R6 1
c0d27fcc 10794_ACEOF
98418dba
CW
10795
10796 else
ca81d7a0
JD
10797 { echo "$as_me:$LINENO: result: before 6" >&5
10798echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10799 fi
10800fi
10801
98418dba 10802
0cfc0546
GM
10803### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10804HAVE_RSVG=no
9e2a2647 10805if test "${HAVE_X11}" = "yes"; then
0cfc0546 10806 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10807 RSVG_REQUIRED=2.0.0
10808 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10809
10810
10811 succeeded=no
10812
00b9c927 10813 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10814set dummy pkg-config; ac_word=$2
10815{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10816echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10817if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10818 echo $ECHO_N "(cached) $ECHO_C" >&6
10819else
10820 case $PKG_CONFIG in
10821 [\\/]* | ?:[\\/]*)
10822 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10823 ;;
10824 *)
10825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826for as_dir in $PATH
10827do
10828 IFS=$as_save_IFS
10829 test -z "$as_dir" && as_dir=.
10830 for ac_exec_ext in '' $ac_executable_extensions; do
10831 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10832 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10833 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10834 break 2
10835 fi
10836done
10837done
10838IFS=$as_save_IFS
10839
10840 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10841 ;;
10842esac
10843fi
10844PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10845if test -n "$PKG_CONFIG"; then
10846 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10847echo "${ECHO_T}$PKG_CONFIG" >&6; }
10848else
10849 { echo "$as_me:$LINENO: result: no" >&5
10850echo "${ECHO_T}no" >&6; }
10851fi
10852
10853
0cfc0546
GM
10854
10855 if test "$PKG_CONFIG" = "no" ; then
10856 :
10857 else
10858 PKG_CONFIG_MIN_VERSION=0.9.0
10859 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10860 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10861echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10862
10863 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10864 { echo "$as_me:$LINENO: result: yes" >&5
10865echo "${ECHO_T}yes" >&6; }
10866 succeeded=yes
10867
10868 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10869echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10870 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10871 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10872echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10873
10874 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10875echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10876 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10877 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10878echo "${ECHO_T}$RSVG_LIBS" >&6; }
10879 else
10880 { echo "$as_me:$LINENO: result: no" >&5
10881echo "${ECHO_T}no" >&6; }
10882 RSVG_CFLAGS=""
10883 RSVG_LIBS=""
10884 ## If we have a custom action on failure, don't print errors, but
10885 ## do set a variable so people can do so.
10886 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10887
10888 fi
10889
10890
10891
10892 else
10893 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10894 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10895 fi
10896 fi
10897
10898 if test $succeeded = yes; then
10899 :
10900 else
10901 :
10902 fi
10903
10904
10905
10906
10907 if test ".${RSVG_CFLAGS}" != "."; then
10908 HAVE_RSVG=yes
10909
10910cat >>confdefs.h <<\_ACEOF
10911#define HAVE_RSVG 1
10912_ACEOF
10913
10914 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10915 LIBS="$RSVG_LIBS $LIBS"
10916 fi
10917 fi
10918fi
10919
10920
488dd4c4 10921HAVE_GTK=no
9d2818d6 10922if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10923 GLIB_REQUIRED=2.6
10924 GTK_REQUIRED=2.6
488dd4c4
JD
10925 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10926
488dd4c4
JD
10927
10928 succeeded=no
10929
00b9c927 10930 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10931set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10932{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10933echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10934if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10935 echo $ECHO_N "(cached) $ECHO_C" >&6
10936else
10937 case $PKG_CONFIG in
10938 [\\/]* | ?:[\\/]*)
10939 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10940 ;;
10941 *)
10942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10943for as_dir in $PATH
10944do
10945 IFS=$as_save_IFS
10946 test -z "$as_dir" && as_dir=.
10947 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10949 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10950 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10951 break 2
10952 fi
10953done
10954done
ca81d7a0 10955IFS=$as_save_IFS
488dd4c4
JD
10956
10957 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10958 ;;
10959esac
10960fi
10961PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10962if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10963 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10964echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10965else
ca81d7a0
JD
10966 { echo "$as_me:$LINENO: result: no" >&5
10967echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10968fi
10969
ca81d7a0 10970
488dd4c4
JD
10971
10972 if test "$PKG_CONFIG" = "no" ; then
089a966d 10973 pkg_check_gtk=no
488dd4c4
JD
10974 else
10975 PKG_CONFIG_MIN_VERSION=0.9.0
10976 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10977 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10978echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10979
67db6aa2 10980 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10981 { echo "$as_me:$LINENO: result: yes" >&5
10982echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10983 succeeded=yes
10984
ca81d7a0
JD
10985 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10986echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10987 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10988 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10989echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10990
ca81d7a0
JD
10991 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10992echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10993 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10994 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10995echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10996 else
ca81d7a0
JD
10997 { echo "$as_me:$LINENO: result: no" >&5
10998echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10999 GTK_CFLAGS=""
11000 GTK_LIBS=""
11001 ## If we have a custom action on failure, don't print errors, but
11002 ## do set a variable so people can do so.
11003 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11004
488dd4c4
JD
11005 fi
11006
11007
11008
11009 else
11010 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11011 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11012 fi
11013 fi
11014
11015 if test $succeeded = yes; then
089a966d 11016 pkg_check_gtk=yes
488dd4c4 11017 else
089a966d
GM
11018 pkg_check_gtk=no
11019 fi
11020
11021 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11022 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11023echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11024 { (exit 1); exit 1; }; }
11025 fi
089a966d
GM
11026fi
11027
11028
11029if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11030
11031
11032
11033 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11034 CFLAGS="$CFLAGS $GTK_CFLAGS"
11035 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11036 GTK_COMPILES=no
57669b57 11037
8eeae1c9 11038for ac_func in gtk_main
57669b57
JD
11039do
11040as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11041{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11042echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11043if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11044 echo $ECHO_N "(cached) $ECHO_C" >&6
11045else
11046 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11047/* confdefs.h. */
11048_ACEOF
11049cat confdefs.h >>conftest.$ac_ext
11050cat >>conftest.$ac_ext <<_ACEOF
11051/* end confdefs.h. */
edfaf76d
LK
11052/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11053 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11054#define $ac_func innocuous_$ac_func
11055
57669b57
JD
11056/* System header to define __stub macros and hopefully few prototypes,
11057 which can conflict with char $ac_func (); below.
11058 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11059 <limits.h> exists even on freestanding compilers. */
edfaf76d 11060
57669b57
JD
11061#ifdef __STDC__
11062# include <limits.h>
11063#else
11064# include <assert.h>
11065#endif
edfaf76d
LK
11066
11067#undef $ac_func
11068
ca81d7a0
JD
11069/* Override any GCC internal prototype to avoid an error.
11070 Use char because int might match the return type of a GCC
11071 builtin and then its argument prototype would still apply. */
57669b57
JD
11072#ifdef __cplusplus
11073extern "C"
57669b57 11074#endif
57669b57
JD
11075char $ac_func ();
11076/* The GNU C library defines this for functions which it implements
11077 to always fail with ENOSYS. Some functions are actually named
11078 something starting with __ and the normal name is an alias. */
ca81d7a0 11079#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11080choke me
57669b57
JD
11081#endif
11082
11083int
11084main ()
11085{
ca81d7a0 11086return $ac_func ();
57669b57
JD
11087 ;
11088 return 0;
11089}
11090_ACEOF
11091rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11092if { (ac_try="$ac_link"
11093case "(($ac_try" in
11094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11095 *) ac_try_echo=$ac_try;;
11096esac
11097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11098 (eval "$ac_link") 2>conftest.er1
57669b57 11099 ac_status=$?
edfaf76d
LK
11100 grep -v '^ *+' conftest.er1 >conftest.err
11101 rm -f conftest.er1
11102 cat conftest.err >&5
57669b57 11103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11104 (exit $ac_status); } && {
11105 test -z "$ac_c_werror_flag" ||
11106 test ! -s conftest.err
11107 } && test -s conftest$ac_exeext &&
11108 $as_test_x conftest$ac_exeext; then
57669b57
JD
11109 eval "$as_ac_var=yes"
11110else
11111 echo "$as_me: failed program was:" >&5
11112sed 's/^/| /' conftest.$ac_ext >&5
11113
ca81d7a0 11114 eval "$as_ac_var=no"
57669b57 11115fi
ca81d7a0 11116
f053c89f 11117rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11118 conftest$ac_exeext conftest.$ac_ext
57669b57 11119fi
ca81d7a0
JD
11120ac_res=`eval echo '${'$as_ac_var'}'`
11121 { echo "$as_me:$LINENO: result: $ac_res" >&5
11122echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11123if test `eval echo '${'$as_ac_var'}'` = yes; then
11124 cat >>confdefs.h <<_ACEOF
11125#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11126_ACEOF
8eeae1c9 11127 GTK_COMPILES=yes
57669b57
JD
11128fi
11129done
11130
8eeae1c9 11131 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11132 if test "$USE_X_TOOLKIT" != "maybe"; then
11133 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11134echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11135 { (exit 1); exit 1; }; };
089a966d
GM
11136 fi
11137 else
11138 HAVE_GTK=yes
488dd4c4
JD
11139
11140cat >>confdefs.h <<\_ACEOF
a51f4969 11141#define USE_GTK 1
488dd4c4
JD
11142_ACEOF
11143
089a966d 11144 USE_X_TOOLKIT=none
f60c93db
JD
11145 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11146 :
11147 else
11148 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11149 closing open displays. This is no problem if you just use
11150 one display, but if you use more than one and close one of them
11151 Emacs may crash." >&5
11152echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11153 closing open displays. This is no problem if you just use
11154 one display, but if you use more than one and close one of them
11155 Emacs may crash." >&2;}
11156 sleep 3
11157 fi
089a966d
GM
11158 fi
11159
11160fi
11161
11162
11163if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11164
d0a80c21
JD
11165 if test "$with_toolkit_scroll_bars" != no; then
11166 with_toolkit_scroll_bars=yes
11167 fi
57669b57
JD
11168
11169 HAVE_GTK_MULTIDISPLAY=no
11170
11171for ac_func in gdk_display_open
11172do
11173as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11174{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11175echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11176if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11177 echo $ECHO_N "(cached) $ECHO_C" >&6
11178else
11179 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11180/* confdefs.h. */
11181_ACEOF
11182cat confdefs.h >>conftest.$ac_ext
11183cat >>conftest.$ac_ext <<_ACEOF
11184/* end confdefs.h. */
edfaf76d
LK
11185/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11187#define $ac_func innocuous_$ac_func
11188
57669b57
JD
11189/* System header to define __stub macros and hopefully few prototypes,
11190 which can conflict with char $ac_func (); below.
11191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11192 <limits.h> exists even on freestanding compilers. */
edfaf76d 11193
57669b57
JD
11194#ifdef __STDC__
11195# include <limits.h>
11196#else
11197# include <assert.h>
11198#endif
edfaf76d
LK
11199
11200#undef $ac_func
11201
ca81d7a0
JD
11202/* Override any GCC internal prototype to avoid an error.
11203 Use char because int might match the return type of a GCC
11204 builtin and then its argument prototype would still apply. */
57669b57
JD
11205#ifdef __cplusplus
11206extern "C"
57669b57 11207#endif
57669b57
JD
11208char $ac_func ();
11209/* The GNU C library defines this for functions which it implements
11210 to always fail with ENOSYS. Some functions are actually named
11211 something starting with __ and the normal name is an alias. */
ca81d7a0 11212#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11213choke me
57669b57
JD
11214#endif
11215
11216int
11217main ()
11218{
ca81d7a0 11219return $ac_func ();
57669b57
JD
11220 ;
11221 return 0;
11222}
11223_ACEOF
11224rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11225if { (ac_try="$ac_link"
11226case "(($ac_try" in
11227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11228 *) ac_try_echo=$ac_try;;
11229esac
11230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11231 (eval "$ac_link") 2>conftest.er1
57669b57 11232 ac_status=$?
edfaf76d
LK
11233 grep -v '^ *+' conftest.er1 >conftest.err
11234 rm -f conftest.er1
11235 cat conftest.err >&5
57669b57 11236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11237 (exit $ac_status); } && {
11238 test -z "$ac_c_werror_flag" ||
11239 test ! -s conftest.err
11240 } && test -s conftest$ac_exeext &&
11241 $as_test_x conftest$ac_exeext; then
57669b57
JD
11242 eval "$as_ac_var=yes"
11243else
11244 echo "$as_me: failed program was:" >&5
11245sed 's/^/| /' conftest.$ac_ext >&5
11246
ca81d7a0 11247 eval "$as_ac_var=no"
57669b57 11248fi
ca81d7a0 11249
f053c89f 11250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11251 conftest$ac_exeext conftest.$ac_ext
57669b57 11252fi
ca81d7a0
JD
11253ac_res=`eval echo '${'$as_ac_var'}'`
11254 { echo "$as_me:$LINENO: result: $ac_res" >&5
11255echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11256if test `eval echo '${'$as_ac_var'}'` = yes; then
11257 cat >>confdefs.h <<_ACEOF
11258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11259_ACEOF
11260 HAVE_GTK_MULTIDISPLAY=yes
11261fi
11262done
11263
11264 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11265
11266cat >>confdefs.h <<\_ACEOF
11267#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11268_ACEOF
11269
11270 fi
57669b57 11271
572a3cc2
JD
11272 HAVE_GTK_FILE_SELECTION=no
11273
11274for ac_func in gtk_file_selection_new
11275do
11276as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11277{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11278echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11279if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11280 echo $ECHO_N "(cached) $ECHO_C" >&6
11281else
11282 cat >conftest.$ac_ext <<_ACEOF
11283/* confdefs.h. */
11284_ACEOF
11285cat confdefs.h >>conftest.$ac_ext
11286cat >>conftest.$ac_ext <<_ACEOF
11287/* end confdefs.h. */
edfaf76d
LK
11288/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11289 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11290#define $ac_func innocuous_$ac_func
11291
572a3cc2
JD
11292/* System header to define __stub macros and hopefully few prototypes,
11293 which can conflict with char $ac_func (); below.
11294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11295 <limits.h> exists even on freestanding compilers. */
edfaf76d 11296
572a3cc2
JD
11297#ifdef __STDC__
11298# include <limits.h>
11299#else
11300# include <assert.h>
11301#endif
edfaf76d
LK
11302
11303#undef $ac_func
11304
ca81d7a0
JD
11305/* Override any GCC internal prototype to avoid an error.
11306 Use char because int might match the return type of a GCC
11307 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11308#ifdef __cplusplus
11309extern "C"
572a3cc2 11310#endif
572a3cc2
JD
11311char $ac_func ();
11312/* The GNU C library defines this for functions which it implements
11313 to always fail with ENOSYS. Some functions are actually named
11314 something starting with __ and the normal name is an alias. */
ca81d7a0 11315#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11316choke me
572a3cc2
JD
11317#endif
11318
11319int
11320main ()
11321{
ca81d7a0 11322return $ac_func ();
572a3cc2
JD
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11328if { (ac_try="$ac_link"
11329case "(($ac_try" in
11330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11331 *) ac_try_echo=$ac_try;;
11332esac
11333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11334 (eval "$ac_link") 2>conftest.er1
572a3cc2 11335 ac_status=$?
edfaf76d
LK
11336 grep -v '^ *+' conftest.er1 >conftest.err
11337 rm -f conftest.er1
11338 cat conftest.err >&5
572a3cc2 11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11340 (exit $ac_status); } && {
11341 test -z "$ac_c_werror_flag" ||
11342 test ! -s conftest.err
11343 } && test -s conftest$ac_exeext &&
11344 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11345 eval "$as_ac_var=yes"
11346else
11347 echo "$as_me: failed program was:" >&5
11348sed 's/^/| /' conftest.$ac_ext >&5
11349
ca81d7a0 11350 eval "$as_ac_var=no"
572a3cc2 11351fi
ca81d7a0 11352
f053c89f 11353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11354 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11355fi
ca81d7a0
JD
11356ac_res=`eval echo '${'$as_ac_var'}'`
11357 { echo "$as_me:$LINENO: result: $ac_res" >&5
11358echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11359if test `eval echo '${'$as_ac_var'}'` = yes; then
11360 cat >>confdefs.h <<_ACEOF
11361#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11362_ACEOF
11363 HAVE_GTK_FILE_SELECTION=yes
11364fi
11365done
11366
11367
11368 HAVE_GTK_FILE_CHOOSER=no
11369
11370for ac_func in gtk_file_chooser_dialog_new
11371do
11372as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11373{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11374echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11375if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11376 echo $ECHO_N "(cached) $ECHO_C" >&6
11377else
11378 cat >conftest.$ac_ext <<_ACEOF
11379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
edfaf76d
LK
11384/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11386#define $ac_func innocuous_$ac_func
11387
572a3cc2
JD
11388/* System header to define __stub macros and hopefully few prototypes,
11389 which can conflict with char $ac_func (); below.
11390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11391 <limits.h> exists even on freestanding compilers. */
edfaf76d 11392
572a3cc2
JD
11393#ifdef __STDC__
11394# include <limits.h>
11395#else
11396# include <assert.h>
11397#endif
edfaf76d
LK
11398
11399#undef $ac_func
11400
ca81d7a0
JD
11401/* Override any GCC internal prototype to avoid an error.
11402 Use char because int might match the return type of a GCC
11403 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11404#ifdef __cplusplus
11405extern "C"
572a3cc2 11406#endif
572a3cc2
JD
11407char $ac_func ();
11408/* The GNU C library defines this for functions which it implements
11409 to always fail with ENOSYS. Some functions are actually named
11410 something starting with __ and the normal name is an alias. */
ca81d7a0 11411#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11412choke me
572a3cc2
JD
11413#endif
11414
11415int
11416main ()
11417{
ca81d7a0 11418return $ac_func ();
572a3cc2
JD
11419 ;
11420 return 0;
11421}
11422_ACEOF
11423rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11424if { (ac_try="$ac_link"
11425case "(($ac_try" in
11426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11427 *) ac_try_echo=$ac_try;;
11428esac
11429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11430 (eval "$ac_link") 2>conftest.er1
572a3cc2 11431 ac_status=$?
edfaf76d
LK
11432 grep -v '^ *+' conftest.er1 >conftest.err
11433 rm -f conftest.er1
11434 cat conftest.err >&5
572a3cc2 11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11436 (exit $ac_status); } && {
11437 test -z "$ac_c_werror_flag" ||
11438 test ! -s conftest.err
11439 } && test -s conftest$ac_exeext &&
11440 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11441 eval "$as_ac_var=yes"
11442else
11443 echo "$as_me: failed program was:" >&5
11444sed 's/^/| /' conftest.$ac_ext >&5
11445
ca81d7a0 11446 eval "$as_ac_var=no"
572a3cc2 11447fi
ca81d7a0 11448
f053c89f 11449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11450 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11451fi
ca81d7a0
JD
11452ac_res=`eval echo '${'$as_ac_var'}'`
11453 { echo "$as_me:$LINENO: result: $ac_res" >&5
11454echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11455if test `eval echo '${'$as_ac_var'}'` = yes; then
11456 cat >>confdefs.h <<_ACEOF
11457#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11458_ACEOF
11459 HAVE_GTK_FILE_CHOOSER=yes
11460fi
11461done
11462
11463
11464 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11465 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11466
11467cat >>confdefs.h <<\_ACEOF
11468#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11469_ACEOF
11470
b8bdffbe
JD
11471 fi
11472
11473 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11474 HAVE_GTK_AND_PTHREAD=no
11475
11476for ac_header in pthread.h
11477do
11478as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11479if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11480 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11482if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11483 echo $ECHO_N "(cached) $ECHO_C" >&6
11484fi
ca81d7a0
JD
11485ac_res=`eval echo '${'$as_ac_Header'}'`
11486 { echo "$as_me:$LINENO: result: $ac_res" >&5
11487echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11488else
11489 # Is the header compilable?
ca81d7a0
JD
11490{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11491echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11492cat >conftest.$ac_ext <<_ACEOF
11493/* confdefs.h. */
11494_ACEOF
11495cat confdefs.h >>conftest.$ac_ext
11496cat >>conftest.$ac_ext <<_ACEOF
11497/* end confdefs.h. */
11498$ac_includes_default
11499#include <$ac_header>
11500_ACEOF
11501rm -f conftest.$ac_objext
ca81d7a0
JD
11502if { (ac_try="$ac_compile"
11503case "(($ac_try" in
11504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11505 *) ac_try_echo=$ac_try;;
11506esac
11507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11508 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11509 ac_status=$?
edfaf76d
LK
11510 grep -v '^ *+' conftest.er1 >conftest.err
11511 rm -f conftest.er1
11512 cat conftest.err >&5
b8bdffbe 11513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11514 (exit $ac_status); } && {
11515 test -z "$ac_c_werror_flag" ||
11516 test ! -s conftest.err
11517 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11518 ac_header_compiler=yes
11519else
11520 echo "$as_me: failed program was:" >&5
11521sed 's/^/| /' conftest.$ac_ext >&5
11522
ca81d7a0 11523 ac_header_compiler=no
b8bdffbe 11524fi
ca81d7a0
JD
11525
11526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11527{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11528echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11529
11530# Is the header present?
ca81d7a0
JD
11531{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11532echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11533cat >conftest.$ac_ext <<_ACEOF
11534/* confdefs.h. */
11535_ACEOF
11536cat confdefs.h >>conftest.$ac_ext
11537cat >>conftest.$ac_ext <<_ACEOF
11538/* end confdefs.h. */
11539#include <$ac_header>
11540_ACEOF
ca81d7a0
JD
11541if { (ac_try="$ac_cpp conftest.$ac_ext"
11542case "(($ac_try" in
11543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11544 *) ac_try_echo=$ac_try;;
11545esac
11546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11547 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11548 ac_status=$?
11549 grep -v '^ *+' conftest.er1 >conftest.err
11550 rm -f conftest.er1
11551 cat conftest.err >&5
11552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11553 (exit $ac_status); } >/dev/null && {
11554 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11555 test ! -s conftest.err
11556 }; then
b8bdffbe
JD
11557 ac_header_preproc=yes
11558else
11559 echo "$as_me: failed program was:" >&5
11560sed 's/^/| /' conftest.$ac_ext >&5
11561
11562 ac_header_preproc=no
11563fi
ca81d7a0 11564
b8bdffbe 11565rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11566{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11567echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11568
11569# So? What about this header?
edfaf76d
LK
11570case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11571 yes:no: )
b8bdffbe
JD
11572 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11573echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11574 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11575echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11576 ac_header_preproc=yes
b8bdffbe 11577 ;;
edfaf76d 11578 no:yes:* )
b8bdffbe
JD
11579 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11580echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11581 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11582echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11583 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11584echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11585 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11586echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11587 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11588echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11589 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11590echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11591
b8bdffbe
JD
11592 ;;
11593esac
ca81d7a0
JD
11594{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11597 echo $ECHO_N "(cached) $ECHO_C" >&6
11598else
edfaf76d 11599 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11600fi
ca81d7a0
JD
11601ac_res=`eval echo '${'$as_ac_Header'}'`
11602 { echo "$as_me:$LINENO: result: $ac_res" >&5
11603echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11604
11605fi
11606if test `eval echo '${'$as_ac_Header'}'` = yes; then
11607 cat >>confdefs.h <<_ACEOF
11608#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11609_ACEOF
11610
11611fi
11612
11613done
11614
11615 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11616 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11617echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11618if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11619 echo $ECHO_N "(cached) $ECHO_C" >&6
11620else
11621 ac_check_lib_save_LIBS=$LIBS
11622LIBS="-lpthread $LIBS"
11623cat >conftest.$ac_ext <<_ACEOF
11624/* confdefs.h. */
11625_ACEOF
11626cat confdefs.h >>conftest.$ac_ext
11627cat >>conftest.$ac_ext <<_ACEOF
11628/* end confdefs.h. */
11629
ca81d7a0
JD
11630/* Override any GCC internal prototype to avoid an error.
11631 Use char because int might match the return type of a GCC
11632 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11633#ifdef __cplusplus
11634extern "C"
11635#endif
b8bdffbe
JD
11636char pthread_self ();
11637int
11638main ()
11639{
ca81d7a0 11640return pthread_self ();
b8bdffbe
JD
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11646if { (ac_try="$ac_link"
11647case "(($ac_try" in
11648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11649 *) ac_try_echo=$ac_try;;
11650esac
11651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11652 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11653 ac_status=$?
edfaf76d
LK
11654 grep -v '^ *+' conftest.er1 >conftest.err
11655 rm -f conftest.er1
11656 cat conftest.err >&5
b8bdffbe 11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11658 (exit $ac_status); } && {
11659 test -z "$ac_c_werror_flag" ||
11660 test ! -s conftest.err
11661 } && test -s conftest$ac_exeext &&
11662 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11663 ac_cv_lib_pthread_pthread_self=yes
11664else
11665 echo "$as_me: failed program was:" >&5
11666sed 's/^/| /' conftest.$ac_ext >&5
11667
ca81d7a0 11668 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11669fi
ca81d7a0 11670
f053c89f 11671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11672 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11673LIBS=$ac_check_lib_save_LIBS
11674fi
ca81d7a0
JD
11675{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11676echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11677if test $ac_cv_lib_pthread_pthread_self = yes; then
11678 HAVE_GTK_AND_PTHREAD=yes
11679fi
11680
11681 fi
11682 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11683 case "${canonical}" in
11684 *-hpux*) ;;
11685 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11686 esac
b8bdffbe
JD
11687
11688cat >>confdefs.h <<\_ACEOF
11689#define HAVE_GTK_AND_PTHREAD 1
11690_ACEOF
11691
11692 fi
57669b57 11693 fi
488dd4c4
JD
11694fi
11695
131e4133
MA
11696HAVE_DBUS=no
11697if test "${with_dbus}" = "yes"; then
cffe4909
MH
11698
11699 succeeded=no
11700
00b9c927 11701 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11702set dummy pkg-config; ac_word=$2
11703{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11704echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11705if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11706 echo $ECHO_N "(cached) $ECHO_C" >&6
11707else
cffe4909
MH
11708 case $PKG_CONFIG in
11709 [\\/]* | ?:[\\/]*)
11710 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11711 ;;
11712 *)
11713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH
11715do
11716 IFS=$as_save_IFS
11717 test -z "$as_dir" && as_dir=.
11718 for ac_exec_ext in '' $ac_executable_extensions; do
11719 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11720 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11721 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11722 break 2
11723 fi
11724done
11725done
11726IFS=$as_save_IFS
131e4133 11727
cffe4909
MH
11728 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11729 ;;
131e4133 11730esac
cffe4909
MH
11731fi
11732PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11733if test -n "$PKG_CONFIG"; then
11734 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11735echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11736else
cffe4909
MH
11737 { echo "$as_me:$LINENO: result: no" >&5
11738echo "${ECHO_T}no" >&6; }
131e4133
MA
11739fi
11740
cffe4909 11741
cffe4909
MH
11742
11743 if test "$PKG_CONFIG" = "no" ; then
11744 HAVE_DBUS=no
11745 else
11746 PKG_CONFIG_MIN_VERSION=0.9.0
11747 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11748 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11749echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11750
11751 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11752 { echo "$as_me:$LINENO: result: yes" >&5
11753echo "${ECHO_T}yes" >&6; }
11754 succeeded=yes
11755
11756 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11757echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11758 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11759 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11760echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11761
11762 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11763echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11764 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11765 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11766echo "${ECHO_T}$DBUS_LIBS" >&6; }
11767 else
11768 { echo "$as_me:$LINENO: result: no" >&5
11769echo "${ECHO_T}no" >&6; }
11770 DBUS_CFLAGS=""
11771 DBUS_LIBS=""
11772 ## If we have a custom action on failure, don't print errors, but
11773 ## do set a variable so people can do so.
11774 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11775
11776 fi
11777
11778
11779
11780 else
11781 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11782 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11783 fi
11784 fi
11785
11786 if test $succeeded = yes; then
11787 HAVE_DBUS=yes
11788 else
11789 HAVE_DBUS=no
11790 fi
131e4133
MA
11791
11792 if test "$HAVE_DBUS" = yes; then
11793
11794cat >>confdefs.h <<\_ACEOF
11795#define HAVE_DBUS 1
11796_ACEOF
11797
131e4133
MA
11798 fi
11799fi
11800
b3615392 11801HAVE_XAW3D=no
991a7602 11802if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11803 if test "$with_xaw3d" != no; then
11804 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11805echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11806 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11807 echo $ECHO_N "(cached) $ECHO_C" >&6
11808else
11809 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
98418dba
CW
11815
11816#include <X11/Intrinsic.h>
b3615392 11817#include <X11/Xaw3d/Simple.h>
98418dba
CW
11818int
11819main ()
11820{
11821
11822 ;
11823 return 0;
11824}
11825_ACEOF
11826rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11827if { (ac_try="$ac_link"
11828case "(($ac_try" in
11829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11830 *) ac_try_echo=$ac_try;;
11831esac
11832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11833 (eval "$ac_link") 2>conftest.er1
98418dba 11834 ac_status=$?
edfaf76d
LK
11835 grep -v '^ *+' conftest.er1 >conftest.err
11836 rm -f conftest.er1
11837 cat conftest.err >&5
c0d27fcc 11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11839 (exit $ac_status); } && {
11840 test -z "$ac_c_werror_flag" ||
11841 test ! -s conftest.err
11842 } && test -s conftest$ac_exeext &&
11843 $as_test_x conftest$ac_exeext; then
b3615392 11844 emacs_cv_xaw3d=yes
98418dba
CW
11845else
11846 echo "$as_me: failed program was:" >&5
19650fd6
AS
11847sed 's/^/| /' conftest.$ac_ext >&5
11848
b3615392 11849 emacs_cv_xaw3d=no
98418dba 11850fi
ca81d7a0 11851
f053c89f 11852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11853 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11854fi
11855
9d89ffd0 11856 else
f23d76bd 11857 emacs_cv_xaw3d=no
9d89ffd0 11858 fi
f23d76bd
MB
11859 if test $emacs_cv_xaw3d = yes; then
11860 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11861echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11862 USE_X_TOOLKIT=LUCID
11863 HAVE_XAW3D=yes
9d89ffd0 11864
b3615392
MB
11865cat >>confdefs.h <<\_ACEOF
11866#define HAVE_XAW3D 1
11867_ACEOF
9d89ffd0 11868
f23d76bd
MB
11869 else
11870 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11871echo "${ECHO_T}no" >&6; }
f23d76bd 11872 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11873echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11874 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11875 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11876else
b3615392 11877 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11878/* confdefs.h. */
11879_ACEOF
11880cat confdefs.h >>conftest.$ac_ext
11881cat >>conftest.$ac_ext <<_ACEOF
11882/* end confdefs.h. */
b3615392
MB
11883
11884#include <X11/Intrinsic.h>
11885#include <X11/Xaw/Simple.h>
11886int
11887main ()
11888{
11889
11890 ;
11891 return 0;
11892}
9d89ffd0 11893_ACEOF
b3615392
MB
11894rm -f conftest.$ac_objext conftest$ac_exeext
11895if { (ac_try="$ac_link"
9d89ffd0
JD
11896case "(($ac_try" in
11897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11898 *) ac_try_echo=$ac_try;;
11899esac
11900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11901 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11902 ac_status=$?
11903 grep -v '^ *+' conftest.er1 >conftest.err
11904 rm -f conftest.er1
11905 cat conftest.err >&5
11906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11907 (exit $ac_status); } && {
11908 test -z "$ac_c_werror_flag" ||
11909 test ! -s conftest.err
b3615392
MB
11910 } && test -s conftest$ac_exeext &&
11911 $as_test_x conftest$ac_exeext; then
11912 emacs_cv_xaw=yes
9d89ffd0
JD
11913else
11914 echo "$as_me: failed program was:" >&5
11915sed 's/^/| /' conftest.$ac_ext >&5
11916
b3615392 11917 emacs_cv_xaw=no
9d89ffd0
JD
11918fi
11919
b3615392
MB
11920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11921 conftest$ac_exeext conftest.$ac_ext
11922fi
9d89ffd0 11923
f23d76bd
MB
11924 if test $emacs_cv_xaw = yes; then
11925 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11926echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11927 USE_X_TOOLKIT=LUCID
11928 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11929 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11930echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11931 { (exit 1); exit 1; }; }
f23d76bd
MB
11932 else
11933 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11934echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11935 USE_X_TOOLKIT=none
98418dba 11936 fi
98418dba
CW
11937 fi
11938fi
11939
11940X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11941
11942if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11943 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11944echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11945 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11946 echo $ECHO_N "(cached) $ECHO_C" >&6
11947else
11948 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11949/* confdefs.h. */
11950_ACEOF
11951cat confdefs.h >>conftest.$ac_ext
11952cat >>conftest.$ac_ext <<_ACEOF
11953/* end confdefs.h. */
98418dba 11954#include <X11/Intrinsic.h>
98418dba
CW
11955int
11956main ()
11957{
11958#if XtSpecificationRelease < 6
11959fail;
11960#endif
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11967if { (ac_try="$ac_link"
11968case "(($ac_try" in
11969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11970 *) ac_try_echo=$ac_try;;
11971esac
11972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11973 (eval "$ac_link") 2>conftest.er1
98418dba 11974 ac_status=$?
edfaf76d
LK
11975 grep -v '^ *+' conftest.er1 >conftest.err
11976 rm -f conftest.er1
11977 cat conftest.err >&5
c0d27fcc 11978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11979 (exit $ac_status); } && {
11980 test -z "$ac_c_werror_flag" ||
11981 test ! -s conftest.err
11982 } && test -s conftest$ac_exeext &&
11983 $as_test_x conftest$ac_exeext; then
98418dba
CW
11984 emacs_cv_x11_toolkit_version_6=yes
11985else
11986 echo "$as_me: failed program was:" >&5
19650fd6
AS
11987sed 's/^/| /' conftest.$ac_ext >&5
11988
ca81d7a0 11989 emacs_cv_x11_toolkit_version_6=no
98418dba 11990fi
ca81d7a0 11991
f053c89f 11992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11993 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11994fi
11995
11996 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11997 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
11998 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11999echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12000
c0d27fcc 12001cat >>confdefs.h <<\_ACEOF
98418dba 12002#define HAVE_X11XTR6 1
c0d27fcc 12003_ACEOF
98418dba
CW
12004
12005 else
ca81d7a0
JD
12006 { echo "$as_me:$LINENO: result: before 6" >&5
12007echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12008 fi
12009
12010 OLDLIBS="$LIBS"
12011 if test x$HAVE_X11XTR6 = xyes; then
12012 LIBS="-lXt -lSM -lICE $LIBS"
12013 else
12014 LIBS="-lXt $LIBS"
12015 fi
12016
ca81d7a0
JD
12017{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12018echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12019if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12020 echo $ECHO_N "(cached) $ECHO_C" >&6
12021else
12022 ac_check_lib_save_LIBS=$LIBS
12023LIBS="-lXmu $LIBS"
12024cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12025/* confdefs.h. */
12026_ACEOF
12027cat confdefs.h >>conftest.$ac_ext
12028cat >>conftest.$ac_ext <<_ACEOF
12029/* end confdefs.h. */
98418dba 12030
ca81d7a0
JD
12031/* Override any GCC internal prototype to avoid an error.
12032 Use char because int might match the return type of a GCC
12033 builtin and then its argument prototype would still apply. */
98418dba
CW
12034#ifdef __cplusplus
12035extern "C"
12036#endif
98418dba 12037char XmuConvertStandardSelection ();
98418dba
CW
12038int
12039main ()
12040{
ca81d7a0 12041return XmuConvertStandardSelection ();
98418dba
CW
12042 ;
12043 return 0;
12044}
12045_ACEOF
12046rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12047if { (ac_try="$ac_link"
12048case "(($ac_try" in
12049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12050 *) ac_try_echo=$ac_try;;
12051esac
12052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12053 (eval "$ac_link") 2>conftest.er1
98418dba 12054 ac_status=$?
edfaf76d
LK
12055 grep -v '^ *+' conftest.er1 >conftest.err
12056 rm -f conftest.er1
12057 cat conftest.err >&5
c0d27fcc 12058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12059 (exit $ac_status); } && {
12060 test -z "$ac_c_werror_flag" ||
12061 test ! -s conftest.err
12062 } && test -s conftest$ac_exeext &&
12063 $as_test_x conftest$ac_exeext; then
98418dba
CW
12064 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12065else
12066 echo "$as_me: failed program was:" >&5
19650fd6
AS
12067sed 's/^/| /' conftest.$ac_ext >&5
12068
ca81d7a0 12069 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12070fi
ca81d7a0 12071
f053c89f 12072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12073 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12074LIBS=$ac_check_lib_save_LIBS
12075fi
ca81d7a0
JD
12076{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12077echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12078if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12079 cat >>confdefs.h <<_ACEOF
98418dba 12080#define HAVE_LIBXMU 1
c0d27fcc 12081_ACEOF
98418dba
CW
12082
12083 LIBS="-lXmu $LIBS"
12084
12085fi
12086
12087 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12088fi
12089
12090# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12091if test "${HAVE_X11}" = "yes"; then
12092 if test "${USE_X_TOOLKIT}" != "none"; then
12093
ca81d7a0
JD
12094{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12095echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12096if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12097 echo $ECHO_N "(cached) $ECHO_C" >&6
12098else
12099 ac_check_lib_save_LIBS=$LIBS
12100LIBS="-lXext $LIBS"
12101cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
98418dba 12107
ca81d7a0
JD
12108/* Override any GCC internal prototype to avoid an error.
12109 Use char because int might match the return type of a GCC
12110 builtin and then its argument prototype would still apply. */
98418dba
CW
12111#ifdef __cplusplus
12112extern "C"
12113#endif
98418dba 12114char XShapeQueryExtension ();
98418dba
CW
12115int
12116main ()
12117{
ca81d7a0 12118return XShapeQueryExtension ();
98418dba
CW
12119 ;
12120 return 0;
12121}
12122_ACEOF
12123rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12124if { (ac_try="$ac_link"
12125case "(($ac_try" in
12126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12127 *) ac_try_echo=$ac_try;;
12128esac
12129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12130 (eval "$ac_link") 2>conftest.er1
98418dba 12131 ac_status=$?
edfaf76d
LK
12132 grep -v '^ *+' conftest.er1 >conftest.err
12133 rm -f conftest.er1
12134 cat conftest.err >&5
c0d27fcc 12135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12136 (exit $ac_status); } && {
12137 test -z "$ac_c_werror_flag" ||
12138 test ! -s conftest.err
12139 } && test -s conftest$ac_exeext &&
12140 $as_test_x conftest$ac_exeext; then
98418dba
CW
12141 ac_cv_lib_Xext_XShapeQueryExtension=yes
12142else
12143 echo "$as_me: failed program was:" >&5
19650fd6
AS
12144sed 's/^/| /' conftest.$ac_ext >&5
12145
ca81d7a0 12146 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12147fi
ca81d7a0 12148
f053c89f 12149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12150 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12151LIBS=$ac_check_lib_save_LIBS
12152fi
ca81d7a0
JD
12153{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12154echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12155if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12156 cat >>confdefs.h <<_ACEOF
98418dba 12157#define HAVE_LIBXEXT 1
c0d27fcc 12158_ACEOF
98418dba
CW
12159
12160 LIBS="-lXext $LIBS"
12161
12162fi
12163
12164 fi
12165fi
12166
12167if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12168 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12169echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12170if test "${emacs_cv_motif_version_2_1+set}" = set; then
12171 echo $ECHO_N "(cached) $ECHO_C" >&6
12172else
12173 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12174/* confdefs.h. */
12175_ACEOF
12176cat confdefs.h >>conftest.$ac_ext
12177cat >>conftest.$ac_ext <<_ACEOF
12178/* end confdefs.h. */
98418dba 12179#include <Xm/Xm.h>
98418dba
CW
12180int
12181main ()
12182{
12183#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12184int x = 5;
12185#else
12186Motif version prior to 2.1.
12187#endif
12188 ;
12189 return 0;
12190}
12191_ACEOF
12192rm -f conftest.$ac_objext
ca81d7a0
JD
12193if { (ac_try="$ac_compile"
12194case "(($ac_try" in
12195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12196 *) ac_try_echo=$ac_try;;
12197esac
12198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12199 (eval "$ac_compile") 2>conftest.er1
98418dba 12200 ac_status=$?
edfaf76d
LK
12201 grep -v '^ *+' conftest.er1 >conftest.err
12202 rm -f conftest.er1
12203 cat conftest.err >&5
c0d27fcc 12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12205 (exit $ac_status); } && {
12206 test -z "$ac_c_werror_flag" ||
12207 test ! -s conftest.err
12208 } && test -s conftest.$ac_objext; then
98418dba
CW
12209 emacs_cv_motif_version_2_1=yes
12210else
12211 echo "$as_me: failed program was:" >&5
19650fd6
AS
12212sed 's/^/| /' conftest.$ac_ext >&5
12213
ca81d7a0 12214 emacs_cv_motif_version_2_1=no
98418dba 12215fi
ca81d7a0
JD
12216
12217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12218fi
ca81d7a0
JD
12219{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12220echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12221 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12222 if test $emacs_cv_motif_version_2_1 = yes; then
12223 HAVE_LIBXP=no
b936fae4 12224
c0d27fcc 12225cat >>confdefs.h <<\_ACEOF
98418dba 12226#define HAVE_MOTIF_2_1 1
c0d27fcc 12227_ACEOF
98418dba 12228
ca81d7a0
JD
12229 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12230echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12231if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12232 echo $ECHO_N "(cached) $ECHO_C" >&6
12233else
12234 ac_check_lib_save_LIBS=$LIBS
12235LIBS="-lXp $LIBS"
12236cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12237/* confdefs.h. */
12238_ACEOF
12239cat confdefs.h >>conftest.$ac_ext
12240cat >>conftest.$ac_ext <<_ACEOF
12241/* end confdefs.h. */
98418dba 12242
ca81d7a0
JD
12243/* Override any GCC internal prototype to avoid an error.
12244 Use char because int might match the return type of a GCC
12245 builtin and then its argument prototype would still apply. */
98418dba
CW
12246#ifdef __cplusplus
12247extern "C"
12248#endif
98418dba 12249char XpCreateContext ();
98418dba
CW
12250int
12251main ()
12252{
ca81d7a0 12253return XpCreateContext ();
98418dba
CW
12254 ;
12255 return 0;
12256}
12257_ACEOF
12258rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12259if { (ac_try="$ac_link"
12260case "(($ac_try" in
12261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12262 *) ac_try_echo=$ac_try;;
12263esac
12264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12265 (eval "$ac_link") 2>conftest.er1
98418dba 12266 ac_status=$?
edfaf76d
LK
12267 grep -v '^ *+' conftest.er1 >conftest.err
12268 rm -f conftest.er1
12269 cat conftest.err >&5
c0d27fcc 12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12271 (exit $ac_status); } && {
12272 test -z "$ac_c_werror_flag" ||
12273 test ! -s conftest.err
12274 } && test -s conftest$ac_exeext &&
12275 $as_test_x conftest$ac_exeext; then
98418dba
CW
12276 ac_cv_lib_Xp_XpCreateContext=yes
12277else
12278 echo "$as_me: failed program was:" >&5
19650fd6
AS
12279sed 's/^/| /' conftest.$ac_ext >&5
12280
ca81d7a0 12281 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12282fi
ca81d7a0 12283
f053c89f 12284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12285 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12286LIBS=$ac_check_lib_save_LIBS
12287fi
ca81d7a0
JD
12288{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12289echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12290if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12291 HAVE_LIBXP=yes
12292fi
503d2be0 12293
98418dba 12294 if test ${HAVE_LIBXP} = yes; then
b936fae4 12295
c0d27fcc 12296cat >>confdefs.h <<\_ACEOF
98418dba 12297#define HAVE_LIBXP 1
c0d27fcc 12298_ACEOF
503d2be0 12299
98418dba 12300 fi
4693dbc9 12301 else
ca81d7a0
JD
12302 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12303echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12304if test "${emacs_cv_lesstif+set}" = set; then
12305 echo $ECHO_N "(cached) $ECHO_C" >&6
12306else
12307 # We put this in CFLAGS temporarily to precede other -I options
12308 # that might be in CFLAGS temporarily.
12309 # We put this in CPPFLAGS where it precedes the other -I options.
12310 OLD_CPPFLAGS=$CPPFLAGS
12311 OLD_CFLAGS=$CFLAGS
12312 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12313 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12314 cat >conftest.$ac_ext <<_ACEOF
12315/* confdefs.h. */
12316_ACEOF
12317cat confdefs.h >>conftest.$ac_ext
12318cat >>conftest.$ac_ext <<_ACEOF
12319/* end confdefs.h. */
12320#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12321int
12322main ()
12323{
12324int x = 5;
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext
ca81d7a0
JD
12330if { (ac_try="$ac_compile"
12331case "(($ac_try" in
12332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12333 *) ac_try_echo=$ac_try;;
12334esac
12335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12336 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12337 ac_status=$?
edfaf76d
LK
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
4693dbc9 12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12342 (exit $ac_status); } && {
12343 test -z "$ac_c_werror_flag" ||
12344 test ! -s conftest.err
12345 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12346 emacs_cv_lesstif=yes
12347else
12348 echo "$as_me: failed program was:" >&5
12349sed 's/^/| /' conftest.$ac_ext >&5
12350
ca81d7a0 12351 emacs_cv_lesstif=no
4693dbc9 12352fi
ca81d7a0
JD
12353
12354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12355fi
ca81d7a0
JD
12356{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12357echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12358 if test $emacs_cv_lesstif = yes; then
12359 # Make sure this -I option remains in CPPFLAGS after it is set
12360 # back to REAL_CPPFLAGS.
12361 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12362 # have those other -I options anyway. Ultimately, having this
12363 # directory ultimately in CPPFLAGS will be enough.
12364 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12365 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12366 else
12367 CFLAGS=$OLD_CFLAGS
12368 CPPFLAGS=$OLD_CPPFLAGS
12369 fi
98418dba
CW
12370 fi
12371fi
12372
c0d27fcc
MR
12373
12374
98418dba
CW
12375USE_TOOLKIT_SCROLL_BARS=no
12376if test "${with_toolkit_scroll_bars}" != "no"; then
12377 if test "${USE_X_TOOLKIT}" != "none"; then
12378 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12379 cat >>confdefs.h <<\_ACEOF
98418dba 12380#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12381_ACEOF
98418dba
CW
12382
12383 HAVE_XAW3D=no
12384 USE_TOOLKIT_SCROLL_BARS=yes
12385 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12386 cat >>confdefs.h <<\_ACEOF
98418dba 12387#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12388_ACEOF
98418dba
CW
12389
12390 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12391 fi
488dd4c4
JD
12392 elif test "${HAVE_GTK}" = "yes"; then
12393 cat >>confdefs.h <<\_ACEOF
12394#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12395_ACEOF
12396
12397 USE_TOOLKIT_SCROLL_BARS=yes
12398 elif test "${HAVE_NS}" = "yes"; then
12399 cat >>confdefs.h <<\_ACEOF
12400#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12401_ACEOF
12402
12403 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12404 fi
12405fi
12406
abd39b57 12407cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12408/* confdefs.h. */
12409_ACEOF
12410cat confdefs.h >>conftest.$ac_ext
12411cat >>conftest.$ac_ext <<_ACEOF
12412/* end confdefs.h. */
12413
12414 #include <X11/Xlib.h>
12415 #include <X11/Xresource.h>
12416int
12417main ()
12418{
12419XIMProc callback;
12420 ;
12421 return 0;
12422}
12423_ACEOF
12424rm -f conftest.$ac_objext
ca81d7a0
JD
12425if { (ac_try="$ac_compile"
12426case "(($ac_try" in
12427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12428 *) ac_try_echo=$ac_try;;
12429esac
12430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12431 (eval "$ac_compile") 2>conftest.er1
abd39b57 12432 ac_status=$?
edfaf76d
LK
12433 grep -v '^ *+' conftest.er1 >conftest.err
12434 rm -f conftest.er1
12435 cat conftest.err >&5
abd39b57 12436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12437 (exit $ac_status); } && {
12438 test -z "$ac_c_werror_flag" ||
12439 test ! -s conftest.err
12440 } && test -s conftest.$ac_objext; then
abd39b57
AC
12441 HAVE_XIM=yes
12442
12443cat >>confdefs.h <<\_ACEOF
12444#define HAVE_XIM 1
12445_ACEOF
12446
12447else
12448 echo "$as_me: failed program was:" >&5
12449sed 's/^/| /' conftest.$ac_ext >&5
12450
ca81d7a0 12451 HAVE_XIM=no
abd39b57 12452fi
ca81d7a0
JD
12453
12454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12455
c0d27fcc 12456
98418dba 12457if test "${with_xim}" != "no"; then
b936fae4 12458
c0d27fcc 12459cat >>confdefs.h <<\_ACEOF
98418dba 12460#define USE_XIM 1
c0d27fcc 12461_ACEOF
98418dba 12462
793fa0d7 12463fi
abd39b57
AC
12464
12465
12466if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12467 late_CFLAGS=$CFLAGS
12468 if test "$GCC" = yes; then
12469 CFLAGS="$CFLAGS --pedantic-errors"
12470 fi
cffcede7 12471 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12472/* confdefs.h. */
12473_ACEOF
12474cat confdefs.h >>conftest.$ac_ext
12475cat >>conftest.$ac_ext <<_ACEOF
12476/* end confdefs.h. */
cffcede7
JD
12477
12478#include <X11/Xlib.h>
12479#include <X11/Xresource.h>
12480int
12481main ()
12482{
12483Display *display;
12484XrmDatabase db;
12485char *res_name;
12486char *res_class;
12487XIMProc callback;
12488XPointer *client_data;
849d80cf
DL
12489#ifndef __GNUC__
12490/* If we're not using GCC, it's probably not XFree86, and this is
12491 probably right, but we can't use something like --pedantic-errors. */
12492extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12493 char*, XIMProc, XPointer*);
12494#endif
cffcede7
JD
12495(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12496 client_data);
12497 ;
12498 return 0;
12499}
12500_ACEOF
12501rm -f conftest.$ac_objext
ca81d7a0
JD
12502if { (ac_try="$ac_compile"
12503case "(($ac_try" in
12504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12505 *) ac_try_echo=$ac_try;;
12506esac
12507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12508 (eval "$ac_compile") 2>conftest.er1
cffcede7 12509 ac_status=$?
edfaf76d
LK
12510 grep -v '^ *+' conftest.er1 >conftest.err
12511 rm -f conftest.er1
12512 cat conftest.err >&5
cffcede7 12513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12514 (exit $ac_status); } && {
12515 test -z "$ac_c_werror_flag" ||
12516 test ! -s conftest.err
12517 } && test -s conftest.$ac_objext; then
cffcede7
JD
12518 emacs_cv_arg6_star=yes
12519else
12520 echo "$as_me: failed program was:" >&5
19650fd6
AS
12521sed 's/^/| /' conftest.$ac_ext >&5
12522
ca81d7a0 12523
cffcede7 12524fi
ca81d7a0
JD
12525
12526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12527
12528 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12529 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12530#define XRegisterIMInstantiateCallback_arg6 XPointer*
12531_ACEOF
12532
12533 else
f57bd967 12534 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12535#define XRegisterIMInstantiateCallback_arg6 XPointer
12536_ACEOF
12537
12538 fi
849d80cf 12539 CFLAGS=$late_CFLAGS
45a4b03e
KH
12540fi
12541
77dfeef5 12542### Start of font-backend section.
45a4b03e 12543
b8bdd8c9
KH
12544## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12545HAVE_XFT=maybe
12546if test "x${with_freetype}" = "xno"; then
12547 with_xft="no";
12548fi
12549if test "x${with_xft}" != "xno"; then
45a4b03e 12550
45a4b03e
KH
12551
12552 succeeded=no
12553
d235ca2f 12554 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12555set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12556{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12557echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12558if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12559 echo $ECHO_N "(cached) $ECHO_C" >&6
12560else
12561 case $PKG_CONFIG in
12562 [\\/]* | ?:[\\/]*)
12563 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12564 ;;
12565 *)
12566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12567for as_dir in $PATH
12568do
12569 IFS=$as_save_IFS
12570 test -z "$as_dir" && as_dir=.
12571 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12573 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12574 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12575 break 2
12576 fi
12577done
12578done
c24fa7dc 12579IFS=$as_save_IFS
45a4b03e
KH
12580
12581 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12582 ;;
12583esac
12584fi
12585PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12586if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12587 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12588echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12589else
c24fa7dc
MB
12590 { echo "$as_me:$LINENO: result: no" >&5
12591echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12592fi
12593
c24fa7dc 12594
45a4b03e
KH
12595
12596 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12597 HAVE_XFT=no
45a4b03e
KH
12598 else
12599 PKG_CONFIG_MIN_VERSION=0.9.0
12600 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12601 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12602echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12603
c24fa7dc
MB
12604 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12605 { echo "$as_me:$LINENO: result: yes" >&5
12606echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12607 succeeded=yes
12608
c24fa7dc
MB
12609 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12610echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12611 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12612 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12613echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12614
c24fa7dc
MB
12615 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12616echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12617 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12618 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12619echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12620 else
c24fa7dc
MB
12621 { echo "$as_me:$LINENO: result: no" >&5
12622echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12623 XFT_CFLAGS=""
12624 XFT_LIBS=""
12625 ## If we have a custom action on failure, don't print errors, but
12626 ## do set a variable so people can do so.
12627 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12628
12629 fi
12630
12631
12632
12633 else
12634 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12635 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12636 fi
12637 fi
12638
12639 if test $succeeded = yes; then
12640 :
12641 else
12642 HAVE_XFT=no
12643 fi
12644
b8bdd8c9
KH
12645 if test "$HAVE_XFT" != no; then
12646 OLD_CPPFLAGS="$CPPFLAGS"
12647 OLD_CFLAGS="$CFLAGS"
12648 OLD_LIBS="$LIBS"
12649 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12650 CFLAGS="$CFLAGS $XFT_CFLAGS"
12651 LIBS="$XFT_LIBS $LIBS"
12652 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12653 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12654echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12655if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12656 echo $ECHO_N "(cached) $ECHO_C" >&6
12657fi
c24fa7dc
MB
12658{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12659echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12660else
12661 # Is the header compilable?
c24fa7dc
MB
12662{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12663echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12664cat >conftest.$ac_ext <<_ACEOF
12665/* confdefs.h. */
12666_ACEOF
12667cat confdefs.h >>conftest.$ac_ext
12668cat >>conftest.$ac_ext <<_ACEOF
12669/* end confdefs.h. */
12670$ac_includes_default
12671#include <X11/Xft/Xft.h>
12672_ACEOF
12673rm -f conftest.$ac_objext
c24fa7dc
MB
12674if { (ac_try="$ac_compile"
12675case "(($ac_try" in
12676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12677 *) ac_try_echo=$ac_try;;
12678esac
12679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12680 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12681 ac_status=$?
12682 grep -v '^ *+' conftest.er1 >conftest.err
12683 rm -f conftest.er1
12684 cat conftest.err >&5
12685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12686 (exit $ac_status); } && {
12687 test -z "$ac_c_werror_flag" ||
12688 test ! -s conftest.err
12689 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12690 ac_header_compiler=yes
12691else
12692 echo "$as_me: failed program was:" >&5
12693sed 's/^/| /' conftest.$ac_ext >&5
12694
c24fa7dc 12695 ac_header_compiler=no
45a4b03e 12696fi
c24fa7dc
MB
12697
12698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12699{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12700echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12701
12702# Is the header present?
c24fa7dc
MB
12703{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12704echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12705cat >conftest.$ac_ext <<_ACEOF
12706/* confdefs.h. */
12707_ACEOF
12708cat confdefs.h >>conftest.$ac_ext
12709cat >>conftest.$ac_ext <<_ACEOF
12710/* end confdefs.h. */
12711#include <X11/Xft/Xft.h>
12712_ACEOF
c24fa7dc
MB
12713if { (ac_try="$ac_cpp conftest.$ac_ext"
12714case "(($ac_try" in
12715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12716 *) ac_try_echo=$ac_try;;
12717esac
12718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12719 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12720 ac_status=$?
12721 grep -v '^ *+' conftest.er1 >conftest.err
12722 rm -f conftest.er1
12723 cat conftest.err >&5
12724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12725 (exit $ac_status); } >/dev/null && {
12726 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12727 test ! -s conftest.err
12728 }; then
45a4b03e
KH
12729 ac_header_preproc=yes
12730else
12731 echo "$as_me: failed program was:" >&5
12732sed 's/^/| /' conftest.$ac_ext >&5
12733
12734 ac_header_preproc=no
12735fi
c24fa7dc 12736
45a4b03e 12737rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12738{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12739echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12740
12741# So? What about this header?
12742case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12743 yes:no: )
12744 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12745echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12746 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12747echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12748 ac_header_preproc=yes
12749 ;;
12750 no:yes:* )
12751 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12752echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12753 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12754echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12755 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12756echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12757 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12758echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12759 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12760echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12761 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12762echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12763
45a4b03e
KH
12764 ;;
12765esac
c24fa7dc
MB
12766{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12767echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12768if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12769 echo $ECHO_N "(cached) $ECHO_C" >&6
12770else
12771 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12772fi
c24fa7dc
MB
12773{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12774echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12775
12776fi
12777if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12778 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12779echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12780if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12781 echo $ECHO_N "(cached) $ECHO_C" >&6
12782else
12783 ac_check_lib_save_LIBS=$LIBS
12784LIBS="-lXft $XFT_LIBS $LIBS"
12785cat >conftest.$ac_ext <<_ACEOF
12786/* confdefs.h. */
12787_ACEOF
12788cat confdefs.h >>conftest.$ac_ext
12789cat >>conftest.$ac_ext <<_ACEOF
12790/* end confdefs.h. */
12791
c24fa7dc
MB
12792/* Override any GCC internal prototype to avoid an error.
12793 Use char because int might match the return type of a GCC
12794 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12795#ifdef __cplusplus
12796extern "C"
12797#endif
45a4b03e
KH
12798char XftFontOpen ();
12799int
12800main ()
12801{
c24fa7dc 12802return XftFontOpen ();
45a4b03e
KH
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12808if { (ac_try="$ac_link"
12809case "(($ac_try" in
12810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12811 *) ac_try_echo=$ac_try;;
12812esac
12813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12814 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12815 ac_status=$?
12816 grep -v '^ *+' conftest.er1 >conftest.err
12817 rm -f conftest.er1
12818 cat conftest.err >&5
12819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12820 (exit $ac_status); } && {
12821 test -z "$ac_c_werror_flag" ||
12822 test ! -s conftest.err
12823 } && test -s conftest$ac_exeext &&
12824 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12825 ac_cv_lib_Xft_XftFontOpen=yes
12826else
12827 echo "$as_me: failed program was:" >&5
12828sed 's/^/| /' conftest.$ac_ext >&5
12829
c24fa7dc 12830 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12831fi
c24fa7dc
MB
12832
12833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12834 conftest$ac_exeext conftest.$ac_ext
12835LIBS=$ac_check_lib_save_LIBS
12836fi
c24fa7dc
MB
12837{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12838echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12839if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12840 HAVE_XFT=yes
12841fi
12842
12843fi
12844
12845
12846
b8bdd8c9 12847 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12848
12849cat >>confdefs.h <<\_ACEOF
12850#define HAVE_XFT 1
12851_ACEOF
12852
12853
b8bdd8c9
KH
12854 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12855 else
12856 CPPFLAGS="$OLD_CPPFLAGS"
12857 CFLAGS="$OLD_CFLAGS"
12858 LIBS="$OLD_LIBS"
12859 fi # "${HAVE_XFT}" = "yes"
12860 fi # "$HAVE_XFT" != no
12861fi # "x${with_xft}" != "xno"
2ee27f27 12862
b8bdd8c9
KH
12863if test "$HAVE_XFT" != "yes"; then
12864 HAVE_XFT=no
12865fi
45a4b03e 12866
b8bdd8c9
KH
12867
12868HAVE_FREETYPE=no
12869### Use -lfreetype if available, unless `--with-freetype=no'.
12870if test "${HAVE_XFT}" = "yes"; then
12871 HAVE_FREETYPE=yes
12872elif test "x${with_freetype}" != "xno"; then
45a4b03e 12873
d235ca2f 12874
45a4b03e
KH
12875 succeeded=no
12876
d235ca2f 12877 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12878set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12879{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12880echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12881if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12882 echo $ECHO_N "(cached) $ECHO_C" >&6
12883else
12884 case $PKG_CONFIG in
12885 [\\/]* | ?:[\\/]*)
12886 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12887 ;;
12888 *)
12889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12890for as_dir in $PATH
12891do
12892 IFS=$as_save_IFS
12893 test -z "$as_dir" && as_dir=.
12894 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12896 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12897 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12898 break 2
12899 fi
12900done
12901done
c24fa7dc 12902IFS=$as_save_IFS
45a4b03e
KH
12903
12904 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12905 ;;
12906esac
12907fi
12908PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12909if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12910 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12911echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12912else
c24fa7dc
MB
12913 { echo "$as_me:$LINENO: result: no" >&5
12914echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12915fi
12916
c24fa7dc 12917
45a4b03e
KH
12918
12919 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12920 HAVE_FREETYPE=no
45a4b03e
KH
12921 else
12922 PKG_CONFIG_MIN_VERSION=0.9.0
12923 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12924 { echo "$as_me:$LINENO: checking for freetype2" >&5
12925echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 12926
c24fa7dc
MB
12927 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12928 { echo "$as_me:$LINENO: result: yes" >&5
12929echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12930 succeeded=yes
12931
c24fa7dc
MB
12932 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
12933echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 12934 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12935 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
12936echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 12937
c24fa7dc
MB
12938 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
12939echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 12940 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12941 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
12942echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 12943 else
c24fa7dc
MB
12944 { echo "$as_me:$LINENO: result: no" >&5
12945echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12946 FREETYPE_CFLAGS=""
12947 FREETYPE_LIBS=""
12948 ## If we have a custom action on failure, don't print errors, but
12949 ## do set a variable so people can do so.
12950 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12951
12952 fi
12953
12954
12955
12956 else
12957 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12958 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12959 fi
12960 fi
12961
12962 if test $succeeded = yes; then
12963 HAVE_FREETYPE=yes
12964 else
12965 HAVE_FREETYPE=no
12966 fi
12967
b8bdd8c9 12968 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12969
12970 succeeded=no
12971
d235ca2f 12972 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12973set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12974{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12975echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12976if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12977 echo $ECHO_N "(cached) $ECHO_C" >&6
12978else
12979 case $PKG_CONFIG in
12980 [\\/]* | ?:[\\/]*)
12981 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12982 ;;
12983 *)
12984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12985for as_dir in $PATH
12986do
12987 IFS=$as_save_IFS
12988 test -z "$as_dir" && as_dir=.
12989 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12991 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12992 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12993 break 2
12994 fi
12995done
12996done
c24fa7dc 12997IFS=$as_save_IFS
45a4b03e
KH
12998
12999 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13000 ;;
13001esac
13002fi
13003PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13004if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13005 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13006echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13007else
c24fa7dc
MB
13008 { echo "$as_me:$LINENO: result: no" >&5
13009echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13010fi
13011
c24fa7dc 13012
45a4b03e
KH
13013
13014 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13015 HAVE_FC=no
45a4b03e
KH
13016 else
13017 PKG_CONFIG_MIN_VERSION=0.9.0
13018 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13019 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13020echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13021
c24fa7dc
MB
13022 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13023 { echo "$as_me:$LINENO: result: yes" >&5
13024echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13025 succeeded=yes
13026
c24fa7dc
MB
13027 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13028echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13029 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13030 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13031echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13032
c24fa7dc
MB
13033 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13034echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13035 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13036 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13037echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13038 else
c24fa7dc
MB
13039 { echo "$as_me:$LINENO: result: no" >&5
13040echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13041 FONTCONFIG_CFLAGS=""
13042 FONTCONFIG_LIBS=""
13043 ## If we have a custom action on failure, don't print errors, but
13044 ## do set a variable so people can do so.
13045 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13046
13047 fi
13048
13049
13050
13051 else
13052 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13053 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13054 fi
13055 fi
13056
13057 if test $succeeded = yes; then
13058 HAVE_FC=yes
13059 else
13060 HAVE_FC=no
13061 fi
13062
b8bdd8c9
KH
13063 if test "${HAVE_FC}" = "no"; then
13064 HAVE_FREETYPE=no
45a4b03e
KH
13065 fi
13066 fi
b8bdd8c9 13067fi
e70b2110 13068
b8bdd8c9
KH
13069HAVE_LIBOTF=no
13070if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13071
13072cat >>confdefs.h <<\_ACEOF
13073#define HAVE_FREETYPE 1
13074_ACEOF
13075
b8bdd8c9 13076 if test "${with_libotf}" != "no"; then
e70b2110
KH
13077
13078 succeeded=no
13079
d235ca2f 13080 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13081set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13082{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13083echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13084if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13085 echo $ECHO_N "(cached) $ECHO_C" >&6
13086else
e70b2110
KH
13087 case $PKG_CONFIG in
13088 [\\/]* | ?:[\\/]*)
13089 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13090 ;;
13091 *)
13092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13093for as_dir in $PATH
13094do
13095 IFS=$as_save_IFS
13096 test -z "$as_dir" && as_dir=.
13097 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13098 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13099 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13100 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13101 break 2
13102 fi
13103done
13104done
c24fa7dc 13105IFS=$as_save_IFS
45a4b03e 13106
e70b2110
KH
13107 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13108 ;;
13109esac
45a4b03e 13110fi
e70b2110
KH
13111PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13112if test -n "$PKG_CONFIG"; then
13113 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13114echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13115else
c24fa7dc
MB
13116 { echo "$as_me:$LINENO: result: no" >&5
13117echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13118fi
13119
c24fa7dc 13120
45a4b03e 13121
e70b2110 13122 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13123 HAVE_LIBOTF=no
e70b2110
KH
13124 else
13125 PKG_CONFIG_MIN_VERSION=0.9.0
13126 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13127 { echo "$as_me:$LINENO: checking for libotf" >&5
13128echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13129
e70b2110
KH
13130 if $PKG_CONFIG --exists "libotf" 2>&5; then
13131 { echo "$as_me:$LINENO: result: yes" >&5
13132echo "${ECHO_T}yes" >&6; }
13133 succeeded=yes
6ed29d7b 13134
e70b2110
KH
13135 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13136echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13137 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13138 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13139echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13140
13141 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13142echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13143 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13144 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13145echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13146 else
13147 { echo "$as_me:$LINENO: result: no" >&5
13148echo "${ECHO_T}no" >&6; }
13149 LIBOTF_CFLAGS=""
13150 LIBOTF_LIBS=""
13151 ## If we have a custom action on failure, don't print errors, but
13152 ## do set a variable so people can do so.
13153 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13154
e70b2110 13155 fi
6ed29d7b 13156
6ed29d7b 13157
6ed29d7b 13158
e70b2110
KH
13159 else
13160 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13161 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13162 fi
13163 fi
13164
13165 if test $succeeded = yes; then
435f8bc5 13166 HAVE_LIBOTF=yes
e70b2110 13167 else
435f8bc5 13168 HAVE_LIBOTF=no
e70b2110
KH
13169 fi
13170
b8bdd8c9 13171 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13172
45a4b03e
KH
13173cat >>confdefs.h <<\_ACEOF
13174#define HAVE_LIBOTF 1
13175_ACEOF
13176
6ed29d7b 13177 fi
45a4b03e 13178 fi
b8bdd8c9 13179fi
45a4b03e 13180
b8bdd8c9
KH
13181HAVE_M17N_FLT=no
13182if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13183
13184 succeeded=no
13185
d235ca2f 13186 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13187set dummy pkg-config; ac_word=$2
13188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13190if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
13192else
13193 case $PKG_CONFIG in
13194 [\\/]* | ?:[\\/]*)
13195 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13196 ;;
13197 *)
13198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13199for as_dir in $PATH
13200do
13201 IFS=$as_save_IFS
13202 test -z "$as_dir" && as_dir=.
13203 for ac_exec_ext in '' $ac_executable_extensions; do
13204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13205 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13207 break 2
13208 fi
13209done
13210done
13211IFS=$as_save_IFS
13212
13213 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13214 ;;
13215esac
13216fi
13217PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13218if test -n "$PKG_CONFIG"; then
13219 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13220echo "${ECHO_T}$PKG_CONFIG" >&6; }
13221else
13222 { echo "$as_me:$LINENO: result: no" >&5
13223echo "${ECHO_T}no" >&6; }
13224fi
13225
13226
7f0942ba
KH
13227
13228 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13229 HAVE_M17N_FLT=no
7f0942ba
KH
13230 else
13231 PKG_CONFIG_MIN_VERSION=0.9.0
13232 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13233 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13234echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13235
13236 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13237 { echo "$as_me:$LINENO: result: yes" >&5
13238echo "${ECHO_T}yes" >&6; }
13239 succeeded=yes
13240
13241 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13242echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13243 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13244 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13245echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13246
13247 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13248echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13249 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13250 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13251echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13252 else
13253 { echo "$as_me:$LINENO: result: no" >&5
13254echo "${ECHO_T}no" >&6; }
13255 M17N_FLT_CFLAGS=""
13256 M17N_FLT_LIBS=""
13257 ## If we have a custom action on failure, don't print errors, but
13258 ## do set a variable so people can do so.
13259 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13260
13261 fi
13262
13263
13264
13265 else
13266 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13267 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13268 fi
13269 fi
13270
13271 if test $succeeded = yes; then
435f8bc5 13272 HAVE_M17N_FLT=yes
7f0942ba 13273 else
435f8bc5 13274 HAVE_M17N_FLT=no
7f0942ba
KH
13275 fi
13276
b8bdd8c9 13277 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13278
13279cat >>confdefs.h <<\_ACEOF
13280#define HAVE_M17N_FLT 1
13281_ACEOF
13282
e70b2110 13283 fi
b8bdd8c9 13284fi
e70b2110
KH
13285
13286
13287
13288
13289
13290
13291
7f0942ba
KH
13292
13293
7f0942ba 13294
77dfeef5 13295### End of font-backend section.
98418dba
CW
13296
13297### Use -lXpm if available, unless `--with-xpm=no'.
13298HAVE_XPM=no
13299if test "${HAVE_X11}" = "yes"; then
13300 if test "${with_xpm}" != "no"; then
c0d27fcc 13301 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13302 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13303echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13304if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13306fi
4c34eeee
MB
13307{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13308echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13309else
c0d27fcc 13310 # Is the header compilable?
4c34eeee
MB
13311{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13312echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13313cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13314/* confdefs.h. */
13315_ACEOF
13316cat confdefs.h >>conftest.$ac_ext
13317cat >>conftest.$ac_ext <<_ACEOF
13318/* end confdefs.h. */
c0d27fcc
MR
13319$ac_includes_default
13320#include <X11/xpm.h>
13321_ACEOF
13322rm -f conftest.$ac_objext
4c34eeee
MB
13323if { (ac_try="$ac_compile"
13324case "(($ac_try" in
13325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13326 *) ac_try_echo=$ac_try;;
13327esac
13328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13329 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13330 ac_status=$?
edfaf76d
LK
13331 grep -v '^ *+' conftest.er1 >conftest.err
13332 rm -f conftest.er1
13333 cat conftest.err >&5
c0d27fcc 13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13335 (exit $ac_status); } && {
13336 test -z "$ac_c_werror_flag" ||
13337 test ! -s conftest.err
13338 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13339 ac_header_compiler=yes
13340else
13341 echo "$as_me: failed program was:" >&5
19650fd6
AS
13342sed 's/^/| /' conftest.$ac_ext >&5
13343
4c34eeee 13344 ac_header_compiler=no
c0d27fcc 13345fi
4c34eeee
MB
13346
13347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13349echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13350
13351# Is the header present?
4c34eeee
MB
13352{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13353echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13354cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13355/* confdefs.h. */
13356_ACEOF
13357cat confdefs.h >>conftest.$ac_ext
13358cat >>conftest.$ac_ext <<_ACEOF
13359/* end confdefs.h. */
98418dba
CW
13360#include <X11/xpm.h>
13361_ACEOF
4c34eeee
MB
13362if { (ac_try="$ac_cpp conftest.$ac_ext"
13363case "(($ac_try" in
13364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13365 *) ac_try_echo=$ac_try;;
13366esac
13367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13368 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13369 ac_status=$?
6bae0ccf 13370 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13371 rm -f conftest.er1
13372 cat conftest.err >&5
c0d27fcc 13373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13374 (exit $ac_status); } >/dev/null && {
13375 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13376 test ! -s conftest.err
13377 }; then
c0d27fcc 13378 ac_header_preproc=yes
98418dba
CW
13379else
13380 echo "$as_me: failed program was:" >&5
19650fd6
AS
13381sed 's/^/| /' conftest.$ac_ext >&5
13382
c0d27fcc 13383 ac_header_preproc=no
98418dba 13384fi
4c34eeee 13385
98418dba 13386rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13387{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13388echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13389
13390# So? What about this header?
edfaf76d
LK
13391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13392 yes:no: )
c0d27fcc
MR
13393 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13394echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13395 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13396echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13397 ac_header_preproc=yes
13398 ;;
13399 no:yes:* )
13400 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13401echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13402 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13403echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13404 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13405echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13406 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13407echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13408 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13409echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13410 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13411echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13412
19650fd6 13413 ;;
c0d27fcc 13414esac
4c34eeee
MB
13415{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13416echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13417if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13418 echo $ECHO_N "(cached) $ECHO_C" >&6
13419else
13420 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13421fi
4c34eeee
MB
13422{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13423echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13424
13425fi
98418dba 13426if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13427 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13428echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13429if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13430 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13431else
98418dba
CW
13432 ac_check_lib_save_LIBS=$LIBS
13433LIBS="-lXpm -lX11 $LIBS"
13434cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13435/* confdefs.h. */
13436_ACEOF
13437cat confdefs.h >>conftest.$ac_ext
13438cat >>conftest.$ac_ext <<_ACEOF
13439/* end confdefs.h. */
98418dba 13440
4c34eeee
MB
13441/* Override any GCC internal prototype to avoid an error.
13442 Use char because int might match the return type of a GCC
13443 builtin and then its argument prototype would still apply. */
503d2be0
AS
13444#ifdef __cplusplus
13445extern "C"
13446#endif
98418dba 13447char XpmReadFileToPixmap ();
503d2be0
AS
13448int
13449main ()
13450{
4c34eeee 13451return XpmReadFileToPixmap ();
503d2be0
AS
13452 ;
13453 return 0;
13454}
13455_ACEOF
13456rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13457if { (ac_try="$ac_link"
13458case "(($ac_try" in
13459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13460 *) ac_try_echo=$ac_try;;
13461esac
13462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13463 (eval "$ac_link") 2>conftest.er1
503d2be0 13464 ac_status=$?
edfaf76d
LK
13465 grep -v '^ *+' conftest.er1 >conftest.err
13466 rm -f conftest.er1
13467 cat conftest.err >&5
c0d27fcc 13468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13469 (exit $ac_status); } && {
13470 test -z "$ac_c_werror_flag" ||
13471 test ! -s conftest.err
13472 } && test -s conftest$ac_exeext &&
13473 $as_test_x conftest$ac_exeext; then
98418dba 13474 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13475else
13476 echo "$as_me: failed program was:" >&5
19650fd6
AS
13477sed 's/^/| /' conftest.$ac_ext >&5
13478
4c34eeee 13479 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13480fi
4c34eeee
MB
13481
13482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13483 conftest$ac_exeext conftest.$ac_ext
98418dba 13484LIBS=$ac_check_lib_save_LIBS
503d2be0 13485fi
4c34eeee
MB
13486{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13487echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13488if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13489 HAVE_XPM=yes
ba4481b5
DL
13490fi
13491
98418dba
CW
13492fi
13493
c0d27fcc 13494
98418dba 13495 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13496 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13497echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13499/* confdefs.h. */
13500_ACEOF
13501cat confdefs.h >>conftest.$ac_ext
13502cat >>conftest.$ac_ext <<_ACEOF
13503/* end confdefs.h. */
98418dba
CW
13504#include "X11/xpm.h"
13505#ifndef XpmReturnAllocPixels
13506no_return_alloc_pixels
503d2be0 13507#endif
ba4481b5 13508
98418dba
CW
13509_ACEOF
13510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13511 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13512 HAVE_XPM=no
13513else
13514 HAVE_XPM=yes
13515fi
13516rm -f conftest*
ba4481b5 13517
c0d27fcc 13518
98418dba 13519 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13520 { echo "$as_me:$LINENO: result: yes" >&5
13521echo "${ECHO_T}yes" >&6; }
98418dba 13522 else
4c34eeee
MB
13523 { echo "$as_me:$LINENO: result: no" >&5
13524echo "${ECHO_T}no" >&6; }
98418dba
CW
13525 fi
13526 fi
13527 fi
13528
13529 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13530
c0d27fcc 13531cat >>confdefs.h <<\_ACEOF
98418dba 13532#define HAVE_XPM 1
c0d27fcc 13533_ACEOF
98418dba
CW
13534
13535 fi
13536fi
13537
13538### Use -ljpeg if available, unless `--with-jpeg=no'.
13539HAVE_JPEG=no
13540if test "${HAVE_X11}" = "yes"; then
13541 if test "${with_jpeg}" != "no"; then
c0d27fcc 13542 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13543 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13544echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13545if test "${ac_cv_header_jerror_h+set}" = set; then
13546 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13547fi
ca81d7a0
JD
13548{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13549echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13550else
c0d27fcc 13551 # Is the header compilable?
ca81d7a0
JD
13552{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13553echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13554cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13555/* confdefs.h. */
13556_ACEOF
13557cat confdefs.h >>conftest.$ac_ext
13558cat >>conftest.$ac_ext <<_ACEOF
13559/* end confdefs.h. */
c0d27fcc
MR
13560$ac_includes_default
13561#include <jerror.h>
13562_ACEOF
13563rm -f conftest.$ac_objext
ca81d7a0
JD
13564if { (ac_try="$ac_compile"
13565case "(($ac_try" in
13566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13567 *) ac_try_echo=$ac_try;;
13568esac
13569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13570 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13571 ac_status=$?
edfaf76d
LK
13572 grep -v '^ *+' conftest.er1 >conftest.err
13573 rm -f conftest.er1
13574 cat conftest.err >&5
c0d27fcc 13575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13576 (exit $ac_status); } && {
13577 test -z "$ac_c_werror_flag" ||
13578 test ! -s conftest.err
13579 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13580 ac_header_compiler=yes
13581else
13582 echo "$as_me: failed program was:" >&5
19650fd6
AS
13583sed 's/^/| /' conftest.$ac_ext >&5
13584
ca81d7a0 13585 ac_header_compiler=no
c0d27fcc 13586fi
ca81d7a0
JD
13587
13588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13590echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13591
13592# Is the header present?
ca81d7a0
JD
13593{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13594echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13595cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13596/* confdefs.h. */
13597_ACEOF
13598cat confdefs.h >>conftest.$ac_ext
13599cat >>conftest.$ac_ext <<_ACEOF
13600/* end confdefs.h. */
98418dba
CW
13601#include <jerror.h>
13602_ACEOF
ca81d7a0
JD
13603if { (ac_try="$ac_cpp conftest.$ac_ext"
13604case "(($ac_try" in
13605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13606 *) ac_try_echo=$ac_try;;
13607esac
13608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13609 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13610 ac_status=$?
6bae0ccf 13611 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13612 rm -f conftest.er1
13613 cat conftest.err >&5
c0d27fcc 13614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13615 (exit $ac_status); } >/dev/null && {
13616 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13617 test ! -s conftest.err
13618 }; then
c0d27fcc 13619 ac_header_preproc=yes
ba4481b5 13620else
98418dba 13621 echo "$as_me: failed program was:" >&5
19650fd6
AS
13622sed 's/^/| /' conftest.$ac_ext >&5
13623
c0d27fcc 13624 ac_header_preproc=no
98418dba 13625fi
ca81d7a0 13626
98418dba 13627rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13628{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13629echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13630
13631# So? What about this header?
edfaf76d
LK
13632case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13633 yes:no: )
c0d27fcc
MR
13634 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13635echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13636 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13637echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13638 ac_header_preproc=yes
19650fd6 13639 ;;
edfaf76d 13640 no:yes:* )
c0d27fcc
MR
13641 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13642echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13643 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13644echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13645 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13646echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13647 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13648echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13649 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13650echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13651 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13652echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13653
19650fd6 13654 ;;
c0d27fcc 13655esac
ca81d7a0
JD
13656{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13657echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13658if test "${ac_cv_header_jerror_h+set}" = set; then
13659 echo $ECHO_N "(cached) $ECHO_C" >&6
13660else
13661 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13662fi
ca81d7a0
JD
13663{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13664echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13665
13666fi
98418dba 13667if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13668 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13669echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13670if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13671 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13672else
98418dba
CW
13673 ac_check_lib_save_LIBS=$LIBS
13674LIBS="-ljpeg $LIBS"
13675cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13676/* confdefs.h. */
13677_ACEOF
13678cat confdefs.h >>conftest.$ac_ext
13679cat >>conftest.$ac_ext <<_ACEOF
13680/* end confdefs.h. */
98418dba 13681
ca81d7a0
JD
13682/* Override any GCC internal prototype to avoid an error.
13683 Use char because int might match the return type of a GCC
13684 builtin and then its argument prototype would still apply. */
98418dba
CW
13685#ifdef __cplusplus
13686extern "C"
13687#endif
98418dba 13688char jpeg_destroy_compress ();
503d2be0
AS
13689int
13690main ()
13691{
ca81d7a0 13692return jpeg_destroy_compress ();
503d2be0
AS
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13698if { (ac_try="$ac_link"
13699case "(($ac_try" in
13700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13701 *) ac_try_echo=$ac_try;;
13702esac
13703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13704 (eval "$ac_link") 2>conftest.er1
503d2be0 13705 ac_status=$?
edfaf76d
LK
13706 grep -v '^ *+' conftest.er1 >conftest.err
13707 rm -f conftest.er1
13708 cat conftest.err >&5
c0d27fcc 13709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13710 (exit $ac_status); } && {
13711 test -z "$ac_c_werror_flag" ||
13712 test ! -s conftest.err
13713 } && test -s conftest$ac_exeext &&
13714 $as_test_x conftest$ac_exeext; then
98418dba 13715 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13716else
503d2be0 13717 echo "$as_me: failed program was:" >&5
19650fd6
AS
13718sed 's/^/| /' conftest.$ac_ext >&5
13719
ca81d7a0 13720 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13721fi
ca81d7a0 13722
f053c89f 13723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13724 conftest$ac_exeext conftest.$ac_ext
98418dba 13725LIBS=$ac_check_lib_save_LIBS
ba4481b5 13726fi
ca81d7a0
JD
13727{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13728echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13729if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13730 HAVE_JPEG=yes
ba4481b5 13731fi
98418dba 13732
ba4481b5 13733fi
98418dba 13734
c0d27fcc 13735
ba4481b5 13736 fi
ba4481b5 13737
c0d27fcc 13738
98418dba 13739 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13740 cat >>confdefs.h <<\_ACEOF
98418dba 13741#define HAVE_JPEG 1
c0d27fcc 13742_ACEOF
98418dba
CW
13743
13744 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13745/* confdefs.h. */
13746_ACEOF
13747cat confdefs.h >>conftest.$ac_ext
13748cat >>conftest.$ac_ext <<_ACEOF
13749/* end confdefs.h. */
22044edf 13750#include <jpeglib.h>
98418dba
CW
13751 version=JPEG_LIB_VERSION
13752
13753_ACEOF
13754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13755 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13756 cat >>confdefs.h <<\_ACEOF
98418dba 13757#define HAVE_JPEG 1
c0d27fcc 13758_ACEOF
ba4481b5 13759
98418dba 13760else
c0d27fcc 13761 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13762echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13763 HAVE_JPEG=no
ba4481b5 13764fi
98418dba 13765rm -f conftest*
ba4481b5 13766
98418dba
CW
13767 fi
13768fi
503d2be0 13769
98418dba
CW
13770### Use -lpng if available, unless `--with-png=no'.
13771HAVE_PNG=no
13772if test "${HAVE_X11}" = "yes"; then
13773 if test "${with_png}" != "no"; then
f57bd967
DL
13774 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13775 # in /usr/include/libpng.
13776
13777
13778for ac_header in png.h libpng/png.h
13779do
13780as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13782 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13784if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13785 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13786fi
ca81d7a0
JD
13787ac_res=`eval echo '${'$as_ac_Header'}'`
13788 { echo "$as_me:$LINENO: result: $ac_res" >&5
13789echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13790else
c0d27fcc 13791 # Is the header compilable?
ca81d7a0
JD
13792{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13793echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
c0d27fcc 13800$ac_includes_default
f57bd967 13801#include <$ac_header>
c0d27fcc
MR
13802_ACEOF
13803rm -f conftest.$ac_objext
ca81d7a0
JD
13804if { (ac_try="$ac_compile"
13805case "(($ac_try" in
13806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13807 *) ac_try_echo=$ac_try;;
13808esac
13809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13810 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13811 ac_status=$?
edfaf76d
LK
13812 grep -v '^ *+' conftest.er1 >conftest.err
13813 rm -f conftest.er1
13814 cat conftest.err >&5
c0d27fcc 13815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13816 (exit $ac_status); } && {
13817 test -z "$ac_c_werror_flag" ||
13818 test ! -s conftest.err
13819 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13820 ac_header_compiler=yes
13821else
13822 echo "$as_me: failed program was:" >&5
19650fd6
AS
13823sed 's/^/| /' conftest.$ac_ext >&5
13824
ca81d7a0 13825 ac_header_compiler=no
c0d27fcc 13826fi
ca81d7a0
JD
13827
13828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13829{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13830echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13831
13832# Is the header present?
ca81d7a0
JD
13833{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13834echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13835cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13836/* confdefs.h. */
13837_ACEOF
13838cat confdefs.h >>conftest.$ac_ext
13839cat >>conftest.$ac_ext <<_ACEOF
13840/* end confdefs.h. */
f57bd967 13841#include <$ac_header>
503d2be0 13842_ACEOF
ca81d7a0
JD
13843if { (ac_try="$ac_cpp conftest.$ac_ext"
13844case "(($ac_try" in
13845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13846 *) ac_try_echo=$ac_try;;
13847esac
13848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13850 ac_status=$?
6bae0ccf 13851 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13852 rm -f conftest.er1
13853 cat conftest.err >&5
c0d27fcc 13854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13855 (exit $ac_status); } >/dev/null && {
13856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13857 test ! -s conftest.err
13858 }; then
c0d27fcc 13859 ac_header_preproc=yes
503d2be0
AS
13860else
13861 echo "$as_me: failed program was:" >&5
19650fd6
AS
13862sed 's/^/| /' conftest.$ac_ext >&5
13863
c0d27fcc 13864 ac_header_preproc=no
ba4481b5 13865fi
ca81d7a0 13866
503d2be0 13867rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13868{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13869echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13870
13871# So? What about this header?
edfaf76d
LK
13872case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13873 yes:no: )
f57bd967
DL
13874 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13875echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13876 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13877echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13878 ac_header_preproc=yes
19650fd6 13879 ;;
edfaf76d 13880 no:yes:* )
f57bd967
DL
13881 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13882echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13883 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13884echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13885 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13886echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13887 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13888echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13889 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13890echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13891 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13892echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13893
19650fd6 13894 ;;
c0d27fcc 13895esac
ca81d7a0
JD
13896{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13898if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
13900else
edfaf76d 13901 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13902fi
ca81d7a0
JD
13903ac_res=`eval echo '${'$as_ac_Header'}'`
13904 { echo "$as_me:$LINENO: result: $ac_res" >&5
13905echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13906
ba4481b5 13907fi
f57bd967
DL
13908if test `eval echo '${'$as_ac_Header'}'` = yes; then
13909 cat >>confdefs.h <<_ACEOF
13910#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13911_ACEOF
c0d27fcc
MR
13912
13913fi
f57bd967
DL
13914
13915done
13916
13917 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13918 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13919echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13920if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13921 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13922else
98418dba
CW
13923 ac_check_lib_save_LIBS=$LIBS
13924LIBS="-lpng -lz -lm $LIBS"
13925cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13926/* confdefs.h. */
13927_ACEOF
13928cat confdefs.h >>conftest.$ac_ext
13929cat >>conftest.$ac_ext <<_ACEOF
13930/* end confdefs.h. */
98418dba 13931
ca81d7a0
JD
13932/* Override any GCC internal prototype to avoid an error.
13933 Use char because int might match the return type of a GCC
13934 builtin and then its argument prototype would still apply. */
503d2be0
AS
13935#ifdef __cplusplus
13936extern "C"
13937#endif
98418dba 13938char png_get_channels ();
503d2be0
AS
13939int
13940main ()
13941{
ca81d7a0 13942return png_get_channels ();
503d2be0
AS
13943 ;
13944 return 0;
13945}
13946_ACEOF
13947rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13948if { (ac_try="$ac_link"
13949case "(($ac_try" in
13950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13951 *) ac_try_echo=$ac_try;;
13952esac
13953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13954 (eval "$ac_link") 2>conftest.er1
503d2be0 13955 ac_status=$?
edfaf76d
LK
13956 grep -v '^ *+' conftest.er1 >conftest.err
13957 rm -f conftest.er1
13958 cat conftest.err >&5
c0d27fcc 13959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13960 (exit $ac_status); } && {
13961 test -z "$ac_c_werror_flag" ||
13962 test ! -s conftest.err
13963 } && test -s conftest$ac_exeext &&
13964 $as_test_x conftest$ac_exeext; then
98418dba 13965 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13966else
98418dba 13967 echo "$as_me: failed program was:" >&5
19650fd6
AS
13968sed 's/^/| /' conftest.$ac_ext >&5
13969
ca81d7a0 13970 ac_cv_lib_png_png_get_channels=no
73b77ee5 13971fi
ca81d7a0 13972
f053c89f 13973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13974 conftest$ac_exeext conftest.$ac_ext
98418dba 13975LIBS=$ac_check_lib_save_LIBS
73b77ee5 13976fi
ca81d7a0
JD
13977{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13978echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13979if test $ac_cv_lib_png_png_get_channels = yes; then
13980 HAVE_PNG=yes
73b77ee5 13981fi
503d2be0 13982
f57bd967 13983 fi
98418dba
CW
13984 fi
13985
13986 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13987
c0d27fcc 13988cat >>confdefs.h <<\_ACEOF
98418dba 13989#define HAVE_PNG 1
c0d27fcc 13990_ACEOF
73b77ee5 13991
98418dba 13992 fi
73b77ee5
GM
13993fi
13994
98418dba
CW
13995### Use -ltiff if available, unless `--with-tiff=no'.
13996HAVE_TIFF=no
13997if test "${HAVE_X11}" = "yes"; then
13998 if test "${with_tiff}" != "no"; then
c0d27fcc 13999 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14000 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14001echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14002if test "${ac_cv_header_tiffio_h+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14004fi
ca81d7a0
JD
14005{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14006echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14007else
c0d27fcc 14008 # Is the header compilable?
ca81d7a0
JD
14009{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14010echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14011cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
c0d27fcc
MR
14017$ac_includes_default
14018#include <tiffio.h>
14019_ACEOF
14020rm -f conftest.$ac_objext
ca81d7a0
JD
14021if { (ac_try="$ac_compile"
14022case "(($ac_try" in
14023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14024 *) ac_try_echo=$ac_try;;
14025esac
14026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14027 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14028 ac_status=$?
edfaf76d
LK
14029 grep -v '^ *+' conftest.er1 >conftest.err
14030 rm -f conftest.er1
14031 cat conftest.err >&5
c0d27fcc 14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14033 (exit $ac_status); } && {
14034 test -z "$ac_c_werror_flag" ||
14035 test ! -s conftest.err
14036 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14037 ac_header_compiler=yes
14038else
14039 echo "$as_me: failed program was:" >&5
19650fd6
AS
14040sed 's/^/| /' conftest.$ac_ext >&5
14041
ca81d7a0 14042 ac_header_compiler=no
c0d27fcc 14043fi
ca81d7a0
JD
14044
14045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14046{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14047echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14048
14049# Is the header present?
ca81d7a0
JD
14050{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14051echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14053/* confdefs.h. */
14054_ACEOF
14055cat confdefs.h >>conftest.$ac_ext
14056cat >>conftest.$ac_ext <<_ACEOF
14057/* end confdefs.h. */
98418dba
CW
14058#include <tiffio.h>
14059_ACEOF
ca81d7a0
JD
14060if { (ac_try="$ac_cpp conftest.$ac_ext"
14061case "(($ac_try" in
14062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14063 *) ac_try_echo=$ac_try;;
14064esac
14065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14066 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14067 ac_status=$?
6bae0ccf 14068 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14069 rm -f conftest.er1
14070 cat conftest.err >&5
c0d27fcc 14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14072 (exit $ac_status); } >/dev/null && {
14073 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14074 test ! -s conftest.err
14075 }; then
c0d27fcc 14076 ac_header_preproc=yes
98418dba
CW
14077else
14078 echo "$as_me: failed program was:" >&5
19650fd6
AS
14079sed 's/^/| /' conftest.$ac_ext >&5
14080
c0d27fcc 14081 ac_header_preproc=no
98418dba 14082fi
ca81d7a0 14083
98418dba 14084rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14085{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14086echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14087
14088# So? What about this header?
edfaf76d
LK
14089case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14090 yes:no: )
c0d27fcc
MR
14091 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14092echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14093 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14094echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14095 ac_header_preproc=yes
19650fd6 14096 ;;
edfaf76d 14097 no:yes:* )
c0d27fcc
MR
14098 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14099echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14100 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14101echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14102 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14103echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14104 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14105echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14106 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14107echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14108 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14109echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14110
19650fd6 14111 ;;
c0d27fcc 14112esac
ca81d7a0
JD
14113{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14114echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14115if test "${ac_cv_header_tiffio_h+set}" = set; then
14116 echo $ECHO_N "(cached) $ECHO_C" >&6
14117else
14118 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14119fi
ca81d7a0
JD
14120{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14121echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14122
14123fi
98418dba
CW
14124if test $ac_cv_header_tiffio_h = yes; then
14125 tifflibs="-lz -lm"
14126 # At least one tiff package requires the jpeg library.
14127 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14128 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14129echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14130if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14131 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14132else
503d2be0 14133 ac_check_lib_save_LIBS=$LIBS
98418dba 14134LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14135cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14136/* confdefs.h. */
14137_ACEOF
14138cat confdefs.h >>conftest.$ac_ext
14139cat >>conftest.$ac_ext <<_ACEOF
14140/* end confdefs.h. */
503d2be0 14141
ca81d7a0
JD
14142/* Override any GCC internal prototype to avoid an error.
14143 Use char because int might match the return type of a GCC
14144 builtin and then its argument prototype would still apply. */
503d2be0
AS
14145#ifdef __cplusplus
14146extern "C"
14147#endif
98418dba 14148char TIFFGetVersion ();
503d2be0
AS
14149int
14150main ()
14151{
ca81d7a0 14152return TIFFGetVersion ();
503d2be0
AS
14153 ;
14154 return 0;
14155}
14156_ACEOF
14157rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14158if { (ac_try="$ac_link"
14159case "(($ac_try" in
14160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14161 *) ac_try_echo=$ac_try;;
14162esac
14163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14164 (eval "$ac_link") 2>conftest.er1
503d2be0 14165 ac_status=$?
edfaf76d
LK
14166 grep -v '^ *+' conftest.er1 >conftest.err
14167 rm -f conftest.er1
14168 cat conftest.err >&5
c0d27fcc 14169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14170 (exit $ac_status); } && {
14171 test -z "$ac_c_werror_flag" ||
14172 test ! -s conftest.err
14173 } && test -s conftest$ac_exeext &&
14174 $as_test_x conftest$ac_exeext; then
98418dba 14175 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14176else
14177 echo "$as_me: failed program was:" >&5
19650fd6
AS
14178sed 's/^/| /' conftest.$ac_ext >&5
14179
ca81d7a0 14180 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14181fi
ca81d7a0 14182
f053c89f 14183rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14184 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14185LIBS=$ac_check_lib_save_LIBS
14186fi
ca81d7a0
JD
14187{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14188echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14189if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14190 HAVE_TIFF=yes
14191fi
14192
14193fi
73b77ee5 14194
c0d27fcc 14195
98418dba
CW
14196 fi
14197
14198 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14199
c0d27fcc 14200cat >>confdefs.h <<\_ACEOF
98418dba 14201#define HAVE_TIFF 1
c0d27fcc 14202_ACEOF
98418dba
CW
14203
14204 fi
73b77ee5
GM
14205fi
14206
9aeb8aaa 14207### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14208HAVE_GIF=no
9aeb8aaa
GM
14209if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14210 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14211 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14212echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14213if test "${ac_cv_header_gif_lib_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_gif_lib_h" >&5
14217echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14218else
c0d27fcc 14219 # Is the header compilable?
ca81d7a0
JD
14220{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14221echo $ECHO_N "checking gif_lib.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 <gif_lib.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 gif_lib.h presence" >&5
14262echo $ECHO_N "checking gif_lib.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 <gif_lib.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: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14303echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14304 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14305echo "$as_me: WARNING: gif_lib.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: gif_lib.h: present but cannot be compiled" >&5
14310echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14311 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14312echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14313 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14314echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14315 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14316echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14317 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14318echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14319 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14320echo "$as_me: WARNING: gif_lib.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 gif_lib.h" >&5
14325echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14326if test "${ac_cv_header_gif_lib_h+set}" = set; then
14327 echo $ECHO_N "(cached) $ECHO_C" >&6
14328else
14329 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14330fi
ca81d7a0
JD
14331{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14332echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14333
14334fi
98418dba
CW
14335if test $ac_cv_header_gif_lib_h = yes; then
14336 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14337# Earlier versions can crash Emacs.
63175cd2
GM
14338 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14339echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14340if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14341 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14342else
503d2be0 14343 ac_check_lib_save_LIBS=$LIBS
63175cd2 14344LIBS="-lgif $LIBS"
503d2be0 14345cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14346/* confdefs.h. */
14347_ACEOF
14348cat confdefs.h >>conftest.$ac_ext
14349cat >>conftest.$ac_ext <<_ACEOF
14350/* end confdefs.h. */
73b77ee5 14351
ca81d7a0
JD
14352/* Override any GCC internal prototype to avoid an error.
14353 Use char because int might match the return type of a GCC
14354 builtin and then its argument prototype would still apply. */
98418dba
CW
14355#ifdef __cplusplus
14356extern "C"
14357#endif
98418dba 14358char EGifPutExtensionLast ();
503d2be0
AS
14359int
14360main ()
14361{
ca81d7a0 14362return EGifPutExtensionLast ();
503d2be0
AS
14363 ;
14364 return 0;
14365}
14366_ACEOF
14367rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14368if { (ac_try="$ac_link"
14369case "(($ac_try" in
14370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14371 *) ac_try_echo=$ac_try;;
14372esac
14373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14374 (eval "$ac_link") 2>conftest.er1
503d2be0 14375 ac_status=$?
edfaf76d
LK
14376 grep -v '^ *+' conftest.er1 >conftest.err
14377 rm -f conftest.er1
14378 cat conftest.err >&5
c0d27fcc 14379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14380 (exit $ac_status); } && {
14381 test -z "$ac_c_werror_flag" ||
14382 test ! -s conftest.err
14383 } && test -s conftest$ac_exeext &&
14384 $as_test_x conftest$ac_exeext; then
63175cd2 14385 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14386else
98418dba 14387 echo "$as_me: failed program was:" >&5
19650fd6
AS
14388sed 's/^/| /' conftest.$ac_ext >&5
14389
63175cd2 14390 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14391fi
ca81d7a0 14392
f053c89f 14393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14394 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14395LIBS=$ac_check_lib_save_LIBS
14396fi
63175cd2
GM
14397{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14398echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14399if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14400 HAVE_GIF=yes
9aeb8aaa 14401else
63175cd2 14402 try_libungif=yes
98418dba
CW
14403fi
14404
14405fi
14406
c0d27fcc 14407
9aeb8aaa
GM
14408
14409 if test "$HAVE_GIF" = yes; then
63175cd2 14410 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14411 fi
14412
63175cd2
GM
14413# If gif_lib.h but no libgif, try libungif.
14414 if test x"$try_libungif" = xyes; then
14415 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14416echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14417if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14418 echo $ECHO_N "(cached) $ECHO_C" >&6
14419else
14420 ac_check_lib_save_LIBS=$LIBS
63175cd2 14421LIBS="-lungif $LIBS"
9aeb8aaa
GM
14422cat >conftest.$ac_ext <<_ACEOF
14423/* confdefs.h. */
14424_ACEOF
14425cat confdefs.h >>conftest.$ac_ext
14426cat >>conftest.$ac_ext <<_ACEOF
14427/* end confdefs.h. */
14428
14429/* Override any GCC internal prototype to avoid an error.
14430 Use char because int might match the return type of a GCC
14431 builtin and then its argument prototype would still apply. */
14432#ifdef __cplusplus
14433extern "C"
14434#endif
14435char EGifPutExtensionLast ();
14436int
14437main ()
14438{
14439return EGifPutExtensionLast ();
14440 ;
14441 return 0;
14442}
14443_ACEOF
14444rm -f conftest.$ac_objext conftest$ac_exeext
14445if { (ac_try="$ac_link"
14446case "(($ac_try" in
14447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14448 *) ac_try_echo=$ac_try;;
14449esac
14450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14451 (eval "$ac_link") 2>conftest.er1
14452 ac_status=$?
14453 grep -v '^ *+' conftest.er1 >conftest.err
14454 rm -f conftest.er1
14455 cat conftest.err >&5
14456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457 (exit $ac_status); } && {
14458 test -z "$ac_c_werror_flag" ||
14459 test ! -s conftest.err
14460 } && test -s conftest$ac_exeext &&
14461 $as_test_x conftest$ac_exeext; then
63175cd2 14462 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14463else
14464 echo "$as_me: failed program was:" >&5
14465sed 's/^/| /' conftest.$ac_ext >&5
14466
63175cd2 14467 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14468fi
14469
9aeb8aaa
GM
14470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14471 conftest$ac_exeext conftest.$ac_ext
14472LIBS=$ac_check_lib_save_LIBS
14473fi
63175cd2
GM
14474{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14475echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14476if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14477 HAVE_GIF=yes
98418dba
CW
14478fi
14479
c0d27fcc 14480
9aeb8aaa
GM
14481 if test "$HAVE_GIF" = yes; then
14482
14483cat >>confdefs.h <<\_ACEOF
63175cd2 14484#define LIBGIF -lungif
9aeb8aaa
GM
14485_ACEOF
14486
63175cd2 14487 ac_gif_lib_name="-lungif"
9aeb8aaa 14488 fi
98418dba
CW
14489 fi
14490
14491 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14492
c0d27fcc 14493cat >>confdefs.h <<\_ACEOF
98418dba 14494#define HAVE_GIF 1
c0d27fcc 14495_ACEOF
98418dba
CW
14496
14497 fi
14498fi
14499
5afbeb22
JD
14500if test "${HAVE_X11}" = "yes"; then
14501 MISSING=""
14502 WITH_NO=""
14503 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14504 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14505 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14506 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14507 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14508 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14509 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14510 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14511 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14512 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14513
14514 if test "X${MISSING}" != X; then
1bb9a689 14515 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14516 $MISSING
86e73516 14517Maybe some development libraries/packages are missing?
5afbeb22
JD
14518If you don't want to link with them give
14519 $WITH_NO
14520as options to configure" >&5
1bb9a689 14521echo "$as_me: error: The following required libraries were not found:
5afbeb22 14522 $MISSING
86e73516 14523Maybe some development libraries/packages are missing?
5afbeb22
JD
14524If you don't want to link with them give
14525 $WITH_NO
14526as options to configure" >&2;}
86e73516 14527 { (exit 1); exit 1; }; }
98418dba
CW
14528 fi
14529fi
14530
79011b82
NR
14531### Use -lgpm if available, unless `--with-gpm=no'.
14532HAVE_GPM=no
14533if test "${with_gpm}" != "no"; then
14534 if test "${ac_cv_header_gpm_h+set}" = set; then
14535 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14536echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14537if test "${ac_cv_header_gpm_h+set}" = set; then
14538 echo $ECHO_N "(cached) $ECHO_C" >&6
14539fi
14540{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14541echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14542else
14543 # Is the header compilable?
14544{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14545echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14546cat >conftest.$ac_ext <<_ACEOF
14547/* confdefs.h. */
14548_ACEOF
14549cat confdefs.h >>conftest.$ac_ext
14550cat >>conftest.$ac_ext <<_ACEOF
14551/* end confdefs.h. */
14552$ac_includes_default
14553#include <gpm.h>
14554_ACEOF
14555rm -f conftest.$ac_objext
14556if { (ac_try="$ac_compile"
14557case "(($ac_try" in
14558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14559 *) ac_try_echo=$ac_try;;
14560esac
14561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14562 (eval "$ac_compile") 2>conftest.er1
14563 ac_status=$?
14564 grep -v '^ *+' conftest.er1 >conftest.err
14565 rm -f conftest.er1
14566 cat conftest.err >&5
14567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14568 (exit $ac_status); } && {
14569 test -z "$ac_c_werror_flag" ||
14570 test ! -s conftest.err
14571 } && test -s conftest.$ac_objext; then
14572 ac_header_compiler=yes
14573else
14574 echo "$as_me: failed program was:" >&5
14575sed 's/^/| /' conftest.$ac_ext >&5
14576
14577 ac_header_compiler=no
14578fi
14579
14580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14582echo "${ECHO_T}$ac_header_compiler" >&6; }
14583
14584# Is the header present?
14585{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14586echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14587cat >conftest.$ac_ext <<_ACEOF
14588/* confdefs.h. */
14589_ACEOF
14590cat confdefs.h >>conftest.$ac_ext
14591cat >>conftest.$ac_ext <<_ACEOF
14592/* end confdefs.h. */
14593#include <gpm.h>
14594_ACEOF
14595if { (ac_try="$ac_cpp conftest.$ac_ext"
14596case "(($ac_try" in
14597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14598 *) ac_try_echo=$ac_try;;
14599esac
14600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14602 ac_status=$?
14603 grep -v '^ *+' conftest.er1 >conftest.err
14604 rm -f conftest.er1
14605 cat conftest.err >&5
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); } >/dev/null && {
14608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14609 test ! -s conftest.err
14610 }; then
14611 ac_header_preproc=yes
14612else
14613 echo "$as_me: failed program was:" >&5
14614sed 's/^/| /' conftest.$ac_ext >&5
14615
14616 ac_header_preproc=no
14617fi
14618
14619rm -f conftest.err conftest.$ac_ext
14620{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14621echo "${ECHO_T}$ac_header_preproc" >&6; }
14622
14623# So? What about this header?
14624case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14625 yes:no: )
14626 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14627echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14628 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14629echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14630 ac_header_preproc=yes
14631 ;;
14632 no:yes:* )
14633 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14634echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14635 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14636echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14637 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14638echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14639 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14640echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14641 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14642echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14643 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14644echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14645
14646 ;;
14647esac
14648{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14649echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14650if test "${ac_cv_header_gpm_h+set}" = set; then
14651 echo $ECHO_N "(cached) $ECHO_C" >&6
14652else
14653 ac_cv_header_gpm_h=$ac_header_preproc
14654fi
14655{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14656echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14657
14658fi
14659if test $ac_cv_header_gpm_h = yes; then
14660 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14661echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14662if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14663 echo $ECHO_N "(cached) $ECHO_C" >&6
14664else
14665 ac_check_lib_save_LIBS=$LIBS
14666LIBS="-lgpm $LIBS"
14667cat >conftest.$ac_ext <<_ACEOF
14668/* confdefs.h. */
14669_ACEOF
14670cat confdefs.h >>conftest.$ac_ext
14671cat >>conftest.$ac_ext <<_ACEOF
14672/* end confdefs.h. */
14673
14674/* Override any GCC internal prototype to avoid an error.
14675 Use char because int might match the return type of a GCC
14676 builtin and then its argument prototype would still apply. */
14677#ifdef __cplusplus
14678extern "C"
14679#endif
14680char Gpm_Open ();
14681int
14682main ()
14683{
14684return Gpm_Open ();
14685 ;
14686 return 0;
14687}
14688_ACEOF
14689rm -f conftest.$ac_objext conftest$ac_exeext
14690if { (ac_try="$ac_link"
14691case "(($ac_try" in
14692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14693 *) ac_try_echo=$ac_try;;
14694esac
14695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14696 (eval "$ac_link") 2>conftest.er1
14697 ac_status=$?
14698 grep -v '^ *+' conftest.er1 >conftest.err
14699 rm -f conftest.er1
14700 cat conftest.err >&5
14701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14702 (exit $ac_status); } && {
14703 test -z "$ac_c_werror_flag" ||
14704 test ! -s conftest.err
14705 } && test -s conftest$ac_exeext &&
14706 $as_test_x conftest$ac_exeext; then
14707 ac_cv_lib_gpm_Gpm_Open=yes
14708else
14709 echo "$as_me: failed program was:" >&5
14710sed 's/^/| /' conftest.$ac_ext >&5
14711
14712 ac_cv_lib_gpm_Gpm_Open=no
14713fi
14714
14715rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14716 conftest$ac_exeext conftest.$ac_ext
14717LIBS=$ac_check_lib_save_LIBS
14718fi
14719{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14720echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14721if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14722 HAVE_GPM=yes
14723fi
14724
14725fi
14726
14727
14728fi
14729
14730if test "${HAVE_GPM}" = "yes"; then
14731
14732cat >>confdefs.h <<\_ACEOF
14733#define HAVE_GPM 1
14734_ACEOF
14735
14736fi
14737
cef11da2 14738if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14739 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14740echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14741if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14742 echo $ECHO_N "(cached) $ECHO_C" >&6
14743fi
ca81d7a0
JD
14744{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14745echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14746else
14747 # Is the header compilable?
ca81d7a0
JD
14748{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14749echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14750cat >conftest.$ac_ext <<_ACEOF
14751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
14756$ac_includes_default
14757#include <malloc/malloc.h>
14758_ACEOF
14759rm -f conftest.$ac_objext
ca81d7a0
JD
14760if { (ac_try="$ac_compile"
14761case "(($ac_try" in
14762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14763 *) ac_try_echo=$ac_try;;
14764esac
14765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14766 (eval "$ac_compile") 2>conftest.er1
cef11da2 14767 ac_status=$?
edfaf76d
LK
14768 grep -v '^ *+' conftest.er1 >conftest.err
14769 rm -f conftest.er1
14770 cat conftest.err >&5
cef11da2 14771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14772 (exit $ac_status); } && {
14773 test -z "$ac_c_werror_flag" ||
14774 test ! -s conftest.err
14775 } && test -s conftest.$ac_objext; then
cef11da2
ST
14776 ac_header_compiler=yes
14777else
14778 echo "$as_me: failed program was:" >&5
14779sed 's/^/| /' conftest.$ac_ext >&5
14780
ca81d7a0 14781 ac_header_compiler=no
cef11da2 14782fi
ca81d7a0
JD
14783
14784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14786echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14787
14788# Is the header present?
ca81d7a0
JD
14789{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14790echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14791cat >conftest.$ac_ext <<_ACEOF
14792/* confdefs.h. */
14793_ACEOF
14794cat confdefs.h >>conftest.$ac_ext
14795cat >>conftest.$ac_ext <<_ACEOF
14796/* end confdefs.h. */
14797#include <malloc/malloc.h>
14798_ACEOF
ca81d7a0
JD
14799if { (ac_try="$ac_cpp conftest.$ac_ext"
14800case "(($ac_try" in
14801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14802 *) ac_try_echo=$ac_try;;
14803esac
14804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14805 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14806 ac_status=$?
14807 grep -v '^ *+' conftest.er1 >conftest.err
14808 rm -f conftest.er1
14809 cat conftest.err >&5
14810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14811 (exit $ac_status); } >/dev/null && {
14812 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14813 test ! -s conftest.err
14814 }; then
cef11da2
ST
14815 ac_header_preproc=yes
14816else
14817 echo "$as_me: failed program was:" >&5
14818sed 's/^/| /' conftest.$ac_ext >&5
14819
14820 ac_header_preproc=no
14821fi
ca81d7a0 14822
cef11da2 14823rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14824{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14825echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14826
14827# So? What about this header?
edfaf76d
LK
14828case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14829 yes:no: )
cef11da2
ST
14830 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14831echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14832 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14833echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14834 ac_header_preproc=yes
cef11da2 14835 ;;
edfaf76d 14836 no:yes:* )
cef11da2
ST
14837 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14838echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14839 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14840echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14841 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14842echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14843 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14844echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14845 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14846echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14847 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14848echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14849
cef11da2
ST
14850 ;;
14851esac
ca81d7a0
JD
14852{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14853echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14854if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
14856else
14857 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14858fi
ca81d7a0
JD
14859{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14860echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14861
7c9e5167 14862fi
cef11da2
ST
14863if test $ac_cv_header_malloc_malloc_h = yes; then
14864
14865cat >>confdefs.h <<\_ACEOF
14866#define HAVE_MALLOC_MALLOC_H 1
14867_ACEOF
14868
7c9e5167
JD
14869fi
14870
cef11da2
ST
14871
14872
edfda783
AR
14873### Use NeXTstep API to implement GUI.
14874if test "${HAVE_NS}" = "yes"; then
14875
14876cat >>confdefs.h <<\_ACEOF
14877#define HAVE_NS 1
14878_ACEOF
14879
ff1095d1 14880 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
14881
14882cat >>confdefs.h <<\_ACEOF
14883#define NS_IMPL_COCOA 1
14884_ACEOF
14885
48fad8e8
DN
14886 GNU_OBJC_CFLAGS=
14887 LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
edfda783
AR
14888 fi
14889 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
14890
14891cat >>confdefs.h <<\_ACEOF
14892#define COCOA_EXPERIMENTAL_CTRL_G 1
14893_ACEOF
14894
14895 fi
ff1095d1 14896 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
14897
14898cat >>confdefs.h <<\_ACEOF
14899#define NS_IMPL_GNUSTEP 1
14900_ACEOF
14901
48fad8e8 14902 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
edfda783 14903 fi
d5e2f8fe 14904 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
519c4a9a
CY
14905
14906cat >>confdefs.h <<\_ACEOF
d5e2f8fe 14907#define NS_HAVE_NSINTEGER 1
519c4a9a
CY
14908_ACEOF
14909
177cd151
CY
14910 fi
14911 # We also have mouse menus.
edfda783
AR
14912 HAVE_MENUS=yes
14913fi
14914
e0f712ba 14915
98418dba
CW
14916### Use session management (-lSM -lICE) if available
14917HAVE_X_SM=no
14918if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14919 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14920 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14921echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14922if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14923 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14924fi
ca81d7a0
JD
14925{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14926echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14927else
c0d27fcc 14928 # Is the header compilable?
ca81d7a0
JD
14929{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14930echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14931cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14932/* confdefs.h. */
14933_ACEOF
14934cat confdefs.h >>conftest.$ac_ext
14935cat >>conftest.$ac_ext <<_ACEOF
14936/* end confdefs.h. */
c0d27fcc
MR
14937$ac_includes_default
14938#include <X11/SM/SMlib.h>
14939_ACEOF
14940rm -f conftest.$ac_objext
ca81d7a0
JD
14941if { (ac_try="$ac_compile"
14942case "(($ac_try" in
14943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14944 *) ac_try_echo=$ac_try;;
14945esac
14946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14947 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14948 ac_status=$?
edfaf76d
LK
14949 grep -v '^ *+' conftest.er1 >conftest.err
14950 rm -f conftest.er1
14951 cat conftest.err >&5
c0d27fcc 14952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14953 (exit $ac_status); } && {
14954 test -z "$ac_c_werror_flag" ||
14955 test ! -s conftest.err
14956 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14957 ac_header_compiler=yes
14958else
14959 echo "$as_me: failed program was:" >&5
19650fd6
AS
14960sed 's/^/| /' conftest.$ac_ext >&5
14961
ca81d7a0 14962 ac_header_compiler=no
c0d27fcc 14963fi
ca81d7a0
JD
14964
14965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14966{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14967echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14968
14969# Is the header present?
ca81d7a0
JD
14970{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14971echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14972cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14973/* confdefs.h. */
14974_ACEOF
14975cat confdefs.h >>conftest.$ac_ext
14976cat >>conftest.$ac_ext <<_ACEOF
14977/* end confdefs.h. */
98418dba
CW
14978#include <X11/SM/SMlib.h>
14979_ACEOF
ca81d7a0
JD
14980if { (ac_try="$ac_cpp conftest.$ac_ext"
14981case "(($ac_try" in
14982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14983 *) ac_try_echo=$ac_try;;
14984esac
14985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14986 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14987 ac_status=$?
6bae0ccf 14988 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14989 rm -f conftest.er1
14990 cat conftest.err >&5
c0d27fcc 14991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14992 (exit $ac_status); } >/dev/null && {
14993 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14994 test ! -s conftest.err
14995 }; then
c0d27fcc 14996 ac_header_preproc=yes
98418dba
CW
14997else
14998 echo "$as_me: failed program was:" >&5
19650fd6
AS
14999sed 's/^/| /' conftest.$ac_ext >&5
15000
c0d27fcc 15001 ac_header_preproc=no
98418dba 15002fi
ca81d7a0 15003
98418dba 15004rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15005{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15006echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15007
15008# So? What about this header?
edfaf76d
LK
15009case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15010 yes:no: )
c0d27fcc
MR
15011 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15012echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15013 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15014echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15015 ac_header_preproc=yes
19650fd6 15016 ;;
edfaf76d 15017 no:yes:* )
c0d27fcc
MR
15018 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15019echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15020 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15021echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15022 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15023echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15024 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15025echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15026 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15027echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15028 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15029echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15030
19650fd6 15031 ;;
c0d27fcc 15032esac
ca81d7a0
JD
15033{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15034echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15035if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15036 echo $ECHO_N "(cached) $ECHO_C" >&6
15037else
15038 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15039fi
ca81d7a0
JD
15040{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15041echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15042
15043fi
98418dba 15044if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15045 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15046echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15047if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15048 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15049else
503d2be0 15050 ac_check_lib_save_LIBS=$LIBS
1660500f 15051LIBS="-lSM -lICE $LIBS"
503d2be0 15052cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15053/* confdefs.h. */
15054_ACEOF
15055cat confdefs.h >>conftest.$ac_ext
15056cat >>conftest.$ac_ext <<_ACEOF
15057/* end confdefs.h. */
503d2be0 15058
ca81d7a0
JD
15059/* Override any GCC internal prototype to avoid an error.
15060 Use char because int might match the return type of a GCC
15061 builtin and then its argument prototype would still apply. */
503d2be0
AS
15062#ifdef __cplusplus
15063extern "C"
15064#endif
98418dba 15065char SmcOpenConnection ();
503d2be0
AS
15066int
15067main ()
15068{
ca81d7a0 15069return SmcOpenConnection ();
503d2be0
AS
15070 ;
15071 return 0;
15072}
15073_ACEOF
15074rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15075if { (ac_try="$ac_link"
15076case "(($ac_try" in
15077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15078 *) ac_try_echo=$ac_try;;
15079esac
15080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15081 (eval "$ac_link") 2>conftest.er1
503d2be0 15082 ac_status=$?
edfaf76d
LK
15083 grep -v '^ *+' conftest.er1 >conftest.err
15084 rm -f conftest.er1
15085 cat conftest.err >&5
c0d27fcc 15086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15087 (exit $ac_status); } && {
15088 test -z "$ac_c_werror_flag" ||
15089 test ! -s conftest.err
15090 } && test -s conftest$ac_exeext &&
15091 $as_test_x conftest$ac_exeext; then
98418dba 15092 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15093else
15094 echo "$as_me: failed program was:" >&5
19650fd6
AS
15095sed 's/^/| /' conftest.$ac_ext >&5
15096
ca81d7a0 15097 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15098fi
ca81d7a0 15099
f053c89f 15100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15101 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15102LIBS=$ac_check_lib_save_LIBS
15103fi
ca81d7a0
JD
15104{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15105echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15106if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15107 HAVE_X_SM=yes
73b77ee5
GM
15108fi
15109
73b77ee5 15110fi
73b77ee5 15111
c0d27fcc
MR
15112
15113
98418dba 15114 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15115
c0d27fcc 15116cat >>confdefs.h <<\_ACEOF
98418dba 15117#define HAVE_X_SM 1
c0d27fcc 15118_ACEOF
73b77ee5 15119
98418dba
CW
15120 case "$LIBS" in
15121 *-lSM*) ;;
15122 *) LIBS="-lSM -lICE $LIBS" ;;
15123 esac
73b77ee5 15124 fi
98418dba 15125fi
73b77ee5 15126
98418dba 15127# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15128{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15129echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15130if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15131 echo $ECHO_N "(cached) $ECHO_C" >&6
15132else
15133 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15134/* confdefs.h. */
15135_ACEOF
15136cat confdefs.h >>conftest.$ac_ext
15137cat >>conftest.$ac_ext <<_ACEOF
15138/* end confdefs.h. */
98418dba 15139#include <netdb.h>
503d2be0
AS
15140int
15141main ()
15142{
98418dba 15143return h_errno;
503d2be0
AS
15144 ;
15145 return 0;
15146}
15147_ACEOF
15148rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15149if { (ac_try="$ac_link"
15150case "(($ac_try" in
15151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15152 *) ac_try_echo=$ac_try;;
15153esac
15154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15155 (eval "$ac_link") 2>conftest.er1
503d2be0 15156 ac_status=$?
edfaf76d
LK
15157 grep -v '^ *+' conftest.er1 >conftest.err
15158 rm -f conftest.er1
15159 cat conftest.err >&5
c0d27fcc 15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15161 (exit $ac_status); } && {
15162 test -z "$ac_c_werror_flag" ||
15163 test ! -s conftest.err
15164 } && test -s conftest$ac_exeext &&
15165 $as_test_x conftest$ac_exeext; then
98418dba 15166 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15167else
503d2be0 15168 echo "$as_me: failed program was:" >&5
19650fd6
AS
15169sed 's/^/| /' conftest.$ac_ext >&5
15170
ca81d7a0 15171 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15172fi
ca81d7a0 15173
f053c89f 15174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15175 conftest$ac_exeext conftest.$ac_ext
98418dba 15176fi
ca81d7a0
JD
15177{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15178echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15179if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15180
c0d27fcc 15181cat >>confdefs.h <<\_ACEOF
98418dba 15182#define HAVE_H_ERRNO 1
c0d27fcc 15183_ACEOF
73b77ee5 15184
98418dba
CW
15185fi
15186
15187# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15188# for constant arguments. Useless!
ca81d7a0
JD
15189{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15190echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15191if test "${ac_cv_working_alloca_h+set}" = set; then
15192 echo $ECHO_N "(cached) $ECHO_C" >&6
15193else
15194 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15195/* confdefs.h. */
15196_ACEOF
15197cat confdefs.h >>conftest.$ac_ext
15198cat >>conftest.$ac_ext <<_ACEOF
15199/* end confdefs.h. */
98418dba 15200#include <alloca.h>
503d2be0
AS
15201int
15202main ()
15203{
98418dba 15204char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15205 if (p) return 0;
503d2be0
AS
15206 ;
15207 return 0;
15208}
15209_ACEOF
15210rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15211if { (ac_try="$ac_link"
15212case "(($ac_try" in
15213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15214 *) ac_try_echo=$ac_try;;
15215esac
15216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15217 (eval "$ac_link") 2>conftest.er1
503d2be0 15218 ac_status=$?
edfaf76d
LK
15219 grep -v '^ *+' conftest.er1 >conftest.err
15220 rm -f conftest.er1
15221 cat conftest.err >&5
c0d27fcc 15222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15223 (exit $ac_status); } && {
15224 test -z "$ac_c_werror_flag" ||
15225 test ! -s conftest.err
15226 } && test -s conftest$ac_exeext &&
15227 $as_test_x conftest$ac_exeext; then
98418dba 15228 ac_cv_working_alloca_h=yes
73b77ee5 15229else
503d2be0 15230 echo "$as_me: failed program was:" >&5
19650fd6
AS
15231sed 's/^/| /' conftest.$ac_ext >&5
15232
ca81d7a0 15233 ac_cv_working_alloca_h=no
73b77ee5 15234fi
ca81d7a0 15235
f053c89f 15236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15237 conftest$ac_exeext conftest.$ac_ext
98418dba 15238fi
ca81d7a0
JD
15239{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15240echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15241if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15242
c0d27fcc 15243cat >>confdefs.h <<\_ACEOF
98418dba 15244#define HAVE_ALLOCA_H 1
c0d27fcc 15245_ACEOF
98418dba
CW
15246
15247fi
15248
ca81d7a0
JD
15249{ echo "$as_me:$LINENO: checking for alloca" >&5
15250echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15251if test "${ac_cv_func_alloca_works+set}" = set; then
15252 echo $ECHO_N "(cached) $ECHO_C" >&6
15253else
503d2be0 15254 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15255/* confdefs.h. */
15256_ACEOF
15257cat confdefs.h >>conftest.$ac_ext
15258cat >>conftest.$ac_ext <<_ACEOF
15259/* end confdefs.h. */
98418dba
CW
15260#ifdef __GNUC__
15261# define alloca __builtin_alloca
15262#else
15263# ifdef _MSC_VER
15264# include <malloc.h>
15265# define alloca _alloca
15266# else
f053c89f 15267# ifdef HAVE_ALLOCA_H
98418dba
CW
15268# include <alloca.h>
15269# else
15270# ifdef _AIX
15271 #pragma alloca
15272# else
15273# ifndef alloca /* predefined by HP cc +Olibcalls */
15274char *alloca ();
15275# endif
15276# endif
15277# endif
15278# endif
15279#endif
15280
503d2be0
AS
15281int
15282main ()
15283{
98418dba 15284char *p = (char *) alloca (1);
ca81d7a0 15285 if (p) return 0;
503d2be0
AS
15286 ;
15287 return 0;
15288}
15289_ACEOF
15290rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15291if { (ac_try="$ac_link"
15292case "(($ac_try" in
15293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15294 *) ac_try_echo=$ac_try;;
15295esac
15296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15297 (eval "$ac_link") 2>conftest.er1
503d2be0 15298 ac_status=$?
edfaf76d
LK
15299 grep -v '^ *+' conftest.er1 >conftest.err
15300 rm -f conftest.er1
15301 cat conftest.err >&5
c0d27fcc 15302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15303 (exit $ac_status); } && {
15304 test -z "$ac_c_werror_flag" ||
15305 test ! -s conftest.err
15306 } && test -s conftest$ac_exeext &&
15307 $as_test_x conftest$ac_exeext; then
98418dba 15308 ac_cv_func_alloca_works=yes
ac95a621 15309else
503d2be0 15310 echo "$as_me: failed program was:" >&5
19650fd6
AS
15311sed 's/^/| /' conftest.$ac_ext >&5
15312
ca81d7a0 15313 ac_cv_func_alloca_works=no
ac95a621 15314fi
ca81d7a0 15315
f053c89f 15316rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15317 conftest$ac_exeext conftest.$ac_ext
98418dba 15318fi
ca81d7a0
JD
15319{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15320echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15321
98418dba
CW
15322if test $ac_cv_func_alloca_works = yes; then
15323
c0d27fcc 15324cat >>confdefs.h <<\_ACEOF
98418dba 15325#define HAVE_ALLOCA 1
c0d27fcc 15326_ACEOF
98418dba
CW
15327
15328else
15329 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15330# that cause trouble. Some versions do not even contain alloca or
15331# contain a buggy version. If you still want to use their alloca,
15332# use ar to extract alloca.o from them instead of compiling alloca.c.
15333
ca81d7a0 15334ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15335
c0d27fcc 15336cat >>confdefs.h <<\_ACEOF
98418dba 15337#define C_ALLOCA 1
c0d27fcc 15338_ACEOF
98418dba 15339
c0d27fcc 15340
ca81d7a0
JD
15341{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15342echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15343if test "${ac_cv_os_cray+set}" = set; then
15344 echo $ECHO_N "(cached) $ECHO_C" >&6
15345else
15346 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15347/* confdefs.h. */
15348_ACEOF
15349cat confdefs.h >>conftest.$ac_ext
15350cat >>conftest.$ac_ext <<_ACEOF
15351/* end confdefs.h. */
ca81d7a0 15352#if defined CRAY && ! defined CRAY2
98418dba
CW
15353webecray
15354#else
15355wenotbecray
15356#endif
15357
15358_ACEOF
15359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15360 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15361 ac_cv_os_cray=yes
15362else
15363 ac_cv_os_cray=no
15364fi
15365rm -f conftest*
ac95a621 15366
98418dba 15367fi
ca81d7a0
JD
15368{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15369echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15370if test $ac_cv_os_cray = yes; then
15371 for ac_func in _getb67 GETB67 getb67; do
15372 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15373{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15374echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15375if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15376 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15377else
503d2be0 15378 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15379/* confdefs.h. */
15380_ACEOF
15381cat confdefs.h >>conftest.$ac_ext
15382cat >>conftest.$ac_ext <<_ACEOF
15383/* end confdefs.h. */
edfaf76d
LK
15384/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15386#define $ac_func innocuous_$ac_func
15387
73b77ee5 15388/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15389 which can conflict with char $ac_func (); below.
15390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15391 <limits.h> exists even on freestanding compilers. */
edfaf76d 15392
19650fd6
AS
15393#ifdef __STDC__
15394# include <limits.h>
15395#else
15396# include <assert.h>
15397#endif
edfaf76d
LK
15398
15399#undef $ac_func
15400
ca81d7a0
JD
15401/* Override any GCC internal prototype to avoid an error.
15402 Use char because int might match the return type of a GCC
15403 builtin and then its argument prototype would still apply. */
503d2be0
AS
15404#ifdef __cplusplus
15405extern "C"
15406#endif
503d2be0 15407char $ac_func ();
73b77ee5
GM
15408/* The GNU C library defines this for functions which it implements
15409 to always fail with ENOSYS. Some functions are actually named
15410 something starting with __ and the normal name is an alias. */
ca81d7a0 15411#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15412choke me
73b77ee5
GM
15413#endif
15414
19650fd6
AS
15415int
15416main ()
15417{
ca81d7a0 15418return $ac_func ();
503d2be0
AS
15419 ;
15420 return 0;
15421}
15422_ACEOF
15423rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15424if { (ac_try="$ac_link"
15425case "(($ac_try" in
15426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15427 *) ac_try_echo=$ac_try;;
15428esac
15429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15430 (eval "$ac_link") 2>conftest.er1
503d2be0 15431 ac_status=$?
edfaf76d
LK
15432 grep -v '^ *+' conftest.er1 >conftest.err
15433 rm -f conftest.er1
15434 cat conftest.err >&5
c0d27fcc 15435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15436 (exit $ac_status); } && {
15437 test -z "$ac_c_werror_flag" ||
15438 test ! -s conftest.err
15439 } && test -s conftest$ac_exeext &&
15440 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15441 eval "$as_ac_var=yes"
15442else
15443 echo "$as_me: failed program was:" >&5
19650fd6
AS
15444sed 's/^/| /' conftest.$ac_ext >&5
15445
ca81d7a0 15446 eval "$as_ac_var=no"
503d2be0 15447fi
ca81d7a0 15448
f053c89f 15449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15450 conftest$ac_exeext conftest.$ac_ext
503d2be0 15451fi
ca81d7a0
JD
15452ac_res=`eval echo '${'$as_ac_var'}'`
15453 { echo "$as_me:$LINENO: result: $ac_res" >&5
15454echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15455if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15456
c0d27fcc 15457cat >>confdefs.h <<_ACEOF
98418dba 15458#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15459_ACEOF
98418dba
CW
15460
15461 break
73b77ee5 15462fi
73b77ee5 15463
98418dba 15464 done
73b77ee5
GM
15465fi
15466
ca81d7a0
JD
15467{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15468echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15469if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15470 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15471else
15472 if test "$cross_compiling" = yes; then
15473 ac_cv_c_stack_direction=0
73b77ee5 15474else
503d2be0 15475 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15476/* confdefs.h. */
15477_ACEOF
15478cat confdefs.h >>conftest.$ac_ext
15479cat >>conftest.$ac_ext <<_ACEOF
15480/* end confdefs.h. */
ca81d7a0 15481$ac_includes_default
503d2be0 15482int
98418dba 15483find_stack_direction ()
503d2be0 15484{
98418dba
CW
15485 static char *addr = 0;
15486 auto char dummy;
15487 if (addr == 0)
15488 {
15489 addr = &dummy;
15490 return find_stack_direction ();
15491 }
73b77ee5 15492 else
98418dba
CW
15493 return (&dummy > addr) ? 1 : -1;
15494}
ba4481b5 15495
503d2be0
AS
15496int
15497main ()
15498{
ca81d7a0 15499 return find_stack_direction () < 0;
503d2be0
AS
15500}
15501_ACEOF
98418dba 15502rm -f conftest$ac_exeext
ca81d7a0
JD
15503if { (ac_try="$ac_link"
15504case "(($ac_try" in
15505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15506 *) ac_try_echo=$ac_try;;
15507esac
15508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15509 (eval "$ac_link") 2>&5
503d2be0 15510 ac_status=$?
c0d27fcc 15511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15513 { (case "(($ac_try" in
15514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15515 *) ac_try_echo=$ac_try;;
15516esac
15517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15518 (eval "$ac_try") 2>&5
503d2be0 15519 ac_status=$?
c0d27fcc 15520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15521 (exit $ac_status); }; }; then
98418dba 15522 ac_cv_c_stack_direction=1
ba4481b5 15523else
98418dba
CW
15524 echo "$as_me: program exited with status $ac_status" >&5
15525echo "$as_me: failed program was:" >&5
19650fd6
AS
15526sed 's/^/| /' conftest.$ac_ext >&5
15527
c0d27fcc 15528( exit $ac_status )
98418dba 15529ac_cv_c_stack_direction=-1
ba4481b5 15530fi
ca81d7a0 15531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15532fi
ca81d7a0
JD
15533
15534
98418dba 15535fi
ca81d7a0
JD
15536{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15537echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15538
c0d27fcc 15539cat >>confdefs.h <<_ACEOF
98418dba 15540#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15541_ACEOF
15542
ba4481b5 15543
ba4481b5
DL
15544fi
15545
c0d27fcc 15546
611adb3e
GM
15547if test x"$ac_cv_func_alloca_works" != xyes; then
15548 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15549echo "$as_me: error: a system implementation of alloca is required " >&2;}
15550 { (exit 1); exit 1; }; }
15551fi
15552
98418dba
CW
15553# fmod, logb, and frexp are found in -lm on most systems.
15554# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15555
ca81d7a0
JD
15556{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15557echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15558if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15559 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15560else
98418dba
CW
15561 ac_check_lib_save_LIBS=$LIBS
15562LIBS="-lm $LIBS"
15563cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15564/* confdefs.h. */
15565_ACEOF
15566cat confdefs.h >>conftest.$ac_ext
15567cat >>conftest.$ac_ext <<_ACEOF
15568/* end confdefs.h. */
ba4481b5 15569
ca81d7a0
JD
15570/* Override any GCC internal prototype to avoid an error.
15571 Use char because int might match the return type of a GCC
15572 builtin and then its argument prototype would still apply. */
98418dba
CW
15573#ifdef __cplusplus
15574extern "C"
15575#endif
98418dba 15576char sqrt ();
503d2be0
AS
15577int
15578main ()
15579{
ca81d7a0 15580return sqrt ();
503d2be0
AS
15581 ;
15582 return 0;
15583}
15584_ACEOF
15585rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15586if { (ac_try="$ac_link"
15587case "(($ac_try" in
15588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15589 *) ac_try_echo=$ac_try;;
15590esac
15591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15592 (eval "$ac_link") 2>conftest.er1
503d2be0 15593 ac_status=$?
edfaf76d
LK
15594 grep -v '^ *+' conftest.er1 >conftest.err
15595 rm -f conftest.er1
15596 cat conftest.err >&5
c0d27fcc 15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15598 (exit $ac_status); } && {
15599 test -z "$ac_c_werror_flag" ||
15600 test ! -s conftest.err
15601 } && test -s conftest$ac_exeext &&
15602 $as_test_x conftest$ac_exeext; then
98418dba 15603 ac_cv_lib_m_sqrt=yes
ba4481b5 15604else
503d2be0 15605 echo "$as_me: failed program was:" >&5
19650fd6
AS
15606sed 's/^/| /' conftest.$ac_ext >&5
15607
ca81d7a0 15608 ac_cv_lib_m_sqrt=no
ba4481b5 15609fi
ca81d7a0 15610
f053c89f 15611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15612 conftest$ac_exeext conftest.$ac_ext
98418dba 15613LIBS=$ac_check_lib_save_LIBS
ba4481b5 15614fi
ca81d7a0
JD
15615{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15616echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15617if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15618 cat >>confdefs.h <<_ACEOF
98418dba 15619#define HAVE_LIBM 1
c0d27fcc 15620_ACEOF
98418dba
CW
15621
15622 LIBS="-lm $LIBS"
ba4481b5 15623
ba4481b5
DL
15624fi
15625
c0d27fcc 15626
55597d70
DL
15627# Check for mail-locking functions in a "mail" library. Probably this should
15628# have the same check as for liblockfile below.
98418dba 15629
ca81d7a0
JD
15630{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15631echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15632if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15634else
98418dba
CW
15635 ac_check_lib_save_LIBS=$LIBS
15636LIBS="-lmail $LIBS"
15637cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15638/* confdefs.h. */
15639_ACEOF
15640cat confdefs.h >>conftest.$ac_ext
15641cat >>conftest.$ac_ext <<_ACEOF
15642/* end confdefs.h. */
98418dba 15643
ca81d7a0
JD
15644/* Override any GCC internal prototype to avoid an error.
15645 Use char because int might match the return type of a GCC
15646 builtin and then its argument prototype would still apply. */
98418dba
CW
15647#ifdef __cplusplus
15648extern "C"
15649#endif
98418dba 15650char maillock ();
503d2be0
AS
15651int
15652main ()
15653{
ca81d7a0 15654return maillock ();
503d2be0
AS
15655 ;
15656 return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15660if { (ac_try="$ac_link"
15661case "(($ac_try" in
15662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15663 *) ac_try_echo=$ac_try;;
15664esac
15665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15666 (eval "$ac_link") 2>conftest.er1
503d2be0 15667 ac_status=$?
edfaf76d
LK
15668 grep -v '^ *+' conftest.er1 >conftest.err
15669 rm -f conftest.er1
15670 cat conftest.err >&5
c0d27fcc 15671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15672 (exit $ac_status); } && {
15673 test -z "$ac_c_werror_flag" ||
15674 test ! -s conftest.err
15675 } && test -s conftest$ac_exeext &&
15676 $as_test_x conftest$ac_exeext; then
98418dba 15677 ac_cv_lib_mail_maillock=yes
ba4481b5 15678else
503d2be0 15679 echo "$as_me: failed program was:" >&5
19650fd6
AS
15680sed 's/^/| /' conftest.$ac_ext >&5
15681
ca81d7a0 15682 ac_cv_lib_mail_maillock=no
ba4481b5 15683fi
ca81d7a0 15684
f053c89f 15685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15686 conftest$ac_exeext conftest.$ac_ext
98418dba 15687LIBS=$ac_check_lib_save_LIBS
ba4481b5 15688fi
ca81d7a0
JD
15689{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15690echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15691if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15692 cat >>confdefs.h <<_ACEOF
98418dba 15693#define HAVE_LIBMAIL 1
c0d27fcc 15694_ACEOF
ba4481b5 15695
98418dba 15696 LIBS="-lmail $LIBS"
ba4481b5 15697
98418dba 15698fi
ba4481b5 15699
c0d27fcc 15700
ca81d7a0
JD
15701{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15702echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15703if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15704 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15705else
503d2be0 15706 ac_check_lib_save_LIBS=$LIBS
98418dba 15707LIBS="-llockfile $LIBS"
503d2be0 15708cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15709/* confdefs.h. */
15710_ACEOF
15711cat confdefs.h >>conftest.$ac_ext
15712cat >>conftest.$ac_ext <<_ACEOF
15713/* end confdefs.h. */
503d2be0 15714
ca81d7a0
JD
15715/* Override any GCC internal prototype to avoid an error.
15716 Use char because int might match the return type of a GCC
15717 builtin and then its argument prototype would still apply. */
503d2be0
AS
15718#ifdef __cplusplus
15719extern "C"
15720#endif
98418dba 15721char maillock ();
503d2be0
AS
15722int
15723main ()
15724{
ca81d7a0 15725return maillock ();
503d2be0
AS
15726 ;
15727 return 0;
15728}
15729_ACEOF
15730rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15731if { (ac_try="$ac_link"
15732case "(($ac_try" in
15733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15734 *) ac_try_echo=$ac_try;;
15735esac
15736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15737 (eval "$ac_link") 2>conftest.er1
503d2be0 15738 ac_status=$?
edfaf76d
LK
15739 grep -v '^ *+' conftest.er1 >conftest.err
15740 rm -f conftest.er1
15741 cat conftest.err >&5
c0d27fcc 15742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15743 (exit $ac_status); } && {
15744 test -z "$ac_c_werror_flag" ||
15745 test ! -s conftest.err
15746 } && test -s conftest$ac_exeext &&
15747 $as_test_x conftest$ac_exeext; then
98418dba 15748 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15749else
15750 echo "$as_me: failed program was:" >&5
19650fd6
AS
15751sed 's/^/| /' conftest.$ac_ext >&5
15752
ca81d7a0 15753 ac_cv_lib_lockfile_maillock=no
98418dba 15754fi
ca81d7a0 15755
f053c89f 15756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15757 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15758LIBS=$ac_check_lib_save_LIBS
15759fi
ca81d7a0
JD
15760{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15761echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15762if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15763 cat >>confdefs.h <<_ACEOF
98418dba 15764#define HAVE_LIBLOCKFILE 1
c0d27fcc 15765_ACEOF
98418dba
CW
15766
15767 LIBS="-llockfile $LIBS"
15768
15769fi
15770
15771# If we have the shared liblockfile, assume we must use it for mail
15772# locking (e.g. Debian). If we couldn't link against liblockfile
15773# (no liblockfile.a installed), ensure that we don't need to.
15774if test "$ac_cv_lib_lockfile_maillock" = no; then
15775 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15776set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15777{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15779if test "${ac_cv_prog_liblockfile+set}" = set; then
15780 echo $ECHO_N "(cached) $ECHO_C" >&6
15781else
15782 if test -n "$liblockfile"; then
15783 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15784else
c0d27fcc 15785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15786as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15787for as_dir in $as_dummy
c0d27fcc
MR
15788do
15789 IFS=$as_save_IFS
15790 test -z "$as_dir" && as_dir=.
15791 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15792 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15793 ac_cv_prog_liblockfile="yes"
15794 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15795 break 2
15796 fi
15797done
98418dba 15798done
ca81d7a0 15799IFS=$as_save_IFS
98418dba
CW
15800
15801 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15802fi
503d2be0 15803fi
98418dba
CW
15804liblockfile=$ac_cv_prog_liblockfile
15805if test -n "$liblockfile"; then
ca81d7a0
JD
15806 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15807echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15808else
ca81d7a0
JD
15809 { echo "$as_me:$LINENO: result: no" >&5
15810echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15811fi
15812
ca81d7a0 15813
98418dba 15814 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15815 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15816This probably means that movemail could lose mail.
15817There may be a \`development' package to install containing liblockfile." >&5
15818echo "$as_me: error: Shared liblockfile found but can't link against it.
15819This probably means that movemail could lose mail.
15820There may be a \`development' package to install containing liblockfile." >&2;}
15821 { (exit 1); exit 1; }; }
98418dba 15822 else :
55597d70 15823 fi
98418dba 15824fi
503d2be0 15825
98418dba
CW
15826for ac_func in touchlock
15827do
15828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15831if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15832 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15833else
98418dba 15834 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
edfaf76d
LK
15840/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15841 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15842#define $ac_func innocuous_$ac_func
15843
98418dba 15844/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15845 which can conflict with char $ac_func (); below.
15846 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15847 <limits.h> exists even on freestanding compilers. */
edfaf76d 15848
19650fd6
AS
15849#ifdef __STDC__
15850# include <limits.h>
15851#else
15852# include <assert.h>
15853#endif
edfaf76d
LK
15854
15855#undef $ac_func
15856
ca81d7a0
JD
15857/* Override any GCC internal prototype to avoid an error.
15858 Use char because int might match the return type of a GCC
15859 builtin and then its argument prototype would still apply. */
503d2be0
AS
15860#ifdef __cplusplus
15861extern "C"
15862#endif
98418dba 15863char $ac_func ();
98418dba
CW
15864/* The GNU C library defines this for functions which it implements
15865 to always fail with ENOSYS. Some functions are actually named
15866 something starting with __ and the normal name is an alias. */
ca81d7a0 15867#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15868choke me
cd958eb3
MB
15869#endif
15870
19650fd6
AS
15871int
15872main ()
15873{
ca81d7a0 15874return $ac_func ();
503d2be0
AS
15875 ;
15876 return 0;
15877}
15878_ACEOF
15879rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15880if { (ac_try="$ac_link"
15881case "(($ac_try" in
15882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15883 *) ac_try_echo=$ac_try;;
15884esac
15885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15886 (eval "$ac_link") 2>conftest.er1
503d2be0 15887 ac_status=$?
edfaf76d
LK
15888 grep -v '^ *+' conftest.er1 >conftest.err
15889 rm -f conftest.er1
15890 cat conftest.err >&5
c0d27fcc 15891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15892 (exit $ac_status); } && {
15893 test -z "$ac_c_werror_flag" ||
15894 test ! -s conftest.err
15895 } && test -s conftest$ac_exeext &&
15896 $as_test_x conftest$ac_exeext; then
98418dba 15897 eval "$as_ac_var=yes"
503d2be0
AS
15898else
15899 echo "$as_me: failed program was:" >&5
19650fd6
AS
15900sed 's/^/| /' conftest.$ac_ext >&5
15901
ca81d7a0 15902 eval "$as_ac_var=no"
503d2be0 15903fi
ca81d7a0 15904
f053c89f 15905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15906 conftest$ac_exeext conftest.$ac_ext
503d2be0 15907fi
ca81d7a0
JD
15908ac_res=`eval echo '${'$as_ac_var'}'`
15909 { echo "$as_me:$LINENO: result: $ac_res" >&5
15910echo "${ECHO_T}$ac_res" >&6; }
98418dba 15911if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15912 cat >>confdefs.h <<_ACEOF
98418dba 15913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15914_ACEOF
457b792c 15915
457b792c 15916fi
98418dba 15917done
457b792c 15918
c0d27fcc 15919
98418dba
CW
15920for ac_header in maillock.h
15921do
15922as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15923if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15924 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15926if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15927 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15928fi
ca81d7a0
JD
15929ac_res=`eval echo '${'$as_ac_Header'}'`
15930 { echo "$as_me:$LINENO: result: $ac_res" >&5
15931echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15932else
c0d27fcc 15933 # Is the header compilable?
ca81d7a0
JD
15934{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15935echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15936cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
c0d27fcc
MR
15942$ac_includes_default
15943#include <$ac_header>
15944_ACEOF
15945rm -f conftest.$ac_objext
ca81d7a0
JD
15946if { (ac_try="$ac_compile"
15947case "(($ac_try" in
15948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15949 *) ac_try_echo=$ac_try;;
15950esac
15951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15952 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15953 ac_status=$?
edfaf76d
LK
15954 grep -v '^ *+' conftest.er1 >conftest.err
15955 rm -f conftest.er1
15956 cat conftest.err >&5
c0d27fcc 15957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15958 (exit $ac_status); } && {
15959 test -z "$ac_c_werror_flag" ||
15960 test ! -s conftest.err
15961 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15962 ac_header_compiler=yes
15963else
15964 echo "$as_me: failed program was:" >&5
19650fd6
AS
15965sed 's/^/| /' conftest.$ac_ext >&5
15966
ca81d7a0 15967 ac_header_compiler=no
c0d27fcc 15968fi
ca81d7a0
JD
15969
15970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15971{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15972echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15973
15974# Is the header present?
ca81d7a0
JD
15975{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15976echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15978/* confdefs.h. */
15979_ACEOF
15980cat confdefs.h >>conftest.$ac_ext
15981cat >>conftest.$ac_ext <<_ACEOF
15982/* end confdefs.h. */
98418dba 15983#include <$ac_header>
503d2be0 15984_ACEOF
ca81d7a0
JD
15985if { (ac_try="$ac_cpp conftest.$ac_ext"
15986case "(($ac_try" in
15987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15988 *) ac_try_echo=$ac_try;;
15989esac
15990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15991 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15992 ac_status=$?
6bae0ccf 15993 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15994 rm -f conftest.er1
15995 cat conftest.err >&5
c0d27fcc 15996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15997 (exit $ac_status); } >/dev/null && {
15998 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15999 test ! -s conftest.err
16000 }; then
c0d27fcc 16001 ac_header_preproc=yes
98418dba
CW
16002else
16003 echo "$as_me: failed program was:" >&5
19650fd6
AS
16004sed 's/^/| /' conftest.$ac_ext >&5
16005
c0d27fcc 16006 ac_header_preproc=no
503d2be0 16007fi
ca81d7a0 16008
98418dba 16009rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16010{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16011echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16012
16013# So? What about this header?
edfaf76d
LK
16014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16015 yes:no: )
c0d27fcc
MR
16016 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16017echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16019echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16020 ac_header_preproc=yes
19650fd6 16021 ;;
edfaf76d 16022 no:yes:* )
c0d27fcc
MR
16023 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16024echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16025 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16026echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16027 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16028echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16029 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16030echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16031 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16032echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16033 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16034echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16035
19650fd6 16036 ;;
c0d27fcc 16037esac
ca81d7a0
JD
16038{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16040if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16041 echo $ECHO_N "(cached) $ECHO_C" >&6
16042else
edfaf76d 16043 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16044fi
ca81d7a0
JD
16045ac_res=`eval echo '${'$as_ac_Header'}'`
16046 { echo "$as_me:$LINENO: result: $ac_res" >&5
16047echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16048
16049fi
98418dba 16050if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16051 cat >>confdefs.h <<_ACEOF
98418dba 16052#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16053_ACEOF
48d4b120 16054
ba4481b5 16055fi
c0d27fcc 16056
98418dba
CW
16057done
16058
c0d27fcc
MR
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
22044edf
DL
16114
16115
c0d27fcc 16116
b0e44248
RB
16117
16118
973a76b1
DL
16119
16120
16121
cd958eb3 16122
25ca0bca 16123
ea92fc9f 16124
2d3c36ae
SM
16125
16126
e2fcf543 16127
5acf240e 16128
c0d27fcc
MR
16129
16130
98418dba 16131for ac_func in gethostname getdomainname dup2 \
e2fcf543 16132rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16133random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16134strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16135utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16136__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16137sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16138gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16139memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16140cfmakeraw cfsetspeed
98418dba
CW
16141do
16142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16143{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16145if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16146 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16147else
503d2be0 16148 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16149/* confdefs.h. */
16150_ACEOF
16151cat confdefs.h >>conftest.$ac_ext
16152cat >>conftest.$ac_ext <<_ACEOF
16153/* end confdefs.h. */
edfaf76d
LK
16154/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16155 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16156#define $ac_func innocuous_$ac_func
16157
98418dba 16158/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16159 which can conflict with char $ac_func (); below.
16160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16161 <limits.h> exists even on freestanding compilers. */
edfaf76d 16162
19650fd6
AS
16163#ifdef __STDC__
16164# include <limits.h>
16165#else
16166# include <assert.h>
16167#endif
edfaf76d
LK
16168
16169#undef $ac_func
16170
ca81d7a0
JD
16171/* Override any GCC internal prototype to avoid an error.
16172 Use char because int might match the return type of a GCC
16173 builtin and then its argument prototype would still apply. */
503d2be0
AS
16174#ifdef __cplusplus
16175extern "C"
16176#endif
98418dba 16177char $ac_func ();
98418dba
CW
16178/* The GNU C library defines this for functions which it implements
16179 to always fail with ENOSYS. Some functions are actually named
16180 something starting with __ and the normal name is an alias. */
ca81d7a0 16181#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16182choke me
98418dba
CW
16183#endif
16184
19650fd6
AS
16185int
16186main ()
16187{
ca81d7a0 16188return $ac_func ();
503d2be0
AS
16189 ;
16190 return 0;
16191}
16192_ACEOF
16193rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16194if { (ac_try="$ac_link"
16195case "(($ac_try" in
16196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16197 *) ac_try_echo=$ac_try;;
16198esac
16199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16200 (eval "$ac_link") 2>conftest.er1
503d2be0 16201 ac_status=$?
edfaf76d
LK
16202 grep -v '^ *+' conftest.er1 >conftest.err
16203 rm -f conftest.er1
16204 cat conftest.err >&5
c0d27fcc 16205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16206 (exit $ac_status); } && {
16207 test -z "$ac_c_werror_flag" ||
16208 test ! -s conftest.err
16209 } && test -s conftest$ac_exeext &&
16210 $as_test_x conftest$ac_exeext; then
98418dba 16211 eval "$as_ac_var=yes"
503d2be0
AS
16212else
16213 echo "$as_me: failed program was:" >&5
19650fd6
AS
16214sed 's/^/| /' conftest.$ac_ext >&5
16215
ca81d7a0 16216 eval "$as_ac_var=no"
503d2be0 16217fi
ca81d7a0 16218
f053c89f 16219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16220 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16221fi
ca81d7a0
JD
16222ac_res=`eval echo '${'$as_ac_var'}'`
16223 { echo "$as_me:$LINENO: result: $ac_res" >&5
16224echo "${ECHO_T}$ac_res" >&6; }
98418dba 16225if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16226 cat >>confdefs.h <<_ACEOF
98418dba 16227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16228_ACEOF
ba4481b5 16229
ba4481b5 16230fi
98418dba 16231done
ba4481b5 16232
c0d27fcc
MR
16233
16234
98418dba
CW
16235for ac_header in sys/un.h
16236do
16237as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16238if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16239 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16240echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16241if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16242 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16243fi
ca81d7a0
JD
16244ac_res=`eval echo '${'$as_ac_Header'}'`
16245 { echo "$as_me:$LINENO: result: $ac_res" >&5
16246echo "${ECHO_T}$ac_res" >&6; }
98418dba 16247else
c0d27fcc 16248 # Is the header compilable?
ca81d7a0
JD
16249{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16250echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16251cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16252/* confdefs.h. */
16253_ACEOF
16254cat confdefs.h >>conftest.$ac_ext
16255cat >>conftest.$ac_ext <<_ACEOF
16256/* end confdefs.h. */
c0d27fcc
MR
16257$ac_includes_default
16258#include <$ac_header>
16259_ACEOF
16260rm -f conftest.$ac_objext
ca81d7a0
JD
16261if { (ac_try="$ac_compile"
16262case "(($ac_try" in
16263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16264 *) ac_try_echo=$ac_try;;
16265esac
16266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16267 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16268 ac_status=$?
edfaf76d
LK
16269 grep -v '^ *+' conftest.er1 >conftest.err
16270 rm -f conftest.er1
16271 cat conftest.err >&5
c0d27fcc 16272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16273 (exit $ac_status); } && {
16274 test -z "$ac_c_werror_flag" ||
16275 test ! -s conftest.err
16276 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16277 ac_header_compiler=yes
16278else
16279 echo "$as_me: failed program was:" >&5
19650fd6
AS
16280sed 's/^/| /' conftest.$ac_ext >&5
16281
ca81d7a0 16282 ac_header_compiler=no
c0d27fcc 16283fi
ca81d7a0
JD
16284
16285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16286{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16287echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16288
16289# Is the header present?
ca81d7a0
JD
16290{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16291echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16292cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16293/* confdefs.h. */
16294_ACEOF
16295cat confdefs.h >>conftest.$ac_ext
16296cat >>conftest.$ac_ext <<_ACEOF
16297/* end confdefs.h. */
98418dba 16298#include <$ac_header>
503d2be0 16299_ACEOF
ca81d7a0
JD
16300if { (ac_try="$ac_cpp conftest.$ac_ext"
16301case "(($ac_try" in
16302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16303 *) ac_try_echo=$ac_try;;
16304esac
16305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16306 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16307 ac_status=$?
6bae0ccf 16308 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16309 rm -f conftest.er1
16310 cat conftest.err >&5
c0d27fcc 16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16312 (exit $ac_status); } >/dev/null && {
16313 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16314 test ! -s conftest.err
16315 }; then
c0d27fcc 16316 ac_header_preproc=yes
ba4481b5 16317else
503d2be0 16318 echo "$as_me: failed program was:" >&5
19650fd6
AS
16319sed 's/^/| /' conftest.$ac_ext >&5
16320
c0d27fcc 16321 ac_header_preproc=no
ba4481b5 16322fi
ca81d7a0 16323
503d2be0 16324rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16325{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16326echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16327
16328# So? What about this header?
edfaf76d
LK
16329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16330 yes:no: )
c0d27fcc
MR
16331 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16332echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16334echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16335 ac_header_preproc=yes
19650fd6 16336 ;;
edfaf76d 16337 no:yes:* )
c0d27fcc
MR
16338 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16339echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16340 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16341echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16342 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16343echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16344 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16345echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16346 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16347echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16348 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16349echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16350
19650fd6 16351 ;;
c0d27fcc 16352esac
ca81d7a0
JD
16353{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16356 echo $ECHO_N "(cached) $ECHO_C" >&6
16357else
edfaf76d 16358 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16359fi
ca81d7a0
JD
16360ac_res=`eval echo '${'$as_ac_Header'}'`
16361 { echo "$as_me:$LINENO: result: $ac_res" >&5
16362echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16363
16364fi
925c2f3f 16365if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16366 cat >>confdefs.h <<_ACEOF
925c2f3f 16367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16368_ACEOF
503d2be0 16369
925c2f3f 16370fi
c0d27fcc 16371
925c2f3f
EZ
16372done
16373
c0d27fcc
MR
16374
16375
16376
edfaf76d 16377
f053c89f
CY
16378
16379for ac_header in $ac_header_list
925c2f3f
EZ
16380do
16381as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16382if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16383 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16384echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16385if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16386 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16387fi
ca81d7a0
JD
16388ac_res=`eval echo '${'$as_ac_Header'}'`
16389 { echo "$as_me:$LINENO: result: $ac_res" >&5
16390echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16391else
c0d27fcc 16392 # Is the header compilable?
ca81d7a0
JD
16393{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16394echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
c0d27fcc
MR
16401$ac_includes_default
16402#include <$ac_header>
16403_ACEOF
16404rm -f conftest.$ac_objext
ca81d7a0
JD
16405if { (ac_try="$ac_compile"
16406case "(($ac_try" in
16407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16408 *) ac_try_echo=$ac_try;;
16409esac
16410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16411 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16412 ac_status=$?
edfaf76d
LK
16413 grep -v '^ *+' conftest.er1 >conftest.err
16414 rm -f conftest.er1
16415 cat conftest.err >&5
c0d27fcc 16416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16417 (exit $ac_status); } && {
16418 test -z "$ac_c_werror_flag" ||
16419 test ! -s conftest.err
16420 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16421 ac_header_compiler=yes
16422else
16423 echo "$as_me: failed program was:" >&5
19650fd6
AS
16424sed 's/^/| /' conftest.$ac_ext >&5
16425
ca81d7a0 16426 ac_header_compiler=no
c0d27fcc 16427fi
ca81d7a0
JD
16428
16429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16430{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16431echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16432
16433# Is the header present?
ca81d7a0
JD
16434{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16435echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16436cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16437/* confdefs.h. */
16438_ACEOF
16439cat confdefs.h >>conftest.$ac_ext
16440cat >>conftest.$ac_ext <<_ACEOF
16441/* end confdefs.h. */
98418dba 16442#include <$ac_header>
503d2be0 16443_ACEOF
ca81d7a0
JD
16444if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16451 ac_status=$?
6bae0ccf 16452 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16453 rm -f conftest.er1
16454 cat conftest.err >&5
c0d27fcc 16455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16456 (exit $ac_status); } >/dev/null && {
16457 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16458 test ! -s conftest.err
16459 }; then
c0d27fcc 16460 ac_header_preproc=yes
98418dba
CW
16461else
16462 echo "$as_me: failed program was:" >&5
19650fd6
AS
16463sed 's/^/| /' conftest.$ac_ext >&5
16464
c0d27fcc 16465 ac_header_preproc=no
98418dba 16466fi
ca81d7a0 16467
98418dba 16468rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16469{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16470echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16471
16472# So? What about this header?
edfaf76d
LK
16473case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16474 yes:no: )
c0d27fcc
MR
16475 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16476echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16477 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16478echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16479 ac_header_preproc=yes
19650fd6 16480 ;;
edfaf76d 16481 no:yes:* )
c0d27fcc
MR
16482 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16483echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16484 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16485echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16486 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16487echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16488 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16489echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16490 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16491echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16492 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16493echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16494
19650fd6 16495 ;;
c0d27fcc 16496esac
ca81d7a0
JD
16497{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16498echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16499if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16500 echo $ECHO_N "(cached) $ECHO_C" >&6
16501else
edfaf76d 16502 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16503fi
ca81d7a0
JD
16504ac_res=`eval echo '${'$as_ac_Header'}'`
16505 { echo "$as_me:$LINENO: result: $ac_res" >&5
16506echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16507
16508fi
98418dba 16509if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16510 cat >>confdefs.h <<_ACEOF
98418dba 16511#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16512_ACEOF
98418dba
CW
16513
16514fi
c0d27fcc 16515
98418dba
CW
16516done
16517
c0d27fcc 16518
f053c89f
CY
16519
16520
16521
16522
16523
16524
16525
16526for ac_func in $ac_func_list
98418dba
CW
16527do
16528as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16529{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16530echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16531if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16532 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16533else
98418dba 16534 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
edfaf76d
LK
16540/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16541 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16542#define $ac_func innocuous_$ac_func
16543
98418dba 16544/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16545 which can conflict with char $ac_func (); below.
16546 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16547 <limits.h> exists even on freestanding compilers. */
edfaf76d 16548
19650fd6
AS
16549#ifdef __STDC__
16550# include <limits.h>
16551#else
16552# include <assert.h>
16553#endif
edfaf76d
LK
16554
16555#undef $ac_func
16556
ca81d7a0
JD
16557/* Override any GCC internal prototype to avoid an error.
16558 Use char because int might match the return type of a GCC
16559 builtin and then its argument prototype would still apply. */
503d2be0
AS
16560#ifdef __cplusplus
16561extern "C"
16562#endif
98418dba 16563char $ac_func ();
98418dba
CW
16564/* The GNU C library defines this for functions which it implements
16565 to always fail with ENOSYS. Some functions are actually named
16566 something starting with __ and the normal name is an alias. */
ca81d7a0 16567#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16568choke me
98418dba
CW
16569#endif
16570
19650fd6
AS
16571int
16572main ()
16573{
ca81d7a0 16574return $ac_func ();
503d2be0
AS
16575 ;
16576 return 0;
16577}
16578_ACEOF
16579rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16580if { (ac_try="$ac_link"
16581case "(($ac_try" in
16582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16583 *) ac_try_echo=$ac_try;;
16584esac
16585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16586 (eval "$ac_link") 2>conftest.er1
503d2be0 16587 ac_status=$?
edfaf76d
LK
16588 grep -v '^ *+' conftest.er1 >conftest.err
16589 rm -f conftest.er1
16590 cat conftest.err >&5
c0d27fcc 16591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16592 (exit $ac_status); } && {
16593 test -z "$ac_c_werror_flag" ||
16594 test ! -s conftest.err
16595 } && test -s conftest$ac_exeext &&
16596 $as_test_x conftest$ac_exeext; then
98418dba 16597 eval "$as_ac_var=yes"
503d2be0
AS
16598else
16599 echo "$as_me: failed program was:" >&5
19650fd6
AS
16600sed 's/^/| /' conftest.$ac_ext >&5
16601
ca81d7a0 16602 eval "$as_ac_var=no"
503d2be0 16603fi
ca81d7a0 16604
f053c89f 16605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16606 conftest$ac_exeext conftest.$ac_ext
ffe36136 16607fi
ca81d7a0
JD
16608ac_res=`eval echo '${'$as_ac_var'}'`
16609 { echo "$as_me:$LINENO: result: $ac_res" >&5
16610echo "${ECHO_T}$ac_res" >&6; }
98418dba 16611if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16612 cat >>confdefs.h <<_ACEOF
98418dba 16613#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16614_ACEOF
ffe36136 16615
ba4481b5 16616fi
98418dba 16617done
ba4481b5 16618
f053c89f
CY
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
ca81d7a0
JD
16635{ echo "$as_me:$LINENO: checking for working mktime" >&5
16636echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16637if test "${ac_cv_func_working_mktime+set}" = set; then
16638 echo $ECHO_N "(cached) $ECHO_C" >&6
16639else
16640 if test "$cross_compiling" = yes; then
16641 ac_cv_func_working_mktime=no
16642else
16643 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
98418dba 16649/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16650#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16651# include <sys/time.h>
16652# include <time.h>
16653#else
f053c89f 16654# ifdef HAVE_SYS_TIME_H
98418dba
CW
16655# include <sys/time.h>
16656# else
16657# include <time.h>
16658# endif
16659#endif
ba4481b5 16660
f053c89f 16661#include <stdlib.h>
edfaf76d 16662
f053c89f 16663#ifdef HAVE_UNISTD_H
98418dba
CW
16664# include <unistd.h>
16665#endif
ba4481b5 16666
f053c89f 16667#ifndef HAVE_ALARM
98418dba
CW
16668# define alarm(X) /* empty */
16669#endif
df645f7c 16670
98418dba
CW
16671/* Work around redefinition to rpl_putenv by other config tests. */
16672#undef putenv
df645f7c 16673
98418dba 16674static time_t time_t_max;
edfaf76d 16675static time_t time_t_min;
df645f7c 16676
98418dba 16677/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16678static char *tz_strings[] = {
16679 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16680 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16681};
16682#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16683
ca81d7a0 16684/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16685 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16686static int
98418dba
CW
16687spring_forward_gap ()
16688{
16689 /* glibc (up to about 1998-10-07) failed this test. */
16690 struct tm tm;
16691
16692 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16693 instead of "TZ=America/Vancouver" in order to detect the bug even
16694 on systems that don't support the Olson extension, or don't have the
16695 full zoneinfo tables installed. */
16696 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16697
16698 tm.tm_year = 98;
16699 tm.tm_mon = 3;
16700 tm.tm_mday = 5;
16701 tm.tm_hour = 2;
16702 tm.tm_min = 0;
16703 tm.tm_sec = 0;
16704 tm.tm_isdst = -1;
ca81d7a0 16705 return mktime (&tm) != (time_t) -1;
98418dba
CW
16706}
16707
ca81d7a0 16708static int
edfaf76d 16709mktime_test1 (now)
98418dba
CW
16710 time_t now;
16711{
16712 struct tm *lt;
ca81d7a0 16713 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16714}
16715
ca81d7a0 16716static int
edfaf76d
LK
16717mktime_test (now)
16718 time_t now;
16719{
ca81d7a0
JD
16720 return (mktime_test1 (now)
16721 && mktime_test1 ((time_t) (time_t_max - now))
16722 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16723}
16724
ca81d7a0 16725static int
98418dba
CW
16726irix_6_4_bug ()
16727{
16728 /* Based on code from Ariel Faigon. */
16729 struct tm tm;
16730 tm.tm_year = 96;
16731 tm.tm_mon = 3;
16732 tm.tm_mday = 0;
16733 tm.tm_hour = 0;
16734 tm.tm_min = 0;
16735 tm.tm_sec = 0;
16736 tm.tm_isdst = -1;
16737 mktime (&tm);
ca81d7a0 16738 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16739}
16740
ca81d7a0 16741static int
98418dba
CW
16742bigtime_test (j)
16743 int j;
16744{
16745 struct tm tm;
16746 time_t now;
16747 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16748 now = mktime (&tm);
16749 if (now != (time_t) -1)
16750 {
16751 struct tm *lt = localtime (&now);
16752 if (! (lt
16753 && lt->tm_year == tm.tm_year
16754 && lt->tm_mon == tm.tm_mon
16755 && lt->tm_mday == tm.tm_mday
16756 && lt->tm_hour == tm.tm_hour
16757 && lt->tm_min == tm.tm_min
16758 && lt->tm_sec == tm.tm_sec
16759 && lt->tm_yday == tm.tm_yday
16760 && lt->tm_wday == tm.tm_wday
16761 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16762 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16763 return 0;
98418dba 16764 }
ca81d7a0 16765 return 1;
98418dba
CW
16766}
16767
f053c89f
CY
16768static int
16769year_2050_test ()
16770{
16771 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16772 ignoring leap seconds. */
16773 unsigned long int answer = 2527315200UL;
16774
16775 struct tm tm;
16776 time_t t;
16777 tm.tm_year = 2050 - 1900;
16778 tm.tm_mon = 2 - 1;
16779 tm.tm_mday = 1;
16780 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16781 tm.tm_isdst = -1;
16782
16783 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16784 instead of "TZ=America/Vancouver" in order to detect the bug even
16785 on systems that don't support the Olson extension, or don't have the
16786 full zoneinfo tables installed. */
16787 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16788
16789 t = mktime (&tm);
16790
16791 /* Check that the result is either a failure, or close enough
16792 to the correct answer that we can assume the discrepancy is
16793 due to leap seconds. */
16794 return (t == (time_t) -1
16795 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16796}
16797
16798int
16799main ()
16800{
16801 time_t t, delta;
16802 int i, j;
16803
16804 /* This test makes some buggy mktime implementations loop.
16805 Give up after 60 seconds; a mktime slower than that
16806 isn't worth using anyway. */
16807 alarm (60);
16808
48fad8e8
DN
16809 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16810 continue;
16811 time_t_max--;
16812 if ((time_t) -1 < 0)
16813 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16814 continue;
98418dba
CW
16815 delta = time_t_max / 997; /* a suitable prime number */
16816 for (i = 0; i < N_STRINGS; i++)
16817 {
16818 if (tz_strings[i])
16819 putenv (tz_strings[i]);
503d2be0 16820
98418dba 16821 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16822 if (! mktime_test (t))
16823 return 1;
16824 if (! (mktime_test ((time_t) 1)
16825 && mktime_test ((time_t) (60 * 60))
16826 && mktime_test ((time_t) (60 * 60 * 24))))
16827 return 1;
98418dba 16828
48fad8e8 16829 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
16830 if (! bigtime_test (j))
16831 return 1;
48fad8e8 16832 if (! bigtime_test (j - 1))
ca81d7a0 16833 return 1;
98418dba 16834 }
f053c89f 16835 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16836}
16837_ACEOF
98418dba 16838rm -f conftest$ac_exeext
ca81d7a0
JD
16839if { (ac_try="$ac_link"
16840case "(($ac_try" in
16841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16842 *) ac_try_echo=$ac_try;;
16843esac
16844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16845 (eval "$ac_link") 2>&5
503d2be0 16846 ac_status=$?
c0d27fcc 16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16849 { (case "(($ac_try" in
16850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16851 *) ac_try_echo=$ac_try;;
16852esac
16853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16854 (eval "$ac_try") 2>&5
503d2be0 16855 ac_status=$?
c0d27fcc 16856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16857 (exit $ac_status); }; }; then
98418dba 16858 ac_cv_func_working_mktime=yes
503d2be0 16859else
98418dba
CW
16860 echo "$as_me: program exited with status $ac_status" >&5
16861echo "$as_me: failed program was:" >&5
19650fd6
AS
16862sed 's/^/| /' conftest.$ac_ext >&5
16863
c0d27fcc 16864( exit $ac_status )
98418dba 16865ac_cv_func_working_mktime=no
503d2be0 16866fi
ca81d7a0 16867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16868fi
ca81d7a0
JD
16869
16870
ba4481b5 16871fi
ca81d7a0
JD
16872{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16873echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16874if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16875 case " $LIBOBJS " in
edfaf76d 16876 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16877 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16878 ;;
edfaf76d
LK
16879esac
16880
ba4481b5
DL
16881fi
16882
98418dba 16883if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16884
c0d27fcc 16885cat >>confdefs.h <<\_ACEOF
98418dba 16886#define BROKEN_MKTIME 1
c0d27fcc 16887_ACEOF
ba4481b5 16888
ba4481b5 16889fi
503d2be0 16890
98418dba
CW
16891ac_have_func=no # yes means we've found a way to get the load average.
16892
6bae0ccf
DL
16893# Make sure getloadavg.c is where it belongs, at configure-time.
16894test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16895 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16896echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16897 { (exit 1); exit 1; }; }
16898
98418dba
CW
16899ac_save_LIBS=$LIBS
16900
16901# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16902({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16903echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16904if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16905 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16906else
503d2be0 16907 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16908/* confdefs.h. */
16909_ACEOF
16910cat confdefs.h >>conftest.$ac_ext
16911cat >>conftest.$ac_ext <<_ACEOF
16912/* end confdefs.h. */
edfaf76d
LK
16913/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16914 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16915#define getloadavg innocuous_getloadavg
16916
98418dba 16917/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16918 which can conflict with char getloadavg (); below.
16919 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16920 <limits.h> exists even on freestanding compilers. */
edfaf76d 16921
19650fd6
AS
16922#ifdef __STDC__
16923# include <limits.h>
16924#else
16925# include <assert.h>
16926#endif
edfaf76d
LK
16927
16928#undef getloadavg
16929
ca81d7a0
JD
16930/* Override any GCC internal prototype to avoid an error.
16931 Use char because int might match the return type of a GCC
16932 builtin and then its argument prototype would still apply. */
503d2be0
AS
16933#ifdef __cplusplus
16934extern "C"
16935#endif
98418dba 16936char getloadavg ();
98418dba
CW
16937/* The GNU C library defines this for functions which it implements
16938 to always fail with ENOSYS. Some functions are actually named
16939 something starting with __ and the normal name is an alias. */
ca81d7a0 16940#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16941choke me
cd958eb3
MB
16942#endif
16943
19650fd6
AS
16944int
16945main ()
16946{
ca81d7a0 16947return getloadavg ();
503d2be0
AS
16948 ;
16949 return 0;
16950}
16951_ACEOF
16952rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16953if { (ac_try="$ac_link"
16954case "(($ac_try" in
16955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16956 *) ac_try_echo=$ac_try;;
16957esac
16958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16959 (eval "$ac_link") 2>conftest.er1
503d2be0 16960 ac_status=$?
edfaf76d
LK
16961 grep -v '^ *+' conftest.er1 >conftest.err
16962 rm -f conftest.er1
16963 cat conftest.err >&5
c0d27fcc 16964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16965 (exit $ac_status); } && {
16966 test -z "$ac_c_werror_flag" ||
16967 test ! -s conftest.err
16968 } && test -s conftest$ac_exeext &&
16969 $as_test_x conftest$ac_exeext; then
98418dba 16970 ac_cv_func_getloadavg=yes
503d2be0
AS
16971else
16972 echo "$as_me: failed program was:" >&5
19650fd6
AS
16973sed 's/^/| /' conftest.$ac_ext >&5
16974
ca81d7a0 16975 ac_cv_func_getloadavg=no
503d2be0 16976fi
ca81d7a0 16977
f053c89f 16978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16979 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16980fi
ca81d7a0
JD
16981{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16982echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16983if test $ac_cv_func_getloadavg = yes; then
16984 exit 0
16985else
16986 exit 1
ba4481b5 16987fi
98418dba 16988) && ac_have_func=yes
ba4481b5 16989
98418dba 16990# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16991
98418dba
CW
16992for ac_func in pstat_getdynamic
16993do
16994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16999else
503d2be0 17000 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17001/* confdefs.h. */
17002_ACEOF
17003cat confdefs.h >>conftest.$ac_ext
17004cat >>conftest.$ac_ext <<_ACEOF
17005/* end confdefs.h. */
edfaf76d
LK
17006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17008#define $ac_func innocuous_$ac_func
17009
98418dba 17010/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17011 which can conflict with char $ac_func (); below.
17012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17013 <limits.h> exists even on freestanding compilers. */
edfaf76d 17014
19650fd6
AS
17015#ifdef __STDC__
17016# include <limits.h>
17017#else
17018# include <assert.h>
17019#endif
edfaf76d
LK
17020
17021#undef $ac_func
17022
ca81d7a0
JD
17023/* Override any GCC internal prototype to avoid an error.
17024 Use char because int might match the return type of a GCC
17025 builtin and then its argument prototype would still apply. */
503d2be0
AS
17026#ifdef __cplusplus
17027extern "C"
17028#endif
98418dba 17029char $ac_func ();
98418dba
CW
17030/* The GNU C library defines this for functions which it implements
17031 to always fail with ENOSYS. Some functions are actually named
17032 something starting with __ and the normal name is an alias. */
ca81d7a0 17033#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17034choke me
98418dba
CW
17035#endif
17036
19650fd6
AS
17037int
17038main ()
17039{
ca81d7a0 17040return $ac_func ();
98418dba
CW
17041 ;
17042 return 0;
17043}
f21fadcc 17044_ACEOF
98418dba 17045rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17046if { (ac_try="$ac_link"
17047case "(($ac_try" in
17048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17049 *) ac_try_echo=$ac_try;;
17050esac
17051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17052 (eval "$ac_link") 2>conftest.er1
f21fadcc 17053 ac_status=$?
edfaf76d
LK
17054 grep -v '^ *+' conftest.er1 >conftest.err
17055 rm -f conftest.er1
17056 cat conftest.err >&5
c0d27fcc 17057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17058 (exit $ac_status); } && {
17059 test -z "$ac_c_werror_flag" ||
17060 test ! -s conftest.err
17061 } && test -s conftest$ac_exeext &&
17062 $as_test_x conftest$ac_exeext; then
98418dba 17063 eval "$as_ac_var=yes"
f21fadcc
JD
17064else
17065 echo "$as_me: failed program was:" >&5
19650fd6
AS
17066sed 's/^/| /' conftest.$ac_ext >&5
17067
ca81d7a0 17068 eval "$as_ac_var=no"
f21fadcc 17069fi
ca81d7a0 17070
f053c89f 17071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17072 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17073fi
ca81d7a0
JD
17074ac_res=`eval echo '${'$as_ac_var'}'`
17075 { echo "$as_me:$LINENO: result: $ac_res" >&5
17076echo "${ECHO_T}$ac_res" >&6; }
98418dba 17077if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17078 cat >>confdefs.h <<_ACEOF
98418dba 17079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17080_ACEOF
98418dba
CW
17081
17082fi
17083done
17084
c0d27fcc 17085
98418dba
CW
17086# Solaris has libkstat which does not require root.
17087
ca81d7a0
JD
17088{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17089echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17090if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17091 echo $ECHO_N "(cached) $ECHO_C" >&6
17092else
17093 ac_check_lib_save_LIBS=$LIBS
98418dba 17094LIBS="-lkstat $LIBS"
f21fadcc 17095cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17096/* confdefs.h. */
17097_ACEOF
17098cat confdefs.h >>conftest.$ac_ext
17099cat >>conftest.$ac_ext <<_ACEOF
17100/* end confdefs.h. */
f21fadcc 17101
ca81d7a0
JD
17102/* Override any GCC internal prototype to avoid an error.
17103 Use char because int might match the return type of a GCC
17104 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17105#ifdef __cplusplus
17106extern "C"
17107#endif
98418dba 17108char kstat_open ();
f21fadcc
JD
17109int
17110main ()
17111{
ca81d7a0 17112return kstat_open ();
f21fadcc
JD
17113 ;
17114 return 0;
17115}
17116_ACEOF
17117rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17118if { (ac_try="$ac_link"
17119case "(($ac_try" in
17120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17121 *) ac_try_echo=$ac_try;;
17122esac
17123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17124 (eval "$ac_link") 2>conftest.er1
f21fadcc 17125 ac_status=$?
edfaf76d
LK
17126 grep -v '^ *+' conftest.er1 >conftest.err
17127 rm -f conftest.er1
17128 cat conftest.err >&5
c0d27fcc 17129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17130 (exit $ac_status); } && {
17131 test -z "$ac_c_werror_flag" ||
17132 test ! -s conftest.err
17133 } && test -s conftest$ac_exeext &&
17134 $as_test_x conftest$ac_exeext; then
98418dba 17135 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17136else
17137 echo "$as_me: failed program was:" >&5
19650fd6
AS
17138sed 's/^/| /' conftest.$ac_ext >&5
17139
ca81d7a0 17140 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17141fi
ca81d7a0 17142
f053c89f 17143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17144 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17145LIBS=$ac_check_lib_save_LIBS
17146fi
ca81d7a0
JD
17147{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17148echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17149if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17150 cat >>confdefs.h <<_ACEOF
98418dba 17151#define HAVE_LIBKSTAT 1
c0d27fcc 17152_ACEOF
f21fadcc 17153
98418dba 17154 LIBS="-lkstat $LIBS"
f21fadcc 17155
f21fadcc
JD
17156fi
17157
98418dba
CW
17158test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17159
17160# Some systems with -lutil have (and need) -lkvm as well, some do not.
17161# On Solaris, -lkvm requires nlist from -lelf, so check that first
17162# to get the right answer into the cache.
17163# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17164if test $ac_have_func = no; then
ca81d7a0
JD
17165 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17166echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17167if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17168 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17169else
98418dba
CW
17170 ac_check_lib_save_LIBS=$LIBS
17171LIBS="-lelf $LIBS"
17172cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17173/* confdefs.h. */
17174_ACEOF
17175cat confdefs.h >>conftest.$ac_ext
17176cat >>conftest.$ac_ext <<_ACEOF
17177/* end confdefs.h. */
98418dba 17178
ca81d7a0
JD
17179/* Override any GCC internal prototype to avoid an error.
17180 Use char because int might match the return type of a GCC
17181 builtin and then its argument prototype would still apply. */
98418dba
CW
17182#ifdef __cplusplus
17183extern "C"
17184#endif
98418dba 17185char elf_begin ();
503d2be0
AS
17186int
17187main ()
17188{
ca81d7a0 17189return elf_begin ();
503d2be0
AS
17190 ;
17191 return 0;
17192}
17193_ACEOF
17194rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17195if { (ac_try="$ac_link"
17196case "(($ac_try" in
17197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17198 *) ac_try_echo=$ac_try;;
17199esac
17200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17201 (eval "$ac_link") 2>conftest.er1
503d2be0 17202 ac_status=$?
edfaf76d
LK
17203 grep -v '^ *+' conftest.er1 >conftest.err
17204 rm -f conftest.er1
17205 cat conftest.err >&5
c0d27fcc 17206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17207 (exit $ac_status); } && {
17208 test -z "$ac_c_werror_flag" ||
17209 test ! -s conftest.err
17210 } && test -s conftest$ac_exeext &&
17211 $as_test_x conftest$ac_exeext; then
98418dba 17212 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17213else
503d2be0 17214 echo "$as_me: failed program was:" >&5
19650fd6
AS
17215sed 's/^/| /' conftest.$ac_ext >&5
17216
ca81d7a0 17217 ac_cv_lib_elf_elf_begin=no
ba4481b5 17218fi
ca81d7a0 17219
f053c89f 17220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17221 conftest$ac_exeext conftest.$ac_ext
98418dba 17222LIBS=$ac_check_lib_save_LIBS
ba4481b5 17223fi
ca81d7a0
JD
17224{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17225echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17226if test $ac_cv_lib_elf_elf_begin = yes; then
17227 LIBS="-lelf $LIBS"
ba4481b5
DL
17228fi
17229
98418dba
CW
17230fi
17231if test $ac_have_func = no; then
ca81d7a0
JD
17232 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17233echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17234if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17235 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17236else
98418dba
CW
17237 ac_check_lib_save_LIBS=$LIBS
17238LIBS="-lkvm $LIBS"
17239cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17240/* confdefs.h. */
17241_ACEOF
17242cat confdefs.h >>conftest.$ac_ext
17243cat >>conftest.$ac_ext <<_ACEOF
17244/* end confdefs.h. */
98418dba 17245
ca81d7a0
JD
17246/* Override any GCC internal prototype to avoid an error.
17247 Use char because int might match the return type of a GCC
17248 builtin and then its argument prototype would still apply. */
98418dba
CW
17249#ifdef __cplusplus
17250extern "C"
17251#endif
98418dba 17252char kvm_open ();
503d2be0
AS
17253int
17254main ()
17255{
ca81d7a0 17256return kvm_open ();
503d2be0
AS
17257 ;
17258 return 0;
17259}
17260_ACEOF
17261rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17262if { (ac_try="$ac_link"
17263case "(($ac_try" in
17264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17265 *) ac_try_echo=$ac_try;;
17266esac
17267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17268 (eval "$ac_link") 2>conftest.er1
503d2be0 17269 ac_status=$?
edfaf76d
LK
17270 grep -v '^ *+' conftest.er1 >conftest.err
17271 rm -f conftest.er1
17272 cat conftest.err >&5
c0d27fcc 17273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17274 (exit $ac_status); } && {
17275 test -z "$ac_c_werror_flag" ||
17276 test ! -s conftest.err
17277 } && test -s conftest$ac_exeext &&
17278 $as_test_x conftest$ac_exeext; then
98418dba 17279 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17280else
17281 echo "$as_me: failed program was:" >&5
19650fd6
AS
17282sed 's/^/| /' conftest.$ac_ext >&5
17283
ca81d7a0 17284 ac_cv_lib_kvm_kvm_open=no
503d2be0 17285fi
ca81d7a0 17286
f053c89f 17287rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17288 conftest$ac_exeext conftest.$ac_ext
98418dba 17289LIBS=$ac_check_lib_save_LIBS
503d2be0 17290fi
ca81d7a0
JD
17291{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17292echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17293if test $ac_cv_lib_kvm_kvm_open = yes; then
17294 LIBS="-lkvm $LIBS"
ba4481b5
DL
17295fi
17296
98418dba 17297 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17298 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17299echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17300if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17301 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17302else
98418dba
CW
17303 ac_check_lib_save_LIBS=$LIBS
17304LIBS="-lutil $LIBS"
17305cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17306/* confdefs.h. */
17307_ACEOF
17308cat confdefs.h >>conftest.$ac_ext
17309cat >>conftest.$ac_ext <<_ACEOF
17310/* end confdefs.h. */
98418dba 17311
ca81d7a0
JD
17312/* Override any GCC internal prototype to avoid an error.
17313 Use char because int might match the return type of a GCC
17314 builtin and then its argument prototype would still apply. */
98418dba
CW
17315#ifdef __cplusplus
17316extern "C"
17317#endif
98418dba 17318char getloadavg ();
503d2be0
AS
17319int
17320main ()
17321{
ca81d7a0 17322return getloadavg ();
503d2be0
AS
17323 ;
17324 return 0;
17325}
17326_ACEOF
17327rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17328if { (ac_try="$ac_link"
17329case "(($ac_try" in
17330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17331 *) ac_try_echo=$ac_try;;
17332esac
17333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17334 (eval "$ac_link") 2>conftest.er1
503d2be0 17335 ac_status=$?
edfaf76d
LK
17336 grep -v '^ *+' conftest.er1 >conftest.err
17337 rm -f conftest.er1
17338 cat conftest.err >&5
c0d27fcc 17339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17340 (exit $ac_status); } && {
17341 test -z "$ac_c_werror_flag" ||
17342 test ! -s conftest.err
17343 } && test -s conftest$ac_exeext &&
17344 $as_test_x conftest$ac_exeext; then
35996d22
AS
17345 ac_cv_lib_util_getloadavg=yes
17346else
503d2be0 17347 echo "$as_me: failed program was:" >&5
19650fd6
AS
17348sed 's/^/| /' conftest.$ac_ext >&5
17349
ca81d7a0 17350 ac_cv_lib_util_getloadavg=no
ba4481b5 17351fi
ca81d7a0 17352
f053c89f 17353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17354 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17355LIBS=$ac_check_lib_save_LIBS
17356fi
ca81d7a0
JD
17357{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17358echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17359if test $ac_cv_lib_util_getloadavg = yes; then
17360 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17361fi
503d2be0 17362
98418dba 17363fi
ba4481b5 17364
98418dba
CW
17365if test $ac_have_func = no; then
17366 # There is a commonly available library for RS/6000 AIX.
17367 # Since it is not a standard part of AIX, it might be installed locally.
17368 ac_getloadavg_LIBS=$LIBS
17369 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17370 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17371echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17372if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17373 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17374else
98418dba
CW
17375 ac_check_lib_save_LIBS=$LIBS
17376LIBS="-lgetloadavg $LIBS"
17377cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
ba4481b5 17383
ca81d7a0
JD
17384/* Override any GCC internal prototype to avoid an error.
17385 Use char because int might match the return type of a GCC
17386 builtin and then its argument prototype would still apply. */
98418dba
CW
17387#ifdef __cplusplus
17388extern "C"
17389#endif
98418dba 17390char getloadavg ();
98418dba
CW
17391int
17392main ()
17393{
ca81d7a0 17394return getloadavg ();
98418dba
CW
17395 ;
17396 return 0;
17397}
503d2be0 17398_ACEOF
98418dba 17399rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17400if { (ac_try="$ac_link"
17401case "(($ac_try" in
17402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17403 *) ac_try_echo=$ac_try;;
17404esac
17405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17406 (eval "$ac_link") 2>conftest.er1
98418dba 17407 ac_status=$?
edfaf76d
LK
17408 grep -v '^ *+' conftest.er1 >conftest.err
17409 rm -f conftest.er1
17410 cat conftest.err >&5
c0d27fcc 17411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17412 (exit $ac_status); } && {
17413 test -z "$ac_c_werror_flag" ||
17414 test ! -s conftest.err
17415 } && test -s conftest$ac_exeext &&
17416 $as_test_x conftest$ac_exeext; then
98418dba 17417 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17418else
98418dba 17419 echo "$as_me: failed program was:" >&5
19650fd6
AS
17420sed 's/^/| /' conftest.$ac_ext >&5
17421
ca81d7a0 17422 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17423fi
ca81d7a0 17424
f053c89f 17425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17426 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17427LIBS=$ac_check_lib_save_LIBS
17428fi
ca81d7a0
JD
17429{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17430echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17431if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17432 LIBS="-lgetloadavg $LIBS"
17433else
17434 LIBS=$ac_getloadavg_LIBS
ba4481b5 17435fi
ba4481b5
DL
17436
17437fi
98418dba
CW
17438
17439# Make sure it is really in the library, if we think we found it,
17440# otherwise set up the replacement function.
17441
17442for ac_func in getloadavg
17443do
17444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17449else
503d2be0 17450 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17451/* confdefs.h. */
17452_ACEOF
17453cat confdefs.h >>conftest.$ac_ext
17454cat >>conftest.$ac_ext <<_ACEOF
17455/* end confdefs.h. */
edfaf76d
LK
17456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17458#define $ac_func innocuous_$ac_func
17459
ba4481b5 17460/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17461 which can conflict with char $ac_func (); below.
17462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17463 <limits.h> exists even on freestanding compilers. */
edfaf76d 17464
19650fd6
AS
17465#ifdef __STDC__
17466# include <limits.h>
17467#else
17468# include <assert.h>
17469#endif
edfaf76d
LK
17470
17471#undef $ac_func
17472
ca81d7a0
JD
17473/* Override any GCC internal prototype to avoid an error.
17474 Use char because int might match the return type of a GCC
17475 builtin and then its argument prototype would still apply. */
503d2be0
AS
17476#ifdef __cplusplus
17477extern "C"
17478#endif
503d2be0 17479char $ac_func ();
ba4481b5
DL
17480/* The GNU C library defines this for functions which it implements
17481 to always fail with ENOSYS. Some functions are actually named
17482 something starting with __ and the normal name is an alias. */
ca81d7a0 17483#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17484choke me
cd958eb3
MB
17485#endif
17486
19650fd6
AS
17487int
17488main ()
17489{
ca81d7a0 17490return $ac_func ();
503d2be0
AS
17491 ;
17492 return 0;
17493}
17494_ACEOF
17495rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17496if { (ac_try="$ac_link"
17497case "(($ac_try" in
17498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499 *) ac_try_echo=$ac_try;;
17500esac
17501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17502 (eval "$ac_link") 2>conftest.er1
503d2be0 17503 ac_status=$?
edfaf76d
LK
17504 grep -v '^ *+' conftest.er1 >conftest.err
17505 rm -f conftest.er1
17506 cat conftest.err >&5
c0d27fcc 17507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17508 (exit $ac_status); } && {
17509 test -z "$ac_c_werror_flag" ||
17510 test ! -s conftest.err
17511 } && test -s conftest$ac_exeext &&
17512 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17513 eval "$as_ac_var=yes"
17514else
17515 echo "$as_me: failed program was:" >&5
19650fd6
AS
17516sed 's/^/| /' conftest.$ac_ext >&5
17517
ca81d7a0 17518 eval "$as_ac_var=no"
503d2be0 17519fi
ca81d7a0 17520
f053c89f 17521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17522 conftest$ac_exeext conftest.$ac_ext
503d2be0 17523fi
ca81d7a0
JD
17524ac_res=`eval echo '${'$as_ac_var'}'`
17525 { echo "$as_me:$LINENO: result: $ac_res" >&5
17526echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17527if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17528 cat >>confdefs.h <<_ACEOF
98418dba 17529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17530_ACEOF
503d2be0 17531
98418dba 17532else
ca81d7a0 17533 case " $LIBOBJS " in
edfaf76d 17534 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17535 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17536 ;;
edfaf76d
LK
17537esac
17538
ba4481b5 17539
c0d27fcc 17540cat >>confdefs.h <<\_ACEOF
98418dba 17541#define C_GETLOADAVG 1
c0d27fcc 17542_ACEOF
ba4481b5 17543
98418dba
CW
17544# Figure out what our getloadavg.c needs.
17545ac_have_func=no
c0d27fcc 17546if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17547 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17548echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17549if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17550 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17551fi
ca81d7a0
JD
17552{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17553echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17554else
c0d27fcc 17555 # Is the header compilable?
ca81d7a0
JD
17556{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17557echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17558cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
c0d27fcc
MR
17564$ac_includes_default
17565#include <sys/dg_sys_info.h>
17566_ACEOF
17567rm -f conftest.$ac_objext
ca81d7a0
JD
17568if { (ac_try="$ac_compile"
17569case "(($ac_try" in
17570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17571 *) ac_try_echo=$ac_try;;
17572esac
17573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17574 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17575 ac_status=$?
edfaf76d
LK
17576 grep -v '^ *+' conftest.er1 >conftest.err
17577 rm -f conftest.er1
17578 cat conftest.err >&5
c0d27fcc 17579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17580 (exit $ac_status); } && {
17581 test -z "$ac_c_werror_flag" ||
17582 test ! -s conftest.err
17583 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17584 ac_header_compiler=yes
17585else
17586 echo "$as_me: failed program was:" >&5
19650fd6
AS
17587sed 's/^/| /' conftest.$ac_ext >&5
17588
ca81d7a0 17589 ac_header_compiler=no
c0d27fcc 17590fi
ca81d7a0
JD
17591
17592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17593{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17594echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17595
17596# Is the header present?
ca81d7a0
JD
17597{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17598echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17600/* confdefs.h. */
17601_ACEOF
17602cat confdefs.h >>conftest.$ac_ext
17603cat >>conftest.$ac_ext <<_ACEOF
17604/* end confdefs.h. */
98418dba
CW
17605#include <sys/dg_sys_info.h>
17606_ACEOF
ca81d7a0
JD
17607if { (ac_try="$ac_cpp conftest.$ac_ext"
17608case "(($ac_try" in
17609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17610 *) ac_try_echo=$ac_try;;
17611esac
17612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17614 ac_status=$?
6bae0ccf 17615 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17616 rm -f conftest.er1
17617 cat conftest.err >&5
c0d27fcc 17618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17619 (exit $ac_status); } >/dev/null && {
17620 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17621 test ! -s conftest.err
17622 }; then
c0d27fcc 17623 ac_header_preproc=yes
98418dba
CW
17624else
17625 echo "$as_me: failed program was:" >&5
19650fd6
AS
17626sed 's/^/| /' conftest.$ac_ext >&5
17627
c0d27fcc 17628 ac_header_preproc=no
ba4481b5 17629fi
ca81d7a0 17630
98418dba 17631rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17632{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17633echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17634
17635# So? What about this header?
edfaf76d
LK
17636case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17637 yes:no: )
c0d27fcc
MR
17638 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17639echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17640 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17641echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17642 ac_header_preproc=yes
19650fd6 17643 ;;
edfaf76d 17644 no:yes:* )
c0d27fcc
MR
17645 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17646echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17647 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17648echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17649 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17650echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17651 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17652echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17653 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17654echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17655 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17656echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17657
19650fd6 17658 ;;
c0d27fcc 17659esac
ca81d7a0
JD
17660{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17661echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17662if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17663 echo $ECHO_N "(cached) $ECHO_C" >&6
17664else
17665 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17666fi
ca81d7a0
JD
17667{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17668echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17669
17670fi
98418dba
CW
17671if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17672 ac_have_func=yes
ba4481b5 17673
c0d27fcc 17674cat >>confdefs.h <<\_ACEOF
98418dba 17675#define DGUX 1
c0d27fcc
MR
17676_ACEOF
17677
503d2be0 17678
ca81d7a0
JD
17679{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17680echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17681if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17682 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17683else
503d2be0 17684 ac_check_lib_save_LIBS=$LIBS
98418dba 17685LIBS="-ldgc $LIBS"
503d2be0 17686cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17687/* confdefs.h. */
17688_ACEOF
17689cat confdefs.h >>conftest.$ac_ext
17690cat >>conftest.$ac_ext <<_ACEOF
17691/* end confdefs.h. */
503d2be0 17692
ca81d7a0
JD
17693/* Override any GCC internal prototype to avoid an error.
17694 Use char because int might match the return type of a GCC
17695 builtin and then its argument prototype would still apply. */
503d2be0
AS
17696#ifdef __cplusplus
17697extern "C"
17698#endif
98418dba 17699char dg_sys_info ();
503d2be0
AS
17700int
17701main ()
17702{
ca81d7a0 17703return dg_sys_info ();
503d2be0
AS
17704 ;
17705 return 0;
17706}
17707_ACEOF
17708rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17709if { (ac_try="$ac_link"
17710case "(($ac_try" in
17711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17712 *) ac_try_echo=$ac_try;;
17713esac
17714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17715 (eval "$ac_link") 2>conftest.er1
503d2be0 17716 ac_status=$?
edfaf76d
LK
17717 grep -v '^ *+' conftest.er1 >conftest.err
17718 rm -f conftest.er1
17719 cat conftest.err >&5
c0d27fcc 17720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17721 (exit $ac_status); } && {
17722 test -z "$ac_c_werror_flag" ||
17723 test ! -s conftest.err
17724 } && test -s conftest$ac_exeext &&
17725 $as_test_x conftest$ac_exeext; then
98418dba 17726 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17727else
17728 echo "$as_me: failed program was:" >&5
19650fd6
AS
17729sed 's/^/| /' conftest.$ac_ext >&5
17730
ca81d7a0 17731 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17732fi
ca81d7a0 17733
f053c89f 17734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17735 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17736LIBS=$ac_check_lib_save_LIBS
17737fi
ca81d7a0
JD
17738{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17739echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17740if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17741 cat >>confdefs.h <<_ACEOF
98418dba 17742#define HAVE_LIBDGC 1
c0d27fcc 17743_ACEOF
ba4481b5 17744
98418dba 17745 LIBS="-ldgc $LIBS"
ba4481b5 17746
ba4481b5
DL
17747fi
17748
98418dba 17749fi
503d2be0 17750
c0d27fcc
MR
17751
17752
17753if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17754 { echo "$as_me:$LINENO: checking for locale.h" >&5
17755echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17756if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17757 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17758fi
ca81d7a0
JD
17759{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17760echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17761else
c0d27fcc 17762 # Is the header compilable?
ca81d7a0
JD
17763{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17764echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17765cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17766/* confdefs.h. */
17767_ACEOF
17768cat confdefs.h >>conftest.$ac_ext
17769cat >>conftest.$ac_ext <<_ACEOF
17770/* end confdefs.h. */
c0d27fcc
MR
17771$ac_includes_default
17772#include <locale.h>
17773_ACEOF
17774rm -f conftest.$ac_objext
ca81d7a0
JD
17775if { (ac_try="$ac_compile"
17776case "(($ac_try" in
17777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17778 *) ac_try_echo=$ac_try;;
17779esac
17780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17781 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17782 ac_status=$?
edfaf76d
LK
17783 grep -v '^ *+' conftest.er1 >conftest.err
17784 rm -f conftest.er1
17785 cat conftest.err >&5
c0d27fcc 17786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17787 (exit $ac_status); } && {
17788 test -z "$ac_c_werror_flag" ||
17789 test ! -s conftest.err
17790 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17791 ac_header_compiler=yes
17792else
17793 echo "$as_me: failed program was:" >&5
19650fd6
AS
17794sed 's/^/| /' conftest.$ac_ext >&5
17795
ca81d7a0 17796 ac_header_compiler=no
c0d27fcc 17797fi
ca81d7a0
JD
17798
17799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17800{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17801echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17802
17803# Is the header present?
ca81d7a0
JD
17804{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17805echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17806cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
98418dba 17812#include <locale.h>
503d2be0 17813_ACEOF
ca81d7a0
JD
17814if { (ac_try="$ac_cpp conftest.$ac_ext"
17815case "(($ac_try" in
17816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17817 *) ac_try_echo=$ac_try;;
17818esac
17819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17821 ac_status=$?
6bae0ccf 17822 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17823 rm -f conftest.er1
17824 cat conftest.err >&5
c0d27fcc 17825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17826 (exit $ac_status); } >/dev/null && {
17827 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17828 test ! -s conftest.err
17829 }; then
c0d27fcc 17830 ac_header_preproc=yes
98418dba
CW
17831else
17832 echo "$as_me: failed program was:" >&5
19650fd6
AS
17833sed 's/^/| /' conftest.$ac_ext >&5
17834
c0d27fcc 17835 ac_header_preproc=no
ba4481b5 17836fi
ca81d7a0 17837
98418dba 17838rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17839{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17840echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17841
17842# So? What about this header?
edfaf76d
LK
17843case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17844 yes:no: )
c0d27fcc
MR
17845 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17846echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17847 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17848echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17849 ac_header_preproc=yes
19650fd6 17850 ;;
edfaf76d 17851 no:yes:* )
c0d27fcc
MR
17852 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17853echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17854 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17855echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17856 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17857echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17858 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17859echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17860 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17861echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17862 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17863echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17864
19650fd6 17865 ;;
c0d27fcc 17866esac
ca81d7a0
JD
17867{ echo "$as_me:$LINENO: checking for locale.h" >&5
17868echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17869if test "${ac_cv_header_locale_h+set}" = set; then
17870 echo $ECHO_N "(cached) $ECHO_C" >&6
17871else
17872 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17873fi
ca81d7a0
JD
17874{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17875echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17876
c0d27fcc
MR
17877fi
17878
17879
17880
98418dba 17881for ac_func in setlocale
ba4481b5 17882do
503d2be0 17883as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17884{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17885echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17886if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17887 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17888else
503d2be0 17889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17890/* confdefs.h. */
17891_ACEOF
17892cat confdefs.h >>conftest.$ac_ext
17893cat >>conftest.$ac_ext <<_ACEOF
17894/* end confdefs.h. */
edfaf76d
LK
17895/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17897#define $ac_func innocuous_$ac_func
17898
ba4481b5 17899/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17900 which can conflict with char $ac_func (); below.
17901 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17902 <limits.h> exists even on freestanding compilers. */
edfaf76d 17903
19650fd6
AS
17904#ifdef __STDC__
17905# include <limits.h>
17906#else
17907# include <assert.h>
17908#endif
edfaf76d
LK
17909
17910#undef $ac_func
17911
ca81d7a0
JD
17912/* Override any GCC internal prototype to avoid an error.
17913 Use char because int might match the return type of a GCC
17914 builtin and then its argument prototype would still apply. */
503d2be0
AS
17915#ifdef __cplusplus
17916extern "C"
17917#endif
503d2be0 17918char $ac_func ();
ba4481b5
DL
17919/* The GNU C library defines this for functions which it implements
17920 to always fail with ENOSYS. Some functions are actually named
17921 something starting with __ and the normal name is an alias. */
ca81d7a0 17922#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17923choke me
ba4481b5
DL
17924#endif
17925
19650fd6
AS
17926int
17927main ()
17928{
ca81d7a0 17929return $ac_func ();
503d2be0
AS
17930 ;
17931 return 0;
17932}
17933_ACEOF
17934rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17935if { (ac_try="$ac_link"
17936case "(($ac_try" in
17937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17938 *) ac_try_echo=$ac_try;;
17939esac
17940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17941 (eval "$ac_link") 2>conftest.er1
503d2be0 17942 ac_status=$?
edfaf76d
LK
17943 grep -v '^ *+' conftest.er1 >conftest.err
17944 rm -f conftest.er1
17945 cat conftest.err >&5
c0d27fcc 17946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17947 (exit $ac_status); } && {
17948 test -z "$ac_c_werror_flag" ||
17949 test ! -s conftest.err
17950 } && test -s conftest$ac_exeext &&
17951 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17952 eval "$as_ac_var=yes"
17953else
17954 echo "$as_me: failed program was:" >&5
19650fd6
AS
17955sed 's/^/| /' conftest.$ac_ext >&5
17956
ca81d7a0 17957 eval "$as_ac_var=no"
503d2be0 17958fi
ca81d7a0 17959
f053c89f 17960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17961 conftest$ac_exeext conftest.$ac_ext
503d2be0 17962fi
ca81d7a0
JD
17963ac_res=`eval echo '${'$as_ac_var'}'`
17964 { echo "$as_me:$LINENO: result: $ac_res" >&5
17965echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17966if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17967 cat >>confdefs.h <<_ACEOF
503d2be0 17968#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17969_ACEOF
ba4481b5 17970
ba4481b5
DL
17971fi
17972done
17973
c0d27fcc 17974
98418dba
CW
17975# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17976# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17977# Irix 4.0.5F has the header but not the library.
17978if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17979 ac_have_func=yes
17980
c0d27fcc 17981cat >>confdefs.h <<\_ACEOF
98418dba 17982#define SVR4 1
c0d27fcc 17983_ACEOF
98418dba
CW
17984
17985fi
17986
17987if test $ac_have_func = no; then
c0d27fcc 17988 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17989 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17990echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17991if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17992 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17993fi
ca81d7a0
JD
17994{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17995echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17996else
c0d27fcc 17997 # Is the header compilable?
ca81d7a0
JD
17998{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17999echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18000cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18001/* confdefs.h. */
18002_ACEOF
18003cat confdefs.h >>conftest.$ac_ext
18004cat >>conftest.$ac_ext <<_ACEOF
18005/* end confdefs.h. */
c0d27fcc
MR
18006$ac_includes_default
18007#include <inq_stats/cpustats.h>
18008_ACEOF
18009rm -f conftest.$ac_objext
ca81d7a0
JD
18010if { (ac_try="$ac_compile"
18011case "(($ac_try" in
18012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18013 *) ac_try_echo=$ac_try;;
18014esac
18015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18016 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18017 ac_status=$?
edfaf76d
LK
18018 grep -v '^ *+' conftest.er1 >conftest.err
18019 rm -f conftest.er1
18020 cat conftest.err >&5
c0d27fcc 18021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18022 (exit $ac_status); } && {
18023 test -z "$ac_c_werror_flag" ||
18024 test ! -s conftest.err
18025 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18026 ac_header_compiler=yes
18027else
18028 echo "$as_me: failed program was:" >&5
19650fd6
AS
18029sed 's/^/| /' conftest.$ac_ext >&5
18030
ca81d7a0 18031 ac_header_compiler=no
c0d27fcc 18032fi
ca81d7a0
JD
18033
18034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18035{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18036echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18037
18038# Is the header present?
ca81d7a0
JD
18039{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18040echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
98418dba 18047#include <inq_stats/cpustats.h>
503d2be0 18048_ACEOF
ca81d7a0
JD
18049if { (ac_try="$ac_cpp conftest.$ac_ext"
18050case "(($ac_try" in
18051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18052 *) ac_try_echo=$ac_try;;
18053esac
18054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18055 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18056 ac_status=$?
6bae0ccf 18057 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18058 rm -f conftest.er1
18059 cat conftest.err >&5
c0d27fcc 18060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18061 (exit $ac_status); } >/dev/null && {
18062 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18063 test ! -s conftest.err
18064 }; then
c0d27fcc 18065 ac_header_preproc=yes
503d2be0
AS
18066else
18067 echo "$as_me: failed program was:" >&5
19650fd6
AS
18068sed 's/^/| /' conftest.$ac_ext >&5
18069
c0d27fcc 18070 ac_header_preproc=no
ba4481b5 18071fi
ca81d7a0 18072
503d2be0 18073rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18074{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18075echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18076
18077# So? What about this header?
edfaf76d
LK
18078case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18079 yes:no: )
c0d27fcc
MR
18080 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18081echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18082 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18083echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18084 ac_header_preproc=yes
19650fd6 18085 ;;
edfaf76d 18086 no:yes:* )
c0d27fcc
MR
18087 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18088echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18089 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18090echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18091 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18092echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18093 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18094echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18095 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18096echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18097 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18098echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18099
19650fd6 18100 ;;
c0d27fcc 18101esac
ca81d7a0
JD
18102{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18103echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18104if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18105 echo $ECHO_N "(cached) $ECHO_C" >&6
18106else
18107 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18108fi
ca81d7a0
JD
18109{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18110echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18111
18112fi
98418dba
CW
18113if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18114 ac_have_func=yes
ba4481b5 18115
c0d27fcc 18116cat >>confdefs.h <<\_ACEOF
98418dba 18117#define UMAX 1
c0d27fcc 18118_ACEOF
98418dba 18119
c0d27fcc
MR
18120
18121cat >>confdefs.h <<\_ACEOF
98418dba 18122#define UMAX4_3 1
c0d27fcc 18123_ACEOF
98418dba
CW
18124
18125fi
18126
c0d27fcc 18127
98418dba
CW
18128fi
18129
18130if test $ac_have_func = no; then
c0d27fcc 18131 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18132 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18133echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18134if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18135 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18136fi
ca81d7a0
JD
18137{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18138echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18139else
c0d27fcc 18140 # Is the header compilable?
ca81d7a0
JD
18141{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18142echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18143cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
c0d27fcc
MR
18149$ac_includes_default
18150#include <sys/cpustats.h>
18151_ACEOF
18152rm -f conftest.$ac_objext
ca81d7a0
JD
18153if { (ac_try="$ac_compile"
18154case "(($ac_try" in
18155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18156 *) ac_try_echo=$ac_try;;
18157esac
18158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18159 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18160 ac_status=$?
edfaf76d
LK
18161 grep -v '^ *+' conftest.er1 >conftest.err
18162 rm -f conftest.er1
18163 cat conftest.err >&5
c0d27fcc 18164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18165 (exit $ac_status); } && {
18166 test -z "$ac_c_werror_flag" ||
18167 test ! -s conftest.err
18168 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18169 ac_header_compiler=yes
18170else
18171 echo "$as_me: failed program was:" >&5
19650fd6
AS
18172sed 's/^/| /' conftest.$ac_ext >&5
18173
ca81d7a0 18174 ac_header_compiler=no
c0d27fcc 18175fi
ca81d7a0
JD
18176
18177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18178{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18179echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18180
18181# Is the header present?
ca81d7a0
JD
18182{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18183echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18184cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18185/* confdefs.h. */
18186_ACEOF
18187cat confdefs.h >>conftest.$ac_ext
18188cat >>conftest.$ac_ext <<_ACEOF
18189/* end confdefs.h. */
98418dba
CW
18190#include <sys/cpustats.h>
18191_ACEOF
ca81d7a0
JD
18192if { (ac_try="$ac_cpp conftest.$ac_ext"
18193case "(($ac_try" in
18194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18195 *) ac_try_echo=$ac_try;;
18196esac
18197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18198 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18199 ac_status=$?
6bae0ccf 18200 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18201 rm -f conftest.er1
18202 cat conftest.err >&5
c0d27fcc 18203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18204 (exit $ac_status); } >/dev/null && {
18205 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18206 test ! -s conftest.err
18207 }; then
c0d27fcc 18208 ac_header_preproc=yes
98418dba
CW
18209else
18210 echo "$as_me: failed program was:" >&5
19650fd6
AS
18211sed 's/^/| /' conftest.$ac_ext >&5
18212
c0d27fcc 18213 ac_header_preproc=no
98418dba 18214fi
ca81d7a0 18215
98418dba 18216rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18217{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18218echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18219
18220# So? What about this header?
edfaf76d
LK
18221case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18222 yes:no: )
c0d27fcc
MR
18223 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18224echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18225 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18226echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18227 ac_header_preproc=yes
19650fd6 18228 ;;
edfaf76d 18229 no:yes:* )
c0d27fcc
MR
18230 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18231echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18232 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18233echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18234 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18235echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18236 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18237echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18238 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18239echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18240 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18241echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18242
19650fd6 18243 ;;
c0d27fcc 18244esac
ca81d7a0
JD
18245{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18246echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18247if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18248 echo $ECHO_N "(cached) $ECHO_C" >&6
18249else
18250 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18251fi
ca81d7a0
JD
18252{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18253echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18254
18255fi
98418dba 18256if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18257 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18258#define UMAX 1
c0d27fcc 18259_ACEOF
ba4481b5 18260
98418dba
CW
18261fi
18262
c0d27fcc 18263
98418dba
CW
18264fi
18265
18266if test $ac_have_func = no; then
18267
18268for ac_header in mach/mach.h
2c9dccc9
PJ
18269do
18270as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18271if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18272 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18273echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18274if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18275 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18276fi
ca81d7a0
JD
18277ac_res=`eval echo '${'$as_ac_Header'}'`
18278 { echo "$as_me:$LINENO: result: $ac_res" >&5
18279echo "${ECHO_T}$ac_res" >&6; }
98418dba 18280else
c0d27fcc 18281 # Is the header compilable?
ca81d7a0
JD
18282{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18283echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18284cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18285/* confdefs.h. */
18286_ACEOF
18287cat confdefs.h >>conftest.$ac_ext
18288cat >>conftest.$ac_ext <<_ACEOF
18289/* end confdefs.h. */
c0d27fcc
MR
18290$ac_includes_default
18291#include <$ac_header>
18292_ACEOF
18293rm -f conftest.$ac_objext
ca81d7a0
JD
18294if { (ac_try="$ac_compile"
18295case "(($ac_try" in
18296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18297 *) ac_try_echo=$ac_try;;
18298esac
18299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18300 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18301 ac_status=$?
edfaf76d
LK
18302 grep -v '^ *+' conftest.er1 >conftest.err
18303 rm -f conftest.er1
18304 cat conftest.err >&5
c0d27fcc 18305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18306 (exit $ac_status); } && {
18307 test -z "$ac_c_werror_flag" ||
18308 test ! -s conftest.err
18309 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18310 ac_header_compiler=yes
18311else
18312 echo "$as_me: failed program was:" >&5
19650fd6
AS
18313sed 's/^/| /' conftest.$ac_ext >&5
18314
ca81d7a0 18315 ac_header_compiler=no
c0d27fcc 18316fi
ca81d7a0
JD
18317
18318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18319{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18320echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18321
18322# Is the header present?
ca81d7a0
JD
18323{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18324echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18325cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18326/* confdefs.h. */
18327_ACEOF
18328cat confdefs.h >>conftest.$ac_ext
18329cat >>conftest.$ac_ext <<_ACEOF
18330/* end confdefs.h. */
2c9dccc9
PJ
18331#include <$ac_header>
18332_ACEOF
ca81d7a0
JD
18333if { (ac_try="$ac_cpp conftest.$ac_ext"
18334case "(($ac_try" in
18335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18336 *) ac_try_echo=$ac_try;;
18337esac
18338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18339 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18340 ac_status=$?
6bae0ccf 18341 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18342 rm -f conftest.er1
18343 cat conftest.err >&5
c0d27fcc 18344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18345 (exit $ac_status); } >/dev/null && {
18346 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18347 test ! -s conftest.err
18348 }; then
c0d27fcc
MR
18349 ac_header_preproc=yes
18350else
18351 echo "$as_me: failed program was:" >&5
19650fd6
AS
18352sed 's/^/| /' conftest.$ac_ext >&5
18353
c0d27fcc
MR
18354 ac_header_preproc=no
18355fi
ca81d7a0 18356
c0d27fcc 18357rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18358{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18359echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18360
18361# So? What about this header?
edfaf76d
LK
18362case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18363 yes:no: )
c0d27fcc
MR
18364 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18365echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18366 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18367echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18368 ac_header_preproc=yes
19650fd6 18369 ;;
edfaf76d 18370 no:yes:* )
c0d27fcc
MR
18371 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18372echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18373 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18374echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18375 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18376echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18377 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18378echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18379 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18380echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18381 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18382echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18383
19650fd6 18384 ;;
c0d27fcc 18385esac
ca81d7a0
JD
18386{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18387echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18388if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18389 echo $ECHO_N "(cached) $ECHO_C" >&6
18390else
edfaf76d 18391 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18392fi
ca81d7a0
JD
18393ac_res=`eval echo '${'$as_ac_Header'}'`
18394 { echo "$as_me:$LINENO: result: $ac_res" >&5
18395echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18396
18397fi
18398if test `eval echo '${'$as_ac_Header'}'` = yes; then
18399 cat >>confdefs.h <<_ACEOF
18400#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18401_ACEOF
18402
18403fi
18404
18405done
18406
18407fi
18408
18409
18410for ac_header in nlist.h
18411do
18412as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18413if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18414 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18415echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18416if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18417 echo $ECHO_N "(cached) $ECHO_C" >&6
18418fi
ca81d7a0
JD
18419ac_res=`eval echo '${'$as_ac_Header'}'`
18420 { echo "$as_me:$LINENO: result: $ac_res" >&5
18421echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18422else
18423 # Is the header compilable?
ca81d7a0
JD
18424{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18425echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18426cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18427/* confdefs.h. */
18428_ACEOF
18429cat confdefs.h >>conftest.$ac_ext
18430cat >>conftest.$ac_ext <<_ACEOF
18431/* end confdefs.h. */
c0d27fcc
MR
18432$ac_includes_default
18433#include <$ac_header>
18434_ACEOF
18435rm -f conftest.$ac_objext
ca81d7a0
JD
18436if { (ac_try="$ac_compile"
18437case "(($ac_try" in
18438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18439 *) ac_try_echo=$ac_try;;
18440esac
18441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18442 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18443 ac_status=$?
edfaf76d
LK
18444 grep -v '^ *+' conftest.er1 >conftest.err
18445 rm -f conftest.er1
18446 cat conftest.err >&5
c0d27fcc 18447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18448 (exit $ac_status); } && {
18449 test -z "$ac_c_werror_flag" ||
18450 test ! -s conftest.err
18451 } && test -s conftest.$ac_objext; then
c0d27fcc 18452 ac_header_compiler=yes
2c9dccc9
PJ
18453else
18454 echo "$as_me: failed program was:" >&5
19650fd6
AS
18455sed 's/^/| /' conftest.$ac_ext >&5
18456
ca81d7a0 18457 ac_header_compiler=no
98418dba 18458fi
ca81d7a0
JD
18459
18460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18461{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18462echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18463
c0d27fcc 18464# Is the header present?
ca81d7a0
JD
18465{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18466echo $ECHO_N "checking $ac_header presence... $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. */
503d2be0
AS
18473#include <$ac_header>
18474_ACEOF
ca81d7a0
JD
18475if { (ac_try="$ac_cpp conftest.$ac_ext"
18476case "(($ac_try" in
18477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478 *) ac_try_echo=$ac_try;;
18479esac
18480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18482 ac_status=$?
6bae0ccf 18483 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18484 rm -f conftest.er1
18485 cat conftest.err >&5
c0d27fcc 18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18487 (exit $ac_status); } >/dev/null && {
18488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18489 test ! -s conftest.err
18490 }; then
c0d27fcc 18491 ac_header_preproc=yes
503d2be0
AS
18492else
18493 echo "$as_me: failed program was:" >&5
19650fd6
AS
18494sed 's/^/| /' conftest.$ac_ext >&5
18495
c0d27fcc 18496 ac_header_preproc=no
b5de8dc0 18497fi
ca81d7a0 18498
503d2be0 18499rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18500{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18501echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18502
18503# So? What about this header?
edfaf76d
LK
18504case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18505 yes:no: )
c0d27fcc
MR
18506 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18507echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18508 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18509echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18510 ac_header_preproc=yes
19650fd6 18511 ;;
edfaf76d 18512 no:yes:* )
c0d27fcc
MR
18513 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18514echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18515 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18516echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18517 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18518echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18519 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18520echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18521 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18522echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18523 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18524echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18525
19650fd6 18526 ;;
c0d27fcc 18527esac
ca81d7a0
JD
18528{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18529echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18530if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18531 echo $ECHO_N "(cached) $ECHO_C" >&6
18532else
edfaf76d 18533 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18534fi
ca81d7a0
JD
18535ac_res=`eval echo '${'$as_ac_Header'}'`
18536 { echo "$as_me:$LINENO: result: $ac_res" >&5
18537echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18538
18539fi
98418dba 18540if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18541 cat >>confdefs.h <<_ACEOF
98418dba 18542#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18543_ACEOF
ca81d7a0
JD
18544 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18545echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18546if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18547 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18548else
503d2be0 18549 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18550/* confdefs.h. */
18551_ACEOF
18552cat confdefs.h >>conftest.$ac_ext
18553cat >>conftest.$ac_ext <<_ACEOF
18554/* end confdefs.h. */
98418dba 18555#include <nlist.h>
b5de8dc0 18556
503d2be0
AS
18557int
18558main ()
18559{
98418dba
CW
18560static struct nlist ac_aggr;
18561if (ac_aggr.n_un.n_name)
18562return 0;
503d2be0
AS
18563 ;
18564 return 0;
18565}
18566_ACEOF
98418dba 18567rm -f conftest.$ac_objext
ca81d7a0
JD
18568if { (ac_try="$ac_compile"
18569case "(($ac_try" in
18570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18571 *) ac_try_echo=$ac_try;;
18572esac
18573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18574 (eval "$ac_compile") 2>conftest.er1
503d2be0 18575 ac_status=$?
edfaf76d
LK
18576 grep -v '^ *+' conftest.er1 >conftest.err
18577 rm -f conftest.er1
18578 cat conftest.err >&5
c0d27fcc 18579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18580 (exit $ac_status); } && {
18581 test -z "$ac_c_werror_flag" ||
18582 test ! -s conftest.err
18583 } && test -s conftest.$ac_objext; then
edfaf76d 18584 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18585else
18586 echo "$as_me: failed program was:" >&5
19650fd6
AS
18587sed 's/^/| /' conftest.$ac_ext >&5
18588
ca81d7a0 18589 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18590/* confdefs.h. */
18591_ACEOF
18592cat confdefs.h >>conftest.$ac_ext
18593cat >>conftest.$ac_ext <<_ACEOF
18594/* end confdefs.h. */
6bae0ccf
DL
18595#include <nlist.h>
18596
18597int
18598main ()
18599{
18600static struct nlist ac_aggr;
18601if (sizeof ac_aggr.n_un.n_name)
18602return 0;
18603 ;
18604 return 0;
18605}
18606_ACEOF
18607rm -f conftest.$ac_objext
ca81d7a0
JD
18608if { (ac_try="$ac_compile"
18609case "(($ac_try" in
18610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18611 *) ac_try_echo=$ac_try;;
18612esac
18613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18614 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18615 ac_status=$?
edfaf76d
LK
18616 grep -v '^ *+' conftest.er1 >conftest.err
18617 rm -f conftest.er1
18618 cat conftest.err >&5
6bae0ccf 18619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18620 (exit $ac_status); } && {
18621 test -z "$ac_c_werror_flag" ||
18622 test ! -s conftest.err
18623 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18624 ac_cv_member_struct_nlist_n_un_n_name=yes
18625else
18626 echo "$as_me: failed program was:" >&5
19650fd6
AS
18627sed 's/^/| /' conftest.$ac_ext >&5
18628
ca81d7a0 18629 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18630fi
ca81d7a0
JD
18631
18632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18633fi
ca81d7a0
JD
18634
18635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18636fi
ca81d7a0
JD
18637{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18638echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18639if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18640
c0d27fcc 18641cat >>confdefs.h <<_ACEOF
98418dba 18642#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18643_ACEOF
b5de8dc0 18644
c0d27fcc
MR
18645
18646cat >>confdefs.h <<\_ACEOF
98418dba 18647#define NLIST_NAME_UNION 1
c0d27fcc 18648_ACEOF
b5de8dc0 18649
98418dba 18650fi
b5de8dc0 18651
c0d27fcc 18652
98418dba 18653fi
c0d27fcc 18654
98418dba 18655done
b5de8dc0 18656
98418dba
CW
18657fi
18658done
b5de8dc0 18659
c0d27fcc 18660
98418dba 18661# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18662{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18663echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18664if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18665 echo $ECHO_N "(cached) $ECHO_C" >&6
18666else
18667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18668/* confdefs.h. */
18669_ACEOF
18670cat confdefs.h >>conftest.$ac_ext
18671cat >>conftest.$ac_ext <<_ACEOF
18672/* end confdefs.h. */
6bae0ccf 18673#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18674#ifdef LDAV_PRIVILEGED
18675Yowza Am I SETGID yet
18676#endif
18677_ACEOF
18678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18679 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18680 ac_cv_func_getloadavg_setgid=yes
18681else
18682 ac_cv_func_getloadavg_setgid=no
18683fi
18684rm -f conftest*
b5de8dc0 18685
98418dba 18686fi
ca81d7a0
JD
18687{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18688echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18689if test $ac_cv_func_getloadavg_setgid = yes; then
18690 NEED_SETGID=true
b5de8dc0 18691
c0d27fcc 18692cat >>confdefs.h <<\_ACEOF
98418dba 18693#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18694_ACEOF
98418dba 18695
b5de8dc0 18696else
98418dba 18697 NEED_SETGID=false
b5de8dc0 18698fi
98418dba
CW
18699
18700if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18701 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18702echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18703if test "${ac_cv_group_kmem+set}" = set; then
18704 echo $ECHO_N "(cached) $ECHO_C" >&6
18705else
18706 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18707 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18708 # If we got an error (system does not support symlinks), try without -L.
18709 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18710 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18711 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18712 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18713 / /s/.* //;p;'`
18714
b5de8dc0 18715fi
ca81d7a0
JD
18716{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18717echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18718 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18719fi
98418dba
CW
18720if test "x$ac_save_LIBS" = x; then
18721 GETLOADAVG_LIBS=$LIBS
18722else
18723 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18724fi
98418dba 18725LIBS=$ac_save_LIBS
b5de8dc0 18726
c0d27fcc
MR
18727
18728
ca81d7a0
JD
18729{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18730echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18731if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18732 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18733else
b936fae4 18734 while :; do
503d2be0 18735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18736/* confdefs.h. */
18737_ACEOF
18738cat confdefs.h >>conftest.$ac_ext
18739cat >>conftest.$ac_ext <<_ACEOF
18740/* end confdefs.h. */
177cd151 18741#include <stdio.h>
503d2be0
AS
18742int
18743main ()
18744{
177cd151 18745return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18746 ;
18747 return 0;
18748}
18749_ACEOF
f053c89f
CY
18750rm -f conftest.$ac_objext conftest$ac_exeext
18751if { (ac_try="$ac_link"
ca81d7a0
JD
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
f053c89f 18757 (eval "$ac_link") 2>conftest.er1
b936fae4 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_exeext &&
18767 $as_test_x conftest$ac_exeext; then
18768 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18769else
18770 echo "$as_me: failed program was:" >&5
19650fd6
AS
18771sed 's/^/| /' conftest.$ac_ext >&5
18772
ca81d7a0 18773
b936fae4 18774fi
ca81d7a0 18775
f053c89f
CY
18776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18777 conftest$ac_exeext conftest.$ac_ext
b936fae4 18778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18779/* confdefs.h. */
18780_ACEOF
18781cat confdefs.h >>conftest.$ac_ext
18782cat >>conftest.$ac_ext <<_ACEOF
18783/* end confdefs.h. */
b936fae4 18784#define _LARGEFILE_SOURCE 1
177cd151 18785#include <stdio.h>
b936fae4
AS
18786int
18787main ()
18788{
177cd151 18789return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18790 ;
18791 return 0;
18792}
18793_ACEOF
f053c89f
CY
18794rm -f conftest.$ac_objext conftest$ac_exeext
18795if { (ac_try="$ac_link"
ca81d7a0
JD
18796case "(($ac_try" in
18797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18798 *) ac_try_echo=$ac_try;;
18799esac
18800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18801 (eval "$ac_link") 2>conftest.er1
b936fae4 18802 ac_status=$?
edfaf76d
LK
18803 grep -v '^ *+' conftest.er1 >conftest.err
18804 rm -f conftest.er1
18805 cat conftest.err >&5
c0d27fcc 18806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18807 (exit $ac_status); } && {
18808 test -z "$ac_c_werror_flag" ||
18809 test ! -s conftest.err
18810 } && test -s conftest$ac_exeext &&
18811 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18812 ac_cv_sys_largefile_source=1; break
18813else
18814 echo "$as_me: failed program was:" >&5
19650fd6
AS
18815sed 's/^/| /' conftest.$ac_ext >&5
18816
ca81d7a0 18817
b936fae4 18818fi
ca81d7a0 18819
f053c89f
CY
18820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18821 conftest$ac_exeext conftest.$ac_ext
18822 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18823 break
18824done
18825fi
ca81d7a0
JD
18826{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18827echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18828case $ac_cv_sys_largefile_source in #(
18829 no | unknown) ;;
18830 *)
c0d27fcc 18831cat >>confdefs.h <<_ACEOF
b936fae4 18832#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18833_ACEOF
f053c89f
CY
18834;;
18835esac
b936fae4 18836rm -f conftest*
4c343001 18837
b936fae4
AS
18838# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18839# in glibc 2.1.3, but that breaks too many other things.
18840# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18841if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18842
c0d27fcc 18843cat >>confdefs.h <<\_ACEOF
b936fae4 18844#define HAVE_FSEEKO 1
c0d27fcc 18845_ACEOF
b936fae4 18846
4c343001
DL
18847fi
18848
c0d27fcc 18849
52dbaac8
PE
18850# Configure getopt.
18851# getopt.m4 serial 10
18852
18853# The getopt module assume you want GNU getopt, with getopt_long etc,
18854# rather than vanilla POSIX getopt. This means your your code should
18855# always include <getopt.h> for the getopt prototypes.
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867# Prerequisites of lib/getopt*.
18868
18869
18870
10a3b1a1 18871
52dbaac8
PE
18872 GETOPT_H=
18873
18874for ac_header in getopt.h
18875do
18876as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18877if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18878 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18879echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18880if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18881 echo $ECHO_N "(cached) $ECHO_C" >&6
18882fi
ca81d7a0
JD
18883ac_res=`eval echo '${'$as_ac_Header'}'`
18884 { echo "$as_me:$LINENO: result: $ac_res" >&5
18885echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18886else
18887 # Is the header compilable?
ca81d7a0
JD
18888{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18889echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18890cat >conftest.$ac_ext <<_ACEOF
18891/* confdefs.h. */
18892_ACEOF
18893cat confdefs.h >>conftest.$ac_ext
18894cat >>conftest.$ac_ext <<_ACEOF
18895/* end confdefs.h. */
18896$ac_includes_default
18897#include <$ac_header>
18898_ACEOF
18899rm -f conftest.$ac_objext
ca81d7a0
JD
18900if { (ac_try="$ac_compile"
18901case "(($ac_try" in
18902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18903 *) ac_try_echo=$ac_try;;
18904esac
18905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18906 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18907 ac_status=$?
18908 grep -v '^ *+' conftest.er1 >conftest.err
18909 rm -f conftest.er1
18910 cat conftest.err >&5
18911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18912 (exit $ac_status); } && {
18913 test -z "$ac_c_werror_flag" ||
18914 test ! -s conftest.err
18915 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18916 ac_header_compiler=yes
18917else
18918 echo "$as_me: failed program was:" >&5
18919sed 's/^/| /' conftest.$ac_ext >&5
18920
ca81d7a0 18921 ac_header_compiler=no
52dbaac8 18922fi
ca81d7a0
JD
18923
18924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18925{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18926echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18927
18928# Is the header present?
ca81d7a0
JD
18929{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18930echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18931cat >conftest.$ac_ext <<_ACEOF
18932/* confdefs.h. */
18933_ACEOF
18934cat confdefs.h >>conftest.$ac_ext
18935cat >>conftest.$ac_ext <<_ACEOF
18936/* end confdefs.h. */
18937#include <$ac_header>
18938_ACEOF
ca81d7a0
JD
18939if { (ac_try="$ac_cpp conftest.$ac_ext"
18940case "(($ac_try" in
18941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18942 *) ac_try_echo=$ac_try;;
18943esac
18944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18945 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18946 ac_status=$?
18947 grep -v '^ *+' conftest.er1 >conftest.err
18948 rm -f conftest.er1
18949 cat conftest.err >&5
18950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18951 (exit $ac_status); } >/dev/null && {
18952 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18953 test ! -s conftest.err
18954 }; then
52dbaac8
PE
18955 ac_header_preproc=yes
18956else
18957 echo "$as_me: failed program was:" >&5
18958sed 's/^/| /' conftest.$ac_ext >&5
18959
18960 ac_header_preproc=no
18961fi
ca81d7a0 18962
52dbaac8 18963rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18964{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18965echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18966
18967# So? What about this header?
18968case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18969 yes:no: )
18970 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18971echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18972 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18973echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18974 ac_header_preproc=yes
18975 ;;
18976 no:yes:* )
18977 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18978echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18979 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18980echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18981 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18982echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18983 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18984echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18985 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18986echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18987 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18988echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18989
52dbaac8
PE
18990 ;;
18991esac
ca81d7a0
JD
18992{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18994if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18995 echo $ECHO_N "(cached) $ECHO_C" >&6
18996else
18997 eval "$as_ac_Header=\$ac_header_preproc"
18998fi
ca81d7a0
JD
18999ac_res=`eval echo '${'$as_ac_Header'}'`
19000 { echo "$as_me:$LINENO: result: $ac_res" >&5
19001echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19002
19003fi
19004if test `eval echo '${'$as_ac_Header'}'` = yes; then
19005 cat >>confdefs.h <<_ACEOF
19006#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19007_ACEOF
19008
19009else
19010 GETOPT_H=getopt.h
19011fi
19012
19013done
19014
19015 if test -z "$GETOPT_H"; then
19016
19017for ac_func in getopt_long_only
19018do
19019as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19020{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19021echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19022if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19023 echo $ECHO_N "(cached) $ECHO_C" >&6
19024else
19025 cat >conftest.$ac_ext <<_ACEOF
19026/* confdefs.h. */
19027_ACEOF
19028cat confdefs.h >>conftest.$ac_ext
19029cat >>conftest.$ac_ext <<_ACEOF
19030/* end confdefs.h. */
19031/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19032 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19033#define $ac_func innocuous_$ac_func
19034
19035/* System header to define __stub macros and hopefully few prototypes,
19036 which can conflict with char $ac_func (); below.
19037 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19038 <limits.h> exists even on freestanding compilers. */
19039
19040#ifdef __STDC__
19041# include <limits.h>
19042#else
19043# include <assert.h>
19044#endif
19045
19046#undef $ac_func
19047
ca81d7a0
JD
19048/* Override any GCC internal prototype to avoid an error.
19049 Use char because int might match the return type of a GCC
19050 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19051#ifdef __cplusplus
19052extern "C"
52dbaac8 19053#endif
52dbaac8
PE
19054char $ac_func ();
19055/* The GNU C library defines this for functions which it implements
19056 to always fail with ENOSYS. Some functions are actually named
19057 something starting with __ and the normal name is an alias. */
ca81d7a0 19058#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19059choke me
52dbaac8
PE
19060#endif
19061
19062int
19063main ()
19064{
ca81d7a0 19065return $ac_func ();
52dbaac8
PE
19066 ;
19067 return 0;
19068}
19069_ACEOF
19070rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19071if { (ac_try="$ac_link"
19072case "(($ac_try" in
19073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19074 *) ac_try_echo=$ac_try;;
19075esac
19076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19077 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19078 ac_status=$?
19079 grep -v '^ *+' conftest.er1 >conftest.err
19080 rm -f conftest.er1
19081 cat conftest.err >&5
19082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19083 (exit $ac_status); } && {
19084 test -z "$ac_c_werror_flag" ||
19085 test ! -s conftest.err
19086 } && test -s conftest$ac_exeext &&
19087 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19088 eval "$as_ac_var=yes"
19089else
19090 echo "$as_me: failed program was:" >&5
19091sed 's/^/| /' conftest.$ac_ext >&5
19092
ca81d7a0 19093 eval "$as_ac_var=no"
52dbaac8 19094fi
ca81d7a0 19095
f053c89f 19096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19097 conftest$ac_exeext conftest.$ac_ext
19098fi
ca81d7a0
JD
19099ac_res=`eval echo '${'$as_ac_var'}'`
19100 { echo "$as_me:$LINENO: result: $ac_res" >&5
19101echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19102if test `eval echo '${'$as_ac_var'}'` = yes; then
19103 cat >>confdefs.h <<_ACEOF
19104#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19105_ACEOF
19106
19107else
19108 GETOPT_H=getopt.h
19109fi
19110done
19111
19112 fi
19113
19114 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19115 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19116echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19117if test "${ac_cv_have_decl_optreset+set}" = set; then
19118 echo $ECHO_N "(cached) $ECHO_C" >&6
19119else
19120 cat >conftest.$ac_ext <<_ACEOF
19121/* confdefs.h. */
19122_ACEOF
19123cat confdefs.h >>conftest.$ac_ext
19124cat >>conftest.$ac_ext <<_ACEOF
19125/* end confdefs.h. */
19126#include <getopt.h>
19127
19128int
19129main ()
19130{
19131#ifndef optreset
f053c89f 19132 (void) optreset;
52dbaac8
PE
19133#endif
19134
19135 ;
19136 return 0;
19137}
19138_ACEOF
19139rm -f conftest.$ac_objext
ca81d7a0
JD
19140if { (ac_try="$ac_compile"
19141case "(($ac_try" in
19142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19143 *) ac_try_echo=$ac_try;;
19144esac
19145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19146 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19147 ac_status=$?
19148 grep -v '^ *+' conftest.er1 >conftest.err
19149 rm -f conftest.er1
19150 cat conftest.err >&5
19151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19152 (exit $ac_status); } && {
19153 test -z "$ac_c_werror_flag" ||
19154 test ! -s conftest.err
19155 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19156 ac_cv_have_decl_optreset=yes
19157else
19158 echo "$as_me: failed program was:" >&5
19159sed 's/^/| /' conftest.$ac_ext >&5
19160
ca81d7a0 19161 ac_cv_have_decl_optreset=no
52dbaac8 19162fi
ca81d7a0
JD
19163
19164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19165fi
ca81d7a0
JD
19166{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19167echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19168if test $ac_cv_have_decl_optreset = yes; then
19169 GETOPT_H=getopt.h
19170fi
19171
19172 fi
19173
19174 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19175 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19176echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19177if test "${gl_cv_func_gnu_getopt+set}" = set; then
19178 echo $ECHO_N "(cached) $ECHO_C" >&6
19179else
19180 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19181 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19182echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19183if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19184 echo $ECHO_N "(cached) $ECHO_C" >&6
19185else
19186 cat >conftest.$ac_ext <<_ACEOF
19187/* confdefs.h. */
19188_ACEOF
19189cat confdefs.h >>conftest.$ac_ext
19190cat >>conftest.$ac_ext <<_ACEOF
19191/* end confdefs.h. */
19192#include <getopt.h>
19193
19194int
19195main ()
19196{
19197#ifndef getopt_clip
f053c89f 19198 (void) getopt_clip;
52dbaac8
PE
19199#endif
19200
19201 ;
19202 return 0;
19203}
19204_ACEOF
19205rm -f conftest.$ac_objext
ca81d7a0
JD
19206if { (ac_try="$ac_compile"
19207case "(($ac_try" in
19208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19209 *) ac_try_echo=$ac_try;;
19210esac
19211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19212 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19213 ac_status=$?
19214 grep -v '^ *+' conftest.er1 >conftest.err
19215 rm -f conftest.er1
19216 cat conftest.err >&5
19217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19218 (exit $ac_status); } && {
19219 test -z "$ac_c_werror_flag" ||
19220 test ! -s conftest.err
19221 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19222 ac_cv_have_decl_getopt_clip=yes
19223else
19224 echo "$as_me: failed program was:" >&5
19225sed 's/^/| /' conftest.$ac_ext >&5
19226
ca81d7a0 19227 ac_cv_have_decl_getopt_clip=no
52dbaac8 19228fi
ca81d7a0
JD
19229
19230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19231fi
ca81d7a0
JD
19232{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19233echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19234if test $ac_cv_have_decl_getopt_clip = yes; then
19235 gl_cv_func_gnu_getopt=no
19236else
19237 gl_cv_func_gnu_getopt=yes
19238fi
19239
19240else
19241 cat >conftest.$ac_ext <<_ACEOF
19242/* confdefs.h. */
19243_ACEOF
19244cat confdefs.h >>conftest.$ac_ext
19245cat >>conftest.$ac_ext <<_ACEOF
19246/* end confdefs.h. */
19247#include <getopt.h>
19248int
19249main ()
19250{
19251
19252 char *myargv[3];
19253 myargv[0] = "conftest";
19254 myargv[1] = "-+";
19255 myargv[2] = 0;
19256 return getopt (2, myargv, "+a") != '?';
19257
19258 ;
19259 return 0;
19260}
19261_ACEOF
19262rm -f conftest$ac_exeext
ca81d7a0
JD
19263if { (ac_try="$ac_link"
19264case "(($ac_try" in
19265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19266 *) ac_try_echo=$ac_try;;
19267esac
19268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19269 (eval "$ac_link") 2>&5
52dbaac8
PE
19270 ac_status=$?
19271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19273 { (case "(($ac_try" in
19274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19275 *) ac_try_echo=$ac_try;;
19276esac
19277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19278 (eval "$ac_try") 2>&5
52dbaac8
PE
19279 ac_status=$?
19280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19281 (exit $ac_status); }; }; then
19282 gl_cv_func_gnu_getopt=yes
19283else
19284 echo "$as_me: program exited with status $ac_status" >&5
19285echo "$as_me: failed program was:" >&5
19286sed 's/^/| /' conftest.$ac_ext >&5
19287
19288( exit $ac_status )
19289gl_cv_func_gnu_getopt=no
19290fi
ca81d7a0 19291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19292fi
ca81d7a0
JD
19293
19294
52dbaac8 19295fi
ca81d7a0
JD
19296{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19297echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19298 if test "$gl_cv_func_gnu_getopt" = "no"; then
19299 GETOPT_H=getopt.h
19300 fi
19301 fi
19302
19303
19304
19305 if test -n "$GETOPT_H"; then
19306
19307
19308 GETOPT_H=getopt.h
19309
19310cat >>confdefs.h <<\_ACEOF
19311#define __GETOPT_PREFIX rpl_
19312_ACEOF
19313
19314
19315
19316 :
19317 GETOPTOBJS='getopt.o getopt1.o'
19318
19319fi
19320
19321
19322
19323
ca81d7a0
JD
19324{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19325echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19326if test "${ac_cv_func_getpgrp_void+set}" = set; then
19327 echo $ECHO_N "(cached) $ECHO_C" >&6
19328else
19329 # Use it with a single arg.
19330cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19331/* confdefs.h. */
19332_ACEOF
19333cat confdefs.h >>conftest.$ac_ext
19334cat >>conftest.$ac_ext <<_ACEOF
19335/* end confdefs.h. */
cd958eb3
MB
19336$ac_includes_default
19337int
19338main ()
19339{
19340getpgrp (0);
19341 ;
19342 return 0;
19343}
19344_ACEOF
19345rm -f conftest.$ac_objext
ca81d7a0
JD
19346if { (ac_try="$ac_compile"
19347case "(($ac_try" in
19348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19349 *) ac_try_echo=$ac_try;;
19350esac
19351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19352 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19353 ac_status=$?
edfaf76d
LK
19354 grep -v '^ *+' conftest.er1 >conftest.err
19355 rm -f conftest.er1
19356 cat conftest.err >&5
cd958eb3 19357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19358 (exit $ac_status); } && {
19359 test -z "$ac_c_werror_flag" ||
19360 test ! -s conftest.err
19361 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19362 ac_cv_func_getpgrp_void=no
19363else
19364 echo "$as_me: failed program was:" >&5
19650fd6
AS
19365sed 's/^/| /' conftest.$ac_ext >&5
19366
ca81d7a0 19367 ac_cv_func_getpgrp_void=yes
cd958eb3 19368fi
ca81d7a0
JD
19369
19370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19371
19372fi
ca81d7a0
JD
19373{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19374echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19375if test $ac_cv_func_getpgrp_void = yes; then
19376
19377cat >>confdefs.h <<\_ACEOF
19378#define GETPGRP_VOID 1
19379_ACEOF
19380
19381fi
19382
19383
973a76b1
DL
19384
19385for ac_func in strftime
19386do
19387as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19388{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19389echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19390if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19391 echo $ECHO_N "(cached) $ECHO_C" >&6
19392else
19393 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19394/* confdefs.h. */
19395_ACEOF
19396cat confdefs.h >>conftest.$ac_ext
19397cat >>conftest.$ac_ext <<_ACEOF
19398/* end confdefs.h. */
edfaf76d
LK
19399/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19400 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19401#define $ac_func innocuous_$ac_func
19402
973a76b1 19403/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19404 which can conflict with char $ac_func (); below.
19405 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19406 <limits.h> exists even on freestanding compilers. */
edfaf76d 19407
19650fd6
AS
19408#ifdef __STDC__
19409# include <limits.h>
19410#else
19411# include <assert.h>
19412#endif
edfaf76d
LK
19413
19414#undef $ac_func
19415
ca81d7a0
JD
19416/* Override any GCC internal prototype to avoid an error.
19417 Use char because int might match the return type of a GCC
19418 builtin and then its argument prototype would still apply. */
973a76b1
DL
19419#ifdef __cplusplus
19420extern "C"
973a76b1 19421#endif
973a76b1
DL
19422char $ac_func ();
19423/* The GNU C library defines this for functions which it implements
19424 to always fail with ENOSYS. Some functions are actually named
19425 something starting with __ and the normal name is an alias. */
ca81d7a0 19426#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19427choke me
973a76b1
DL
19428#endif
19429
19650fd6
AS
19430int
19431main ()
19432{
ca81d7a0 19433return $ac_func ();
973a76b1
DL
19434 ;
19435 return 0;
19436}
19437_ACEOF
19438rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19439if { (ac_try="$ac_link"
19440case "(($ac_try" in
19441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19442 *) ac_try_echo=$ac_try;;
19443esac
19444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19445 (eval "$ac_link") 2>conftest.er1
973a76b1 19446 ac_status=$?
edfaf76d
LK
19447 grep -v '^ *+' conftest.er1 >conftest.err
19448 rm -f conftest.er1
19449 cat conftest.err >&5
973a76b1 19450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19451 (exit $ac_status); } && {
19452 test -z "$ac_c_werror_flag" ||
19453 test ! -s conftest.err
19454 } && test -s conftest$ac_exeext &&
19455 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19456 eval "$as_ac_var=yes"
19457else
19458 echo "$as_me: failed program was:" >&5
19650fd6
AS
19459sed 's/^/| /' conftest.$ac_ext >&5
19460
ca81d7a0 19461 eval "$as_ac_var=no"
973a76b1 19462fi
ca81d7a0 19463
f053c89f 19464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19465 conftest$ac_exeext conftest.$ac_ext
973a76b1 19466fi
ca81d7a0
JD
19467ac_res=`eval echo '${'$as_ac_var'}'`
19468 { echo "$as_me:$LINENO: result: $ac_res" >&5
19469echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19470if test `eval echo '${'$as_ac_var'}'` = yes; then
19471 cat >>confdefs.h <<_ACEOF
19472#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19473_ACEOF
19474
19475else
19476 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19477{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19478echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19479if test "${ac_cv_lib_intl_strftime+set}" = set; then
19480 echo $ECHO_N "(cached) $ECHO_C" >&6
19481else
19482 ac_check_lib_save_LIBS=$LIBS
19483LIBS="-lintl $LIBS"
19484cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19485/* confdefs.h. */
19486_ACEOF
19487cat confdefs.h >>conftest.$ac_ext
19488cat >>conftest.$ac_ext <<_ACEOF
19489/* end confdefs.h. */
973a76b1 19490
ca81d7a0
JD
19491/* Override any GCC internal prototype to avoid an error.
19492 Use char because int might match the return type of a GCC
19493 builtin and then its argument prototype would still apply. */
973a76b1
DL
19494#ifdef __cplusplus
19495extern "C"
19496#endif
973a76b1
DL
19497char strftime ();
19498int
19499main ()
19500{
ca81d7a0 19501return strftime ();
973a76b1
DL
19502 ;
19503 return 0;
19504}
19505_ACEOF
19506rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19507if { (ac_try="$ac_link"
19508case "(($ac_try" in
19509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19510 *) ac_try_echo=$ac_try;;
19511esac
19512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19513 (eval "$ac_link") 2>conftest.er1
973a76b1 19514 ac_status=$?
edfaf76d
LK
19515 grep -v '^ *+' conftest.er1 >conftest.err
19516 rm -f conftest.er1
19517 cat conftest.err >&5
973a76b1 19518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19519 (exit $ac_status); } && {
19520 test -z "$ac_c_werror_flag" ||
19521 test ! -s conftest.err
19522 } && test -s conftest$ac_exeext &&
19523 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19524 ac_cv_lib_intl_strftime=yes
19525else
19526 echo "$as_me: failed program was:" >&5
19650fd6
AS
19527sed 's/^/| /' conftest.$ac_ext >&5
19528
ca81d7a0 19529 ac_cv_lib_intl_strftime=no
973a76b1 19530fi
ca81d7a0 19531
f053c89f 19532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19533 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19534LIBS=$ac_check_lib_save_LIBS
19535fi
ca81d7a0
JD
19536{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19537echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19538if test $ac_cv_lib_intl_strftime = yes; then
19539 cat >>confdefs.h <<\_ACEOF
19540#define HAVE_STRFTIME 1
19541_ACEOF
19542
19543LIBS="-lintl $LIBS"
19544fi
19545
19546fi
19547done
19548
19549
b936fae4
AS
19550# UNIX98 PTYs.
19551
19552for ac_func in grantpt
503d2be0
AS
19553do
19554as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19555{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19556echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19557if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19558 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19559else
503d2be0 19560 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19561/* confdefs.h. */
19562_ACEOF
19563cat confdefs.h >>conftest.$ac_ext
19564cat >>conftest.$ac_ext <<_ACEOF
19565/* end confdefs.h. */
edfaf76d
LK
19566/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19567 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19568#define $ac_func innocuous_$ac_func
19569
503d2be0 19570/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19571 which can conflict with char $ac_func (); below.
19572 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19573 <limits.h> exists even on freestanding compilers. */
edfaf76d 19574
19650fd6
AS
19575#ifdef __STDC__
19576# include <limits.h>
19577#else
19578# include <assert.h>
19579#endif
edfaf76d
LK
19580
19581#undef $ac_func
19582
ca81d7a0
JD
19583/* Override any GCC internal prototype to avoid an error.
19584 Use char because int might match the return type of a GCC
19585 builtin and then its argument prototype would still apply. */
503d2be0
AS
19586#ifdef __cplusplus
19587extern "C"
19588#endif
503d2be0 19589char $ac_func ();
503d2be0
AS
19590/* The GNU C library defines this for functions which it implements
19591 to always fail with ENOSYS. Some functions are actually named
19592 something starting with __ and the normal name is an alias. */
ca81d7a0 19593#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19594choke me
503d2be0 19595#endif
4c343001 19596
19650fd6
AS
19597int
19598main ()
19599{
ca81d7a0 19600return $ac_func ();
503d2be0
AS
19601 ;
19602 return 0;
19603}
19604_ACEOF
19605rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19606if { (ac_try="$ac_link"
19607case "(($ac_try" in
19608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19609 *) ac_try_echo=$ac_try;;
19610esac
19611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19612 (eval "$ac_link") 2>conftest.er1
503d2be0 19613 ac_status=$?
edfaf76d
LK
19614 grep -v '^ *+' conftest.er1 >conftest.err
19615 rm -f conftest.er1
19616 cat conftest.err >&5
c0d27fcc 19617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19618 (exit $ac_status); } && {
19619 test -z "$ac_c_werror_flag" ||
19620 test ! -s conftest.err
19621 } && test -s conftest$ac_exeext &&
19622 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19623 eval "$as_ac_var=yes"
19624else
19625 echo "$as_me: failed program was:" >&5
19650fd6
AS
19626sed 's/^/| /' conftest.$ac_ext >&5
19627
ca81d7a0 19628 eval "$as_ac_var=no"
503d2be0 19629fi
ca81d7a0 19630
f053c89f 19631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19632 conftest$ac_exeext conftest.$ac_ext
503d2be0 19633fi
ca81d7a0
JD
19634ac_res=`eval echo '${'$as_ac_var'}'`
19635 { echo "$as_me:$LINENO: result: $ac_res" >&5
19636echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19637if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19638 cat >>confdefs.h <<_ACEOF
503d2be0 19639#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19640_ACEOF
4c343001
DL
19641
19642fi
503d2be0
AS
19643done
19644
c0d27fcc 19645
b936fae4 19646# PTY-related GNU extensions.
4c343001 19647
b936fae4
AS
19648for ac_func in getpt
19649do
19650as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19651{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19652echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19653if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19654 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19655else
b936fae4 19656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19657/* confdefs.h. */
19658_ACEOF
19659cat confdefs.h >>conftest.$ac_ext
19660cat >>conftest.$ac_ext <<_ACEOF
19661/* end confdefs.h. */
edfaf76d
LK
19662/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19663 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19664#define $ac_func innocuous_$ac_func
19665
087121cc 19666/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19667 which can conflict with char $ac_func (); below.
19668 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19669 <limits.h> exists even on freestanding compilers. */
edfaf76d 19670
19650fd6
AS
19671#ifdef __STDC__
19672# include <limits.h>
19673#else
19674# include <assert.h>
19675#endif
edfaf76d
LK
19676
19677#undef $ac_func
19678
ca81d7a0
JD
19679/* Override any GCC internal prototype to avoid an error.
19680 Use char because int might match the return type of a GCC
19681 builtin and then its argument prototype would still apply. */
503d2be0
AS
19682#ifdef __cplusplus
19683extern "C"
19684#endif
503d2be0 19685char $ac_func ();
087121cc
GM
19686/* The GNU C library defines this for functions which it implements
19687 to always fail with ENOSYS. Some functions are actually named
19688 something starting with __ and the normal name is an alias. */
ca81d7a0 19689#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19690choke me
087121cc
GM
19691#endif
19692
19650fd6
AS
19693int
19694main ()
19695{
ca81d7a0 19696return $ac_func ();
503d2be0
AS
19697 ;
19698 return 0;
19699}
19700_ACEOF
19701rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19702if { (ac_try="$ac_link"
19703case "(($ac_try" in
19704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19705 *) ac_try_echo=$ac_try;;
19706esac
19707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19708 (eval "$ac_link") 2>conftest.er1
503d2be0 19709 ac_status=$?
edfaf76d
LK
19710 grep -v '^ *+' conftest.er1 >conftest.err
19711 rm -f conftest.er1
19712 cat conftest.err >&5
c0d27fcc 19713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19714 (exit $ac_status); } && {
19715 test -z "$ac_c_werror_flag" ||
19716 test ! -s conftest.err
19717 } && test -s conftest$ac_exeext &&
19718 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19719 eval "$as_ac_var=yes"
19720else
19721 echo "$as_me: failed program was:" >&5
19650fd6
AS
19722sed 's/^/| /' conftest.$ac_ext >&5
19723
ca81d7a0 19724 eval "$as_ac_var=no"
503d2be0 19725fi
ca81d7a0 19726
f053c89f 19727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19728 conftest$ac_exeext conftest.$ac_ext
503d2be0 19729fi
ca81d7a0
JD
19730ac_res=`eval echo '${'$as_ac_var'}'`
19731 { echo "$as_me:$LINENO: result: $ac_res" >&5
19732echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19733if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19734 cat >>confdefs.h <<_ACEOF
503d2be0 19735#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19736_ACEOF
087121cc 19737
087121cc
GM
19738fi
19739done
19740
c0d27fcc 19741
ba4481b5
DL
19742# Check this now, so that we will NOT find the above functions in ncurses.
19743# That is because we have not set up to link ncurses in lib-src.
19744# It's better to believe a function is not available
19745# than to expect to find it in ncurses.
503d2be0 19746
ca81d7a0
JD
19747{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19748echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19749if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19750 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19751else
503d2be0 19752 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19753LIBS="-lncurses $LIBS"
503d2be0 19754cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19755/* confdefs.h. */
19756_ACEOF
19757cat confdefs.h >>conftest.$ac_ext
19758cat >>conftest.$ac_ext <<_ACEOF
19759/* end confdefs.h. */
503d2be0 19760
ca81d7a0
JD
19761/* Override any GCC internal prototype to avoid an error.
19762 Use char because int might match the return type of a GCC
19763 builtin and then its argument prototype would still apply. */
503d2be0
AS
19764#ifdef __cplusplus
19765extern "C"
19766#endif
503d2be0
AS
19767char tparm ();
19768int
19769main ()
19770{
ca81d7a0 19771return tparm ();
503d2be0
AS
19772 ;
19773 return 0;
19774}
19775_ACEOF
19776rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19777if { (ac_try="$ac_link"
19778case "(($ac_try" in
19779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19780 *) ac_try_echo=$ac_try;;
19781esac
19782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19783 (eval "$ac_link") 2>conftest.er1
503d2be0 19784 ac_status=$?
edfaf76d
LK
19785 grep -v '^ *+' conftest.er1 >conftest.err
19786 rm -f conftest.er1
19787 cat conftest.err >&5
c0d27fcc 19788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19789 (exit $ac_status); } && {
19790 test -z "$ac_c_werror_flag" ||
19791 test ! -s conftest.err
19792 } && test -s conftest$ac_exeext &&
19793 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19794 ac_cv_lib_ncurses_tparm=yes
19795else
19796 echo "$as_me: failed program was:" >&5
19650fd6
AS
19797sed 's/^/| /' conftest.$ac_ext >&5
19798
ca81d7a0 19799 ac_cv_lib_ncurses_tparm=no
503d2be0 19800fi
ca81d7a0 19801
f053c89f 19802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19803 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19804LIBS=$ac_check_lib_save_LIBS
19805fi
ca81d7a0
JD
19806{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19807echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19808if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19809 cat >>confdefs.h <<_ACEOF
503d2be0 19810#define HAVE_LIBNCURSES 1
c0d27fcc 19811_ACEOF
ba4481b5
DL
19812
19813 LIBS="-lncurses $LIBS"
19814
ba4481b5
DL
19815fi
19816
c0d27fcc 19817
bc3512d0
CY
19818# Do we have res_init, for detecting changes in /etc/resolv.conf?
19819
19820resolv=no
074767f2 19821cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19822/* confdefs.h. */
19823_ACEOF
19824cat confdefs.h >>conftest.$ac_ext
19825cat >>conftest.$ac_ext <<_ACEOF
19826/* end confdefs.h. */
074767f2
AS
19827#include <netinet/in.h>
19828#include <arpa/nameser.h>
19829#include <resolv.h>
bc3512d0
CY
19830int
19831main ()
19832{
074767f2 19833return res_init();
bc3512d0
CY
19834 ;
19835 return 0;
19836}
19837_ACEOF
19838rm -f conftest.$ac_objext conftest$ac_exeext
19839if { (ac_try="$ac_link"
19840case "(($ac_try" in
19841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19842 *) ac_try_echo=$ac_try;;
19843esac
19844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19845 (eval "$ac_link") 2>conftest.er1
19846 ac_status=$?
19847 grep -v '^ *+' conftest.er1 >conftest.err
19848 rm -f conftest.er1
19849 cat conftest.err >&5
19850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19851 (exit $ac_status); } && {
19852 test -z "$ac_c_werror_flag" ||
19853 test ! -s conftest.err
19854 } && test -s conftest$ac_exeext &&
19855 $as_test_x conftest$ac_exeext; then
074767f2 19856 have_res_init=yes
bc3512d0
CY
19857else
19858 echo "$as_me: failed program was:" >&5
19859sed 's/^/| /' conftest.$ac_ext >&5
19860
074767f2 19861 have_res_init=no
bc3512d0
CY
19862fi
19863
19864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19865 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19866if test "$have_res_init" = no; then
19867 OLIBS="$LIBS"
19868 LIBS="$LIBS -lresolv"
19869 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19870echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19871 cat >conftest.$ac_ext <<_ACEOF
19872/* confdefs.h. */
19873_ACEOF
19874cat confdefs.h >>conftest.$ac_ext
19875cat >>conftest.$ac_ext <<_ACEOF
19876/* end confdefs.h. */
19877#include <netinet/in.h>
19878#include <arpa/nameser.h>
19879#include <resolv.h>
19880int
19881main ()
19882{
074767f2 19883return res_init();
bc3512d0
CY
19884 ;
19885 return 0;
19886}
19887_ACEOF
19888rm -f conftest.$ac_objext conftest$ac_exeext
19889if { (ac_try="$ac_link"
19890case "(($ac_try" in
19891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19892 *) ac_try_echo=$ac_try;;
19893esac
19894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19895 (eval "$ac_link") 2>conftest.er1
19896 ac_status=$?
19897 grep -v '^ *+' conftest.er1 >conftest.err
19898 rm -f conftest.er1
19899 cat conftest.err >&5
19900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19901 (exit $ac_status); } && {
19902 test -z "$ac_c_werror_flag" ||
19903 test ! -s conftest.err
19904 } && test -s conftest$ac_exeext &&
19905 $as_test_x conftest$ac_exeext; then
19906 have_res_init=yes
19907else
19908 echo "$as_me: failed program was:" >&5
19909sed 's/^/| /' conftest.$ac_ext >&5
19910
19911 have_res_init=no
19912fi
19913
19914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19915 conftest$ac_exeext conftest.$ac_ext
19916 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19917echo "${ECHO_T}$have_res_init" >&6; }
19918 if test "$have_res_init" = yes ; then
19919 resolv=yes
19920 fi
19921 LIBS="$OLIBS"
19922fi
19923
19924if test "$have_res_init" = yes; then
19925
19926cat >>confdefs.h <<\_ACEOF
19927#define HAVE_RES_INIT 1
19928_ACEOF
19929
19930fi
19931
84e70f78 19932# Do we need the Hesiod library to provide the support routines?
ff1095d1 19933if test "$with_hesiod" != no ; then
84e70f78 19934 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
19935 { echo "$as_me:$LINENO: checking for res_send" >&5
19936echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19937if test "${ac_cv_func_res_send+set}" = set; then
19938 echo $ECHO_N "(cached) $ECHO_C" >&6
19939else
19940 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19941/* confdefs.h. */
19942_ACEOF
19943cat confdefs.h >>conftest.$ac_ext
19944cat >>conftest.$ac_ext <<_ACEOF
19945/* end confdefs.h. */
edfaf76d
LK
19946/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19947 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19948#define res_send innocuous_res_send
19949
84e70f78 19950/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19951 which can conflict with char res_send (); below.
19952 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19953 <limits.h> exists even on freestanding compilers. */
edfaf76d 19954
19650fd6
AS
19955#ifdef __STDC__
19956# include <limits.h>
19957#else
19958# include <assert.h>
19959#endif
edfaf76d
LK
19960
19961#undef res_send
19962
ca81d7a0
JD
19963/* Override any GCC internal prototype to avoid an error.
19964 Use char because int might match the return type of a GCC
19965 builtin and then its argument prototype would still apply. */
84e70f78
KR
19966#ifdef __cplusplus
19967extern "C"
19968#endif
84e70f78 19969char res_send ();
84e70f78
KR
19970/* The GNU C library defines this for functions which it implements
19971 to always fail with ENOSYS. Some functions are actually named
19972 something starting with __ and the normal name is an alias. */
ca81d7a0 19973#if defined __stub_res_send || defined __stub___res_send
84e70f78 19974choke me
cd958eb3
MB
19975#endif
19976
19650fd6
AS
19977int
19978main ()
19979{
ca81d7a0 19980return res_send ();
84e70f78
KR
19981 ;
19982 return 0;
19983}
19984_ACEOF
19985rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19986if { (ac_try="$ac_link"
19987case "(($ac_try" in
19988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19989 *) ac_try_echo=$ac_try;;
19990esac
19991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19992 (eval "$ac_link") 2>conftest.er1
84e70f78 19993 ac_status=$?
edfaf76d
LK
19994 grep -v '^ *+' conftest.er1 >conftest.err
19995 rm -f conftest.er1
19996 cat conftest.err >&5
c0d27fcc 19997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19998 (exit $ac_status); } && {
19999 test -z "$ac_c_werror_flag" ||
20000 test ! -s conftest.err
20001 } && test -s conftest$ac_exeext &&
20002 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20003 ac_cv_func_res_send=yes
20004else
20005 echo "$as_me: failed program was:" >&5
19650fd6
AS
20006sed 's/^/| /' conftest.$ac_ext >&5
20007
ca81d7a0 20008 ac_cv_func_res_send=no
84e70f78 20009fi
ca81d7a0 20010
f053c89f 20011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20012 conftest$ac_exeext conftest.$ac_ext
84e70f78 20013fi
ca81d7a0
JD
20014{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20015echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20016if test $ac_cv_func_res_send = yes; then
20017 :
20018else
ca81d7a0
JD
20019 { echo "$as_me:$LINENO: checking for __res_send" >&5
20020echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20021if test "${ac_cv_func___res_send+set}" = set; then
20022 echo $ECHO_N "(cached) $ECHO_C" >&6
20023else
20024 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20025/* confdefs.h. */
20026_ACEOF
20027cat confdefs.h >>conftest.$ac_ext
20028cat >>conftest.$ac_ext <<_ACEOF
20029/* end confdefs.h. */
edfaf76d
LK
20030/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20032#define __res_send innocuous___res_send
20033
84e70f78 20034/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20035 which can conflict with char __res_send (); below.
20036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20037 <limits.h> exists even on freestanding compilers. */
edfaf76d 20038
19650fd6
AS
20039#ifdef __STDC__
20040# include <limits.h>
20041#else
20042# include <assert.h>
20043#endif
edfaf76d
LK
20044
20045#undef __res_send
20046
ca81d7a0
JD
20047/* Override any GCC internal prototype to avoid an error.
20048 Use char because int might match the return type of a GCC
20049 builtin and then its argument prototype would still apply. */
84e70f78
KR
20050#ifdef __cplusplus
20051extern "C"
20052#endif
84e70f78 20053char __res_send ();
84e70f78
KR
20054/* The GNU C library defines this for functions which it implements
20055 to always fail with ENOSYS. Some functions are actually named
20056 something starting with __ and the normal name is an alias. */
ca81d7a0 20057#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20058choke me
84e70f78
KR
20059#endif
20060
19650fd6
AS
20061int
20062main ()
20063{
ca81d7a0 20064return __res_send ();
84e70f78
KR
20065 ;
20066 return 0;
20067}
20068_ACEOF
20069rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20070if { (ac_try="$ac_link"
20071case "(($ac_try" in
20072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20073 *) ac_try_echo=$ac_try;;
20074esac
20075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20076 (eval "$ac_link") 2>conftest.er1
84e70f78 20077 ac_status=$?
edfaf76d
LK
20078 grep -v '^ *+' conftest.er1 >conftest.err
20079 rm -f conftest.er1
20080 cat conftest.err >&5
c0d27fcc 20081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20082 (exit $ac_status); } && {
20083 test -z "$ac_c_werror_flag" ||
20084 test ! -s conftest.err
20085 } && test -s conftest$ac_exeext &&
20086 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20087 ac_cv_func___res_send=yes
20088else
20089 echo "$as_me: failed program was:" >&5
19650fd6
AS
20090sed 's/^/| /' conftest.$ac_ext >&5
20091
ca81d7a0 20092 ac_cv_func___res_send=no
84e70f78 20093fi
ca81d7a0 20094
f053c89f 20095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20096 conftest$ac_exeext conftest.$ac_ext
84e70f78 20097fi
ca81d7a0
JD
20098{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20099echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20100if test $ac_cv_func___res_send = yes; then
20101 :
20102else
ca81d7a0
JD
20103 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20104echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20105if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20106 echo $ECHO_N "(cached) $ECHO_C" >&6
20107else
20108 ac_check_lib_save_LIBS=$LIBS
20109LIBS="-lresolv $LIBS"
20110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20111/* confdefs.h. */
20112_ACEOF
20113cat confdefs.h >>conftest.$ac_ext
20114cat >>conftest.$ac_ext <<_ACEOF
20115/* end confdefs.h. */
84e70f78 20116
ca81d7a0
JD
20117/* Override any GCC internal prototype to avoid an error.
20118 Use char because int might match the return type of a GCC
20119 builtin and then its argument prototype would still apply. */
84e70f78
KR
20120#ifdef __cplusplus
20121extern "C"
20122#endif
84e70f78
KR
20123char res_send ();
20124int
20125main ()
20126{
ca81d7a0 20127return res_send ();
84e70f78
KR
20128 ;
20129 return 0;
20130}
20131_ACEOF
20132rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20133if { (ac_try="$ac_link"
20134case "(($ac_try" in
20135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20136 *) ac_try_echo=$ac_try;;
20137esac
20138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20139 (eval "$ac_link") 2>conftest.er1
84e70f78 20140 ac_status=$?
edfaf76d
LK
20141 grep -v '^ *+' conftest.er1 >conftest.err
20142 rm -f conftest.er1
20143 cat conftest.err >&5
c0d27fcc 20144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20145 (exit $ac_status); } && {
20146 test -z "$ac_c_werror_flag" ||
20147 test ! -s conftest.err
20148 } && test -s conftest$ac_exeext &&
20149 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20150 ac_cv_lib_resolv_res_send=yes
20151else
20152 echo "$as_me: failed program was:" >&5
19650fd6
AS
20153sed 's/^/| /' conftest.$ac_ext >&5
20154
ca81d7a0 20155 ac_cv_lib_resolv_res_send=no
84e70f78 20156fi
ca81d7a0 20157
f053c89f 20158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20159 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20160LIBS=$ac_check_lib_save_LIBS
20161fi
ca81d7a0
JD
20162{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20163echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20164if test $ac_cv_lib_resolv_res_send = yes; then
20165 resolv=yes
20166else
ca81d7a0
JD
20167 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20168echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20169if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20170 echo $ECHO_N "(cached) $ECHO_C" >&6
20171else
20172 ac_check_lib_save_LIBS=$LIBS
20173LIBS="-lresolv $LIBS"
20174cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20175/* confdefs.h. */
20176_ACEOF
20177cat confdefs.h >>conftest.$ac_ext
20178cat >>conftest.$ac_ext <<_ACEOF
20179/* end confdefs.h. */
84e70f78 20180
ca81d7a0
JD
20181/* Override any GCC internal prototype to avoid an error.
20182 Use char because int might match the return type of a GCC
20183 builtin and then its argument prototype would still apply. */
84e70f78
KR
20184#ifdef __cplusplus
20185extern "C"
20186#endif
84e70f78
KR
20187char __res_send ();
20188int
20189main ()
20190{
ca81d7a0 20191return __res_send ();
84e70f78
KR
20192 ;
20193 return 0;
20194}
20195_ACEOF
20196rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20197if { (ac_try="$ac_link"
20198case "(($ac_try" in
20199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20200 *) ac_try_echo=$ac_try;;
20201esac
20202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20203 (eval "$ac_link") 2>conftest.er1
84e70f78 20204 ac_status=$?
edfaf76d
LK
20205 grep -v '^ *+' conftest.er1 >conftest.err
20206 rm -f conftest.er1
20207 cat conftest.err >&5
c0d27fcc 20208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20209 (exit $ac_status); } && {
20210 test -z "$ac_c_werror_flag" ||
20211 test ! -s conftest.err
20212 } && test -s conftest$ac_exeext &&
20213 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20214 ac_cv_lib_resolv___res_send=yes
20215else
20216 echo "$as_me: failed program was:" >&5
19650fd6
AS
20217sed 's/^/| /' conftest.$ac_ext >&5
20218
ca81d7a0 20219 ac_cv_lib_resolv___res_send=no
84e70f78 20220fi
ca81d7a0 20221
f053c89f 20222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20223 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20224LIBS=$ac_check_lib_save_LIBS
20225fi
ca81d7a0
JD
20226{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20227echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20228if test $ac_cv_lib_resolv___res_send = yes; then
20229 resolv=yes
20230fi
20231
20232fi
20233
20234fi
20235
20236fi
20237
20238 if test "$resolv" = yes ; then
20239 RESOLVLIB=-lresolv
84e70f78
KR
20240 else
20241 RESOLVLIB=
20242 fi
ca81d7a0
JD
20243 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20244echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20245if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20246 echo $ECHO_N "(cached) $ECHO_C" >&6
20247else
20248 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20249/* confdefs.h. */
20250_ACEOF
20251cat confdefs.h >>conftest.$ac_ext
20252cat >>conftest.$ac_ext <<_ACEOF
20253/* end confdefs.h. */
edfaf76d
LK
20254/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20256#define hes_getmailhost innocuous_hes_getmailhost
20257
84e70f78 20258/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20259 which can conflict with char hes_getmailhost (); below.
20260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20261 <limits.h> exists even on freestanding compilers. */
edfaf76d 20262
19650fd6
AS
20263#ifdef __STDC__
20264# include <limits.h>
20265#else
20266# include <assert.h>
20267#endif
edfaf76d
LK
20268
20269#undef hes_getmailhost
20270
ca81d7a0
JD
20271/* Override any GCC internal prototype to avoid an error.
20272 Use char because int might match the return type of a GCC
20273 builtin and then its argument prototype would still apply. */
84e70f78
KR
20274#ifdef __cplusplus
20275extern "C"
20276#endif
84e70f78 20277char hes_getmailhost ();
84e70f78
KR
20278/* The GNU C library defines this for functions which it implements
20279 to always fail with ENOSYS. Some functions are actually named
20280 something starting with __ and the normal name is an alias. */
ca81d7a0 20281#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20282choke me
cd958eb3
MB
20283#endif
20284
19650fd6
AS
20285int
20286main ()
20287{
ca81d7a0 20288return hes_getmailhost ();
84e70f78
KR
20289 ;
20290 return 0;
20291}
20292_ACEOF
20293rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20294if { (ac_try="$ac_link"
20295case "(($ac_try" in
20296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20297 *) ac_try_echo=$ac_try;;
20298esac
20299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20300 (eval "$ac_link") 2>conftest.er1
84e70f78 20301 ac_status=$?
edfaf76d
LK
20302 grep -v '^ *+' conftest.er1 >conftest.err
20303 rm -f conftest.er1
20304 cat conftest.err >&5
c0d27fcc 20305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20306 (exit $ac_status); } && {
20307 test -z "$ac_c_werror_flag" ||
20308 test ! -s conftest.err
20309 } && test -s conftest$ac_exeext &&
20310 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20311 ac_cv_func_hes_getmailhost=yes
20312else
20313 echo "$as_me: failed program was:" >&5
19650fd6
AS
20314sed 's/^/| /' conftest.$ac_ext >&5
20315
ca81d7a0 20316 ac_cv_func_hes_getmailhost=no
84e70f78 20317fi
ca81d7a0 20318
f053c89f 20319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20320 conftest$ac_exeext conftest.$ac_ext
84e70f78 20321fi
ca81d7a0
JD
20322{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20323echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20324if test $ac_cv_func_hes_getmailhost = yes; then
20325 :
20326else
ca81d7a0
JD
20327 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20328echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20329if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20330 echo $ECHO_N "(cached) $ECHO_C" >&6
20331else
20332 ac_check_lib_save_LIBS=$LIBS
20333LIBS="-lhesiod $RESOLVLIB $LIBS"
20334cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
84e70f78 20340
ca81d7a0
JD
20341/* Override any GCC internal prototype to avoid an error.
20342 Use char because int might match the return type of a GCC
20343 builtin and then its argument prototype would still apply. */
84e70f78
KR
20344#ifdef __cplusplus
20345extern "C"
20346#endif
84e70f78
KR
20347char hes_getmailhost ();
20348int
20349main ()
20350{
ca81d7a0 20351return hes_getmailhost ();
84e70f78
KR
20352 ;
20353 return 0;
20354}
20355_ACEOF
20356rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20357if { (ac_try="$ac_link"
20358case "(($ac_try" in
20359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20360 *) ac_try_echo=$ac_try;;
20361esac
20362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20363 (eval "$ac_link") 2>conftest.er1
84e70f78 20364 ac_status=$?
edfaf76d
LK
20365 grep -v '^ *+' conftest.er1 >conftest.err
20366 rm -f conftest.er1
20367 cat conftest.err >&5
c0d27fcc 20368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20369 (exit $ac_status); } && {
20370 test -z "$ac_c_werror_flag" ||
20371 test ! -s conftest.err
20372 } && test -s conftest$ac_exeext &&
20373 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20374 ac_cv_lib_hesiod_hes_getmailhost=yes
20375else
20376 echo "$as_me: failed program was:" >&5
19650fd6
AS
20377sed 's/^/| /' conftest.$ac_ext >&5
20378
ca81d7a0 20379 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20380fi
ca81d7a0 20381
f053c89f 20382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20383 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20384LIBS=$ac_check_lib_save_LIBS
20385fi
ca81d7a0
JD
20386{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20387echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20388if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20389
c0d27fcc 20390cat >>confdefs.h <<\_ACEOF
84e70f78 20391#define HAVE_LIBHESIOD 1
c0d27fcc 20392_ACEOF
84e70f78
KR
20393
20394else
20395 :
20396fi
20397
20398fi
20399
20400fi
20401
bc3512d0
CY
20402# Do we need libresolv (due to res_init or Hesiod)?
20403if test "$resolv" = yes ; then
20404
20405cat >>confdefs.h <<\_ACEOF
20406#define HAVE_LIBRESOLV 1
20407_ACEOF
20408
20409fi
20410
a21616bd 20411# These tell us which Kerberos-related libraries to use.
ff1095d1 20412if test "${with_kerberos}" != no; then
503d2be0 20413
ca81d7a0
JD
20414{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20415echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20416if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20417 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20418else
503d2be0 20419 ac_check_lib_save_LIBS=$LIBS
a21616bd 20420LIBS="-lcom_err $LIBS"
503d2be0 20421cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20422/* confdefs.h. */
20423_ACEOF
20424cat confdefs.h >>conftest.$ac_ext
20425cat >>conftest.$ac_ext <<_ACEOF
20426/* end confdefs.h. */
503d2be0 20427
ca81d7a0
JD
20428/* Override any GCC internal prototype to avoid an error.
20429 Use char because int might match the return type of a GCC
20430 builtin and then its argument prototype would still apply. */
503d2be0
AS
20431#ifdef __cplusplus
20432extern "C"
20433#endif
503d2be0
AS
20434char com_err ();
20435int
20436main ()
20437{
ca81d7a0 20438return com_err ();
503d2be0
AS
20439 ;
20440 return 0;
20441}
20442_ACEOF
20443rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20444if { (ac_try="$ac_link"
20445case "(($ac_try" in
20446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20447 *) ac_try_echo=$ac_try;;
20448esac
20449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20450 (eval "$ac_link") 2>conftest.er1
503d2be0 20451 ac_status=$?
edfaf76d
LK
20452 grep -v '^ *+' conftest.er1 >conftest.err
20453 rm -f conftest.er1
20454 cat conftest.err >&5
c0d27fcc 20455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20456 (exit $ac_status); } && {
20457 test -z "$ac_c_werror_flag" ||
20458 test ! -s conftest.err
20459 } && test -s conftest$ac_exeext &&
20460 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20461 ac_cv_lib_com_err_com_err=yes
20462else
20463 echo "$as_me: failed program was:" >&5
19650fd6
AS
20464sed 's/^/| /' conftest.$ac_ext >&5
20465
ca81d7a0 20466 ac_cv_lib_com_err_com_err=no
503d2be0 20467fi
ca81d7a0 20468
f053c89f 20469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20470 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20471LIBS=$ac_check_lib_save_LIBS
20472fi
ca81d7a0
JD
20473{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20474echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20475if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20476 cat >>confdefs.h <<_ACEOF
503d2be0 20477#define HAVE_LIBCOM_ERR 1
c0d27fcc 20478_ACEOF
a21616bd
KR
20479
20480 LIBS="-lcom_err $LIBS"
20481
a21616bd
KR
20482fi
20483
c0d27fcc 20484
ca81d7a0
JD
20485{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20486echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20487if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20488 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20489else
503d2be0 20490 ac_check_lib_save_LIBS=$LIBS
a21616bd 20491LIBS="-lk5crypto $LIBS"
503d2be0 20492cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20493/* confdefs.h. */
20494_ACEOF
20495cat confdefs.h >>conftest.$ac_ext
20496cat >>conftest.$ac_ext <<_ACEOF
20497/* end confdefs.h. */
503d2be0 20498
ca81d7a0
JD
20499/* Override any GCC internal prototype to avoid an error.
20500 Use char because int might match the return type of a GCC
20501 builtin and then its argument prototype would still apply. */
503d2be0
AS
20502#ifdef __cplusplus
20503extern "C"
20504#endif
503d2be0
AS
20505char mit_des_cbc_encrypt ();
20506int
20507main ()
20508{
ca81d7a0 20509return mit_des_cbc_encrypt ();
503d2be0
AS
20510 ;
20511 return 0;
20512}
20513_ACEOF
20514rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20515if { (ac_try="$ac_link"
20516case "(($ac_try" in
20517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20518 *) ac_try_echo=$ac_try;;
20519esac
20520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20521 (eval "$ac_link") 2>conftest.er1
503d2be0 20522 ac_status=$?
edfaf76d
LK
20523 grep -v '^ *+' conftest.er1 >conftest.err
20524 rm -f conftest.er1
20525 cat conftest.err >&5
c0d27fcc 20526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20527 (exit $ac_status); } && {
20528 test -z "$ac_c_werror_flag" ||
20529 test ! -s conftest.err
20530 } && test -s conftest$ac_exeext &&
20531 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20532 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20533else
20534 echo "$as_me: failed program was:" >&5
19650fd6
AS
20535sed 's/^/| /' conftest.$ac_ext >&5
20536
ca81d7a0 20537 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20538fi
ca81d7a0 20539
f053c89f 20540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20541 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20542LIBS=$ac_check_lib_save_LIBS
20543fi
ca81d7a0
JD
20544{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20545echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20546if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20547 cat >>confdefs.h <<_ACEOF
503d2be0 20548#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20549_ACEOF
a21616bd
KR
20550
20551 LIBS="-lk5crypto $LIBS"
20552
a21616bd
KR
20553fi
20554
c0d27fcc 20555
ca81d7a0
JD
20556{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20557echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20558if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20559 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20560else
503d2be0 20561 ac_check_lib_save_LIBS=$LIBS
a21616bd 20562LIBS="-lcrypto $LIBS"
503d2be0 20563cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20564/* confdefs.h. */
20565_ACEOF
20566cat confdefs.h >>conftest.$ac_ext
20567cat >>conftest.$ac_ext <<_ACEOF
20568/* end confdefs.h. */
503d2be0 20569
ca81d7a0
JD
20570/* Override any GCC internal prototype to avoid an error.
20571 Use char because int might match the return type of a GCC
20572 builtin and then its argument prototype would still apply. */
503d2be0
AS
20573#ifdef __cplusplus
20574extern "C"
20575#endif
503d2be0
AS
20576char mit_des_cbc_encrypt ();
20577int
20578main ()
20579{
ca81d7a0 20580return mit_des_cbc_encrypt ();
503d2be0
AS
20581 ;
20582 return 0;
20583}
20584_ACEOF
20585rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20586if { (ac_try="$ac_link"
20587case "(($ac_try" in
20588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589 *) ac_try_echo=$ac_try;;
20590esac
20591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20592 (eval "$ac_link") 2>conftest.er1
503d2be0 20593 ac_status=$?
edfaf76d
LK
20594 grep -v '^ *+' conftest.er1 >conftest.err
20595 rm -f conftest.er1
20596 cat conftest.err >&5
c0d27fcc 20597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20598 (exit $ac_status); } && {
20599 test -z "$ac_c_werror_flag" ||
20600 test ! -s conftest.err
20601 } && test -s conftest$ac_exeext &&
20602 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20603 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20604else
20605 echo "$as_me: failed program was:" >&5
19650fd6
AS
20606sed 's/^/| /' conftest.$ac_ext >&5
20607
ca81d7a0 20608 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20609fi
ca81d7a0 20610
f053c89f 20611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20612 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20613LIBS=$ac_check_lib_save_LIBS
20614fi
ca81d7a0
JD
20615{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20616echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20617if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20618 cat >>confdefs.h <<_ACEOF
503d2be0 20619#define HAVE_LIBCRYPTO 1
c0d27fcc 20620_ACEOF
a21616bd
KR
20621
20622 LIBS="-lcrypto $LIBS"
20623
a21616bd
KR
20624fi
20625
c0d27fcc 20626
ca81d7a0
JD
20627{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20628echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20629if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20630 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20631else
503d2be0 20632 ac_check_lib_save_LIBS=$LIBS
a21616bd 20633LIBS="-lkrb5 $LIBS"
503d2be0 20634cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20635/* confdefs.h. */
20636_ACEOF
20637cat confdefs.h >>conftest.$ac_ext
20638cat >>conftest.$ac_ext <<_ACEOF
20639/* end confdefs.h. */
a21616bd 20640
ca81d7a0
JD
20641/* Override any GCC internal prototype to avoid an error.
20642 Use char because int might match the return type of a GCC
20643 builtin and then its argument prototype would still apply. */
503d2be0
AS
20644#ifdef __cplusplus
20645extern "C"
20646#endif
503d2be0
AS
20647char krb5_init_context ();
20648int
20649main ()
20650{
ca81d7a0 20651return krb5_init_context ();
503d2be0
AS
20652 ;
20653 return 0;
20654}
20655_ACEOF
20656rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20657if { (ac_try="$ac_link"
20658case "(($ac_try" in
20659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20660 *) ac_try_echo=$ac_try;;
20661esac
20662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20663 (eval "$ac_link") 2>conftest.er1
503d2be0 20664 ac_status=$?
edfaf76d
LK
20665 grep -v '^ *+' conftest.er1 >conftest.err
20666 rm -f conftest.er1
20667 cat conftest.err >&5
c0d27fcc 20668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20669 (exit $ac_status); } && {
20670 test -z "$ac_c_werror_flag" ||
20671 test ! -s conftest.err
20672 } && test -s conftest$ac_exeext &&
20673 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20674 ac_cv_lib_krb5_krb5_init_context=yes
20675else
20676 echo "$as_me: failed program was:" >&5
19650fd6
AS
20677sed 's/^/| /' conftest.$ac_ext >&5
20678
ca81d7a0 20679 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20680fi
ca81d7a0 20681
f053c89f 20682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20683 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20684LIBS=$ac_check_lib_save_LIBS
20685fi
ca81d7a0
JD
20686{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20687echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20688if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20689 cat >>confdefs.h <<_ACEOF
503d2be0 20690#define HAVE_LIBKRB5 1
c0d27fcc 20691_ACEOF
a21616bd
KR
20692
20693 LIBS="-lkrb5 $LIBS"
20694
a21616bd
KR
20695fi
20696
ff1095d1 20697 if test "${with_kerberos5}" = no; then
503d2be0 20698
ca81d7a0
JD
20699{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20700echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20701if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20702 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20703else
503d2be0 20704 ac_check_lib_save_LIBS=$LIBS
a21616bd 20705LIBS="-ldes425 $LIBS"
503d2be0 20706cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20707/* confdefs.h. */
20708_ACEOF
20709cat confdefs.h >>conftest.$ac_ext
20710cat >>conftest.$ac_ext <<_ACEOF
20711/* end confdefs.h. */
503d2be0 20712
ca81d7a0
JD
20713/* Override any GCC internal prototype to avoid an error.
20714 Use char because int might match the return type of a GCC
20715 builtin and then its argument prototype would still apply. */
503d2be0
AS
20716#ifdef __cplusplus
20717extern "C"
20718#endif
503d2be0
AS
20719char des_cbc_encrypt ();
20720int
20721main ()
20722{
ca81d7a0 20723return des_cbc_encrypt ();
503d2be0
AS
20724 ;
20725 return 0;
20726}
20727_ACEOF
20728rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20729if { (ac_try="$ac_link"
20730case "(($ac_try" in
20731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20732 *) ac_try_echo=$ac_try;;
20733esac
20734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20735 (eval "$ac_link") 2>conftest.er1
503d2be0 20736 ac_status=$?
edfaf76d
LK
20737 grep -v '^ *+' conftest.er1 >conftest.err
20738 rm -f conftest.er1
20739 cat conftest.err >&5
c0d27fcc 20740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20741 (exit $ac_status); } && {
20742 test -z "$ac_c_werror_flag" ||
20743 test ! -s conftest.err
20744 } && test -s conftest$ac_exeext &&
20745 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20746 ac_cv_lib_des425_des_cbc_encrypt=yes
20747else
20748 echo "$as_me: failed program was:" >&5
19650fd6
AS
20749sed 's/^/| /' conftest.$ac_ext >&5
20750
ca81d7a0 20751 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20752fi
ca81d7a0 20753
f053c89f 20754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20755 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20756LIBS=$ac_check_lib_save_LIBS
20757fi
ca81d7a0
JD
20758{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20759echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20760if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20761 cat >>confdefs.h <<_ACEOF
503d2be0 20762#define HAVE_LIBDES425 1
c0d27fcc 20763_ACEOF
a21616bd
KR
20764
20765 LIBS="-ldes425 $LIBS"
20766
20767else
503d2be0 20768
ca81d7a0
JD
20769{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20770echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20771if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20772 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20773else
503d2be0 20774 ac_check_lib_save_LIBS=$LIBS
a21616bd 20775LIBS="-ldes $LIBS"
503d2be0 20776cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20777/* confdefs.h. */
20778_ACEOF
20779cat confdefs.h >>conftest.$ac_ext
20780cat >>conftest.$ac_ext <<_ACEOF
20781/* end confdefs.h. */
503d2be0 20782
ca81d7a0
JD
20783/* Override any GCC internal prototype to avoid an error.
20784 Use char because int might match the return type of a GCC
20785 builtin and then its argument prototype would still apply. */
503d2be0
AS
20786#ifdef __cplusplus
20787extern "C"
20788#endif
503d2be0
AS
20789char des_cbc_encrypt ();
20790int
20791main ()
20792{
ca81d7a0 20793return des_cbc_encrypt ();
503d2be0
AS
20794 ;
20795 return 0;
20796}
20797_ACEOF
20798rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20799if { (ac_try="$ac_link"
20800case "(($ac_try" in
20801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20802 *) ac_try_echo=$ac_try;;
20803esac
20804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20805 (eval "$ac_link") 2>conftest.er1
503d2be0 20806 ac_status=$?
edfaf76d
LK
20807 grep -v '^ *+' conftest.er1 >conftest.err
20808 rm -f conftest.er1
20809 cat conftest.err >&5
c0d27fcc 20810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20811 (exit $ac_status); } && {
20812 test -z "$ac_c_werror_flag" ||
20813 test ! -s conftest.err
20814 } && test -s conftest$ac_exeext &&
20815 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20816 ac_cv_lib_des_des_cbc_encrypt=yes
20817else
20818 echo "$as_me: failed program was:" >&5
19650fd6
AS
20819sed 's/^/| /' conftest.$ac_ext >&5
20820
ca81d7a0 20821 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20822fi
ca81d7a0 20823
f053c89f 20824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20825 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20826LIBS=$ac_check_lib_save_LIBS
20827fi
ca81d7a0
JD
20828{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20829echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20830if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20831 cat >>confdefs.h <<_ACEOF
503d2be0 20832#define HAVE_LIBDES 1
c0d27fcc 20833_ACEOF
a21616bd
KR
20834
20835 LIBS="-ldes $LIBS"
20836
a21616bd
KR
20837fi
20838
20839fi
20840
c0d27fcc 20841
ca81d7a0
JD
20842{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20843echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20844if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20845 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20846else
503d2be0 20847 ac_check_lib_save_LIBS=$LIBS
a21616bd 20848LIBS="-lkrb4 $LIBS"
503d2be0 20849cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20850/* confdefs.h. */
20851_ACEOF
20852cat confdefs.h >>conftest.$ac_ext
20853cat >>conftest.$ac_ext <<_ACEOF
20854/* end confdefs.h. */
503d2be0 20855
ca81d7a0
JD
20856/* Override any GCC internal prototype to avoid an error.
20857 Use char because int might match the return type of a GCC
20858 builtin and then its argument prototype would still apply. */
503d2be0
AS
20859#ifdef __cplusplus
20860extern "C"
20861#endif
503d2be0
AS
20862char krb_get_cred ();
20863int
20864main ()
20865{
f053c89f 20866return krb_get_cred ();
503d2be0
AS
20867 ;
20868 return 0;
20869}
20870_ACEOF
20871rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20872if { (ac_try="$ac_link"
20873case "(($ac_try" in
ca81d7a0
JD
20874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20875 *) ac_try_echo=$ac_try;;
20876esac
20877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20878 (eval "$ac_link") 2>conftest.er1
503d2be0 20879 ac_status=$?
edfaf76d
LK
20880 grep -v '^ *+' conftest.er1 >conftest.err
20881 rm -f conftest.er1
20882 cat conftest.err >&5
c0d27fcc 20883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20884 (exit $ac_status); } && {
20885 test -z "$ac_c_werror_flag" ||
20886 test ! -s conftest.err
20887 } && test -s conftest$ac_exeext &&
20888 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20889 ac_cv_lib_krb4_krb_get_cred=yes
20890else
20891 echo "$as_me: failed program was:" >&5
19650fd6
AS
20892sed 's/^/| /' conftest.$ac_ext >&5
20893
ca81d7a0 20894 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20895fi
ca81d7a0 20896
f053c89f 20897rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20898 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20899LIBS=$ac_check_lib_save_LIBS
20900fi
ca81d7a0
JD
20901{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20902echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20903if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20904 cat >>confdefs.h <<_ACEOF
503d2be0 20905#define HAVE_LIBKRB4 1
c0d27fcc 20906_ACEOF
a21616bd
KR
20907
20908 LIBS="-lkrb4 $LIBS"
20909
20910else
503d2be0 20911
ca81d7a0
JD
20912{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20913echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20914if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20915 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20916else
503d2be0 20917 ac_check_lib_save_LIBS=$LIBS
a21616bd 20918LIBS="-lkrb $LIBS"
503d2be0 20919cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20920/* confdefs.h. */
20921_ACEOF
20922cat confdefs.h >>conftest.$ac_ext
20923cat >>conftest.$ac_ext <<_ACEOF
20924/* end confdefs.h. */
503d2be0 20925
ca81d7a0
JD
20926/* Override any GCC internal prototype to avoid an error.
20927 Use char because int might match the return type of a GCC
20928 builtin and then its argument prototype would still apply. */
503d2be0
AS
20929#ifdef __cplusplus
20930extern "C"
20931#endif
503d2be0
AS
20932char krb_get_cred ();
20933int
20934main ()
20935{
ca81d7a0 20936return krb_get_cred ();
503d2be0
AS
20937 ;
20938 return 0;
20939}
20940_ACEOF
20941rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20942if { (ac_try="$ac_link"
20943case "(($ac_try" in
20944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945 *) ac_try_echo=$ac_try;;
20946esac
20947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20948 (eval "$ac_link") 2>conftest.er1
503d2be0 20949 ac_status=$?
edfaf76d
LK
20950 grep -v '^ *+' conftest.er1 >conftest.err
20951 rm -f conftest.er1
20952 cat conftest.err >&5
c0d27fcc 20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20954 (exit $ac_status); } && {
20955 test -z "$ac_c_werror_flag" ||
20956 test ! -s conftest.err
20957 } && test -s conftest$ac_exeext &&
20958 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20959 ac_cv_lib_krb_krb_get_cred=yes
20960else
20961 echo "$as_me: failed program was:" >&5
19650fd6
AS
20962sed 's/^/| /' conftest.$ac_ext >&5
20963
ca81d7a0 20964 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20965fi
ca81d7a0 20966
f053c89f 20967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20968 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20969LIBS=$ac_check_lib_save_LIBS
20970fi
ca81d7a0
JD
20971{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20972echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20973if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20974 cat >>confdefs.h <<_ACEOF
503d2be0 20975#define HAVE_LIBKRB 1
c0d27fcc 20976_ACEOF
a21616bd
KR
20977
20978 LIBS="-lkrb $LIBS"
20979
a21616bd
KR
20980fi
20981
20982fi
20983
20984 fi
20985
ff1095d1 20986 if test "${with_kerberos5}" != no; then
503d2be0
AS
20987
20988for ac_header in krb5.h
a21616bd 20989do
503d2be0 20990as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20991if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20992 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20994if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20995 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20996fi
ca81d7a0
JD
20997ac_res=`eval echo '${'$as_ac_Header'}'`
20998 { echo "$as_me:$LINENO: result: $ac_res" >&5
20999echo "${ECHO_T}$ac_res" >&6; }
98418dba 21000else
c0d27fcc 21001 # Is the header compilable?
ca81d7a0
JD
21002{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21003echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21004cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21005/* confdefs.h. */
21006_ACEOF
21007cat confdefs.h >>conftest.$ac_ext
21008cat >>conftest.$ac_ext <<_ACEOF
21009/* end confdefs.h. */
c0d27fcc
MR
21010$ac_includes_default
21011#include <$ac_header>
21012_ACEOF
21013rm -f conftest.$ac_objext
ca81d7a0
JD
21014if { (ac_try="$ac_compile"
21015case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
21019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21020 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21021 ac_status=$?
edfaf76d
LK
21022 grep -v '^ *+' conftest.er1 >conftest.err
21023 rm -f conftest.er1
21024 cat conftest.err >&5
c0d27fcc 21025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21026 (exit $ac_status); } && {
21027 test -z "$ac_c_werror_flag" ||
21028 test ! -s conftest.err
21029 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21030 ac_header_compiler=yes
21031else
21032 echo "$as_me: failed program was:" >&5
19650fd6
AS
21033sed 's/^/| /' conftest.$ac_ext >&5
21034
ca81d7a0 21035 ac_header_compiler=no
c0d27fcc 21036fi
ca81d7a0
JD
21037
21038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21039{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21040echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21041
21042# Is the header present?
ca81d7a0
JD
21043{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21044echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21045cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21046/* confdefs.h. */
21047_ACEOF
21048cat confdefs.h >>conftest.$ac_ext
21049cat >>conftest.$ac_ext <<_ACEOF
21050/* end confdefs.h. */
503d2be0
AS
21051#include <$ac_header>
21052_ACEOF
ca81d7a0
JD
21053if { (ac_try="$ac_cpp conftest.$ac_ext"
21054case "(($ac_try" in
21055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21056 *) ac_try_echo=$ac_try;;
21057esac
21058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21059 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21060 ac_status=$?
6bae0ccf 21061 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21062 rm -f conftest.er1
21063 cat conftest.err >&5
c0d27fcc 21064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21065 (exit $ac_status); } >/dev/null && {
21066 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21067 test ! -s conftest.err
21068 }; then
c0d27fcc 21069 ac_header_preproc=yes
503d2be0
AS
21070else
21071 echo "$as_me: failed program was:" >&5
19650fd6
AS
21072sed 's/^/| /' conftest.$ac_ext >&5
21073
c0d27fcc 21074 ac_header_preproc=no
a21616bd 21075fi
ca81d7a0 21076
503d2be0 21077rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21078{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21079echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21080
21081# So? What about this header?
edfaf76d
LK
21082case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21083 yes:no: )
c0d27fcc
MR
21084 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21085echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21086 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21087echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21088 ac_header_preproc=yes
19650fd6 21089 ;;
edfaf76d 21090 no:yes:* )
c0d27fcc
MR
21091 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21092echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21093 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21094echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21095 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21096echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21097 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21098echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21099 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21100echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21101 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21102echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21103
19650fd6 21104 ;;
c0d27fcc 21105esac
ca81d7a0
JD
21106{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21107echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21108if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21109 echo $ECHO_N "(cached) $ECHO_C" >&6
21110else
edfaf76d 21111 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21112fi
ca81d7a0
JD
21113ac_res=`eval echo '${'$as_ac_Header'}'`
21114 { echo "$as_me:$LINENO: result: $ac_res" >&5
21115echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21116
21117fi
503d2be0 21118if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21119 cat >>confdefs.h <<_ACEOF
503d2be0 21120#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21121_ACEOF
21287a21
CY
21122 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21123echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21124if test "${ac_cv_member_krb5_error_text+set}" = set; then
21125 echo $ECHO_N "(cached) $ECHO_C" >&6
21126else
21127 cat >conftest.$ac_ext <<_ACEOF
21128/* confdefs.h. */
21129_ACEOF
21130cat confdefs.h >>conftest.$ac_ext
21131cat >>conftest.$ac_ext <<_ACEOF
21132/* end confdefs.h. */
21133#include <krb5.h>
21134
21135int
21136main ()
21137{
21138static krb5_error ac_aggr;
21139if (ac_aggr.text)
21140return 0;
21141 ;
21142 return 0;
21143}
21144_ACEOF
21145rm -f conftest.$ac_objext
21146if { (ac_try="$ac_compile"
21147case "(($ac_try" in
21148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21149 *) ac_try_echo=$ac_try;;
21150esac
21151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21152 (eval "$ac_compile") 2>conftest.er1
21153 ac_status=$?
21154 grep -v '^ *+' conftest.er1 >conftest.err
21155 rm -f conftest.er1
21156 cat conftest.err >&5
21157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21158 (exit $ac_status); } && {
21159 test -z "$ac_c_werror_flag" ||
21160 test ! -s conftest.err
21161 } && test -s conftest.$ac_objext; then
21162 ac_cv_member_krb5_error_text=yes
21163else
21164 echo "$as_me: failed program was:" >&5
21165sed 's/^/| /' conftest.$ac_ext >&5
21166
21167 cat >conftest.$ac_ext <<_ACEOF
21168/* confdefs.h. */
21169_ACEOF
21170cat confdefs.h >>conftest.$ac_ext
21171cat >>conftest.$ac_ext <<_ACEOF
21172/* end confdefs.h. */
21173#include <krb5.h>
21174
21175int
21176main ()
21177{
21178static krb5_error ac_aggr;
21179if (sizeof ac_aggr.text)
21180return 0;
21181 ;
21182 return 0;
21183}
21184_ACEOF
21185rm -f conftest.$ac_objext
21186if { (ac_try="$ac_compile"
21187case "(($ac_try" in
21188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21189 *) ac_try_echo=$ac_try;;
21190esac
21191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21192 (eval "$ac_compile") 2>conftest.er1
21193 ac_status=$?
21194 grep -v '^ *+' conftest.er1 >conftest.err
21195 rm -f conftest.er1
21196 cat conftest.err >&5
21197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21198 (exit $ac_status); } && {
21199 test -z "$ac_c_werror_flag" ||
21200 test ! -s conftest.err
21201 } && test -s conftest.$ac_objext; then
21202 ac_cv_member_krb5_error_text=yes
21203else
21204 echo "$as_me: failed program was:" >&5
21205sed 's/^/| /' conftest.$ac_ext >&5
21206
21207 ac_cv_member_krb5_error_text=no
21208fi
21209
21210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21211fi
21212
21213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21214fi
21215{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21216echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
21217if test $ac_cv_member_krb5_error_text = yes; then
21218
21219cat >>confdefs.h <<_ACEOF
21220#define HAVE_KRB5_ERROR_TEXT 1
21221_ACEOF
21222
21223
21224fi
21225{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21226echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21227if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
21228 echo $ECHO_N "(cached) $ECHO_C" >&6
21229else
21230 cat >conftest.$ac_ext <<_ACEOF
21231/* confdefs.h. */
21232_ACEOF
21233cat confdefs.h >>conftest.$ac_ext
21234cat >>conftest.$ac_ext <<_ACEOF
21235/* end confdefs.h. */
21236#include <krb5.h>
21237
21238int
21239main ()
21240{
21241static krb5_error ac_aggr;
21242if (ac_aggr.e_text)
21243return 0;
21244 ;
21245 return 0;
21246}
21247_ACEOF
21248rm -f conftest.$ac_objext
21249if { (ac_try="$ac_compile"
21250case "(($ac_try" in
21251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21252 *) ac_try_echo=$ac_try;;
21253esac
21254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21255 (eval "$ac_compile") 2>conftest.er1
21256 ac_status=$?
21257 grep -v '^ *+' conftest.er1 >conftest.err
21258 rm -f conftest.er1
21259 cat conftest.err >&5
21260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21261 (exit $ac_status); } && {
21262 test -z "$ac_c_werror_flag" ||
21263 test ! -s conftest.err
21264 } && test -s conftest.$ac_objext; then
21265 ac_cv_member_krb5_error_e_text=yes
21266else
21267 echo "$as_me: failed program was:" >&5
21268sed 's/^/| /' conftest.$ac_ext >&5
21269
21270 cat >conftest.$ac_ext <<_ACEOF
21271/* confdefs.h. */
21272_ACEOF
21273cat confdefs.h >>conftest.$ac_ext
21274cat >>conftest.$ac_ext <<_ACEOF
21275/* end confdefs.h. */
21276#include <krb5.h>
21277
21278int
21279main ()
21280{
21281static krb5_error ac_aggr;
21282if (sizeof ac_aggr.e_text)
21283return 0;
21284 ;
21285 return 0;
21286}
21287_ACEOF
21288rm -f conftest.$ac_objext
21289if { (ac_try="$ac_compile"
21290case "(($ac_try" in
21291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21292 *) ac_try_echo=$ac_try;;
21293esac
21294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21295 (eval "$ac_compile") 2>conftest.er1
21296 ac_status=$?
21297 grep -v '^ *+' conftest.er1 >conftest.err
21298 rm -f conftest.er1
21299 cat conftest.err >&5
21300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21301 (exit $ac_status); } && {
21302 test -z "$ac_c_werror_flag" ||
21303 test ! -s conftest.err
21304 } && test -s conftest.$ac_objext; then
21305 ac_cv_member_krb5_error_e_text=yes
21306else
21307 echo "$as_me: failed program was:" >&5
21308sed 's/^/| /' conftest.$ac_ext >&5
21309
21310 ac_cv_member_krb5_error_e_text=no
21311fi
21312
21313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21314fi
21315
21316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21317fi
21318{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21319echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
21320if test $ac_cv_member_krb5_error_e_text = yes; then
21321
21322cat >>confdefs.h <<_ACEOF
21323#define HAVE_KRB5_ERROR_E_TEXT 1
21324_ACEOF
21325
21326
21327fi
503d2be0 21328
a21616bd 21329fi
c0d27fcc 21330
a21616bd
KR
21331done
21332
21333 else
503d2be0
AS
21334
21335for ac_header in des.h
a21616bd 21336do
503d2be0 21337as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21338if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21339 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21340echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21341if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21342 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21343fi
ca81d7a0
JD
21344ac_res=`eval echo '${'$as_ac_Header'}'`
21345 { echo "$as_me:$LINENO: result: $ac_res" >&5
21346echo "${ECHO_T}$ac_res" >&6; }
98418dba 21347else
c0d27fcc 21348 # Is the header compilable?
ca81d7a0
JD
21349{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21350echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21351cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21352/* confdefs.h. */
21353_ACEOF
21354cat confdefs.h >>conftest.$ac_ext
21355cat >>conftest.$ac_ext <<_ACEOF
21356/* end confdefs.h. */
c0d27fcc
MR
21357$ac_includes_default
21358#include <$ac_header>
21359_ACEOF
21360rm -f conftest.$ac_objext
ca81d7a0
JD
21361if { (ac_try="$ac_compile"
21362case "(($ac_try" in
21363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21364 *) ac_try_echo=$ac_try;;
21365esac
21366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21367 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21368 ac_status=$?
edfaf76d
LK
21369 grep -v '^ *+' conftest.er1 >conftest.err
21370 rm -f conftest.er1
21371 cat conftest.err >&5
c0d27fcc 21372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21373 (exit $ac_status); } && {
21374 test -z "$ac_c_werror_flag" ||
21375 test ! -s conftest.err
21376 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21377 ac_header_compiler=yes
21378else
21379 echo "$as_me: failed program was:" >&5
19650fd6
AS
21380sed 's/^/| /' conftest.$ac_ext >&5
21381
ca81d7a0 21382 ac_header_compiler=no
c0d27fcc 21383fi
ca81d7a0
JD
21384
21385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21386{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21387echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21388
21389# Is the header present?
ca81d7a0
JD
21390{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21391echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21392cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
503d2be0
AS
21398#include <$ac_header>
21399_ACEOF
ca81d7a0
JD
21400if { (ac_try="$ac_cpp conftest.$ac_ext"
21401case "(($ac_try" in
21402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21403 *) ac_try_echo=$ac_try;;
21404esac
21405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21406 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21407 ac_status=$?
6bae0ccf 21408 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21409 rm -f conftest.er1
21410 cat conftest.err >&5
c0d27fcc 21411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21412 (exit $ac_status); } >/dev/null && {
21413 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21414 test ! -s conftest.err
21415 }; then
c0d27fcc 21416 ac_header_preproc=yes
503d2be0
AS
21417else
21418 echo "$as_me: failed program was:" >&5
19650fd6
AS
21419sed 's/^/| /' conftest.$ac_ext >&5
21420
c0d27fcc 21421 ac_header_preproc=no
a21616bd 21422fi
ca81d7a0 21423
503d2be0 21424rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21425{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21426echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21427
21428# So? What about this header?
edfaf76d
LK
21429case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21430 yes:no: )
c0d27fcc
MR
21431 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21432echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21433 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21434echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21435 ac_header_preproc=yes
19650fd6 21436 ;;
edfaf76d 21437 no:yes:* )
c0d27fcc
MR
21438 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21439echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21440 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21441echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21442 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21443echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21444 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21445echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21447echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21448 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21449echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21450
19650fd6 21451 ;;
c0d27fcc 21452esac
ca81d7a0
JD
21453{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21454echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21455if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21456 echo $ECHO_N "(cached) $ECHO_C" >&6
21457else
edfaf76d 21458 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21459fi
ca81d7a0
JD
21460ac_res=`eval echo '${'$as_ac_Header'}'`
21461 { echo "$as_me:$LINENO: result: $ac_res" >&5
21462echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21463
21464fi
503d2be0 21465if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21466 cat >>confdefs.h <<_ACEOF
503d2be0 21467#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21468_ACEOF
503d2be0 21469
a21616bd 21470else
503d2be0
AS
21471
21472for ac_header in kerberosIV/des.h
a21616bd 21473do
503d2be0 21474as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21476 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21479 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21480fi
ca81d7a0
JD
21481ac_res=`eval echo '${'$as_ac_Header'}'`
21482 { echo "$as_me:$LINENO: result: $ac_res" >&5
21483echo "${ECHO_T}$ac_res" >&6; }
98418dba 21484else
c0d27fcc 21485 # Is the header compilable?
ca81d7a0
JD
21486{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21487echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21488cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21489/* confdefs.h. */
21490_ACEOF
21491cat confdefs.h >>conftest.$ac_ext
21492cat >>conftest.$ac_ext <<_ACEOF
21493/* end confdefs.h. */
c0d27fcc
MR
21494$ac_includes_default
21495#include <$ac_header>
21496_ACEOF
21497rm -f conftest.$ac_objext
ca81d7a0
JD
21498if { (ac_try="$ac_compile"
21499case "(($ac_try" in
21500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21501 *) ac_try_echo=$ac_try;;
21502esac
21503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21504 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21505 ac_status=$?
edfaf76d
LK
21506 grep -v '^ *+' conftest.er1 >conftest.err
21507 rm -f conftest.er1
21508 cat conftest.err >&5
c0d27fcc 21509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21510 (exit $ac_status); } && {
21511 test -z "$ac_c_werror_flag" ||
21512 test ! -s conftest.err
21513 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21514 ac_header_compiler=yes
21515else
21516 echo "$as_me: failed program was:" >&5
19650fd6
AS
21517sed 's/^/| /' conftest.$ac_ext >&5
21518
ca81d7a0 21519 ac_header_compiler=no
c0d27fcc 21520fi
ca81d7a0
JD
21521
21522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21523{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21524echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21525
21526# Is the header present?
ca81d7a0
JD
21527{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21528echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21530/* confdefs.h. */
21531_ACEOF
21532cat confdefs.h >>conftest.$ac_ext
21533cat >>conftest.$ac_ext <<_ACEOF
21534/* end confdefs.h. */
503d2be0
AS
21535#include <$ac_header>
21536_ACEOF
ca81d7a0
JD
21537if { (ac_try="$ac_cpp conftest.$ac_ext"
21538case "(($ac_try" in
21539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21540 *) ac_try_echo=$ac_try;;
21541esac
21542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21543 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21544 ac_status=$?
6bae0ccf 21545 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21546 rm -f conftest.er1
21547 cat conftest.err >&5
c0d27fcc 21548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21549 (exit $ac_status); } >/dev/null && {
21550 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21551 test ! -s conftest.err
21552 }; then
c0d27fcc 21553 ac_header_preproc=yes
503d2be0
AS
21554else
21555 echo "$as_me: failed program was:" >&5
19650fd6
AS
21556sed 's/^/| /' conftest.$ac_ext >&5
21557
c0d27fcc 21558 ac_header_preproc=no
a21616bd 21559fi
ca81d7a0 21560
503d2be0 21561rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21562{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21563echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21564
21565# So? What about this header?
edfaf76d
LK
21566case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21567 yes:no: )
c0d27fcc
MR
21568 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21569echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21570 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21571echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21572 ac_header_preproc=yes
19650fd6 21573 ;;
edfaf76d 21574 no:yes:* )
c0d27fcc
MR
21575 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21576echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21577 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21578echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21579 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21580echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21581 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21582echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21583 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21584echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21585 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21586echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21587
19650fd6 21588 ;;
c0d27fcc 21589esac
ca81d7a0
JD
21590{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21591echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21592if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21593 echo $ECHO_N "(cached) $ECHO_C" >&6
21594else
edfaf76d 21595 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21596fi
ca81d7a0
JD
21597ac_res=`eval echo '${'$as_ac_Header'}'`
21598 { echo "$as_me:$LINENO: result: $ac_res" >&5
21599echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21600
21601fi
503d2be0 21602if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21603 cat >>confdefs.h <<_ACEOF
503d2be0 21604#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21605_ACEOF
503d2be0 21606
a21616bd 21607else
503d2be0
AS
21608
21609for ac_header in kerberos/des.h
a21616bd 21610do
503d2be0 21611as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21612if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21613 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21615if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21616 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21617fi
ca81d7a0
JD
21618ac_res=`eval echo '${'$as_ac_Header'}'`
21619 { echo "$as_me:$LINENO: result: $ac_res" >&5
21620echo "${ECHO_T}$ac_res" >&6; }
98418dba 21621else
c0d27fcc 21622 # Is the header compilable?
ca81d7a0
JD
21623{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21624echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21625cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21626/* confdefs.h. */
21627_ACEOF
21628cat confdefs.h >>conftest.$ac_ext
21629cat >>conftest.$ac_ext <<_ACEOF
21630/* end confdefs.h. */
c0d27fcc
MR
21631$ac_includes_default
21632#include <$ac_header>
21633_ACEOF
21634rm -f conftest.$ac_objext
ca81d7a0
JD
21635if { (ac_try="$ac_compile"
21636case "(($ac_try" in
21637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21638 *) ac_try_echo=$ac_try;;
21639esac
21640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21641 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21642 ac_status=$?
edfaf76d
LK
21643 grep -v '^ *+' conftest.er1 >conftest.err
21644 rm -f conftest.er1
21645 cat conftest.err >&5
c0d27fcc 21646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21647 (exit $ac_status); } && {
21648 test -z "$ac_c_werror_flag" ||
21649 test ! -s conftest.err
21650 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21651 ac_header_compiler=yes
21652else
21653 echo "$as_me: failed program was:" >&5
19650fd6
AS
21654sed 's/^/| /' conftest.$ac_ext >&5
21655
ca81d7a0 21656 ac_header_compiler=no
c0d27fcc 21657fi
ca81d7a0
JD
21658
21659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21660{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21661echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21662
21663# Is the header present?
ca81d7a0
JD
21664{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21665echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21666cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21667/* confdefs.h. */
21668_ACEOF
21669cat confdefs.h >>conftest.$ac_ext
21670cat >>conftest.$ac_ext <<_ACEOF
21671/* end confdefs.h. */
503d2be0
AS
21672#include <$ac_header>
21673_ACEOF
ca81d7a0
JD
21674if { (ac_try="$ac_cpp conftest.$ac_ext"
21675case "(($ac_try" in
21676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21677 *) ac_try_echo=$ac_try;;
21678esac
21679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21681 ac_status=$?
6bae0ccf 21682 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21683 rm -f conftest.er1
21684 cat conftest.err >&5
c0d27fcc 21685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21686 (exit $ac_status); } >/dev/null && {
21687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21688 test ! -s conftest.err
21689 }; then
c0d27fcc 21690 ac_header_preproc=yes
503d2be0
AS
21691else
21692 echo "$as_me: failed program was:" >&5
19650fd6
AS
21693sed 's/^/| /' conftest.$ac_ext >&5
21694
c0d27fcc 21695 ac_header_preproc=no
a21616bd 21696fi
ca81d7a0 21697
503d2be0 21698rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21699{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21700echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21701
21702# So? What about this header?
edfaf76d
LK
21703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21704 yes:no: )
c0d27fcc
MR
21705 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21706echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21708echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21709 ac_header_preproc=yes
19650fd6 21710 ;;
edfaf76d 21711 no:yes:* )
c0d27fcc
MR
21712 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21713echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21714 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21715echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21716 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21717echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21718 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21719echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21720 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21721echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21722 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21723echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21724
19650fd6 21725 ;;
c0d27fcc 21726esac
ca81d7a0
JD
21727{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21729if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21730 echo $ECHO_N "(cached) $ECHO_C" >&6
21731else
edfaf76d 21732 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21733fi
ca81d7a0
JD
21734ac_res=`eval echo '${'$as_ac_Header'}'`
21735 { echo "$as_me:$LINENO: result: $ac_res" >&5
21736echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21737
21738fi
503d2be0 21739if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21740 cat >>confdefs.h <<_ACEOF
503d2be0 21741#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21742_ACEOF
a21616bd
KR
21743
21744fi
c0d27fcc 21745
a21616bd
KR
21746done
21747
98418dba 21748fi
c0d27fcc 21749
925c2f3f
EZ
21750done
21751
98418dba 21752fi
c0d27fcc 21753
925c2f3f 21754done
98418dba 21755
c0d27fcc 21756
925c2f3f
EZ
21757for ac_header in krb.h
21758do
21759as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21760if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21761 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21763if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21764 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21765fi
ca81d7a0
JD
21766ac_res=`eval echo '${'$as_ac_Header'}'`
21767 { echo "$as_me:$LINENO: result: $ac_res" >&5
21768echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21769else
21770 # Is the header compilable?
ca81d7a0
JD
21771{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21772echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21773cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21774/* confdefs.h. */
21775_ACEOF
21776cat confdefs.h >>conftest.$ac_ext
21777cat >>conftest.$ac_ext <<_ACEOF
21778/* end confdefs.h. */
c0d27fcc
MR
21779$ac_includes_default
21780#include <$ac_header>
21781_ACEOF
21782rm -f conftest.$ac_objext
ca81d7a0
JD
21783if { (ac_try="$ac_compile"
21784case "(($ac_try" in
21785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21786 *) ac_try_echo=$ac_try;;
21787esac
21788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21789 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21790 ac_status=$?
edfaf76d
LK
21791 grep -v '^ *+' conftest.er1 >conftest.err
21792 rm -f conftest.er1
21793 cat conftest.err >&5
c0d27fcc 21794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21795 (exit $ac_status); } && {
21796 test -z "$ac_c_werror_flag" ||
21797 test ! -s conftest.err
21798 } && test -s conftest.$ac_objext; then
c0d27fcc 21799 ac_header_compiler=yes
925c2f3f 21800else
c0d27fcc 21801 echo "$as_me: failed program was:" >&5
19650fd6
AS
21802sed 's/^/| /' conftest.$ac_ext >&5
21803
ca81d7a0 21804 ac_header_compiler=no
c0d27fcc 21805fi
ca81d7a0
JD
21806
21807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21808{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21809echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21810
21811# Is the header present?
ca81d7a0
JD
21812{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21813echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21814cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21815/* confdefs.h. */
21816_ACEOF
21817cat confdefs.h >>conftest.$ac_ext
21818cat >>conftest.$ac_ext <<_ACEOF
21819/* end confdefs.h. */
503d2be0
AS
21820#include <$ac_header>
21821_ACEOF
ca81d7a0
JD
21822if { (ac_try="$ac_cpp conftest.$ac_ext"
21823case "(($ac_try" in
21824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825 *) ac_try_echo=$ac_try;;
21826esac
21827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21828 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21829 ac_status=$?
6bae0ccf 21830 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21831 rm -f conftest.er1
21832 cat conftest.err >&5
c0d27fcc 21833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21834 (exit $ac_status); } >/dev/null && {
21835 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21836 test ! -s conftest.err
21837 }; then
c0d27fcc 21838 ac_header_preproc=yes
503d2be0
AS
21839else
21840 echo "$as_me: failed program was:" >&5
19650fd6
AS
21841sed 's/^/| /' conftest.$ac_ext >&5
21842
c0d27fcc 21843 ac_header_preproc=no
a21616bd 21844fi
ca81d7a0 21845
503d2be0 21846rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21847{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21848echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21849
21850# So? What about this header?
edfaf76d
LK
21851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21852 yes:no: )
c0d27fcc
MR
21853 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21854echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21855 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21856echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21857 ac_header_preproc=yes
19650fd6 21858 ;;
edfaf76d 21859 no:yes:* )
c0d27fcc
MR
21860 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21861echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21862 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21863echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21864 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21865echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21866 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21867echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21868 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21869echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21870 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21871echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21872
19650fd6 21873 ;;
c0d27fcc 21874esac
ca81d7a0
JD
21875{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21877if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21878 echo $ECHO_N "(cached) $ECHO_C" >&6
21879else
edfaf76d 21880 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21881fi
ca81d7a0
JD
21882ac_res=`eval echo '${'$as_ac_Header'}'`
21883 { echo "$as_me:$LINENO: result: $ac_res" >&5
21884echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21885
21886fi
503d2be0 21887if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21888 cat >>confdefs.h <<_ACEOF
503d2be0 21889#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21890_ACEOF
503d2be0 21891
a21616bd 21892else
503d2be0
AS
21893
21894for ac_header in kerberosIV/krb.h
a21616bd 21895do
503d2be0 21896as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21897if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21898 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21899echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21900if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21901 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21902fi
ca81d7a0
JD
21903ac_res=`eval echo '${'$as_ac_Header'}'`
21904 { echo "$as_me:$LINENO: result: $ac_res" >&5
21905echo "${ECHO_T}$ac_res" >&6; }
98418dba 21906else
c0d27fcc 21907 # Is the header compilable?
ca81d7a0
JD
21908{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21909echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21910cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21911/* confdefs.h. */
21912_ACEOF
21913cat confdefs.h >>conftest.$ac_ext
21914cat >>conftest.$ac_ext <<_ACEOF
21915/* end confdefs.h. */
c0d27fcc
MR
21916$ac_includes_default
21917#include <$ac_header>
21918_ACEOF
21919rm -f conftest.$ac_objext
ca81d7a0
JD
21920if { (ac_try="$ac_compile"
21921case "(($ac_try" in
21922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21923 *) ac_try_echo=$ac_try;;
21924esac
21925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21926 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21927 ac_status=$?
edfaf76d
LK
21928 grep -v '^ *+' conftest.er1 >conftest.err
21929 rm -f conftest.er1
21930 cat conftest.err >&5
c0d27fcc 21931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21932 (exit $ac_status); } && {
21933 test -z "$ac_c_werror_flag" ||
21934 test ! -s conftest.err
21935 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21936 ac_header_compiler=yes
21937else
21938 echo "$as_me: failed program was:" >&5
19650fd6
AS
21939sed 's/^/| /' conftest.$ac_ext >&5
21940
ca81d7a0 21941 ac_header_compiler=no
c0d27fcc 21942fi
ca81d7a0
JD
21943
21944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21945{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21946echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21947
21948# Is the header present?
ca81d7a0
JD
21949{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21950echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21951cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21952/* confdefs.h. */
21953_ACEOF
21954cat confdefs.h >>conftest.$ac_ext
21955cat >>conftest.$ac_ext <<_ACEOF
21956/* end confdefs.h. */
503d2be0
AS
21957#include <$ac_header>
21958_ACEOF
ca81d7a0
JD
21959if { (ac_try="$ac_cpp conftest.$ac_ext"
21960case "(($ac_try" in
21961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21962 *) ac_try_echo=$ac_try;;
21963esac
21964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21965 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21966 ac_status=$?
6bae0ccf 21967 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21968 rm -f conftest.er1
21969 cat conftest.err >&5
c0d27fcc 21970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21971 (exit $ac_status); } >/dev/null && {
21972 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21973 test ! -s conftest.err
21974 }; then
c0d27fcc 21975 ac_header_preproc=yes
503d2be0
AS
21976else
21977 echo "$as_me: failed program was:" >&5
19650fd6
AS
21978sed 's/^/| /' conftest.$ac_ext >&5
21979
c0d27fcc 21980 ac_header_preproc=no
a21616bd 21981fi
ca81d7a0 21982
503d2be0 21983rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21984{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21985echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21986
21987# So? What about this header?
edfaf76d
LK
21988case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21989 yes:no: )
c0d27fcc
MR
21990 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21991echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21992 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21993echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21994 ac_header_preproc=yes
19650fd6 21995 ;;
edfaf76d 21996 no:yes:* )
c0d27fcc
MR
21997 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21998echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21999 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22000echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22001 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22002echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22003 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22004echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22005 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22006echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22007 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22008echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22009
19650fd6 22010 ;;
c0d27fcc 22011esac
ca81d7a0
JD
22012{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22013echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22014if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22015 echo $ECHO_N "(cached) $ECHO_C" >&6
22016else
edfaf76d 22017 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22018fi
ca81d7a0
JD
22019ac_res=`eval echo '${'$as_ac_Header'}'`
22020 { echo "$as_me:$LINENO: result: $ac_res" >&5
22021echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22022
22023fi
503d2be0 22024if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22025 cat >>confdefs.h <<_ACEOF
503d2be0 22026#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22027_ACEOF
503d2be0 22028
a21616bd 22029else
503d2be0
AS
22030
22031for ac_header in kerberos/krb.h
a21616bd 22032do
503d2be0 22033as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22034if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22035 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22036echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22037if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22038 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22039fi
ca81d7a0
JD
22040ac_res=`eval echo '${'$as_ac_Header'}'`
22041 { echo "$as_me:$LINENO: result: $ac_res" >&5
22042echo "${ECHO_T}$ac_res" >&6; }
98418dba 22043else
c0d27fcc 22044 # Is the header compilable?
ca81d7a0
JD
22045{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22046echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22047cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22048/* confdefs.h. */
22049_ACEOF
22050cat confdefs.h >>conftest.$ac_ext
22051cat >>conftest.$ac_ext <<_ACEOF
22052/* end confdefs.h. */
c0d27fcc
MR
22053$ac_includes_default
22054#include <$ac_header>
22055_ACEOF
22056rm -f conftest.$ac_objext
ca81d7a0
JD
22057if { (ac_try="$ac_compile"
22058case "(($ac_try" in
22059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22060 *) ac_try_echo=$ac_try;;
22061esac
22062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22063 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22064 ac_status=$?
edfaf76d
LK
22065 grep -v '^ *+' conftest.er1 >conftest.err
22066 rm -f conftest.er1
22067 cat conftest.err >&5
c0d27fcc 22068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22069 (exit $ac_status); } && {
22070 test -z "$ac_c_werror_flag" ||
22071 test ! -s conftest.err
22072 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22073 ac_header_compiler=yes
22074else
22075 echo "$as_me: failed program was:" >&5
19650fd6
AS
22076sed 's/^/| /' conftest.$ac_ext >&5
22077
ca81d7a0 22078 ac_header_compiler=no
c0d27fcc 22079fi
ca81d7a0
JD
22080
22081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22082{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22083echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22084
22085# Is the header present?
ca81d7a0
JD
22086{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22087echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22088cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22089/* confdefs.h. */
22090_ACEOF
22091cat confdefs.h >>conftest.$ac_ext
22092cat >>conftest.$ac_ext <<_ACEOF
22093/* end confdefs.h. */
503d2be0
AS
22094#include <$ac_header>
22095_ACEOF
ca81d7a0
JD
22096if { (ac_try="$ac_cpp conftest.$ac_ext"
22097case "(($ac_try" in
22098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22099 *) ac_try_echo=$ac_try;;
22100esac
22101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22102 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22103 ac_status=$?
6bae0ccf 22104 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22105 rm -f conftest.er1
22106 cat conftest.err >&5
c0d27fcc 22107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22108 (exit $ac_status); } >/dev/null && {
22109 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22110 test ! -s conftest.err
22111 }; then
c0d27fcc 22112 ac_header_preproc=yes
503d2be0
AS
22113else
22114 echo "$as_me: failed program was:" >&5
19650fd6
AS
22115sed 's/^/| /' conftest.$ac_ext >&5
22116
c0d27fcc 22117 ac_header_preproc=no
a21616bd 22118fi
ca81d7a0 22119
503d2be0 22120rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22121{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22122echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22123
22124# So? What about this header?
edfaf76d
LK
22125case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22126 yes:no: )
35996d22
AS
22127 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22128echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22129 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22130echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22131 ac_header_preproc=yes
19650fd6 22132 ;;
edfaf76d 22133 no:yes:* )
c0d27fcc
MR
22134 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22135echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22136 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22137echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22138 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22139echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22140 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22141echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22142 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22143echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22144 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22145echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22146
19650fd6 22147 ;;
c0d27fcc 22148esac
ca81d7a0
JD
22149{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22150echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22151if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22152 echo $ECHO_N "(cached) $ECHO_C" >&6
22153else
edfaf76d 22154 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22155fi
ca81d7a0
JD
22156ac_res=`eval echo '${'$as_ac_Header'}'`
22157 { echo "$as_me:$LINENO: result: $ac_res" >&5
22158echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22159
22160fi
503d2be0 22161if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22162 cat >>confdefs.h <<_ACEOF
503d2be0 22163#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22164_ACEOF
503d2be0 22165
a21616bd 22166fi
c0d27fcc 22167
a21616bd
KR
22168done
22169
22170fi
c0d27fcc 22171
a21616bd
KR
22172done
22173
22174fi
c0d27fcc 22175
a21616bd
KR
22176done
22177
22178 fi
503d2be0
AS
22179
22180for ac_header in com_err.h
a21616bd 22181do
503d2be0 22182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22183if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22184 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22186if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22187 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22188fi
ca81d7a0
JD
22189ac_res=`eval echo '${'$as_ac_Header'}'`
22190 { echo "$as_me:$LINENO: result: $ac_res" >&5
22191echo "${ECHO_T}$ac_res" >&6; }
98418dba 22192else
c0d27fcc 22193 # Is the header compilable?
ca81d7a0
JD
22194{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22195echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22197/* confdefs.h. */
22198_ACEOF
22199cat confdefs.h >>conftest.$ac_ext
22200cat >>conftest.$ac_ext <<_ACEOF
22201/* end confdefs.h. */
c0d27fcc
MR
22202$ac_includes_default
22203#include <$ac_header>
22204_ACEOF
22205rm -f conftest.$ac_objext
ca81d7a0
JD
22206if { (ac_try="$ac_compile"
22207case "(($ac_try" in
22208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22209 *) ac_try_echo=$ac_try;;
22210esac
22211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22212 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22213 ac_status=$?
22214 grep -v '^ *+' conftest.er1 >conftest.err
22215 rm -f conftest.er1
22216 cat conftest.err >&5
22217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22218 (exit $ac_status); } && {
22219 test -z "$ac_c_werror_flag" ||
22220 test ! -s conftest.err
22221 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22222 ac_header_compiler=yes
22223else
22224 echo "$as_me: failed program was:" >&5
19650fd6
AS
22225sed 's/^/| /' conftest.$ac_ext >&5
22226
ca81d7a0 22227 ac_header_compiler=no
c0d27fcc 22228fi
ca81d7a0
JD
22229
22230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22231{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22232echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22233
22234# Is the header present?
ca81d7a0
JD
22235{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22236echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22238/* confdefs.h. */
22239_ACEOF
22240cat confdefs.h >>conftest.$ac_ext
22241cat >>conftest.$ac_ext <<_ACEOF
22242/* end confdefs.h. */
503d2be0
AS
22243#include <$ac_header>
22244_ACEOF
ca81d7a0
JD
22245if { (ac_try="$ac_cpp conftest.$ac_ext"
22246case "(($ac_try" in
22247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22248 *) ac_try_echo=$ac_try;;
22249esac
22250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22251 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22252 ac_status=$?
6bae0ccf 22253 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22254 rm -f conftest.er1
22255 cat conftest.err >&5
c0d27fcc 22256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22257 (exit $ac_status); } >/dev/null && {
22258 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22259 test ! -s conftest.err
22260 }; then
c0d27fcc 22261 ac_header_preproc=yes
503d2be0
AS
22262else
22263 echo "$as_me: failed program was:" >&5
19650fd6
AS
22264sed 's/^/| /' conftest.$ac_ext >&5
22265
c0d27fcc 22266 ac_header_preproc=no
a21616bd 22267fi
ca81d7a0 22268
503d2be0 22269rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22270{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22271echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22272
22273# So? What about this header?
edfaf76d
LK
22274case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22275 yes:no: )
c0d27fcc
MR
22276 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22277echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22279echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22280 ac_header_preproc=yes
19650fd6 22281 ;;
edfaf76d 22282 no:yes:* )
c0d27fcc
MR
22283 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22284echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22285 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22286echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22287 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22288echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22289 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22290echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22292echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22293 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22294echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22295
19650fd6 22296 ;;
c0d27fcc 22297esac
ca81d7a0
JD
22298{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22299echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22300if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22301 echo $ECHO_N "(cached) $ECHO_C" >&6
22302else
edfaf76d 22303 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22304fi
ca81d7a0
JD
22305ac_res=`eval echo '${'$as_ac_Header'}'`
22306 { echo "$as_me:$LINENO: result: $ac_res" >&5
22307echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22308
22309fi
503d2be0 22310if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22311 cat >>confdefs.h <<_ACEOF
503d2be0 22312#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22313_ACEOF
503d2be0 22314
a21616bd 22315fi
c0d27fcc 22316
a21616bd
KR
22317done
22318
22319fi
22320
ba4481b5
DL
22321# Solaris requires -lintl if you want strerror (which calls dgettext)
22322# to return localized messages.
503d2be0 22323
ca81d7a0
JD
22324{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22325echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22326if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22327 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22328else
503d2be0 22329 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22330LIBS="-lintl $LIBS"
503d2be0 22331cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22332/* confdefs.h. */
22333_ACEOF
22334cat confdefs.h >>conftest.$ac_ext
22335cat >>conftest.$ac_ext <<_ACEOF
22336/* end confdefs.h. */
503d2be0 22337
ca81d7a0
JD
22338/* Override any GCC internal prototype to avoid an error.
22339 Use char because int might match the return type of a GCC
22340 builtin and then its argument prototype would still apply. */
503d2be0
AS
22341#ifdef __cplusplus
22342extern "C"
22343#endif
503d2be0
AS
22344char dgettext ();
22345int
22346main ()
22347{
ca81d7a0 22348return dgettext ();
503d2be0
AS
22349 ;
22350 return 0;
22351}
22352_ACEOF
22353rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22354if { (ac_try="$ac_link"
22355case "(($ac_try" in
22356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22357 *) ac_try_echo=$ac_try;;
22358esac
22359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22360 (eval "$ac_link") 2>conftest.er1
503d2be0 22361 ac_status=$?
edfaf76d
LK
22362 grep -v '^ *+' conftest.er1 >conftest.err
22363 rm -f conftest.er1
22364 cat conftest.err >&5
c0d27fcc 22365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22366 (exit $ac_status); } && {
22367 test -z "$ac_c_werror_flag" ||
22368 test ! -s conftest.err
22369 } && test -s conftest$ac_exeext &&
22370 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22371 ac_cv_lib_intl_dgettext=yes
22372else
22373 echo "$as_me: failed program was:" >&5
19650fd6
AS
22374sed 's/^/| /' conftest.$ac_ext >&5
22375
ca81d7a0 22376 ac_cv_lib_intl_dgettext=no
503d2be0 22377fi
ca81d7a0 22378
f053c89f 22379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22380 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22381LIBS=$ac_check_lib_save_LIBS
22382fi
ca81d7a0
JD
22383{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22384echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22385if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22386 cat >>confdefs.h <<_ACEOF
503d2be0 22387#define HAVE_LIBINTL 1
c0d27fcc 22388_ACEOF
ba4481b5
DL
22389
22390 LIBS="-lintl $LIBS"
22391
ba4481b5
DL
22392fi
22393
c0d27fcc 22394
ca81d7a0
JD
22395{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22396echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22397if test "${emacs_cv_localtime_cache+set}" = set; then
22398 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22399else
22400 if test x$ac_cv_func_tzset = xyes; then
22401if test "$cross_compiling" = yes; then
22402 # If we have tzset, assume the worst when cross-compiling.
22403emacs_cv_localtime_cache=yes
22404else
503d2be0 22405 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22406/* confdefs.h. */
22407_ACEOF
22408cat confdefs.h >>conftest.$ac_ext
22409cat >>conftest.$ac_ext <<_ACEOF
22410/* end confdefs.h. */
ba4481b5 22411#include <time.h>
ba4481b5
DL
22412extern char **environ;
22413unset_TZ ()
22414{
22415 char **from, **to;
22416 for (to = from = environ; (*to = *from); from++)
22417 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22418 to++;
22419}
22420char TZ_GMT0[] = "TZ=GMT0";
22421char TZ_PST8[] = "TZ=PST8";
22422main()
22423{
22424 time_t now = time ((time_t *) 0);
22425 int hour_GMT0, hour_unset;
22426 if (putenv (TZ_GMT0) != 0)
22427 exit (1);
22428 hour_GMT0 = localtime (&now)->tm_hour;
22429 unset_TZ ();
22430 hour_unset = localtime (&now)->tm_hour;
22431 if (putenv (TZ_PST8) != 0)
22432 exit (1);
22433 if (localtime (&now)->tm_hour == hour_GMT0)
22434 exit (1);
22435 unset_TZ ();
22436 if (localtime (&now)->tm_hour != hour_unset)
22437 exit (1);
22438 exit (0);
22439}
503d2be0
AS
22440_ACEOF
22441rm -f conftest$ac_exeext
ca81d7a0
JD
22442if { (ac_try="$ac_link"
22443case "(($ac_try" in
22444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22445 *) ac_try_echo=$ac_try;;
22446esac
22447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22448 (eval "$ac_link") 2>&5
503d2be0 22449 ac_status=$?
c0d27fcc 22450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22452 { (case "(($ac_try" in
22453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22454 *) ac_try_echo=$ac_try;;
22455esac
22456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22457 (eval "$ac_try") 2>&5
503d2be0 22458 ac_status=$?
c0d27fcc 22459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22460 (exit $ac_status); }; }; then
ba4481b5
DL
22461 emacs_cv_localtime_cache=no
22462else
503d2be0
AS
22463 echo "$as_me: program exited with status $ac_status" >&5
22464echo "$as_me: failed program was:" >&5
19650fd6
AS
22465sed 's/^/| /' conftest.$ac_ext >&5
22466
c0d27fcc 22467( exit $ac_status )
503d2be0 22468emacs_cv_localtime_cache=yes
ba4481b5 22469fi
ca81d7a0 22470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22471fi
ca81d7a0
JD
22472
22473
ba4481b5
DL
22474else
22475 # If we lack tzset, report that localtime does not cache TZ,
22476 # since we can't invalidate the cache if we don't have tzset.
22477 emacs_cv_localtime_cache=no
22478fi
22479fi
ca81d7a0
JD
22480{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22481echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22482if test $emacs_cv_localtime_cache = yes; then
b936fae4 22483
c0d27fcc 22484cat >>confdefs.h <<\_ACEOF
ba4481b5 22485#define LOCALTIME_CACHE 1
c0d27fcc 22486_ACEOF
ba4481b5
DL
22487
22488fi
22489
22490if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22491
22492for ac_func in gettimeofday
48d4b120 22493do
503d2be0 22494as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22495{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22496echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22497if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22498 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22499else
503d2be0 22500 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22501/* confdefs.h. */
22502_ACEOF
22503cat confdefs.h >>conftest.$ac_ext
22504cat >>conftest.$ac_ext <<_ACEOF
22505/* end confdefs.h. */
edfaf76d
LK
22506/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22507 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22508#define $ac_func innocuous_$ac_func
22509
48d4b120 22510/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22511 which can conflict with char $ac_func (); below.
22512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22513 <limits.h> exists even on freestanding compilers. */
edfaf76d 22514
19650fd6
AS
22515#ifdef __STDC__
22516# include <limits.h>
22517#else
22518# include <assert.h>
22519#endif
edfaf76d
LK
22520
22521#undef $ac_func
22522
ca81d7a0
JD
22523/* Override any GCC internal prototype to avoid an error.
22524 Use char because int might match the return type of a GCC
22525 builtin and then its argument prototype would still apply. */
503d2be0
AS
22526#ifdef __cplusplus
22527extern "C"
22528#endif
503d2be0 22529char $ac_func ();
48d4b120
DL
22530/* The GNU C library defines this for functions which it implements
22531 to always fail with ENOSYS. Some functions are actually named
22532 something starting with __ and the normal name is an alias. */
ca81d7a0 22533#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22534choke me
cd958eb3
MB
22535#endif
22536
19650fd6
AS
22537int
22538main ()
22539{
ca81d7a0 22540return $ac_func ();
503d2be0
AS
22541 ;
22542 return 0;
22543}
22544_ACEOF
22545rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22546if { (ac_try="$ac_link"
22547case "(($ac_try" in
22548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22549 *) ac_try_echo=$ac_try;;
22550esac
22551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22552 (eval "$ac_link") 2>conftest.er1
503d2be0 22553 ac_status=$?
edfaf76d
LK
22554 grep -v '^ *+' conftest.er1 >conftest.err
22555 rm -f conftest.er1
22556 cat conftest.err >&5
c0d27fcc 22557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22558 (exit $ac_status); } && {
22559 test -z "$ac_c_werror_flag" ||
22560 test ! -s conftest.err
22561 } && test -s conftest$ac_exeext &&
22562 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22563 eval "$as_ac_var=yes"
22564else
22565 echo "$as_me: failed program was:" >&5
19650fd6
AS
22566sed 's/^/| /' conftest.$ac_ext >&5
22567
ca81d7a0 22568 eval "$as_ac_var=no"
503d2be0 22569fi
ca81d7a0 22570
f053c89f 22571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22572 conftest$ac_exeext conftest.$ac_ext
503d2be0 22573fi
ca81d7a0
JD
22574ac_res=`eval echo '${'$as_ac_var'}'`
22575 { echo "$as_me:$LINENO: result: $ac_res" >&5
22576echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22577if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22578 cat >>confdefs.h <<_ACEOF
503d2be0 22579#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22580_ACEOF
48d4b120 22581
48d4b120
DL
22582fi
22583done
22584
b936fae4 22585 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22586 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22587echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22588if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22589 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22590else
503d2be0 22591 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22592/* confdefs.h. */
22593_ACEOF
22594cat confdefs.h >>conftest.$ac_ext
22595cat >>conftest.$ac_ext <<_ACEOF
22596/* end confdefs.h. */
ba4481b5 22597
a3f08d9e
DL
22598#ifdef TIME_WITH_SYS_TIME
22599#include <sys/time.h>
22600#include <time.h>
22601#else
22602#ifdef HAVE_SYS_TIME_H
22603#include <sys/time.h>
22604#else
22605#include <time.h>
22606#endif
22607#endif
503d2be0
AS
22608int
22609main ()
22610{
a3f08d9e 22611struct timeval time;
b936fae4 22612 gettimeofday (&time, 0);
503d2be0
AS
22613 ;
22614 return 0;
22615}
22616_ACEOF
22617rm -f conftest.$ac_objext
f053c89f
CY
22618if { (ac_try="$ac_compile"
22619case "(($ac_try" in
ca81d7a0
JD
22620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22621 *) ac_try_echo=$ac_try;;
22622esac
22623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22624 (eval "$ac_compile") 2>conftest.er1
503d2be0 22625 ac_status=$?
edfaf76d
LK
22626 grep -v '^ *+' conftest.er1 >conftest.err
22627 rm -f conftest.er1
22628 cat conftest.err >&5
c0d27fcc 22629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22630 (exit $ac_status); } && {
22631 test -z "$ac_c_werror_flag" ||
22632 test ! -s conftest.err
22633 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22634 emacs_cv_gettimeofday_two_arguments=yes
22635else
503d2be0 22636 echo "$as_me: failed program was:" >&5
19650fd6
AS
22637sed 's/^/| /' conftest.$ac_ext >&5
22638
ca81d7a0 22639 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22640fi
ca81d7a0
JD
22641
22642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22643fi
ca81d7a0
JD
22644{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22645echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22646 if test $emacs_cv_gettimeofday_two_arguments = no; then
22647
c0d27fcc 22648cat >>confdefs.h <<\_ACEOF
ba4481b5 22649#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22650_ACEOF
ba4481b5 22651
b936fae4 22652 fi
ba4481b5
DL
22653 fi
22654fi
22655
22656ok_so_far=yes
ca81d7a0
JD
22657{ echo "$as_me:$LINENO: checking for socket" >&5
22658echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22659if test "${ac_cv_func_socket+set}" = set; then
22660 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22661else
503d2be0 22662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22663/* confdefs.h. */
22664_ACEOF
22665cat confdefs.h >>conftest.$ac_ext
22666cat >>conftest.$ac_ext <<_ACEOF
22667/* end confdefs.h. */
edfaf76d
LK
22668/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22669 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22670#define socket innocuous_socket
22671
ba4481b5 22672/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22673 which can conflict with char socket (); below.
22674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22675 <limits.h> exists even on freestanding compilers. */
edfaf76d 22676
19650fd6
AS
22677#ifdef __STDC__
22678# include <limits.h>
22679#else
22680# include <assert.h>
22681#endif
edfaf76d
LK
22682
22683#undef socket
22684
ca81d7a0
JD
22685/* Override any GCC internal prototype to avoid an error.
22686 Use char because int might match the return type of a GCC
22687 builtin and then its argument prototype would still apply. */
503d2be0
AS
22688#ifdef __cplusplus
22689extern "C"
22690#endif
503d2be0 22691char socket ();
ba4481b5
DL
22692/* The GNU C library defines this for functions which it implements
22693 to always fail with ENOSYS. Some functions are actually named
22694 something starting with __ and the normal name is an alias. */
ca81d7a0 22695#if defined __stub_socket || defined __stub___socket
ba4481b5 22696choke me
cd958eb3
MB
22697#endif
22698
19650fd6
AS
22699int
22700main ()
22701{
ca81d7a0 22702return socket ();
503d2be0
AS
22703 ;
22704 return 0;
22705}
22706_ACEOF
22707rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22708if { (ac_try="$ac_link"
22709case "(($ac_try" in
22710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22711 *) ac_try_echo=$ac_try;;
22712esac
22713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22714 (eval "$ac_link") 2>conftest.er1
503d2be0 22715 ac_status=$?
edfaf76d
LK
22716 grep -v '^ *+' conftest.er1 >conftest.err
22717 rm -f conftest.er1
22718 cat conftest.err >&5
c0d27fcc 22719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22720 (exit $ac_status); } && {
22721 test -z "$ac_c_werror_flag" ||
22722 test ! -s conftest.err
22723 } && test -s conftest$ac_exeext &&
22724 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22725 ac_cv_func_socket=yes
22726else
22727 echo "$as_me: failed program was:" >&5
19650fd6
AS
22728sed 's/^/| /' conftest.$ac_ext >&5
22729
ca81d7a0 22730 ac_cv_func_socket=no
503d2be0 22731fi
ca81d7a0 22732
f053c89f 22733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22734 conftest$ac_exeext conftest.$ac_ext
503d2be0 22735fi
ca81d7a0
JD
22736{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22737echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22738if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22739 :
22740else
503d2be0 22741 ok_so_far=no
ba4481b5
DL
22742fi
22743
22744if test $ok_so_far = yes; then
c0d27fcc 22745 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22746 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22747echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22748if test "${ac_cv_header_netinet_in_h+set}" = set; then
22749 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22750fi
ca81d7a0
JD
22751{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22752echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22753else
c0d27fcc 22754 # Is the header compilable?
ca81d7a0
JD
22755{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22756echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22757cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22758/* confdefs.h. */
22759_ACEOF
22760cat confdefs.h >>conftest.$ac_ext
22761cat >>conftest.$ac_ext <<_ACEOF
22762/* end confdefs.h. */
c0d27fcc
MR
22763$ac_includes_default
22764#include <netinet/in.h>
22765_ACEOF
22766rm -f conftest.$ac_objext
ca81d7a0
JD
22767if { (ac_try="$ac_compile"
22768case "(($ac_try" in
22769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22770 *) ac_try_echo=$ac_try;;
22771esac
22772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22773 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22774 ac_status=$?
edfaf76d
LK
22775 grep -v '^ *+' conftest.er1 >conftest.err
22776 rm -f conftest.er1
22777 cat conftest.err >&5
c0d27fcc 22778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22779 (exit $ac_status); } && {
22780 test -z "$ac_c_werror_flag" ||
22781 test ! -s conftest.err
22782 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22783 ac_header_compiler=yes
22784else
22785 echo "$as_me: failed program was:" >&5
19650fd6
AS
22786sed 's/^/| /' conftest.$ac_ext >&5
22787
ca81d7a0 22788 ac_header_compiler=no
c0d27fcc 22789fi
ca81d7a0
JD
22790
22791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22792{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22793echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22794
22795# Is the header present?
ca81d7a0
JD
22796{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22797echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22798cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22799/* confdefs.h. */
22800_ACEOF
22801cat confdefs.h >>conftest.$ac_ext
22802cat >>conftest.$ac_ext <<_ACEOF
22803/* end confdefs.h. */
ba4481b5 22804#include <netinet/in.h>
503d2be0 22805_ACEOF
ca81d7a0
JD
22806if { (ac_try="$ac_cpp conftest.$ac_ext"
22807case "(($ac_try" in
22808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22809 *) ac_try_echo=$ac_try;;
22810esac
22811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22812 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22813 ac_status=$?
6bae0ccf 22814 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22815 rm -f conftest.er1
22816 cat conftest.err >&5
c0d27fcc 22817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22818 (exit $ac_status); } >/dev/null && {
22819 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22820 test ! -s conftest.err
22821 }; then
c0d27fcc 22822 ac_header_preproc=yes
ba4481b5 22823else
503d2be0 22824 echo "$as_me: failed program was:" >&5
19650fd6
AS
22825sed 's/^/| /' conftest.$ac_ext >&5
22826
c0d27fcc 22827 ac_header_preproc=no
ba4481b5 22828fi
ca81d7a0 22829
503d2be0 22830rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22831{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22832echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22833
22834# So? What about this header?
edfaf76d
LK
22835case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22836 yes:no: )
c0d27fcc
MR
22837 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22838echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22839 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22840echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22841 ac_header_preproc=yes
19650fd6 22842 ;;
edfaf76d 22843 no:yes:* )
c0d27fcc
MR
22844 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22845echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22846 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22847echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22848 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22849echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22850 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22851echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22852 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22853echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22854 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22855echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22856
19650fd6 22857 ;;
c0d27fcc 22858esac
ca81d7a0
JD
22859{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22860echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22861if test "${ac_cv_header_netinet_in_h+set}" = set; then
22862 echo $ECHO_N "(cached) $ECHO_C" >&6
22863else
22864 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22865fi
ca81d7a0
JD
22866{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22867echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22868
22869fi
503d2be0 22870if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22871 :
22872else
503d2be0 22873 ok_so_far=no
ba4481b5
DL
22874fi
22875
c0d27fcc 22876
ba4481b5
DL
22877fi
22878if test $ok_so_far = yes; then
c0d27fcc 22879 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22880 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22881echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22882if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22883 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22884fi
ca81d7a0
JD
22885{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22886echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22887else
c0d27fcc 22888 # Is the header compilable?
ca81d7a0
JD
22889{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22890echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22891cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22892/* confdefs.h. */
22893_ACEOF
22894cat confdefs.h >>conftest.$ac_ext
22895cat >>conftest.$ac_ext <<_ACEOF
22896/* end confdefs.h. */
c0d27fcc
MR
22897$ac_includes_default
22898#include <arpa/inet.h>
22899_ACEOF
22900rm -f conftest.$ac_objext
ca81d7a0
JD
22901if { (ac_try="$ac_compile"
22902case "(($ac_try" in
22903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22904 *) ac_try_echo=$ac_try;;
22905esac
22906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22907 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22908 ac_status=$?
edfaf76d
LK
22909 grep -v '^ *+' conftest.er1 >conftest.err
22910 rm -f conftest.er1
22911 cat conftest.err >&5
c0d27fcc 22912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22913 (exit $ac_status); } && {
22914 test -z "$ac_c_werror_flag" ||
22915 test ! -s conftest.err
22916 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22917 ac_header_compiler=yes
22918else
22919 echo "$as_me: failed program was:" >&5
19650fd6
AS
22920sed 's/^/| /' conftest.$ac_ext >&5
22921
ca81d7a0 22922 ac_header_compiler=no
c0d27fcc 22923fi
ca81d7a0
JD
22924
22925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22926{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22927echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22928
22929# Is the header present?
ca81d7a0
JD
22930{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22931echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22932cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22933/* confdefs.h. */
22934_ACEOF
22935cat confdefs.h >>conftest.$ac_ext
22936cat >>conftest.$ac_ext <<_ACEOF
22937/* end confdefs.h. */
ba4481b5 22938#include <arpa/inet.h>
503d2be0 22939_ACEOF
ca81d7a0
JD
22940if { (ac_try="$ac_cpp conftest.$ac_ext"
22941case "(($ac_try" in
22942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22943 *) ac_try_echo=$ac_try;;
22944esac
22945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22946 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22947 ac_status=$?
6bae0ccf 22948 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22949 rm -f conftest.er1
22950 cat conftest.err >&5
c0d27fcc 22951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22952 (exit $ac_status); } >/dev/null && {
22953 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22954 test ! -s conftest.err
22955 }; then
c0d27fcc 22956 ac_header_preproc=yes
ba4481b5 22957else
503d2be0 22958 echo "$as_me: failed program was:" >&5
19650fd6
AS
22959sed 's/^/| /' conftest.$ac_ext >&5
22960
c0d27fcc 22961 ac_header_preproc=no
ba4481b5 22962fi
ca81d7a0 22963
503d2be0 22964rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22965{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22966echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22967
22968# So? What about this header?
edfaf76d
LK
22969case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22970 yes:no: )
c0d27fcc
MR
22971 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22972echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22973 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22974echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22975 ac_header_preproc=yes
19650fd6 22976 ;;
edfaf76d 22977 no:yes:* )
c0d27fcc
MR
22978 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22979echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22980 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22981echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22982 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22983echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22984 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22985echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22986 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22987echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22988 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22989echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22990
19650fd6 22991 ;;
c0d27fcc 22992esac
ca81d7a0
JD
22993{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22994echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22995if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22996 echo $ECHO_N "(cached) $ECHO_C" >&6
22997else
22998 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22999fi
ca81d7a0
JD
23000{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23001echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23002
23003fi
503d2be0 23004if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23005 :
23006else
503d2be0 23007 ok_so_far=no
ba4481b5
DL
23008fi
23009
c0d27fcc 23010
ba4481b5
DL
23011fi
23012if test $ok_so_far = yes; then
b936fae4 23013
c0d27fcc 23014cat >>confdefs.h <<\_ACEOF
ba4481b5 23015#define HAVE_INET_SOCKETS 1
c0d27fcc 23016_ACEOF
ba4481b5
DL
23017
23018fi
23019
2d2b6695 23020
7862d3a8 23021for ac_header in sys/ioctl.h
2d2b6695
KS
23022do
23023as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23025 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23026echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23028 echo $ECHO_N "(cached) $ECHO_C" >&6
23029fi
ca81d7a0
JD
23030ac_res=`eval echo '${'$as_ac_Header'}'`
23031 { echo "$as_me:$LINENO: result: $ac_res" >&5
23032echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23033else
23034 # Is the header compilable?
ca81d7a0
JD
23035{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23036echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23037cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23038/* confdefs.h. */
23039_ACEOF
23040cat confdefs.h >>conftest.$ac_ext
23041cat >>conftest.$ac_ext <<_ACEOF
23042/* end confdefs.h. */
23043$ac_includes_default
23044#include <$ac_header>
23045_ACEOF
23046rm -f conftest.$ac_objext
ca81d7a0
JD
23047if { (ac_try="$ac_compile"
23048case "(($ac_try" in
23049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23050 *) ac_try_echo=$ac_try;;
23051esac
23052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23053 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23054 ac_status=$?
edfaf76d
LK
23055 grep -v '^ *+' conftest.er1 >conftest.err
23056 rm -f conftest.er1
23057 cat conftest.err >&5
2d2b6695 23058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23059 (exit $ac_status); } && {
23060 test -z "$ac_c_werror_flag" ||
23061 test ! -s conftest.err
23062 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23063 ac_header_compiler=yes
23064else
23065 echo "$as_me: failed program was:" >&5
23066sed 's/^/| /' conftest.$ac_ext >&5
23067
ca81d7a0 23068 ac_header_compiler=no
2d2b6695 23069fi
ca81d7a0
JD
23070
23071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23072{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23073echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23074
23075# Is the header present?
ca81d7a0
JD
23076{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23077echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23078cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23079/* confdefs.h. */
23080_ACEOF
23081cat confdefs.h >>conftest.$ac_ext
23082cat >>conftest.$ac_ext <<_ACEOF
23083/* end confdefs.h. */
23084#include <$ac_header>
23085_ACEOF
ca81d7a0
JD
23086if { (ac_try="$ac_cpp conftest.$ac_ext"
23087case "(($ac_try" in
23088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23089 *) ac_try_echo=$ac_try;;
23090esac
23091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23092 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23093 ac_status=$?
23094 grep -v '^ *+' conftest.er1 >conftest.err
23095 rm -f conftest.er1
23096 cat conftest.err >&5
23097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23098 (exit $ac_status); } >/dev/null && {
23099 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23100 test ! -s conftest.err
23101 }; then
2d2b6695
KS
23102 ac_header_preproc=yes
23103else
23104 echo "$as_me: failed program was:" >&5
23105sed 's/^/| /' conftest.$ac_ext >&5
23106
23107 ac_header_preproc=no
23108fi
ca81d7a0 23109
2d2b6695 23110rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23111{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23112echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23113
23114# So? What about this header?
edfaf76d
LK
23115case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23116 yes:no: )
2d2b6695
KS
23117 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23118echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23119 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23120echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23121 ac_header_preproc=yes
2d2b6695 23122 ;;
edfaf76d 23123 no:yes:* )
2d2b6695
KS
23124 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23125echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23126 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23127echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23128 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23129echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23130 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23131echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23132 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23133echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23134 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23135echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23136
2d2b6695
KS
23137 ;;
23138esac
ca81d7a0
JD
23139{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23140echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23141if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23142 echo $ECHO_N "(cached) $ECHO_C" >&6
23143else
edfaf76d 23144 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23145fi
ca81d7a0
JD
23146ac_res=`eval echo '${'$as_ac_Header'}'`
23147 { echo "$as_me:$LINENO: result: $ac_res" >&5
23148echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23149
23150fi
23151if test `eval echo '${'$as_ac_Header'}'` = yes; then
23152 cat >>confdefs.h <<_ACEOF
23153#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23154_ACEOF
23155
23156fi
23157
23158done
23159
23160
ba4481b5 23161if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23162
c0d27fcc 23163cat >>confdefs.h <<\_ACEOF
ba4481b5 23164#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23165_ACEOF
ba4481b5
DL
23166
23167fi
23168
ca81d7a0
JD
23169{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23170echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23171if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23172 { echo "$as_me:$LINENO: result: yes" >&5
23173echo "${ECHO_T}yes" >&6; }
b936fae4 23174
c0d27fcc 23175cat >>confdefs.h <<\_ACEOF
3d9fec71 23176#define HAVE_DEV_PTMX 1
c0d27fcc 23177_ACEOF
3d9fec71
DL
23178
23179else
ca81d7a0
JD
23180 { echo "$as_me:$LINENO: result: no" >&5
23181echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23182fi
23183
ca81d7a0
JD
23184{ echo "$as_me:$LINENO: checking for pid_t" >&5
23185echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23186if test "${ac_cv_type_pid_t+set}" = set; then
23187 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23188else
503d2be0 23189 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23190/* confdefs.h. */
23191_ACEOF
23192cat confdefs.h >>conftest.$ac_ext
23193cat >>conftest.$ac_ext <<_ACEOF
23194/* end confdefs.h. */
503d2be0 23195$ac_includes_default
ca81d7a0 23196typedef pid_t ac__type_new_;
503d2be0
AS
23197int
23198main ()
23199{
ca81d7a0 23200if ((ac__type_new_ *) 0)
503d2be0 23201 return 0;
ca81d7a0 23202if (sizeof (ac__type_new_))
503d2be0
AS
23203 return 0;
23204 ;
23205 return 0;
23206}
23207_ACEOF
23208rm -f conftest.$ac_objext
ca81d7a0
JD
23209if { (ac_try="$ac_compile"
23210case "(($ac_try" in
23211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23212 *) ac_try_echo=$ac_try;;
23213esac
23214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23215 (eval "$ac_compile") 2>conftest.er1
503d2be0 23216 ac_status=$?
edfaf76d
LK
23217 grep -v '^ *+' conftest.er1 >conftest.err
23218 rm -f conftest.er1
23219 cat conftest.err >&5
c0d27fcc 23220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23221 (exit $ac_status); } && {
23222 test -z "$ac_c_werror_flag" ||
23223 test ! -s conftest.err
23224 } && test -s conftest.$ac_objext; then
647847ea
DL
23225 ac_cv_type_pid_t=yes
23226else
503d2be0 23227 echo "$as_me: failed program was:" >&5
19650fd6
AS
23228sed 's/^/| /' conftest.$ac_ext >&5
23229
ca81d7a0 23230 ac_cv_type_pid_t=no
647847ea 23231fi
ca81d7a0
JD
23232
23233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23234fi
ca81d7a0
JD
23235{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23236echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23237if test $ac_cv_type_pid_t = yes; then
23238 :
23239else
23240
c0d27fcc 23241cat >>confdefs.h <<_ACEOF
647847ea 23242#define pid_t int
c0d27fcc 23243_ACEOF
647847ea
DL
23244
23245fi
23246
c0d27fcc 23247
ca81d7a0 23248for ac_header in vfork.h
503d2be0
AS
23249do
23250as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23251if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23252 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23253echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23254if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23255 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23256fi
ca81d7a0
JD
23257ac_res=`eval echo '${'$as_ac_Header'}'`
23258 { echo "$as_me:$LINENO: result: $ac_res" >&5
23259echo "${ECHO_T}$ac_res" >&6; }
98418dba 23260else
c0d27fcc 23261 # Is the header compilable?
ca81d7a0
JD
23262{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23263echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23265/* confdefs.h. */
23266_ACEOF
23267cat confdefs.h >>conftest.$ac_ext
23268cat >>conftest.$ac_ext <<_ACEOF
23269/* end confdefs.h. */
c0d27fcc
MR
23270$ac_includes_default
23271#include <$ac_header>
23272_ACEOF
23273rm -f conftest.$ac_objext
ca81d7a0
JD
23274if { (ac_try="$ac_compile"
23275case "(($ac_try" in
23276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23277 *) ac_try_echo=$ac_try;;
23278esac
23279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23280 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23281 ac_status=$?
edfaf76d
LK
23282 grep -v '^ *+' conftest.er1 >conftest.err
23283 rm -f conftest.er1
23284 cat conftest.err >&5
c0d27fcc 23285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23286 (exit $ac_status); } && {
23287 test -z "$ac_c_werror_flag" ||
23288 test ! -s conftest.err
23289 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23290 ac_header_compiler=yes
23291else
23292 echo "$as_me: failed program was:" >&5
19650fd6
AS
23293sed 's/^/| /' conftest.$ac_ext >&5
23294
ca81d7a0 23295 ac_header_compiler=no
c0d27fcc 23296fi
ca81d7a0
JD
23297
23298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23299{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23300echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23301
23302# Is the header present?
ca81d7a0
JD
23303{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23304echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23305cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23306/* confdefs.h. */
23307_ACEOF
23308cat confdefs.h >>conftest.$ac_ext
23309cat >>conftest.$ac_ext <<_ACEOF
23310/* end confdefs.h. */
503d2be0
AS
23311#include <$ac_header>
23312_ACEOF
ca81d7a0
JD
23313if { (ac_try="$ac_cpp conftest.$ac_ext"
23314case "(($ac_try" in
23315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23316 *) ac_try_echo=$ac_try;;
23317esac
23318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23319 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23320 ac_status=$?
6bae0ccf 23321 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23322 rm -f conftest.er1
23323 cat conftest.err >&5
c0d27fcc 23324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23325 (exit $ac_status); } >/dev/null && {
23326 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23327 test ! -s conftest.err
23328 }; then
c0d27fcc 23329 ac_header_preproc=yes
647847ea 23330else
503d2be0 23331 echo "$as_me: failed program was:" >&5
19650fd6
AS
23332sed 's/^/| /' conftest.$ac_ext >&5
23333
c0d27fcc 23334 ac_header_preproc=no
647847ea 23335fi
ca81d7a0 23336
503d2be0 23337rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23338{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23339echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23340
23341# So? What about this header?
edfaf76d
LK
23342case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23343 yes:no: )
c0d27fcc
MR
23344 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23345echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23346 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23347echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23348 ac_header_preproc=yes
19650fd6 23349 ;;
edfaf76d 23350 no:yes:* )
c0d27fcc
MR
23351 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23352echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23353 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23354echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23355 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23356echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23357 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23358echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23359 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23360echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23361 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23362echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23363
19650fd6 23364 ;;
c0d27fcc 23365esac
ca81d7a0
JD
23366{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23368if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23369 echo $ECHO_N "(cached) $ECHO_C" >&6
23370else
edfaf76d 23371 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23372fi
ca81d7a0
JD
23373ac_res=`eval echo '${'$as_ac_Header'}'`
23374 { echo "$as_me:$LINENO: result: $ac_res" >&5
23375echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23376
23377fi
503d2be0 23378if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23379 cat >>confdefs.h <<_ACEOF
503d2be0 23380#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23381_ACEOF
647847ea 23382
73b77ee5 23383fi
c0d27fcc 23384
503d2be0 23385done
73b77ee5 23386
c0d27fcc
MR
23387
23388
503d2be0
AS
23389for ac_func in fork vfork
23390do
23391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23392{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23394if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23395 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23396else
503d2be0 23397 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23398/* confdefs.h. */
23399_ACEOF
23400cat confdefs.h >>conftest.$ac_ext
23401cat >>conftest.$ac_ext <<_ACEOF
23402/* end confdefs.h. */
edfaf76d
LK
23403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23405#define $ac_func innocuous_$ac_func
23406
fa0b693c 23407/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23408 which can conflict with char $ac_func (); below.
23409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23410 <limits.h> exists even on freestanding compilers. */
edfaf76d 23411
19650fd6
AS
23412#ifdef __STDC__
23413# include <limits.h>
23414#else
23415# include <assert.h>
23416#endif
edfaf76d
LK
23417
23418#undef $ac_func
23419
ca81d7a0
JD
23420/* Override any GCC internal prototype to avoid an error.
23421 Use char because int might match the return type of a GCC
23422 builtin and then its argument prototype would still apply. */
503d2be0
AS
23423#ifdef __cplusplus
23424extern "C"
23425#endif
503d2be0 23426char $ac_func ();
fa0b693c
GM
23427/* The GNU C library defines this for functions which it implements
23428 to always fail with ENOSYS. Some functions are actually named
23429 something starting with __ and the normal name is an alias. */
ca81d7a0 23430#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23431choke me
fa0b693c
GM
23432#endif
23433
19650fd6
AS
23434int
23435main ()
23436{
ca81d7a0 23437return $ac_func ();
503d2be0
AS
23438 ;
23439 return 0;
23440}
23441_ACEOF
23442rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23443if { (ac_try="$ac_link"
23444case "(($ac_try" in
23445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23446 *) ac_try_echo=$ac_try;;
23447esac
23448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23449 (eval "$ac_link") 2>conftest.er1
503d2be0 23450 ac_status=$?
edfaf76d
LK
23451 grep -v '^ *+' conftest.er1 >conftest.err
23452 rm -f conftest.er1
23453 cat conftest.err >&5
c0d27fcc 23454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23455 (exit $ac_status); } && {
23456 test -z "$ac_c_werror_flag" ||
23457 test ! -s conftest.err
23458 } && test -s conftest$ac_exeext &&
23459 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23460 eval "$as_ac_var=yes"
23461else
23462 echo "$as_me: failed program was:" >&5
19650fd6
AS
23463sed 's/^/| /' conftest.$ac_ext >&5
23464
ca81d7a0 23465 eval "$as_ac_var=no"
503d2be0 23466fi
ca81d7a0 23467
f053c89f 23468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23469 conftest$ac_exeext conftest.$ac_ext
503d2be0 23470fi
ca81d7a0
JD
23471ac_res=`eval echo '${'$as_ac_var'}'`
23472 { echo "$as_me:$LINENO: result: $ac_res" >&5
23473echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23474if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23475 cat >>confdefs.h <<_ACEOF
503d2be0 23476#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23477_ACEOF
503d2be0 23478
fa0b693c 23479fi
503d2be0 23480done
fa0b693c 23481
503d2be0 23482if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23483 { echo "$as_me:$LINENO: checking for working fork" >&5
23484echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23485if test "${ac_cv_func_fork_works+set}" = set; then
23486 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23487else
503d2be0
AS
23488 if test "$cross_compiling" = yes; then
23489 ac_cv_func_fork_works=cross
23490else
23491 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23492/* confdefs.h. */
23493_ACEOF
23494cat confdefs.h >>conftest.$ac_ext
23495cat >>conftest.$ac_ext <<_ACEOF
23496/* end confdefs.h. */
23497$ac_includes_default
23498int
23499main ()
23500{
23501
23502 /* By Ruediger Kuhlmann. */
23503 return fork () < 0;
23504
23505 ;
23506 return 0;
23507}
503d2be0
AS
23508_ACEOF
23509rm -f conftest$ac_exeext
ca81d7a0
JD
23510if { (ac_try="$ac_link"
23511case "(($ac_try" in
23512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23513 *) ac_try_echo=$ac_try;;
23514esac
23515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23516 (eval "$ac_link") 2>&5
503d2be0 23517 ac_status=$?
c0d27fcc 23518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23520 { (case "(($ac_try" in
23521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23522 *) ac_try_echo=$ac_try;;
23523esac
23524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23525 (eval "$ac_try") 2>&5
503d2be0 23526 ac_status=$?
c0d27fcc 23527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23528 (exit $ac_status); }; }; then
23529 ac_cv_func_fork_works=yes
23530else
23531 echo "$as_me: program exited with status $ac_status" >&5
23532echo "$as_me: failed program was:" >&5
19650fd6
AS
23533sed 's/^/| /' conftest.$ac_ext >&5
23534
c0d27fcc 23535( exit $ac_status )
503d2be0
AS
23536ac_cv_func_fork_works=no
23537fi
ca81d7a0 23538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23539fi
ca81d7a0
JD
23540
23541
503d2be0 23542fi
ca81d7a0
JD
23543{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23544echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23545
6bae0ccf
DL
23546else
23547 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23548fi
23549if test "x$ac_cv_func_fork_works" = xcross; then
23550 case $host in
23551 *-*-amigaos* | *-*-msdosdjgpp*)
23552 # Override, as these systems have only a dummy fork() stub
23553 ac_cv_func_fork_works=no
23554 ;;
23555 *)
23556 ac_cv_func_fork_works=yes
23557 ;;
23558 esac
c0d27fcc
MR
23559 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23560echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23561fi
73b77ee5 23562ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23563if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23564 { echo "$as_me:$LINENO: checking for working vfork" >&5
23565echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23566if test "${ac_cv_func_vfork_works+set}" = set; then
23567 echo $ECHO_N "(cached) $ECHO_C" >&6
23568else
23569 if test "$cross_compiling" = yes; then
23570 ac_cv_func_vfork_works=cross
fa0b693c 23571else
503d2be0 23572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23573/* confdefs.h. */
23574_ACEOF
23575cat confdefs.h >>conftest.$ac_ext
23576cat >>conftest.$ac_ext <<_ACEOF
23577/* end confdefs.h. */
73b77ee5 23578/* Thanks to Paul Eggert for this test. */
ca81d7a0 23579$ac_includes_default
19650fd6 23580#include <sys/wait.h>
f053c89f 23581#ifdef HAVE_VFORK_H
503d2be0 23582# include <vfork.h>
73b77ee5
GM
23583#endif
23584/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23585 argument registers are propagated back to the parent. The compiler
23586 is told about this with #include <vfork.h>, but some compilers
23587 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23588 static variable whose address is put into a register that is
23589 clobbered by the vfork. */
19650fd6 23590static void
fa0b693c 23591#ifdef __cplusplus
73b77ee5 23592sparc_address_test (int arg)
503d2be0 23593# else
73b77ee5 23594sparc_address_test (arg) int arg;
fa0b693c 23595#endif
fa0b693c 23596{
73b77ee5
GM
23597 static pid_t child;
23598 if (!child) {
23599 child = vfork ();
23600 if (child < 0) {
23601 perror ("vfork");
23602 _exit(2);
23603 }
23604 if (!child) {
23605 arg = getpid();
23606 write(-1, "", 0);
23607 _exit (arg);
23608 }
23609 }
23610}
503d2be0
AS
23611
23612int
23613main ()
23614{
73b77ee5
GM
23615 pid_t parent = getpid ();
23616 pid_t child;
fa0b693c 23617
19650fd6 23618 sparc_address_test (0);
fa0b693c 23619
73b77ee5 23620 child = vfork ();
fa0b693c 23621
73b77ee5 23622 if (child == 0) {
503d2be0
AS
23623 /* Here is another test for sparc vfork register problems. This
23624 test uses lots of local variables, at least as many local
23625 variables as main has allocated so far including compiler
23626 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23627 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23628 reuse the register of parent for one of the local variables,
23629 since it will think that parent can't possibly be used any more
23630 in this routine. Assigning to the local variable will thus
23631 munge parent in the parent process. */
73b77ee5
GM
23632 pid_t
23633 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23634 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23635 /* Convince the compiler that p..p7 are live; otherwise, it might
23636 use the same hardware register for all 8 local variables. */
23637 if (p != p1 || p != p2 || p != p3 || p != p4
23638 || p != p5 || p != p6 || p != p7)
23639 _exit(1);
fa0b693c 23640
503d2be0
AS
23641 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23642 from child file descriptors. If the child closes a descriptor
23643 before it execs or exits, this munges the parent's descriptor
23644 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23645 _exit(close(fileno(stdout)) != 0);
23646 } else {
23647 int status;
23648 struct stat st;
23649
23650 while (wait(&status) != child)
23651 ;
ca81d7a0 23652 return (
73b77ee5
GM
23653 /* Was there some problem with vforking? */
23654 child < 0
23655
23656 /* Did the child fail? (This shouldn't happen.) */
23657 || status
23658
23659 /* Did the vfork/compiler bug occur? */
23660 || parent != getpid()
fa0b693c 23661
73b77ee5
GM
23662 /* Did the file descriptor bug occur? */
23663 || fstat(fileno(stdout), &st) != 0
23664 );
23665 }
23666}
503d2be0
AS
23667_ACEOF
23668rm -f conftest$ac_exeext
ca81d7a0
JD
23669if { (ac_try="$ac_link"
23670case "(($ac_try" in
23671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23672 *) ac_try_echo=$ac_try;;
23673esac
23674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23675 (eval "$ac_link") 2>&5
503d2be0 23676 ac_status=$?
c0d27fcc 23677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23678 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23679 { (case "(($ac_try" in
23680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23681 *) ac_try_echo=$ac_try;;
23682esac
23683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23684 (eval "$ac_try") 2>&5
503d2be0 23685 ac_status=$?
c0d27fcc 23686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23687 (exit $ac_status); }; }; then
73b77ee5 23688 ac_cv_func_vfork_works=yes
fa0b693c 23689else
503d2be0
AS
23690 echo "$as_me: program exited with status $ac_status" >&5
23691echo "$as_me: failed program was:" >&5
19650fd6
AS
23692sed 's/^/| /' conftest.$ac_ext >&5
23693
c0d27fcc 23694( exit $ac_status )
503d2be0
AS
23695ac_cv_func_vfork_works=no
23696fi
ca81d7a0 23697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23698fi
ca81d7a0
JD
23699
23700
fa0b693c 23701fi
ca81d7a0
JD
23702{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23703echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23704
503d2be0
AS
23705fi;
23706if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23707 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23708 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23709echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23710fi
23711
503d2be0
AS
23712if test "x$ac_cv_func_vfork_works" = xyes; then
23713
c0d27fcc 23714cat >>confdefs.h <<\_ACEOF
503d2be0 23715#define HAVE_WORKING_VFORK 1
c0d27fcc 23716_ACEOF
503d2be0
AS
23717
23718else
23719
c0d27fcc 23720cat >>confdefs.h <<\_ACEOF
73b77ee5 23721#define vfork fork
c0d27fcc 23722_ACEOF
fa0b693c
GM
23723
23724fi
503d2be0
AS
23725if test "x$ac_cv_func_fork_works" = xyes; then
23726
c0d27fcc 23727cat >>confdefs.h <<\_ACEOF
503d2be0 23728#define HAVE_WORKING_FORK 1
c0d27fcc 23729_ACEOF
fa0b693c 23730
503d2be0 23731fi
647847ea 23732
c0d27fcc 23733
ca81d7a0
JD
23734{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23735echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23736if test "${emacs_cv_langinfo_codeset+set}" = set; then
23737 echo $ECHO_N "(cached) $ECHO_C" >&6
23738else
23739 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23740/* confdefs.h. */
23741_ACEOF
23742cat confdefs.h >>conftest.$ac_ext
23743cat >>conftest.$ac_ext <<_ACEOF
23744/* end confdefs.h. */
6a3a24fa
JD
23745#include <langinfo.h>
23746int
23747main ()
23748{
23749char* cs = nl_langinfo(CODESET);
23750 ;
23751 return 0;
23752}
23753_ACEOF
23754rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23755if { (ac_try="$ac_link"
23756case "(($ac_try" in
23757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23758 *) ac_try_echo=$ac_try;;
23759esac
23760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23761 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23762 ac_status=$?
edfaf76d
LK
23763 grep -v '^ *+' conftest.er1 >conftest.err
23764 rm -f conftest.er1
23765 cat conftest.err >&5
6a3a24fa 23766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23767 (exit $ac_status); } && {
23768 test -z "$ac_c_werror_flag" ||
23769 test ! -s conftest.err
23770 } && test -s conftest$ac_exeext &&
23771 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23772 emacs_cv_langinfo_codeset=yes
23773else
23774 echo "$as_me: failed program was:" >&5
19650fd6
AS
23775sed 's/^/| /' conftest.$ac_ext >&5
23776
ca81d7a0 23777 emacs_cv_langinfo_codeset=no
6a3a24fa 23778fi
ca81d7a0 23779
f053c89f 23780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23781 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23782
23783fi
ca81d7a0
JD
23784{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23785echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23786if test $emacs_cv_langinfo_codeset = yes; then
23787
23788cat >>confdefs.h <<\_ACEOF
23789#define HAVE_LANGINFO_CODESET 1
23790_ACEOF
23791
23792fi
23793
ca81d7a0
JD
23794{ echo "$as_me:$LINENO: checking for size_t" >&5
23795echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23796if test "${ac_cv_type_size_t+set}" = set; then
23797 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23798else
503d2be0 23799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23800/* confdefs.h. */
23801_ACEOF
23802cat confdefs.h >>conftest.$ac_ext
23803cat >>conftest.$ac_ext <<_ACEOF
23804/* end confdefs.h. */
503d2be0 23805$ac_includes_default
ca81d7a0 23806typedef size_t ac__type_new_;
503d2be0
AS
23807int
23808main ()
23809{
ca81d7a0 23810if ((ac__type_new_ *) 0)
503d2be0 23811 return 0;
ca81d7a0 23812if (sizeof (ac__type_new_))
503d2be0
AS
23813 return 0;
23814 ;
23815 return 0;
23816}
23817_ACEOF
23818rm -f conftest.$ac_objext
ca81d7a0
JD
23819if { (ac_try="$ac_compile"
23820case "(($ac_try" in
23821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23822 *) ac_try_echo=$ac_try;;
23823esac
23824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23825 (eval "$ac_compile") 2>conftest.er1
503d2be0 23826 ac_status=$?
edfaf76d
LK
23827 grep -v '^ *+' conftest.er1 >conftest.err
23828 rm -f conftest.er1
23829 cat conftest.err >&5
c0d27fcc 23830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23831 (exit $ac_status); } && {
23832 test -z "$ac_c_werror_flag" ||
23833 test ! -s conftest.err
23834 } && test -s conftest.$ac_objext; then
8730a8da
DL
23835 ac_cv_type_size_t=yes
23836else
503d2be0 23837 echo "$as_me: failed program was:" >&5
19650fd6
AS
23838sed 's/^/| /' conftest.$ac_ext >&5
23839
ca81d7a0 23840 ac_cv_type_size_t=no
8730a8da 23841fi
ca81d7a0
JD
23842
23843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23844fi
ca81d7a0
JD
23845{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23846echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23847if test $ac_cv_type_size_t = yes; then
503d2be0 23848
c0d27fcc
MR
23849cat >>confdefs.h <<_ACEOF
23850#define HAVE_SIZE_T 1
23851_ACEOF
23852
8730a8da
DL
23853
23854fi
23855
c0d27fcc 23856
ca81d7a0
JD
23857{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23858echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23859if test "${ac_cv_type_mbstate_t+set}" = set; then
23860 echo $ECHO_N "(cached) $ECHO_C" >&6
23861else
23862 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23863/* confdefs.h. */
23864_ACEOF
23865cat confdefs.h >>conftest.$ac_ext
23866cat >>conftest.$ac_ext <<_ACEOF
23867/* end confdefs.h. */
973a76b1
DL
23868$ac_includes_default
23869# include <wchar.h>
23870int
23871main ()
23872{
23873mbstate_t x; return sizeof x;
23874 ;
23875 return 0;
23876}
23877_ACEOF
23878rm -f conftest.$ac_objext
ca81d7a0
JD
23879if { (ac_try="$ac_compile"
23880case "(($ac_try" in
23881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23882 *) ac_try_echo=$ac_try;;
23883esac
23884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23885 (eval "$ac_compile") 2>conftest.er1
973a76b1 23886 ac_status=$?
edfaf76d
LK
23887 grep -v '^ *+' conftest.er1 >conftest.err
23888 rm -f conftest.er1
23889 cat conftest.err >&5
973a76b1 23890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23891 (exit $ac_status); } && {
23892 test -z "$ac_c_werror_flag" ||
23893 test ! -s conftest.err
23894 } && test -s conftest.$ac_objext; then
973a76b1
DL
23895 ac_cv_type_mbstate_t=yes
23896else
23897 echo "$as_me: failed program was:" >&5
19650fd6
AS
23898sed 's/^/| /' conftest.$ac_ext >&5
23899
ca81d7a0 23900 ac_cv_type_mbstate_t=no
973a76b1 23901fi
ca81d7a0
JD
23902
23903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23904fi
ca81d7a0
JD
23905{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23906echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23907 if test $ac_cv_type_mbstate_t = yes; then
23908
23909cat >>confdefs.h <<\_ACEOF
23910#define HAVE_MBSTATE_T 1
23911_ACEOF
23912
23913 else
23914
23915cat >>confdefs.h <<\_ACEOF
23916#define mbstate_t int
23917_ACEOF
23918
23919 fi
23920
ca81d7a0
JD
23921{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23922echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23923if test "${emacs_cv_c_restrict+set}" = set; then
23924 echo $ECHO_N "(cached) $ECHO_C" >&6
23925else
23926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23927/* confdefs.h. */
23928_ACEOF
23929cat confdefs.h >>conftest.$ac_ext
23930cat >>conftest.$ac_ext <<_ACEOF
23931/* end confdefs.h. */
22044edf
DL
23932void fred (int *restrict x);
23933int
23934main ()
23935{
b936fae4 23936
22044edf
DL
23937 ;
23938 return 0;
23939}
c0d27fcc 23940_ACEOF
22044edf 23941rm -f conftest.$ac_objext
ca81d7a0
JD
23942if { (ac_try="$ac_compile"
23943case "(($ac_try" in
23944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23945 *) ac_try_echo=$ac_try;;
23946esac
23947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23948 (eval "$ac_compile") 2>conftest.er1
22044edf 23949 ac_status=$?
edfaf76d
LK
23950 grep -v '^ *+' conftest.er1 >conftest.err
23951 rm -f conftest.er1
23952 cat conftest.err >&5
22044edf 23953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23954 (exit $ac_status); } && {
23955 test -z "$ac_c_werror_flag" ||
23956 test ! -s conftest.err
23957 } && test -s conftest.$ac_objext; then
22044edf
DL
23958 emacs_cv_c_restrict=yes
23959else
23960 echo "$as_me: failed program was:" >&5
19650fd6
AS
23961sed 's/^/| /' conftest.$ac_ext >&5
23962
ca81d7a0 23963 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23964/* confdefs.h. */
23965_ACEOF
23966cat confdefs.h >>conftest.$ac_ext
23967cat >>conftest.$ac_ext <<_ACEOF
23968/* end confdefs.h. */
22044edf
DL
23969void fred (int *__restrict x);
23970int
23971main ()
23972{
c0d27fcc 23973
22044edf
DL
23974 ;
23975 return 0;
23976}
c0d27fcc 23977_ACEOF
22044edf 23978rm -f conftest.$ac_objext
ca81d7a0
JD
23979if { (ac_try="$ac_compile"
23980case "(($ac_try" in
23981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23982 *) ac_try_echo=$ac_try;;
23983esac
23984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23985 (eval "$ac_compile") 2>conftest.er1
22044edf 23986 ac_status=$?
edfaf76d
LK
23987 grep -v '^ *+' conftest.er1 >conftest.err
23988 rm -f conftest.er1
23989 cat conftest.err >&5
22044edf 23990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23991 (exit $ac_status); } && {
23992 test -z "$ac_c_werror_flag" ||
23993 test ! -s conftest.err
23994 } && test -s conftest.$ac_objext; then
22044edf
DL
23995 emacs_cv_c_restrict=__restrict
23996else
23997 echo "$as_me: failed program was:" >&5
19650fd6
AS
23998sed 's/^/| /' conftest.$ac_ext >&5
23999
ca81d7a0 24000 emacs_cv_c_restrict=no
ba4481b5 24001fi
ca81d7a0
JD
24002
24003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24004fi
ca81d7a0
JD
24005
24006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24007fi
ca81d7a0
JD
24008{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24009echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24010case "$emacs_cv_c_restrict" in
24011 yes) emacs_restrict=restrict;;
24012 no) emacs_restrict="";;
24013 *) emacs_restrict="$emacs_cv_c_restrict";;
24014esac
24015if test "$emacs_restrict" != __restrict; then
b936fae4 24016
22044edf
DL
24017cat >>confdefs.h <<_ACEOF
24018#define __restrict $emacs_restrict
c0d27fcc 24019_ACEOF
ba4481b5
DL
24020
24021fi
ba4481b5 24022
ca81d7a0
JD
24023{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24024echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24025if test "${emacs_cv_c_restrict_arr+set}" = set; then
24026 echo $ECHO_N "(cached) $ECHO_C" >&6
24027else
24028 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24029/* confdefs.h. */
24030_ACEOF
24031cat confdefs.h >>conftest.$ac_ext
24032cat >>conftest.$ac_ext <<_ACEOF
24033/* end confdefs.h. */
22044edf
DL
24034void fred (int x[__restrict]);
24035int
24036main ()
24037{
b936fae4 24038
22044edf
DL
24039 ;
24040 return 0;
24041}
c0d27fcc 24042_ACEOF
22044edf 24043rm -f conftest.$ac_objext
ca81d7a0
JD
24044if { (ac_try="$ac_compile"
24045case "(($ac_try" in
24046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24047 *) ac_try_echo=$ac_try;;
24048esac
24049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24050 (eval "$ac_compile") 2>conftest.er1
22044edf 24051 ac_status=$?
edfaf76d
LK
24052 grep -v '^ *+' conftest.er1 >conftest.err
24053 rm -f conftest.er1
24054 cat conftest.err >&5
22044edf 24055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24056 (exit $ac_status); } && {
24057 test -z "$ac_c_werror_flag" ||
24058 test ! -s conftest.err
24059 } && test -s conftest.$ac_objext; then
22044edf
DL
24060 emacs_cv_c_restrict_arr=yes
24061else
24062 echo "$as_me: failed program was:" >&5
19650fd6
AS
24063sed 's/^/| /' conftest.$ac_ext >&5
24064
ca81d7a0 24065 emacs_cv_c_restrict_arr=no
ba4481b5 24066fi
ca81d7a0
JD
24067
24068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24069fi
ca81d7a0
JD
24070{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24071echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24072if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24073
c0d27fcc 24074cat >>confdefs.h <<\_ACEOF
22044edf 24075#define __restrict_arr __restrict
c0d27fcc 24076_ACEOF
ba4481b5 24077
ba4481b5
DL
24078fi
24079
c0d27fcc 24080
c0d27fcc 24081
22044edf
DL
24082# Set up the CFLAGS for real compilation, so we can substitute it.
24083CFLAGS="$REAL_CFLAGS"
24084CPPFLAGS="$REAL_CPPFLAGS"
24085
24086#### Find out which version of Emacs this is.
24087version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24088 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24089if test x"${version}" = x; then
24090 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24091echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24092 { (exit 1); exit 1; }; }
24093fi
24094
24095### Specify what sort of things we'll be editing into Makefile and config.h.
24096### Use configuration here uncanonicalized to avoid exceeding size limits.
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
6a3a24fa 24129
06b62770
AR
24130
24131
24132
48fad8e8
DN
24133
24134
edfda783 24135
22044edf
DL
24136
24137
24138cat >>confdefs.h <<_ACEOF
24139#define EMACS_CONFIGURATION "${canonical}"
24140_ACEOF
24141
24142
24143cat >>confdefs.h <<_ACEOF
24144#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24145_ACEOF
24146
24147
24148cat >>confdefs.h <<_ACEOF
24149#define config_machfile "${machfile}"
24150_ACEOF
24151
24152
24153cat >>confdefs.h <<_ACEOF
24154#define config_opsysfile "${opsysfile}"
24155_ACEOF
24156
24157
24158cat >>confdefs.h <<_ACEOF
24159#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24160_ACEOF
24161
24162
24163cat >>confdefs.h <<_ACEOF
24164#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24165_ACEOF
24166
24167
24168cat >>confdefs.h <<_ACEOF
24169#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24170_ACEOF
24171
24172
24173cat >>confdefs.h <<_ACEOF
24174#define UNEXEC_SRC ${UNEXEC_SRC}
24175_ACEOF
24176
24177
24178if test "${HAVE_X_WINDOWS}" = "yes" ; then
24179
24180cat >>confdefs.h <<\_ACEOF
24181#define HAVE_X_WINDOWS 1
24182_ACEOF
24183
24184fi
24185if test "${USE_X_TOOLKIT}" != "none" ; then
24186
24187cat >>confdefs.h <<\_ACEOF
24188#define USE_X_TOOLKIT 1
24189_ACEOF
24190
39dd4d52 24191 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24192
24193cat >>confdefs.h <<\_ACEOF
24194#define USE_LUCID 1
24195_ACEOF
24196
39dd4d52 24197 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24198
24199cat >>confdefs.h <<\_ACEOF
24200#define USE_MOTIF 1
24201_ACEOF
24202
24203 fi
22044edf
DL
24204fi
24205if test "${HAVE_X11}" = "yes" ; then
24206
24207cat >>confdefs.h <<\_ACEOF
24208#define HAVE_X11 1
24209_ACEOF
24210
22044edf
DL
24211fi
24212if test "${HAVE_MENUS}" = "yes" ; then
24213
24214cat >>confdefs.h <<\_ACEOF
24215#define HAVE_MENUS 1
24216_ACEOF
24217
24218fi
24219if test "${GNU_MALLOC}" = "yes" ; then
24220
24221cat >>confdefs.h <<\_ACEOF
24222#define GNU_MALLOC 1
24223_ACEOF
24224
24225fi
24226if test "${REL_ALLOC}" = "yes" ; then
24227
24228cat >>confdefs.h <<\_ACEOF
24229#define REL_ALLOC 1
24230_ACEOF
24231
24232fi
24233
24234
24235
c0d27fcc
MR
24236
24237
5afbeb22 24238
ba4481b5 24239#### Report on what we decided to do.
488dd4c4
JD
24240#### Report GTK as a toolkit, even if it doesn't use Xt.
24241#### It makes printing result more understandable as using GTK sets
24242#### toolkit_scroll_bars to yes by default.
24243if test "${HAVE_GTK}" = "yes"; then
24244 USE_X_TOOLKIT=GTK
24245fi
24246
ba4481b5
DL
24247echo "
24248Configured for \`${canonical}'.
24249
24250 Where should the build process find the source code? ${srcdir}
24251 What operating system and machine description files should Emacs use?
24252 \`${opsysfile}' and \`${machfile}'
24253 What compiler should emacs be built with? ${CC} ${CFLAGS}
24254 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24255 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24256 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24257 What window system should Emacs use? ${window_system}
8e967cf7 24258 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24259
24260if test -n "${x_includes}"; then
24261echo " Where do we find X Windows header files? ${x_includes}"
24262else
24263echo " Where do we find X Windows header files? Standard dirs"
24264fi
24265if test -n "${x_libraries}"; then
24266echo " Where do we find X Windows libraries? ${x_libraries}"
24267else
24268echo " Where do we find X Windows libraries? Standard dirs"
24269fi
24270
24271echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24272echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24273echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24274echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24275echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24276echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24277echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24278echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24279echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24280
edfda783
AR
24281echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24282echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24283echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24284echo " Does Emacs use -lxft? ${HAVE_XFT}"
24285
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 24291 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24292fi
05cf15c6 24293
ca34d75a
JD
24294echo
24295
a2d3b5bd
JD
24296if test "$USE_X_TOOLKIT" = GTK; then
24297 case "$canonical" in
24298 *cygwin*)
24299 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24300 will probably get a crash on startup. If this happens, please use another
24301 toolkit for Emacs. See etc/PROBLEMS for more information."
24302 ;;
24303 esac
24304fi
24305
06b62770
AR
24306if test "$HAVE_NS" = "yes"; then
24307 echo
24308 echo "You must run \"make install\" in order to test the built application.
24309The installed application will go to nextstep/Emacs.app and can be
24310run or moved from there."
24311 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24312 echo "The application will be fully self-contained."
24313 else
24314 echo "The lisp resources for the application will be installed under ${prefix}.
24315You may need to run \"make install\" with sudo. The application will fail
24316to run if these resources are not installed."
24317 fi
24318 echo
24319fi
24320
131e4133
MA
24321if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24322 echo "D-Bus integration has been tested for GNU/Linux only."
24323 echo
24324fi
24325
05cf15c6 24326
ba4481b5
DL
24327# Remove any trailing slashes in these variables.
24328test "${prefix}" != NONE &&
24329 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24330test "${exec_prefix}" != NONE &&
24331 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24332
8acdcf6f
GM
24333# Now get this: Some word that is part of the ${srcdir} directory name
24334# or the ${configuration} value might, just might, happen to be an
24335# identifier like `sun4' or `i386' or something, and be predefined by
24336# the C preprocessor to some helpful value like 1, or maybe the empty
24337# string. Needless to say consequent macro substitutions are less
24338# than conducive to the makefile finding the correct directory.
24339cpp_undefs="`echo $srcdir $configuration $canonical |
24340 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24341 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24342
d0e9bfd2
GM
24343## Check if the C preprocessor will convert `..' to `. .'. If so, set
24344## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24345## from Makefile.c can correctly provide the arg `-traditional' to the
24346## C preprocessor.
24347
503d2be0 24348cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24349/* confdefs.h. */
24350_ACEOF
24351cat confdefs.h >>conftest.$ac_ext
24352cat >>conftest.$ac_ext <<_ACEOF
24353/* end confdefs.h. */
d0e9bfd2 24354yes..yes
503d2be0 24355_ACEOF
d0e9bfd2 24356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24357 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24358 CPP_NEED_TRADITIONAL=no
24359else
d0e9bfd2
GM
24360 CPP_NEED_TRADITIONAL=yes
24361fi
24362rm -f conftest*
24363
c0d27fcc 24364
f657c21b 24365ac_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
24366
24367ac_config_commands="$ac_config_commands default"
24368
503d2be0 24369cat >confcache <<\_ACEOF
ba4481b5
DL
24370# This file is a shell script that caches the results of configure
24371# tests run on this system so they can be shared between configure
503d2be0
AS
24372# scripts and configure runs, see configure's option --config-cache.
24373# It is not useful on other systems. If it contains results you don't
24374# want to keep, you may remove or edit it.
ba4481b5 24375#
503d2be0
AS
24376# config.status only pays attention to the cache file if you give it
24377# the --recheck option to rerun configure.
ba4481b5 24378#
6bae0ccf 24379# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24380# loading this file, other *unset* `ac_cv_foo' will be assigned the
24381# following values.
24382
24383_ACEOF
24384
ba4481b5
DL
24385# The following way of writing the cache mishandles newlines in values,
24386# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24387# So, we kill variables containing newlines.
ba4481b5
DL
24388# Ultrix sh set writes to stderr and can't be redirected directly,
24389# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24390(
24391 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24392 eval ac_val=\$$ac_var
24393 case $ac_val in #(
24394 *${as_nl}*)
24395 case $ac_var in #(
24396 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24397echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24398 esac
24399 case $ac_var in #(
24400 _ | IFS | as_nl) ;; #(
24401 *) $as_unset $ac_var ;;
24402 esac ;;
24403 esac
24404 done
24405
503d2be0 24406 (set) 2>&1 |
ca81d7a0
JD
24407 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24408 *${as_nl}ac_space=\ *)
503d2be0
AS
24409 # `set' does not quote correctly, so add quotes (double-quote
24410 # substitution turns \\\\ into \\, and sed turns \\ into \).
24411 sed -n \
edfaf76d
LK
24412 "s/'/'\\\\''/g;
24413 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24414 ;; #(
503d2be0
AS
24415 *)
24416 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24417 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24418 ;;
ca81d7a0
JD
24419 esac |
24420 sort
24421) |
503d2be0 24422 sed '
ca81d7a0 24423 /^ac_cv_env_/b end
503d2be0 24424 t clear
ca81d7a0 24425 :clear
503d2be0
AS
24426 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24427 t end
ca81d7a0
JD
24428 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24429 :end' >>confcache
24430if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24431 if test -w "$cache_file"; then
24432 test "x$cache_file" != "x/dev/null" &&
24433 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24434echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24435 cat confcache >$cache_file
ba4481b5 24436 else
ca81d7a0
JD
24437 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24438echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24439 fi
24440fi
24441rm -f confcache
24442
ba4481b5
DL
24443test "x$prefix" = xNONE && prefix=$ac_default_prefix
24444# Let make expand exec_prefix.
24445test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24446
ba4481b5
DL
24447DEFS=-DHAVE_CONFIG_H
24448
6bae0ccf
DL
24449ac_libobjs=
24450ac_ltlibobjs=
24451for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24452 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24453 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24454 ac_i=`echo "$ac_i" | sed "$ac_script"`
24455 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24456 # will be set to the directory where LIBOBJS objects are built.
24457 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24458 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24459done
24460LIBOBJS=$ac_libobjs
24461
24462LTLIBOBJS=$ac_ltlibobjs
24463
24464
c0d27fcc 24465
ba4481b5 24466: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24467ac_clean_files_save=$ac_clean_files
24468ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24469{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24470echo "$as_me: creating $CONFIG_STATUS" >&6;}
24471cat >$CONFIG_STATUS <<_ACEOF
24472#! $SHELL
c0d27fcc 24473# Generated by $as_me.
ba4481b5 24474# Run this file to recreate the current configuration.
ba4481b5 24475# Compiler output produced by configure, useful for debugging
503d2be0 24476# configure, is in config.log if it exists.
ba4481b5 24477
503d2be0 24478debug=false
19650fd6
AS
24479ac_cs_recheck=false
24480ac_cs_silent=false
503d2be0 24481SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24482_ACEOF
24483
24484cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24485## --------------------- ##
24486## M4sh Initialization. ##
24487## --------------------- ##
24488
f053c89f
CY
24489# Be more Bourne compatible
24490DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24491if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24492 emulate sh
24493 NULLCMD=:
6bae0ccf
DL
24494 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24495 # is contrary to our usage. Disable this feature.
24496 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24497 setopt NO_GLOB_SUBST
24498else
f053c89f
CY
24499 case `(set -o) 2>/dev/null` in
24500 *posix*) set -o posix ;;
24501esac
24502
503d2be0 24503fi
f053c89f
CY
24504
24505
503d2be0 24506
ca81d7a0
JD
24507
24508# PATH needs CR
24509# Avoid depending upon Character Ranges.
24510as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24511as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24512as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24513as_cr_digits='0123456789'
24514as_cr_alnum=$as_cr_Letters$as_cr_digits
24515
24516# The user is always right.
24517if test "${PATH_SEPARATOR+set}" != set; then
24518 echo "#! /bin/sh" >conf$$.sh
24519 echo "exit 0" >>conf$$.sh
24520 chmod +x conf$$.sh
24521 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24522 PATH_SEPARATOR=';'
24523 else
24524 PATH_SEPARATOR=:
24525 fi
24526 rm -f conf$$.sh
503d2be0
AS
24527fi
24528
c0d27fcc 24529# Support unset when possible.
edfaf76d 24530if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24531 as_unset=unset
24532else
24533 as_unset=false
24534fi
24535
6bae0ccf 24536
ca81d7a0
JD
24537# IFS
24538# We need space, tab and new line, in precisely that order. Quoting is
24539# there to prevent editors from complaining about space-tab.
24540# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24541# splitting by setting IFS to empty value.)
24542as_nl='
24543'
24544IFS=" "" $as_nl"
24545
24546# Find who we are. Look in the path if we contain no directory separator.
24547case $0 in
24548 *[\\/]* ) as_myself=$0 ;;
24549 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24550for as_dir in $PATH
24551do
24552 IFS=$as_save_IFS
24553 test -z "$as_dir" && as_dir=.
24554 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24555done
24556IFS=$as_save_IFS
24557
24558 ;;
24559esac
24560# We did not find ourselves, most probably we were run as `sh COMMAND'
24561# in which case we are not to be found in the path.
24562if test "x$as_myself" = x; then
24563 as_myself=$0
24564fi
24565if test ! -f "$as_myself"; then
24566 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24567 { (exit 1); exit 1; }
24568fi
24569
6bae0ccf 24570# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24571for as_var in ENV MAIL MAILPATH
24572do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24573done
6bae0ccf
DL
24574PS1='$ '
24575PS2='> '
24576PS4='+ '
24577
24578# NLS nuisances.
19650fd6
AS
24579for as_var in \
24580 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24581 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24582 LC_TELEPHONE LC_TIME
6bae0ccf 24583do
edfaf76d 24584 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24585 eval $as_var=C; export $as_var
24586 else
ca81d7a0 24587 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24588 fi
24589done
24590
24591# Required to use basename.
ca81d7a0
JD
24592if expr a : '\(a\)' >/dev/null 2>&1 &&
24593 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24594 as_expr=expr
24595else
24596 as_expr=false
24597fi
24598
ca81d7a0 24599if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24600 as_basename=basename
24601else
24602 as_basename=false
24603fi
c0d27fcc
MR
24604
24605
503d2be0 24606# Name of the executable.
ca81d7a0 24607as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24608$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24609 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24610 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24611echo X/"$0" |
ca81d7a0
JD
24612 sed '/^.*\/\([^/][^/]*\)\/*$/{
24613 s//\1/
24614 q
24615 }
24616 /^X\/\(\/\/\)$/{
24617 s//\1/
24618 q
24619 }
24620 /^X\/\(\/\).*/{
24621 s//\1/
24622 q
24623 }
24624 s/.*/./; q'`
c0d27fcc 24625
ca81d7a0
JD
24626# CDPATH.
24627$as_unset CDPATH
c0d27fcc
MR
24628
24629
c0d27fcc 24630
c0d27fcc 24631 as_lineno_1=$LINENO
c0d27fcc 24632 as_lineno_2=$LINENO
c0d27fcc 24633 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24634 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24635
24636 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24637 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24638 # line-number line after each line using $LINENO; the second 'sed'
24639 # does the real work. The second script uses 'N' to pair each
24640 # line-number line with the line containing $LINENO, and appends
24641 # trailing '-' during substitution so that $LINENO is not a special
24642 # case at line end.
c0d27fcc 24643 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24644 # scripts with optimization help from Paolo Bonzini. Blame Lee
24645 # E. McMahon (1931-1989) for sed's syntax. :-)
24646 sed -n '
24647 p
24648 /[$]LINENO/=
24649 ' <$as_myself |
c0d27fcc 24650 sed '
ca81d7a0
JD
24651 s/[$]LINENO.*/&-/
24652 t lineno
24653 b
24654 :lineno
c0d27fcc 24655 N
ca81d7a0
JD
24656 :loop
24657 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24658 t loop
ca81d7a0 24659 s/-\n.*//
c0d27fcc 24660 ' >$as_me.lineno &&
ca81d7a0
JD
24661 chmod +x "$as_me.lineno" ||
24662 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24663 { (exit 1); exit 1; }; }
24664
24665 # Don't try to exec as it changes $[0], causing all sort of problems
24666 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24667 # original and so on. Autoconf is especially sensitive to this).
24668 . "./$as_me.lineno"
c0d27fcc
MR
24669 # Exit status is that of the last command.
24670 exit
24671}
24672
24673
ca81d7a0
JD
24674if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24675 as_dirname=dirname
24676else
24677 as_dirname=false
24678fi
24679
24680ECHO_C= ECHO_N= ECHO_T=
24681case `echo -n x` in
24682-n*)
24683 case `echo 'x\c'` in
24684 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24685 *) ECHO_C='\c';;
24686 esac;;
24687*)
24688 ECHO_N='-n';;
c0d27fcc 24689esac
503d2be0 24690
ca81d7a0
JD
24691if expr a : '\(a\)' >/dev/null 2>&1 &&
24692 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24693 as_expr=expr
24694else
24695 as_expr=false
24696fi
24697
24698rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24699if test -d conf$$.dir; then
24700 rm -f conf$$.dir/conf$$.file
24701else
24702 rm -f conf$$.dir
24703 mkdir conf$$.dir
24704fi
503d2be0
AS
24705echo >conf$$.file
24706if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24707 as_ln_s='ln -s'
24708 # ... but there are two gotchas:
24709 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24710 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24711 # In both cases, we have to default to `cp -p'.
24712 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24713 as_ln_s='cp -p'
503d2be0
AS
24714elif ln conf$$.file conf$$ 2>/dev/null; then
24715 as_ln_s=ln
24716else
24717 as_ln_s='cp -p'
24718fi
ca81d7a0
JD
24719rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24720rmdir conf$$.dir 2>/dev/null
503d2be0 24721
6bae0ccf
DL
24722if mkdir -p . 2>/dev/null; then
24723 as_mkdir_p=:
24724else
edfaf76d 24725 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24726 as_mkdir_p=false
24727fi
24728
f053c89f
CY
24729if test -x / >/dev/null 2>&1; then
24730 as_test_x='test -x'
ca81d7a0 24731else
f053c89f
CY
24732 if ls -dL / >/dev/null 2>&1; then
24733 as_ls_L_option=L
24734 else
24735 as_ls_L_option=
24736 fi
24737 as_test_x='
24738 eval sh -c '\''
24739 if test -d "$1"; then
24740 test -d "$1/.";
24741 else
24742 case $1 in
24743 -*)set "./$1";;
24744 esac;
24745 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24746 ???[sx]*):;;*)false;;esac;fi
24747 '\'' sh
24748 '
ca81d7a0 24749fi
f053c89f 24750as_executable_p=$as_test_x
503d2be0 24751
c0d27fcc 24752# Sed expression to map a string onto a valid CPP name.
edfaf76d 24753as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24754
24755# Sed expression to map a string onto a valid variable name.
edfaf76d 24756as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24757
503d2be0 24758
503d2be0
AS
24759exec 6>&1
24760
ca81d7a0 24761# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24762# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24763# values after options handling.
24764ac_log="
5d374ce1 24765This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24766generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24767
24768 CONFIG_FILES = $CONFIG_FILES
24769 CONFIG_HEADERS = $CONFIG_HEADERS
24770 CONFIG_LINKS = $CONFIG_LINKS
24771 CONFIG_COMMANDS = $CONFIG_COMMANDS
24772 $ $0 $@
24773
ca81d7a0
JD
24774on `(hostname || uname -n) 2>/dev/null | sed 1q`
24775"
24776
503d2be0
AS
24777_ACEOF
24778
ca81d7a0 24779cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24780# Files that config.status was made for.
ca81d7a0
JD
24781config_files="$ac_config_files"
24782config_headers="$ac_config_headers"
24783config_commands="$ac_config_commands"
503d2be0 24784
ca81d7a0 24785_ACEOF
503d2be0 24786
c0d27fcc 24787cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24788ac_cs_usage="\
24789\`$as_me' instantiates files from templates according to the
24790current configuration.
24791
24792Usage: $0 [OPTIONS] [FILE]...
24793
24794 -h, --help print this help, then exit
f053c89f 24795 -V, --version print version number and configuration settings, then exit
19650fd6 24796 -q, --quiet do not print progress messages
503d2be0
AS
24797 -d, --debug don't remove temporary files
24798 --recheck update $as_me by reconfiguring in the same conditions
24799 --file=FILE[:TEMPLATE]
edfaf76d 24800 instantiate the configuration file FILE
503d2be0 24801 --header=FILE[:TEMPLATE]
edfaf76d 24802 instantiate the configuration header FILE
503d2be0
AS
24803
24804Configuration files:
24805$config_files
24806
24807Configuration headers:
24808$config_headers
24809
24810Configuration commands:
24811$config_commands
24812
24813Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24814
ca81d7a0 24815_ACEOF
c0d27fcc 24816cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24817ac_cs_version="\\
5d374ce1 24818emacs config.status 23.0.60
f053c89f 24819configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24820 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24821
ca81d7a0 24822Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24823This config.status script is free software; the Free Software Foundation
24824gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24825
24826ac_pwd='$ac_pwd'
24827srcdir='$srcdir'
24828INSTALL='$INSTALL'
c0d27fcc 24829_ACEOF
503d2be0 24830
c0d27fcc 24831cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24832# If no file are specified by the user, then we need to provide default
24833# value. By we need to know if files were specified by the user.
24834ac_need_defaults=:
24835while test $# != 0
ba4481b5 24836do
503d2be0
AS
24837 case $1 in
24838 --*=*)
ca81d7a0
JD
24839 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24840 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24841 ac_shift=:
24842 ;;
ca81d7a0 24843 *)
6bae0ccf
DL
24844 ac_option=$1
24845 ac_optarg=$2
24846 ac_shift=shift
503d2be0 24847 ;;
503d2be0
AS
24848 esac
24849
6bae0ccf 24850 case $ac_option in
503d2be0 24851 # Handling of the options.
19650fd6
AS
24852 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24853 ac_cs_recheck=: ;;
ca81d7a0
JD
24854 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24855 echo "$ac_cs_version"; exit ;;
24856 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24857 debug=: ;;
24858 --file | --fil | --fi | --f )
6bae0ccf
DL
24859 $ac_shift
24860 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24861 ac_need_defaults=false;;
24862 --header | --heade | --head | --hea )
6bae0ccf
DL
24863 $ac_shift
24864 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24865 ac_need_defaults=false;;
ca81d7a0
JD
24866 --he | --h)
24867 # Conflict between --help and --header
24868 { echo "$as_me: error: ambiguous option: $1
24869Try \`$0 --help' for more information." >&2
24870 { (exit 1); exit 1; }; };;
24871 --help | --hel | -h )
24872 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24873 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24874 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24875 ac_cs_silent=: ;;
503d2be0
AS
24876
24877 # This is an error.
ca81d7a0
JD
24878 -*) { echo "$as_me: error: unrecognized option: $1
24879Try \`$0 --help' for more information." >&2
503d2be0
AS
24880 { (exit 1); exit 1; }; } ;;
24881
ca81d7a0
JD
24882 *) ac_config_targets="$ac_config_targets $1"
24883 ac_need_defaults=false ;;
503d2be0 24884
ba4481b5 24885 esac
503d2be0 24886 shift
ba4481b5
DL
24887done
24888
19650fd6
AS
24889ac_configure_extra_args=
24890
24891if $ac_cs_silent; then
24892 exec 6>/dev/null
24893 ac_configure_extra_args="$ac_configure_extra_args --silent"
24894fi
24895
24896_ACEOF
24897cat >>$CONFIG_STATUS <<_ACEOF
24898if \$ac_cs_recheck; then
ca81d7a0
JD
24899 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24900 CONFIG_SHELL=$SHELL
24901 export CONFIG_SHELL
24902 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24903fi
24904
503d2be0 24905_ACEOF
ca81d7a0
JD
24906cat >>$CONFIG_STATUS <<\_ACEOF
24907exec 5>>config.log
24908{
24909 echo
24910 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24911## Running $as_me. ##
24912_ASBOX
24913 echo "$ac_log"
24914} >&5
ba4481b5 24915
ca81d7a0 24916_ACEOF
c0d27fcc 24917cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24918#
ca81d7a0 24919# INIT-COMMANDS
503d2be0 24920#
8acdcf6f 24921GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 24922
c0d27fcc
MR
24923_ACEOF
24924
c0d27fcc 24925cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24926
24927# Handling of arguments.
503d2be0
AS
24928for ac_config_target in $ac_config_targets
24929do
ca81d7a0
JD
24930 case $ac_config_target in
24931 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24932 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24933 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24934 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24935 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24936 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24937 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24938 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24939 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24940 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24941 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24942 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24943 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24944
c0d27fcc 24945 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24946echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24947 { (exit 1); exit 1; }; };;
24948 esac
ba4481b5 24949done
503d2be0 24950
ca81d7a0 24951
503d2be0
AS
24952# If the user did not use the arguments to specify the items to instantiate,
24953# then the envvar interface is used. Set only those that are not.
24954# We use the long form for the default assignment because of an extremely
24955# bizarre bug on SunOS 4.1.3.
24956if $ac_need_defaults; then
24957 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24958 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24959 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24960fi
503d2be0 24961
19650fd6 24962# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24963# simply because there is no reason against having it here, and in addition,
19650fd6 24964# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24965# Hook for its removal unless debugging.
24966# Note that there is a small window in which the directory will not be cleaned:
24967# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24968$debug ||
24969{
ca81d7a0
JD
24970 tmp=
24971 trap 'exit_status=$?
24972 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24973' 0
503d2be0
AS
24974 trap '{ (exit 1); exit 1; }' 1 2 13 15
24975}
503d2be0 24976# Create a (secure) tmp directory for tmp files.
19650fd6 24977
503d2be0 24978{
ca81d7a0 24979 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24980 test -n "$tmp" && test -d "$tmp"
24981} ||
24982{
ca81d7a0
JD
24983 tmp=./conf$$-$RANDOM
24984 (umask 077 && mkdir "$tmp")
503d2be0
AS
24985} ||
24986{
19650fd6 24987 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24988 { (exit 1); exit 1; }
24989}
24990
503d2be0 24991#
ca81d7a0 24992# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24993#
24994
24995# No need to generate the scripts if there are no CONFIG_FILES.
24996# This happens for instance when ./config.status config.h
ca81d7a0
JD
24997if test -n "$CONFIG_FILES"; then
24998
24999_ACEOF
25000
25001
25002
25003ac_delim='%!_!# '
25004for ac_last_try in false false false false false :; do
25005 cat >conf$$subs.sed <<_ACEOF
25006SHELL!$SHELL$ac_delim
25007PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25008PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25009PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25010PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25011PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25012PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25013exec_prefix!$exec_prefix$ac_delim
25014prefix!$prefix$ac_delim
25015program_transform_name!$program_transform_name$ac_delim
25016bindir!$bindir$ac_delim
25017sbindir!$sbindir$ac_delim
25018libexecdir!$libexecdir$ac_delim
25019datarootdir!$datarootdir$ac_delim
25020datadir!$datadir$ac_delim
25021sysconfdir!$sysconfdir$ac_delim
25022sharedstatedir!$sharedstatedir$ac_delim
25023localstatedir!$localstatedir$ac_delim
25024includedir!$includedir$ac_delim
25025oldincludedir!$oldincludedir$ac_delim
25026docdir!$docdir$ac_delim
25027infodir!$infodir$ac_delim
25028htmldir!$htmldir$ac_delim
25029dvidir!$dvidir$ac_delim
25030pdfdir!$pdfdir$ac_delim
25031psdir!$psdir$ac_delim
25032libdir!$libdir$ac_delim
25033localedir!$localedir$ac_delim
25034mandir!$mandir$ac_delim
25035DEFS!$DEFS$ac_delim
25036ECHO_C!$ECHO_C$ac_delim
25037ECHO_N!$ECHO_N$ac_delim
25038ECHO_T!$ECHO_T$ac_delim
25039LIBS!$LIBS$ac_delim
25040build_alias!$build_alias$ac_delim
25041host_alias!$host_alias$ac_delim
25042target_alias!$target_alias$ac_delim
25043MAINT!$MAINT$ac_delim
25044build!$build$ac_delim
25045build_cpu!$build_cpu$ac_delim
25046build_vendor!$build_vendor$ac_delim
25047build_os!$build_os$ac_delim
25048host!$host$ac_delim
25049host_cpu!$host_cpu$ac_delim
25050host_vendor!$host_vendor$ac_delim
25051host_os!$host_os$ac_delim
25052CC!$CC$ac_delim
25053CFLAGS!$CFLAGS$ac_delim
25054LDFLAGS!$LDFLAGS$ac_delim
25055CPPFLAGS!$CPPFLAGS$ac_delim
25056ac_ct_CC!$ac_ct_CC$ac_delim
25057EXEEXT!$EXEEXT$ac_delim
25058OBJEXT!$OBJEXT$ac_delim
25059CPP!$CPP$ac_delim
25060GREP!$GREP$ac_delim
25061EGREP!$EGREP$ac_delim
25062LN_S!$LN_S$ac_delim
25063INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25064INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25065INSTALL_DATA!$INSTALL_DATA$ac_delim
25066RANLIB!$RANLIB$ac_delim
25067INSTALL_INFO!$INSTALL_INFO$ac_delim
25068GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25069MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25070LIBSOUND!$LIBSOUND$ac_delim
25071PKG_CONFIG!$PKG_CONFIG$ac_delim
25072ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25073ALSA_LIBS!$ALSA_LIBS$ac_delim
25074CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25075SET_MAKE!$SET_MAKE$ac_delim
25076XMKMF!$XMKMF$ac_delim
cfe440b8 25077HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25078RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25079RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25080GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25081GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25082DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25083DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
25084XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25085XFT_LIBS!$XFT_LIBS$ac_delim
25086FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25087FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25088FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25089FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25090LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25091LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25092M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25093M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25094ALLOCA!$ALLOCA$ac_delim
25095liblockfile!$liblockfile$ac_delim
25096LIBOBJS!$LIBOBJS$ac_delim
25097NEED_SETGID!$NEED_SETGID$ac_delim
25098KMEM_GROUP!$KMEM_GROUP$ac_delim
25099GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25100GETOPT_H!$GETOPT_H$ac_delim
25101GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25102version!$version$ac_delim
ca81d7a0
JD
25103_ACEOF
25104
25105 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25106 break
25107 elif $ac_last_try; then
25108 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25109echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25110 { (exit 1); exit 1; }; }
25111 else
25112 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25113 fi
ca81d7a0
JD
25114done
25115
25116ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25117if test -n "$ac_eof"; then
25118 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25119 ac_eof=`expr $ac_eof + 1`
25120fi
503d2be0 25121
c0d27fcc 25122cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25123cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25124/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25125_ACEOF
25126sed '
25127s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25128s/^/s,@/; s/!/@,|#_!!_#|/
25129:n
25130t n
25131s/'"$ac_delim"'$/,g/; t
25132s/$/\\/; p
25133N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25134' >>$CONFIG_STATUS <conf$$subs.sed
25135rm -f conf$$subs.sed
25136cat >>$CONFIG_STATUS <<_ACEOF
25137CEOF$ac_eof
25138_ACEOF
503d2be0 25139
ca81d7a0
JD
25140
25141ac_delim='%!_!# '
25142for ac_last_try in false false false false false :; do
25143 cat >conf$$subs.sed <<_ACEOF
0bd50841 25144configuration!$configuration$ac_delim
7f0942ba
KH
25145canonical!$canonical$ac_delim
25146srcdir!$srcdir$ac_delim
1bb9a689
MB
25147lispdir!$lispdir$ac_delim
25148locallisppath!$locallisppath$ac_delim
25149lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25150x_default_search_path!$x_default_search_path$ac_delim
25151etcdir!$etcdir$ac_delim
25152archlibdir!$archlibdir$ac_delim
25153bitmapdir!$bitmapdir$ac_delim
25154gamedir!$gamedir$ac_delim
25155gameuser!$gameuser$ac_delim
25156c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25157c_switch_machine!$c_switch_machine$ac_delim
25158LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25159LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25160C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25161X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25162machfile!$machfile$ac_delim
25163opsysfile!$opsysfile$ac_delim
edfda783 25164ns_appdir!$ns_appdir$ac_delim
06b62770
AR
25165ns_appbindir!$ns_appbindir$ac_delim
25166ns_appresdir!$ns_appresdir$ac_delim
25167ns_appsrc!$ns_appsrc$ac_delim
facfbbbd 25168GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
48fad8e8
DN
25169GNU_OBJC_CFLAGS!$GNU_OBJC_CFLAGS$ac_delim
25170LIB_SRC_EXTRA_INSTALLABLES!$LIB_SRC_EXTRA_INSTALLABLES$ac_delim
ca81d7a0
JD
25171LTLIBOBJS!$LTLIBOBJS$ac_delim
25172_ACEOF
503d2be0 25173
48fad8e8 25174 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
c24fa7dc
MB
25175 break
25176 elif $ac_last_try; then
25177 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25178echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25179 { (exit 1); exit 1; }; }
25180 else
25181 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25182 fi
ca81d7a0
JD
25183done
25184
25185ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25186if test -n "$ac_eof"; then
25187 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25188 ac_eof=`expr $ac_eof + 1`
25189fi
ba4481b5 25190
ca81d7a0
JD
25191cat >>$CONFIG_STATUS <<_ACEOF
25192cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25193/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25194_ACEOF
25195sed '
25196s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25197s/^/s,@/; s/!/@,|#_!!_#|/
25198:n
25199t n
25200s/'"$ac_delim"'$/,g/; t
25201s/$/\\/; p
25202N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25203' >>$CONFIG_STATUS <conf$$subs.sed
25204rm -f conf$$subs.sed
25205cat >>$CONFIG_STATUS <<_ACEOF
25206:end
25207s/|#_!!_#|//g
25208CEOF$ac_eof
c0d27fcc 25209_ACEOF
ca81d7a0
JD
25210
25211
25212# VPATH may cause trouble with some makes, so we remove $(srcdir),
25213# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25214# trailing colons and then remove the whole line if VPATH becomes empty
25215# (actually we leave an empty line to preserve line numbers).
25216if test "x$srcdir" = x.; then
25217 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25218s/:*\$(srcdir):*/:/
25219s/:*\${srcdir}:*/:/
25220s/:*@srcdir@:*/:/
25221s/^\([^=]*=[ ]*\):*/\1/
25222s/:*$//
25223s/^[^=]*=[ ]*$//
25224}'
25225fi
25226
c0d27fcc 25227cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25228fi # test -n "$CONFIG_FILES"
25229
25230
25231for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25232do
25233 case $ac_tag in
25234 :[FHLC]) ac_mode=$ac_tag; continue;;
25235 esac
25236 case $ac_mode$ac_tag in
25237 :[FHL]*:*);;
25238 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25239echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25240 { (exit 1); exit 1; }; };;
25241 :[FH]-) ac_tag=-:-;;
25242 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25243 esac
25244 ac_save_IFS=$IFS
25245 IFS=:
25246 set x $ac_tag
25247 IFS=$ac_save_IFS
25248 shift
25249 ac_file=$1
25250 shift
25251
25252 case $ac_mode in
25253 :L) ac_source=$1;;
25254 :[FH])
25255 ac_file_inputs=
25256 for ac_f
25257 do
25258 case $ac_f in
25259 -) ac_f="$tmp/stdin";;
25260 *) # Look for the file first in the build tree, then in the source tree
25261 # (if the path is not absolute). The absolute path cannot be DOS-style,
25262 # because $ac_f cannot contain `:'.
25263 test -f "$ac_f" ||
25264 case $ac_f in
25265 [\\/$]*) false;;
25266 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25267 esac ||
25268 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25269echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25270 { (exit 1); exit 1; }; };;
25271 esac
25272 ac_file_inputs="$ac_file_inputs $ac_f"
25273 done
25274
25275 # Let's still pretend it is `configure' which instantiates (i.e., don't
25276 # use $as_me), people would be surprised to read:
25277 # /* config.h. Generated by config.status. */
25278 configure_input="Generated from "`IFS=:
25279 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25280 if test x"$ac_file" != x-; then
25281 configure_input="$ac_file. $configure_input"
25282 { echo "$as_me:$LINENO: creating $ac_file" >&5
25283echo "$as_me: creating $ac_file" >&6;}
25284 fi
25285
25286 case $ac_tag in
25287 *:-:* | *:-) cat >"$tmp/stdin";;
25288 esac
25289 ;;
ba4481b5
DL
25290 esac
25291
ca81d7a0 25292 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25293$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25294 X"$ac_file" : 'X\(//\)[^/]' \| \
25295 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25296 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25297echo X"$ac_file" |
ca81d7a0
JD
25298 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25299 s//\1/
25300 q
25301 }
25302 /^X\(\/\/\)[^/].*/{
25303 s//\1/
25304 q
25305 }
25306 /^X\(\/\/\)$/{
25307 s//\1/
25308 q
25309 }
25310 /^X\(\/\).*/{
25311 s//\1/
25312 q
25313 }
25314 s/.*/./; q'`
25315 { as_dir="$ac_dir"
25316 case $as_dir in #(
25317 -*) as_dir=./$as_dir;;
25318 esac
25319 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25320 as_dirs=
ca81d7a0
JD
25321 while :; do
25322 case $as_dir in #(
25323 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25324 *) as_qdir=$as_dir;;
25325 esac
25326 as_dirs="'$as_qdir' $as_dirs"
25327 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25328$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25329 X"$as_dir" : 'X\(//\)[^/]' \| \
25330 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25331 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25332echo X"$as_dir" |
ca81d7a0
JD
25333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25334 s//\1/
25335 q
25336 }
25337 /^X\(\/\/\)[^/].*/{
25338 s//\1/
25339 q
25340 }
25341 /^X\(\/\/\)$/{
25342 s//\1/
25343 q
25344 }
25345 /^X\(\/\).*/{
25346 s//\1/
25347 q
25348 }
25349 s/.*/./; q'`
25350 test -d "$as_dir" && break
6bae0ccf 25351 done
ca81d7a0
JD
25352 test -z "$as_dirs" || eval "mkdir $as_dirs"
25353 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25354echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25355 { (exit 1); exit 1; }; }; }
c0d27fcc 25356 ac_builddir=.
98418dba 25357
ca81d7a0
JD
25358case "$ac_dir" in
25359.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25360*)
c0d27fcc 25361 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25362 # A ".." for each directory in $ac_dir_suffix.
25363 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25364 case $ac_top_builddir_sub in
25365 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25366 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25367 esac ;;
25368esac
25369ac_abs_top_builddir=$ac_pwd
25370ac_abs_builddir=$ac_pwd$ac_dir_suffix
25371# for backward compatibility:
25372ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25373
25374case $srcdir in
ca81d7a0 25375 .) # We are building in place.
c0d27fcc 25376 ac_srcdir=.
ca81d7a0
JD
25377 ac_top_srcdir=$ac_top_builddir_sub
25378 ac_abs_top_srcdir=$ac_pwd ;;
25379 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25380 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25381 ac_top_srcdir=$srcdir
25382 ac_abs_top_srcdir=$srcdir ;;
25383 *) # Relative name.
25384 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25385 ac_top_srcdir=$ac_top_build_prefix$srcdir
25386 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25387esac
ca81d7a0 25388ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25389
c0d27fcc 25390
ca81d7a0
JD
25391 case $ac_mode in
25392 :F)
25393 #
25394 # CONFIG_FILE
25395 #
ba4481b5 25396
503d2be0
AS
25397 case $INSTALL in
25398 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25399 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25400 esac
ca81d7a0 25401_ACEOF
ba4481b5 25402
ca81d7a0
JD
25403cat >>$CONFIG_STATUS <<\_ACEOF
25404# If the template does not know about datarootdir, expand it.
25405# FIXME: This hack should be removed a few years after 2.60.
25406ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25407
ca81d7a0
JD
25408case `sed -n '/datarootdir/ {
25409 p
25410 q
25411}
25412/@datadir@/p
25413/@docdir@/p
25414/@infodir@/p
25415/@localedir@/p
25416/@mandir@/p
25417' $ac_file_inputs` in
25418*datarootdir*) ac_datarootdir_seen=yes;;
25419*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25420 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25421echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25422_ACEOF
ca81d7a0
JD
25423cat >>$CONFIG_STATUS <<_ACEOF
25424 ac_datarootdir_hack='
25425 s&@datadir@&$datadir&g
25426 s&@docdir@&$docdir&g
25427 s&@infodir@&$infodir&g
25428 s&@localedir@&$localedir&g
25429 s&@mandir@&$mandir&g
25430 s&\\\${datarootdir}&$datarootdir&g' ;;
25431esac
c0d27fcc 25432_ACEOF
ca81d7a0
JD
25433
25434# Neutralize VPATH when `$srcdir' = `.'.
25435# Shell code in configure.ac might set extrasub.
25436# FIXME: do we really want to maintain this feature?
c0d27fcc 25437cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25438 sed "$ac_vpsub
25439$extrasub
c0d27fcc
MR
25440_ACEOF
25441cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25442:t
25443/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25444s&@configure_input@&$configure_input&;t t
25445s&@top_builddir@&$ac_top_builddir_sub&;t t
25446s&@srcdir@&$ac_srcdir&;t t
25447s&@abs_srcdir@&$ac_abs_srcdir&;t t
25448s&@top_srcdir@&$ac_top_srcdir&;t t
25449s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25450s&@builddir@&$ac_builddir&;t t
25451s&@abs_builddir@&$ac_abs_builddir&;t t
25452s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25453s&@INSTALL@&$ac_INSTALL&;t t
25454$ac_datarootdir_hack
25455" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25456
25457test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25458 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25459 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25460 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25461which seems to be undefined. Please make sure it is defined." >&5
25462echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25463which seems to be undefined. Please make sure it is defined." >&2;}
25464
25465 rm -f "$tmp/stdin"
503d2be0 25466 case $ac_file in
ca81d7a0
JD
25467 -) cat "$tmp/out"; rm -f "$tmp/out";;
25468 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25469 esac
ca81d7a0
JD
25470 ;;
25471 :H)
25472 #
25473 # CONFIG_HEADER
25474 #
25475_ACEOF
25476
25477# Transform confdefs.h into a sed script `conftest.defines', that
25478# substitutes the proper values into config.h.in to produce config.h.
25479rm -f conftest.defines conftest.tail
25480# First, append a space to every undef/define line, to ease matching.
25481echo 's/$/ /' >conftest.defines
25482# Then, protect against being on the right side of a sed subst, or in
25483# an unquoted here document, in config.status. If some macros were
25484# called several times there might be several #defines for the same
25485# symbol, which is useless. But do not sort them, since the last
25486# AC_DEFINE must be honored.
25487ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25488# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25489# NAME is the cpp macro being defined, VALUE is the value it is being given.
25490# PARAMS is the parameter list in the macro definition--in most cases, it's
25491# just an empty string.
25492ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25493ac_dB='\\)[ (].*,\\1define\\2'
25494ac_dC=' '
25495ac_dD=' ,'
25496
25497uniq confdefs.h |
25498 sed -n '
25499 t rset
25500 :rset
25501 s/^[ ]*#[ ]*define[ ][ ]*//
25502 t ok
25503 d
25504 :ok
25505 s/[\\&,]/\\&/g
25506 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25507 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25508 ' >>conftest.defines
25509
25510# Remove the space that was appended to ease matching.
25511# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25512# example, in the case of _POSIX_SOURCE, which is predefined and required
25513# on some systems where configure will not decide to define it.
ca81d7a0
JD
25514# (The regexp can be short, since the line contains either #define or #undef.)
25515echo 's/ $//
25516s,^[ #]*u.*,/* & */,' >>conftest.defines
25517
25518# Break up conftest.defines:
25519ac_max_sed_lines=50
25520
25521# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25522# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25523# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25524# et cetera.
25525ac_in='$ac_file_inputs'
25526ac_out='"$tmp/out1"'
25527ac_nxt='"$tmp/out2"'
25528
25529while :
503d2be0 25530do
ca81d7a0
JD
25531 # Write a here document:
25532 cat >>$CONFIG_STATUS <<_ACEOF
25533 # First, check the format of the line:
25534 cat >"\$tmp/defines.sed" <<\\CEOF
25535/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25536/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25537b
25538:def
25539_ACEOF
25540 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25541 echo 'CEOF
ca81d7a0
JD
25542 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25543 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25544 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25545 grep . conftest.tail >/dev/null || break
503d2be0
AS
25546 rm -f conftest.defines
25547 mv conftest.tail conftest.defines
25548done
ca81d7a0 25549rm -f conftest.defines conftest.tail
503d2be0 25550
ca81d7a0 25551echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25552cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25553 if test x"$ac_file" != x-; then
ca81d7a0
JD
25554 echo "/* $configure_input */" >"$tmp/config.h"
25555 cat "$ac_result" >>"$tmp/config.h"
25556 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25557 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25558echo "$as_me: $ac_file is unchanged" >&6;}
25559 else
503d2be0 25560 rm -f $ac_file
ca81d7a0 25561 mv "$tmp/config.h" $ac_file
ba4481b5 25562 fi
503d2be0 25563 else
ca81d7a0
JD
25564 echo "/* $configure_input */"
25565 cat "$ac_result"
ba4481b5 25566 fi
ca81d7a0
JD
25567 rm -f "$tmp/out12"
25568 ;;
edfaf76d 25569
ca81d7a0
JD
25570 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25571echo "$as_me: executing $ac_file commands" >&6;}
25572 ;;
25573 esac
ba4481b5 25574
c0d27fcc 25575
ca81d7a0
JD
25576 case $ac_file$ac_mode in
25577 "default":C)
ba4481b5
DL
25578
25579### Make the necessary directories, if they don't exist.
25580for dir in etc lisp ; do
25581 test -d ${dir} || mkdir ${dir}
25582done
25583
25584# Build src/Makefile from ${srcdir}/src/Makefile.c
25585# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25586# This must be done after src/config.h is built, since we rely on that file.
25587
ba4481b5 25588echo creating src/epaths.h
4aa6b955 25589${MAKE-make} epaths-force
ba4481b5 25590
1c203d4c
DL
25591# As of 2000-11-19, newest development versions of GNU cpp preprocess
25592# `..' to `. .' unless invoked with -traditional
25593
d0e9bfd2 25594if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25595 CPPFLAGS="$CPPFLAGS -traditional"
25596fi
25597
ba4481b5
DL
25598echo creating lib-src/Makefile
25599( cd lib-src
25600 rm -f junk.c junk1.c junk2.c
25601 sed -e '/start of cpp stuff/q' \
25602 < Makefile.c > junk1.c
25603 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25604 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25605 < Makefile.c > junk.c
8acdcf6f 25606 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25607 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25608 cat junk1.c junk2.c > Makefile.new
25609 rm -f junk.c junk1.c junk2.c
25610 chmod 444 Makefile.new
25611 mv -f Makefile.new Makefile
25612)
25613
25614echo creating src/Makefile
25615( cd src
25616 rm -f junk.c junk1.c junk2.c
25617 sed -e '/start of cpp stuff/q' \
25618 < Makefile.c > junk1.c
25619 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25620 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25621 < Makefile.c > junk.c
8acdcf6f 25622 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25623 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25624 cat junk1.c junk2.c > Makefile.new
25625 rm -f junk.c junk1.c junk2.c
25626 chmod 444 Makefile.new
25627 mv -f Makefile.new Makefile
25628)
25629
503d2be0 25630if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25631 echo creating src/.gdbinit
503d2be0 25632 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25633fi
25634
503d2be0 25635 ;;
ca81d7a0 25636
503d2be0 25637 esac
ca81d7a0 25638done # for ac_tag
503d2be0 25639
ba4481b5 25640
503d2be0 25641{ (exit 0); exit 0; }
c0d27fcc 25642_ACEOF
ba4481b5 25643chmod +x $CONFIG_STATUS
503d2be0
AS
25644ac_clean_files=$ac_clean_files_save
25645
c0d27fcc 25646
503d2be0
AS
25647# configure is writing to config.log, and then calls config.status.
25648# config.status does its own redirection, appending to config.log.
25649# Unfortunately, on DOS this fails, as config.log is still kept open
25650# by configure, so config.status won't be able to write to it; its
25651# output is simply discarded. So we exec the FD to /dev/null,
25652# effectively closing config.log, so it can be properly (re)opened and
25653# appended to by config.status. When coming back to configure, we
25654# need to make the FD available again.
25655if test "$no_create" != yes; then
25656 ac_cs_success=:
19650fd6
AS
25657 ac_config_status_args=
25658 test "$silent" = yes &&
25659 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25660 exec 5>/dev/null
19650fd6 25661 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25662 exec 5>>config.log
25663 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25664 # would make configure fail if this is the last instruction.
25665 $ac_cs_success || { (exit 1); exit 1; }
25666fi
f5f47add 25667
c0d27fcc 25668