(file_name_completion): Tweak the code so as to always do it
[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
736carbon_appdir
737LTLIBOBJS'
6bae0ccf 738ac_subst_files=''
ca81d7a0
JD
739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
f053c89f 745LIBS
ca81d7a0
JD
746CPPFLAGS
747CPP
748XMKMF'
749
c0d27fcc 750
ba4481b5 751# Initialize some variables set by options.
503d2be0
AS
752ac_init_help=
753ac_init_version=false
ba4481b5
DL
754# The variables have the same names as the options, with
755# dashes changed to underlines.
503d2be0 756cache_file=/dev/null
ba4481b5 757exec_prefix=NONE
ba4481b5 758no_create=
ba4481b5
DL
759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
764silent=
765site=
766srcdir=
ba4481b5
DL
767verbose=
768x_includes=NONE
769x_libraries=NONE
503d2be0
AS
770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 776# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
ba4481b5
DL
782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
ba4481b5
DL
785includedir='${prefix}/include'
786oldincludedir='/usr/include'
9cf8f393 787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
ba4481b5 796
ba4481b5 797ac_prev=
ca81d7a0 798ac_dashdash=
ba4481b5
DL
799for ac_option
800do
ba4481b5
DL
801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
ca81d7a0 803 eval $ac_prev=\$ac_option
ba4481b5
DL
804 ac_prev=
805 continue
806 fi
807
ca81d7a0
JD
808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
ba4481b5
DL
812
813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
ca81d7a0
JD
815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
ba4481b5
DL
818
819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 822 bindir=$ac_optarg ;;
ba4481b5
DL
823
824 -build | --build | --buil | --bui | --bu)
503d2be0 825 ac_prev=build_alias ;;
ba4481b5 826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 827 build_alias=$ac_optarg ;;
ba4481b5
DL
828
829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
ba4481b5 838
ca81d7a0 839 -datadir | --datadir | --datadi | --datad)
ba4481b5 840 ac_prev=datadir ;;
ca81d7a0 841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 842 datadir=$ac_optarg ;;
ba4481b5 843
ca81d7a0
JD
844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
ba4481b5 851 -disable-* | --disable-*)
503d2be0 852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 853 # Reject names that are not valid shell variable names.
f053c89f 854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
856 { (exit 1); exit 1; }; }
f053c89f 857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
858 eval enable_$ac_feature=no ;;
859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
ba4481b5
DL
869
870 -enable-* | --enable-*)
503d2be0 871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 872 # Reject names that are not valid shell variable names.
f053c89f 873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
875 { (exit 1); exit 1; }; }
f053c89f 876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 877 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
878
879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
503d2be0 886 exec_prefix=$ac_optarg ;;
ba4481b5
DL
887
888 -gas | --gas | --ga | --g)
889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
891
503d2be0
AS
892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
ba4481b5
DL
898
899 -host | --host | --hos | --ho)
503d2be0 900 ac_prev=host_alias ;;
ba4481b5 901 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 902 host_alias=$ac_optarg ;;
ba4481b5 903
ca81d7a0
JD
904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
ba4481b5
DL
910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 915 includedir=$ac_optarg ;;
ba4481b5
DL
916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 920 infodir=$ac_optarg ;;
ba4481b5
DL
921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 925 libdir=$ac_optarg ;;
ba4481b5
DL
926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
503d2be0 932 libexecdir=$ac_optarg ;;
ba4481b5 933
ca81d7a0
JD
934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
ba4481b5 939 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 940 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 944 localstatedir=$ac_optarg ;;
ba4481b5
DL
945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 949 mandir=$ac_optarg ;;
ba4481b5
DL
950
951 -nfp | --nfp | --nf)
952 # Obsolete; use --without-fp.
953 with_fp=no ;;
954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 956 | --no-cr | --no-c | -n)
ba4481b5
DL
957 no_create=yes ;;
958
959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
962
963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 970 oldincludedir=$ac_optarg ;;
ba4481b5
DL
971
972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 975 prefix=$ac_optarg ;;
ba4481b5
DL
976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 982 program_prefix=$ac_optarg ;;
ba4481b5
DL
983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 989 program_suffix=$ac_optarg ;;
ba4481b5
DL
990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1006 program_transform_name=$ac_optarg ;;
ba4481b5 1007
ca81d7a0
JD
1008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
ba4481b5
DL
1018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
1022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
503d2be0 1026 sbindir=$ac_optarg ;;
ba4481b5
DL
1027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
503d2be0 1037 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1038
1039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
503d2be0 1042 site=$ac_optarg ;;
ba4481b5
DL
1043
1044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1047 srcdir=$ac_optarg ;;
ba4481b5
DL
1048
1049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1054 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1055
1056 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1057 ac_prev=target_alias ;;
ba4481b5 1058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1059 target_alias=$ac_optarg ;;
ba4481b5
DL
1060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
503d2be0
AS
1064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
ba4481b5
DL
1066
1067 -with-* | --with-*)
503d2be0 1068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1069 # Reject names that are not valid shell variable names.
f053c89f 1070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1071 { echo "$as_me: error: invalid package name: $ac_package" >&2
1072 { (exit 1); exit 1; }; }
f053c89f 1073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1074 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1075
1076 -without-* | --without-*)
503d2be0 1077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1078 # Reject names that are not valid shell variable names.
f053c89f 1079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1080 { echo "$as_me: error: invalid package name: $ac_package" >&2
1081 { (exit 1); exit 1; }; }
f053c89f 1082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1083 eval with_$ac_package=no ;;
ba4481b5
DL
1084
1085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
1088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1094 x_includes=$ac_optarg ;;
ba4481b5
DL
1095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1101 x_libraries=$ac_optarg ;;
ba4481b5 1102
503d2be0
AS
1103 -*) { echo "$as_me: error: unrecognized option: $ac_option
1104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
ba4481b5
DL
1106 ;;
1107
503d2be0
AS
1108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1113 { (exit 1); exit 1; }; }
ca81d7a0 1114 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1115 export $ac_envvar ;;
1116
ba4481b5 1117 *)
503d2be0
AS
1118 # FIXME: should be removed in autoconf 3.0.
1119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1123 ;;
1124
1125 esac
1126done
1127
1128if test -n "$ac_prev"; then
503d2be0
AS
1129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1130 { echo "$as_me: error: missing argument to $ac_option" >&2
1131 { (exit 1); exit 1; }; }
ba4481b5 1132fi
ba4481b5 1133
ca81d7a0
JD
1134# Be sure to have absolute directory names.
1135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
ba4481b5 1139do
ca81d7a0 1140 eval ac_val=\$$ac_var
503d2be0 1141 case $ac_val in
ca81d7a0
JD
1142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1144 esac
ca81d7a0
JD
1145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1146 { (exit 1); exit 1; }; }
ba4481b5
DL
1147done
1148
503d2be0
AS
1149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
c0d27fcc 1151# FIXME: To remove some day.
503d2be0
AS
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
1155
c0d27fcc 1156# FIXME: To remove some day.
503d2be0
AS
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
1160 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
ba4481b5 1166
503d2be0
AS
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1169
503d2be0 1170test "$silent" = yes && exec 6>/dev/null
ba4481b5 1171
c0d27fcc 1172
ca81d7a0
JD
1173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1176 { echo "$as_me: error: Working directory cannot be determined" >&2
1177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1179 { echo "$as_me: error: pwd does not report name of working directory" >&2
1180 { (exit 1); exit 1; }; }
1181
1182
ba4481b5
DL
1183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
1185 ac_srcdir_defaulted=yes
ca81d7a0
JD
1186 # Try the directory containing this script, then the parent directory.
1187 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1192echo X"$0" |
ca81d7a0
JD
1193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
ba4481b5 1210 srcdir=$ac_confdir
ca81d7a0 1211 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1212 srcdir=..
1213 fi
1214else
1215 ac_srcdir_defaulted=no
1216fi
ca81d7a0
JD
1217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1220 { (exit 1); exit 1; }; }
ba4481b5 1221fi
ca81d7a0
JD
1222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
1224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1225 { (exit 1); exit 1; }; }
ca81d7a0
JD
1226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
503d2be0
AS
1243
1244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1250 cat <<_ACEOF
5d374ce1 1251\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
503d2be0
AS
1271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1273 [$ac_default_prefix]
503d2be0 1274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1275 [PREFIX]
503d2be0
AS
1276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
1285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1299 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1304_ACEOF
503d2be0 1305
c0d27fcc 1306 cat <<\_ACEOF
503d2be0 1307
ba5da88a
PJ
1308Program names:
1309 --program-prefix=PREFIX prepend PREFIX to installed program names
1310 --program-suffix=SUFFIX append SUFFIX to installed program names
1311 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1312
503d2be0
AS
1313X features:
1314 --x-includes=DIR X include files are in DIR
1315 --x-libraries=DIR X library files are in DIR
1316
1317System types:
1318 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1319 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1320_ACEOF
503d2be0
AS
1321fi
1322
1323if test -n "$ac_init_help"; then
9cf8f393 1324 case $ac_init_help in
5d374ce1 1325 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1326 esac
c0d27fcc 1327 cat <<\_ACEOF
503d2be0
AS
1328
1329Optional Features:
1330 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1331 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1332 --enable-carbon-app[=DIR]
6a3a24fa 1333 specify install directory for Emacs.app on Mac OS X
709e90de 1334 [DIR=/Application]
8d01ddb4 1335 --disable-font-backend don't compile font-backend support
d0098f13 1336 --enable-asserts compile code with asserts enabled
709e90de
AS
1337 --enable-maintainer-mode
1338 enable make rules and dependencies not useful (and
1339 sometimes confusing) to the casual installer
9adfabc2
LK
1340 --enable-locallisppath=PATH
1341 directories Emacs should search for lisp files
1342 specific to this site
503d2be0
AS
1343 --disable-largefile omit support for large files
1344
1345Optional Packages:
1346 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1347 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1348 --without-pop don't support POP mail retrieval with movemail
1349 --with-kerberos support Kerberos-authenticated POP
1350 --with-kerberos5 support Kerberos version 5 authenticated POP
1351 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1352 --without-sound don't compile with sound support
a51f4969 1353 --without-sync-input Process async input synchronously
49adb60f
TTN
1354 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1355 motif, gtk, no)
c8467c40
GM
1356 --without-xpm don't compile with XPM image support
1357 --without-jpeg don't compile with JPEG image support
1358 --without-tiff don't compile with TIFF image support
1359 --without-gif don't compile with GIF image support
1360 --without-png don't compile with PNG image support
1361 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1362 --without-freetype don't use Freetype for local font support
1363 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1364 --without-libotf don't use libotf for OpenType font support
1365 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1366 --without-toolkit-scroll-bars
cc227489 1367 don't use Motif or Xaw3d scroll bars
c982cf7d 1368 --without-xaw3d don't use Xaw3d
cc227489 1369 --without-xim don't use X11 XIM
2aea825c 1370 --with-carbon use Carbon GUI on Mac OS X. This is unsupported!
c8467c40
GM
1371 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1372 console
b5a922de 1373 --without-dbus don't compile with D-Bus support
921fbdf0 1374 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1375
00b9c927
MO
1376 --with-pkg-config-prog=PATH
1377 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1378 --with-x use the X Window System
1379
1380Some influential environment variables:
1381 CC C compiler command
1382 CFLAGS C compiler flags
1383 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1384 nonstandard directory <lib dir>
f053c89f 1385 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1386 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1387 you have headers in a nonstandard directory <include dir>
503d2be0 1388 CPP C preprocessor
ca81d7a0 1389 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1390
1391Use these variables to override the choices made by `configure' or to help
1392it to find libraries and programs with nonstandard names/locations.
1393
c0d27fcc 1394_ACEOF
ca81d7a0 1395ac_status=$?
503d2be0
AS
1396fi
1397
1398if test "$ac_init_help" = "recursive"; then
1399 # If there are subdirs, report their specific --help.
c0d27fcc 1400 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1401 test -d "$ac_dir" || continue
c0d27fcc
MR
1402 ac_builddir=.
1403
ca81d7a0
JD
1404case "$ac_dir" in
1405.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1406*)
c0d27fcc 1407 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1408 # A ".." for each directory in $ac_dir_suffix.
1409 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1410 case $ac_top_builddir_sub in
1411 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1412 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1413 esac ;;
1414esac
1415ac_abs_top_builddir=$ac_pwd
1416ac_abs_builddir=$ac_pwd$ac_dir_suffix
1417# for backward compatibility:
1418ac_top_builddir=$ac_top_build_prefix
503d2be0 1419
c0d27fcc 1420case $srcdir in
ca81d7a0 1421 .) # We are building in place.
c0d27fcc 1422 ac_srcdir=.
ca81d7a0
JD
1423 ac_top_srcdir=$ac_top_builddir_sub
1424 ac_abs_top_srcdir=$ac_pwd ;;
1425 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1426 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1427 ac_top_srcdir=$srcdir
1428 ac_abs_top_srcdir=$srcdir ;;
1429 *) # Relative name.
1430 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1431 ac_top_srcdir=$ac_top_build_prefix$srcdir
1432 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1433esac
ca81d7a0
JD
1434ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1435
1436 cd "$ac_dir" || { ac_status=$?; continue; }
1437 # Check for guested configure.
1438 if test -f "$ac_srcdir/configure.gnu"; then
1439 echo &&
1440 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1441 elif test -f "$ac_srcdir/configure"; then
1442 echo &&
1443 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1444 else
c0d27fcc 1445 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1446 fi || ac_status=$?
1447 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1448 done
1449fi
1450
ca81d7a0 1451test -n "$ac_init_help" && exit $ac_status
503d2be0 1452if $ac_init_version; then
c0d27fcc 1453 cat <<\_ACEOF
5d374ce1 1454emacs configure 23.0.60
f053c89f 1455generated by GNU Autoconf 2.61
503d2be0 1456
ca81d7a0
JD
1457Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14582002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1459This configure script is free software; the Free Software Foundation
1460gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1461_ACEOF
ca81d7a0 1462 exit
503d2be0 1463fi
ca81d7a0 1464cat >config.log <<_ACEOF
503d2be0
AS
1465This file contains any messages produced by compilers while
1466running configure, to aid debugging if configure makes a mistake.
1467
5d374ce1 1468It was created by emacs $as_me 23.0.60, which was
f053c89f 1469generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1470
1471 $ $0 $@
1472
c0d27fcc 1473_ACEOF
ca81d7a0 1474exec 5>>config.log
503d2be0
AS
1475{
1476cat <<_ASUNAME
c0d27fcc
MR
1477## --------- ##
1478## Platform. ##
1479## --------- ##
503d2be0
AS
1480
1481hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1482uname -m = `(uname -m) 2>/dev/null || echo unknown`
1483uname -r = `(uname -r) 2>/dev/null || echo unknown`
1484uname -s = `(uname -s) 2>/dev/null || echo unknown`
1485uname -v = `(uname -v) 2>/dev/null || echo unknown`
1486
1487/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1488/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1489
1490/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1491/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1492/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1493/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1494/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1495/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1496/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1497
925c2f3f 1498_ASUNAME
c0d27fcc
MR
1499
1500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1501for as_dir in $PATH
1502do
1503 IFS=$as_save_IFS
1504 test -z "$as_dir" && as_dir=.
1505 echo "PATH: $as_dir"
1506done
ca81d7a0 1507IFS=$as_save_IFS
c0d27fcc 1508
503d2be0
AS
1509} >&5
1510
c0d27fcc
MR
1511cat >&5 <<_ACEOF
1512
1513
1514## ----------- ##
1515## Core tests. ##
1516## ----------- ##
1517
1518_ACEOF
503d2be0 1519
503d2be0
AS
1520
1521# Keep a trace of the command line.
1522# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1523# Strip out --silent because we don't want to record it for future runs.
503d2be0 1524# Also quote any args containing shell meta-characters.
19650fd6 1525# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1526ac_configure_args=
19650fd6
AS
1527ac_configure_args0=
1528ac_configure_args1=
19650fd6
AS
1529ac_must_keep_next=false
1530for ac_pass in 1 2
503d2be0 1531do
19650fd6
AS
1532 for ac_arg
1533 do
1534 case $ac_arg in
1535 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1536 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1537 | -silent | --silent | --silen | --sile | --sil)
1538 continue ;;
ca81d7a0 1539 *\'*)
19650fd6
AS
1540 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1541 esac
1542 case $ac_pass in
1543 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1544 2)
1545 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1546 if test $ac_must_keep_next = true; then
edfaf76d 1547 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1548 else
edfaf76d
LK
1549 case $ac_arg in
1550 *=* | --config-cache | -C | -disable-* | --disable-* \
1551 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1552 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1553 | -with-* | --with-* | -without-* | --without-* | --x)
1554 case "$ac_configure_args0 " in
1555 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1556 esac
1557 ;;
1558 -* ) ac_must_keep_next=true ;;
1559 esac
19650fd6 1560 fi
ca81d7a0 1561 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1562 ;;
1563 esac
1564 done
503d2be0 1565done
19650fd6
AS
1566$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1567$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1568
1569# When interrupted or exit'd, cleanup temporary files, and complete
1570# config.log. We remove comments because anyway the quotes in there
1571# would cause problems or look ugly.
ca81d7a0
JD
1572# WARNING: Use '\'' to represent an apostrophe within the trap.
1573# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1574trap 'exit_status=$?
1575 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1576 {
1577 echo
6bae0ccf 1578
c0d27fcc
MR
1579 cat <<\_ASBOX
1580## ---------------- ##
1581## Cache variables. ##
1582## ---------------- ##
1583_ASBOX
1584 echo
1585 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1586(
1587 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1588 eval ac_val=\$$ac_var
1589 case $ac_val in #(
1590 *${as_nl}*)
1591 case $ac_var in #(
1592 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1593echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1594 esac
1595 case $ac_var in #(
1596 _ | IFS | as_nl) ;; #(
1597 *) $as_unset $ac_var ;;
1598 esac ;;
1599 esac
1600 done
503d2be0 1601 (set) 2>&1 |
ca81d7a0
JD
1602 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1603 *${as_nl}ac_space=\ *)
503d2be0 1604 sed -n \
ca81d7a0
JD
1605 "s/'\''/'\''\\\\'\'''\''/g;
1606 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1607 ;; #(
503d2be0 1608 *)
ca81d7a0 1609 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1610 ;;
ca81d7a0
JD
1611 esac |
1612 sort
1613)
c0d27fcc 1614 echo
6bae0ccf
DL
1615
1616 cat <<\_ASBOX
1617## ----------------- ##
1618## Output variables. ##
1619## ----------------- ##
1620_ASBOX
1621 echo
1622 for ac_var in $ac_subst_vars
1623 do
ca81d7a0
JD
1624 eval ac_val=\$$ac_var
1625 case $ac_val in
1626 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1627 esac
1628 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1629 done | sort
1630 echo
1631
1632 if test -n "$ac_subst_files"; then
1633 cat <<\_ASBOX
ca81d7a0
JD
1634## ------------------- ##
1635## File substitutions. ##
1636## ------------------- ##
6bae0ccf
DL
1637_ASBOX
1638 echo
1639 for ac_var in $ac_subst_files
1640 do
ca81d7a0
JD
1641 eval ac_val=\$$ac_var
1642 case $ac_val in
1643 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1644 esac
1645 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1646 done | sort
1647 echo
1648 fi
1649
c0d27fcc
MR
1650 if test -s confdefs.h; then
1651 cat <<\_ASBOX
1652## ----------- ##
1653## confdefs.h. ##
1654## ----------- ##
1655_ASBOX
1656 echo
ca81d7a0 1657 cat confdefs.h
c0d27fcc
MR
1658 echo
1659 fi
1660 test "$ac_signal" != 0 &&
1661 echo "$as_me: caught signal $ac_signal"
1662 echo "$as_me: exit $exit_status"
1663 } >&5
ca81d7a0
JD
1664 rm -f core *.core core.conftest.* &&
1665 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1666 exit $exit_status
ca81d7a0 1667' 0
503d2be0
AS
1668for ac_signal in 1 2 13 15; do
1669 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1670done
1671ac_signal=0
1672
1673# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1674rm -f -r conftest* confdefs.h
ba4481b5 1675
c0d27fcc
MR
1676# Predefined preprocessor variables.
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_NAME "$PACKAGE_NAME"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_VERSION "$PACKAGE_VERSION"
1690_ACEOF
1691
1692
1693cat >>confdefs.h <<_ACEOF
1694#define PACKAGE_STRING "$PACKAGE_STRING"
1695_ACEOF
1696
1697
1698cat >>confdefs.h <<_ACEOF
1699#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1700_ACEOF
1701
1702
503d2be0 1703# Let the site file select an alternate cache file if it wants to.
ba4481b5 1704# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1705if test -n "$CONFIG_SITE"; then
1706 set x "$CONFIG_SITE"
1707elif test "x$prefix" != xNONE; then
1708 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1709else
1710 set x "$ac_default_prefix/share/config.site" \
1711 "$ac_default_prefix/etc/config.site"
ba4481b5 1712fi
ca81d7a0
JD
1713shift
1714for ac_site_file
1715do
ba4481b5 1716 if test -r "$ac_site_file"; then
c0d27fcc 1717 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1718echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1719 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1720 . "$ac_site_file"
1721 fi
1722done
1723
1724if test -r "$cache_file"; then
503d2be0
AS
1725 # Some versions of bash will fail to source /dev/null (special
1726 # files actually), so we avoid doing that.
1727 if test -f "$cache_file"; then
c0d27fcc 1728 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1729echo "$as_me: loading cache $cache_file" >&6;}
1730 case $cache_file in
ca81d7a0
JD
1731 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1732 *) . "./$cache_file";;
503d2be0
AS
1733 esac
1734 fi
ba4481b5 1735else
c0d27fcc 1736 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1737echo "$as_me: creating cache $cache_file" >&6;}
1738 >$cache_file
1739fi
1740
f053c89f
CY
1741ac_header_list="$ac_header_list sys/time.h"
1742ac_header_list="$ac_header_list unistd.h"
1743ac_func_list="$ac_func_list alarm"
503d2be0
AS
1744# Check that the precious variables saved in the cache have kept the same
1745# value.
1746ac_cache_corrupted=false
ca81d7a0 1747for ac_var in $ac_precious_vars; do
503d2be0
AS
1748 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1749 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1750 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1751 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1752 case $ac_old_set,$ac_new_set in
1753 set,)
c0d27fcc 1754 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1755echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1756 ac_cache_corrupted=: ;;
1757 ,set)
c0d27fcc 1758 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1759echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1760 ac_cache_corrupted=: ;;
1761 ,);;
1762 *)
1763 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1764 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1765echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1766 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1767echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1768 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1769echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1770 ac_cache_corrupted=:
503d2be0
AS
1771 fi;;
1772 esac
c0d27fcc 1773 # Pass precious variables to config.status.
503d2be0
AS
1774 if test "$ac_new_set" = set; then
1775 case $ac_new_val in
ca81d7a0 1776 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1777 *) ac_arg=$ac_var=$ac_new_val ;;
1778 esac
1779 case " $ac_configure_args " in
1780 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1781 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1782 esac
1783 fi
1784done
1785if $ac_cache_corrupted; then
c0d27fcc 1786 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1787echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1788 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1789echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1790 { (exit 1); exit 1; }; }
ba4481b5
DL
1791fi
1792
c0d27fcc
MR
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
9cf8f393
JD
1804
1805
1806
1807
1808
1809
1810
1811
c0d27fcc
MR
1812
1813
1814
1815
1816
ca81d7a0
JD
1817ac_ext=c
1818ac_cpp='$CPP $CPPFLAGS'
1819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1821ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1822
6bae0ccf 1823
ca81d7a0 1824ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1825
c0d27fcc 1826
9fb1ba80 1827
ba5da88a 1828test "$program_prefix" != NONE &&
ca81d7a0 1829 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1830# Use a double $ so make ignores it.
1831test "$program_suffix" != NONE &&
ca81d7a0 1832 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1833# Double any \ or $. echo might interpret backslashes.
1834# By default was `s,x,x', remove it if useless.
1835cat <<\_ACEOF >conftest.sed
1836s/[\\$]/&&/g;s/;s,x,x,$//
1837_ACEOF
1838program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1839rm -f conftest.sed
ba5da88a 1840
c0d27fcc 1841
ba4481b5
DL
1842lispdir='${datadir}/emacs/${version}/lisp'
1843locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1844'${datadir}/emacs/site-lisp'
1845lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1846etcdir='${datadir}/emacs/${version}/etc'
1847archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1848docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1849gamedir='${localstatedir}/games/emacs'
98418dba
CW
1850
1851gameuser=games
1852
c0d27fcc 1853
49adb60f 1854
00b9c927 1855
ca81d7a0 1856# Check whether --with-pop was given.
ba4481b5 1857if test "${with_pop+set}" = set; then
00b9c927 1858 withval=$with_pop;
3d9fec71 1859else
00b9c927
MO
1860 with_pop=yes
1861fi
1862
1863if test "$with_pop" = yes; then
1864 cat >>confdefs.h <<\_ACEOF
3d9fec71 1865#define MAIL_USE_POP 1
c0d27fcc 1866_ACEOF
3d9fec71 1867
ca81d7a0 1868fi
ba4481b5 1869
c0d27fcc 1870
c0d27fcc 1871
ca81d7a0 1872# Check whether --with-kerberos was given.
a21616bd 1873if test "${with_kerberos+set}" = set; then
00b9c927
MO
1874 withval=$with_kerberos;
1875else
1876 with_kerberos=no
1877fi
1878
1879if test "$with_kerberos" = yes; then
54e6585f 1880 cat >>confdefs.h <<\_ACEOF
a21616bd 1881#define KERBEROS 1
c0d27fcc 1882_ACEOF
a21616bd 1883
ca81d7a0 1884fi
c0d27fcc 1885
c0d27fcc 1886
49adb60f 1887
ca81d7a0 1888# Check whether --with-kerberos5 was given.
a21616bd 1889if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1890 withval=$with_kerberos5;
1891else
1892 with_kerberos5=no
1893fi
1894
1895if test "${with_kerberos5}" = yes; then
1896 if test "${with_kerberos}" != yes; then
a21616bd 1897 with_kerberos=yes
c0d27fcc 1898 cat >>confdefs.h <<\_ACEOF
a21616bd 1899#define KERBEROS 1
c0d27fcc 1900_ACEOF
a21616bd
KR
1901
1902 fi
b936fae4 1903
c0d27fcc 1904cat >>confdefs.h <<\_ACEOF
a21616bd 1905#define KERBEROS5 1
c0d27fcc 1906_ACEOF
a21616bd 1907
ca81d7a0 1908fi
b936fae4 1909
49adb60f 1910
ca81d7a0
JD
1911# Check whether --with-hesiod was given.
1912if test "${with_hesiod+set}" = set; then
00b9c927
MO
1913 withval=$with_hesiod;
1914else
1915 with_hesiod=no
1916fi
1917
1918if test "$with_hesiod" = yes; then
54e6585f 1919
c0d27fcc 1920cat >>confdefs.h <<\_ACEOF
ba4481b5 1921#define HESIOD 1
c0d27fcc 1922_ACEOF
ba4481b5 1923
ca81d7a0 1924fi
c0d27fcc 1925
c0d27fcc 1926
ca81d7a0 1927# Check whether --with-sound was given.
2c9dccc9 1928if test "${with_sound+set}" = set; then
ca81d7a0 1929 withval=$with_sound;
00b9c927
MO
1930else
1931 with_sound=yes
ca81d7a0 1932fi
2c9dccc9 1933
2c9dccc9 1934
c0d27fcc 1935
a51f4969
SM
1936# Check whether --with-sync-input was given.
1937if test "${with_sync_input+set}" = set; then
1938 withval=$with_sync_input;
1939else
1940 with_sync_input=yes
1941fi
1942
1943if test "$with_sync_input" = yes; then
1944
1945cat >>confdefs.h <<\_ACEOF
1946#define SYNC_INPUT 1
1947_ACEOF
1948
1949fi
1950
1951
ca81d7a0 1952# Check whether --with-x-toolkit was given.
ba4481b5 1953if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1954 withval=$with_x_toolkit; case "${withval}" in
089a966d 1955 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1956 n | no ) val=no ;;
1957 l | lu | luc | luci | lucid ) val=lucid ;;
1958 a | at | ath | athe | athen | athena ) val=athena ;;
1959 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1960 g | gt | gtk ) val=gtk ;;
ba4481b5 1961 * )
29d69661 1962{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1963this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1964\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1965echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1966this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1967\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1968 { (exit 1); exit 1; }; }
ba4481b5
DL
1969 ;;
1970 esac
1971 with_x_toolkit=$val
1972
ca81d7a0 1973fi
8eeae1c9 1974
ba4481b5 1975
49adb60f 1976
ca81d7a0 1977# Check whether --with-xpm was given.
ba4481b5 1978if test "${with_xpm+set}" = set; then
ca81d7a0 1979 withval=$with_xpm;
00b9c927 1980else
c8467c40 1981 with_xpm=yes
ca81d7a0 1982fi
503d2be0 1983
ba4481b5 1984
ca81d7a0 1985# Check whether --with-jpeg was given.
ba4481b5 1986if test "${with_jpeg+set}" = set; then
ca81d7a0 1987 withval=$with_jpeg;
00b9c927 1988else
c8467c40 1989 with_jpeg=yes
ca81d7a0 1990fi
503d2be0 1991
ba4481b5 1992
ca81d7a0 1993# Check whether --with-tiff was given.
ba4481b5 1994if test "${with_tiff+set}" = set; then
ca81d7a0 1995 withval=$with_tiff;
00b9c927 1996else
c8467c40 1997 with_tiff=yes
ca81d7a0 1998fi
503d2be0 1999
ba4481b5 2000
ca81d7a0 2001# Check whether --with-gif was given.
ba4481b5 2002if test "${with_gif+set}" = set; then
ca81d7a0 2003 withval=$with_gif;
00b9c927 2004else
c8467c40 2005 with_gif=yes
ca81d7a0 2006fi
503d2be0 2007
ba4481b5 2008
ca81d7a0 2009# Check whether --with-png was given.
ba4481b5 2010if test "${with_png+set}" = set; then
ca81d7a0 2011 withval=$with_png;
00b9c927 2012else
c8467c40 2013 with_png=yes
ca81d7a0 2014fi
503d2be0 2015
ba4481b5 2016
0cfc0546
GM
2017# Check whether --with-rsvg was given.
2018if test "${with_rsvg+set}" = set; then
2019 withval=$with_rsvg;
00b9c927 2020else
c8467c40 2021 with_rsvg=yes
0cfc0546
GM
2022fi
2023
2024
c8467c40 2025
c24fa7dc 2026# Check whether --with-freetype was given.
45a4b03e 2027if test "${with_freetype+set}" = set; then
c24fa7dc 2028 withval=$with_freetype;
d235ca2f 2029else
4efcc8d1 2030 with_freetype=yes
c24fa7dc 2031fi
45a4b03e 2032
45a4b03e 2033
c24fa7dc 2034# Check whether --with-xft was given.
45a4b03e 2035if test "${with_xft+set}" = set; then
c24fa7dc 2036 withval=$with_xft;
d235ca2f 2037else
4efcc8d1 2038 with_xft=yes
c24fa7dc 2039fi
45a4b03e 2040
45a4b03e 2041
d235ca2f
MB
2042# Check whether --with-libotf was given.
2043if test "${with_libotf+set}" = set; then
2044 withval=$with_libotf;
2045else
2046 with_libotf=yes
79011b82
NR
2047fi
2048
2049
d235ca2f
MB
2050# Check whether --with-m17n-flt was given.
2051if test "${with_m17n_flt+set}" = set; then
2052 withval=$with_m17n_flt;
2053else
2054 with_m17n_flt=yes
0cfc0546
GM
2055fi
2056
2057
d235ca2f 2058
ca81d7a0 2059# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2060if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2061 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2062else
2063 with_toolkit_scroll_bars=yes
ca81d7a0 2064fi
503d2be0 2065
ba4481b5 2066
e35a28cd
TTN
2067# Check whether --with-xaw3d was given.
2068if test "${with_xaw3d+set}" = set; then
2069 withval=$with_xaw3d;
00b9c927
MO
2070else
2071 with_xaw3d=yes
c982cf7d
JD
2072fi
2073
2074
ca81d7a0 2075# Check whether --with-xim was given.
1d36487c 2076if test "${with_xim+set}" = set; then
ca81d7a0 2077 withval=$with_xim;
00b9c927
MO
2078else
2079 with_xim=yes
ca81d7a0 2080fi
1d36487c 2081
ba4481b5 2082
ca81d7a0 2083# Check whether --with-carbon was given.
e0f712ba 2084if test "${with_carbon+set}" = set; then
ca81d7a0 2085 withval=$with_carbon;
00b9c927 2086else
c8467c40
GM
2087 with_carbon=no
2088fi
2089
2090
2091
2092# Check whether --with-gpm was given.
2093if test "${with_gpm+set}" = set; then
2094 withval=$with_gpm;
2095else
2096 with_gpm=yes
ca81d7a0 2097fi
e0f712ba 2098
49adb60f 2099
131e4133
MA
2100# Check whether --with-dbus was given.
2101if test "${with_dbus+set}" = set; then
2102 withval=$with_dbus;
00b9c927 2103else
b5a922de 2104 with_dbus=yes
131e4133
MA
2105fi
2106
2107
921fbdf0
GM
2108## For the times when you want to build Emacs but don't have
2109## a suitable makeinfo, and can live without the manuals.
2110
2111# Check whether --with-makeinfo was given.
2112if test "${with_makeinfo+set}" = set; then
2113 withval=$with_makeinfo;
2114else
2115 with_makeinfo=yes
2116fi
2117
2118
e70b2110 2119
9d2818d6
DN
2120# Check whether --with-gtk was given.
2121if test "${with_gtk+set}" = set; then
2122 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2123specify a toolkit." >&5
2124echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2125specify a toolkit." >&2;}
2126 { (exit 1); exit 1; }; }
2127fi
2128
2129
2130
2131# Check whether --with-gcc was given.
2132if test "${with_gcc+set}" = set; then
2133 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2134 variable to specify a compiler." >&5
2135echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2136 variable to specify a compiler." >&2;}
2137 { (exit 1); exit 1; }; }
2138fi
2139
2140
2141
00b9c927
MO
2142# Check whether --with-pkg-config-prog was given.
2143if test "${with_pkg_config_prog+set}" = set; then
2144 withval=$with_pkg_config_prog;
e70b2110
KH
2145fi
2146
00b9c927
MO
2147if test "X${with_pkg_config_prog}" != X; then
2148 if test "${with_pkg_config_prog}" != yes; then
2149 PKG_CONFIG="${with_pkg_config_prog}"
2150 fi
2151fi
e70b2110 2152
ca81d7a0 2153# Check whether --enable-carbon-app was given.
6a3a24fa 2154if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2155 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2156fi
2157
e0f712ba 2158
8d01ddb4 2159## Enabled by default.
c24fa7dc 2160# Check whether --enable-font-backend was given.
45a4b03e 2161if test "${enable_font_backend+set}" = set; then
c24fa7dc 2162 enableval=$enable_font_backend; USE_FONT_BACKEND=$enableval
45a4b03e 2163else
8d01ddb4 2164 USE_FONT_BACKEND=yes
c24fa7dc 2165fi
45a4b03e 2166
c24fa7dc
MB
2167
2168# Check whether --enable-asserts was given.
d0098f13 2169if test "${enable_asserts+set}" = set; then
ca81d7a0 2170 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2171else
2172 USE_XASSERTS=no
ca81d7a0 2173fi
8eeae1c9 2174
d0098f13 2175
ca81d7a0 2176# Check whether --enable-maintainer-mode was given.
19650fd6 2177if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2178 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2179else
2180 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2181fi
2182
19650fd6
AS
2183if test $USE_MAINTAINER_MODE = yes; then
2184 MAINT=
2185else
2186 MAINT=#
2187fi
2188
2189
ca81d7a0 2190# Check whether --enable-locallisppath was given.
9adfabc2 2191if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2192 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2193 locallisppath=
2194elif test "${enableval}" != "yes"; then
2195 locallisppath=${enableval}
2196fi
ca81d7a0
JD
2197fi
2198
9adfabc2 2199
ba4481b5 2200#### Make srcdir absolute, if it isn't already. It's important to
17494071 2201#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2202#### give you automounter prefixes, which can go away. We do all this
2203#### so Emacs can find its files when run uninstalled.
17494071
GM
2204## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2205unset CDPATH
ba4481b5
DL
2206case "${srcdir}" in
2207 /* ) ;;
2208 . )
2209 ## We may be able to use the $PWD environment variable to make this
2210 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2211 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2212 ## but that tested only for a well-formed and valid PWD,
2213 ## it did not object when PWD was well-formed and valid but just wrong.
2214 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2215 then
2216 srcdir="$PWD"
2217 else
2218 srcdir="`(cd ${srcdir}; pwd)`"
2219 fi
2220 ;;
2221 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2222esac
2223
2224#### Check if the source directory already has a configured system in it.
2225if test `pwd` != `(cd ${srcdir} && pwd)` \
2226 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2227 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2228 as a build directory right now; it has been configured in its own
2229 right. To configure in another directory as well, you MUST
2230 use GNU make. If you do not have GNU make, then you must
2231 now do \`make distclean' in ${srcdir},
2232 and then run $0 again." >&5
2233echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2234 as a build directory right now; it has been configured in its own
2235 right. To configure in another directory as well, you MUST
2236 use GNU make. If you do not have GNU make, then you must
2237 now do \`make distclean' in ${srcdir},
503d2be0 2238 and then run $0 again." >&2;}
ba4481b5
DL
2239fi
2240
2241#### Given the configuration name, set machfile and opsysfile to the
2242#### names of the m/*.h and s/*.h files we should use.
2243
2244### Canonicalize the configuration name.
2245
2246ac_aux_dir=
ca81d7a0
JD
2247for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2248 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2249 ac_aux_dir=$ac_dir
2250 ac_install_sh="$ac_aux_dir/install-sh -c"
2251 break
ca81d7a0 2252 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2253 ac_aux_dir=$ac_dir
2254 ac_install_sh="$ac_aux_dir/install.sh -c"
2255 break
ca81d7a0 2256 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2257 ac_aux_dir=$ac_dir
2258 ac_install_sh="$ac_aux_dir/shtool install -c"
2259 break
ba4481b5
DL
2260 fi
2261done
2262if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2263 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2264echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2265 { (exit 1); exit 1; }; }
ba4481b5 2266fi
ca81d7a0
JD
2267
2268# These three variables are undocumented and unsupported,
2269# and are intended to be withdrawn in a future Autoconf release.
2270# They can cause serious problems if a builder's source tree is in a directory
2271# whose full name contains unusual characters.
2272ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2273ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2274ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2275
ba4481b5
DL
2276
2277# Make sure we can run config.sub.
ca81d7a0
JD
2278$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2279 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2280echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2281 { (exit 1); exit 1; }; }
2282
ca81d7a0
JD
2283{ echo "$as_me:$LINENO: checking build system type" >&5
2284echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2285if test "${ac_cv_build+set}" = set; then
2286 echo $ECHO_N "(cached) $ECHO_C" >&6
2287else
ca81d7a0
JD
2288 ac_build_alias=$build_alias
2289test "x$ac_build_alias" = x &&
2290 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2291test "x$ac_build_alias" = x &&
c0d27fcc 2292 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2293echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2294 { (exit 1); exit 1; }; }
ca81d7a0
JD
2295ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2296 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2297echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2298 { (exit 1); exit 1; }; }
2299
2300fi
ca81d7a0
JD
2301{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2302echo "${ECHO_T}$ac_cv_build" >&6; }
2303case $ac_cv_build in
2304*-*-*) ;;
2305*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2306echo "$as_me: error: invalid value of canonical build" >&2;}
2307 { (exit 1); exit 1; }; };;
2308esac
503d2be0 2309build=$ac_cv_build
ca81d7a0
JD
2310ac_save_IFS=$IFS; IFS='-'
2311set x $ac_cv_build
2312shift
2313build_cpu=$1
2314build_vendor=$2
2315shift; shift
2316# Remember, the first character of IFS is used to create $*,
2317# except with old shells:
2318build_os=$*
2319IFS=$ac_save_IFS
2320case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2321
2322
2323{ echo "$as_me:$LINENO: checking host system type" >&5
2324echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2325if test "${ac_cv_host+set}" = set; then
2326 echo $ECHO_N "(cached) $ECHO_C" >&6
2327else
ca81d7a0
JD
2328 if test "x$host_alias" = x; then
2329 ac_cv_host=$ac_cv_build
2330else
2331 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2332 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2333echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2334 { (exit 1); exit 1; }; }
ca81d7a0 2335fi
503d2be0
AS
2336
2337fi
ca81d7a0
JD
2338{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2339echo "${ECHO_T}$ac_cv_host" >&6; }
2340case $ac_cv_host in
2341*-*-*) ;;
2342*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2343echo "$as_me: error: invalid value of canonical host" >&2;}
2344 { (exit 1); exit 1; }; };;
2345esac
503d2be0 2346host=$ac_cv_host
ca81d7a0
JD
2347ac_save_IFS=$IFS; IFS='-'
2348set x $ac_cv_host
2349shift
2350host_cpu=$1
2351host_vendor=$2
2352shift; shift
2353# Remember, the first character of IFS is used to create $*,
2354# except with old shells:
2355host_os=$*
2356IFS=$ac_save_IFS
2357case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2358
c0d27fcc 2359
ba4481b5 2360canonical=$host
1770dcdc 2361configuration=${host_alias-${build_alias-$host}}
ba4481b5 2362
c0d27fcc 2363
22044edf 2364
ba4481b5
DL
2365### If you add support for a new configuration, add code to this
2366### switch statement to recognize your configuration name and select
2367### the appropriate operating system and machine description files.
2368
2369### You would hope that you could choose an m/*.h file pretty much
2370### based on the machine portion of the configuration name, and an s-
2371### file based on the operating system portion. However, it turns out
2372### that each m/*.h file is pretty manufacturer-specific - for
55e6d9b2
AS
2373### example hp9000s300.h is a 68000 machine;
2374### mips.h, pmax.h are all MIPS
ba4481b5
DL
2375### machines. So we basically have to have a special case for each
2376### configuration name.
2377###
2378### As far as handling version numbers on operating systems is
2379### concerned, make sure things will fail in a fixable way. If
2380### /etc/MACHINES doesn't say anything about version numbers, be
2381### prepared to handle anything reasonably. If version numbers
2382### matter, be sure /etc/MACHINES says something about it.
2383###
2384### Eric Raymond says we should accept strings like "sysvr4" to mean
2385### "System V Release 4"; he writes, "The old convention encouraged
2386### confusion between `system' and `release' levels'."
2387
2388machine='' opsys='' unported=no
2389case "${canonical}" in
2390
1096bcc0
GM
2391 ## FreeBSD ports
2392 *-*-freebsd* )
2393 opsys=freebsd
2394 case "${canonical}" in
2395 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2396 arm*-*-freebsd*) machine=arm ;;
ec8fcb10
YM
2397 ia64-*-freebsd*) machine=ia64 ;;
2398 sparc64-*-freebsd*) machine=sparc ;;
2399 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2400 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2401 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2402 esac
2403 ;;
2404
1b275743
GM
2405 ## FreeBSD kernel + glibc based userland
2406 *-*-kfreebsd*gnu* )
2407 opsys=gnu-kfreebsd
2408 case "${canonical}" in
2409 alpha*-*-kfreebsd*) machine=alpha ;;
2410 ia64-*-kfreebsd*) machine=ia64 ;;
2411 sparc64-*-kfreebsd*) machine=sparc ;;
2412 powerpc-*-kfreebsd*) machine=macppc ;;
2413 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2414 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2415 esac
2416 ;;
2417
ba4481b5
DL
2418 ## NetBSD ports
2419 *-*-netbsd* )
2420 opsys=netbsd
dd038e26 2421 if test -f /usr/lib/crti.o; then
f57bd967
DL
2422
2423cat >>confdefs.h <<\_ACEOF
2424#define HAVE_CRTIN
dd038e26
AS
2425_ACEOF
2426
2427 fi
2428
ba4481b5
DL
2429 case "${canonical}" in
2430 alpha*-*-netbsd*) machine=alpha ;;
2431 i[3456]86-*-netbsd*) machine=intel386 ;;
2432 m68k-*-netbsd*)
2433 # This is somewhat bogus.
2434 machine=hp9000s300 ;;
ba4481b5 2435 mips-*-netbsd*) machine=pmax ;;
2df636f4 2436 mipsel-*-netbsd*) machine=pmax ;;
97836269 2437 mipseb-*-netbsd*) machine=pmax ;;
3a64eef5 2438 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2439 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2440 vax-*-netbsd*) machine=vax ;;
2df636f4 2441 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2442 x86_64-*-netbsd*) machine=amdx86-64 ;;
2443 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2444 esac
2445 ;;
2446
2447 ## OpenBSD ports
2448 *-*-openbsd* )
2449 opsys=openbsd
2450 case "${canonical}" in
2451 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2452 arm-*-openbsd*) machine=arm ;;
2453 hppa-*-openbsd*) machine=hp9000s300 ;;
2454 i386-*-openbsd*) machine=intel386 ;;
2455 m68k-*-openbsd*) machine=hp9000s300 ;;
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 ## BSDI ports
2473 *-*-bsdi* )
2474 opsys=bsdi
2475 case "${canonical}" in
2476 i[345]86-*-bsdi*) machine=intel386 ;;
2477 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2478 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2479 esac
2480 case "${canonical}" in
2481 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2482 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2483 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2484 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2485 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2486 esac
2487 ;;
2488
ba4481b5
DL
2489 alpha*-*-linux-gnu* )
2490 machine=alpha opsys=gnu-linux
2491 ;;
2492
c4bb2108
DL
2493 arm*-*-linux-gnu* )
2494 machine=arm opsys=gnu-linux
2495 ;;
2496
040c474e
CY
2497 ## Apple Darwin / Mac OS X
2498 *-apple-darwin* )
2499 case "${canonical}" in
2500 i[3456]86-* ) machine=intel386 ;;
2501 powerpc-* ) machine=powermac ;;
2502 * ) unported=yes ;;
2503 esac
2504 opsys=darwin
2505 # Define CPP as follows to make autoconf work correctly.
2506 CPP="${CC-cc} -E -no-cpp-precomp"
2507 # Use fink packages if available.
2508 if test -d /sw/include && test -d /sw/lib; then
2509 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2510 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2511 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2512 fi
2513 ;;
2514
ba4481b5
DL
2515 ## Cubix QBx/386
2516 i[3456]86-cubix-sysv* )
2517 machine=intel386 opsys=usg5-3
2518 ;;
2519
ba4481b5
DL
2520 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2521 machine=pmax opsys=bsd4-2
2522 ;;
2523 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2524 machine=pmax opsys=bsd4-3
2525 ;;
2526 mips-dec-ultrix* )
2527 machine=pmax opsys=ultrix4-3
2528 ;;
ba4481b5
DL
2529 ## HP 9000 series 200 or 300
2530 m68*-hp-bsd* )
2531 machine=hp9000s300 opsys=bsd4-3
2532 ;;
2533 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2534 m68*-hp-hpux* )
2535 case "`uname -r`" in
2536 ## Someone's system reports A.B8.05 for this.
2537 ## I wonder what other possibilities there are.
2538 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2539 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2540 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2541 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2542 *) machine=hp9000s300 opsys=hpux ;;
2543 esac
2544 ;;
2545
6fbb6db1
GM
2546 ## HP 9000 series 700 and 800, running HP/UX
2547 hppa*-hp-hpux7* )
2548 machine=hp800 opsys=hpux
2549 ;;
2550 hppa*-hp-hpux8* )
2551 machine=hp800 opsys=hpux8
2552 ;;
2553 hppa*-hp-hpux9shr* )
2554 machine=hp800 opsys=hpux9shr
2555 ;;
2556 hppa*-hp-hpux9* )
2557 machine=hp800 opsys=hpux9
2558 ;;
2559 hppa*-hp-hpux10.2* )
2560 machine=hp800 opsys=hpux10-20
2561 ;;
2562 hppa*-hp-hpux10* )
2563 machine=hp800 opsys=hpux10
2564 ;;
2565 hppa*-hp-hpux1[1-9]* )
2566 machine=hp800 opsys=hpux11
2567 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2568 ;;
2569
409d9577
GM
2570 hppa*-*-linux-gnu* )
2571 machine=hp800 opsys=gnu-linux
2572 ;;
2573
6fbb6db1
GM
2574 ## HP 9000 series 700 and 800, running HP/UX
2575 hppa*-hp-hpux* )
2576 ## Cross-compilation? Nah!
2577 case "`uname -r`" in
2578 ## Someone's system reports A.B8.05 for this.
2579 ## I wonder what other possibilities there are.
2580 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2581 *.08.* ) machine=hp800 opsys=hpux8 ;;
2582 *.09.* ) machine=hp800 opsys=hpux9 ;;
2583 *) machine=hp800 opsys=hpux10 ;;
2584 esac
2585 ;;
ba4481b5
DL
2586 hppa*-*-nextstep* )
2587 machine=hp800 opsys=nextstep
2588 ;;
2589
ba4481b5 2590 ## IBM machines
ba4481b5
DL
2591 i370-ibm-aix*)
2592 machine=ibm370aix opsys=usg5-3
2593 ;;
55597d70 2594 s390-*-linux-gnu* )
138f0859
GM
2595 machine=ibms390 opsys=gnu-linux
2596 ;;
bcdb1378
EZ
2597 s390x-*-linux-gnu* )
2598 machine=ibms390x opsys=gnu-linux
2599 ;;
ba4481b5
DL
2600 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2601 machine=ibmrs6000 opsys=aix3-1
2602 ;;
2603 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2604 machine=ibmrs6000 opsys=aix3-2-5
2605 ;;
2606 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2607 machine=ibmrs6000 opsys=aix4-1
2608 ;;
2609 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2610 machine=ibmrs6000 opsys=aix4-2
2611 ;;
67bf991b
CY
2612 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2613 machine=ibmrs6000 opsys=aix4-2
2614 ;;
55597d70 2615 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2616 machine=ibmrs6000 opsys=aix4-2
2617 ;;
26a42dac
DN
2618 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2619 machine=ibmrs6000 opsys=aix4-2
2620 ;;
ba4481b5
DL
2621 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2622 machine=ibmrs6000 opsys=aix4
2623 ;;
2624 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2625 machine=ibmrs6000 opsys=aix4-1
2626 ;;
2627 rs6000-ibm-aix* | powerpc-ibm-aix* )
2628 machine=ibmrs6000 opsys=aix3-2
2629 ;;
ba4481b5
DL
2630
2631 ## Prime EXL
2632 i[3456]86-prime-sysv* )
2633 machine=i386 opsys=usg5-3
2634 ;;
2635
ba4481b5
DL
2636 ## ncr machine running svr4.3.
2637 i[3456]86-ncr-sysv4.3 )
2638 machine=ncr386 opsys=usg5-4-3
2639 ;;
2640
2641 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2642 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2643 i[3456]86-ncr-sysv* )
2644 machine=ncr386 opsys=usg5-4-2
2645 ;;
2646
c76e04a8
GM
2647 ## Macintosh PowerPC
2648 powerpc*-*-linux-gnu* )
2649 machine=macppc opsys=gnu-linux
2650 ;;
2651
ba4481b5
DL
2652 ## Workstations sold by MIPS
2653 ## This is not necessarily all workstations using the MIPS processor -
2654 ## Irises are produced by SGI, and DECstations by DEC.
2655
ba4481b5
DL
2656 mips-mips-bsd* )
2657 machine=mips opsys=bsd4-3
2658 ;;
2659 mips-mips-* )
2660 machine=mips opsys=usg5-2-2
2661 ;;
2662
2663 ## NeXT
2664 m68*-next-* | m68k-*-nextstep* )
2665 machine=m68k opsys=nextstep
2666 ;;
2667
ba4481b5
DL
2668 ## NEC EWS4800
2669 mips-nec-sysv4*)
2670 machine=ews4800 opsys=ux4800
2671 ;;
2672
ba4481b5
DL
2673 ## Siemens Nixdorf
2674 mips-siemens-sysv* | mips-sni-sysv*)
2675 machine=mips-siemens opsys=usg5-4
2676 NON_GNU_CC=/usr/ccs/bin/cc
2677 NON_GNU_CPP=/usr/ccs/lib/cpp
2678 ;;
2679
2680 ## Silicon Graphics machines
ba4481b5 2681 ## Iris 4D
ba4481b5
DL
2682 mips-sgi-irix6.5 )
2683 machine=iris4d opsys=irix6-5
946173ad
DL
2684 # Without defining _LANGUAGE_C, things get masked out in the headers
2685 # so that, for instance, grepping for `free' in stdlib.h fails and
2686 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2687 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2688 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2689 ;;
ba4481b5 2690
ba4481b5
DL
2691 ## Suns
2692 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2693 machine=sparc opsys=gnu-linux
2694 ;;
2695
d054101f 2696 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2697 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2698 | rs6000-*-solaris2*)
2699 case "${canonical}" in
ba4481b5 2700 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2701 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2702 powerpcle* ) machine=powerpcle ;;
2703 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2704 sparc* ) machine=sparc ;;
2705 * ) unported=yes ;;
2706 esac
2707 case "${canonical}" in
ba4481b5
DL
2708 *-sunos5.3* | *-solaris2.3* )
2709 opsys=sol2-3
2710 NON_GNU_CPP=/usr/ccs/lib/cpp
2711 ;;
2712 *-sunos5.4* | *-solaris2.4* )
2713 opsys=sol2-4
2714 NON_GNU_CPP=/usr/ccs/lib/cpp
2715 RANLIB="ar -ts"
2716 ;;
2717 *-sunos5.5* | *-solaris2.5* )
2718 opsys=sol2-5
2719 NON_GNU_CPP=/usr/ccs/lib/cpp
2720 RANLIB="ar -ts"
2721 ;;
8e967cf7
MR
2722 *-sunos5.6* | *-solaris2.6* )
2723 opsys=sol2-6
2724 NON_GNU_CPP=/usr/ccs/lib/cpp
2725 RANLIB="ar -ts"
2726 ;;
ba4481b5 2727 *-sunos5* | *-solaris* )
9e71690e 2728 opsys=sol2-6
089a966d
GM
2729 emacs_check_sunpro_c=yes
2730 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
2731 ;;
2732 * ) opsys=bsd4-2 ;;
2733 esac
2734 ## Watch out for a compiler that we know will not work.
2735 case "${canonical}" in
2736 *-solaris* | *-sunos5* )
2737 if [ "x$CC" = x/usr/ucb/cc ]; then
2738 ## /usr/ucb/cc doesn't work;
2739 ## we should find some other compiler that does work.
2740 unset CC
2741 fi
2742 ;;
2743 *) ;;
2744 esac
2745 ;;
2746 sparc-*-nextstep* )
2747 machine=sparc opsys=nextstep
2748 ;;
2749
ba4481b5
DL
2750 ## Tandem Integrity S2
2751 mips-tandem-sysv* )
2752 machine=tandem-s2 opsys=usg5-3
2753 ;;
2754
ba4481b5
DL
2755 ## Vaxen.
2756 vax-dec-* )
2757 machine=vax
2758 case "${canonical}" in
2759 *-bsd4.1* ) opsys=bsd4-1 ;;
2760 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2761 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2762 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2763 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2764 *-vms* ) opsys=vms ;;
2765 * ) unported=yes
2766 esac
2767 ;;
2768
f4988be7
GM
2769 ## IA-64
2770 ia64*-*-linux* )
2771 machine=ia64 opsys=gnu-linux
2772 ;;
2773
ba4481b5
DL
2774 ## Intel 386 machines where we don't care about the manufacturer
2775 i[3456]86-*-* )
2776 machine=intel386
2777 case "${canonical}" in
c60ee5e7 2778 *-cygwin ) opsys=cygwin ;;
eae54018 2779 *-darwin* ) opsys=darwin
23fd4483
ST
2780 CPP="${CC-cc} -E -no-cpp-precomp"
2781 ;;
ba4481b5 2782 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2783 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2784 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2785 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2786 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2787 *-nextstep* ) opsys=nextstep ;;
2788 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2789 esac
2790 ;;
2791
2792 ## m68k Linux-based GNU system
2793 m68k-*-linux-gnu* )
2794 machine=m68k opsys=gnu-linux
2795 ;;
2796
2797 ## Mips Linux-based GNU system
cd958eb3 2798 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2799 machine=mips opsys=gnu-linux
2800 ;;
2801
2802 ## UXP/DS
2803 sparc-fujitsu-sysv4* )
2804 machine=sparc opsys=uxpds
2805 NON_GNU_CPP=/usr/ccs/lib/cpp
2806 RANLIB="ar -ts"
2807 ;;
2808
598a2813
AS
2809 ## AMD x86-64 Linux-based GNU system
2810 x86_64-*-linux-gnu* )
24b01ec4 2811 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2812 ;;
2813
94218e27 2814 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2815 xtensa*-*-linux-gnu* )
94218e27
DN
2816 machine=xtensa opsys=gnu-linux
2817 ;;
2818
ba4481b5
DL
2819 * )
2820 unported=yes
2821 ;;
2822esac
2823
2824### If the code above didn't choose an operating system, just choose
2825### an operating system based on the configuration name. You really
2826### only want to use this when you have no idea what the right
2827### operating system is; if you know what operating systems a machine
2828### runs, it's cleaner to make it explicit in the case statement
2829### above.
2830if test x"${opsys}" = x; then
2831 case "${canonical}" in
2832 *-gnu* ) opsys=gnu ;;
2833 *-bsd4.[01] ) opsys=bsd4-1 ;;
2834 *-bsd4.2 ) opsys=bsd4-2 ;;
2835 *-bsd4.3 ) opsys=bsd4-3 ;;
2836 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2837 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2838 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2839 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2840 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2841 *-sysv5uw* ) opsys=unixware ;;
2842 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2843 *-sysv4.1* | *-sysvr4.1* )
2844 NON_GNU_CPP=/usr/lib/cpp
2845 opsys=usg5-4 ;;
2846 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2847 if [ x$NON_GNU_CPP = x ]; then
2848 if [ -f /usr/ccs/lib/cpp ]; then
2849 NON_GNU_CPP=/usr/ccs/lib/cpp
2850 else
2851 NON_GNU_CPP=/lib/cpp
2852 fi
2853 fi
2854 opsys=usg5-4-2 ;;
2855 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2856 * )
2857 unported=yes
2858 ;;
2859 esac
2860fi
2861
26a42dac
DN
2862### Tests for sytems that we beleive are obsolete and should be desupported.
2863
2864case "${machine}" in
2865 pmax | hp9000s300 | ibm370aix | ncr386 | ews4800 | mips-siemens | powerpcle | tandem-s2 )
2866 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
2867 echo "and it is planned to be desupported in the next version of Emacs"
2868 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
2869 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
2870 echo "exit 33 line. After that you can run configure again and 'complete' the build."
2871 exit 33
2872 ;;
2873esac
2874
2875case "${opsys}" in
a8cd2496 2876 bsd386 | bsdos2-1 | bsdos2 | bsdos3 | bsdos4 | bsd4-1 | bsd4-2 | bsd4-3 | usg5-0 | usg5-2-2 | usg5-2 | usg5-3 | ultrix4-3 | 386bsd | hpux | hpux8 | hpux9 | hpux9shr | hpux10 | aix3-1 | aix3-2-5 | aix3-2 | aix4-1 | nextstep | ux4800 | uxpds | uxpv )
26a42dac
DN
2877 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
2878 echo "and it is planned to be desupported in the next version of Emacs"
2879 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
2880 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
2881 echo "'exit 44' line. After that you can run 'configure' again and complete the build."
2882 exit 44
2883 ;;
2884esac
2885
c0d27fcc 2886
22044edf 2887
ba4481b5 2888if test $unported = yes; then
c0d27fcc 2889 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2890Check \`etc/MACHINES' for recognized configuration names." >&5
2891echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2892Check \`etc/MACHINES' for recognized configuration names." >&2;}
2893 { (exit 1); exit 1; }; }
ba4481b5
DL
2894fi
2895
2896machfile="m/${machine}.h"
2897opsysfile="s/${opsys}.h"
2898
c0d27fcc 2899
ba4481b5
DL
2900#### Choose a compiler.
2901test -n "$CC" && cc_specified=yes
2902
2903# Save the value of CFLAGS that the user specified.
2904SPECIFIED_CFLAGS="$CFLAGS"
2905
503d2be0
AS
2906ac_ext=c
2907ac_cpp='$CPP $CPPFLAGS'
2908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2910ac_compiler_gnu=$ac_cv_c_compiler_gnu
2911if test -n "$ac_tool_prefix"; then
2912 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2913set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2914{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2915echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2916if test "${ac_cv_prog_CC+set}" = set; then
2917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2918else
2919 if test -n "$CC"; then
2920 ac_cv_prog_CC="$CC" # Let the user override the test.
2921else
c0d27fcc
MR
2922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923for as_dir in $PATH
2924do
2925 IFS=$as_save_IFS
2926 test -z "$as_dir" && as_dir=.
2927 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2929 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2930 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2931 break 2
2932 fi
2933done
503d2be0 2934done
ca81d7a0 2935IFS=$as_save_IFS
503d2be0 2936
ba4481b5
DL
2937fi
2938fi
503d2be0 2939CC=$ac_cv_prog_CC
ba4481b5 2940if test -n "$CC"; then
ca81d7a0
JD
2941 { echo "$as_me:$LINENO: result: $CC" >&5
2942echo "${ECHO_T}$CC" >&6; }
503d2be0 2943else
ca81d7a0
JD
2944 { echo "$as_me:$LINENO: result: no" >&5
2945echo "${ECHO_T}no" >&6; }
503d2be0
AS
2946fi
2947
ca81d7a0 2948
503d2be0
AS
2949fi
2950if test -z "$ac_cv_prog_CC"; then
2951 ac_ct_CC=$CC
2952 # Extract the first word of "gcc", so it can be a program name with args.
2953set dummy gcc; ac_word=$2
ca81d7a0
JD
2954{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2955echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2956if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2957 echo $ECHO_N "(cached) $ECHO_C" >&6
2958else
2959 if test -n "$ac_ct_CC"; then
2960 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2961else
c0d27fcc
MR
2962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2963for as_dir in $PATH
2964do
2965 IFS=$as_save_IFS
2966 test -z "$as_dir" && as_dir=.
2967 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2969 ac_cv_prog_ac_ct_CC="gcc"
2970 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2971 break 2
2972 fi
2973done
503d2be0 2974done
ca81d7a0 2975IFS=$as_save_IFS
503d2be0
AS
2976
2977fi
2978fi
2979ac_ct_CC=$ac_cv_prog_ac_ct_CC
2980if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2981 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2982echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2983else
ca81d7a0
JD
2984 { echo "$as_me:$LINENO: result: no" >&5
2985echo "${ECHO_T}no" >&6; }
503d2be0
AS
2986fi
2987
ca81d7a0
JD
2988 if test "x$ac_ct_CC" = x; then
2989 CC=""
2990 else
2991 case $cross_compiling:$ac_tool_warned in
2992yes:)
2993{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2994whose name does not start with the host triplet. If you think this
2995configuration is useful to you, please write to autoconf@gnu.org." >&5
2996echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2997whose name does not start with the host triplet. If you think this
2998configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2999ac_tool_warned=yes ;;
3000esac
3001 CC=$ac_ct_CC
3002 fi
503d2be0
AS
3003else
3004 CC="$ac_cv_prog_CC"
ba4481b5
DL
3005fi
3006
3007if test -z "$CC"; then
ca81d7a0
JD
3008 if test -n "$ac_tool_prefix"; then
3009 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3010set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3011{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3013if test "${ac_cv_prog_CC+set}" = set; then
3014 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3015else
3016 if test -n "$CC"; then
3017 ac_cv_prog_CC="$CC" # Let the user override the test.
3018else
c0d27fcc
MR
3019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3020for as_dir in $PATH
3021do
3022 IFS=$as_save_IFS
3023 test -z "$as_dir" && as_dir=.
3024 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3026 ac_cv_prog_CC="${ac_tool_prefix}cc"
3027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3028 break 2
3029 fi
3030done
503d2be0 3031done
ca81d7a0 3032IFS=$as_save_IFS
503d2be0
AS
3033
3034fi
3035fi
3036CC=$ac_cv_prog_CC
3037if test -n "$CC"; then
ca81d7a0
JD
3038 { echo "$as_me:$LINENO: result: $CC" >&5
3039echo "${ECHO_T}$CC" >&6; }
503d2be0 3040else
ca81d7a0
JD
3041 { echo "$as_me:$LINENO: result: no" >&5
3042echo "${ECHO_T}no" >&6; }
503d2be0
AS
3043fi
3044
503d2be0 3045
ca81d7a0 3046 fi
503d2be0
AS
3047fi
3048if test -z "$CC"; then
3049 # Extract the first word of "cc", so it can be a program name with args.
3050set dummy cc; ac_word=$2
ca81d7a0
JD
3051{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3052echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3053if test "${ac_cv_prog_CC+set}" = set; then
3054 echo $ECHO_N "(cached) $ECHO_C" >&6
3055else
3056 if test -n "$CC"; then
3057 ac_cv_prog_CC="$CC" # Let the user override the test.
3058else
3059 ac_prog_rejected=no
c0d27fcc
MR
3060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3061for as_dir in $PATH
3062do
3063 IFS=$as_save_IFS
3064 test -z "$as_dir" && as_dir=.
3065 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3067 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3068 ac_prog_rejected=yes
3069 continue
3070 fi
3071 ac_cv_prog_CC="cc"
3072 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3073 break 2
3074 fi
3075done
503d2be0 3076done
ca81d7a0 3077IFS=$as_save_IFS
503d2be0 3078
ba4481b5
DL
3079if test $ac_prog_rejected = yes; then
3080 # We found a bogon in the path, so make sure we never use it.
3081 set dummy $ac_cv_prog_CC
3082 shift
503d2be0 3083 if test $# != 0; then
ba4481b5
DL
3084 # We chose a different compiler from the bogus one.
3085 # However, it has the same basename, so the bogon will be chosen
3086 # first if we set CC to just the basename; use the full file name.
3087 shift
6bae0ccf 3088 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3089 fi
3090fi
3091fi
3092fi
503d2be0 3093CC=$ac_cv_prog_CC
ba4481b5 3094if test -n "$CC"; then
ca81d7a0
JD
3095 { echo "$as_me:$LINENO: result: $CC" >&5
3096echo "${ECHO_T}$CC" >&6; }
ba4481b5 3097else
ca81d7a0
JD
3098 { echo "$as_me:$LINENO: result: no" >&5
3099echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3100fi
3101
ca81d7a0 3102
503d2be0
AS
3103fi
3104if test -z "$CC"; then
3105 if test -n "$ac_tool_prefix"; then
ca81d7a0 3106 for ac_prog in cl.exe
503d2be0
AS
3107 do
3108 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3109set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3112if test "${ac_cv_prog_CC+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3114else
3115 if test -n "$CC"; then
3116 ac_cv_prog_CC="$CC" # Let the user override the test.
3117else
c0d27fcc
MR
3118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3119for as_dir in $PATH
3120do
3121 IFS=$as_save_IFS
3122 test -z "$as_dir" && as_dir=.
3123 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3125 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3127 break 2
3128 fi
3129done
503d2be0 3130done
ca81d7a0 3131IFS=$as_save_IFS
503d2be0 3132
c4bb2108
DL
3133fi
3134fi
503d2be0 3135CC=$ac_cv_prog_CC
c4bb2108 3136if test -n "$CC"; then
ca81d7a0
JD
3137 { echo "$as_me:$LINENO: result: $CC" >&5
3138echo "${ECHO_T}$CC" >&6; }
c4bb2108 3139else
ca81d7a0
JD
3140 { echo "$as_me:$LINENO: result: no" >&5
3141echo "${ECHO_T}no" >&6; }
503d2be0
AS
3142fi
3143
ca81d7a0 3144
503d2be0
AS
3145 test -n "$CC" && break
3146 done
3147fi
3148if test -z "$CC"; then
3149 ac_ct_CC=$CC
ca81d7a0 3150 for ac_prog in cl.exe
503d2be0
AS
3151do
3152 # Extract the first word of "$ac_prog", so it can be a program name with args.
3153set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3154{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3155echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3156if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3157 echo $ECHO_N "(cached) $ECHO_C" >&6
3158else
3159 if test -n "$ac_ct_CC"; then
3160 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3161else
c0d27fcc
MR
3162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3163for as_dir in $PATH
3164do
3165 IFS=$as_save_IFS
3166 test -z "$as_dir" && as_dir=.
3167 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3168 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3169 ac_cv_prog_ac_ct_CC="$ac_prog"
3170 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3171 break 2
3172 fi
3173done
503d2be0 3174done
ca81d7a0 3175IFS=$as_save_IFS
503d2be0 3176
c4bb2108 3177fi
503d2be0
AS
3178fi
3179ac_ct_CC=$ac_cv_prog_ac_ct_CC
3180if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3181 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3182echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3183else
ca81d7a0
JD
3184 { echo "$as_me:$LINENO: result: no" >&5
3185echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3186fi
3187
ca81d7a0 3188
503d2be0
AS
3189 test -n "$ac_ct_CC" && break
3190done
ba4481b5 3191
ca81d7a0
JD
3192 if test "x$ac_ct_CC" = x; then
3193 CC=""
3194 else
3195 case $cross_compiling:$ac_tool_warned in
3196yes:)
3197{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3198whose name does not start with the host triplet. If you think this
3199configuration is useful to you, please write to autoconf@gnu.org." >&5
3200echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3201whose name does not start with the host triplet. If you think this
3202configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3203ac_tool_warned=yes ;;
3204esac
3205 CC=$ac_ct_CC
3206 fi
503d2be0
AS
3207fi
3208
3209fi
ba4481b5 3210
c0d27fcc 3211
19650fd6
AS
3212test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3213See \`config.log' for more details." >&5
3214echo "$as_me: error: no acceptable C compiler found in \$PATH
3215See \`config.log' for more details." >&2;}
503d2be0 3216 { (exit 1); exit 1; }; }
c4bb2108 3217
503d2be0 3218# Provide some information about the compiler.
ca81d7a0 3219echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3220ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3221{ (ac_try="$ac_compiler --version >&5"
3222case "(($ac_try" in
3223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3224 *) ac_try_echo=$ac_try;;
3225esac
3226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3227 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3228 ac_status=$?
c0d27fcc 3229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3230 (exit $ac_status); }
ca81d7a0
JD
3231{ (ac_try="$ac_compiler -v >&5"
3232case "(($ac_try" in
3233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3234 *) ac_try_echo=$ac_try;;
3235esac
3236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3237 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3238 ac_status=$?
c0d27fcc 3239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3240 (exit $ac_status); }
ca81d7a0
JD
3241{ (ac_try="$ac_compiler -V >&5"
3242case "(($ac_try" in
3243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3244 *) ac_try_echo=$ac_try;;
3245esac
3246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3247 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3248 ac_status=$?
c0d27fcc 3249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3250 (exit $ac_status); }
3251
3252cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3253/* confdefs.h. */
3254_ACEOF
3255cat confdefs.h >>conftest.$ac_ext
3256cat >>conftest.$ac_ext <<_ACEOF
3257/* end confdefs.h. */
c4bb2108 3258
503d2be0
AS
3259int
3260main ()
3261{
3262
3263 ;
3264 return 0;
3265}
3266_ACEOF
3267ac_clean_files_save=$ac_clean_files
19650fd6 3268ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3269# Try to create an executable without -o first, disregard a.out.
3270# It will help us diagnose broken compilers, and finding out an intuition
3271# of exeext.
ca81d7a0
JD
3272{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3273echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3274ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3275#
3276# List of possible output files, starting from the most likely.
3277# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3278# only as a last resort. b.out is created by i960 compilers.
3279ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3280#
3281# The IRIX 6 linker writes into existing files which may not be
3282# executable, retaining their permissions. Remove them first so a
3283# subsequent execution test works.
3284ac_rmfiles=
3285for ac_file in $ac_files
3286do
3287 case $ac_file in
3288 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3289 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3290 esac
3291done
3292rm -f $ac_rmfiles
3293
3294if { (ac_try="$ac_link_default"
3295case "(($ac_try" in
3296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3297 *) ac_try_echo=$ac_try;;
3298esac
3299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3300 (eval "$ac_link_default") 2>&5
503d2be0 3301 ac_status=$?
c0d27fcc 3302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3303 (exit $ac_status); }; then
ca81d7a0
JD
3304 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3305# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3306# in a Makefile. We should not override ac_cv_exeext if it was cached,
3307# so that the user can short-circuit this test for compilers unknown to
3308# Autoconf.
f053c89f 3309for ac_file in $ac_files ''
19650fd6 3310do
6bae0ccf 3311 test -f "$ac_file" || continue
503d2be0 3312 case $ac_file in
ca81d7a0 3313 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3314 ;;
19650fd6 3315 [ab].out )
edfaf76d
LK
3316 # We found the default executable, but exeext='' is most
3317 # certainly right.
3318 break;;
19650fd6 3319 *.* )
ca81d7a0
JD
3320 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3321 then :; else
3322 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3323 fi
3324 # We set ac_cv_exeext here because the later test for it is not
3325 # safe: cross compilers may not add the suffix if given an `-o'
3326 # argument, so we may need to know it at that point already.
3327 # Even if this section looks crufty: it has the advantage of
3328 # actually working.
edfaf76d 3329 break;;
19650fd6 3330 * )
edfaf76d 3331 break;;
503d2be0
AS
3332 esac
3333done
ca81d7a0
JD
3334test "$ac_cv_exeext" = no && ac_cv_exeext=
3335
503d2be0 3336else
f053c89f
CY
3337 ac_file=''
3338fi
3339
3340{ echo "$as_me:$LINENO: result: $ac_file" >&5
3341echo "${ECHO_T}$ac_file" >&6; }
3342if test -z "$ac_file"; then
503d2be0 3343 echo "$as_me: failed program was:" >&5
19650fd6
AS
3344sed 's/^/| /' conftest.$ac_ext >&5
3345
6bae0ccf 3346{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3347See \`config.log' for more details." >&5
6bae0ccf 3348echo "$as_me: error: C compiler cannot create executables
19650fd6 3349See \`config.log' for more details." >&2;}
503d2be0
AS
3350 { (exit 77); exit 77; }; }
3351fi
3352
3353ac_exeext=$ac_cv_exeext
503d2be0 3354
ca81d7a0 3355# Check that the compiler produces executables we can run. If not, either
503d2be0 3356# the compiler is broken, or we cross compile.
ca81d7a0
JD
3357{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3358echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3359# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3360# If not cross compiling, check that we can run a simple program.
3361if test "$cross_compiling" != yes; then
3362 if { ac_try='./$ac_file'
ca81d7a0
JD
3363 { (case "(($ac_try" in
3364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3365 *) ac_try_echo=$ac_try;;
3366esac
3367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3368 (eval "$ac_try") 2>&5
503d2be0 3369 ac_status=$?
c0d27fcc 3370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3371 (exit $ac_status); }; }; then
3372 cross_compiling=no
ba4481b5 3373 else
503d2be0
AS
3374 if test "$cross_compiling" = maybe; then
3375 cross_compiling=yes
3376 else
c0d27fcc 3377 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3378If you meant to cross compile, use \`--host'.
3379See \`config.log' for more details." >&5
503d2be0 3380echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3381If you meant to cross compile, use \`--host'.
3382See \`config.log' for more details." >&2;}
503d2be0
AS
3383 { (exit 1); exit 1; }; }
3384 fi
ba4481b5 3385 fi
503d2be0 3386fi
ca81d7a0
JD
3387{ echo "$as_me:$LINENO: result: yes" >&5
3388echo "${ECHO_T}yes" >&6; }
503d2be0 3389
19650fd6 3390rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3391ac_clean_files=$ac_clean_files_save
ca81d7a0 3392# Check that the compiler produces executables we can run. If not, either
503d2be0 3393# the compiler is broken, or we cross compile.
ca81d7a0
JD
3394{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3395echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3396{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3397echo "${ECHO_T}$cross_compiling" >&6; }
3398
3399{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3400echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3401if { (ac_try="$ac_link"
3402case "(($ac_try" in
3403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3404 *) ac_try_echo=$ac_try;;
3405esac
3406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3407 (eval "$ac_link") 2>&5
503d2be0 3408 ac_status=$?
c0d27fcc 3409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3410 (exit $ac_status); }; then
3411 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3412# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3413# work properly (i.e., refer to `conftest.exe'), while it won't with
3414# `rm'.
6bae0ccf
DL
3415for ac_file in conftest.exe conftest conftest.*; do
3416 test -f "$ac_file" || continue
503d2be0 3417 case $ac_file in
ca81d7a0 3418 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3419 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3420 break;;
503d2be0
AS
3421 * ) break;;
3422 esac
3423done
ba4481b5 3424else
19650fd6
AS
3425 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3426See \`config.log' for more details." >&5
3427echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3428See \`config.log' for more details." >&2;}
503d2be0 3429 { (exit 1); exit 1; }; }
ba4481b5 3430fi
ba4481b5 3431
503d2be0 3432rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3433{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3434echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3435
503d2be0
AS
3436rm -f conftest.$ac_ext
3437EXEEXT=$ac_cv_exeext
3438ac_exeext=$EXEEXT
ca81d7a0
JD
3439{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3440echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3441if test "${ac_cv_objext+set}" = set; then
3442 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3443else
503d2be0 3444 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3445/* confdefs.h. */
3446_ACEOF
3447cat confdefs.h >>conftest.$ac_ext
3448cat >>conftest.$ac_ext <<_ACEOF
3449/* end confdefs.h. */
ba4481b5 3450
503d2be0
AS
3451int
3452main ()
3453{
ba4481b5 3454
503d2be0
AS
3455 ;
3456 return 0;
3457}
3458_ACEOF
3459rm -f conftest.o conftest.obj
ca81d7a0
JD
3460if { (ac_try="$ac_compile"
3461case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464esac
3465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3466 (eval "$ac_compile") 2>&5
503d2be0 3467 ac_status=$?
c0d27fcc 3468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3469 (exit $ac_status); }; then
ca81d7a0
JD
3470 for ac_file in conftest.o conftest.obj conftest.*; do
3471 test -f "$ac_file" || continue;
503d2be0 3472 case $ac_file in
ca81d7a0 3473 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3474 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3475 break;;
3476 esac
3477done
c4bb2108 3478else
503d2be0 3479 echo "$as_me: failed program was:" >&5
19650fd6
AS
3480sed 's/^/| /' conftest.$ac_ext >&5
3481
3482{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3483See \`config.log' for more details." >&5
3484echo "$as_me: error: cannot compute suffix of object files: cannot compile
3485See \`config.log' for more details." >&2;}
503d2be0 3486 { (exit 1); exit 1; }; }
c4bb2108
DL
3487fi
3488
503d2be0
AS
3489rm -f conftest.$ac_cv_objext conftest.$ac_ext
3490fi
ca81d7a0
JD
3491{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3492echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3493OBJEXT=$ac_cv_objext
3494ac_objext=$OBJEXT
ca81d7a0
JD
3495{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3496echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3497if test "${ac_cv_c_compiler_gnu+set}" = set; then
3498 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3499else
503d2be0 3500 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3501/* confdefs.h. */
3502_ACEOF
3503cat confdefs.h >>conftest.$ac_ext
3504cat >>conftest.$ac_ext <<_ACEOF
3505/* end confdefs.h. */
503d2be0
AS
3506
3507int
3508main ()
3509{
3510#ifndef __GNUC__
3511 choke me
3512#endif
3513
3514 ;
3515 return 0;
3516}
3517_ACEOF
3518rm -f conftest.$ac_objext
ca81d7a0
JD
3519if { (ac_try="$ac_compile"
3520case "(($ac_try" in
3521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522 *) ac_try_echo=$ac_try;;
3523esac
3524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3525 (eval "$ac_compile") 2>conftest.er1
503d2be0 3526 ac_status=$?
edfaf76d
LK
3527 grep -v '^ *+' conftest.er1 >conftest.err
3528 rm -f conftest.er1
3529 cat conftest.err >&5
c0d27fcc 3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3531 (exit $ac_status); } && {
3532 test -z "$ac_c_werror_flag" ||
3533 test ! -s conftest.err
3534 } && test -s conftest.$ac_objext; then
503d2be0
AS
3535 ac_compiler_gnu=yes
3536else
3537 echo "$as_me: failed program was:" >&5
19650fd6
AS
3538sed 's/^/| /' conftest.$ac_ext >&5
3539
ca81d7a0 3540 ac_compiler_gnu=no
503d2be0 3541fi
ca81d7a0
JD
3542
3543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3544ac_cv_c_compiler_gnu=$ac_compiler_gnu
3545
3546fi
ca81d7a0
JD
3547{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3548echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3549GCC=`test $ac_compiler_gnu = yes && echo yes`
3550ac_test_CFLAGS=${CFLAGS+set}
3551ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3552{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3553echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3554if test "${ac_cv_prog_cc_g+set}" = set; then
3555 echo $ECHO_N "(cached) $ECHO_C" >&6
3556else
ca81d7a0
JD
3557 ac_save_c_werror_flag=$ac_c_werror_flag
3558 ac_c_werror_flag=yes
3559 ac_cv_prog_cc_g=no
3560 CFLAGS="-g"
3561 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3562/* confdefs.h. */
3563_ACEOF
3564cat confdefs.h >>conftest.$ac_ext
3565cat >>conftest.$ac_ext <<_ACEOF
3566/* end confdefs.h. */
503d2be0
AS
3567
3568int
3569main ()
3570{
3571
3572 ;
3573 return 0;
3574}
3575_ACEOF
3576rm -f conftest.$ac_objext
ca81d7a0
JD
3577if { (ac_try="$ac_compile"
3578case "(($ac_try" in
3579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3580 *) ac_try_echo=$ac_try;;
3581esac
3582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3583 (eval "$ac_compile") 2>conftest.er1
503d2be0 3584 ac_status=$?
edfaf76d
LK
3585 grep -v '^ *+' conftest.er1 >conftest.err
3586 rm -f conftest.er1
3587 cat conftest.err >&5
c0d27fcc 3588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3589 (exit $ac_status); } && {
3590 test -z "$ac_c_werror_flag" ||
3591 test ! -s conftest.err
3592 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3593 ac_cv_prog_cc_g=yes
3594else
503d2be0 3595 echo "$as_me: failed program was:" >&5
19650fd6
AS
3596sed 's/^/| /' conftest.$ac_ext >&5
3597
ca81d7a0
JD
3598 CFLAGS=""
3599 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3600/* confdefs.h. */
3601_ACEOF
3602cat confdefs.h >>conftest.$ac_ext
3603cat >>conftest.$ac_ext <<_ACEOF
3604/* end confdefs.h. */
edfaf76d 3605
6bae0ccf
DL
3606int
3607main ()
3608{
ca81d7a0 3609
6bae0ccf
DL
3610 ;
3611 return 0;
3612}
3613_ACEOF
ca81d7a0
JD
3614rm -f conftest.$ac_objext
3615if { (ac_try="$ac_compile"
3616case "(($ac_try" in
3617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3618 *) ac_try_echo=$ac_try;;
3619esac
3620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3621 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3622 ac_status=$?
edfaf76d
LK
3623 grep -v '^ *+' conftest.er1 >conftest.err
3624 rm -f conftest.er1
3625 cat conftest.err >&5
edfaf76d 3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3627 (exit $ac_status); } && {
3628 test -z "$ac_c_werror_flag" ||
3629 test ! -s conftest.err
3630 } && test -s conftest.$ac_objext; then
ca81d7a0 3631 :
6bae0ccf
DL
3632else
3633 echo "$as_me: failed program was:" >&5
19650fd6
AS
3634sed 's/^/| /' conftest.$ac_ext >&5
3635
ca81d7a0
JD
3636 ac_c_werror_flag=$ac_save_c_werror_flag
3637 CFLAGS="-g"
3638 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3639/* confdefs.h. */
19650fd6
AS
3640_ACEOF
3641cat confdefs.h >>conftest.$ac_ext
3642cat >>conftest.$ac_ext <<_ACEOF
3643/* end confdefs.h. */
ca81d7a0 3644
503d2be0
AS
3645int
3646main ()
3647{
ca81d7a0 3648
503d2be0
AS
3649 ;
3650 return 0;
3651}
3652_ACEOF
3653rm -f conftest.$ac_objext
ca81d7a0
JD
3654if { (ac_try="$ac_compile"
3655case "(($ac_try" in
3656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3657 *) ac_try_echo=$ac_try;;
3658esac
3659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3660 (eval "$ac_compile") 2>conftest.er1
503d2be0 3661 ac_status=$?
edfaf76d
LK
3662 grep -v '^ *+' conftest.er1 >conftest.err
3663 rm -f conftest.er1
3664 cat conftest.err >&5
c0d27fcc 3665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3666 (exit $ac_status); } && {
3667 test -z "$ac_c_werror_flag" ||
3668 test ! -s conftest.err
3669 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3670 ac_cv_prog_cc_g=yes
3671else
503d2be0 3672 echo "$as_me: failed program was:" >&5
19650fd6
AS
3673sed 's/^/| /' conftest.$ac_ext >&5
3674
ca81d7a0 3675
ba4481b5 3676fi
ca81d7a0
JD
3677
3678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3679fi
3680
3681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3682fi
3683
3684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3685 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3686fi
ca81d7a0
JD
3687{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3688echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3689if test "$ac_test_CFLAGS" = set; then
503d2be0 3690 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3691elif test $ac_cv_prog_cc_g = yes; then
3692 if test "$GCC" = yes; then
ba4481b5
DL
3693 CFLAGS="-g -O2"
3694 else
c4bb2108 3695 CFLAGS="-g"
ba4481b5 3696 fi
22afa6e8 3697else
c4bb2108
DL
3698 if test "$GCC" = yes; then
3699 CFLAGS="-O2"
3700 else
3701 CFLAGS=
3702 fi
ba4481b5 3703fi
ca81d7a0
JD
3704{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3705echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3706if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3707 echo $ECHO_N "(cached) $ECHO_C" >&6
3708else
ca81d7a0 3709 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3710ac_save_CC=$CC
3711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3712/* confdefs.h. */
3713_ACEOF
3714cat confdefs.h >>conftest.$ac_ext
3715cat >>conftest.$ac_ext <<_ACEOF
3716/* end confdefs.h. */
6bae0ccf
DL
3717#include <stdarg.h>
3718#include <stdio.h>
3719#include <sys/types.h>
3720#include <sys/stat.h>
3721/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3722struct buf { int x; };
3723FILE * (*rcsopen) (struct buf *, struct stat *, int);
3724static char *e (p, i)
3725 char **p;
3726 int i;
3727{
3728 return p[i];
3729}
3730static char *f (char * (*g) (char **, int), char **p, ...)
3731{
3732 char *s;
3733 va_list v;
3734 va_start (v,p);
3735 s = g (p, va_arg (v,int));
3736 va_end (v);
3737 return s;
3738}
edfaf76d
LK
3739
3740/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3741 function prototypes and stuff, but not '\xHH' hex character constants.
3742 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3743 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3744 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3745 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3746 that's true only with -std. */
edfaf76d
LK
3747int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3748
ca81d7a0
JD
3749/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3750 inside strings and character constants. */
3751#define FOO(x) 'x'
3752int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3753
6bae0ccf
DL
3754int test (int i, double x);
3755struct s1 {int (*f) (int a);};
3756struct s2 {int (*f) (double a);};
3757int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3758int argc;
3759char **argv;
3760int
3761main ()
3762{
3763return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3764 ;
3765 return 0;
3766}
3767_ACEOF
ca81d7a0
JD
3768for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3769 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3770do
3771 CC="$ac_save_CC $ac_arg"
3772 rm -f conftest.$ac_objext
ca81d7a0
JD
3773if { (ac_try="$ac_compile"
3774case "(($ac_try" in
3775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3776 *) ac_try_echo=$ac_try;;
3777esac
3778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3779 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3780 ac_status=$?
edfaf76d
LK
3781 grep -v '^ *+' conftest.er1 >conftest.err
3782 rm -f conftest.er1
3783 cat conftest.err >&5
6bae0ccf 3784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3785 (exit $ac_status); } && {
3786 test -z "$ac_c_werror_flag" ||
3787 test ! -s conftest.err
3788 } && test -s conftest.$ac_objext; then
ca81d7a0 3789 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3790else
3791 echo "$as_me: failed program was:" >&5
19650fd6
AS
3792sed 's/^/| /' conftest.$ac_ext >&5
3793
ca81d7a0 3794
6bae0ccf 3795fi
ca81d7a0
JD
3796
3797rm -f core conftest.err conftest.$ac_objext
3798 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3799done
ca81d7a0 3800rm -f conftest.$ac_ext
6bae0ccf
DL
3801CC=$ac_save_CC
3802
3803fi
ca81d7a0
JD
3804# AC_CACHE_VAL
3805case "x$ac_cv_prog_cc_c89" in
3806 x)
3807 { echo "$as_me:$LINENO: result: none needed" >&5
3808echo "${ECHO_T}none needed" >&6; } ;;
3809 xno)
3810 { echo "$as_me:$LINENO: result: unsupported" >&5
3811echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3812 *)
ca81d7a0
JD
3813 CC="$CC $ac_cv_prog_cc_c89"
3814 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3815echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3816esac
3817
19650fd6 3818
503d2be0
AS
3819ac_ext=c
3820ac_cpp='$CPP $CPPFLAGS'
3821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3823ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3824
c0d27fcc 3825
ba4481b5
DL
3826# On Suns, sometimes $CPP names a directory.
3827if test -n "$CPP" && test -d "$CPP"; then
3828 CPP=
3829fi
3830
089a966d
GM
3831## If not using gcc, and on Solaris, and no CPP specified, see if
3832## using a Sun compiler, which needs -Xs to prevent whitespace.
3833if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3834 test x"$CPP" = x; then
3835 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3836echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3837
3838if test "${emacs_cv_sunpro_c+set}" = set; then
3839 echo $ECHO_N "(cached) $ECHO_C" >&6
3840else
3841 cat >conftest.$ac_ext <<_ACEOF
3842/* confdefs.h. */
3843_ACEOF
3844cat confdefs.h >>conftest.$ac_ext
3845cat >>conftest.$ac_ext <<_ACEOF
3846/* end confdefs.h. */
3847
3848int
3849main ()
3850{
3851#ifndef __SUNPRO_C
3852fail;
3853#endif
3854
3855 ;
3856 return 0;
3857}
3858_ACEOF
3859rm -f conftest.$ac_objext conftest$ac_exeext
3860if { (ac_try="$ac_link"
3861case "(($ac_try" in
3862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3863 *) ac_try_echo=$ac_try;;
3864esac
3865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3866 (eval "$ac_link") 2>conftest.er1
3867 ac_status=$?
3868 grep -v '^ *+' conftest.er1 >conftest.err
3869 rm -f conftest.er1
3870 cat conftest.err >&5
3871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3872 (exit $ac_status); } && {
3873 test -z "$ac_c_werror_flag" ||
3874 test ! -s conftest.err
3875 } && test -s conftest$ac_exeext &&
3876 $as_test_x conftest$ac_exeext; then
3877 emacs_cv_sunpro_c=yes
3878else
3879 echo "$as_me: failed program was:" >&5
3880sed 's/^/| /' conftest.$ac_ext >&5
3881
3882 emacs_cv_sunpro_c=no
3883fi
3884
3885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3886 conftest$ac_exeext conftest.$ac_ext
3887fi
3888
3889 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3890echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3891
3892 if test x"$emacs_cv_sunpro_c" = xyes; then
3893 NON_GNU_CPP="$CC -E -Xs"
3894 fi
3895fi
3896
ba4481b5
DL
3897#### Some systems specify a CPP to use unless we are using GCC.
3898#### Now that we know whether we are using GCC, we can decide whether
3899#### to use that one.
3900if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3901then
3902 CPP="$NON_GNU_CPP"
3903fi
3904
3905#### Some systems specify a CC to use unless we are using GCC.
3906#### Now that we know whether we are using GCC, we can decide whether
3907#### to use that one.
3908if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3909 test x$cc_specified != xyes
3910then
3911 CC="$NON_GNU_CC"
3912fi
3913
3914if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3915then
3916 CC="$CC $GCC_TEST_OPTIONS"
3917fi
3918
3919if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3920then
3921 CC="$CC $NON_GCC_TEST_OPTIONS"
3922fi
3923
a51f4969
SM
3924
3925cat >>confdefs.h <<\_ACEOF
3926#define _GNU_SOURCE 1
3927_ACEOF
3928
3929
e143ad11
AS
3930ac_ext=c
3931ac_cpp='$CPP $CPPFLAGS'
3932ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3933ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3934ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3935{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3936echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3937# On Suns, sometimes $CPP names a directory.
3938if test -n "$CPP" && test -d "$CPP"; then
3939 CPP=
3940fi
3941if test -z "$CPP"; then
3942 if test "${ac_cv_prog_CPP+set}" = set; then
3943 echo $ECHO_N "(cached) $ECHO_C" >&6
3944else
3945 # Double quotes because CPP needs to be expanded
3946 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3947 do
3948 ac_preproc_ok=false
3949for ac_c_preproc_warn_flag in '' yes
3950do
3951 # Use a header file that comes with gcc, so configuring glibc
3952 # with a fresh cross-compiler works.
3953 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3954 # <limits.h> exists even on freestanding compilers.
3955 # On the NeXT, cc -E runs the code through the compiler's parser,
3956 # not just through cpp. "Syntax error" is here to catch this case.
3957 cat >conftest.$ac_ext <<_ACEOF
3958/* confdefs.h. */
3959_ACEOF
3960cat confdefs.h >>conftest.$ac_ext
3961cat >>conftest.$ac_ext <<_ACEOF
3962/* end confdefs.h. */
3963#ifdef __STDC__
3964# include <limits.h>
3965#else
3966# include <assert.h>
3967#endif
3968 Syntax error
3969_ACEOF
ca81d7a0
JD
3970if { (ac_try="$ac_cpp conftest.$ac_ext"
3971case "(($ac_try" in
3972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3973 *) ac_try_echo=$ac_try;;
3974esac
3975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3976 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3977 ac_status=$?
3978 grep -v '^ *+' conftest.er1 >conftest.err
3979 rm -f conftest.er1
3980 cat conftest.err >&5
3981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3982 (exit $ac_status); } >/dev/null && {
3983 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3984 test ! -s conftest.err
3985 }; then
e143ad11
AS
3986 :
3987else
3988 echo "$as_me: failed program was:" >&5
3989sed 's/^/| /' conftest.$ac_ext >&5
3990
3991 # Broken: fails on valid input.
3992continue
3993fi
ca81d7a0 3994
e143ad11
AS
3995rm -f conftest.err conftest.$ac_ext
3996
ca81d7a0 3997 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3998 # can be detected and how.
3999 cat >conftest.$ac_ext <<_ACEOF
4000/* confdefs.h. */
4001_ACEOF
4002cat confdefs.h >>conftest.$ac_ext
4003cat >>conftest.$ac_ext <<_ACEOF
4004/* end confdefs.h. */
4005#include <ac_nonexistent.h>
4006_ACEOF
ca81d7a0
JD
4007if { (ac_try="$ac_cpp conftest.$ac_ext"
4008case "(($ac_try" in
4009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010 *) ac_try_echo=$ac_try;;
4011esac
4012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4013 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4014 ac_status=$?
4015 grep -v '^ *+' conftest.er1 >conftest.err
4016 rm -f conftest.er1
4017 cat conftest.err >&5
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4019 (exit $ac_status); } >/dev/null && {
4020 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4021 test ! -s conftest.err
4022 }; then
e143ad11
AS
4023 # Broken: success on invalid input.
4024continue
4025else
4026 echo "$as_me: failed program was:" >&5
4027sed 's/^/| /' conftest.$ac_ext >&5
4028
4029 # Passes both tests.
4030ac_preproc_ok=:
4031break
4032fi
ca81d7a0 4033
e143ad11
AS
4034rm -f conftest.err conftest.$ac_ext
4035
4036done
4037# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4038rm -f conftest.err conftest.$ac_ext
4039if $ac_preproc_ok; then
4040 break
4041fi
4042
4043 done
4044 ac_cv_prog_CPP=$CPP
4045
4046fi
4047 CPP=$ac_cv_prog_CPP
4048else
4049 ac_cv_prog_CPP=$CPP
4050fi
ca81d7a0
JD
4051{ echo "$as_me:$LINENO: result: $CPP" >&5
4052echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4053ac_preproc_ok=false
4054for ac_c_preproc_warn_flag in '' yes
4055do
4056 # Use a header file that comes with gcc, so configuring glibc
4057 # with a fresh cross-compiler works.
4058 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4059 # <limits.h> exists even on freestanding compilers.
4060 # On the NeXT, cc -E runs the code through the compiler's parser,
4061 # not just through cpp. "Syntax error" is here to catch this case.
4062 cat >conftest.$ac_ext <<_ACEOF
4063/* confdefs.h. */
4064_ACEOF
4065cat confdefs.h >>conftest.$ac_ext
4066cat >>conftest.$ac_ext <<_ACEOF
4067/* end confdefs.h. */
4068#ifdef __STDC__
4069# include <limits.h>
4070#else
4071# include <assert.h>
4072#endif
4073 Syntax error
4074_ACEOF
ca81d7a0
JD
4075if { (ac_try="$ac_cpp conftest.$ac_ext"
4076case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
4080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4081 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4082 ac_status=$?
4083 grep -v '^ *+' conftest.er1 >conftest.err
4084 rm -f conftest.er1
4085 cat conftest.err >&5
4086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4087 (exit $ac_status); } >/dev/null && {
4088 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4089 test ! -s conftest.err
4090 }; then
e143ad11
AS
4091 :
4092else
4093 echo "$as_me: failed program was:" >&5
4094sed 's/^/| /' conftest.$ac_ext >&5
4095
4096 # Broken: fails on valid input.
4097continue
4098fi
ca81d7a0 4099
e143ad11
AS
4100rm -f conftest.err conftest.$ac_ext
4101
ca81d7a0 4102 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4103 # can be detected and how.
4104 cat >conftest.$ac_ext <<_ACEOF
4105/* confdefs.h. */
4106_ACEOF
4107cat confdefs.h >>conftest.$ac_ext
4108cat >>conftest.$ac_ext <<_ACEOF
4109/* end confdefs.h. */
4110#include <ac_nonexistent.h>
4111_ACEOF
ca81d7a0
JD
4112if { (ac_try="$ac_cpp conftest.$ac_ext"
4113case "(($ac_try" in
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4116esac
4117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4118 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4119 ac_status=$?
4120 grep -v '^ *+' conftest.er1 >conftest.err
4121 rm -f conftest.er1
4122 cat conftest.err >&5
4123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4124 (exit $ac_status); } >/dev/null && {
4125 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4126 test ! -s conftest.err
4127 }; then
e143ad11
AS
4128 # Broken: success on invalid input.
4129continue
4130else
4131 echo "$as_me: failed program was:" >&5
4132sed 's/^/| /' conftest.$ac_ext >&5
4133
4134 # Passes both tests.
4135ac_preproc_ok=:
4136break
4137fi
ca81d7a0 4138
e143ad11
AS
4139rm -f conftest.err conftest.$ac_ext
4140
4141done
4142# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4143rm -f conftest.err conftest.$ac_ext
4144if $ac_preproc_ok; then
4145 :
4146else
4147 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4148See \`config.log' for more details." >&5
4149echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4150See \`config.log' for more details." >&2;}
4151 { (exit 1); exit 1; }; }
4152fi
4153
4154ac_ext=c
4155ac_cpp='$CPP $CPPFLAGS'
4156ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4157ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4158ac_compiler_gnu=$ac_cv_c_compiler_gnu
4159
4160
ca81d7a0
JD
4161{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4162echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4163if test "${ac_cv_path_GREP+set}" = set; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
4165else
4166 # Extract the first word of "grep ggrep" to use in msg output
4167if test -z "$GREP"; then
4168set dummy grep ggrep; ac_prog_name=$2
4169if test "${ac_cv_path_GREP+set}" = set; then
4170 echo $ECHO_N "(cached) $ECHO_C" >&6
4171else
4172 ac_path_GREP_found=false
4173# Loop through the user's path and test for each of PROGNAME-LIST
4174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4176do
4177 IFS=$as_save_IFS
4178 test -z "$as_dir" && as_dir=.
4179 for ac_prog in grep ggrep; do
4180 for ac_exec_ext in '' $ac_executable_extensions; do
4181 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4182 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4183 # Check for GNU ac_path_GREP and select it if it is found.
4184 # Check for GNU $ac_path_GREP
4185case `"$ac_path_GREP" --version 2>&1` in
4186*GNU*)
4187 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4188*)
4189 ac_count=0
4190 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4191 while :
4192 do
4193 cat "conftest.in" "conftest.in" >"conftest.tmp"
4194 mv "conftest.tmp" "conftest.in"
4195 cp "conftest.in" "conftest.nl"
4196 echo 'GREP' >> "conftest.nl"
4197 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4198 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4199 ac_count=`expr $ac_count + 1`
4200 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4201 # Best one so far, save it but keep looking for a better one
4202 ac_cv_path_GREP="$ac_path_GREP"
4203 ac_path_GREP_max=$ac_count
4204 fi
4205 # 10*(2^10) chars as input seems more than enough
4206 test $ac_count -gt 10 && break
4207 done
4208 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4209esac
4210
4211
4212 $ac_path_GREP_found && break 3
4213 done
4214done
4215
4216done
4217IFS=$as_save_IFS
4218
4219
4220fi
4221
4222GREP="$ac_cv_path_GREP"
4223if test -z "$GREP"; then
4224 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4225echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4226 { (exit 1); exit 1; }; }
4227fi
4228
4229else
4230 ac_cv_path_GREP=$GREP
4231fi
4232
4233
4234fi
4235{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4236echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4237 GREP="$ac_cv_path_GREP"
4238
4239
4240{ echo "$as_me:$LINENO: checking for egrep" >&5
4241echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4242if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4243 echo $ECHO_N "(cached) $ECHO_C" >&6
4244else
ca81d7a0
JD
4245 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4246 then ac_cv_path_EGREP="$GREP -E"
4247 else
4248 # Extract the first word of "egrep" to use in msg output
4249if test -z "$EGREP"; then
4250set dummy egrep; ac_prog_name=$2
4251if test "${ac_cv_path_EGREP+set}" = set; then
4252 echo $ECHO_N "(cached) $ECHO_C" >&6
4253else
4254 ac_path_EGREP_found=false
4255# Loop through the user's path and test for each of PROGNAME-LIST
4256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4258do
4259 IFS=$as_save_IFS
4260 test -z "$as_dir" && as_dir=.
4261 for ac_prog in egrep; do
4262 for ac_exec_ext in '' $ac_executable_extensions; do
4263 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4264 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4265 # Check for GNU ac_path_EGREP and select it if it is found.
4266 # Check for GNU $ac_path_EGREP
4267case `"$ac_path_EGREP" --version 2>&1` in
4268*GNU*)
4269 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4270*)
4271 ac_count=0
4272 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4273 while :
4274 do
4275 cat "conftest.in" "conftest.in" >"conftest.tmp"
4276 mv "conftest.tmp" "conftest.in"
4277 cp "conftest.in" "conftest.nl"
4278 echo 'EGREP' >> "conftest.nl"
4279 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4280 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4281 ac_count=`expr $ac_count + 1`
4282 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4283 # Best one so far, save it but keep looking for a better one
4284 ac_cv_path_EGREP="$ac_path_EGREP"
4285 ac_path_EGREP_max=$ac_count
e143ad11 4286 fi
ca81d7a0
JD
4287 # 10*(2^10) chars as input seems more than enough
4288 test $ac_count -gt 10 && break
4289 done
4290 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4291esac
4292
4293
4294 $ac_path_EGREP_found && break 3
4295 done
4296done
4297
4298done
4299IFS=$as_save_IFS
4300
4301
e143ad11 4302fi
e143ad11 4303
ca81d7a0
JD
4304EGREP="$ac_cv_path_EGREP"
4305if test -z "$EGREP"; then
4306 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4307echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4308 { (exit 1); exit 1; }; }
4309fi
e143ad11 4310
ca81d7a0
JD
4311else
4312 ac_cv_path_EGREP=$EGREP
4313fi
e143ad11 4314
ca81d7a0
JD
4315
4316 fi
8eeae1c9 4317fi
ca81d7a0
JD
4318{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4319echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4320 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4321
4322
4323
ca81d7a0
JD
4324{ echo "$as_me:$LINENO: checking for AIX" >&5
4325echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4326cat >conftest.$ac_ext <<_ACEOF
4327/* confdefs.h. */
4328_ACEOF
4329cat confdefs.h >>conftest.$ac_ext
4330cat >>conftest.$ac_ext <<_ACEOF
4331/* end confdefs.h. */
4332#ifdef _AIX
4333 yes
4334#endif
4335
4336_ACEOF
4337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4338 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4339 { echo "$as_me:$LINENO: result: yes" >&5
4340echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4341cat >>confdefs.h <<\_ACEOF
4342#define _ALL_SOURCE 1
4343_ACEOF
4344
4345else
ca81d7a0
JD
4346 { echo "$as_me:$LINENO: result: no" >&5
4347echo "${ECHO_T}no" >&6; }
e143ad11 4348fi
a51f4969
SM
4349rm -f conftest*
4350
4351
4352{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4353echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4354if test "${ac_cv_header_stdc+set}" = set; then
4355 echo $ECHO_N "(cached) $ECHO_C" >&6
4356else
4357 cat >conftest.$ac_ext <<_ACEOF
4358/* confdefs.h. */
4359_ACEOF
4360cat confdefs.h >>conftest.$ac_ext
4361cat >>conftest.$ac_ext <<_ACEOF
4362/* end confdefs.h. */
4363#include <stdlib.h>
4364#include <stdarg.h>
4365#include <string.h>
4366#include <float.h>
4367
4368int
4369main ()
4370{
4371
4372 ;
4373 return 0;
4374}
4375_ACEOF
4376rm -f conftest.$ac_objext
4377if { (ac_try="$ac_compile"
4378case "(($ac_try" in
4379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4380 *) ac_try_echo=$ac_try;;
4381esac
4382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4383 (eval "$ac_compile") 2>conftest.er1
4384 ac_status=$?
4385 grep -v '^ *+' conftest.er1 >conftest.err
4386 rm -f conftest.er1
4387 cat conftest.err >&5
4388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389 (exit $ac_status); } && {
4390 test -z "$ac_c_werror_flag" ||
4391 test ! -s conftest.err
4392 } && test -s conftest.$ac_objext; then
4393 ac_cv_header_stdc=yes
4394else
4395 echo "$as_me: failed program was:" >&5
4396sed 's/^/| /' conftest.$ac_ext >&5
4397
4398 ac_cv_header_stdc=no
4399fi
4400
4401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4402
4403if test $ac_cv_header_stdc = yes; then
4404 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4405 cat >conftest.$ac_ext <<_ACEOF
4406/* confdefs.h. */
4407_ACEOF
4408cat confdefs.h >>conftest.$ac_ext
4409cat >>conftest.$ac_ext <<_ACEOF
4410/* end confdefs.h. */
4411#include <string.h>
4412
4413_ACEOF
4414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4415 $EGREP "memchr" >/dev/null 2>&1; then
4416 :
4417else
4418 ac_cv_header_stdc=no
4419fi
4420rm -f conftest*
4421
4422fi
4423
4424if test $ac_cv_header_stdc = yes; then
4425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4426 cat >conftest.$ac_ext <<_ACEOF
4427/* confdefs.h. */
4428_ACEOF
4429cat confdefs.h >>conftest.$ac_ext
4430cat >>conftest.$ac_ext <<_ACEOF
4431/* end confdefs.h. */
4432#include <stdlib.h>
4433
4434_ACEOF
4435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4436 $EGREP "free" >/dev/null 2>&1; then
4437 :
4438else
4439 ac_cv_header_stdc=no
4440fi
4441rm -f conftest*
4442
4443fi
4444
4445if test $ac_cv_header_stdc = yes; then
4446 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4447 if test "$cross_compiling" = yes; then
4448 :
4449else
4450 cat >conftest.$ac_ext <<_ACEOF
4451/* confdefs.h. */
4452_ACEOF
4453cat confdefs.h >>conftest.$ac_ext
4454cat >>conftest.$ac_ext <<_ACEOF
4455/* end confdefs.h. */
4456#include <ctype.h>
4457#include <stdlib.h>
4458#if ((' ' & 0x0FF) == 0x020)
4459# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4460# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4461#else
4462# define ISLOWER(c) \
4463 (('a' <= (c) && (c) <= 'i') \
4464 || ('j' <= (c) && (c) <= 'r') \
4465 || ('s' <= (c) && (c) <= 'z'))
4466# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4467#endif
4468
4469#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4470int
4471main ()
4472{
4473 int i;
4474 for (i = 0; i < 256; i++)
4475 if (XOR (islower (i), ISLOWER (i))
4476 || toupper (i) != TOUPPER (i))
4477 return 2;
4478 return 0;
4479}
4480_ACEOF
4481rm -f conftest$ac_exeext
4482if { (ac_try="$ac_link"
4483case "(($ac_try" in
4484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4485 *) ac_try_echo=$ac_try;;
4486esac
4487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4488 (eval "$ac_link") 2>&5
4489 ac_status=$?
4490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4492 { (case "(($ac_try" in
4493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494 *) ac_try_echo=$ac_try;;
4495esac
4496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4497 (eval "$ac_try") 2>&5
4498 ac_status=$?
4499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4500 (exit $ac_status); }; }; then
4501 :
4502else
4503 echo "$as_me: program exited with status $ac_status" >&5
4504echo "$as_me: failed program was:" >&5
4505sed 's/^/| /' conftest.$ac_ext >&5
4506
4507( exit $ac_status )
4508ac_cv_header_stdc=no
4509fi
4510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4511fi
4512
4513
4514fi
4515fi
4516{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4517echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4518if test $ac_cv_header_stdc = yes; then
4519
4520cat >>confdefs.h <<\_ACEOF
4521#define STDC_HEADERS 1
4522_ACEOF
4523
4524fi
4525
4526# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4537 inttypes.h stdint.h unistd.h
4538do
4539as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4540{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4541echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4542if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4543 echo $ECHO_N "(cached) $ECHO_C" >&6
4544else
4545 cat >conftest.$ac_ext <<_ACEOF
4546/* confdefs.h. */
4547_ACEOF
4548cat confdefs.h >>conftest.$ac_ext
4549cat >>conftest.$ac_ext <<_ACEOF
4550/* end confdefs.h. */
4551$ac_includes_default
4552
4553#include <$ac_header>
4554_ACEOF
4555rm -f conftest.$ac_objext
4556if { (ac_try="$ac_compile"
4557case "(($ac_try" in
4558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4559 *) ac_try_echo=$ac_try;;
4560esac
4561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4562 (eval "$ac_compile") 2>conftest.er1
4563 ac_status=$?
4564 grep -v '^ *+' conftest.er1 >conftest.err
4565 rm -f conftest.er1
4566 cat conftest.err >&5
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568 (exit $ac_status); } && {
4569 test -z "$ac_c_werror_flag" ||
4570 test ! -s conftest.err
4571 } && test -s conftest.$ac_objext; then
4572 eval "$as_ac_Header=yes"
4573else
4574 echo "$as_me: failed program was:" >&5
4575sed 's/^/| /' conftest.$ac_ext >&5
4576
4577 eval "$as_ac_Header=no"
4578fi
4579
4580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4581fi
4582ac_res=`eval echo '${'$as_ac_Header'}'`
4583 { echo "$as_me:$LINENO: result: $ac_res" >&5
4584echo "${ECHO_T}$ac_res" >&6; }
4585if test `eval echo '${'$as_ac_Header'}'` = yes; then
4586 cat >>confdefs.h <<_ACEOF
4587#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4588_ACEOF
4589
4590fi
4591
4592done
4593
4594
4595if test "${ac_cv_header_minix_config_h+set}" = set; then
4596 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4597echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4598if test "${ac_cv_header_minix_config_h+set}" = set; then
4599 echo $ECHO_N "(cached) $ECHO_C" >&6
4600fi
4601{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4602echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4603else
4604 # Is the header compilable?
4605{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4606echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4607cat >conftest.$ac_ext <<_ACEOF
4608/* confdefs.h. */
4609_ACEOF
4610cat confdefs.h >>conftest.$ac_ext
4611cat >>conftest.$ac_ext <<_ACEOF
4612/* end confdefs.h. */
4613$ac_includes_default
4614#include <minix/config.h>
4615_ACEOF
4616rm -f conftest.$ac_objext
4617if { (ac_try="$ac_compile"
4618case "(($ac_try" in
4619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4620 *) ac_try_echo=$ac_try;;
4621esac
4622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4623 (eval "$ac_compile") 2>conftest.er1
4624 ac_status=$?
4625 grep -v '^ *+' conftest.er1 >conftest.err
4626 rm -f conftest.er1
4627 cat conftest.err >&5
4628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4629 (exit $ac_status); } && {
4630 test -z "$ac_c_werror_flag" ||
4631 test ! -s conftest.err
4632 } && test -s conftest.$ac_objext; then
4633 ac_header_compiler=yes
4634else
4635 echo "$as_me: failed program was:" >&5
4636sed 's/^/| /' conftest.$ac_ext >&5
4637
4638 ac_header_compiler=no
4639fi
4640
4641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4642{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4643echo "${ECHO_T}$ac_header_compiler" >&6; }
4644
4645# Is the header present?
4646{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4647echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4648cat >conftest.$ac_ext <<_ACEOF
4649/* confdefs.h. */
4650_ACEOF
4651cat confdefs.h >>conftest.$ac_ext
4652cat >>conftest.$ac_ext <<_ACEOF
4653/* end confdefs.h. */
4654#include <minix/config.h>
4655_ACEOF
4656if { (ac_try="$ac_cpp conftest.$ac_ext"
4657case "(($ac_try" in
4658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4659 *) ac_try_echo=$ac_try;;
4660esac
4661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4663 ac_status=$?
4664 grep -v '^ *+' conftest.er1 >conftest.err
4665 rm -f conftest.er1
4666 cat conftest.err >&5
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); } >/dev/null && {
4669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4670 test ! -s conftest.err
4671 }; then
4672 ac_header_preproc=yes
4673else
4674 echo "$as_me: failed program was:" >&5
4675sed 's/^/| /' conftest.$ac_ext >&5
4676
4677 ac_header_preproc=no
4678fi
4679
4680rm -f conftest.err conftest.$ac_ext
4681{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4682echo "${ECHO_T}$ac_header_preproc" >&6; }
4683
4684# So? What about this header?
4685case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4686 yes:no: )
4687 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4688echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4689 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4690echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4691 ac_header_preproc=yes
4692 ;;
4693 no:yes:* )
4694 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4695echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4696 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4697echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4698 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4699echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4700 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4701echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4702 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4703echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4704 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4705echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4706
4707 ;;
4708esac
4709{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4710echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4711if test "${ac_cv_header_minix_config_h+set}" = set; then
4712 echo $ECHO_N "(cached) $ECHO_C" >&6
4713else
4714 ac_cv_header_minix_config_h=$ac_header_preproc
4715fi
4716{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4717echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4718
4719fi
4720if test $ac_cv_header_minix_config_h = yes; then
4721 MINIX=yes
4722else
4723 MINIX=
4724fi
4725
4726
4727if test "$MINIX" = yes; then
4728
4729cat >>confdefs.h <<\_ACEOF
4730#define _POSIX_SOURCE 1
4731_ACEOF
4732
4733
4734cat >>confdefs.h <<\_ACEOF
4735#define _POSIX_1_SOURCE 2
4736_ACEOF
4737
4738
4739cat >>confdefs.h <<\_ACEOF
4740#define _MINIX 1
4741_ACEOF
4742
4743fi
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4756echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4757if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4758 echo $ECHO_N "(cached) $ECHO_C" >&6
4759else
4760 cat >conftest.$ac_ext <<_ACEOF
4761/* confdefs.h. */
4762_ACEOF
4763cat confdefs.h >>conftest.$ac_ext
4764cat >>conftest.$ac_ext <<_ACEOF
4765/* end confdefs.h. */
4766
4767# define __EXTENSIONS__ 1
4768 $ac_includes_default
4769int
4770main ()
4771{
4772
4773 ;
4774 return 0;
4775}
4776_ACEOF
4777rm -f conftest.$ac_objext
4778if { (ac_try="$ac_compile"
4779case "(($ac_try" in
4780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4781 *) ac_try_echo=$ac_try;;
4782esac
4783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4784 (eval "$ac_compile") 2>conftest.er1
4785 ac_status=$?
4786 grep -v '^ *+' conftest.er1 >conftest.err
4787 rm -f conftest.er1
4788 cat conftest.err >&5
4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4790 (exit $ac_status); } && {
4791 test -z "$ac_c_werror_flag" ||
4792 test ! -s conftest.err
4793 } && test -s conftest.$ac_objext; then
4794 ac_cv_safe_to_define___extensions__=yes
4795else
4796 echo "$as_me: failed program was:" >&5
4797sed 's/^/| /' conftest.$ac_ext >&5
4798
4799 ac_cv_safe_to_define___extensions__=no
4800fi
e143ad11 4801
a51f4969
SM
4802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803fi
4804{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4805echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4806 test $ac_cv_safe_to_define___extensions__ = yes &&
4807 cat >>confdefs.h <<\_ACEOF
4808#define __EXTENSIONS__ 1
4809_ACEOF
e143ad11 4810
a51f4969
SM
4811 cat >>confdefs.h <<\_ACEOF
4812#define _POSIX_PTHREAD_SEMANTICS 1
4813_ACEOF
e143ad11 4814
a51f4969
SM
4815 cat >>confdefs.h <<\_ACEOF
4816#define _TANDEM_SOURCE 1
e143ad11
AS
4817_ACEOF
4818
4819
4820
01abe918 4821### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4822{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4823echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4824SAVE_CFLAGS="$CFLAGS"
4825CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4826cat >conftest.$ac_ext <<_ACEOF
4827/* confdefs.h. */
4828_ACEOF
4829cat confdefs.h >>conftest.$ac_ext
4830cat >>conftest.$ac_ext <<_ACEOF
4831/* end confdefs.h. */
4832
4833int
4834main ()
4835{
4836
4837 ;
4838 return 0;
4839}
4840_ACEOF
4841rm -f conftest.$ac_objext
ca81d7a0
JD
4842if { (ac_try="$ac_compile"
4843case "(($ac_try" in
4844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845 *) ac_try_echo=$ac_try;;
4846esac
4847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4848 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4849 ac_status=$?
4850 grep -v '^ *+' conftest.er1 >conftest.err
4851 rm -f conftest.er1
4852 cat conftest.err >&5
4853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4854 (exit $ac_status); } && {
4855 test -z "$ac_c_werror_flag" ||
4856 test ! -s conftest.err
4857 } && test -s conftest.$ac_objext; then
01abe918
CY
4858 has_option=yes
4859else
4860 echo "$as_me: failed program was:" >&5
4861sed 's/^/| /' conftest.$ac_ext >&5
4862
ca81d7a0 4863 has_option=no
01abe918 4864fi
ca81d7a0
JD
4865
4866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4867if test $has_option = yes; then
4868 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4869fi
ca81d7a0
JD
4870{ echo "$as_me:$LINENO: result: $has_option" >&5
4871echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4872CFLAGS="$SAVE_CFLAGS"
4873unset has_option
4874unset SAVE_CFLAGS
4875
6a3a24fa 4876#### Some other nice autoconf tests.
ba4481b5 4877
ca81d7a0
JD
4878{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4879echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4880LN_S=$as_ln_s
4881if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4882 { echo "$as_me:$LINENO: result: yes" >&5
4883echo "${ECHO_T}yes" >&6; }
ba4481b5 4884else
ca81d7a0
JD
4885 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4886echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4887fi
4888
503d2be0
AS
4889ac_ext=c
4890ac_cpp='$CPP $CPPFLAGS'
4891ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4892ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4893ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4894{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4895echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4896# On Suns, sometimes $CPP names a directory.
4897if test -n "$CPP" && test -d "$CPP"; then
4898 CPP=
4899fi
4900if test -z "$CPP"; then
503d2be0
AS
4901 if test "${ac_cv_prog_CPP+set}" = set; then
4902 echo $ECHO_N "(cached) $ECHO_C" >&6
4903else
4904 # Double quotes because CPP needs to be expanded
4905 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4906 do
4907 ac_preproc_ok=false
4908for ac_c_preproc_warn_flag in '' yes
4909do
4910 # Use a header file that comes with gcc, so configuring glibc
4911 # with a fresh cross-compiler works.
19650fd6
AS
4912 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4913 # <limits.h> exists even on freestanding compilers.
ba4481b5 4914 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4915 # not just through cpp. "Syntax error" is here to catch this case.
4916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4917/* confdefs.h. */
4918_ACEOF
4919cat confdefs.h >>conftest.$ac_ext
4920cat >>conftest.$ac_ext <<_ACEOF
4921/* end confdefs.h. */
4922#ifdef __STDC__
4923# include <limits.h>
4924#else
4925# include <assert.h>
4926#endif
edfaf76d 4927 Syntax error
503d2be0 4928_ACEOF
ca81d7a0
JD
4929if { (ac_try="$ac_cpp conftest.$ac_ext"
4930case "(($ac_try" in
4931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4932 *) ac_try_echo=$ac_try;;
4933esac
4934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4935 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4936 ac_status=$?
6bae0ccf 4937 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4938 rm -f conftest.er1
4939 cat conftest.err >&5
c0d27fcc 4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4941 (exit $ac_status); } >/dev/null && {
4942 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4943 test ! -s conftest.err
4944 }; then
ba4481b5
DL
4945 :
4946else
503d2be0 4947 echo "$as_me: failed program was:" >&5
19650fd6
AS
4948sed 's/^/| /' conftest.$ac_ext >&5
4949
503d2be0
AS
4950 # Broken: fails on valid input.
4951continue
4952fi
ca81d7a0 4953
503d2be0
AS
4954rm -f conftest.err conftest.$ac_ext
4955
ca81d7a0 4956 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4957 # can be detected and how.
4958 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4959/* confdefs.h. */
4960_ACEOF
4961cat confdefs.h >>conftest.$ac_ext
4962cat >>conftest.$ac_ext <<_ACEOF
4963/* end confdefs.h. */
503d2be0
AS
4964#include <ac_nonexistent.h>
4965_ACEOF
ca81d7a0
JD
4966if { (ac_try="$ac_cpp conftest.$ac_ext"
4967case "(($ac_try" in
4968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4969 *) ac_try_echo=$ac_try;;
4970esac
4971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4972 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4973 ac_status=$?
6bae0ccf 4974 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4975 rm -f conftest.er1
4976 cat conftest.err >&5
c0d27fcc 4977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4978 (exit $ac_status); } >/dev/null && {
4979 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4980 test ! -s conftest.err
4981 }; then
503d2be0
AS
4982 # Broken: success on invalid input.
4983continue
c4bb2108 4984else
503d2be0 4985 echo "$as_me: failed program was:" >&5
19650fd6
AS
4986sed 's/^/| /' conftest.$ac_ext >&5
4987
503d2be0
AS
4988 # Passes both tests.
4989ac_preproc_ok=:
4990break
4991fi
ca81d7a0 4992
503d2be0
AS
4993rm -f conftest.err conftest.$ac_ext
4994
4995done
4996# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4997rm -f conftest.err conftest.$ac_ext
4998if $ac_preproc_ok; then
4999 break
5000fi
5001
5002 done
5003 ac_cv_prog_CPP=$CPP
5004
5005fi
5006 CPP=$ac_cv_prog_CPP
5007else
5008 ac_cv_prog_CPP=$CPP
5009fi
ca81d7a0
JD
5010{ echo "$as_me:$LINENO: result: $CPP" >&5
5011echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
5012ac_preproc_ok=false
5013for ac_c_preproc_warn_flag in '' yes
5014do
5015 # Use a header file that comes with gcc, so configuring glibc
5016 # with a fresh cross-compiler works.
19650fd6
AS
5017 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5018 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
5019 # On the NeXT, cc -E runs the code through the compiler's parser,
5020 # not just through cpp. "Syntax error" is here to catch this case.
5021 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5022/* confdefs.h. */
5023_ACEOF
5024cat confdefs.h >>conftest.$ac_ext
5025cat >>conftest.$ac_ext <<_ACEOF
5026/* end confdefs.h. */
5027#ifdef __STDC__
5028# include <limits.h>
5029#else
5030# include <assert.h>
5031#endif
edfaf76d 5032 Syntax error
503d2be0 5033_ACEOF
ca81d7a0
JD
5034if { (ac_try="$ac_cpp conftest.$ac_ext"
5035case "(($ac_try" in
5036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5037 *) ac_try_echo=$ac_try;;
5038esac
5039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5040 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5041 ac_status=$?
6bae0ccf 5042 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
5043 rm -f conftest.er1
5044 cat conftest.err >&5
c0d27fcc 5045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5046 (exit $ac_status); } >/dev/null && {
5047 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5048 test ! -s conftest.err
5049 }; then
ba4481b5
DL
5050 :
5051else
503d2be0 5052 echo "$as_me: failed program was:" >&5
19650fd6
AS
5053sed 's/^/| /' conftest.$ac_ext >&5
5054
503d2be0
AS
5055 # Broken: fails on valid input.
5056continue
5057fi
ca81d7a0 5058
503d2be0
AS
5059rm -f conftest.err conftest.$ac_ext
5060
ca81d7a0 5061 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
5062 # can be detected and how.
5063 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5064/* confdefs.h. */
5065_ACEOF
5066cat confdefs.h >>conftest.$ac_ext
5067cat >>conftest.$ac_ext <<_ACEOF
5068/* end confdefs.h. */
503d2be0
AS
5069#include <ac_nonexistent.h>
5070_ACEOF
ca81d7a0
JD
5071if { (ac_try="$ac_cpp conftest.$ac_ext"
5072case "(($ac_try" in
5073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5074 *) ac_try_echo=$ac_try;;
5075esac
5076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5077 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5078 ac_status=$?
6bae0ccf 5079 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
5080 rm -f conftest.er1
5081 cat conftest.err >&5
c0d27fcc 5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5083 (exit $ac_status); } >/dev/null && {
5084 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5085 test ! -s conftest.err
5086 }; then
503d2be0
AS
5087 # Broken: success on invalid input.
5088continue
5089else
5090 echo "$as_me: failed program was:" >&5
19650fd6
AS
5091sed 's/^/| /' conftest.$ac_ext >&5
5092
503d2be0
AS
5093 # Passes both tests.
5094ac_preproc_ok=:
5095break
ba4481b5 5096fi
ca81d7a0 5097
503d2be0
AS
5098rm -f conftest.err conftest.$ac_ext
5099
5100done
5101# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5102rm -f conftest.err conftest.$ac_ext
5103if $ac_preproc_ok; then
5104 :
ba4481b5 5105else
19650fd6
AS
5106 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
5107See \`config.log' for more details." >&5
5108echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
5109See \`config.log' for more details." >&2;}
503d2be0 5110 { (exit 1); exit 1; }; }
ba4481b5 5111fi
503d2be0
AS
5112
5113ac_ext=c
5114ac_cpp='$CPP $CPPFLAGS'
5115ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5116ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5117ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5118
5119# Find a good install program. We prefer a C program (faster),
5120# so one script is as good as another. But avoid the broken or
5121# incompatible versions:
5122# SysV /etc/install, /usr/sbin/install
5123# SunOS /usr/etc/install
5124# IRIX /sbin/install
5125# AIX /bin/install
503d2be0 5126# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5127# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5128# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5129# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5130# OS/2's system install, which has a completely different semantic
ba4481b5 5131# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
5132{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5133echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5134if test -z "$INSTALL"; then
503d2be0
AS
5135if test "${ac_cv_path_install+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5137else
c0d27fcc
MR
5138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5139for as_dir in $PATH
5140do
5141 IFS=$as_save_IFS
5142 test -z "$as_dir" && as_dir=.
5143 # Account for people who put trailing slashes in PATH elements.
5144case $as_dir/ in
5145 ./ | .// | /cC/* | \
5146 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5147 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5148 /usr/ucb/* ) ;;
5149 *)
5150 # OSF1 and SCO ODT 3.0 have their own names for install.
5151 # Don't use installbsd from OSF since it installs stuff as root
5152 # by default.
5153 for ac_prog in ginstall scoinst install; do
5154 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5155 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5156 if test $ac_prog = install &&
5157 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5158 # AIX install. It has an incompatible calling convention.
5159 :
5160 elif test $ac_prog = install &&
5161 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5162 # program-specific install script used by HP pwplus--don't use.
5163 :
5164 else
5165 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5166 break 3
5167 fi
5168 fi
ba4481b5 5169 done
c0d27fcc
MR
5170 done
5171 ;;
5172esac
5173done
ca81d7a0 5174IFS=$as_save_IFS
c0d27fcc 5175
ba4481b5
DL
5176
5177fi
5178 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5179 INSTALL=$ac_cv_path_install
ba4481b5 5180 else
ca81d7a0
JD
5181 # As a last resort, use the slow shell script. Don't cache a
5182 # value for INSTALL within a source directory, because that will
ba4481b5 5183 # break other packages using the cache if that directory is
ca81d7a0 5184 # removed, or if the value is a relative name.
503d2be0 5185 INSTALL=$ac_install_sh
ba4481b5
DL
5186 fi
5187fi
ca81d7a0
JD
5188{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5189echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5190
5191# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5192# It thinks the first close brace ends the variable substitution.
5193test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5194
503d2be0 5195test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5196
ba4481b5
DL
5197test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5198
c0d27fcc
MR
5199if test "x$RANLIB" = x; then
5200 if test -n "$ac_tool_prefix"; then
5201 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5202set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5203{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5205if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5206 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5207else
5208 if test -n "$RANLIB"; then
5209 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5210else
c0d27fcc
MR
5211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
5216 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5218 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5219 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5220 break 2
5221 fi
5222done
503d2be0 5223done
ca81d7a0 5224IFS=$as_save_IFS
503d2be0 5225
7397acc4
DL
5226fi
5227fi
503d2be0 5228RANLIB=$ac_cv_prog_RANLIB
7397acc4 5229if test -n "$RANLIB"; then
ca81d7a0
JD
5230 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5231echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5232else
ca81d7a0
JD
5233 { echo "$as_me:$LINENO: result: no" >&5
5234echo "${ECHO_T}no" >&6; }
503d2be0
AS
5235fi
5236
ca81d7a0 5237
503d2be0
AS
5238fi
5239if test -z "$ac_cv_prog_RANLIB"; then
5240 ac_ct_RANLIB=$RANLIB
5241 # Extract the first word of "ranlib", so it can be a program name with args.
5242set dummy ranlib; ac_word=$2
ca81d7a0
JD
5243{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5244echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5245if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5246 echo $ECHO_N "(cached) $ECHO_C" >&6
5247else
5248 if test -n "$ac_ct_RANLIB"; then
5249 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5250else
c0d27fcc
MR
5251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254 IFS=$as_save_IFS
5255 test -z "$as_dir" && as_dir=.
5256 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5257 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5258 ac_cv_prog_ac_ct_RANLIB="ranlib"
5259 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5260 break 2
5261 fi
5262done
503d2be0 5263done
ca81d7a0 5264IFS=$as_save_IFS
503d2be0 5265
503d2be0
AS
5266fi
5267fi
5268ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5269if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5270 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5271echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5272else
ca81d7a0
JD
5273 { echo "$as_me:$LINENO: result: no" >&5
5274echo "${ECHO_T}no" >&6; }
503d2be0
AS
5275fi
5276
ca81d7a0
JD
5277 if test "x$ac_ct_RANLIB" = x; then
5278 RANLIB=":"
5279 else
5280 case $cross_compiling:$ac_tool_warned in
5281yes:)
5282{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5283whose name does not start with the host triplet. If you think this
5284configuration is useful to you, please write to autoconf@gnu.org." >&5
5285echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5286whose name does not start with the host triplet. If you think this
5287configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5288ac_tool_warned=yes ;;
5289esac
5290 RANLIB=$ac_ct_RANLIB
5291 fi
7397acc4 5292else
503d2be0 5293 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5294fi
5295
5296fi
9e71690e
DK
5297# Extract the first word of "install-info", so it can be a program name with args.
5298set dummy install-info; ac_word=$2
ca81d7a0
JD
5299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5301if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5302 echo $ECHO_N "(cached) $ECHO_C" >&6
5303else
5304 case $INSTALL_INFO in
5305 [\\/]* | ?:[\\/]*)
5306 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5307 ;;
5308 *)
5309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5310for as_dir in $PATH
5311do
5312 IFS=$as_save_IFS
5313 test -z "$as_dir" && as_dir=.
5314 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5315 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5316 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5318 break 2
5319 fi
5320done
5321done
ca81d7a0 5322IFS=$as_save_IFS
9e71690e
DK
5323
5324 ;;
5325esac
5326fi
5327INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5328if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5329 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5330echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5331else
ca81d7a0
JD
5332 { echo "$as_me:$LINENO: result: no" >&5
5333echo "${ECHO_T}no" >&6; }
9e71690e
DK
5334fi
5335
ca81d7a0 5336
9e71690e
DK
5337# Extract the first word of "install-info", so it can be a program name with args.
5338set dummy install-info; ac_word=$2
ca81d7a0
JD
5339{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5340echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5341if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5342 echo $ECHO_N "(cached) $ECHO_C" >&6
5343else
5344 case $INSTALL_INFO in
5345 [\\/]* | ?:[\\/]*)
5346 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5347 ;;
5348 *)
5349 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in /usr/sbin
5351do
5352 IFS=$as_save_IFS
5353 test -z "$as_dir" && as_dir=.
5354 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5355 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5356 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5358 break 2
5359 fi
5360done
5361done
ca81d7a0 5362IFS=$as_save_IFS
9e71690e
DK
5363
5364 ;;
5365esac
5366fi
5367INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5368if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5369 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5370echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5371else
ca81d7a0
JD
5372 { echo "$as_me:$LINENO: result: no" >&5
5373echo "${ECHO_T}no" >&6; }
9e71690e
DK
5374fi
5375
ca81d7a0 5376
9e71690e
DK
5377# Extract the first word of "install-info", so it can be a program name with args.
5378set dummy install-info; ac_word=$2
ca81d7a0
JD
5379{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5380echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5381if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5382 echo $ECHO_N "(cached) $ECHO_C" >&6
5383else
5384 case $INSTALL_INFO in
5385 [\\/]* | ?:[\\/]*)
5386 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5387 ;;
5388 *)
5389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in /sbin
5391do
5392 IFS=$as_save_IFS
5393 test -z "$as_dir" && as_dir=.
5394 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5395 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5396 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5397 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5398 break 2
5399 fi
5400done
5401done
ca81d7a0 5402IFS=$as_save_IFS
9e71690e
DK
5403
5404 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5405 ;;
5406esac
5407fi
5408INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5409if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5410 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5411echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5412else
ca81d7a0
JD
5413 { echo "$as_me:$LINENO: result: no" >&5
5414echo "${ECHO_T}no" >&6; }
9e71690e
DK
5415fi
5416
ca81d7a0 5417
8ae52ca6
RF
5418# Extract the first word of "gzip", so it can be a program name with args.
5419set dummy gzip; ac_word=$2
ca81d7a0
JD
5420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5422if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5423 echo $ECHO_N "(cached) $ECHO_C" >&6
5424else
46e35e9f 5425 case $GZIP_PROG in
8ae52ca6 5426 [\\/]* | ?:[\\/]*)
46e35e9f 5427 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5428 ;;
5429 *)
5430 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5431for as_dir in $PATH
5432do
5433 IFS=$as_save_IFS
5434 test -z "$as_dir" && as_dir=.
5435 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5437 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5439 break 2
5440 fi
5441done
5442done
ca81d7a0 5443IFS=$as_save_IFS
8ae52ca6
RF
5444
5445 ;;
5446esac
5447fi
46e35e9f 5448GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5449if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5450 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5451echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5452else
ca81d7a0
JD
5453 { echo "$as_me:$LINENO: result: no" >&5
5454echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5455fi
5456
ba4481b5 5457
c0d27fcc 5458
ca81d7a0 5459
1bb9a689
MB
5460## Need makeinfo >= 4.6 (?) to build the manuals.
5461# Extract the first word of "makeinfo", so it can be a program name with args.
5462set dummy makeinfo; ac_word=$2
5463{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5465if test "${ac_cv_path_MAKEINFO+set}" = set; then
5466 echo $ECHO_N "(cached) $ECHO_C" >&6
5467else
5468 case $MAKEINFO in
5469 [\\/]* | ?:[\\/]*)
5470 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5471 ;;
5472 *)
5473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476 IFS=$as_save_IFS
5477 test -z "$as_dir" && as_dir=.
5478 for ac_exec_ext in '' $ac_executable_extensions; do
5479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5480 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5481 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5482 break 2
5483 fi
5484done
5485done
5486IFS=$as_save_IFS
5487
5488 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5489 ;;
5490esac
5491fi
5492MAKEINFO=$ac_cv_path_MAKEINFO
5493if test -n "$MAKEINFO"; then
5494 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5495echo "${ECHO_T}$MAKEINFO" >&6; }
5496else
5497 { echo "$as_me:$LINENO: result: no" >&5
5498echo "${ECHO_T}no" >&6; }
5499fi
5500
5501
5502if test "$MAKEINFO" != "no" && \
d4840f44 5503 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
5504 MAKEINFO=no
5505fi
5506
e1b89931
GM
5507## Makeinfo is unusual. For a released Emacs, the manuals are
5508## pre-built, and not deleted by the normal clean rules. makeinfo is
5509## therefore in the category of "special tools" not normally required, which
5510## configure does not have to check for (eg autoconf itself).
5511## In a CVS checkout on the other hand, the manuals are not included.
5512## So makeinfo is a requirement to build from CVS, and configure
5513## should test for it as it does for any other build requirement.
5514## We use the presence of $srcdir/info/emacs to distinguish a release,
5515## with pre-built manuals, from a CVS checkout.
5516if test "$MAKEINFO" = "no"; then
5517 if test "x${with_makeinfo}" = "xno"; then
5518 MAKEINFO=off
5519 elif ! test -e $srcdir/info/emacs; then
5520 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5521source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5522Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5523with the \`--without-makeinfo' option to build without the manuals. " >&5
5524echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5525source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5526Either install a suitable version of makeinfo, or re-run configure
e1b89931 5527with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5528 { (exit 1); exit 1; }; }
e1b89931 5529 fi
921fbdf0 5530fi
1bb9a689
MB
5531
5532
8e967cf7
MR
5533if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5534then
5535 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5536fi
5537
5538if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5539then
5540 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5541fi
5542
c0d27fcc 5543
fe239f0f 5544late_LDFLAGS=$LDFLAGS
4af002d6 5545if test "$GCC" = yes; then
fe239f0f
AS
5546 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5547else
5548 LDFLAGS="$LDFLAGS -znocombreloc"
5549fi
5550
ca81d7a0
JD
5551{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5552echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5553cat >conftest.$ac_ext <<_ACEOF
5554main(){return 0;}
5555_ACEOF
5556rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5557if { (ac_try="$ac_link"
5558case "(($ac_try" in
5559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5560 *) ac_try_echo=$ac_try;;
5561esac
5562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5563 (eval "$ac_link") 2>conftest.er1
fe239f0f 5564 ac_status=$?
edfaf76d
LK
5565 grep -v '^ *+' conftest.er1 >conftest.err
5566 rm -f conftest.er1
5567 cat conftest.err >&5
fe239f0f 5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5569 (exit $ac_status); } && {
5570 test -z "$ac_c_werror_flag" ||
5571 test ! -s conftest.err
5572 } && test -s conftest$ac_exeext &&
5573 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5574 { echo "$as_me:$LINENO: result: yes" >&5
5575echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5576else
5577 echo "$as_me: failed program was:" >&5
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
ca81d7a0
JD
5580 LDFLAGS=$late_LDFLAGS
5581 { echo "$as_me:$LINENO: result: no" >&5
5582echo "${ECHO_T}no" >&6; }
fe239f0f 5583fi
ca81d7a0 5584
f053c89f 5585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5586 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5587
3b33a005
DL
5588#### Extract some information from the operating system and machine files.
5589
c0d27fcc 5590{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5591 - which libraries the lib-src programs will want, and
503d2be0
AS
5592 - whether the GNU malloc routines are usable..." >&5
5593echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5594 - which libraries the lib-src programs will want, and
503d2be0 5595 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5596
5597### First figure out CFLAGS (which we use for running the compiler here)
5598### and REAL_CFLAGS (which we use for real compilation).
5599### The two are the same except on a few systems, where they are made
5600### different to work around various lossages. For example,
5601### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5602### as implying static linking.
5603
5604### If the CFLAGS env var is specified, we use that value
5605### instead of the default.
5606
5607### It's not important that this name contain the PID; you can't run
5608### two configures in the same directory and have anything work
5609### anyway.
5610tempcname="conftest.c"
5611
5612echo '
5613#include "'${srcdir}'/src/'${opsysfile}'"
5614#include "'${srcdir}'/src/'${machfile}'"
5615#ifndef LIBS_MACHINE
5616#define LIBS_MACHINE
5617#endif
5618#ifndef LIBS_SYSTEM
5619#define LIBS_SYSTEM
5620#endif
5621#ifndef C_SWITCH_SYSTEM
5622#define C_SWITCH_SYSTEM
5623#endif
5624#ifndef C_SWITCH_MACHINE
5625#define C_SWITCH_MACHINE
5626#endif
5627configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5628configure___ c_switch_system=C_SWITCH_SYSTEM
5629configure___ c_switch_machine=C_SWITCH_MACHINE
5630
5631#ifndef LIB_X11_LIB
5632#define LIB_X11_LIB -lX11
5633#endif
5634
3b33a005
DL
5635#ifndef LIBX11_SYSTEM
5636#define LIBX11_SYSTEM
5637#endif
9d2818d6 5638configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5639
5640#ifdef UNEXEC
5641configure___ unexec=UNEXEC
5642#else
5643configure___ unexec=unexec.o
5644#endif
5645
5646#ifdef SYSTEM_MALLOC
5647configure___ system_malloc=yes
5648#else
5649configure___ system_malloc=no
5650#endif
5651
ef9e4345
GM
5652#ifdef USE_MMAP_FOR_BUFFERS
5653configure___ use_mmap_for_buffers=yes
73b77ee5 5654#else
ef9e4345 5655configure___ use_mmap_for_buffers=no
73b77ee5
GM
5656#endif
5657
3b33a005
DL
5658#ifndef C_DEBUG_SWITCH
5659#define C_DEBUG_SWITCH -g
5660#endif
5661
5662#ifndef C_OPTIMIZE_SWITCH
5663#ifdef __GNUC__
5664#define C_OPTIMIZE_SWITCH -O2
5665#else
5666#define C_OPTIMIZE_SWITCH -O
5667#endif
5668#endif
5669
01abe918
CY
5670#ifndef C_WARNINGS_SWITCH
5671#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5672#endif
5673
3b33a005
DL
5674#ifndef LD_SWITCH_MACHINE
5675#define LD_SWITCH_MACHINE
5676#endif
5677
5678#ifndef LD_SWITCH_SYSTEM
5679#define LD_SWITCH_SYSTEM
5680#endif
5681
5682#ifndef LD_SWITCH_X_SITE_AUX
5683#define LD_SWITCH_X_SITE_AUX
503d2be0 5684#endif
3b33a005
DL
5685
5686configure___ ld_switch_system=LD_SWITCH_SYSTEM
5687configure___ ld_switch_machine=LD_SWITCH_MACHINE
5688
5689#ifdef THIS_IS_CONFIGURE
5690
5691/* Get the CFLAGS for tests in configure. */
5692#ifdef __GNUC__
5693configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5694#else
5695configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5696#endif
5697
5698#else /* not THIS_IS_CONFIGURE */
5699
5700/* Get the CFLAGS for real compilation. */
5701#ifdef __GNUC__
01abe918 5702configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5703#else
5704configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5705#endif
5706
5707#endif /* not THIS_IS_CONFIGURE */
5708' > ${tempcname}
5709
5710# The value of CPP is a quoted variable reference, so we need to do this
5711# to get its actual value...
5712CPP=`eval "echo $CPP"`
5713eval `${CPP} -Isrc ${tempcname} \
5714 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5715if test "x$SPECIFIED_CFLAGS" = x; then
5716 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5717 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5718else
5719 REAL_CFLAGS="$CFLAGS"
5720fi
5721rm ${tempcname}
5722
5723ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5724
5725### Make sure subsequent tests use flags consistent with the build flags.
5726
5727if test x"${OVERRIDE_CPPFLAGS}" != x; then
5728 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5729else
5730 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5731fi
5732
6bae0ccf
DL
5733
5734
ca81d7a0 5735# Check whether --enable-largefile was given.
f4988be7 5736if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5737 enableval=$enable_largefile;
5738fi
f4988be7 5739
503d2be0 5740if test "$enable_largefile" != no; then
f4988be7 5741
ca81d7a0
JD
5742 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5743echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5744if test "${ac_cv_sys_largefile_CC+set}" = set; then
5745 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5746else
f4988be7 5747 ac_cv_sys_largefile_CC=no
503d2be0
AS
5748 if test "$GCC" != yes; then
5749 ac_save_CC=$CC
5750 while :; do
ca81d7a0
JD
5751 # IRIX 6.2 and later do not support large files by default,
5752 # so use the C compiler's -n32 option if that helps.
edfaf76d 5753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5754/* confdefs.h. */
5755_ACEOF
5756cat confdefs.h >>conftest.$ac_ext
5757cat >>conftest.$ac_ext <<_ACEOF
5758/* end confdefs.h. */
f4988be7 5759#include <sys/types.h>
503d2be0
AS
5760 /* Check that off_t can represent 2**63 - 1 correctly.
5761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5762 since some C++ compilers masquerading as C compilers
5763 incorrectly reject 9223372036854775807. */
5764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5766 && LARGE_OFF_T % 2147483647 == 1)
5767 ? 1 : -1];
5768int
5769main ()
5770{
f4988be7 5771
503d2be0
AS
5772 ;
5773 return 0;
5774}
5775_ACEOF
ca81d7a0
JD
5776 rm -f conftest.$ac_objext
5777if { (ac_try="$ac_compile"
5778case "(($ac_try" in
5779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5780 *) ac_try_echo=$ac_try;;
5781esac
5782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5783 (eval "$ac_compile") 2>conftest.er1
503d2be0 5784 ac_status=$?
edfaf76d
LK
5785 grep -v '^ *+' conftest.er1 >conftest.err
5786 rm -f conftest.er1
5787 cat conftest.err >&5
c0d27fcc 5788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5789 (exit $ac_status); } && {
5790 test -z "$ac_c_werror_flag" ||
5791 test ! -s conftest.err
5792 } && test -s conftest.$ac_objext; then
503d2be0 5793 break
b192d653 5794else
503d2be0 5795 echo "$as_me: failed program was:" >&5
19650fd6
AS
5796sed 's/^/| /' conftest.$ac_ext >&5
5797
ca81d7a0 5798
503d2be0 5799fi
ca81d7a0
JD
5800
5801rm -f core conftest.err conftest.$ac_objext
5802 CC="$CC -n32"
5803 rm -f conftest.$ac_objext
5804if { (ac_try="$ac_compile"
5805case "(($ac_try" in
5806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807 *) ac_try_echo=$ac_try;;
5808esac
5809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5810 (eval "$ac_compile") 2>conftest.er1
503d2be0 5811 ac_status=$?
edfaf76d
LK
5812 grep -v '^ *+' conftest.er1 >conftest.err
5813 rm -f conftest.er1
5814 cat conftest.err >&5
c0d27fcc 5815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5816 (exit $ac_status); } && {
5817 test -z "$ac_c_werror_flag" ||
5818 test ! -s conftest.err
5819 } && test -s conftest.$ac_objext; then
503d2be0
AS
5820 ac_cv_sys_largefile_CC=' -n32'; break
5821else
5822 echo "$as_me: failed program was:" >&5
19650fd6
AS
5823sed 's/^/| /' conftest.$ac_ext >&5
5824
ca81d7a0 5825
503d2be0 5826fi
ca81d7a0
JD
5827
5828rm -f core conftest.err conftest.$ac_objext
edfaf76d 5829 break
503d2be0
AS
5830 done
5831 CC=$ac_save_CC
5832 rm -f conftest.$ac_ext
5833 fi
b192d653 5834fi
ca81d7a0
JD
5835{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5836echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5837 if test "$ac_cv_sys_largefile_CC" != no; then
5838 CC=$CC$ac_cv_sys_largefile_CC
5839 fi
b192d653 5840
ca81d7a0
JD
5841 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5842echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5843if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5844 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5845else
503d2be0 5846 while :; do
503d2be0 5847 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5848/* confdefs.h. */
5849_ACEOF
5850cat confdefs.h >>conftest.$ac_ext
5851cat >>conftest.$ac_ext <<_ACEOF
5852/* end confdefs.h. */
f4988be7 5853#include <sys/types.h>
503d2be0
AS
5854 /* Check that off_t can represent 2**63 - 1 correctly.
5855 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5856 since some C++ compilers masquerading as C compilers
5857 incorrectly reject 9223372036854775807. */
5858#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5859 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5860 && LARGE_OFF_T % 2147483647 == 1)
5861 ? 1 : -1];
5862int
5863main ()
5864{
f4988be7 5865
503d2be0
AS
5866 ;
5867 return 0;
5868}
5869_ACEOF
5870rm -f conftest.$ac_objext
ca81d7a0
JD
5871if { (ac_try="$ac_compile"
5872case "(($ac_try" in
5873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5874 *) ac_try_echo=$ac_try;;
5875esac
5876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5877 (eval "$ac_compile") 2>conftest.er1
503d2be0 5878 ac_status=$?
edfaf76d
LK
5879 grep -v '^ *+' conftest.er1 >conftest.err
5880 rm -f conftest.er1
5881 cat conftest.err >&5
c0d27fcc 5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5883 (exit $ac_status); } && {
5884 test -z "$ac_c_werror_flag" ||
5885 test ! -s conftest.err
5886 } && test -s conftest.$ac_objext; then
5887 ac_cv_sys_file_offset_bits=no; break
f4988be7 5888else
503d2be0 5889 echo "$as_me: failed program was:" >&5
19650fd6
AS
5890sed 's/^/| /' conftest.$ac_ext >&5
5891
ca81d7a0 5892
503d2be0 5893fi
ca81d7a0
JD
5894
5895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5896 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5897/* confdefs.h. */
5898_ACEOF
5899cat confdefs.h >>conftest.$ac_ext
5900cat >>conftest.$ac_ext <<_ACEOF
5901/* end confdefs.h. */
f4988be7
GM
5902#define _FILE_OFFSET_BITS 64
5903#include <sys/types.h>
503d2be0
AS
5904 /* Check that off_t can represent 2**63 - 1 correctly.
5905 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5906 since some C++ compilers masquerading as C compilers
5907 incorrectly reject 9223372036854775807. */
5908#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5909 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5910 && LARGE_OFF_T % 2147483647 == 1)
5911 ? 1 : -1];
5912int
5913main ()
5914{
5915
5916 ;
5917 return 0;
5918}
5919_ACEOF
5920rm -f conftest.$ac_objext
ca81d7a0
JD
5921if { (ac_try="$ac_compile"
5922case "(($ac_try" in
5923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5924 *) ac_try_echo=$ac_try;;
5925esac
5926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5927 (eval "$ac_compile") 2>conftest.er1
503d2be0 5928 ac_status=$?
edfaf76d
LK
5929 grep -v '^ *+' conftest.er1 >conftest.err
5930 rm -f conftest.er1
5931 cat conftest.err >&5
c0d27fcc 5932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5933 (exit $ac_status); } && {
5934 test -z "$ac_c_werror_flag" ||
5935 test ! -s conftest.err
5936 } && test -s conftest.$ac_objext; then
503d2be0
AS
5937 ac_cv_sys_file_offset_bits=64; break
5938else
5939 echo "$as_me: failed program was:" >&5
19650fd6
AS
5940sed 's/^/| /' conftest.$ac_ext >&5
5941
ca81d7a0 5942
503d2be0 5943fi
ca81d7a0
JD
5944
5945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5946 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5947 break
5948done
ba4481b5 5949fi
ca81d7a0
JD
5950{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5951echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5952case $ac_cv_sys_file_offset_bits in #(
5953 no | unknown) ;;
5954 *)
c0d27fcc 5955cat >>confdefs.h <<_ACEOF
f4988be7 5956#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5957_ACEOF
f053c89f
CY
5958;;
5959esac
503d2be0 5960rm -f conftest*
f053c89f
CY
5961 if test $ac_cv_sys_file_offset_bits = unknown; then
5962 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5963echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5964if test "${ac_cv_sys_large_files+set}" = set; then
5965 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5966else
503d2be0 5967 while :; do
503d2be0 5968 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5969/* confdefs.h. */
5970_ACEOF
5971cat confdefs.h >>conftest.$ac_ext
5972cat >>conftest.$ac_ext <<_ACEOF
5973/* end confdefs.h. */
503d2be0
AS
5974#include <sys/types.h>
5975 /* Check that off_t can represent 2**63 - 1 correctly.
5976 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5977 since some C++ compilers masquerading as C compilers
5978 incorrectly reject 9223372036854775807. */
5979#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5980 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5981 && LARGE_OFF_T % 2147483647 == 1)
5982 ? 1 : -1];
5983int
5984main ()
5985{
ba4481b5 5986
503d2be0
AS
5987 ;
5988 return 0;
5989}
5990_ACEOF
5991rm -f conftest.$ac_objext
ca81d7a0
JD
5992if { (ac_try="$ac_compile"
5993case "(($ac_try" in
5994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5995 *) ac_try_echo=$ac_try;;
5996esac
5997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5998 (eval "$ac_compile") 2>conftest.er1
503d2be0 5999 ac_status=$?
edfaf76d
LK
6000 grep -v '^ *+' conftest.er1 >conftest.err
6001 rm -f conftest.er1
6002 cat conftest.err >&5
c0d27fcc 6003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6004 (exit $ac_status); } && {
6005 test -z "$ac_c_werror_flag" ||
6006 test ! -s conftest.err
6007 } && test -s conftest.$ac_objext; then
6008 ac_cv_sys_large_files=no; break
ba4481b5 6009else
503d2be0 6010 echo "$as_me: failed program was:" >&5
19650fd6
AS
6011sed 's/^/| /' conftest.$ac_ext >&5
6012
ca81d7a0 6013
503d2be0 6014fi
ca81d7a0
JD
6015
6016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6017 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6018/* confdefs.h. */
6019_ACEOF
6020cat confdefs.h >>conftest.$ac_ext
6021cat >>conftest.$ac_ext <<_ACEOF
6022/* end confdefs.h. */
f4988be7 6023#define _LARGE_FILES 1
503d2be0
AS
6024#include <sys/types.h>
6025 /* Check that off_t can represent 2**63 - 1 correctly.
6026 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6027 since some C++ compilers masquerading as C compilers
6028 incorrectly reject 9223372036854775807. */
6029#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6030 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6031 && LARGE_OFF_T % 2147483647 == 1)
6032 ? 1 : -1];
6033int
6034main ()
6035{
f4988be7 6036
503d2be0
AS
6037 ;
6038 return 0;
6039}
6040_ACEOF
6041rm -f conftest.$ac_objext
ca81d7a0
JD
6042if { (ac_try="$ac_compile"
6043case "(($ac_try" in
6044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6045 *) ac_try_echo=$ac_try;;
6046esac
6047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6048 (eval "$ac_compile") 2>conftest.er1
503d2be0 6049 ac_status=$?
edfaf76d
LK
6050 grep -v '^ *+' conftest.er1 >conftest.err
6051 rm -f conftest.er1
6052 cat conftest.err >&5
c0d27fcc 6053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6054 (exit $ac_status); } && {
6055 test -z "$ac_c_werror_flag" ||
6056 test ! -s conftest.err
6057 } && test -s conftest.$ac_objext; then
503d2be0
AS
6058 ac_cv_sys_large_files=1; break
6059else
6060 echo "$as_me: failed program was:" >&5
19650fd6
AS
6061sed 's/^/| /' conftest.$ac_ext >&5
6062
ca81d7a0 6063
503d2be0 6064fi
ca81d7a0
JD
6065
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 6067 ac_cv_sys_large_files=unknown
503d2be0
AS
6068 break
6069done
ba4481b5 6070fi
ca81d7a0
JD
6071{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
6072echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
6073case $ac_cv_sys_large_files in #(
6074 no | unknown) ;;
6075 *)
c0d27fcc 6076cat >>confdefs.h <<_ACEOF
f4988be7 6077#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 6078_ACEOF
f053c89f
CY
6079;;
6080esac
503d2be0 6081rm -f conftest*
f053c89f 6082 fi
503d2be0 6083fi
ba4481b5 6084
c0d27fcc 6085
439f58ee 6086
55e6d9b2 6087### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
6088### be located in either /usr/lib64 or /usr/lib.
6089case "${canonical}" in
55e6d9b2 6090 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
6091 if test -d /usr/lib64; then
6092
6093cat >>confdefs.h <<\_ACEOF
55e6d9b2 6094#define HAVE_LIB64_DIR 1
bc5d9888
CY
6095_ACEOF
6096
6097fi
6098esac
6099
439f58ee
JD
6100
6101
6102
2c9dccc9
PJ
6103if test "${with_sound}" != "no"; then
6104 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
6105
6106
6107
6108for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6109do
6110as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6111if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6112 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6113echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6114if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6115 echo $ECHO_N "(cached) $ECHO_C" >&6
6116fi
ca81d7a0
JD
6117ac_res=`eval echo '${'$as_ac_Header'}'`
6118 { echo "$as_me:$LINENO: result: $ac_res" >&5
6119echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6120else
6121 # Is the header compilable?
ca81d7a0
JD
6122{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6123echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6124cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6125/* confdefs.h. */
6126_ACEOF
6127cat confdefs.h >>conftest.$ac_ext
6128cat >>conftest.$ac_ext <<_ACEOF
6129/* end confdefs.h. */
c0d27fcc 6130$ac_includes_default
98418dba 6131#include <$ac_header>
503d2be0 6132_ACEOF
c0d27fcc 6133rm -f conftest.$ac_objext
ca81d7a0
JD
6134if { (ac_try="$ac_compile"
6135case "(($ac_try" in
6136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6137 *) ac_try_echo=$ac_try;;
6138esac
6139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6140 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6141 ac_status=$?
edfaf76d
LK
6142 grep -v '^ *+' conftest.er1 >conftest.err
6143 rm -f conftest.er1
6144 cat conftest.err >&5
c0d27fcc 6145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6146 (exit $ac_status); } && {
6147 test -z "$ac_c_werror_flag" ||
6148 test ! -s conftest.err
6149 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6150 ac_header_compiler=yes
6151else
6152 echo "$as_me: failed program was:" >&5
19650fd6
AS
6153sed 's/^/| /' conftest.$ac_ext >&5
6154
ca81d7a0 6155 ac_header_compiler=no
c0d27fcc 6156fi
ca81d7a0
JD
6157
6158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6159{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6160echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6161
6162# Is the header present?
ca81d7a0
JD
6163{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6164echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6165cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6166/* confdefs.h. */
6167_ACEOF
6168cat confdefs.h >>conftest.$ac_ext
6169cat >>conftest.$ac_ext <<_ACEOF
6170/* end confdefs.h. */
c0d27fcc
MR
6171#include <$ac_header>
6172_ACEOF
ca81d7a0
JD
6173if { (ac_try="$ac_cpp conftest.$ac_ext"
6174case "(($ac_try" in
6175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6176 *) ac_try_echo=$ac_try;;
6177esac
6178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6179 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6180 ac_status=$?
6bae0ccf 6181 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6182 rm -f conftest.er1
6183 cat conftest.err >&5
c0d27fcc 6184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6185 (exit $ac_status); } >/dev/null && {
6186 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6187 test ! -s conftest.err
6188 }; then
c0d27fcc 6189 ac_header_preproc=yes
f4988be7 6190else
503d2be0 6191 echo "$as_me: failed program was:" >&5
19650fd6
AS
6192sed 's/^/| /' conftest.$ac_ext >&5
6193
c0d27fcc 6194 ac_header_preproc=no
f4988be7 6195fi
ca81d7a0 6196
98418dba 6197rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6198{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6199echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6200
6201# So? What about this header?
edfaf76d
LK
6202case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6203 yes:no: )
c0d27fcc
MR
6204 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6205echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6206 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6207echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6208 ac_header_preproc=yes
19650fd6 6209 ;;
edfaf76d 6210 no:yes:* )
c0d27fcc
MR
6211 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6212echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6213 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6214echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6215 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6216echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6217 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6218echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6219 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6220echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6221 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6222echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6223
19650fd6 6224 ;;
c0d27fcc 6225esac
ca81d7a0
JD
6226{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6227echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6229 echo $ECHO_N "(cached) $ECHO_C" >&6
6230else
edfaf76d 6231 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6232fi
ca81d7a0
JD
6233ac_res=`eval echo '${'$as_ac_Header'}'`
6234 { echo "$as_me:$LINENO: result: $ac_res" >&5
6235echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6236
6237fi
98418dba 6238if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6239 cat >>confdefs.h <<_ACEOF
98418dba 6240#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6241_ACEOF
f4988be7
GM
6242
6243fi
c0d27fcc 6244
98418dba
CW
6245done
6246
6247 # Emulation library used on NetBSD.
ca81d7a0
JD
6248 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6249echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6250if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6251 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6252else
98418dba
CW
6253 ac_check_lib_save_LIBS=$LIBS
6254LIBS="-lossaudio $LIBS"
6255cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6256/* confdefs.h. */
6257_ACEOF
6258cat confdefs.h >>conftest.$ac_ext
6259cat >>conftest.$ac_ext <<_ACEOF
6260/* end confdefs.h. */
98418dba 6261
ca81d7a0
JD
6262/* Override any GCC internal prototype to avoid an error.
6263 Use char because int might match the return type of a GCC
6264 builtin and then its argument prototype would still apply. */
98418dba
CW
6265#ifdef __cplusplus
6266extern "C"
f4988be7 6267#endif
98418dba 6268char _oss_ioctl ();
503d2be0
AS
6269int
6270main ()
6271{
ca81d7a0 6272return _oss_ioctl ();
503d2be0
AS
6273 ;
6274 return 0;
6275}
6276_ACEOF
98418dba 6277rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6278if { (ac_try="$ac_link"
6279case "(($ac_try" in
6280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6281 *) ac_try_echo=$ac_try;;
6282esac
6283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6284 (eval "$ac_link") 2>conftest.er1
503d2be0 6285 ac_status=$?
edfaf76d
LK
6286 grep -v '^ *+' conftest.er1 >conftest.err
6287 rm -f conftest.er1
6288 cat conftest.err >&5
c0d27fcc 6289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6290 (exit $ac_status); } && {
6291 test -z "$ac_c_werror_flag" ||
6292 test ! -s conftest.err
6293 } && test -s conftest$ac_exeext &&
6294 $as_test_x conftest$ac_exeext; then
98418dba 6295 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6296else
503d2be0 6297 echo "$as_me: failed program was:" >&5
19650fd6
AS
6298sed 's/^/| /' conftest.$ac_ext >&5
6299
ca81d7a0 6300 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6301fi
ca81d7a0 6302
f053c89f 6303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6304 conftest$ac_exeext conftest.$ac_ext
98418dba 6305LIBS=$ac_check_lib_save_LIBS
f4988be7 6306fi
ca81d7a0
JD
6307{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6308echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6309if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6310 LIBSOUND=-lossaudio
6311else
6312 LIBSOUND=
6313fi
6314
c0d27fcc 6315
439f58ee
JD
6316
6317 ALSA_REQUIRED=1.0.0
6318 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6319
6320 succeeded=no
6321
00b9c927 6322 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6323set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6324{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6325echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6326if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6327 echo $ECHO_N "(cached) $ECHO_C" >&6
6328else
6329 case $PKG_CONFIG in
6330 [\\/]* | ?:[\\/]*)
6331 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6332 ;;
6333 *)
6334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6335for as_dir in $PATH
6336do
6337 IFS=$as_save_IFS
6338 test -z "$as_dir" && as_dir=.
6339 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6340 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6341 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6343 break 2
6344 fi
6345done
6346done
ca81d7a0 6347IFS=$as_save_IFS
439f58ee
JD
6348
6349 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6350 ;;
6351esac
6352fi
6353PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6354if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6355 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6356echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6357else
ca81d7a0
JD
6358 { echo "$as_me:$LINENO: result: no" >&5
6359echo "${ECHO_T}no" >&6; }
439f58ee
JD
6360fi
6361
ca81d7a0 6362
439f58ee
JD
6363
6364 if test "$PKG_CONFIG" = "no" ; then
6365 HAVE_ALSA=no
6366 else
6367 PKG_CONFIG_MIN_VERSION=0.9.0
6368 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6369 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6370echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6371
67db6aa2 6372 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6373 { echo "$as_me:$LINENO: result: yes" >&5
6374echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6375 succeeded=yes
6376
ca81d7a0
JD
6377 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6378echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6379 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6380 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6381echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6382
ca81d7a0
JD
6383 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6384echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6385 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6386 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6387echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6388 else
ca81d7a0
JD
6389 { echo "$as_me:$LINENO: result: no" >&5
6390echo "${ECHO_T}no" >&6; }
439f58ee
JD
6391 ALSA_CFLAGS=""
6392 ALSA_LIBS=""
6393 ## If we have a custom action on failure, don't print errors, but
6394 ## do set a variable so people can do so.
6395 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6396
6397 fi
6398
6399
6400
6401 else
6402 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6403 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6404 fi
6405 fi
6406
6407 if test $succeeded = yes; then
6408 HAVE_ALSA=yes
6409 else
6410 HAVE_ALSA=no
6411 fi
6412
6413 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6414 SAVE_CFLAGS="$CFLAGS"
6415 SAVE_LDFLAGS="$LDFLAGS"
6416 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6417 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6418 cat >conftest.$ac_ext <<_ACEOF
6419/* confdefs.h. */
6420_ACEOF
6421cat confdefs.h >>conftest.$ac_ext
6422cat >>conftest.$ac_ext <<_ACEOF
6423/* end confdefs.h. */
6424#include <asoundlib.h>
6425int
6426main ()
6427{
6428snd_lib_error_set_handler (0);
6429 ;
6430 return 0;
6431}
6432_ACEOF
6433rm -f conftest.$ac_objext
6434if { (ac_try="$ac_compile"
6435case "(($ac_try" in
6436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6437 *) ac_try_echo=$ac_try;;
6438esac
6439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6440 (eval "$ac_compile") 2>conftest.er1
6441 ac_status=$?
6442 grep -v '^ *+' conftest.er1 >conftest.err
6443 rm -f conftest.er1
6444 cat conftest.err >&5
6445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6446 (exit $ac_status); } && {
6447 test -z "$ac_c_werror_flag" ||
6448 test ! -s conftest.err
6449 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6450 emacs_alsa_normal=yes
6451else
6452 echo "$as_me: failed program was:" >&5
6453sed 's/^/| /' conftest.$ac_ext >&5
6454
6455 emacs_alsa_normal=no
6456fi
6457
6458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6459 if test "$emacs_alsa_normal" != yes; then
6460 cat >conftest.$ac_ext <<_ACEOF
6461/* confdefs.h. */
6462_ACEOF
6463cat confdefs.h >>conftest.$ac_ext
6464cat >>conftest.$ac_ext <<_ACEOF
6465/* end confdefs.h. */
6466#include <alsa/asoundlib.h>
6467int
6468main ()
6469{
6470snd_lib_error_set_handler (0);
6471 ;
6472 return 0;
6473}
6474_ACEOF
6475rm -f conftest.$ac_objext
6476if { (ac_try="$ac_compile"
6477case "(($ac_try" in
6478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6479 *) ac_try_echo=$ac_try;;
6480esac
6481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6482 (eval "$ac_compile") 2>conftest.er1
6483 ac_status=$?
6484 grep -v '^ *+' conftest.er1 >conftest.err
6485 rm -f conftest.er1
6486 cat conftest.err >&5
6487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6488 (exit $ac_status); } && {
6489 test -z "$ac_c_werror_flag" ||
6490 test ! -s conftest.err
6491 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6492 emacs_alsa_subdir=yes
6493else
6494 echo "$as_me: failed program was:" >&5
6495sed 's/^/| /' conftest.$ac_ext >&5
6496
6497 emacs_alsa_subdir=no
6498fi
6499
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501 if test "$emacs_alsa_subdir" != yes; then
6502 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6503echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6504 { (exit 1); exit 1; }; }
6505 fi
6506 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6507 fi
6508
6509 CFLAGS="$SAVE_CFLAGS"
6510 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6511 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6512 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6513
6514cat >>confdefs.h <<\_ACEOF
6515#define HAVE_ALSA 1
6516_ACEOF
6517
6518 fi
6519
f4988be7 6520fi
c0d27fcc
MR
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
22044edf
DL
6539
6540
973a76b1 6541
cffcede7 6542
551ffc27 6543
226e2359 6544
c0d27fcc 6545
f4988be7 6546
98418dba
CW
6547for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6548 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6549 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6550 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6551 sys/utsname.h pwd.h
98418dba
CW
6552do
6553as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6554if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6555 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6556echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6557if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6558 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6559fi
ca81d7a0
JD
6560ac_res=`eval echo '${'$as_ac_Header'}'`
6561 { echo "$as_me:$LINENO: result: $ac_res" >&5
6562echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6563else
c0d27fcc 6564 # Is the header compilable?
ca81d7a0
JD
6565{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6566echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6567cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6568/* confdefs.h. */
6569_ACEOF
6570cat confdefs.h >>conftest.$ac_ext
6571cat >>conftest.$ac_ext <<_ACEOF
6572/* end confdefs.h. */
c0d27fcc
MR
6573$ac_includes_default
6574#include <$ac_header>
6575_ACEOF
6576rm -f conftest.$ac_objext
ca81d7a0
JD
6577if { (ac_try="$ac_compile"
6578case "(($ac_try" in
6579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6580 *) ac_try_echo=$ac_try;;
6581esac
6582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6583 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6584 ac_status=$?
edfaf76d
LK
6585 grep -v '^ *+' conftest.er1 >conftest.err
6586 rm -f conftest.er1
6587 cat conftest.err >&5
c0d27fcc 6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6589 (exit $ac_status); } && {
6590 test -z "$ac_c_werror_flag" ||
6591 test ! -s conftest.err
6592 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6593 ac_header_compiler=yes
6594else
6595 echo "$as_me: failed program was:" >&5
19650fd6
AS
6596sed 's/^/| /' conftest.$ac_ext >&5
6597
ca81d7a0 6598 ac_header_compiler=no
c0d27fcc 6599fi
ca81d7a0
JD
6600
6601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6603echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6604
6605# Is the header present?
ca81d7a0
JD
6606{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6607echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6608cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6609/* confdefs.h. */
6610_ACEOF
6611cat confdefs.h >>conftest.$ac_ext
6612cat >>conftest.$ac_ext <<_ACEOF
6613/* end confdefs.h. */
98418dba 6614#include <$ac_header>
503d2be0 6615_ACEOF
ca81d7a0
JD
6616if { (ac_try="$ac_cpp conftest.$ac_ext"
6617case "(($ac_try" in
6618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6619 *) ac_try_echo=$ac_try;;
6620esac
6621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6622 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6623 ac_status=$?
6bae0ccf 6624 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6625 rm -f conftest.er1
6626 cat conftest.err >&5
c0d27fcc 6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6628 (exit $ac_status); } >/dev/null && {
6629 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6630 test ! -s conftest.err
6631 }; then
c0d27fcc 6632 ac_header_preproc=yes
34ec9ebe 6633else
503d2be0 6634 echo "$as_me: failed program was:" >&5
19650fd6
AS
6635sed 's/^/| /' conftest.$ac_ext >&5
6636
c0d27fcc 6637 ac_header_preproc=no
34ec9ebe 6638fi
ca81d7a0 6639
98418dba 6640rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6641{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6642echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6643
6644# So? What about this header?
edfaf76d
LK
6645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6646 yes:no: )
c0d27fcc
MR
6647 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6648echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6649 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6650echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6651 ac_header_preproc=yes
19650fd6 6652 ;;
edfaf76d 6653 no:yes:* )
c0d27fcc
MR
6654 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6655echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6656 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6657echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6658 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6659echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6660 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6661echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6662 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6663echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6664 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6665echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6666
19650fd6 6667 ;;
c0d27fcc 6668esac
ca81d7a0
JD
6669{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6671if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6672 echo $ECHO_N "(cached) $ECHO_C" >&6
6673else
edfaf76d 6674 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6675fi
ca81d7a0
JD
6676ac_res=`eval echo '${'$as_ac_Header'}'`
6677 { echo "$as_me:$LINENO: result: $ac_res" >&5
6678echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6679
6680fi
98418dba 6681if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6682 cat >>confdefs.h <<_ACEOF
98418dba 6683#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6684_ACEOF
34ec9ebe 6685
98418dba 6686fi
c0d27fcc 6687
98418dba
CW
6688done
6689
22044edf 6690
ca81d7a0
JD
6691{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6692echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6693cat >conftest.$ac_ext <<_ACEOF
6694/* confdefs.h. */
6695_ACEOF
6696cat confdefs.h >>conftest.$ac_ext
6697cat >>conftest.$ac_ext <<_ACEOF
6698/* end confdefs.h. */
6699#include <sys/personality.h>
6700int
6701main ()
6702{
6703personality (PER_LINUX32)
6704 ;
6705 return 0;
6706}
6707_ACEOF
6708rm -f conftest.$ac_objext
ca81d7a0
JD
6709if { (ac_try="$ac_compile"
6710case "(($ac_try" in
6711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6712 *) ac_try_echo=$ac_try;;
6713esac
6714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6715 (eval "$ac_compile") 2>conftest.er1
f17e308a 6716 ac_status=$?
edfaf76d
LK
6717 grep -v '^ *+' conftest.er1 >conftest.err
6718 rm -f conftest.er1
6719 cat conftest.err >&5
f17e308a 6720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6721 (exit $ac_status); } && {
6722 test -z "$ac_c_werror_flag" ||
6723 test ! -s conftest.err
6724 } && test -s conftest.$ac_objext; then
f17e308a
JD
6725 emacs_cv_personality_linux32=yes
6726else
6727 echo "$as_me: failed program was:" >&5
6728sed 's/^/| /' conftest.$ac_ext >&5
6729
ca81d7a0 6730 emacs_cv_personality_linux32=no
f17e308a 6731fi
ca81d7a0
JD
6732
6733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6734{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6735echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6736
6737if test $emacs_cv_personality_linux32 = yes; then
6738
6739cat >>confdefs.h <<\_ACEOF
6740#define HAVE_PERSONALITY_LINUX32 1
6741_ACEOF
6742
6743fi
6744
6745
22044edf
DL
6746for ac_header in term.h
6747do
6748as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6749{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6750echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6751if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6752 echo $ECHO_N "(cached) $ECHO_C" >&6
6753else
6754 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6755/* confdefs.h. */
6756_ACEOF
6757cat confdefs.h >>conftest.$ac_ext
6758cat >>conftest.$ac_ext <<_ACEOF
6759/* end confdefs.h. */
22044edf
DL
6760#include <$ac_header>
6761_ACEOF
ca81d7a0
JD
6762if { (ac_try="$ac_cpp conftest.$ac_ext"
6763case "(($ac_try" in
6764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6765 *) ac_try_echo=$ac_try;;
6766esac
6767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6768 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6769 ac_status=$?
6770 grep -v '^ *+' conftest.er1 >conftest.err
6771 rm -f conftest.er1
6772 cat conftest.err >&5
6773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6774 (exit $ac_status); } >/dev/null && {
6775 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6776 test ! -s conftest.err
6777 }; then
22044edf
DL
6778 eval "$as_ac_Header=yes"
6779else
6780 echo "$as_me: failed program was:" >&5
19650fd6
AS
6781sed 's/^/| /' conftest.$ac_ext >&5
6782
22044edf
DL
6783 eval "$as_ac_Header=no"
6784fi
ca81d7a0 6785
22044edf
DL
6786rm -f conftest.err conftest.$ac_ext
6787fi
ca81d7a0
JD
6788ac_res=`eval echo '${'$as_ac_Header'}'`
6789 { echo "$as_me:$LINENO: result: $ac_res" >&5
6790echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6791if test `eval echo '${'$as_ac_Header'}'` = yes; then
6792 cat >>confdefs.h <<_ACEOF
6793#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6794_ACEOF
6795
6796fi
6797
6798done
6799
ca81d7a0
JD
6800{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6801echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6802if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6803 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6804else
503d2be0 6805 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6806/* confdefs.h. */
6807_ACEOF
6808cat confdefs.h >>conftest.$ac_ext
6809cat >>conftest.$ac_ext <<_ACEOF
6810/* end confdefs.h. */
98418dba
CW
6811#include <stdlib.h>
6812#include <stdarg.h>
6813#include <string.h>
6814#include <float.h>
6815
19650fd6
AS
6816int
6817main ()
6818{
6819
6820 ;
6821 return 0;
6822}
98418dba 6823_ACEOF
19650fd6 6824rm -f conftest.$ac_objext
ca81d7a0
JD
6825if { (ac_try="$ac_compile"
6826case "(($ac_try" in
6827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6828 *) ac_try_echo=$ac_try;;
6829esac
6830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6831 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6832 ac_status=$?
edfaf76d
LK
6833 grep -v '^ *+' conftest.er1 >conftest.err
6834 rm -f conftest.er1
6835 cat conftest.err >&5
cd958eb3 6836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6837 (exit $ac_status); } && {
6838 test -z "$ac_c_werror_flag" ||
6839 test ! -s conftest.err
6840 } && test -s conftest.$ac_objext; then
98418dba 6841 ac_cv_header_stdc=yes
ba4481b5 6842else
503d2be0 6843 echo "$as_me: failed program was:" >&5
19650fd6
AS
6844sed 's/^/| /' conftest.$ac_ext >&5
6845
ca81d7a0 6846 ac_cv_header_stdc=no
ba4481b5 6847fi
ca81d7a0
JD
6848
6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6850
6851if test $ac_cv_header_stdc = yes; then
6852 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6853 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6854/* confdefs.h. */
6855_ACEOF
6856cat confdefs.h >>conftest.$ac_ext
6857cat >>conftest.$ac_ext <<_ACEOF
6858/* end confdefs.h. */
98418dba
CW
6859#include <string.h>
6860
6861_ACEOF
6862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6863 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6864 :
6865else
6866 ac_cv_header_stdc=no
ba4481b5 6867fi
98418dba 6868rm -f conftest*
ba4481b5
DL
6869
6870fi
6871
98418dba
CW
6872if test $ac_cv_header_stdc = yes; then
6873 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6874 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6875/* confdefs.h. */
6876_ACEOF
6877cat confdefs.h >>conftest.$ac_ext
6878cat >>conftest.$ac_ext <<_ACEOF
6879/* end confdefs.h. */
98418dba
CW
6880#include <stdlib.h>
6881
6882_ACEOF
6883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6884 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6885 :
6886else
6887 ac_cv_header_stdc=no
6888fi
6889rm -f conftest*
6890
6891fi
6892
6893if test $ac_cv_header_stdc = yes; then
6894 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6895 if test "$cross_compiling" = yes; then
6896 :
d42122a3 6897else
503d2be0 6898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6899/* confdefs.h. */
6900_ACEOF
6901cat confdefs.h >>conftest.$ac_ext
6902cat >>conftest.$ac_ext <<_ACEOF
6903/* end confdefs.h. */
98418dba 6904#include <ctype.h>
ca81d7a0 6905#include <stdlib.h>
98418dba
CW
6906#if ((' ' & 0x0FF) == 0x020)
6907# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6908# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6909#else
19650fd6 6910# define ISLOWER(c) \
edfaf76d
LK
6911 (('a' <= (c) && (c) <= 'i') \
6912 || ('j' <= (c) && (c) <= 'r') \
6913 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6914# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6915#endif
6916
6917#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6918int
6919main ()
6920{
98418dba
CW
6921 int i;
6922 for (i = 0; i < 256; i++)
6923 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6924 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6925 return 2;
6926 return 0;
503d2be0
AS
6927}
6928_ACEOF
98418dba 6929rm -f conftest$ac_exeext
ca81d7a0
JD
6930if { (ac_try="$ac_link"
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_link") 2>&5
503d2be0 6937 ac_status=$?
c0d27fcc 6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6939 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6940 { (case "(($ac_try" in
6941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6942 *) ac_try_echo=$ac_try;;
6943esac
6944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6945 (eval "$ac_try") 2>&5
503d2be0 6946 ac_status=$?
c0d27fcc 6947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6948 (exit $ac_status); }; }; then
98418dba 6949 :
d42122a3 6950else
98418dba
CW
6951 echo "$as_me: program exited with status $ac_status" >&5
6952echo "$as_me: failed program was:" >&5
19650fd6
AS
6953sed 's/^/| /' conftest.$ac_ext >&5
6954
c0d27fcc 6955( exit $ac_status )
98418dba 6956ac_cv_header_stdc=no
d42122a3 6957fi
ca81d7a0 6958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6959fi
ca81d7a0
JD
6960
6961
98418dba
CW
6962fi
6963fi
ca81d7a0
JD
6964{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6965echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6966if test $ac_cv_header_stdc = yes; then
6967
c0d27fcc 6968cat >>confdefs.h <<\_ACEOF
98418dba 6969#define STDC_HEADERS 1
c0d27fcc 6970_ACEOF
d42122a3
DL
6971
6972fi
6973
ca81d7a0
JD
6974{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6975echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6976if test "${ac_cv_header_time+set}" = set; then
503d2be0 6977 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6978else
503d2be0 6979 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6980/* confdefs.h. */
6981_ACEOF
6982cat confdefs.h >>conftest.$ac_ext
6983cat >>conftest.$ac_ext <<_ACEOF
6984/* end confdefs.h. */
ba4481b5 6985#include <sys/types.h>
98418dba 6986#include <sys/time.h>
ba4481b5 6987#include <time.h>
503d2be0
AS
6988
6989int
6990main ()
6991{
98418dba
CW
6992if ((struct tm *) 0)
6993return 0;
503d2be0
AS
6994 ;
6995 return 0;
6996}
6997_ACEOF
6998rm -f conftest.$ac_objext
ca81d7a0
JD
6999if { (ac_try="$ac_compile"
7000case "(($ac_try" in
7001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7002 *) ac_try_echo=$ac_try;;
7003esac
7004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7005 (eval "$ac_compile") 2>conftest.er1
503d2be0 7006 ac_status=$?
edfaf76d
LK
7007 grep -v '^ *+' conftest.er1 >conftest.err
7008 rm -f conftest.er1
7009 cat conftest.err >&5
c0d27fcc 7010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7011 (exit $ac_status); } && {
7012 test -z "$ac_c_werror_flag" ||
7013 test ! -s conftest.err
7014 } && test -s conftest.$ac_objext; then
98418dba 7015 ac_cv_header_time=yes
ba4481b5 7016else
503d2be0 7017 echo "$as_me: failed program was:" >&5
19650fd6
AS
7018sed 's/^/| /' conftest.$ac_ext >&5
7019
ca81d7a0 7020 ac_cv_header_time=no
ba4481b5 7021fi
ca81d7a0
JD
7022
7023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7024fi
ca81d7a0
JD
7025{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7026echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7027if test $ac_cv_header_time = yes; then
503d2be0 7028
c0d27fcc 7029cat >>confdefs.h <<\_ACEOF
98418dba 7030#define TIME_WITH_SYS_TIME 1
c0d27fcc 7031_ACEOF
ba4481b5
DL
7032
7033fi
7034
ca81d7a0
JD
7035{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7036echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7037if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7038 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7039else
503d2be0 7040 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7041/* confdefs.h. */
7042_ACEOF
7043cat confdefs.h >>conftest.$ac_ext
7044cat >>conftest.$ac_ext <<_ACEOF
7045/* end confdefs.h. */
cd958eb3
MB
7046$ac_includes_default
7047int
7048main ()
7049{
7050#ifndef sys_siglist
f053c89f 7051 (void) sys_siglist;
98418dba 7052#endif
503d2be0 7053
cd958eb3
MB
7054 ;
7055 return 0;
7056}
7057_ACEOF
7058rm -f conftest.$ac_objext
ca81d7a0
JD
7059if { (ac_try="$ac_compile"
7060case "(($ac_try" in
7061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7062 *) ac_try_echo=$ac_try;;
7063esac
7064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7065 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7066 ac_status=$?
edfaf76d
LK
7067 grep -v '^ *+' conftest.er1 >conftest.err
7068 rm -f conftest.er1
7069 cat conftest.err >&5
cd958eb3 7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7071 (exit $ac_status); } && {
7072 test -z "$ac_c_werror_flag" ||
7073 test ! -s conftest.err
7074 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7075 ac_cv_have_decl_sys_siglist=yes
7076else
7077 echo "$as_me: failed program was:" >&5
19650fd6
AS
7078sed 's/^/| /' conftest.$ac_ext >&5
7079
ca81d7a0 7080 ac_cv_have_decl_sys_siglist=no
cd958eb3 7081fi
ca81d7a0
JD
7082
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7084fi
ca81d7a0
JD
7085{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7086echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7087if test $ac_cv_have_decl_sys_siglist = yes; then
7088
7089cat >>confdefs.h <<_ACEOF
7090#define HAVE_DECL_SYS_SIGLIST 1
7091_ACEOF
7092
7093
7094else
7095 cat >>confdefs.h <<_ACEOF
7096#define HAVE_DECL_SYS_SIGLIST 0
7097_ACEOF
7098
7099
7100fi
7101
7102
7103if test $ac_cv_have_decl_sys_siglist != yes; then
7104 # For Tru64, at least:
ca81d7a0
JD
7105 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7106echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7107if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7108 echo $ECHO_N "(cached) $ECHO_C" >&6
7109else
7110 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
cd958eb3 7116$ac_includes_default
503d2be0
AS
7117int
7118main ()
7119{
cd958eb3 7120#ifndef __sys_siglist
f053c89f 7121 (void) __sys_siglist;
cd958eb3
MB
7122#endif
7123
503d2be0
AS
7124 ;
7125 return 0;
7126}
7127_ACEOF
7128rm -f conftest.$ac_objext
ca81d7a0
JD
7129if { (ac_try="$ac_compile"
7130case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
7134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7135 (eval "$ac_compile") 2>conftest.er1
503d2be0 7136 ac_status=$?
edfaf76d
LK
7137 grep -v '^ *+' conftest.er1 >conftest.err
7138 rm -f conftest.er1
7139 cat conftest.err >&5
c0d27fcc 7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7141 (exit $ac_status); } && {
7142 test -z "$ac_c_werror_flag" ||
7143 test ! -s conftest.err
7144 } && test -s conftest.$ac_objext; then
cd958eb3 7145 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7146else
503d2be0 7147 echo "$as_me: failed program was:" >&5
19650fd6
AS
7148sed 's/^/| /' conftest.$ac_ext >&5
7149
ca81d7a0 7150 ac_cv_have_decl___sys_siglist=no
ba4481b5 7151fi
ca81d7a0
JD
7152
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7154fi
ca81d7a0
JD
7155{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7156echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7157if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7158
cd958eb3
MB
7159cat >>confdefs.h <<_ACEOF
7160#define HAVE_DECL___SYS_SIGLIST 1
7161_ACEOF
7162
7163
7164else
7165 cat >>confdefs.h <<_ACEOF
7166#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7167_ACEOF
503d2be0 7168
cd958eb3 7169
ba4481b5
DL
7170fi
7171
cd958eb3
MB
7172
7173 if test $ac_cv_have_decl___sys_siglist = yes; then
7174
7175cat >>confdefs.h <<\_ACEOF
7176#define sys_siglist __sys_siglist
7177_ACEOF
7178
7179 fi
7180fi
ca81d7a0
JD
7181{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7182echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7183if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7184 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7185else
503d2be0 7186 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7187/* confdefs.h. */
7188_ACEOF
7189cat confdefs.h >>conftest.$ac_ext
7190cat >>conftest.$ac_ext <<_ACEOF
7191/* end confdefs.h. */
98418dba
CW
7192#include <sys/types.h>
7193#include <sys/wait.h>
7194#ifndef WEXITSTATUS
ca81d7a0 7195# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7196#endif
7197#ifndef WIFEXITED
7198# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7199#endif
503d2be0
AS
7200
7201int
7202main ()
7203{
98418dba
CW
7204 int s;
7205 wait (&s);
7206 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7207 ;
7208 return 0;
7209}
7210_ACEOF
98418dba 7211rm -f conftest.$ac_objext
ca81d7a0
JD
7212if { (ac_try="$ac_compile"
7213case "(($ac_try" in
7214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7215 *) ac_try_echo=$ac_try;;
7216esac
7217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7218 (eval "$ac_compile") 2>conftest.er1
503d2be0 7219 ac_status=$?
edfaf76d
LK
7220 grep -v '^ *+' conftest.er1 >conftest.err
7221 rm -f conftest.er1
7222 cat conftest.err >&5
c0d27fcc 7223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7224 (exit $ac_status); } && {
7225 test -z "$ac_c_werror_flag" ||
7226 test ! -s conftest.err
7227 } && test -s conftest.$ac_objext; then
98418dba 7228 ac_cv_header_sys_wait_h=yes
ba4481b5 7229else
503d2be0 7230 echo "$as_me: failed program was:" >&5
19650fd6
AS
7231sed 's/^/| /' conftest.$ac_ext >&5
7232
ca81d7a0 7233 ac_cv_header_sys_wait_h=no
ba4481b5 7234fi
ca81d7a0
JD
7235
7236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7237fi
ca81d7a0
JD
7238{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7239echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7240if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7241
c0d27fcc 7242cat >>confdefs.h <<\_ACEOF
98418dba 7243#define HAVE_SYS_WAIT_H 1
c0d27fcc 7244_ACEOF
ba4481b5 7245
ba4481b5
DL
7246fi
7247
c0d27fcc 7248
ca81d7a0
JD
7249{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7250echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7251if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7252 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7253else
503d2be0 7254 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7255/* confdefs.h. */
7256_ACEOF
7257cat confdefs.h >>conftest.$ac_ext
7258cat >>conftest.$ac_ext <<_ACEOF
7259/* end confdefs.h. */
98418dba
CW
7260#ifdef TIME_WITH_SYS_TIME
7261#include <sys/time.h>
7262#include <time.h>
7263#else
7264#ifdef HAVE_SYS_TIME_H
7265#include <sys/time.h>
7266#else
1113b624 7267#include <time.h>
98418dba
CW
7268#endif
7269#endif
7270#ifdef HAVE_UTIME_H
7271#include <utime.h>
7272#endif
503d2be0
AS
7273int
7274main ()
7275{
98418dba 7276static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7277 ;
7278 return 0;
7279}
7280_ACEOF
98418dba 7281rm -f conftest.$ac_objext
ca81d7a0
JD
7282if { (ac_try="$ac_compile"
7283case "(($ac_try" in
7284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7285 *) ac_try_echo=$ac_try;;
7286esac
7287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7288 (eval "$ac_compile") 2>conftest.er1
503d2be0 7289 ac_status=$?
edfaf76d
LK
7290 grep -v '^ *+' conftest.er1 >conftest.err
7291 rm -f conftest.er1
7292 cat conftest.err >&5
c0d27fcc 7293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7294 (exit $ac_status); } && {
7295 test -z "$ac_c_werror_flag" ||
7296 test ! -s conftest.err
7297 } && test -s conftest.$ac_objext; then
98418dba 7298 emacs_cv_struct_utimbuf=yes
1113b624 7299else
503d2be0 7300 echo "$as_me: failed program was:" >&5
19650fd6
AS
7301sed 's/^/| /' conftest.$ac_ext >&5
7302
ca81d7a0 7303 emacs_cv_struct_utimbuf=no
1113b624 7304fi
ca81d7a0
JD
7305
7306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7307fi
ca81d7a0
JD
7308{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7309echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7310if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7311
c0d27fcc 7312cat >>confdefs.h <<\_ACEOF
98418dba 7313#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7314_ACEOF
1113b624
PE
7315
7316fi
ba4481b5 7317
ca81d7a0
JD
7318{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7319echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7320if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7321 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7322else
98418dba 7323 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7324/* confdefs.h. */
7325_ACEOF
7326cat confdefs.h >>conftest.$ac_ext
7327cat >>conftest.$ac_ext <<_ACEOF
7328/* end confdefs.h. */
7397acc4 7329#include <sys/types.h>
98418dba 7330#include <signal.h>
98418dba 7331
503d2be0
AS
7332int
7333main ()
7334{
ca81d7a0 7335return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7336 ;
7337 return 0;
7338}
7339_ACEOF
98418dba 7340rm -f conftest.$ac_objext
ca81d7a0
JD
7341if { (ac_try="$ac_compile"
7342case "(($ac_try" in
7343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7344 *) ac_try_echo=$ac_try;;
7345esac
7346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7347 (eval "$ac_compile") 2>conftest.er1
503d2be0 7348 ac_status=$?
edfaf76d
LK
7349 grep -v '^ *+' conftest.er1 >conftest.err
7350 rm -f conftest.er1
7351 cat conftest.err >&5
c0d27fcc 7352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7353 (exit $ac_status); } && {
7354 test -z "$ac_c_werror_flag" ||
7355 test ! -s conftest.err
7356 } && test -s conftest.$ac_objext; then
ca81d7a0 7357 ac_cv_type_signal=int
503d2be0
AS
7358else
7359 echo "$as_me: failed program was:" >&5
19650fd6
AS
7360sed 's/^/| /' conftest.$ac_ext >&5
7361
ca81d7a0 7362 ac_cv_type_signal=void
503d2be0 7363fi
ca81d7a0
JD
7364
7365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7366fi
ca81d7a0
JD
7367{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7368echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7369
c0d27fcc 7370cat >>confdefs.h <<_ACEOF
98418dba 7371#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7372_ACEOF
7373
503d2be0 7374
c0d27fcc 7375
ca81d7a0
JD
7376{ echo "$as_me:$LINENO: checking for speed_t" >&5
7377echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7378if test "${emacs_cv_speed_t+set}" = set; then
7379 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7380else
98418dba 7381 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7382/* confdefs.h. */
7383_ACEOF
7384cat confdefs.h >>conftest.$ac_ext
7385cat >>conftest.$ac_ext <<_ACEOF
7386/* end confdefs.h. */
98418dba 7387#include <termios.h>
98418dba
CW
7388int
7389main ()
7390{
7391speed_t x = 1;
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396rm -f conftest.$ac_objext
ca81d7a0
JD
7397if { (ac_try="$ac_compile"
7398case "(($ac_try" in
7399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7400 *) ac_try_echo=$ac_try;;
7401esac
7402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7403 (eval "$ac_compile") 2>conftest.er1
98418dba 7404 ac_status=$?
edfaf76d
LK
7405 grep -v '^ *+' conftest.er1 >conftest.err
7406 rm -f conftest.er1
7407 cat conftest.err >&5
c0d27fcc 7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7409 (exit $ac_status); } && {
7410 test -z "$ac_c_werror_flag" ||
7411 test ! -s conftest.err
7412 } && test -s conftest.$ac_objext; then
98418dba
CW
7413 emacs_cv_speed_t=yes
7414else
7415 echo "$as_me: failed program was:" >&5
19650fd6
AS
7416sed 's/^/| /' conftest.$ac_ext >&5
7417
ca81d7a0 7418 emacs_cv_speed_t=no
98418dba 7419fi
ca81d7a0
JD
7420
7421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7422fi
ca81d7a0
JD
7423{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7424echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7425if test $emacs_cv_speed_t = yes; then
b936fae4 7426
c0d27fcc 7427cat >>confdefs.h <<\_ACEOF
98418dba 7428#define HAVE_SPEED_T 1
c0d27fcc 7429_ACEOF
98418dba 7430
7397acc4
DL
7431fi
7432
ca81d7a0
JD
7433{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7434echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7435if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7436 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7437else
503d2be0 7438 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7439/* confdefs.h. */
7440_ACEOF
7441cat confdefs.h >>conftest.$ac_ext
7442cat >>conftest.$ac_ext <<_ACEOF
7443/* end confdefs.h. */
98418dba
CW
7444#ifdef TIME_WITH_SYS_TIME
7445#include <sys/time.h>
7446#include <time.h>
7447#else
7448#ifdef HAVE_SYS_TIME_H
7449#include <sys/time.h>
7450#else
7451#include <time.h>
7452#endif
7453#endif
503d2be0
AS
7454int
7455main ()
7456{
98418dba 7457static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7458 ;
7459 return 0;
7460}
7461_ACEOF
7462rm -f conftest.$ac_objext
ca81d7a0
JD
7463if { (ac_try="$ac_compile"
7464case "(($ac_try" in
7465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7466 *) ac_try_echo=$ac_try;;
7467esac
7468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7469 (eval "$ac_compile") 2>conftest.er1
503d2be0 7470 ac_status=$?
edfaf76d
LK
7471 grep -v '^ *+' conftest.er1 >conftest.err
7472 rm -f conftest.er1
7473 cat conftest.err >&5
c0d27fcc 7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7475 (exit $ac_status); } && {
7476 test -z "$ac_c_werror_flag" ||
7477 test ! -s conftest.err
7478 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7479 emacs_cv_struct_timeval=yes
7480else
503d2be0 7481 echo "$as_me: failed program was:" >&5
19650fd6
AS
7482sed 's/^/| /' conftest.$ac_ext >&5
7483
ca81d7a0 7484 emacs_cv_struct_timeval=no
7397acc4 7485fi
ca81d7a0
JD
7486
7487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7488fi
ca81d7a0
JD
7489{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7490echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7491HAVE_TIMEVAL=$emacs_cv_struct_timeval
7492if test $emacs_cv_struct_timeval = yes; then
b936fae4 7493
c0d27fcc 7494cat >>confdefs.h <<\_ACEOF
98418dba 7495#define HAVE_TIMEVAL 1
c0d27fcc 7496_ACEOF
7397acc4
DL
7497
7498fi
7499
ca81d7a0
JD
7500{ echo "$as_me:$LINENO: checking for struct exception" >&5
7501echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7502if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7503 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7504else
503d2be0 7505 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7506/* confdefs.h. */
7507_ACEOF
7508cat confdefs.h >>conftest.$ac_ext
7509cat >>conftest.$ac_ext <<_ACEOF
7510/* end confdefs.h. */
98418dba 7511#include <math.h>
503d2be0
AS
7512int
7513main ()
7514{
98418dba 7515static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7516 ;
7517 return 0;
ba4481b5 7518}
503d2be0
AS
7519_ACEOF
7520rm -f conftest.$ac_objext
ca81d7a0
JD
7521if { (ac_try="$ac_compile"
7522case "(($ac_try" in
7523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7524 *) ac_try_echo=$ac_try;;
7525esac
7526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7527 (eval "$ac_compile") 2>conftest.er1
503d2be0 7528 ac_status=$?
edfaf76d
LK
7529 grep -v '^ *+' conftest.er1 >conftest.err
7530 rm -f conftest.er1
7531 cat conftest.err >&5
c0d27fcc 7532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7533 (exit $ac_status); } && {
7534 test -z "$ac_c_werror_flag" ||
7535 test ! -s conftest.err
7536 } && test -s conftest.$ac_objext; then
98418dba 7537 emacs_cv_struct_exception=yes
ba4481b5 7538else
503d2be0 7539 echo "$as_me: failed program was:" >&5
19650fd6
AS
7540sed 's/^/| /' conftest.$ac_ext >&5
7541
ca81d7a0 7542 emacs_cv_struct_exception=no
ba4481b5 7543fi
ca81d7a0
JD
7544
7545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7546fi
ca81d7a0
JD
7547{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7548echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7549HAVE_EXCEPTION=$emacs_cv_struct_exception
7550if test $emacs_cv_struct_exception != yes; then
b936fae4 7551
c0d27fcc 7552cat >>confdefs.h <<\_ACEOF
98418dba 7553#define NO_MATHERR 1
c0d27fcc 7554_ACEOF
ba4481b5
DL
7555
7556fi
7557
7862d3a8
AS
7558
7559for ac_header in sys/socket.h
7560do
7561as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7562if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7563 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7564echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7565if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7566 echo $ECHO_N "(cached) $ECHO_C" >&6
7567fi
ca81d7a0
JD
7568ac_res=`eval echo '${'$as_ac_Header'}'`
7569 { echo "$as_me:$LINENO: result: $ac_res" >&5
7570echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7571else
7572 # Is the header compilable?
ca81d7a0
JD
7573{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7574echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7575cat >conftest.$ac_ext <<_ACEOF
7576/* confdefs.h. */
7577_ACEOF
7578cat confdefs.h >>conftest.$ac_ext
7579cat >>conftest.$ac_ext <<_ACEOF
7580/* end confdefs.h. */
7581$ac_includes_default
7582#include <$ac_header>
7583_ACEOF
7584rm -f conftest.$ac_objext
ca81d7a0
JD
7585if { (ac_try="$ac_compile"
7586case "(($ac_try" in
7587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7588 *) ac_try_echo=$ac_try;;
7589esac
7590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7591 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7592 ac_status=$?
edfaf76d
LK
7593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
7862d3a8 7596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7597 (exit $ac_status); } && {
7598 test -z "$ac_c_werror_flag" ||
7599 test ! -s conftest.err
7600 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7601 ac_header_compiler=yes
7602else
7603 echo "$as_me: failed program was:" >&5
7604sed 's/^/| /' conftest.$ac_ext >&5
7605
ca81d7a0 7606 ac_header_compiler=no
7862d3a8 7607fi
ca81d7a0
JD
7608
7609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7610{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7611echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7612
7613# Is the header present?
ca81d7a0
JD
7614{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7615echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7616cat >conftest.$ac_ext <<_ACEOF
7617/* confdefs.h. */
7618_ACEOF
7619cat confdefs.h >>conftest.$ac_ext
7620cat >>conftest.$ac_ext <<_ACEOF
7621/* end confdefs.h. */
7622#include <$ac_header>
7623_ACEOF
ca81d7a0
JD
7624if { (ac_try="$ac_cpp conftest.$ac_ext"
7625case "(($ac_try" in
7626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7627 *) ac_try_echo=$ac_try;;
7628esac
7629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7630 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7631 ac_status=$?
7632 grep -v '^ *+' conftest.er1 >conftest.err
7633 rm -f conftest.er1
7634 cat conftest.err >&5
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7636 (exit $ac_status); } >/dev/null && {
7637 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7638 test ! -s conftest.err
7639 }; then
7862d3a8
AS
7640 ac_header_preproc=yes
7641else
7642 echo "$as_me: failed program was:" >&5
7643sed 's/^/| /' conftest.$ac_ext >&5
7644
7645 ac_header_preproc=no
7646fi
ca81d7a0 7647
7862d3a8 7648rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7649{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7650echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7651
7652# So? What about this header?
edfaf76d
LK
7653case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7654 yes:no: )
7862d3a8
AS
7655 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7656echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7657 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7658echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7659 ac_header_preproc=yes
7862d3a8 7660 ;;
edfaf76d 7661 no:yes:* )
7862d3a8
AS
7662 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7663echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7664 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7665echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7666 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7667echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7668 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7669echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7670 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7671echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7672 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7673echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7674
7862d3a8
AS
7675 ;;
7676esac
ca81d7a0
JD
7677{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7678echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7679if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7680 echo $ECHO_N "(cached) $ECHO_C" >&6
7681else
edfaf76d 7682 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7683fi
ca81d7a0
JD
7684ac_res=`eval echo '${'$as_ac_Header'}'`
7685 { echo "$as_me:$LINENO: result: $ac_res" >&5
7686echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7687
7688fi
7689if test `eval echo '${'$as_ac_Header'}'` = yes; then
7690 cat >>confdefs.h <<_ACEOF
7691#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7692_ACEOF
7693
7694fi
7695
7696done
7697
7698
7699for ac_header in net/if.h
7700do
7701as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7702{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7703echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7704if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7705 echo $ECHO_N "(cached) $ECHO_C" >&6
7706else
7707 cat >conftest.$ac_ext <<_ACEOF
7708/* confdefs.h. */
7709_ACEOF
7710cat confdefs.h >>conftest.$ac_ext
7711cat >>conftest.$ac_ext <<_ACEOF
7712/* end confdefs.h. */
7713$ac_includes_default
7714#if HAVE_SYS_SOCKET_H
7715#include <sys/socket.h>
7716#endif
7717
7718#include <$ac_header>
7719_ACEOF
7720rm -f conftest.$ac_objext
ca81d7a0
JD
7721if { (ac_try="$ac_compile"
7722case "(($ac_try" in
7723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7724 *) ac_try_echo=$ac_try;;
7725esac
7726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7727 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7728 ac_status=$?
edfaf76d
LK
7729 grep -v '^ *+' conftest.er1 >conftest.err
7730 rm -f conftest.er1
7731 cat conftest.err >&5
7862d3a8 7732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7733 (exit $ac_status); } && {
7734 test -z "$ac_c_werror_flag" ||
7735 test ! -s conftest.err
7736 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7737 eval "$as_ac_Header=yes"
7738else
7739 echo "$as_me: failed program was:" >&5
7740sed 's/^/| /' conftest.$ac_ext >&5
7741
ca81d7a0 7742 eval "$as_ac_Header=no"
7862d3a8 7743fi
ca81d7a0
JD
7744
7745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7746fi
ca81d7a0
JD
7747ac_res=`eval echo '${'$as_ac_Header'}'`
7748 { echo "$as_me:$LINENO: result: $ac_res" >&5
7749echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7750if test `eval echo '${'$as_ac_Header'}'` = yes; then
7751 cat >>confdefs.h <<_ACEOF
7752#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7753_ACEOF
7754
7755fi
7756
7757done
7758
7759
ca81d7a0
JD
7760{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7761echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7762if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7763 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7764else
503d2be0 7765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7766/* confdefs.h. */
7767_ACEOF
7768cat confdefs.h >>conftest.$ac_ext
7769cat >>conftest.$ac_ext <<_ACEOF
7770/* end confdefs.h. */
98418dba
CW
7771#include <sys/types.h>
7772#include <time.h>
7397acc4 7773
503d2be0
AS
7774int
7775main ()
7776{
f053c89f
CY
7777struct tm tm;
7778 int *p = &tm.tm_sec;
7779 return !p;
503d2be0
AS
7780 ;
7781 return 0;
7782}
7783_ACEOF
7784rm -f conftest.$ac_objext
ca81d7a0
JD
7785if { (ac_try="$ac_compile"
7786case "(($ac_try" in
7787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7788 *) ac_try_echo=$ac_try;;
7789esac
7790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7791 (eval "$ac_compile") 2>conftest.er1
503d2be0 7792 ac_status=$?
edfaf76d
LK
7793 grep -v '^ *+' conftest.er1 >conftest.err
7794 rm -f conftest.er1
7795 cat conftest.err >&5
c0d27fcc 7796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7797 (exit $ac_status); } && {
7798 test -z "$ac_c_werror_flag" ||
7799 test ! -s conftest.err
7800 } && test -s conftest.$ac_objext; then
35996d22
AS
7801 ac_cv_struct_tm=time.h
7802else
503d2be0 7803 echo "$as_me: failed program was:" >&5
19650fd6
AS
7804sed 's/^/| /' conftest.$ac_ext >&5
7805
ca81d7a0 7806 ac_cv_struct_tm=sys/time.h
7397acc4 7807fi
ca81d7a0
JD
7808
7809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7810fi
ca81d7a0
JD
7811{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7812echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7813if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7814
c0d27fcc 7815cat >>confdefs.h <<\_ACEOF
98418dba 7816#define TM_IN_SYS_TIME 1
c0d27fcc 7817_ACEOF
7397acc4
DL
7818
7819fi
ba4481b5 7820
ca81d7a0
JD
7821{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7822echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7823if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7824 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7825else
98418dba 7826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7827/* confdefs.h. */
7828_ACEOF
7829cat confdefs.h >>conftest.$ac_ext
7830cat >>conftest.$ac_ext <<_ACEOF
7831/* end confdefs.h. */
98418dba
CW
7832#include <sys/types.h>
7833#include <$ac_cv_struct_tm>
ba4481b5 7834
c0d27fcc 7835
98418dba
CW
7836int
7837main ()
7838{
7839static struct tm ac_aggr;
7840if (ac_aggr.tm_zone)
7841return 0;
7842 ;
7843 return 0;
7844}
7845_ACEOF
7846rm -f conftest.$ac_objext
ca81d7a0
JD
7847if { (ac_try="$ac_compile"
7848case "(($ac_try" in
7849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7850 *) ac_try_echo=$ac_try;;
7851esac
7852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7853 (eval "$ac_compile") 2>conftest.er1
98418dba 7854 ac_status=$?
edfaf76d
LK
7855 grep -v '^ *+' conftest.er1 >conftest.err
7856 rm -f conftest.er1
7857 cat conftest.err >&5
c0d27fcc 7858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7859 (exit $ac_status); } && {
7860 test -z "$ac_c_werror_flag" ||
7861 test ! -s conftest.err
7862 } && test -s conftest.$ac_objext; then
98418dba 7863 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7864else
98418dba 7865 echo "$as_me: failed program was:" >&5
19650fd6
AS
7866sed 's/^/| /' conftest.$ac_ext >&5
7867
ca81d7a0 7868 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7869/* confdefs.h. */
7870_ACEOF
7871cat confdefs.h >>conftest.$ac_ext
7872cat >>conftest.$ac_ext <<_ACEOF
7873/* end confdefs.h. */
6bae0ccf
DL
7874#include <sys/types.h>
7875#include <$ac_cv_struct_tm>
7876
7877
7878int
7879main ()
7880{
7881static struct tm ac_aggr;
7882if (sizeof ac_aggr.tm_zone)
7883return 0;
7884 ;
7885 return 0;
7886}
7887_ACEOF
7888rm -f conftest.$ac_objext
ca81d7a0
JD
7889if { (ac_try="$ac_compile"
7890case "(($ac_try" in
7891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7892 *) ac_try_echo=$ac_try;;
7893esac
7894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7895 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7896 ac_status=$?
edfaf76d
LK
7897 grep -v '^ *+' conftest.er1 >conftest.err
7898 rm -f conftest.er1
7899 cat conftest.err >&5
6bae0ccf 7900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7901 (exit $ac_status); } && {
7902 test -z "$ac_c_werror_flag" ||
7903 test ! -s conftest.err
7904 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7905 ac_cv_member_struct_tm_tm_zone=yes
7906else
7907 echo "$as_me: failed program was:" >&5
19650fd6
AS
7908sed 's/^/| /' conftest.$ac_ext >&5
7909
ca81d7a0 7910 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7911fi
ca81d7a0
JD
7912
7913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7914fi
ca81d7a0
JD
7915
7916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7917fi
ca81d7a0
JD
7918{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7919echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7920if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7921
c0d27fcc 7922cat >>confdefs.h <<_ACEOF
98418dba 7923#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7924_ACEOF
7925
ba4481b5 7926
98418dba 7927fi
ba4481b5 7928
98418dba 7929if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7930
c0d27fcc 7931cat >>confdefs.h <<\_ACEOF
98418dba 7932#define HAVE_TM_ZONE 1
c0d27fcc 7933_ACEOF
ba4481b5 7934
ba4481b5 7935else
ca81d7a0
JD
7936 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7937echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7938if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7939 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7940else
98418dba 7941 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7942/* confdefs.h. */
7943_ACEOF
7944cat confdefs.h >>conftest.$ac_ext
7945cat >>conftest.$ac_ext <<_ACEOF
7946/* end confdefs.h. */
98418dba 7947#include <time.h>
98418dba 7948
98418dba
CW
7949int
7950main ()
7951{
ca81d7a0 7952#ifndef tzname
f053c89f 7953 (void) tzname;
ca81d7a0
JD
7954#endif
7955
6bae0ccf
DL
7956 ;
7957 return 0;
7958}
7959_ACEOF
7960rm -f conftest.$ac_objext
ca81d7a0
JD
7961if { (ac_try="$ac_compile"
7962case "(($ac_try" in
7963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7964 *) ac_try_echo=$ac_try;;
7965esac
7966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7967 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7968 ac_status=$?
edfaf76d
LK
7969 grep -v '^ *+' conftest.er1 >conftest.err
7970 rm -f conftest.er1
7971 cat conftest.err >&5
6bae0ccf 7972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7973 (exit $ac_status); } && {
7974 test -z "$ac_c_werror_flag" ||
7975 test ! -s conftest.err
7976 } && test -s conftest.$ac_objext; then
ca81d7a0 7977 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7978else
7979 echo "$as_me: failed program was:" >&5
19650fd6
AS
7980sed 's/^/| /' conftest.$ac_ext >&5
7981
ca81d7a0 7982 ac_cv_have_decl_tzname=no
ba4481b5 7983fi
ca81d7a0
JD
7984
7985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7986fi
ca81d7a0
JD
7987{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7988echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7989if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7990
c0d27fcc 7991cat >>confdefs.h <<_ACEOF
ca81d7a0 7992#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7993_ACEOF
7994
ba4481b5 7995
ca81d7a0
JD
7996else
7997 cat >>confdefs.h <<_ACEOF
7998#define HAVE_DECL_TZNAME 0
7999_ACEOF
ba4481b5 8000
ba4481b5 8001
98418dba 8002fi
ba4481b5 8003
ca81d7a0
JD
8004
8005 { echo "$as_me:$LINENO: checking for tzname" >&5
8006echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 8007if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 8008 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8009else
98418dba 8010 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
98418dba 8016#include <time.h>
ca81d7a0
JD
8017#if !HAVE_DECL_TZNAME
8018extern char *tzname[];
98418dba
CW
8019#endif
8020
98418dba
CW
8021int
8022main ()
8023{
ca81d7a0 8024return tzname[0][0];
98418dba
CW
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
8030if { (ac_try="$ac_link"
8031case "(($ac_try" in
8032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8033 *) ac_try_echo=$ac_try;;
8034esac
8035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8036 (eval "$ac_link") 2>conftest.er1
98418dba 8037 ac_status=$?
edfaf76d
LK
8038 grep -v '^ *+' conftest.er1 >conftest.err
8039 rm -f conftest.er1
8040 cat conftest.err >&5
c0d27fcc 8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8042 (exit $ac_status); } && {
8043 test -z "$ac_c_werror_flag" ||
8044 test ! -s conftest.err
8045 } && test -s conftest$ac_exeext &&
8046 $as_test_x conftest$ac_exeext; then
98418dba
CW
8047 ac_cv_var_tzname=yes
8048else
8049 echo "$as_me: failed program was:" >&5
19650fd6
AS
8050sed 's/^/| /' conftest.$ac_ext >&5
8051
ca81d7a0 8052 ac_cv_var_tzname=no
ba4481b5 8053fi
6bae0ccf 8054
f053c89f 8055rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8056 conftest$ac_exeext conftest.$ac_ext
98418dba 8057fi
ca81d7a0
JD
8058{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8059echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 8060 if test $ac_cv_var_tzname = yes; then
ba4481b5 8061
c0d27fcc 8062cat >>confdefs.h <<\_ACEOF
98418dba 8063#define HAVE_TZNAME 1
c0d27fcc 8064_ACEOF
503d2be0 8065
98418dba
CW
8066 fi
8067fi
503d2be0 8068
ca81d7a0
JD
8069{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8070echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 8071if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
8072 echo $ECHO_N "(cached) $ECHO_C" >&6
8073else
8074 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8075/* confdefs.h. */
8076_ACEOF
8077cat confdefs.h >>conftest.$ac_ext
8078cat >>conftest.$ac_ext <<_ACEOF
8079/* end confdefs.h. */
98418dba 8080#include <time.h>
b936fae4 8081
98418dba
CW
8082int
8083main ()
8084{
b936fae4
AS
8085static struct tm ac_aggr;
8086if (ac_aggr.tm_gmtoff)
8087return 0;
98418dba
CW
8088 ;
8089 return 0;
8090}
8091_ACEOF
b936fae4 8092rm -f conftest.$ac_objext
ca81d7a0
JD
8093if { (ac_try="$ac_compile"
8094case "(($ac_try" in
8095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8096 *) ac_try_echo=$ac_try;;
8097esac
8098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8099 (eval "$ac_compile") 2>conftest.er1
98418dba 8100 ac_status=$?
edfaf76d
LK
8101 grep -v '^ *+' conftest.er1 >conftest.err
8102 rm -f conftest.er1
8103 cat conftest.err >&5
c0d27fcc 8104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8105 (exit $ac_status); } && {
8106 test -z "$ac_c_werror_flag" ||
8107 test ! -s conftest.err
8108 } && test -s conftest.$ac_objext; then
b936fae4 8109 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
8110else
8111 echo "$as_me: failed program was:" >&5
19650fd6
AS
8112sed 's/^/| /' conftest.$ac_ext >&5
8113
ca81d7a0 8114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8115/* confdefs.h. */
8116_ACEOF
8117cat confdefs.h >>conftest.$ac_ext
8118cat >>conftest.$ac_ext <<_ACEOF
8119/* end confdefs.h. */
6bae0ccf
DL
8120#include <time.h>
8121
8799b3e4
CW
8122int
8123main ()
8124{
6bae0ccf
DL
8125static struct tm ac_aggr;
8126if (sizeof ac_aggr.tm_gmtoff)
8127return 0;
8799b3e4
CW
8128 ;
8129 return 0;
8130}
8131_ACEOF
6bae0ccf 8132rm -f conftest.$ac_objext
ca81d7a0
JD
8133if { (ac_try="$ac_compile"
8134case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
8138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8139 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8140 ac_status=$?
edfaf76d
LK
8141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
c0d27fcc 8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8145 (exit $ac_status); } && {
8146 test -z "$ac_c_werror_flag" ||
8147 test ! -s conftest.err
8148 } && test -s conftest.$ac_objext; then
6bae0ccf 8149 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8150else
8151 echo "$as_me: failed program was:" >&5
19650fd6
AS
8152sed 's/^/| /' conftest.$ac_ext >&5
8153
ca81d7a0 8154 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8155fi
ca81d7a0
JD
8156
8157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8158fi
ca81d7a0
JD
8159
8160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8161fi
ca81d7a0
JD
8162{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8163echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8164if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8165
8166cat >>confdefs.h <<\_ACEOF
8167#define HAVE_TM_GMTOFF 1
8168_ACEOF
8169
8170fi
8171
ca81d7a0
JD
8172{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8173echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8174if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8175 echo $ECHO_N "(cached) $ECHO_C" >&6
8176else
8177 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8178/* confdefs.h. */
8179_ACEOF
8180cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */
7862d3a8
AS
8183$ac_includes_default
8184#if HAVE_SYS_SOCKET_H
8185#include <sys/socket.h>
8186#endif
8187#if HAVE_NET_IF_H
96f3a036 8188#include <net/if.h>
7862d3a8 8189#endif
96f3a036
DL
8190
8191int
8192main ()
8193{
8194static struct ifreq ac_aggr;
8195if (ac_aggr.ifr_flags)
8196return 0;
8197 ;
8198 return 0;
8199}
8200_ACEOF
8201rm -f conftest.$ac_objext
ca81d7a0
JD
8202if { (ac_try="$ac_compile"
8203case "(($ac_try" in
8204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8205 *) ac_try_echo=$ac_try;;
8206esac
8207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8208 (eval "$ac_compile") 2>conftest.er1
96f3a036 8209 ac_status=$?
edfaf76d
LK
8210 grep -v '^ *+' conftest.er1 >conftest.err
8211 rm -f conftest.er1
8212 cat conftest.err >&5
96f3a036 8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8214 (exit $ac_status); } && {
8215 test -z "$ac_c_werror_flag" ||
8216 test ! -s conftest.err
8217 } && test -s conftest.$ac_objext; then
96f3a036
DL
8218 ac_cv_member_struct_ifreq_ifr_flags=yes
8219else
8220 echo "$as_me: failed program was:" >&5
8221sed 's/^/| /' conftest.$ac_ext >&5
8222
ca81d7a0 8223 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
7862d3a8
AS
8229$ac_includes_default
8230#if HAVE_SYS_SOCKET_H
8231#include <sys/socket.h>
8232#endif
8233#if HAVE_NET_IF_H
96f3a036 8234#include <net/if.h>
7862d3a8 8235#endif
96f3a036
DL
8236
8237int
8238main ()
8239{
8240static struct ifreq ac_aggr;
8241if (sizeof ac_aggr.ifr_flags)
8242return 0;
8243 ;
8244 return 0;
8245}
8246_ACEOF
8247rm -f conftest.$ac_objext
ca81d7a0
JD
8248if { (ac_try="$ac_compile"
8249case "(($ac_try" in
8250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8251 *) ac_try_echo=$ac_try;;
8252esac
8253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8254 (eval "$ac_compile") 2>conftest.er1
96f3a036 8255 ac_status=$?
edfaf76d
LK
8256 grep -v '^ *+' conftest.er1 >conftest.err
8257 rm -f conftest.er1
8258 cat conftest.err >&5
96f3a036 8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8260 (exit $ac_status); } && {
8261 test -z "$ac_c_werror_flag" ||
8262 test ! -s conftest.err
8263 } && test -s conftest.$ac_objext; then
96f3a036
DL
8264 ac_cv_member_struct_ifreq_ifr_flags=yes
8265else
8266 echo "$as_me: failed program was:" >&5
8267sed 's/^/| /' conftest.$ac_ext >&5
8268
ca81d7a0 8269 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8270fi
ca81d7a0
JD
8271
8272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8273fi
ca81d7a0
JD
8274
8275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8276fi
ca81d7a0
JD
8277{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8278echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8279if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8280
8281cat >>confdefs.h <<_ACEOF
8282#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8283_ACEOF
8284
8285
8286fi
ca81d7a0
JD
8287{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8288echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8289if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8290 echo $ECHO_N "(cached) $ECHO_C" >&6
8291else
8292 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8293/* confdefs.h. */
8294_ACEOF
8295cat confdefs.h >>conftest.$ac_ext
8296cat >>conftest.$ac_ext <<_ACEOF
8297/* end confdefs.h. */
7862d3a8
AS
8298$ac_includes_default
8299#if HAVE_SYS_SOCKET_H
8300#include <sys/socket.h>
8301#endif
8302#if HAVE_NET_IF_H
96f3a036 8303#include <net/if.h>
7862d3a8 8304#endif
96f3a036
DL
8305
8306int
8307main ()
8308{
8309static struct ifreq ac_aggr;
8310if (ac_aggr.ifr_hwaddr)
8311return 0;
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext
ca81d7a0
JD
8317if { (ac_try="$ac_compile"
8318case "(($ac_try" in
8319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8320 *) ac_try_echo=$ac_try;;
8321esac
8322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8323 (eval "$ac_compile") 2>conftest.er1
96f3a036 8324 ac_status=$?
edfaf76d
LK
8325 grep -v '^ *+' conftest.er1 >conftest.err
8326 rm -f conftest.er1
8327 cat conftest.err >&5
96f3a036 8328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8329 (exit $ac_status); } && {
8330 test -z "$ac_c_werror_flag" ||
8331 test ! -s conftest.err
8332 } && test -s conftest.$ac_objext; then
96f3a036
DL
8333 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8334else
8335 echo "$as_me: failed program was:" >&5
8336sed 's/^/| /' conftest.$ac_ext >&5
8337
ca81d7a0 8338 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8339/* confdefs.h. */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h. */
7862d3a8
AS
8344$ac_includes_default
8345#if HAVE_SYS_SOCKET_H
8346#include <sys/socket.h>
8347#endif
8348#if HAVE_NET_IF_H
96f3a036 8349#include <net/if.h>
7862d3a8 8350#endif
96f3a036
DL
8351
8352int
8353main ()
8354{
8355static struct ifreq ac_aggr;
8356if (sizeof ac_aggr.ifr_hwaddr)
8357return 0;
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
ca81d7a0
JD
8363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_compile") 2>conftest.er1
96f3a036 8370 ac_status=$?
edfaf76d
LK
8371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
96f3a036 8374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
96f3a036
DL
8379 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8380else
8381 echo "$as_me: failed program was:" >&5
8382sed 's/^/| /' conftest.$ac_ext >&5
8383
ca81d7a0 8384 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8385fi
ca81d7a0
JD
8386
8387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8388fi
ca81d7a0
JD
8389
8390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8391fi
ca81d7a0
JD
8392{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8393echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8394if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8395
8396cat >>confdefs.h <<_ACEOF
8397#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8398_ACEOF
8399
8400
8401fi
ca81d7a0
JD
8402{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8403echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8404if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8405 echo $ECHO_N "(cached) $ECHO_C" >&6
8406else
8407 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8408/* confdefs.h. */
8409_ACEOF
8410cat confdefs.h >>conftest.$ac_ext
8411cat >>conftest.$ac_ext <<_ACEOF
8412/* end confdefs.h. */
7862d3a8
AS
8413$ac_includes_default
8414#if HAVE_SYS_SOCKET_H
8415#include <sys/socket.h>
8416#endif
8417#if HAVE_NET_IF_H
96f3a036 8418#include <net/if.h>
7862d3a8 8419#endif
96f3a036
DL
8420
8421int
8422main ()
8423{
8424static struct ifreq ac_aggr;
8425if (ac_aggr.ifr_netmask)
8426return 0;
8427 ;
8428 return 0;
8429}
8430_ACEOF
8431rm -f conftest.$ac_objext
ca81d7a0
JD
8432if { (ac_try="$ac_compile"
8433case "(($ac_try" in
8434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8435 *) ac_try_echo=$ac_try;;
8436esac
8437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8438 (eval "$ac_compile") 2>conftest.er1
96f3a036 8439 ac_status=$?
edfaf76d
LK
8440 grep -v '^ *+' conftest.er1 >conftest.err
8441 rm -f conftest.er1
8442 cat conftest.err >&5
96f3a036 8443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8444 (exit $ac_status); } && {
8445 test -z "$ac_c_werror_flag" ||
8446 test ! -s conftest.err
8447 } && test -s conftest.$ac_objext; then
96f3a036
DL
8448 ac_cv_member_struct_ifreq_ifr_netmask=yes
8449else
8450 echo "$as_me: failed program was:" >&5
8451sed 's/^/| /' conftest.$ac_ext >&5
8452
ca81d7a0 8453 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
7862d3a8
AS
8459$ac_includes_default
8460#if HAVE_SYS_SOCKET_H
8461#include <sys/socket.h>
8462#endif
8463#if HAVE_NET_IF_H
96f3a036 8464#include <net/if.h>
7862d3a8 8465#endif
96f3a036
DL
8466
8467int
8468main ()
8469{
8470static struct ifreq ac_aggr;
8471if (sizeof ac_aggr.ifr_netmask)
8472return 0;
8473 ;
8474 return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext
ca81d7a0
JD
8478if { (ac_try="$ac_compile"
8479case "(($ac_try" in
8480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8481 *) ac_try_echo=$ac_try;;
8482esac
8483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8484 (eval "$ac_compile") 2>conftest.er1
96f3a036 8485 ac_status=$?
edfaf76d
LK
8486 grep -v '^ *+' conftest.er1 >conftest.err
8487 rm -f conftest.er1
8488 cat conftest.err >&5
96f3a036 8489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8490 (exit $ac_status); } && {
8491 test -z "$ac_c_werror_flag" ||
8492 test ! -s conftest.err
8493 } && test -s conftest.$ac_objext; then
96f3a036
DL
8494 ac_cv_member_struct_ifreq_ifr_netmask=yes
8495else
8496 echo "$as_me: failed program was:" >&5
8497sed 's/^/| /' conftest.$ac_ext >&5
8498
ca81d7a0 8499 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8500fi
ca81d7a0
JD
8501
8502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8503fi
ca81d7a0
JD
8504
8505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8506fi
ca81d7a0
JD
8507{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8508echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8509if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8510
8511cat >>confdefs.h <<_ACEOF
8512#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8513_ACEOF
8514
8515
8516fi
ca81d7a0
JD
8517{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8518echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8519if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8520 echo $ECHO_N "(cached) $ECHO_C" >&6
8521else
8522 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8523/* confdefs.h. */
8524_ACEOF
8525cat confdefs.h >>conftest.$ac_ext
8526cat >>conftest.$ac_ext <<_ACEOF
8527/* end confdefs.h. */
7862d3a8
AS
8528$ac_includes_default
8529#if HAVE_SYS_SOCKET_H
8530#include <sys/socket.h>
8531#endif
8532#if HAVE_NET_IF_H
96f3a036 8533#include <net/if.h>
7862d3a8 8534#endif
96f3a036
DL
8535
8536int
8537main ()
8538{
8539static struct ifreq ac_aggr;
8540if (ac_aggr.ifr_broadaddr)
8541return 0;
8542 ;
8543 return 0;
8544}
8545_ACEOF
8546rm -f conftest.$ac_objext
ca81d7a0
JD
8547if { (ac_try="$ac_compile"
8548case "(($ac_try" in
8549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8550 *) ac_try_echo=$ac_try;;
8551esac
8552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8553 (eval "$ac_compile") 2>conftest.er1
96f3a036 8554 ac_status=$?
edfaf76d
LK
8555 grep -v '^ *+' conftest.er1 >conftest.err
8556 rm -f conftest.er1
8557 cat conftest.err >&5
96f3a036 8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8559 (exit $ac_status); } && {
8560 test -z "$ac_c_werror_flag" ||
8561 test ! -s conftest.err
8562 } && test -s conftest.$ac_objext; then
96f3a036
DL
8563 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8564else
8565 echo "$as_me: failed program was:" >&5
8566sed 's/^/| /' conftest.$ac_ext >&5
8567
ca81d7a0 8568 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8569/* confdefs.h. */
8570_ACEOF
8571cat confdefs.h >>conftest.$ac_ext
8572cat >>conftest.$ac_ext <<_ACEOF
8573/* end confdefs.h. */
7862d3a8
AS
8574$ac_includes_default
8575#if HAVE_SYS_SOCKET_H
8576#include <sys/socket.h>
8577#endif
8578#if HAVE_NET_IF_H
96f3a036 8579#include <net/if.h>
7862d3a8 8580#endif
96f3a036
DL
8581
8582int
8583main ()
8584{
8585static struct ifreq ac_aggr;
8586if (sizeof ac_aggr.ifr_broadaddr)
8587return 0;
8588 ;
8589 return 0;
8590}
8591_ACEOF
8592rm -f conftest.$ac_objext
ca81d7a0
JD
8593if { (ac_try="$ac_compile"
8594case "(($ac_try" in
8595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8596 *) ac_try_echo=$ac_try;;
8597esac
8598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8599 (eval "$ac_compile") 2>conftest.er1
96f3a036 8600 ac_status=$?
edfaf76d
LK
8601 grep -v '^ *+' conftest.er1 >conftest.err
8602 rm -f conftest.er1
8603 cat conftest.err >&5
96f3a036 8604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8605 (exit $ac_status); } && {
8606 test -z "$ac_c_werror_flag" ||
8607 test ! -s conftest.err
8608 } && test -s conftest.$ac_objext; then
96f3a036
DL
8609 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8610else
8611 echo "$as_me: failed program was:" >&5
8612sed 's/^/| /' conftest.$ac_ext >&5
8613
ca81d7a0 8614 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8615fi
ca81d7a0
JD
8616
8617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8618fi
ca81d7a0
JD
8619
8620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8621fi
ca81d7a0
JD
8622{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8623echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8624if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8625
8626cat >>confdefs.h <<_ACEOF
8627#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8628_ACEOF
8629
8630
8631fi
ca81d7a0
JD
8632{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8633echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8634if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8635 echo $ECHO_N "(cached) $ECHO_C" >&6
8636else
8637 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8638/* confdefs.h. */
8639_ACEOF
8640cat confdefs.h >>conftest.$ac_ext
8641cat >>conftest.$ac_ext <<_ACEOF
8642/* end confdefs.h. */
7862d3a8
AS
8643$ac_includes_default
8644#if HAVE_SYS_SOCKET_H
8645#include <sys/socket.h>
8646#endif
8647#if HAVE_NET_IF_H
96f3a036 8648#include <net/if.h>
7862d3a8 8649#endif
96f3a036
DL
8650
8651int
8652main ()
8653{
8654static struct ifreq ac_aggr;
8655if (ac_aggr.ifr_addr)
8656return 0;
8657 ;
8658 return 0;
8659}
8660_ACEOF
8661rm -f conftest.$ac_objext
ca81d7a0
JD
8662if { (ac_try="$ac_compile"
8663case "(($ac_try" in
8664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8665 *) ac_try_echo=$ac_try;;
8666esac
8667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8668 (eval "$ac_compile") 2>conftest.er1
96f3a036 8669 ac_status=$?
edfaf76d
LK
8670 grep -v '^ *+' conftest.er1 >conftest.err
8671 rm -f conftest.er1
8672 cat conftest.err >&5
96f3a036 8673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8674 (exit $ac_status); } && {
8675 test -z "$ac_c_werror_flag" ||
8676 test ! -s conftest.err
8677 } && test -s conftest.$ac_objext; then
96f3a036
DL
8678 ac_cv_member_struct_ifreq_ifr_addr=yes
8679else
8680 echo "$as_me: failed program was:" >&5
8681sed 's/^/| /' conftest.$ac_ext >&5
8682
ca81d7a0 8683 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8684/* confdefs.h. */
8685_ACEOF
8686cat confdefs.h >>conftest.$ac_ext
8687cat >>conftest.$ac_ext <<_ACEOF
8688/* end confdefs.h. */
7862d3a8
AS
8689$ac_includes_default
8690#if HAVE_SYS_SOCKET_H
8691#include <sys/socket.h>
8692#endif
8693#if HAVE_NET_IF_H
96f3a036 8694#include <net/if.h>
7862d3a8 8695#endif
96f3a036
DL
8696
8697int
8698main ()
8699{
8700static struct ifreq ac_aggr;
8701if (sizeof ac_aggr.ifr_addr)
8702return 0;
8703 ;
8704 return 0;
8705}
8706_ACEOF
8707rm -f conftest.$ac_objext
ca81d7a0
JD
8708if { (ac_try="$ac_compile"
8709case "(($ac_try" in
8710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8711 *) ac_try_echo=$ac_try;;
8712esac
8713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8714 (eval "$ac_compile") 2>conftest.er1
96f3a036 8715 ac_status=$?
edfaf76d
LK
8716 grep -v '^ *+' conftest.er1 >conftest.err
8717 rm -f conftest.er1
8718 cat conftest.err >&5
96f3a036 8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8720 (exit $ac_status); } && {
8721 test -z "$ac_c_werror_flag" ||
8722 test ! -s conftest.err
8723 } && test -s conftest.$ac_objext; then
96f3a036
DL
8724 ac_cv_member_struct_ifreq_ifr_addr=yes
8725else
8726 echo "$as_me: failed program was:" >&5
8727sed 's/^/| /' conftest.$ac_ext >&5
8728
ca81d7a0 8729 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8730fi
ca81d7a0
JD
8731
8732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8733fi
ca81d7a0
JD
8734
8735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8736fi
ca81d7a0
JD
8737{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8738echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8739if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8740
8741cat >>confdefs.h <<_ACEOF
8742#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8743_ACEOF
8744
8745
8746fi
8747
8799b3e4 8748
8799b3e4 8749
ca81d7a0
JD
8750{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8751echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8752if test "$ac_cv_prog_cc_c89" != no; then
8753 { echo "$as_me:$LINENO: result: yes" >&5
8754echo "${ECHO_T}yes" >&6; }
98418dba 8755
c0d27fcc 8756cat >>confdefs.h <<\_ACEOF
98418dba 8757#define PROTOTYPES 1
c0d27fcc
MR
8758_ACEOF
8759
8760
8761cat >>confdefs.h <<\_ACEOF
8762#define __PROTOTYPES 1
8763_ACEOF
98418dba
CW
8764
8765else
ca81d7a0
JD
8766 { echo "$as_me:$LINENO: result: no" >&5
8767echo "${ECHO_T}no" >&6; }
98418dba
CW
8768fi
8769
ca81d7a0
JD
8770{ echo "$as_me:$LINENO: checking for working volatile" >&5
8771echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8772if test "${ac_cv_c_volatile+set}" = set; then
8773 echo $ECHO_N "(cached) $ECHO_C" >&6
8774else
8775 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8776/* confdefs.h. */
8777_ACEOF
8778cat confdefs.h >>conftest.$ac_ext
8779cat >>conftest.$ac_ext <<_ACEOF
8780/* end confdefs.h. */
98418dba 8781
98418dba
CW
8782int
8783main ()
8784{
8785
8786volatile int x;
ca81d7a0
JD
8787int * volatile y = (int *) 0;
8788return !x && !y;
98418dba
CW
8789 ;
8790 return 0;
8791}
8792_ACEOF
8793rm -f conftest.$ac_objext
ca81d7a0
JD
8794if { (ac_try="$ac_compile"
8795case "(($ac_try" in
8796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8797 *) ac_try_echo=$ac_try;;
8798esac
8799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8800 (eval "$ac_compile") 2>conftest.er1
98418dba 8801 ac_status=$?
edfaf76d
LK
8802 grep -v '^ *+' conftest.er1 >conftest.err
8803 rm -f conftest.er1
8804 cat conftest.err >&5
c0d27fcc 8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8806 (exit $ac_status); } && {
8807 test -z "$ac_c_werror_flag" ||
8808 test ! -s conftest.err
8809 } && test -s conftest.$ac_objext; then
98418dba
CW
8810 ac_cv_c_volatile=yes
8811else
8812 echo "$as_me: failed program was:" >&5
19650fd6
AS
8813sed 's/^/| /' conftest.$ac_ext >&5
8814
ca81d7a0 8815 ac_cv_c_volatile=no
98418dba 8816fi
ca81d7a0
JD
8817
8818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8819fi
ca81d7a0
JD
8820{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8821echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8822if test $ac_cv_c_volatile = no; then
8823
c0d27fcc 8824cat >>confdefs.h <<\_ACEOF
98418dba 8825#define volatile
c0d27fcc 8826_ACEOF
98418dba
CW
8827
8828fi
8829
ca81d7a0
JD
8830{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8831echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8832if test "${ac_cv_c_const+set}" = set; then
8833 echo $ECHO_N "(cached) $ECHO_C" >&6
8834else
8835 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8836/* confdefs.h. */
8837_ACEOF
8838cat confdefs.h >>conftest.$ac_ext
8839cat >>conftest.$ac_ext <<_ACEOF
8840/* end confdefs.h. */
98418dba 8841
98418dba
CW
8842int
8843main ()
8844{
8845/* FIXME: Include the comments suggested by Paul. */
8846#ifndef __cplusplus
8847 /* Ultrix mips cc rejects this. */
8848 typedef int charset[2];
f053c89f 8849 const charset cs;
98418dba 8850 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8851 char const *const *pcpcc;
8852 char **ppc;
98418dba
CW
8853 /* NEC SVR4.0.2 mips cc rejects this. */
8854 struct point {int x, y;};
8855 static struct point const zero = {0,0};
8856 /* AIX XL C 1.02.0.0 rejects this.
8857 It does not let you subtract one const X* pointer from another in
8858 an arm of an if-expression whose if-part is not a constant
8859 expression */
8860 const char *g = "string";
f053c89f 8861 pcpcc = &g + (g ? g-g : 0);
98418dba 8862 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8863 ++pcpcc;
8864 ppc = (char**) pcpcc;
8865 pcpcc = (char const *const *) ppc;
98418dba
CW
8866 { /* SCO 3.2v4 cc rejects this. */
8867 char *t;
8868 char const *s = 0 ? (char *) 0 : (char const *) 0;
8869
8870 *t++ = 0;
ca81d7a0 8871 if (s) return 0;
98418dba
CW
8872 }
8873 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8874 int x[] = {25, 17};
8875 const int *foo = &x[0];
8876 ++foo;
8877 }
8878 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8879 typedef const int *iptr;
8880 iptr p = 0;
8881 ++p;
8882 }
8883 { /* AIX XL C 1.02.0.0 rejects this saying
8884 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8885 struct s { int j; const int *ap[3]; };
8886 struct s *b; b->j = 5;
8887 }
8888 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8889 const int foo = 10;
ca81d7a0 8890 if (!foo) return 0;
98418dba 8891 }
f053c89f 8892 return !cs[0] && !zero.x;
98418dba
CW
8893#endif
8894
8895 ;
8896 return 0;
8897}
8898_ACEOF
8899rm -f conftest.$ac_objext
ca81d7a0
JD
8900if { (ac_try="$ac_compile"
8901case "(($ac_try" in
8902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8903 *) ac_try_echo=$ac_try;;
8904esac
8905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8906 (eval "$ac_compile") 2>conftest.er1
98418dba 8907 ac_status=$?
edfaf76d
LK
8908 grep -v '^ *+' conftest.er1 >conftest.err
8909 rm -f conftest.er1
8910 cat conftest.err >&5
c0d27fcc 8911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8912 (exit $ac_status); } && {
8913 test -z "$ac_c_werror_flag" ||
8914 test ! -s conftest.err
8915 } && test -s conftest.$ac_objext; then
98418dba
CW
8916 ac_cv_c_const=yes
8917else
8918 echo "$as_me: failed program was:" >&5
19650fd6
AS
8919sed 's/^/| /' conftest.$ac_ext >&5
8920
ca81d7a0 8921 ac_cv_c_const=no
98418dba 8922fi
ca81d7a0
JD
8923
8924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8925fi
ca81d7a0
JD
8926{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8927echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8928if test $ac_cv_c_const = no; then
8929
c0d27fcc 8930cat >>confdefs.h <<\_ACEOF
98418dba 8931#define const
c0d27fcc 8932_ACEOF
98418dba
CW
8933
8934fi
8935
ca81d7a0
JD
8936{ echo "$as_me:$LINENO: checking for void * support" >&5
8937echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8938if test "${emacs_cv_void_star+set}" = set; then
8939 echo $ECHO_N "(cached) $ECHO_C" >&6
8940else
8941 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8942/* confdefs.h. */
8943_ACEOF
8944cat confdefs.h >>conftest.$ac_ext
8945cat >>conftest.$ac_ext <<_ACEOF
8946/* end confdefs.h. */
98418dba 8947
98418dba
CW
8948int
8949main ()
8950{
8951void * foo;
8952 ;
8953 return 0;
8954}
8955_ACEOF
8956rm -f conftest.$ac_objext
ca81d7a0
JD
8957if { (ac_try="$ac_compile"
8958case "(($ac_try" in
8959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8960 *) ac_try_echo=$ac_try;;
8961esac
8962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8963 (eval "$ac_compile") 2>conftest.er1
98418dba 8964 ac_status=$?
edfaf76d
LK
8965 grep -v '^ *+' conftest.er1 >conftest.err
8966 rm -f conftest.er1
8967 cat conftest.err >&5
c0d27fcc 8968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8969 (exit $ac_status); } && {
8970 test -z "$ac_c_werror_flag" ||
8971 test ! -s conftest.err
8972 } && test -s conftest.$ac_objext; then
98418dba
CW
8973 emacs_cv_void_star=yes
8974else
8975 echo "$as_me: failed program was:" >&5
19650fd6
AS
8976sed 's/^/| /' conftest.$ac_ext >&5
8977
ca81d7a0 8978 emacs_cv_void_star=no
98418dba 8979fi
ca81d7a0
JD
8980
8981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8982fi
ca81d7a0
JD
8983{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8984echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8985if test $emacs_cv_void_star = yes; then
c0d27fcc 8986 cat >>confdefs.h <<\_ACEOF
98418dba 8987#define POINTER_TYPE void
c0d27fcc 8988_ACEOF
98418dba
CW
8989
8990else
c0d27fcc 8991 cat >>confdefs.h <<\_ACEOF
98418dba 8992#define POINTER_TYPE char
c0d27fcc 8993_ACEOF
98418dba
CW
8994
8995fi
8996
c0d27fcc 8997
4494a266
JD
8998
8999
cd958eb3 9000
ca81d7a0
JD
9001{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9002echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9003set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9004if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9005 echo $ECHO_N "(cached) $ECHO_C" >&6
9006else
c0d27fcc 9007 cat >conftest.make <<\_ACEOF
ca81d7a0 9008SHELL = /bin/sh
98418dba 9009all:
ca81d7a0 9010 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9011_ACEOF
98418dba 9012# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9013case `${MAKE-make} -f conftest.make 2>/dev/null` in
9014 *@@@%%%=?*=@@@%%%*)
9015 eval ac_cv_prog_make_${ac_make}_set=yes;;
9016 *)
9017 eval ac_cv_prog_make_${ac_make}_set=no;;
9018esac
98418dba
CW
9019rm -f conftest.make
9020fi
ca81d7a0
JD
9021if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9022 { echo "$as_me:$LINENO: result: yes" >&5
9023echo "${ECHO_T}yes" >&6; }
98418dba
CW
9024 SET_MAKE=
9025else
ca81d7a0
JD
9026 { echo "$as_me:$LINENO: result: no" >&5
9027echo "${ECHO_T}no" >&6; }
98418dba
CW
9028 SET_MAKE="MAKE=${MAKE-make}"
9029fi
9030
c0d27fcc 9031
ca81d7a0
JD
9032{ echo "$as_me:$LINENO: checking for long file names" >&5
9033echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9034if test "${ac_cv_sys_long_file_names+set}" = set; then
9035 echo $ECHO_N "(cached) $ECHO_C" >&6
9036else
9037 ac_cv_sys_long_file_names=yes
9038# Test for long file names in all the places we know might matter:
9039# . the current directory, where building will happen
9040# $prefix/lib where we will be installing things
9041# $exec_prefix/lib likewise
98418dba 9042# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9043# /tmp where it might want to write temporary files
9044# /var/tmp likewise
9045# /usr/tmp likewise
ca81d7a0
JD
9046for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9047 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9048 # in the usual case where exec_prefix is '${prefix}'.
9049 case $ac_dir in #(
9050 . | /* | ?:[\\/]*) ;; #(
9051 *) continue;;
9052 esac
9053 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9054 ac_xdir=$ac_dir/cf$$
ca81d7a0 9055 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9056 ac_tf1=$ac_xdir/conftest9012345
9057 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9058 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9059 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9060 rm -f -r "$ac_xdir" 2>/dev/null
9061 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9062done
9063fi
ca81d7a0
JD
9064{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9065echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9066if test $ac_cv_sys_long_file_names = yes; then
9067
c0d27fcc 9068cat >>confdefs.h <<\_ACEOF
98418dba 9069#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9070_ACEOF
98418dba
CW
9071
9072fi
9073
c0d27fcc 9074
98418dba
CW
9075#### Choose a window system.
9076
ca81d7a0
JD
9077{ echo "$as_me:$LINENO: checking for X" >&5
9078echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9079
c0d27fcc 9080
ca81d7a0 9081# Check whether --with-x was given.
98418dba 9082if test "${with_x+set}" = set; then
ca81d7a0
JD
9083 withval=$with_x;
9084fi
98418dba 9085
98418dba
CW
9086# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9087if test "x$with_x" = xno; then
9088 # The user explicitly disabled X.
9089 have_x=disabled
9090else
ca81d7a0
JD
9091 case $x_includes,$x_libraries in #(
9092 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9093echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9094 { (exit 1); exit 1; }; };; #(
9095 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9096 echo $ECHO_N "(cached) $ECHO_C" >&6
9097else
9098 # One or both of the vars are not set, and there is no cached value.
9099ac_x_includes=no ac_x_libraries=no
ca81d7a0 9100rm -f -r conftest.dir
98418dba
CW
9101if mkdir conftest.dir; then
9102 cd conftest.dir
c0d27fcc 9103 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9104incroot:
9105 @echo incroot='${INCROOT}'
9106usrlibdir:
9107 @echo usrlibdir='${USRLIBDIR}'
9108libdir:
9109 @echo libdir='${LIBDIR}'
9110_ACEOF
9111 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9112 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9113 for ac_var in incroot usrlibdir libdir; do
9114 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9115 done
98418dba
CW
9116 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9117 for ac_extension in a so sl; do
ca81d7a0
JD
9118 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9119 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9120 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9121 fi
9122 done
9123 # Screen out bogus values from the imake configuration. They are
9124 # bogus both because they are the default anyway, and because
9125 # using them would break gcc on systems where it needs fixed includes.
9126 case $ac_im_incroot in
ca81d7a0 9127 /usr/include) ac_x_includes= ;;
98418dba
CW
9128 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9129 esac
9130 case $ac_im_usrlibdir in
9131 /usr/lib | /lib) ;;
9132 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9133 esac
9134 fi
9135 cd ..
ca81d7a0 9136 rm -f -r conftest.dir
98418dba
CW
9137fi
9138
9139# Standard set of common directories for X headers.
9140# Check X11 before X11Rn because it is often a symlink to the current release.
9141ac_x_header_dirs='
9142/usr/X11/include
9143/usr/X11R6/include
9144/usr/X11R5/include
9145/usr/X11R4/include
9146
9147/usr/include/X11
9148/usr/include/X11R6
9149/usr/include/X11R5
9150/usr/include/X11R4
9151
9152/usr/local/X11/include
9153/usr/local/X11R6/include
9154/usr/local/X11R5/include
9155/usr/local/X11R4/include
9156
9157/usr/local/include/X11
9158/usr/local/include/X11R6
9159/usr/local/include/X11R5
9160/usr/local/include/X11R4
9161
9162/usr/X386/include
9163/usr/x386/include
9164/usr/XFree86/include/X11
9165
9166/usr/include
9167/usr/local/include
9168/usr/unsupported/include
9169/usr/athena/include
9170/usr/local/x11r5/include
9171/usr/lpp/Xamples/include
9172
9173/usr/openwin/include
9174/usr/openwin/share/include'
9175
9176if test "$ac_x_includes" = no; then
ca81d7a0 9177 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9178 # First, try using that file with no special directory specified.
9179 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9180/* confdefs.h. */
9181_ACEOF
9182cat confdefs.h >>conftest.$ac_ext
9183cat >>conftest.$ac_ext <<_ACEOF
9184/* end confdefs.h. */
ca81d7a0 9185#include <X11/Xlib.h>
98418dba 9186_ACEOF
ca81d7a0
JD
9187if { (ac_try="$ac_cpp conftest.$ac_ext"
9188case "(($ac_try" in
9189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9190 *) ac_try_echo=$ac_try;;
9191esac
9192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9193 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9194 ac_status=$?
6bae0ccf 9195 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9196 rm -f conftest.er1
9197 cat conftest.err >&5
c0d27fcc 9198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9199 (exit $ac_status); } >/dev/null && {
9200 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9201 test ! -s conftest.err
9202 }; then
98418dba
CW
9203 # We can compile using X headers with no special include directory.
9204ac_x_includes=
9205else
9206 echo "$as_me: failed program was:" >&5
19650fd6
AS
9207sed 's/^/| /' conftest.$ac_ext >&5
9208
98418dba 9209 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9210 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9211 ac_x_includes=$ac_dir
9212 break
9213 fi
9214done
9215fi
ca81d7a0 9216
98418dba
CW
9217rm -f conftest.err conftest.$ac_ext
9218fi # $ac_x_includes = no
9219
9220if test "$ac_x_libraries" = no; then
9221 # Check for the libraries.
9222 # See if we find them without any special options.
9223 # Don't add to $LIBS permanently.
9224 ac_save_LIBS=$LIBS
f053c89f 9225 LIBS="-lX11 $LIBS"
98418dba 9226 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9227/* confdefs.h. */
9228_ACEOF
9229cat confdefs.h >>conftest.$ac_ext
9230cat >>conftest.$ac_ext <<_ACEOF
9231/* end confdefs.h. */
ca81d7a0 9232#include <X11/Xlib.h>
98418dba
CW
9233int
9234main ()
9235{
ca81d7a0 9236XrmInitialize ()
98418dba
CW
9237 ;
9238 return 0;
9239}
9240_ACEOF
9241rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9242if { (ac_try="$ac_link"
9243case "(($ac_try" in
9244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9245 *) ac_try_echo=$ac_try;;
9246esac
9247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9248 (eval "$ac_link") 2>conftest.er1
98418dba 9249 ac_status=$?
edfaf76d
LK
9250 grep -v '^ *+' conftest.er1 >conftest.err
9251 rm -f conftest.er1
9252 cat conftest.err >&5
c0d27fcc 9253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9254 (exit $ac_status); } && {
9255 test -z "$ac_c_werror_flag" ||
9256 test ! -s conftest.err
9257 } && test -s conftest$ac_exeext &&
9258 $as_test_x conftest$ac_exeext; then
98418dba
CW
9259 LIBS=$ac_save_LIBS
9260# We can link X programs with no special library path.
9261ac_x_libraries=
9262else
9263 echo "$as_me: failed program was:" >&5
19650fd6
AS
9264sed 's/^/| /' conftest.$ac_ext >&5
9265
ca81d7a0 9266 LIBS=$ac_save_LIBS
98418dba
CW
9267for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9268do
9269 # Don't even attempt the hair of trying to link an X program!
9270 for ac_extension in a so sl; do
f053c89f 9271 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9272 ac_x_libraries=$ac_dir
9273 break 2
9274 fi
9275 done
9276done
9277fi
ca81d7a0 9278
f053c89f 9279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9280 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9281fi # $ac_x_libraries = no
9282
ca81d7a0
JD
9283case $ac_x_includes,$ac_x_libraries in #(
9284 no,* | *,no | *\'*)
9285 # Didn't find X, or a directory has "'" in its name.
9286 ac_cv_have_x="have_x=no";; #(
9287 *)
9288 # Record where we found X for the cache.
9289 ac_cv_have_x="have_x=yes\
9290 ac_x_includes='$ac_x_includes'\
9291 ac_x_libraries='$ac_x_libraries'"
9292esac
98418dba 9293fi
ca81d7a0
JD
9294;; #(
9295 *) have_x=yes;;
9296 esac
98418dba
CW
9297 eval "$ac_cv_have_x"
9298fi # $with_x != no
9299
9300if test "$have_x" != yes; then
ca81d7a0
JD
9301 { echo "$as_me:$LINENO: result: $have_x" >&5
9302echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9303 no_x=yes
9304else
9305 # If each of the values was on the command line, it overrides each guess.
9306 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9307 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9308 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9309 ac_cv_have_x="have_x=yes\
9310 ac_x_includes='$x_includes'\
9311 ac_x_libraries='$x_libraries'"
9312 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9313echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9314fi
9315
9316if test "$no_x" = yes; then
9317 window_system=none
9318else
9319 window_system=x11
9320fi
9321
a8cd2496
GM
9322## Workaround for bug in autoconf <= 2.62.
9323## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9324## No need to do anything special for these standard directories.
921fbdf0 9325## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9326if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9327
9328 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9329
9330fi
9331
92d1ccf4
AS
9332if test "${x_libraries}" != NONE; then
9333 if test -n "${x_libraries}"; then
9334 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9335 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9336 fi
98418dba 9337 x_default_search_path=""
92d1ccf4
AS
9338 x_search_path=${x_libraries}
9339 if test -z "${x_search_path}"; then
9340 x_search_path=/usr/lib
9341 fi
9342 for x_library in `echo ${x_search_path}: | \
9343 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9344 x_search_path="\
9345${x_library}/X11/%L/%T/%N%C%S:\
9346${x_library}/X11/%l/%T/%N%C%S:\
9347${x_library}/X11/%T/%N%C%S:\
9348${x_library}/X11/%L/%T/%N%S:\
9349${x_library}/X11/%l/%T/%N%S:\
9350${x_library}/X11/%T/%N%S"
9351 if test x"${x_default_search_path}" = x; then
9352 x_default_search_path=${x_search_path}
9353 else
9354 x_default_search_path="${x_search_path}:${x_default_search_path}"
9355 fi
9356 done
9357fi
9358if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9359 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9360fi
9361
9362if test x"${x_includes}" = x; then
9363 bitmapdir=/usr/include/X11/bitmaps
9364else
9365 # accumulate include directories that have X11 bitmap subdirectories
9366 bmd_acc="dummyval"
9367 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9368 if test -d "${bmd}/X11/bitmaps"; then
9369 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9370 fi
9371 if test -d "${bmd}/bitmaps"; then
9372 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9373 fi
9374 done
9375 if test ${bmd_acc} != "dummyval"; then
9376 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9377 fi
9378fi
9379
5d6da11e 9380HAVE_CARBON=no
1d4d5604
YM
9381if test "${with_carbon}" != no; then
9382 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9383 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9384echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9385if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9386 echo $ECHO_N "(cached) $ECHO_C" >&6
9387fi
ca81d7a0
JD
9388{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9389echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9390else
9391 # Is the header compilable?
ca81d7a0
JD
9392{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9393echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9394cat >conftest.$ac_ext <<_ACEOF
9395/* confdefs.h. */
9396_ACEOF
9397cat confdefs.h >>conftest.$ac_ext
9398cat >>conftest.$ac_ext <<_ACEOF
9399/* end confdefs.h. */
9400$ac_includes_default
9401#include <Carbon/Carbon.h>
9402_ACEOF
9403rm -f conftest.$ac_objext
ca81d7a0
JD
9404if { (ac_try="$ac_compile"
9405case "(($ac_try" in
9406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9407 *) ac_try_echo=$ac_try;;
9408esac
9409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9410 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9411 ac_status=$?
edfaf76d
LK
9412 grep -v '^ *+' conftest.er1 >conftest.err
9413 rm -f conftest.er1
9414 cat conftest.err >&5
5d6da11e 9415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9416 (exit $ac_status); } && {
9417 test -z "$ac_c_werror_flag" ||
9418 test ! -s conftest.err
9419 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9420 ac_header_compiler=yes
9421else
9422 echo "$as_me: failed program was:" >&5
9423sed 's/^/| /' conftest.$ac_ext >&5
9424
ca81d7a0 9425 ac_header_compiler=no
5d6da11e 9426fi
ca81d7a0
JD
9427
9428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9429{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9430echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9431
9432# Is the header present?
ca81d7a0
JD
9433{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9434echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9435cat >conftest.$ac_ext <<_ACEOF
9436/* confdefs.h. */
9437_ACEOF
9438cat confdefs.h >>conftest.$ac_ext
9439cat >>conftest.$ac_ext <<_ACEOF
9440/* end confdefs.h. */
9441#include <Carbon/Carbon.h>
9442_ACEOF
ca81d7a0
JD
9443if { (ac_try="$ac_cpp conftest.$ac_ext"
9444case "(($ac_try" in
9445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9446 *) ac_try_echo=$ac_try;;
9447esac
9448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9449 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9450 ac_status=$?
9451 grep -v '^ *+' conftest.er1 >conftest.err
9452 rm -f conftest.er1
9453 cat conftest.err >&5
9454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9455 (exit $ac_status); } >/dev/null && {
9456 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9457 test ! -s conftest.err
9458 }; then
5d6da11e
YM
9459 ac_header_preproc=yes
9460else
9461 echo "$as_me: failed program was:" >&5
9462sed 's/^/| /' conftest.$ac_ext >&5
9463
9464 ac_header_preproc=no
9465fi
ca81d7a0 9466
5d6da11e 9467rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9468{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9469echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9470
9471# So? What about this header?
edfaf76d
LK
9472case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9473 yes:no: )
5d6da11e
YM
9474 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9475echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9476 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9477echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9478 ac_header_preproc=yes
5d6da11e 9479 ;;
edfaf76d 9480 no:yes:* )
5d6da11e
YM
9481 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9482echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9483 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9484echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9485 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9486echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9487 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9488echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9489 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9490echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9491 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9492echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9493
5d6da11e
YM
9494 ;;
9495esac
ca81d7a0
JD
9496{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9497echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9498if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9499 echo $ECHO_N "(cached) $ECHO_C" >&6
9500else
9501 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9502fi
ca81d7a0
JD
9503{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9504echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9505
9506fi
9507if test $ac_cv_header_Carbon_Carbon_h = yes; then
9508 HAVE_CARBON=yes
9509fi
9510
9511
1d4d5604
YM
9512fi
9513if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9514 if test "${with_carbon+set}" != set \
9515 && test "${carbon_appdir_x+set}" != set; then
9d2818d6 9516 for var in with_x with_x_toolkit with_xim \
ec8fcb10
YM
9517 with_xpm with_jpeg with_tiff with_gif with_png; do
9518 if eval test \"\${$var+set}\" = set; then
9519 HAVE_CARBON=no
9520 break
9521 fi
9522 done
5d6da11e
YM
9523 fi
9524fi
1d4d5604
YM
9525if test "${HAVE_CARBON}" = yes; then
9526 window_system=mac
9527fi
9528
9529case "${window_system}" in
9530 x11 )
9531 HAVE_X_WINDOWS=yes
9532 HAVE_X11=yes
9533 case "${with_x_toolkit}" in
9534 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9535 motif ) USE_X_TOOLKIT=MOTIF ;;
9536 gtk ) with_gtk=yes
9537 USE_X_TOOLKIT=none ;;
9538 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9539 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9540 esac
9541 ;;
9542 mac | none )
9543 HAVE_X_WINDOWS=no
9544 HAVE_X11=no
9545 USE_X_TOOLKIT=none
9546 ;;
9547esac
9548
cfe440b8
JD
9549if test "$window_system" = none && test "X$with_x" != "Xno"; then
9550 # Extract the first word of "X", so it can be a program name with args.
9551set dummy X; ac_word=$2
9552{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9553echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9554if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9556else
9557 if test -n "$HAVE_XSERVER"; then
9558 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9559else
9560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9561for as_dir in $PATH
9562do
9563 IFS=$as_save_IFS
9564 test -z "$as_dir" && as_dir=.
9565 for ac_exec_ext in '' $ac_executable_extensions; do
9566 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9567 ac_cv_prog_HAVE_XSERVER="true"
9568 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9569 break 2
9570 fi
9571done
9572done
9573IFS=$as_save_IFS
9574
9575 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9576fi
9577fi
9578HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9579if test -n "$HAVE_XSERVER"; then
9580 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9581echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9582else
9583 { echo "$as_me:$LINENO: result: no" >&5
9584echo "${ECHO_T}no" >&6; }
9585fi
9586
9587
9588 if test "$HAVE_XSERVER" = true ||
9589 test -n "$DISPLAY" ||
9590 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9591 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9592were found. You should install the relevant development files for X
9593and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9594sure you have development files for image handling, i.e.
9595tiff, gif, jpeg, png and xpm.
9596If you are sure you want Emacs compiled without X window support, pass
9597 --without-x
9598to configure." >&5
9599echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9600were found. You should install the relevant development files for X
9601and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9602sure you have development files for image handling, i.e.
9603tiff, gif, jpeg, png and xpm.
9604If you are sure you want Emacs compiled without X window support, pass
9605 --without-x
9606to configure." >&2;}
9607 { (exit 1); exit 1; }; }
9608 fi
9609fi
9610
1d4d5604
YM
9611### If we're using X11, we should use the X menu package.
9612HAVE_MENUS=no
9613case ${HAVE_X11} in
9614 yes ) HAVE_MENUS=yes ;;
9615esac
9616
98418dba
CW
9617### Compute the unexec source name from the object name.
9618UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9619
9620# Do the opsystem or machine files prohibit the use of the GNU malloc?
9621# Assume not, until told otherwise.
9622GNU_MALLOC=yes
9623doug_lea_malloc=yes
ca81d7a0
JD
9624{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9625echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9626if test "${ac_cv_func_malloc_get_state+set}" = set; then
9627 echo $ECHO_N "(cached) $ECHO_C" >&6
9628else
9629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9630/* confdefs.h. */
9631_ACEOF
9632cat confdefs.h >>conftest.$ac_ext
9633cat >>conftest.$ac_ext <<_ACEOF
9634/* end confdefs.h. */
edfaf76d
LK
9635/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9636 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9637#define malloc_get_state innocuous_malloc_get_state
9638
98418dba 9639/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9640 which can conflict with char malloc_get_state (); below.
9641 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9642 <limits.h> exists even on freestanding compilers. */
edfaf76d 9643
19650fd6
AS
9644#ifdef __STDC__
9645# include <limits.h>
9646#else
9647# include <assert.h>
9648#endif
edfaf76d
LK
9649
9650#undef malloc_get_state
9651
ca81d7a0
JD
9652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
98418dba
CW
9655#ifdef __cplusplus
9656extern "C"
9657#endif
98418dba 9658char malloc_get_state ();
98418dba
CW
9659/* The GNU C library defines this for functions which it implements
9660 to always fail with ENOSYS. Some functions are actually named
9661 something starting with __ and the normal name is an alias. */
ca81d7a0 9662#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9663choke me
98418dba
CW
9664#endif
9665
19650fd6
AS
9666int
9667main ()
9668{
ca81d7a0 9669return malloc_get_state ();
98418dba
CW
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9675if { (ac_try="$ac_link"
9676case "(($ac_try" in
9677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9678 *) ac_try_echo=$ac_try;;
9679esac
9680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9681 (eval "$ac_link") 2>conftest.er1
98418dba 9682 ac_status=$?
edfaf76d
LK
9683 grep -v '^ *+' conftest.er1 >conftest.err
9684 rm -f conftest.er1
9685 cat conftest.err >&5
c0d27fcc 9686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9687 (exit $ac_status); } && {
9688 test -z "$ac_c_werror_flag" ||
9689 test ! -s conftest.err
9690 } && test -s conftest$ac_exeext &&
9691 $as_test_x conftest$ac_exeext; then
98418dba
CW
9692 ac_cv_func_malloc_get_state=yes
9693else
9694 echo "$as_me: failed program was:" >&5
19650fd6
AS
9695sed 's/^/| /' conftest.$ac_ext >&5
9696
ca81d7a0 9697 ac_cv_func_malloc_get_state=no
98418dba 9698fi
ca81d7a0 9699
f053c89f 9700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9701 conftest$ac_exeext conftest.$ac_ext
98418dba 9702fi
ca81d7a0
JD
9703{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9704echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9705if test $ac_cv_func_malloc_get_state = yes; then
9706 :
9707else
9708 doug_lea_malloc=no
9709fi
9710
ca81d7a0
JD
9711{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9712echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9713if test "${ac_cv_func_malloc_set_state+set}" = set; then
9714 echo $ECHO_N "(cached) $ECHO_C" >&6
9715else
9716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9717/* confdefs.h. */
9718_ACEOF
9719cat confdefs.h >>conftest.$ac_ext
9720cat >>conftest.$ac_ext <<_ACEOF
9721/* end confdefs.h. */
edfaf76d
LK
9722/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9723 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9724#define malloc_set_state innocuous_malloc_set_state
9725
98418dba 9726/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9727 which can conflict with char malloc_set_state (); below.
9728 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9729 <limits.h> exists even on freestanding compilers. */
edfaf76d 9730
19650fd6
AS
9731#ifdef __STDC__
9732# include <limits.h>
9733#else
9734# include <assert.h>
9735#endif
edfaf76d
LK
9736
9737#undef malloc_set_state
9738
ca81d7a0
JD
9739/* Override any GCC internal prototype to avoid an error.
9740 Use char because int might match the return type of a GCC
9741 builtin and then its argument prototype would still apply. */
98418dba
CW
9742#ifdef __cplusplus
9743extern "C"
9744#endif
98418dba 9745char malloc_set_state ();
98418dba
CW
9746/* The GNU C library defines this for functions which it implements
9747 to always fail with ENOSYS. Some functions are actually named
9748 something starting with __ and the normal name is an alias. */
ca81d7a0 9749#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9750choke me
98418dba
CW
9751#endif
9752
19650fd6
AS
9753int
9754main ()
9755{
ca81d7a0 9756return malloc_set_state ();
98418dba
CW
9757 ;
9758 return 0;
9759}
9760_ACEOF
9761rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9762if { (ac_try="$ac_link"
9763case "(($ac_try" in
9764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9765 *) ac_try_echo=$ac_try;;
9766esac
9767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9768 (eval "$ac_link") 2>conftest.er1
98418dba 9769 ac_status=$?
edfaf76d
LK
9770 grep -v '^ *+' conftest.er1 >conftest.err
9771 rm -f conftest.er1
9772 cat conftest.err >&5
c0d27fcc 9773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9774 (exit $ac_status); } && {
9775 test -z "$ac_c_werror_flag" ||
9776 test ! -s conftest.err
9777 } && test -s conftest$ac_exeext &&
9778 $as_test_x conftest$ac_exeext; then
98418dba
CW
9779 ac_cv_func_malloc_set_state=yes
9780else
9781 echo "$as_me: failed program was:" >&5
19650fd6
AS
9782sed 's/^/| /' conftest.$ac_ext >&5
9783
ca81d7a0 9784 ac_cv_func_malloc_set_state=no
98418dba 9785fi
ca81d7a0 9786
f053c89f 9787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9788 conftest$ac_exeext conftest.$ac_ext
98418dba 9789fi
ca81d7a0
JD
9790{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9791echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9792if test $ac_cv_func_malloc_set_state = yes; then
9793 :
9794else
9795 doug_lea_malloc=no
9796fi
9797
ca81d7a0
JD
9798{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9799echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9800if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9801 echo $ECHO_N "(cached) $ECHO_C" >&6
9802else
9803 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9804/* confdefs.h. */
9805_ACEOF
9806cat confdefs.h >>conftest.$ac_ext
9807cat >>conftest.$ac_ext <<_ACEOF
9808/* end confdefs.h. */
98418dba 9809extern void (* __after_morecore_hook)();
98418dba
CW
9810int
9811main ()
9812{
9813__after_morecore_hook = 0
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9819if { (ac_try="$ac_link"
9820case "(($ac_try" in
9821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9822 *) ac_try_echo=$ac_try;;
9823esac
9824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9825 (eval "$ac_link") 2>conftest.er1
98418dba 9826 ac_status=$?
edfaf76d
LK
9827 grep -v '^ *+' conftest.er1 >conftest.err
9828 rm -f conftest.er1
9829 cat conftest.err >&5
c0d27fcc 9830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9831 (exit $ac_status); } && {
9832 test -z "$ac_c_werror_flag" ||
9833 test ! -s conftest.err
9834 } && test -s conftest$ac_exeext &&
9835 $as_test_x conftest$ac_exeext; then
98418dba
CW
9836 emacs_cv_var___after_morecore_hook=yes
9837else
9838 echo "$as_me: failed program was:" >&5
19650fd6
AS
9839sed 's/^/| /' conftest.$ac_ext >&5
9840
ca81d7a0 9841 emacs_cv_var___after_morecore_hook=no
98418dba 9842fi
ca81d7a0 9843
f053c89f 9844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9845 conftest$ac_exeext conftest.$ac_ext
98418dba 9846fi
ca81d7a0
JD
9847{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9848echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9849if test $emacs_cv_var___after_morecore_hook = no; then
9850 doug_lea_malloc=no
9851fi
9852if test "${system_malloc}" = "yes"; then
9853 GNU_MALLOC=no
9854 GNU_MALLOC_reason="
9855 (The GNU allocators don't work with this system configuration.)"
9856fi
9857if test "$doug_lea_malloc" = "yes" ; then
9858 if test "$GNU_MALLOC" = yes ; then
9859 GNU_MALLOC_reason="
9860 (Using Doug Lea's new malloc from the GNU C Library.)"
9861 fi
b936fae4 9862
c0d27fcc 9863cat >>confdefs.h <<\_ACEOF
98418dba 9864#define DOUG_LEA_MALLOC 1
c0d27fcc 9865_ACEOF
98418dba
CW
9866
9867fi
9868
9869if test x"${REL_ALLOC}" = x; then
9870 REL_ALLOC=${GNU_MALLOC}
9871fi
9872
9873
c0d27fcc
MR
9874
9875
9876for ac_header in stdlib.h unistd.h
98418dba
CW
9877do
9878as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9879if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9880 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9881echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9882if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9883 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9884fi
ca81d7a0
JD
9885ac_res=`eval echo '${'$as_ac_Header'}'`
9886 { echo "$as_me:$LINENO: result: $ac_res" >&5
9887echo "${ECHO_T}$ac_res" >&6; }
98418dba 9888else
c0d27fcc 9889 # Is the header compilable?
ca81d7a0
JD
9890{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9891echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9892cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9893/* confdefs.h. */
9894_ACEOF
9895cat confdefs.h >>conftest.$ac_ext
9896cat >>conftest.$ac_ext <<_ACEOF
9897/* end confdefs.h. */
98418dba
CW
9898$ac_includes_default
9899#include <$ac_header>
9900_ACEOF
9901rm -f conftest.$ac_objext
ca81d7a0
JD
9902if { (ac_try="$ac_compile"
9903case "(($ac_try" in
9904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905 *) ac_try_echo=$ac_try;;
9906esac
9907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9908 (eval "$ac_compile") 2>conftest.er1
98418dba 9909 ac_status=$?
edfaf76d
LK
9910 grep -v '^ *+' conftest.er1 >conftest.err
9911 rm -f conftest.er1
9912 cat conftest.err >&5
c0d27fcc 9913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9914 (exit $ac_status); } && {
9915 test -z "$ac_c_werror_flag" ||
9916 test ! -s conftest.err
9917 } && test -s conftest.$ac_objext; then
c0d27fcc 9918 ac_header_compiler=yes
98418dba
CW
9919else
9920 echo "$as_me: failed program was:" >&5
19650fd6
AS
9921sed 's/^/| /' conftest.$ac_ext >&5
9922
ca81d7a0 9923 ac_header_compiler=no
98418dba 9924fi
ca81d7a0
JD
9925
9926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9928echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9929
c0d27fcc 9930# Is the header present?
ca81d7a0
JD
9931{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9932echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9933cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9934/* confdefs.h. */
9935_ACEOF
9936cat confdefs.h >>conftest.$ac_ext
9937cat >>conftest.$ac_ext <<_ACEOF
9938/* end confdefs.h. */
98418dba
CW
9939#include <$ac_header>
9940_ACEOF
ca81d7a0
JD
9941if { (ac_try="$ac_cpp conftest.$ac_ext"
9942case "(($ac_try" in
9943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9944 *) ac_try_echo=$ac_try;;
9945esac
9946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9947 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9948 ac_status=$?
6bae0ccf 9949 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9950 rm -f conftest.er1
9951 cat conftest.err >&5
c0d27fcc 9952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9953 (exit $ac_status); } >/dev/null && {
9954 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9955 test ! -s conftest.err
9956 }; then
c0d27fcc 9957 ac_header_preproc=yes
98418dba
CW
9958else
9959 echo "$as_me: failed program was:" >&5
19650fd6
AS
9960sed 's/^/| /' conftest.$ac_ext >&5
9961
c0d27fcc 9962 ac_header_preproc=no
98418dba 9963fi
ca81d7a0 9964
98418dba 9965rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9966{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9967echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9968
9969# So? What about this header?
edfaf76d
LK
9970case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9971 yes:no: )
c0d27fcc
MR
9972 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9973echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9974 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9975echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9976 ac_header_preproc=yes
9977 ;;
9978 no:yes:* )
9979 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9980echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9981 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9982echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9983 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9984echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9985 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9986echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9987 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9988echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9989 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9990echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9991
19650fd6 9992 ;;
c0d27fcc 9993esac
ca81d7a0
JD
9994{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9995echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9996if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9997 echo $ECHO_N "(cached) $ECHO_C" >&6
9998else
edfaf76d 9999 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10000fi
ca81d7a0
JD
10001ac_res=`eval echo '${'$as_ac_Header'}'`
10002 { echo "$as_me:$LINENO: result: $ac_res" >&5
10003echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10004
10005fi
98418dba 10006if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10007 cat >>confdefs.h <<_ACEOF
98418dba 10008#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10009_ACEOF
98418dba
CW
10010
10011fi
c0d27fcc 10012
98418dba
CW
10013done
10014
c0d27fcc 10015
98418dba
CW
10016for ac_func in getpagesize
10017do
10018as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10019{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10020echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10021if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10022 echo $ECHO_N "(cached) $ECHO_C" >&6
10023else
10024 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10025/* confdefs.h. */
10026_ACEOF
10027cat confdefs.h >>conftest.$ac_ext
10028cat >>conftest.$ac_ext <<_ACEOF
10029/* end confdefs.h. */
edfaf76d
LK
10030/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10032#define $ac_func innocuous_$ac_func
10033
98418dba 10034/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10035 which can conflict with char $ac_func (); below.
10036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10037 <limits.h> exists even on freestanding compilers. */
edfaf76d 10038
19650fd6
AS
10039#ifdef __STDC__
10040# include <limits.h>
10041#else
10042# include <assert.h>
10043#endif
edfaf76d
LK
10044
10045#undef $ac_func
10046
ca81d7a0
JD
10047/* Override any GCC internal prototype to avoid an error.
10048 Use char because int might match the return type of a GCC
10049 builtin and then its argument prototype would still apply. */
98418dba
CW
10050#ifdef __cplusplus
10051extern "C"
10052#endif
98418dba 10053char $ac_func ();
98418dba
CW
10054/* The GNU C library defines this for functions which it implements
10055 to always fail with ENOSYS. Some functions are actually named
10056 something starting with __ and the normal name is an alias. */
ca81d7a0 10057#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10058choke me
98418dba
CW
10059#endif
10060
19650fd6
AS
10061int
10062main ()
10063{
ca81d7a0 10064return $ac_func ();
98418dba
CW
10065 ;
10066 return 0;
10067}
10068_ACEOF
10069rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10070if { (ac_try="$ac_link"
10071case "(($ac_try" in
10072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10073 *) ac_try_echo=$ac_try;;
10074esac
10075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10076 (eval "$ac_link") 2>conftest.er1
98418dba 10077 ac_status=$?
edfaf76d
LK
10078 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
c0d27fcc 10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10082 (exit $ac_status); } && {
10083 test -z "$ac_c_werror_flag" ||
10084 test ! -s conftest.err
10085 } && test -s conftest$ac_exeext &&
10086 $as_test_x conftest$ac_exeext; then
98418dba
CW
10087 eval "$as_ac_var=yes"
10088else
10089 echo "$as_me: failed program was:" >&5
19650fd6
AS
10090sed 's/^/| /' conftest.$ac_ext >&5
10091
ca81d7a0 10092 eval "$as_ac_var=no"
98418dba 10093fi
ca81d7a0 10094
f053c89f 10095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10096 conftest$ac_exeext conftest.$ac_ext
98418dba 10097fi
ca81d7a0
JD
10098ac_res=`eval echo '${'$as_ac_var'}'`
10099 { echo "$as_me:$LINENO: result: $ac_res" >&5
10100echo "${ECHO_T}$ac_res" >&6; }
98418dba 10101if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10102 cat >>confdefs.h <<_ACEOF
98418dba 10103#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10104_ACEOF
98418dba
CW
10105
10106fi
10107done
10108
ca81d7a0
JD
10109{ echo "$as_me:$LINENO: checking for working mmap" >&5
10110echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10111if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10112 echo $ECHO_N "(cached) $ECHO_C" >&6
10113else
10114 if test "$cross_compiling" = yes; then
10115 ac_cv_func_mmap_fixed_mapped=no
10116else
10117 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10118/* confdefs.h. */
10119_ACEOF
10120cat confdefs.h >>conftest.$ac_ext
10121cat >>conftest.$ac_ext <<_ACEOF
10122/* end confdefs.h. */
98418dba 10123$ac_includes_default
c0d27fcc
MR
10124/* malloc might have been renamed as rpl_malloc. */
10125#undef malloc
10126
98418dba
CW
10127/* Thanks to Mike Haertel and Jim Avera for this test.
10128 Here is a matrix of mmap possibilities:
10129 mmap private not fixed
10130 mmap private fixed at somewhere currently unmapped
10131 mmap private fixed at somewhere already mapped
10132 mmap shared not fixed
10133 mmap shared fixed at somewhere currently unmapped
10134 mmap shared fixed at somewhere already mapped
10135 For private mappings, we should verify that changes cannot be read()
10136 back from the file, nor mmap's back from the file at a different
10137 address. (There have been systems where private was not correctly
10138 implemented like the infamous i386 svr4.0, and systems where the
10139 VM page cache was not coherent with the file system buffer cache
10140 like early versions of FreeBSD and possibly contemporary NetBSD.)
10141 For shared mappings, we should conversely verify that changes get
c0d27fcc 10142 propagated back to all the places they're supposed to be.
98418dba
CW
10143
10144 Grep wants private fixed already mapped.
10145 The main things grep needs to know about mmap are:
10146 * does it exist and is it safe to write into the mmap'd area
10147 * how to use it (BSD variants) */
10148
10149#include <fcntl.h>
10150#include <sys/mman.h>
10151
f053c89f 10152#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10153char *malloc ();
10154#endif
10155
10156/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10157#ifndef HAVE_GETPAGESIZE
98418dba 10158/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10159# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10160# define HAVE_SYS_PARAM_H 1
10161# endif
10162
10163# ifdef _SC_PAGESIZE
10164# define getpagesize() sysconf(_SC_PAGESIZE)
10165# else /* no _SC_PAGESIZE */
f053c89f 10166# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10167# include <sys/param.h>
10168# ifdef EXEC_PAGESIZE
10169# define getpagesize() EXEC_PAGESIZE
10170# else /* no EXEC_PAGESIZE */
10171# ifdef NBPG
10172# define getpagesize() NBPG * CLSIZE
10173# ifndef CLSIZE
10174# define CLSIZE 1
10175# endif /* no CLSIZE */
10176# else /* no NBPG */
10177# ifdef NBPC
10178# define getpagesize() NBPC
10179# else /* no NBPC */
10180# ifdef PAGESIZE
10181# define getpagesize() PAGESIZE
10182# endif /* PAGESIZE */
10183# endif /* no NBPC */
10184# endif /* no NBPG */
10185# endif /* no EXEC_PAGESIZE */
10186# else /* no HAVE_SYS_PARAM_H */
10187# define getpagesize() 8192 /* punt totally */
10188# endif /* no HAVE_SYS_PARAM_H */
10189# endif /* no _SC_PAGESIZE */
10190
10191#endif /* no HAVE_GETPAGESIZE */
10192
10193int
10194main ()
10195{
10196 char *data, *data2, *data3;
10197 int i, pagesize;
10198 int fd;
10199
10200 pagesize = getpagesize ();
10201
10202 /* First, make a file with some known garbage in it. */
10203 data = (char *) malloc (pagesize);
10204 if (!data)
ca81d7a0 10205 return 1;
98418dba
CW
10206 for (i = 0; i < pagesize; ++i)
10207 *(data + i) = rand ();
10208 umask (0);
10209 fd = creat ("conftest.mmap", 0600);
10210 if (fd < 0)
ca81d7a0 10211 return 1;
98418dba 10212 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10213 return 1;
98418dba
CW
10214 close (fd);
10215
10216 /* Next, try to mmap the file at a fixed address which already has
10217 something else allocated at it. If we can, also make sure that
10218 we see the same garbage. */
10219 fd = open ("conftest.mmap", O_RDWR);
10220 if (fd < 0)
ca81d7a0 10221 return 1;
98418dba
CW
10222 data2 = (char *) malloc (2 * pagesize);
10223 if (!data2)
ca81d7a0
JD
10224 return 1;
10225 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10226 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10227 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10228 return 1;
98418dba
CW
10229 for (i = 0; i < pagesize; ++i)
10230 if (*(data + i) != *(data2 + i))
ca81d7a0 10231 return 1;
98418dba
CW
10232
10233 /* Finally, make sure that changes to the mapped area do not
10234 percolate back to the file as seen by read(). (This is a bug on
10235 some variants of i386 svr4.0.) */
10236 for (i = 0; i < pagesize; ++i)
10237 *(data2 + i) = *(data2 + i) + 1;
10238 data3 = (char *) malloc (pagesize);
10239 if (!data3)
ca81d7a0 10240 return 1;
98418dba 10241 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10242 return 1;
98418dba
CW
10243 for (i = 0; i < pagesize; ++i)
10244 if (*(data + i) != *(data3 + i))
ca81d7a0 10245 return 1;
98418dba 10246 close (fd);
ca81d7a0 10247 return 0;
98418dba
CW
10248}
10249_ACEOF
10250rm -f conftest$ac_exeext
ca81d7a0
JD
10251if { (ac_try="$ac_link"
10252case "(($ac_try" in
10253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10254 *) ac_try_echo=$ac_try;;
10255esac
10256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10257 (eval "$ac_link") 2>&5
98418dba 10258 ac_status=$?
c0d27fcc 10259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10261 { (case "(($ac_try" in
10262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10263 *) ac_try_echo=$ac_try;;
10264esac
10265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10266 (eval "$ac_try") 2>&5
98418dba 10267 ac_status=$?
c0d27fcc 10268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10269 (exit $ac_status); }; }; then
10270 ac_cv_func_mmap_fixed_mapped=yes
10271else
10272 echo "$as_me: program exited with status $ac_status" >&5
10273echo "$as_me: failed program was:" >&5
19650fd6
AS
10274sed 's/^/| /' conftest.$ac_ext >&5
10275
c0d27fcc 10276( exit $ac_status )
98418dba
CW
10277ac_cv_func_mmap_fixed_mapped=no
10278fi
ca81d7a0 10279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10280fi
ca81d7a0
JD
10281
10282
98418dba 10283fi
ca81d7a0
JD
10284{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10285echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10286if test $ac_cv_func_mmap_fixed_mapped = yes; then
10287
c0d27fcc 10288cat >>confdefs.h <<\_ACEOF
98418dba 10289#define HAVE_MMAP 1
c0d27fcc 10290_ACEOF
98418dba
CW
10291
10292fi
10293rm -f conftest.mmap
10294
10295if test $use_mmap_for_buffers = yes; then
10296 REL_ALLOC=no
10297fi
10298
10299LIBS="$libsrc_libs $LIBS"
10300
c0d27fcc 10301
ca81d7a0
JD
10302{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10303echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10304if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10305 echo $ECHO_N "(cached) $ECHO_C" >&6
10306else
10307 ac_check_lib_save_LIBS=$LIBS
10308LIBS="-ldnet $LIBS"
10309cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10310/* confdefs.h. */
10311_ACEOF
10312cat confdefs.h >>conftest.$ac_ext
10313cat >>conftest.$ac_ext <<_ACEOF
10314/* end confdefs.h. */
98418dba 10315
ca81d7a0
JD
10316/* Override any GCC internal prototype to avoid an error.
10317 Use char because int might match the return type of a GCC
10318 builtin and then its argument prototype would still apply. */
98418dba
CW
10319#ifdef __cplusplus
10320extern "C"
10321#endif
98418dba 10322char dnet_ntoa ();
98418dba
CW
10323int
10324main ()
10325{
ca81d7a0 10326return dnet_ntoa ();
98418dba
CW
10327 ;
10328 return 0;
10329}
10330_ACEOF
10331rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10332if { (ac_try="$ac_link"
10333case "(($ac_try" in
10334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10335 *) ac_try_echo=$ac_try;;
10336esac
10337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10338 (eval "$ac_link") 2>conftest.er1
98418dba 10339 ac_status=$?
edfaf76d
LK
10340 grep -v '^ *+' conftest.er1 >conftest.err
10341 rm -f conftest.er1
10342 cat conftest.err >&5
c0d27fcc 10343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10344 (exit $ac_status); } && {
10345 test -z "$ac_c_werror_flag" ||
10346 test ! -s conftest.err
10347 } && test -s conftest$ac_exeext &&
10348 $as_test_x conftest$ac_exeext; then
98418dba
CW
10349 ac_cv_lib_dnet_dnet_ntoa=yes
10350else
10351 echo "$as_me: failed program was:" >&5
19650fd6
AS
10352sed 's/^/| /' conftest.$ac_ext >&5
10353
ca81d7a0 10354 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10355fi
ca81d7a0 10356
f053c89f 10357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10358 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10359LIBS=$ac_check_lib_save_LIBS
10360fi
ca81d7a0
JD
10361{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10362echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10363if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10364 cat >>confdefs.h <<_ACEOF
98418dba 10365#define HAVE_LIBDNET 1
c0d27fcc 10366_ACEOF
98418dba
CW
10367
10368 LIBS="-ldnet $LIBS"
10369
10370fi
10371
c0d27fcc 10372
ca81d7a0
JD
10373{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10374echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10375if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10376 echo $ECHO_N "(cached) $ECHO_C" >&6
10377else
10378 ac_check_lib_save_LIBS=$LIBS
10379LIBS="-lXbsd $LIBS"
10380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10381/* confdefs.h. */
10382_ACEOF
10383cat confdefs.h >>conftest.$ac_ext
10384cat >>conftest.$ac_ext <<_ACEOF
10385/* end confdefs.h. */
98418dba 10386
c0d27fcc 10387
98418dba
CW
10388int
10389main ()
10390{
ca81d7a0 10391return main ();
98418dba
CW
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10397if { (ac_try="$ac_link"
10398case "(($ac_try" in
10399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10400 *) ac_try_echo=$ac_try;;
10401esac
10402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10403 (eval "$ac_link") 2>conftest.er1
98418dba 10404 ac_status=$?
edfaf76d
LK
10405 grep -v '^ *+' conftest.er1 >conftest.err
10406 rm -f conftest.er1
10407 cat conftest.err >&5
c0d27fcc 10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10409 (exit $ac_status); } && {
10410 test -z "$ac_c_werror_flag" ||
10411 test ! -s conftest.err
10412 } && test -s conftest$ac_exeext &&
10413 $as_test_x conftest$ac_exeext; then
98418dba
CW
10414 ac_cv_lib_Xbsd_main=yes
10415else
10416 echo "$as_me: failed program was:" >&5
19650fd6
AS
10417sed 's/^/| /' conftest.$ac_ext >&5
10418
ca81d7a0 10419 ac_cv_lib_Xbsd_main=no
98418dba 10420fi
ca81d7a0 10421
f053c89f 10422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10423 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10424LIBS=$ac_check_lib_save_LIBS
10425fi
ca81d7a0
JD
10426{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10427echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10428if test $ac_cv_lib_Xbsd_main = yes; then
10429 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10430fi
10431
c0d27fcc
MR
10432
10433
ca81d7a0
JD
10434{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10435echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10436if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10437 echo $ECHO_N "(cached) $ECHO_C" >&6
10438else
10439 ac_check_lib_save_LIBS=$LIBS
10440LIBS="-lpthreads $LIBS"
10441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10442/* confdefs.h. */
10443_ACEOF
10444cat confdefs.h >>conftest.$ac_ext
10445cat >>conftest.$ac_ext <<_ACEOF
10446/* end confdefs.h. */
98418dba 10447
ca81d7a0
JD
10448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
98418dba
CW
10451#ifdef __cplusplus
10452extern "C"
10453#endif
98418dba 10454char cma_open ();
98418dba
CW
10455int
10456main ()
10457{
ca81d7a0 10458return cma_open ();
98418dba
CW
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10464if { (ac_try="$ac_link"
10465case "(($ac_try" in
10466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10467 *) ac_try_echo=$ac_try;;
10468esac
10469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10470 (eval "$ac_link") 2>conftest.er1
98418dba 10471 ac_status=$?
edfaf76d
LK
10472 grep -v '^ *+' conftest.er1 >conftest.err
10473 rm -f conftest.er1
10474 cat conftest.err >&5
c0d27fcc 10475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10476 (exit $ac_status); } && {
10477 test -z "$ac_c_werror_flag" ||
10478 test ! -s conftest.err
10479 } && test -s conftest$ac_exeext &&
10480 $as_test_x conftest$ac_exeext; then
98418dba
CW
10481 ac_cv_lib_pthreads_cma_open=yes
10482else
10483 echo "$as_me: failed program was:" >&5
19650fd6
AS
10484sed 's/^/| /' conftest.$ac_ext >&5
10485
ca81d7a0 10486 ac_cv_lib_pthreads_cma_open=no
98418dba 10487fi
ca81d7a0 10488
f053c89f 10489rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10490 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10491LIBS=$ac_check_lib_save_LIBS
10492fi
ca81d7a0
JD
10493{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10494echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10495if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10496 cat >>confdefs.h <<_ACEOF
98418dba 10497#define HAVE_LIBPTHREADS 1
c0d27fcc 10498_ACEOF
98418dba
CW
10499
10500 LIBS="-lpthreads $LIBS"
10501
10502fi
10503
c0d27fcc 10504
55597d70
DL
10505
10506case ${host_os} in
10507aix*)
ca81d7a0
JD
10508 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10509echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10510if test "${gdb_cv_bigtoc+set}" = set; then
10511 echo $ECHO_N "(cached) $ECHO_C" >&6
10512else
10513
10514 case $GCC in
10515 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10516 *) gdb_cv_bigtoc=-bbigtoc ;;
10517 esac
10518
10519 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10520 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10521/* confdefs.h. */
10522_ACEOF
10523cat confdefs.h >>conftest.$ac_ext
10524cat >>conftest.$ac_ext <<_ACEOF
10525/* end confdefs.h. */
55597d70
DL
10526
10527int
10528main ()
10529{
10530int i;
10531 ;
10532 return 0;
10533}
10534_ACEOF
10535rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10536if { (ac_try="$ac_link"
10537case "(($ac_try" in
10538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10539 *) ac_try_echo=$ac_try;;
10540esac
10541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10542 (eval "$ac_link") 2>conftest.er1
55597d70 10543 ac_status=$?
edfaf76d
LK
10544 grep -v '^ *+' conftest.er1 >conftest.err
10545 rm -f conftest.er1
10546 cat conftest.err >&5
55597d70 10547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10548 (exit $ac_status); } && {
10549 test -z "$ac_c_werror_flag" ||
10550 test ! -s conftest.err
10551 } && test -s conftest$ac_exeext &&
10552 $as_test_x conftest$ac_exeext; then
55597d70
DL
10553 :
10554else
10555 echo "$as_me: failed program was:" >&5
19650fd6
AS
10556sed 's/^/| /' conftest.$ac_ext >&5
10557
ca81d7a0 10558 gdb_cv_bigtoc=
55597d70 10559fi
ca81d7a0 10560
f053c89f 10561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10562 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10563
10564fi
ca81d7a0
JD
10565{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10566echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10567 ;;
10568esac
10569
ae1a998c
RS
10570# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10571# used for the tests that follow. We set them back to REAL_CFLAGS and
10572# REAL_CPPFLAGS later on.
98418dba
CW
10573
10574REAL_CPPFLAGS="$CPPFLAGS"
10575
10576if test "${HAVE_X11}" = "yes"; then
10577 DEFS="$C_SWITCH_X_SITE $DEFS"
10578 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10579 LIBS="$LIBX $LIBS"
10580 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10581 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10582
10583 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10584 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10585 # but it's more convenient here to set LD_RUN_PATH
10586 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10587 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10588 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10589 export LD_RUN_PATH
10590 fi
10591
10592 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10593 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10594echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10595 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10596/* confdefs.h. */
10597_ACEOF
10598cat confdefs.h >>conftest.$ac_ext
10599cat >>conftest.$ac_ext <<_ACEOF
10600/* end confdefs.h. */
98418dba 10601
98418dba
CW
10602int
10603main ()
10604{
10605XOpenDisplay ("foo");
10606 ;
10607 return 0;
10608}
10609_ACEOF
10610rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10611if { (ac_try="$ac_link"
10612case "(($ac_try" in
10613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10614 *) ac_try_echo=$ac_try;;
10615esac
10616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10617 (eval "$ac_link") 2>conftest.er1
98418dba 10618 ac_status=$?
edfaf76d
LK
10619 grep -v '^ *+' conftest.er1 >conftest.err
10620 rm -f conftest.er1
10621 cat conftest.err >&5
c0d27fcc 10622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10623 (exit $ac_status); } && {
10624 test -z "$ac_c_werror_flag" ||
10625 test ! -s conftest.err
10626 } && test -s conftest$ac_exeext &&
10627 $as_test_x conftest$ac_exeext; then
35996d22 10628 xlinux_first_failure=no
98418dba
CW
10629else
10630 echo "$as_me: failed program was:" >&5
19650fd6
AS
10631sed 's/^/| /' conftest.$ac_ext >&5
10632
ca81d7a0 10633 xlinux_first_failure=yes
98418dba 10634fi
ca81d7a0 10635
f053c89f 10636rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10637 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10638 if test "${xlinux_first_failure}" = "yes"; then
10639 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10640 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10641 OLD_CPPFLAGS="$CPPFLAGS"
10642 OLD_LIBS="$LIBS"
10643 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10644 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10645 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10646 LIBS="$LIBS -b i486-linuxaout"
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. */
98418dba 10653
98418dba
CW
10654int
10655main ()
10656{
10657XOpenDisplay ("foo");
10658 ;
10659 return 0;
10660}
10661_ACEOF
10662rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10663if { (ac_try="$ac_link"
10664case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
10668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10669 (eval "$ac_link") 2>conftest.er1
98418dba 10670 ac_status=$?
edfaf76d
LK
10671 grep -v '^ *+' conftest.er1 >conftest.err
10672 rm -f conftest.er1
10673 cat conftest.err >&5
c0d27fcc 10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10675 (exit $ac_status); } && {
10676 test -z "$ac_c_werror_flag" ||
10677 test ! -s conftest.err
10678 } && test -s conftest$ac_exeext &&
10679 $as_test_x conftest$ac_exeext; then
98418dba
CW
10680 xlinux_second_failure=no
10681else
10682 echo "$as_me: failed program was:" >&5
19650fd6
AS
10683sed 's/^/| /' conftest.$ac_ext >&5
10684
ca81d7a0 10685 xlinux_second_failure=yes
98418dba 10686fi
ca81d7a0 10687
f053c89f 10688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10689 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10690 if test "${xlinux_second_failure}" = "yes"; then
10691 # If we get the same failure with -b, there is no use adding -b.
10692 # So take it out. This plays safe.
10693 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10694 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10695 CPPFLAGS="$OLD_CPPFLAGS"
10696 LIBS="$OLD_LIBS"
ca81d7a0
JD
10697 { echo "$as_me:$LINENO: result: no" >&5
10698echo "${ECHO_T}no" >&6; }
98418dba 10699 else
ca81d7a0
JD
10700 { echo "$as_me:$LINENO: result: yes" >&5
10701echo "${ECHO_T}yes" >&6; }
98418dba
CW
10702 fi
10703 else
ca81d7a0
JD
10704 { echo "$as_me:$LINENO: result: no" >&5
10705echo "${ECHO_T}no" >&6; }
98418dba
CW
10706 fi
10707 fi
10708
10709 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10710 # header files included from there.
ca81d7a0
JD
10711 { echo "$as_me:$LINENO: checking for Xkb" >&5
10712echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10714/* confdefs.h. */
10715_ACEOF
10716cat confdefs.h >>conftest.$ac_ext
10717cat >>conftest.$ac_ext <<_ACEOF
10718/* end confdefs.h. */
98418dba
CW
10719#include <X11/Xlib.h>
10720#include <X11/XKBlib.h>
98418dba
CW
10721int
10722main ()
10723{
10724XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10725 ;
10726 return 0;
10727}
10728_ACEOF
10729rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10730if { (ac_try="$ac_link"
10731case "(($ac_try" in
10732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10733 *) ac_try_echo=$ac_try;;
10734esac
10735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10736 (eval "$ac_link") 2>conftest.er1
98418dba 10737 ac_status=$?
edfaf76d
LK
10738 grep -v '^ *+' conftest.er1 >conftest.err
10739 rm -f conftest.er1
10740 cat conftest.err >&5
c0d27fcc 10741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10742 (exit $ac_status); } && {
10743 test -z "$ac_c_werror_flag" ||
10744 test ! -s conftest.err
10745 } && test -s conftest$ac_exeext &&
10746 $as_test_x conftest$ac_exeext; then
98418dba
CW
10747 emacs_xkb=yes
10748else
10749 echo "$as_me: failed program was:" >&5
19650fd6
AS
10750sed 's/^/| /' conftest.$ac_ext >&5
10751
ca81d7a0 10752 emacs_xkb=no
98418dba 10753fi
ca81d7a0 10754
f053c89f 10755rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10756 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10757 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10758echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10759 if test $emacs_xkb = yes; then
b936fae4 10760
c0d27fcc 10761cat >>confdefs.h <<\_ACEOF
98418dba 10762#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10763_ACEOF
98418dba
CW
10764
10765 fi
10766
c0d27fcc
MR
10767
10768
10769
10770
98418dba
CW
10771for ac_func in XrmSetDatabase XScreenResourceString \
10772XScreenNumberOfScreen XSetWMProtocols
10773do
10774as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10775{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10776echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10777if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10778 echo $ECHO_N "(cached) $ECHO_C" >&6
10779else
10780 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10781/* confdefs.h. */
10782_ACEOF
10783cat confdefs.h >>conftest.$ac_ext
10784cat >>conftest.$ac_ext <<_ACEOF
10785/* end confdefs.h. */
edfaf76d
LK
10786/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10787 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10788#define $ac_func innocuous_$ac_func
10789
98418dba 10790/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10791 which can conflict with char $ac_func (); below.
10792 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10793 <limits.h> exists even on freestanding compilers. */
edfaf76d 10794
19650fd6
AS
10795#ifdef __STDC__
10796# include <limits.h>
10797#else
10798# include <assert.h>
10799#endif
edfaf76d
LK
10800
10801#undef $ac_func
10802
ca81d7a0
JD
10803/* Override any GCC internal prototype to avoid an error.
10804 Use char because int might match the return type of a GCC
10805 builtin and then its argument prototype would still apply. */
98418dba
CW
10806#ifdef __cplusplus
10807extern "C"
10808#endif
98418dba 10809char $ac_func ();
98418dba
CW
10810/* The GNU C library defines this for functions which it implements
10811 to always fail with ENOSYS. Some functions are actually named
10812 something starting with __ and the normal name is an alias. */
ca81d7a0 10813#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10814choke me
98418dba
CW
10815#endif
10816
19650fd6
AS
10817int
10818main ()
10819{
ca81d7a0 10820return $ac_func ();
98418dba
CW
10821 ;
10822 return 0;
10823}
10824_ACEOF
10825rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10826if { (ac_try="$ac_link"
10827case "(($ac_try" in
10828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10829 *) ac_try_echo=$ac_try;;
10830esac
10831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10832 (eval "$ac_link") 2>conftest.er1
98418dba 10833 ac_status=$?
edfaf76d
LK
10834 grep -v '^ *+' conftest.er1 >conftest.err
10835 rm -f conftest.er1
10836 cat conftest.err >&5
c0d27fcc 10837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10838 (exit $ac_status); } && {
10839 test -z "$ac_c_werror_flag" ||
10840 test ! -s conftest.err
10841 } && test -s conftest$ac_exeext &&
10842 $as_test_x conftest$ac_exeext; then
98418dba
CW
10843 eval "$as_ac_var=yes"
10844else
10845 echo "$as_me: failed program was:" >&5
19650fd6
AS
10846sed 's/^/| /' conftest.$ac_ext >&5
10847
ca81d7a0 10848 eval "$as_ac_var=no"
98418dba 10849fi
ca81d7a0 10850
f053c89f 10851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10852 conftest$ac_exeext conftest.$ac_ext
98418dba 10853fi
ca81d7a0
JD
10854ac_res=`eval echo '${'$as_ac_var'}'`
10855 { echo "$as_me:$LINENO: result: $ac_res" >&5
10856echo "${ECHO_T}$ac_res" >&6; }
98418dba 10857if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10858 cat >>confdefs.h <<_ACEOF
98418dba 10859#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10860_ACEOF
98418dba
CW
10861
10862fi
10863done
10864
10865fi
10866
10867if test "${window_system}" = "x11"; then
ca81d7a0
JD
10868 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10869echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10870 if test "${emacs_cv_x11_version_6+set}" = set; then
10871 echo $ECHO_N "(cached) $ECHO_C" >&6
10872else
10873 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10874/* confdefs.h. */
10875_ACEOF
10876cat confdefs.h >>conftest.$ac_ext
10877cat >>conftest.$ac_ext <<_ACEOF
10878/* end confdefs.h. */
98418dba 10879#include <X11/Xlib.h>
98418dba
CW
10880int
10881main ()
10882{
10883#if XlibSpecificationRelease < 6
10884fail;
10885#endif
10886
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10892if { (ac_try="$ac_link"
10893case "(($ac_try" in
10894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10895 *) ac_try_echo=$ac_try;;
10896esac
10897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10898 (eval "$ac_link") 2>conftest.er1
98418dba 10899 ac_status=$?
edfaf76d
LK
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
c0d27fcc 10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10904 (exit $ac_status); } && {
10905 test -z "$ac_c_werror_flag" ||
10906 test ! -s conftest.err
10907 } && test -s conftest$ac_exeext &&
10908 $as_test_x conftest$ac_exeext; then
98418dba
CW
10909 emacs_cv_x11_version_6=yes
10910else
10911 echo "$as_me: failed program was:" >&5
19650fd6
AS
10912sed 's/^/| /' conftest.$ac_ext >&5
10913
ca81d7a0 10914 emacs_cv_x11_version_6=no
98418dba 10915fi
ca81d7a0 10916
f053c89f 10917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10918 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10919fi
10920
10921 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10922 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10923echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10924
c0d27fcc 10925cat >>confdefs.h <<\_ACEOF
98418dba 10926#define HAVE_X11R6 1
c0d27fcc 10927_ACEOF
98418dba
CW
10928
10929 else
ca81d7a0
JD
10930 { echo "$as_me:$LINENO: result: before 6" >&5
10931echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10932 fi
10933fi
10934
98418dba 10935
0cfc0546
GM
10936### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10937HAVE_RSVG=no
ae0476ed 10938if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546 10939 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10940 RSVG_REQUIRED=2.0.0
10941 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10942
10943
10944 succeeded=no
10945
00b9c927 10946 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10947set dummy pkg-config; ac_word=$2
10948{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10949echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10950if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10951 echo $ECHO_N "(cached) $ECHO_C" >&6
10952else
10953 case $PKG_CONFIG in
10954 [\\/]* | ?:[\\/]*)
10955 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10956 ;;
10957 *)
10958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10959for as_dir in $PATH
10960do
10961 IFS=$as_save_IFS
10962 test -z "$as_dir" && as_dir=.
10963 for ac_exec_ext in '' $ac_executable_extensions; do
10964 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10965 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10966 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10967 break 2
10968 fi
10969done
10970done
10971IFS=$as_save_IFS
10972
10973 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10974 ;;
10975esac
10976fi
10977PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10978if test -n "$PKG_CONFIG"; then
10979 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10980echo "${ECHO_T}$PKG_CONFIG" >&6; }
10981else
10982 { echo "$as_me:$LINENO: result: no" >&5
10983echo "${ECHO_T}no" >&6; }
10984fi
10985
10986
0cfc0546
GM
10987
10988 if test "$PKG_CONFIG" = "no" ; then
10989 :
10990 else
10991 PKG_CONFIG_MIN_VERSION=0.9.0
10992 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10993 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10994echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10995
10996 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10997 { echo "$as_me:$LINENO: result: yes" >&5
10998echo "${ECHO_T}yes" >&6; }
10999 succeeded=yes
11000
11001 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
11002echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
11003 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11004 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
11005echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
11006
11007 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
11008echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
11009 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11010 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
11011echo "${ECHO_T}$RSVG_LIBS" >&6; }
11012 else
11013 { echo "$as_me:$LINENO: result: no" >&5
11014echo "${ECHO_T}no" >&6; }
11015 RSVG_CFLAGS=""
11016 RSVG_LIBS=""
11017 ## If we have a custom action on failure, don't print errors, but
11018 ## do set a variable so people can do so.
11019 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
11020
11021 fi
11022
11023
11024
11025 else
11026 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11027 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11028 fi
11029 fi
11030
11031 if test $succeeded = yes; then
11032 :
11033 else
11034 :
11035 fi
11036
11037
11038
11039
11040 if test ".${RSVG_CFLAGS}" != "."; then
11041 HAVE_RSVG=yes
11042
11043cat >>confdefs.h <<\_ACEOF
11044#define HAVE_RSVG 1
11045_ACEOF
11046
11047 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11048 LIBS="$RSVG_LIBS $LIBS"
11049 fi
11050 fi
11051fi
11052
11053
488dd4c4 11054HAVE_GTK=no
9d2818d6 11055if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
11056 GLIB_REQUIRED=2.6
11057 GTK_REQUIRED=2.6
488dd4c4
JD
11058 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11059
488dd4c4
JD
11060
11061 succeeded=no
11062
00b9c927 11063 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 11064set dummy pkg-config; ac_word=$2
ca81d7a0
JD
11065{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11066echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11067if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11068 echo $ECHO_N "(cached) $ECHO_C" >&6
11069else
11070 case $PKG_CONFIG in
11071 [\\/]* | ?:[\\/]*)
11072 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11073 ;;
11074 *)
11075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11076for as_dir in $PATH
11077do
11078 IFS=$as_save_IFS
11079 test -z "$as_dir" && as_dir=.
11080 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11081 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11082 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11084 break 2
11085 fi
11086done
11087done
ca81d7a0 11088IFS=$as_save_IFS
488dd4c4
JD
11089
11090 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11091 ;;
11092esac
11093fi
11094PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11095if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11096 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11097echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11098else
ca81d7a0
JD
11099 { echo "$as_me:$LINENO: result: no" >&5
11100echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11101fi
11102
ca81d7a0 11103
488dd4c4
JD
11104
11105 if test "$PKG_CONFIG" = "no" ; then
089a966d 11106 pkg_check_gtk=no
488dd4c4
JD
11107 else
11108 PKG_CONFIG_MIN_VERSION=0.9.0
11109 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11110 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11111echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11112
67db6aa2 11113 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11114 { echo "$as_me:$LINENO: result: yes" >&5
11115echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11116 succeeded=yes
11117
ca81d7a0
JD
11118 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11119echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11120 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11121 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11122echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11123
ca81d7a0
JD
11124 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11125echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11126 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11127 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11128echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11129 else
ca81d7a0
JD
11130 { echo "$as_me:$LINENO: result: no" >&5
11131echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11132 GTK_CFLAGS=""
11133 GTK_LIBS=""
11134 ## If we have a custom action on failure, don't print errors, but
11135 ## do set a variable so people can do so.
11136 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11137
488dd4c4
JD
11138 fi
11139
11140
11141
11142 else
11143 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11144 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11145 fi
11146 fi
11147
11148 if test $succeeded = yes; then
089a966d 11149 pkg_check_gtk=yes
488dd4c4 11150 else
089a966d
GM
11151 pkg_check_gtk=no
11152 fi
11153
11154 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11155 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11156echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11157 { (exit 1); exit 1; }; }
11158 fi
089a966d
GM
11159fi
11160
11161
11162if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11163
11164
11165
11166 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11167 CFLAGS="$CFLAGS $GTK_CFLAGS"
11168 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11169 GTK_COMPILES=no
57669b57 11170
8eeae1c9 11171for ac_func in gtk_main
57669b57
JD
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
8eeae1c9 11260 GTK_COMPILES=yes
57669b57
JD
11261fi
11262done
11263
8eeae1c9 11264 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11265 if test "$USE_X_TOOLKIT" != "maybe"; then
11266 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11267echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11268 { (exit 1); exit 1; }; };
089a966d
GM
11269 fi
11270 else
11271 HAVE_GTK=yes
488dd4c4
JD
11272
11273cat >>confdefs.h <<\_ACEOF
a51f4969 11274#define USE_GTK 1
488dd4c4
JD
11275_ACEOF
11276
089a966d 11277 USE_X_TOOLKIT=none
f60c93db
JD
11278 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11279 :
11280 else
11281 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11282 closing open displays. This is no problem if you just use
11283 one display, but if you use more than one and close one of them
11284 Emacs may crash." >&5
11285echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11286 closing open displays. This is no problem if you just use
11287 one display, but if you use more than one and close one of them
11288 Emacs may crash." >&2;}
11289 sleep 3
11290 fi
089a966d
GM
11291 fi
11292
11293fi
11294
11295
11296if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11297
d0a80c21
JD
11298 if test "$with_toolkit_scroll_bars" != no; then
11299 with_toolkit_scroll_bars=yes
11300 fi
57669b57
JD
11301
11302 HAVE_GTK_MULTIDISPLAY=no
11303
11304for ac_func in gdk_display_open
11305do
11306as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11307{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11308echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11309if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11310 echo $ECHO_N "(cached) $ECHO_C" >&6
11311else
11312 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11313/* confdefs.h. */
11314_ACEOF
11315cat confdefs.h >>conftest.$ac_ext
11316cat >>conftest.$ac_ext <<_ACEOF
11317/* end confdefs.h. */
edfaf76d
LK
11318/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11319 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11320#define $ac_func innocuous_$ac_func
11321
57669b57
JD
11322/* System header to define __stub macros and hopefully few prototypes,
11323 which can conflict with char $ac_func (); below.
11324 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11325 <limits.h> exists even on freestanding compilers. */
edfaf76d 11326
57669b57
JD
11327#ifdef __STDC__
11328# include <limits.h>
11329#else
11330# include <assert.h>
11331#endif
edfaf76d
LK
11332
11333#undef $ac_func
11334
ca81d7a0
JD
11335/* Override any GCC internal prototype to avoid an error.
11336 Use char because int might match the return type of a GCC
11337 builtin and then its argument prototype would still apply. */
57669b57
JD
11338#ifdef __cplusplus
11339extern "C"
57669b57 11340#endif
57669b57
JD
11341char $ac_func ();
11342/* The GNU C library defines this for functions which it implements
11343 to always fail with ENOSYS. Some functions are actually named
11344 something starting with __ and the normal name is an alias. */
ca81d7a0 11345#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11346choke me
57669b57
JD
11347#endif
11348
11349int
11350main ()
11351{
ca81d7a0 11352return $ac_func ();
57669b57
JD
11353 ;
11354 return 0;
11355}
11356_ACEOF
11357rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11358if { (ac_try="$ac_link"
11359case "(($ac_try" in
11360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11361 *) ac_try_echo=$ac_try;;
11362esac
11363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11364 (eval "$ac_link") 2>conftest.er1
57669b57 11365 ac_status=$?
edfaf76d
LK
11366 grep -v '^ *+' conftest.er1 >conftest.err
11367 rm -f conftest.er1
11368 cat conftest.err >&5
57669b57 11369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11370 (exit $ac_status); } && {
11371 test -z "$ac_c_werror_flag" ||
11372 test ! -s conftest.err
11373 } && test -s conftest$ac_exeext &&
11374 $as_test_x conftest$ac_exeext; then
57669b57
JD
11375 eval "$as_ac_var=yes"
11376else
11377 echo "$as_me: failed program was:" >&5
11378sed 's/^/| /' conftest.$ac_ext >&5
11379
ca81d7a0 11380 eval "$as_ac_var=no"
57669b57 11381fi
ca81d7a0 11382
f053c89f 11383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11384 conftest$ac_exeext conftest.$ac_ext
57669b57 11385fi
ca81d7a0
JD
11386ac_res=`eval echo '${'$as_ac_var'}'`
11387 { echo "$as_me:$LINENO: result: $ac_res" >&5
11388echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11389if test `eval echo '${'$as_ac_var'}'` = yes; then
11390 cat >>confdefs.h <<_ACEOF
11391#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11392_ACEOF
11393 HAVE_GTK_MULTIDISPLAY=yes
11394fi
11395done
11396
11397 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11398
11399cat >>confdefs.h <<\_ACEOF
11400#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11401_ACEOF
11402
11403 fi
57669b57 11404
572a3cc2
JD
11405 HAVE_GTK_FILE_SELECTION=no
11406
11407for ac_func in gtk_file_selection_new
11408do
11409as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11410{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11411echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11412if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11413 echo $ECHO_N "(cached) $ECHO_C" >&6
11414else
11415 cat >conftest.$ac_ext <<_ACEOF
11416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
edfaf76d
LK
11421/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11422 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11423#define $ac_func innocuous_$ac_func
11424
572a3cc2
JD
11425/* System header to define __stub macros and hopefully few prototypes,
11426 which can conflict with char $ac_func (); below.
11427 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11428 <limits.h> exists even on freestanding compilers. */
edfaf76d 11429
572a3cc2
JD
11430#ifdef __STDC__
11431# include <limits.h>
11432#else
11433# include <assert.h>
11434#endif
edfaf76d
LK
11435
11436#undef $ac_func
11437
ca81d7a0
JD
11438/* Override any GCC internal prototype to avoid an error.
11439 Use char because int might match the return type of a GCC
11440 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11441#ifdef __cplusplus
11442extern "C"
572a3cc2 11443#endif
572a3cc2
JD
11444char $ac_func ();
11445/* The GNU C library defines this for functions which it implements
11446 to always fail with ENOSYS. Some functions are actually named
11447 something starting with __ and the normal name is an alias. */
ca81d7a0 11448#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11449choke me
572a3cc2
JD
11450#endif
11451
11452int
11453main ()
11454{
ca81d7a0 11455return $ac_func ();
572a3cc2
JD
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11461if { (ac_try="$ac_link"
11462case "(($ac_try" in
11463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11464 *) ac_try_echo=$ac_try;;
11465esac
11466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11467 (eval "$ac_link") 2>conftest.er1
572a3cc2 11468 ac_status=$?
edfaf76d
LK
11469 grep -v '^ *+' conftest.er1 >conftest.err
11470 rm -f conftest.er1
11471 cat conftest.err >&5
572a3cc2 11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11473 (exit $ac_status); } && {
11474 test -z "$ac_c_werror_flag" ||
11475 test ! -s conftest.err
11476 } && test -s conftest$ac_exeext &&
11477 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11478 eval "$as_ac_var=yes"
11479else
11480 echo "$as_me: failed program was:" >&5
11481sed 's/^/| /' conftest.$ac_ext >&5
11482
ca81d7a0 11483 eval "$as_ac_var=no"
572a3cc2 11484fi
ca81d7a0 11485
f053c89f 11486rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11487 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11488fi
ca81d7a0
JD
11489ac_res=`eval echo '${'$as_ac_var'}'`
11490 { echo "$as_me:$LINENO: result: $ac_res" >&5
11491echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11492if test `eval echo '${'$as_ac_var'}'` = yes; then
11493 cat >>confdefs.h <<_ACEOF
11494#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11495_ACEOF
11496 HAVE_GTK_FILE_SELECTION=yes
11497fi
11498done
11499
11500
11501 HAVE_GTK_FILE_CHOOSER=no
11502
11503for ac_func in gtk_file_chooser_dialog_new
11504do
11505as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11506{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11507echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11508if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11509 echo $ECHO_N "(cached) $ECHO_C" >&6
11510else
11511 cat >conftest.$ac_ext <<_ACEOF
11512/* confdefs.h. */
11513_ACEOF
11514cat confdefs.h >>conftest.$ac_ext
11515cat >>conftest.$ac_ext <<_ACEOF
11516/* end confdefs.h. */
edfaf76d
LK
11517/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11518 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11519#define $ac_func innocuous_$ac_func
11520
572a3cc2
JD
11521/* System header to define __stub macros and hopefully few prototypes,
11522 which can conflict with char $ac_func (); below.
11523 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11524 <limits.h> exists even on freestanding compilers. */
edfaf76d 11525
572a3cc2
JD
11526#ifdef __STDC__
11527# include <limits.h>
11528#else
11529# include <assert.h>
11530#endif
edfaf76d
LK
11531
11532#undef $ac_func
11533
ca81d7a0
JD
11534/* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11537#ifdef __cplusplus
11538extern "C"
572a3cc2 11539#endif
572a3cc2
JD
11540char $ac_func ();
11541/* The GNU C library defines this for functions which it implements
11542 to always fail with ENOSYS. Some functions are actually named
11543 something starting with __ and the normal name is an alias. */
ca81d7a0 11544#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11545choke me
572a3cc2
JD
11546#endif
11547
11548int
11549main ()
11550{
ca81d7a0 11551return $ac_func ();
572a3cc2
JD
11552 ;
11553 return 0;
11554}
11555_ACEOF
11556rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11557if { (ac_try="$ac_link"
11558case "(($ac_try" in
11559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11560 *) ac_try_echo=$ac_try;;
11561esac
11562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11563 (eval "$ac_link") 2>conftest.er1
572a3cc2 11564 ac_status=$?
edfaf76d
LK
11565 grep -v '^ *+' conftest.er1 >conftest.err
11566 rm -f conftest.er1
11567 cat conftest.err >&5
572a3cc2 11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11569 (exit $ac_status); } && {
11570 test -z "$ac_c_werror_flag" ||
11571 test ! -s conftest.err
11572 } && test -s conftest$ac_exeext &&
11573 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11574 eval "$as_ac_var=yes"
11575else
11576 echo "$as_me: failed program was:" >&5
11577sed 's/^/| /' conftest.$ac_ext >&5
11578
ca81d7a0 11579 eval "$as_ac_var=no"
572a3cc2 11580fi
ca81d7a0 11581
f053c89f 11582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11583 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11584fi
ca81d7a0
JD
11585ac_res=`eval echo '${'$as_ac_var'}'`
11586 { echo "$as_me:$LINENO: result: $ac_res" >&5
11587echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11588if test `eval echo '${'$as_ac_var'}'` = yes; then
11589 cat >>confdefs.h <<_ACEOF
11590#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11591_ACEOF
11592 HAVE_GTK_FILE_CHOOSER=yes
11593fi
11594done
11595
11596
11597 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11598 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11599
11600cat >>confdefs.h <<\_ACEOF
11601#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11602_ACEOF
11603
b8bdffbe
JD
11604 fi
11605
11606 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11607 HAVE_GTK_AND_PTHREAD=no
11608
11609for ac_header in pthread.h
11610do
11611as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11612if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11613 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11614echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11615if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11616 echo $ECHO_N "(cached) $ECHO_C" >&6
11617fi
ca81d7a0
JD
11618ac_res=`eval echo '${'$as_ac_Header'}'`
11619 { echo "$as_me:$LINENO: result: $ac_res" >&5
11620echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11621else
11622 # Is the header compilable?
ca81d7a0
JD
11623{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11624echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11625cat >conftest.$ac_ext <<_ACEOF
11626/* confdefs.h. */
11627_ACEOF
11628cat confdefs.h >>conftest.$ac_ext
11629cat >>conftest.$ac_ext <<_ACEOF
11630/* end confdefs.h. */
11631$ac_includes_default
11632#include <$ac_header>
11633_ACEOF
11634rm -f conftest.$ac_objext
ca81d7a0
JD
11635if { (ac_try="$ac_compile"
11636case "(($ac_try" in
11637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11638 *) ac_try_echo=$ac_try;;
11639esac
11640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11641 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11642 ac_status=$?
edfaf76d
LK
11643 grep -v '^ *+' conftest.er1 >conftest.err
11644 rm -f conftest.er1
11645 cat conftest.err >&5
b8bdffbe 11646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11647 (exit $ac_status); } && {
11648 test -z "$ac_c_werror_flag" ||
11649 test ! -s conftest.err
11650 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11651 ac_header_compiler=yes
11652else
11653 echo "$as_me: failed program was:" >&5
11654sed 's/^/| /' conftest.$ac_ext >&5
11655
ca81d7a0 11656 ac_header_compiler=no
b8bdffbe 11657fi
ca81d7a0
JD
11658
11659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11660{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11661echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11662
11663# Is the header present?
ca81d7a0
JD
11664{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11665echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11666cat >conftest.$ac_ext <<_ACEOF
11667/* confdefs.h. */
11668_ACEOF
11669cat confdefs.h >>conftest.$ac_ext
11670cat >>conftest.$ac_ext <<_ACEOF
11671/* end confdefs.h. */
11672#include <$ac_header>
11673_ACEOF
ca81d7a0
JD
11674if { (ac_try="$ac_cpp conftest.$ac_ext"
11675case "(($ac_try" in
11676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11677 *) ac_try_echo=$ac_try;;
11678esac
11679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11681 ac_status=$?
11682 grep -v '^ *+' conftest.er1 >conftest.err
11683 rm -f conftest.er1
11684 cat conftest.err >&5
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11686 (exit $ac_status); } >/dev/null && {
11687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11688 test ! -s conftest.err
11689 }; then
b8bdffbe
JD
11690 ac_header_preproc=yes
11691else
11692 echo "$as_me: failed program was:" >&5
11693sed 's/^/| /' conftest.$ac_ext >&5
11694
11695 ac_header_preproc=no
11696fi
ca81d7a0 11697
b8bdffbe 11698rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11699{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11700echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11701
11702# So? What about this header?
edfaf76d
LK
11703case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11704 yes:no: )
b8bdffbe
JD
11705 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11706echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11708echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11709 ac_header_preproc=yes
b8bdffbe 11710 ;;
edfaf76d 11711 no:yes:* )
b8bdffbe
JD
11712 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11713echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11714 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11715echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11716 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11717echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11718 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11719echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11720 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11721echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11722 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11723echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11724
b8bdffbe
JD
11725 ;;
11726esac
ca81d7a0
JD
11727{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11729if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11730 echo $ECHO_N "(cached) $ECHO_C" >&6
11731else
edfaf76d 11732 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11733fi
ca81d7a0
JD
11734ac_res=`eval echo '${'$as_ac_Header'}'`
11735 { echo "$as_me:$LINENO: result: $ac_res" >&5
11736echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11737
11738fi
11739if test `eval echo '${'$as_ac_Header'}'` = yes; then
11740 cat >>confdefs.h <<_ACEOF
11741#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11742_ACEOF
11743
11744fi
11745
11746done
11747
11748 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11749 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11750echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11751if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11752 echo $ECHO_N "(cached) $ECHO_C" >&6
11753else
11754 ac_check_lib_save_LIBS=$LIBS
11755LIBS="-lpthread $LIBS"
11756cat >conftest.$ac_ext <<_ACEOF
11757/* confdefs.h. */
11758_ACEOF
11759cat confdefs.h >>conftest.$ac_ext
11760cat >>conftest.$ac_ext <<_ACEOF
11761/* end confdefs.h. */
11762
ca81d7a0
JD
11763/* Override any GCC internal prototype to avoid an error.
11764 Use char because int might match the return type of a GCC
11765 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11766#ifdef __cplusplus
11767extern "C"
11768#endif
b8bdffbe
JD
11769char pthread_self ();
11770int
11771main ()
11772{
ca81d7a0 11773return pthread_self ();
b8bdffbe
JD
11774 ;
11775 return 0;
11776}
11777_ACEOF
11778rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11779if { (ac_try="$ac_link"
11780case "(($ac_try" in
11781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11782 *) ac_try_echo=$ac_try;;
11783esac
11784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11785 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11786 ac_status=$?
edfaf76d
LK
11787 grep -v '^ *+' conftest.er1 >conftest.err
11788 rm -f conftest.er1
11789 cat conftest.err >&5
b8bdffbe 11790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11791 (exit $ac_status); } && {
11792 test -z "$ac_c_werror_flag" ||
11793 test ! -s conftest.err
11794 } && test -s conftest$ac_exeext &&
11795 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11796 ac_cv_lib_pthread_pthread_self=yes
11797else
11798 echo "$as_me: failed program was:" >&5
11799sed 's/^/| /' conftest.$ac_ext >&5
11800
ca81d7a0 11801 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11802fi
ca81d7a0 11803
f053c89f 11804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11805 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11806LIBS=$ac_check_lib_save_LIBS
11807fi
ca81d7a0
JD
11808{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11809echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11810if test $ac_cv_lib_pthread_pthread_self = yes; then
11811 HAVE_GTK_AND_PTHREAD=yes
11812fi
11813
11814 fi
11815 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11816 case "${canonical}" in
11817 *-hpux*) ;;
11818 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11819 esac
b8bdffbe
JD
11820
11821cat >>confdefs.h <<\_ACEOF
11822#define HAVE_GTK_AND_PTHREAD 1
11823_ACEOF
11824
11825 fi
57669b57 11826 fi
488dd4c4
JD
11827fi
11828
131e4133
MA
11829HAVE_DBUS=no
11830if test "${with_dbus}" = "yes"; then
cffe4909
MH
11831
11832 succeeded=no
11833
00b9c927 11834 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11835set dummy pkg-config; ac_word=$2
11836{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11837echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11838if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11839 echo $ECHO_N "(cached) $ECHO_C" >&6
11840else
cffe4909
MH
11841 case $PKG_CONFIG in
11842 [\\/]* | ?:[\\/]*)
11843 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11844 ;;
11845 *)
11846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11847for as_dir in $PATH
11848do
11849 IFS=$as_save_IFS
11850 test -z "$as_dir" && as_dir=.
11851 for ac_exec_ext in '' $ac_executable_extensions; do
11852 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11853 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11854 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11855 break 2
11856 fi
11857done
11858done
11859IFS=$as_save_IFS
131e4133 11860
cffe4909
MH
11861 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11862 ;;
131e4133 11863esac
cffe4909
MH
11864fi
11865PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11866if test -n "$PKG_CONFIG"; then
11867 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11868echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11869else
cffe4909
MH
11870 { echo "$as_me:$LINENO: result: no" >&5
11871echo "${ECHO_T}no" >&6; }
131e4133
MA
11872fi
11873
cffe4909 11874
cffe4909
MH
11875
11876 if test "$PKG_CONFIG" = "no" ; then
11877 HAVE_DBUS=no
11878 else
11879 PKG_CONFIG_MIN_VERSION=0.9.0
11880 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11881 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11882echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11883
11884 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11885 { echo "$as_me:$LINENO: result: yes" >&5
11886echo "${ECHO_T}yes" >&6; }
11887 succeeded=yes
11888
11889 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11890echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11891 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11892 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11893echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11894
11895 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11896echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11897 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11898 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11899echo "${ECHO_T}$DBUS_LIBS" >&6; }
11900 else
11901 { echo "$as_me:$LINENO: result: no" >&5
11902echo "${ECHO_T}no" >&6; }
11903 DBUS_CFLAGS=""
11904 DBUS_LIBS=""
11905 ## If we have a custom action on failure, don't print errors, but
11906 ## do set a variable so people can do so.
11907 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11908
11909 fi
11910
11911
11912
11913 else
11914 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11915 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11916 fi
11917 fi
11918
11919 if test $succeeded = yes; then
11920 HAVE_DBUS=yes
11921 else
11922 HAVE_DBUS=no
11923 fi
131e4133
MA
11924
11925 if test "$HAVE_DBUS" = yes; then
11926
11927cat >>confdefs.h <<\_ACEOF
11928#define HAVE_DBUS 1
11929_ACEOF
11930
131e4133
MA
11931 fi
11932fi
11933
b3615392 11934HAVE_XAW3D=no
991a7602 11935if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11936 if test "$with_xaw3d" != no; then
11937 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11938echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11939 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11940 echo $ECHO_N "(cached) $ECHO_C" >&6
11941else
11942 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11943/* confdefs.h. */
11944_ACEOF
11945cat confdefs.h >>conftest.$ac_ext
11946cat >>conftest.$ac_ext <<_ACEOF
11947/* end confdefs.h. */
98418dba
CW
11948
11949#include <X11/Intrinsic.h>
b3615392 11950#include <X11/Xaw3d/Simple.h>
98418dba
CW
11951int
11952main ()
11953{
11954
11955 ;
11956 return 0;
11957}
11958_ACEOF
11959rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11960if { (ac_try="$ac_link"
11961case "(($ac_try" in
11962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11963 *) ac_try_echo=$ac_try;;
11964esac
11965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11966 (eval "$ac_link") 2>conftest.er1
98418dba 11967 ac_status=$?
edfaf76d
LK
11968 grep -v '^ *+' conftest.er1 >conftest.err
11969 rm -f conftest.er1
11970 cat conftest.err >&5
c0d27fcc 11971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11972 (exit $ac_status); } && {
11973 test -z "$ac_c_werror_flag" ||
11974 test ! -s conftest.err
11975 } && test -s conftest$ac_exeext &&
11976 $as_test_x conftest$ac_exeext; then
b3615392 11977 emacs_cv_xaw3d=yes
98418dba
CW
11978else
11979 echo "$as_me: failed program was:" >&5
19650fd6
AS
11980sed 's/^/| /' conftest.$ac_ext >&5
11981
b3615392 11982 emacs_cv_xaw3d=no
98418dba 11983fi
ca81d7a0 11984
f053c89f 11985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11986 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11987fi
11988
9d89ffd0 11989 else
f23d76bd 11990 emacs_cv_xaw3d=no
9d89ffd0 11991 fi
f23d76bd
MB
11992 if test $emacs_cv_xaw3d = yes; then
11993 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11994echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11995 USE_X_TOOLKIT=LUCID
11996 HAVE_XAW3D=yes
9d89ffd0 11997
b3615392
MB
11998cat >>confdefs.h <<\_ACEOF
11999#define HAVE_XAW3D 1
12000_ACEOF
9d89ffd0 12001
f23d76bd
MB
12002 else
12003 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 12004echo "${ECHO_T}no" >&6; }
f23d76bd 12005 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 12006echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 12007 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 12008 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 12009else
b3615392 12010 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
12011/* confdefs.h. */
12012_ACEOF
12013cat confdefs.h >>conftest.$ac_ext
12014cat >>conftest.$ac_ext <<_ACEOF
12015/* end confdefs.h. */
b3615392
MB
12016
12017#include <X11/Intrinsic.h>
12018#include <X11/Xaw/Simple.h>
12019int
12020main ()
12021{
12022
12023 ;
12024 return 0;
12025}
9d89ffd0 12026_ACEOF
b3615392
MB
12027rm -f conftest.$ac_objext conftest$ac_exeext
12028if { (ac_try="$ac_link"
9d89ffd0
JD
12029case "(($ac_try" in
12030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12031 *) ac_try_echo=$ac_try;;
12032esac
12033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 12034 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
12035 ac_status=$?
12036 grep -v '^ *+' conftest.er1 >conftest.err
12037 rm -f conftest.er1
12038 cat conftest.err >&5
12039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040 (exit $ac_status); } && {
12041 test -z "$ac_c_werror_flag" ||
12042 test ! -s conftest.err
b3615392
MB
12043 } && test -s conftest$ac_exeext &&
12044 $as_test_x conftest$ac_exeext; then
12045 emacs_cv_xaw=yes
9d89ffd0
JD
12046else
12047 echo "$as_me: failed program was:" >&5
12048sed 's/^/| /' conftest.$ac_ext >&5
12049
b3615392 12050 emacs_cv_xaw=no
9d89ffd0
JD
12051fi
12052
b3615392
MB
12053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12054 conftest$ac_exeext conftest.$ac_ext
12055fi
9d89ffd0 12056
f23d76bd
MB
12057 if test $emacs_cv_xaw = yes; then
12058 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 12059echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
12060 USE_X_TOOLKIT=LUCID
12061 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12062 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
12063echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12064 { (exit 1); exit 1; }; }
f23d76bd
MB
12065 else
12066 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 12067echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 12068 USE_X_TOOLKIT=none
98418dba 12069 fi
98418dba
CW
12070 fi
12071fi
12072
12073X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12074
12075if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12076 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12077echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12078 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12079 echo $ECHO_N "(cached) $ECHO_C" >&6
12080else
12081 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
98418dba 12087#include <X11/Intrinsic.h>
98418dba
CW
12088int
12089main ()
12090{
12091#if XtSpecificationRelease < 6
12092fail;
12093#endif
12094
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12100if { (ac_try="$ac_link"
12101case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
12105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12106 (eval "$ac_link") 2>conftest.er1
98418dba 12107 ac_status=$?
edfaf76d
LK
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
c0d27fcc 12111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest$ac_exeext &&
12116 $as_test_x conftest$ac_exeext; then
98418dba
CW
12117 emacs_cv_x11_toolkit_version_6=yes
12118else
12119 echo "$as_me: failed program was:" >&5
19650fd6
AS
12120sed 's/^/| /' conftest.$ac_ext >&5
12121
ca81d7a0 12122 emacs_cv_x11_toolkit_version_6=no
98418dba 12123fi
ca81d7a0 12124
f053c89f 12125rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12126 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12127fi
12128
12129 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12130 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12131 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12132echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12133
c0d27fcc 12134cat >>confdefs.h <<\_ACEOF
98418dba 12135#define HAVE_X11XTR6 1
c0d27fcc 12136_ACEOF
98418dba
CW
12137
12138 else
ca81d7a0
JD
12139 { echo "$as_me:$LINENO: result: before 6" >&5
12140echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12141 fi
12142
12143 OLDLIBS="$LIBS"
12144 if test x$HAVE_X11XTR6 = xyes; then
12145 LIBS="-lXt -lSM -lICE $LIBS"
12146 else
12147 LIBS="-lXt $LIBS"
12148 fi
12149
ca81d7a0
JD
12150{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12151echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12152if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12153 echo $ECHO_N "(cached) $ECHO_C" >&6
12154else
12155 ac_check_lib_save_LIBS=$LIBS
12156LIBS="-lXmu $LIBS"
12157cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12158/* confdefs.h. */
12159_ACEOF
12160cat confdefs.h >>conftest.$ac_ext
12161cat >>conftest.$ac_ext <<_ACEOF
12162/* end confdefs.h. */
98418dba 12163
ca81d7a0
JD
12164/* Override any GCC internal prototype to avoid an error.
12165 Use char because int might match the return type of a GCC
12166 builtin and then its argument prototype would still apply. */
98418dba
CW
12167#ifdef __cplusplus
12168extern "C"
12169#endif
98418dba 12170char XmuConvertStandardSelection ();
98418dba
CW
12171int
12172main ()
12173{
ca81d7a0 12174return XmuConvertStandardSelection ();
98418dba
CW
12175 ;
12176 return 0;
12177}
12178_ACEOF
12179rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12180if { (ac_try="$ac_link"
12181case "(($ac_try" in
12182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12183 *) ac_try_echo=$ac_try;;
12184esac
12185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12186 (eval "$ac_link") 2>conftest.er1
98418dba 12187 ac_status=$?
edfaf76d
LK
12188 grep -v '^ *+' conftest.er1 >conftest.err
12189 rm -f conftest.er1
12190 cat conftest.err >&5
c0d27fcc 12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12192 (exit $ac_status); } && {
12193 test -z "$ac_c_werror_flag" ||
12194 test ! -s conftest.err
12195 } && test -s conftest$ac_exeext &&
12196 $as_test_x conftest$ac_exeext; then
98418dba
CW
12197 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12198else
12199 echo "$as_me: failed program was:" >&5
19650fd6
AS
12200sed 's/^/| /' conftest.$ac_ext >&5
12201
ca81d7a0 12202 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12203fi
ca81d7a0 12204
f053c89f 12205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12206 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12207LIBS=$ac_check_lib_save_LIBS
12208fi
ca81d7a0
JD
12209{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12210echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12211if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12212 cat >>confdefs.h <<_ACEOF
98418dba 12213#define HAVE_LIBXMU 1
c0d27fcc 12214_ACEOF
98418dba
CW
12215
12216 LIBS="-lXmu $LIBS"
12217
12218fi
12219
12220 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12221fi
12222
12223# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12224if test "${HAVE_X11}" = "yes"; then
12225 if test "${USE_X_TOOLKIT}" != "none"; then
12226
ca81d7a0
JD
12227{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12228echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12229if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12230 echo $ECHO_N "(cached) $ECHO_C" >&6
12231else
12232 ac_check_lib_save_LIBS=$LIBS
12233LIBS="-lXext $LIBS"
12234cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12235/* confdefs.h. */
12236_ACEOF
12237cat confdefs.h >>conftest.$ac_ext
12238cat >>conftest.$ac_ext <<_ACEOF
12239/* end confdefs.h. */
98418dba 12240
ca81d7a0
JD
12241/* Override any GCC internal prototype to avoid an error.
12242 Use char because int might match the return type of a GCC
12243 builtin and then its argument prototype would still apply. */
98418dba
CW
12244#ifdef __cplusplus
12245extern "C"
12246#endif
98418dba 12247char XShapeQueryExtension ();
98418dba
CW
12248int
12249main ()
12250{
ca81d7a0 12251return XShapeQueryExtension ();
98418dba
CW
12252 ;
12253 return 0;
12254}
12255_ACEOF
12256rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12257if { (ac_try="$ac_link"
12258case "(($ac_try" in
12259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12260 *) ac_try_echo=$ac_try;;
12261esac
12262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12263 (eval "$ac_link") 2>conftest.er1
98418dba 12264 ac_status=$?
edfaf76d
LK
12265 grep -v '^ *+' conftest.er1 >conftest.err
12266 rm -f conftest.er1
12267 cat conftest.err >&5
c0d27fcc 12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12269 (exit $ac_status); } && {
12270 test -z "$ac_c_werror_flag" ||
12271 test ! -s conftest.err
12272 } && test -s conftest$ac_exeext &&
12273 $as_test_x conftest$ac_exeext; then
98418dba
CW
12274 ac_cv_lib_Xext_XShapeQueryExtension=yes
12275else
12276 echo "$as_me: failed program was:" >&5
19650fd6
AS
12277sed 's/^/| /' conftest.$ac_ext >&5
12278
ca81d7a0 12279 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12280fi
ca81d7a0 12281
f053c89f 12282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12283 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12284LIBS=$ac_check_lib_save_LIBS
12285fi
ca81d7a0
JD
12286{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12287echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12288if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12289 cat >>confdefs.h <<_ACEOF
98418dba 12290#define HAVE_LIBXEXT 1
c0d27fcc 12291_ACEOF
98418dba
CW
12292
12293 LIBS="-lXext $LIBS"
12294
12295fi
12296
12297 fi
12298fi
12299
12300if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12301 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12302echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12303if test "${emacs_cv_motif_version_2_1+set}" = set; then
12304 echo $ECHO_N "(cached) $ECHO_C" >&6
12305else
12306 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
98418dba 12312#include <Xm/Xm.h>
98418dba
CW
12313int
12314main ()
12315{
12316#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12317int x = 5;
12318#else
12319Motif version prior to 2.1.
12320#endif
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
ca81d7a0
JD
12326if { (ac_try="$ac_compile"
12327case "(($ac_try" in
12328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329 *) ac_try_echo=$ac_try;;
12330esac
12331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12332 (eval "$ac_compile") 2>conftest.er1
98418dba 12333 ac_status=$?
edfaf76d
LK
12334 grep -v '^ *+' conftest.er1 >conftest.err
12335 rm -f conftest.er1
12336 cat conftest.err >&5
c0d27fcc 12337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12338 (exit $ac_status); } && {
12339 test -z "$ac_c_werror_flag" ||
12340 test ! -s conftest.err
12341 } && test -s conftest.$ac_objext; then
98418dba
CW
12342 emacs_cv_motif_version_2_1=yes
12343else
12344 echo "$as_me: failed program was:" >&5
19650fd6
AS
12345sed 's/^/| /' conftest.$ac_ext >&5
12346
ca81d7a0 12347 emacs_cv_motif_version_2_1=no
98418dba 12348fi
ca81d7a0
JD
12349
12350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12351fi
ca81d7a0
JD
12352{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12353echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12354 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12355 if test $emacs_cv_motif_version_2_1 = yes; then
12356 HAVE_LIBXP=no
b936fae4 12357
c0d27fcc 12358cat >>confdefs.h <<\_ACEOF
98418dba 12359#define HAVE_MOTIF_2_1 1
c0d27fcc 12360_ACEOF
98418dba 12361
ca81d7a0
JD
12362 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12363echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12364if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12365 echo $ECHO_N "(cached) $ECHO_C" >&6
12366else
12367 ac_check_lib_save_LIBS=$LIBS
12368LIBS="-lXp $LIBS"
12369cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12370/* confdefs.h. */
12371_ACEOF
12372cat confdefs.h >>conftest.$ac_ext
12373cat >>conftest.$ac_ext <<_ACEOF
12374/* end confdefs.h. */
98418dba 12375
ca81d7a0
JD
12376/* Override any GCC internal prototype to avoid an error.
12377 Use char because int might match the return type of a GCC
12378 builtin and then its argument prototype would still apply. */
98418dba
CW
12379#ifdef __cplusplus
12380extern "C"
12381#endif
98418dba 12382char XpCreateContext ();
98418dba
CW
12383int
12384main ()
12385{
ca81d7a0 12386return XpCreateContext ();
98418dba
CW
12387 ;
12388 return 0;
12389}
12390_ACEOF
12391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12392if { (ac_try="$ac_link"
12393case "(($ac_try" in
12394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12395 *) ac_try_echo=$ac_try;;
12396esac
12397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12398 (eval "$ac_link") 2>conftest.er1
98418dba 12399 ac_status=$?
edfaf76d
LK
12400 grep -v '^ *+' conftest.er1 >conftest.err
12401 rm -f conftest.er1
12402 cat conftest.err >&5
c0d27fcc 12403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12404 (exit $ac_status); } && {
12405 test -z "$ac_c_werror_flag" ||
12406 test ! -s conftest.err
12407 } && test -s conftest$ac_exeext &&
12408 $as_test_x conftest$ac_exeext; then
98418dba
CW
12409 ac_cv_lib_Xp_XpCreateContext=yes
12410else
12411 echo "$as_me: failed program was:" >&5
19650fd6
AS
12412sed 's/^/| /' conftest.$ac_ext >&5
12413
ca81d7a0 12414 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12415fi
ca81d7a0 12416
f053c89f 12417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12418 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12419LIBS=$ac_check_lib_save_LIBS
12420fi
ca81d7a0
JD
12421{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12422echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12423if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12424 HAVE_LIBXP=yes
12425fi
503d2be0 12426
98418dba 12427 if test ${HAVE_LIBXP} = yes; then
b936fae4 12428
c0d27fcc 12429cat >>confdefs.h <<\_ACEOF
98418dba 12430#define HAVE_LIBXP 1
c0d27fcc 12431_ACEOF
503d2be0 12432
98418dba 12433 fi
4693dbc9 12434 else
ca81d7a0
JD
12435 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12436echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12437if test "${emacs_cv_lesstif+set}" = set; then
12438 echo $ECHO_N "(cached) $ECHO_C" >&6
12439else
12440 # We put this in CFLAGS temporarily to precede other -I options
12441 # that might be in CFLAGS temporarily.
12442 # We put this in CPPFLAGS where it precedes the other -I options.
12443 OLD_CPPFLAGS=$CPPFLAGS
12444 OLD_CFLAGS=$CFLAGS
12445 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12446 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12447 cat >conftest.$ac_ext <<_ACEOF
12448/* confdefs.h. */
12449_ACEOF
12450cat confdefs.h >>conftest.$ac_ext
12451cat >>conftest.$ac_ext <<_ACEOF
12452/* end confdefs.h. */
12453#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12454int
12455main ()
12456{
12457int x = 5;
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext
ca81d7a0
JD
12463if { (ac_try="$ac_compile"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12470 ac_status=$?
edfaf76d
LK
12471 grep -v '^ *+' conftest.er1 >conftest.err
12472 rm -f conftest.er1
12473 cat conftest.err >&5
4693dbc9 12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12475 (exit $ac_status); } && {
12476 test -z "$ac_c_werror_flag" ||
12477 test ! -s conftest.err
12478 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12479 emacs_cv_lesstif=yes
12480else
12481 echo "$as_me: failed program was:" >&5
12482sed 's/^/| /' conftest.$ac_ext >&5
12483
ca81d7a0 12484 emacs_cv_lesstif=no
4693dbc9 12485fi
ca81d7a0
JD
12486
12487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12488fi
ca81d7a0
JD
12489{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12490echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12491 if test $emacs_cv_lesstif = yes; then
12492 # Make sure this -I option remains in CPPFLAGS after it is set
12493 # back to REAL_CPPFLAGS.
12494 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12495 # have those other -I options anyway. Ultimately, having this
12496 # directory ultimately in CPPFLAGS will be enough.
12497 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12498 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12499 else
12500 CFLAGS=$OLD_CFLAGS
12501 CPPFLAGS=$OLD_CPPFLAGS
12502 fi
98418dba
CW
12503 fi
12504fi
12505
c0d27fcc
MR
12506
12507
98418dba
CW
12508USE_TOOLKIT_SCROLL_BARS=no
12509if test "${with_toolkit_scroll_bars}" != "no"; then
12510 if test "${USE_X_TOOLKIT}" != "none"; then
12511 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12512 cat >>confdefs.h <<\_ACEOF
98418dba 12513#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12514_ACEOF
98418dba
CW
12515
12516 HAVE_XAW3D=no
12517 USE_TOOLKIT_SCROLL_BARS=yes
12518 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12519 cat >>confdefs.h <<\_ACEOF
98418dba 12520#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12521_ACEOF
98418dba
CW
12522
12523 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12524 fi
488dd4c4
JD
12525 elif test "${HAVE_GTK}" = "yes"; then
12526 cat >>confdefs.h <<\_ACEOF
12527#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12528_ACEOF
12529
12530 USE_TOOLKIT_SCROLL_BARS=yes
12531 elif test "${HAVE_CARBON}" = "yes"; then
12532 cat >>confdefs.h <<\_ACEOF
12533#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12534_ACEOF
12535
12536 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12537 fi
12538fi
12539
abd39b57 12540cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12541/* confdefs.h. */
12542_ACEOF
12543cat confdefs.h >>conftest.$ac_ext
12544cat >>conftest.$ac_ext <<_ACEOF
12545/* end confdefs.h. */
12546
12547 #include <X11/Xlib.h>
12548 #include <X11/Xresource.h>
12549int
12550main ()
12551{
12552XIMProc callback;
12553 ;
12554 return 0;
12555}
12556_ACEOF
12557rm -f conftest.$ac_objext
ca81d7a0
JD
12558if { (ac_try="$ac_compile"
12559case "(($ac_try" in
12560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12561 *) ac_try_echo=$ac_try;;
12562esac
12563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12564 (eval "$ac_compile") 2>conftest.er1
abd39b57 12565 ac_status=$?
edfaf76d
LK
12566 grep -v '^ *+' conftest.er1 >conftest.err
12567 rm -f conftest.er1
12568 cat conftest.err >&5
abd39b57 12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12570 (exit $ac_status); } && {
12571 test -z "$ac_c_werror_flag" ||
12572 test ! -s conftest.err
12573 } && test -s conftest.$ac_objext; then
abd39b57
AC
12574 HAVE_XIM=yes
12575
12576cat >>confdefs.h <<\_ACEOF
12577#define HAVE_XIM 1
12578_ACEOF
12579
12580else
12581 echo "$as_me: failed program was:" >&5
12582sed 's/^/| /' conftest.$ac_ext >&5
12583
ca81d7a0 12584 HAVE_XIM=no
abd39b57 12585fi
ca81d7a0
JD
12586
12587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12588
c0d27fcc 12589
98418dba 12590if test "${with_xim}" != "no"; then
b936fae4 12591
c0d27fcc 12592cat >>confdefs.h <<\_ACEOF
98418dba 12593#define USE_XIM 1
c0d27fcc 12594_ACEOF
98418dba 12595
793fa0d7 12596fi
abd39b57
AC
12597
12598
12599if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12600 late_CFLAGS=$CFLAGS
12601 if test "$GCC" = yes; then
12602 CFLAGS="$CFLAGS --pedantic-errors"
12603 fi
cffcede7 12604 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12605/* confdefs.h. */
12606_ACEOF
12607cat confdefs.h >>conftest.$ac_ext
12608cat >>conftest.$ac_ext <<_ACEOF
12609/* end confdefs.h. */
cffcede7
JD
12610
12611#include <X11/Xlib.h>
12612#include <X11/Xresource.h>
12613int
12614main ()
12615{
12616Display *display;
12617XrmDatabase db;
12618char *res_name;
12619char *res_class;
12620XIMProc callback;
12621XPointer *client_data;
849d80cf
DL
12622#ifndef __GNUC__
12623/* If we're not using GCC, it's probably not XFree86, and this is
12624 probably right, but we can't use something like --pedantic-errors. */
12625extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12626 char*, XIMProc, XPointer*);
12627#endif
cffcede7
JD
12628(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12629 client_data);
12630 ;
12631 return 0;
12632}
12633_ACEOF
12634rm -f conftest.$ac_objext
ca81d7a0
JD
12635if { (ac_try="$ac_compile"
12636case "(($ac_try" in
12637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12638 *) ac_try_echo=$ac_try;;
12639esac
12640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12641 (eval "$ac_compile") 2>conftest.er1
cffcede7 12642 ac_status=$?
edfaf76d
LK
12643 grep -v '^ *+' conftest.er1 >conftest.err
12644 rm -f conftest.er1
12645 cat conftest.err >&5
cffcede7 12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12647 (exit $ac_status); } && {
12648 test -z "$ac_c_werror_flag" ||
12649 test ! -s conftest.err
12650 } && test -s conftest.$ac_objext; then
cffcede7
JD
12651 emacs_cv_arg6_star=yes
12652else
12653 echo "$as_me: failed program was:" >&5
19650fd6
AS
12654sed 's/^/| /' conftest.$ac_ext >&5
12655
ca81d7a0 12656
cffcede7 12657fi
ca81d7a0
JD
12658
12659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12660
12661 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12662 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12663#define XRegisterIMInstantiateCallback_arg6 XPointer*
12664_ACEOF
12665
12666 else
f57bd967 12667 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12668#define XRegisterIMInstantiateCallback_arg6 XPointer
12669_ACEOF
12670
12671 fi
849d80cf 12672 CFLAGS=$late_CFLAGS
45a4b03e
KH
12673fi
12674
77dfeef5
GM
12675### Start of font-backend section.
12676if test "${HAVE_X11}" != "yes"; then
12677 USE_FONT_BACKEND=no
12678fi
45a4b03e 12679
77dfeef5 12680if test "${USE_FONT_BACKEND}" = "yes"; then
45a4b03e
KH
12681
12682cat >>confdefs.h <<\_ACEOF
12683#define USE_FONT_BACKEND 1
12684_ACEOF
12685
12686
77dfeef5
GM
12687 ## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12688 HAVE_XFT=maybe
45a4b03e
KH
12689 if test "x${with_freetype}" = "xno"; then
12690 with_xft="no";
12691 fi
12692 if test "x${with_xft}" != "xno"; then
12693
45a4b03e
KH
12694
12695 succeeded=no
12696
d235ca2f 12697 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12698set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12699{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12700echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12701if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12702 echo $ECHO_N "(cached) $ECHO_C" >&6
12703else
12704 case $PKG_CONFIG in
12705 [\\/]* | ?:[\\/]*)
12706 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12707 ;;
12708 *)
12709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712 IFS=$as_save_IFS
12713 test -z "$as_dir" && as_dir=.
12714 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12716 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12717 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12718 break 2
12719 fi
12720done
12721done
c24fa7dc 12722IFS=$as_save_IFS
45a4b03e
KH
12723
12724 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12725 ;;
12726esac
12727fi
12728PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12729if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12730 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12731echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12732else
c24fa7dc
MB
12733 { echo "$as_me:$LINENO: result: no" >&5
12734echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12735fi
12736
c24fa7dc 12737
45a4b03e
KH
12738
12739 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12740 HAVE_XFT=no
45a4b03e
KH
12741 else
12742 PKG_CONFIG_MIN_VERSION=0.9.0
12743 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12744 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12745echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12746
c24fa7dc
MB
12747 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12748 { echo "$as_me:$LINENO: result: yes" >&5
12749echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12750 succeeded=yes
12751
c24fa7dc
MB
12752 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12753echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12754 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12755 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12756echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12757
c24fa7dc
MB
12758 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12759echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12760 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12761 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12762echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12763 else
c24fa7dc
MB
12764 { echo "$as_me:$LINENO: result: no" >&5
12765echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12766 XFT_CFLAGS=""
12767 XFT_LIBS=""
12768 ## If we have a custom action on failure, don't print errors, but
12769 ## do set a variable so people can do so.
12770 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12771
12772 fi
12773
12774
12775
12776 else
12777 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12778 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12779 fi
12780 fi
12781
12782 if test $succeeded = yes; then
12783 :
12784 else
12785 HAVE_XFT=no
12786 fi
12787
12788 if test "$HAVE_XFT" != no; then
12789 OLD_CPPFLAGS="$CPPFLAGS"
12790 OLD_CFLAGS="$CFLAGS"
12791 OLD_LIBS="$LIBS"
12792 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12793 CFLAGS="$CFLAGS $XFT_CFLAGS"
12794 LIBS="$XFT_LIBS $LIBS"
12795 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12796 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12797echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12798if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12799 echo $ECHO_N "(cached) $ECHO_C" >&6
12800fi
c24fa7dc
MB
12801{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12802echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12803else
12804 # Is the header compilable?
c24fa7dc
MB
12805{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12806echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12807cat >conftest.$ac_ext <<_ACEOF
12808/* confdefs.h. */
12809_ACEOF
12810cat confdefs.h >>conftest.$ac_ext
12811cat >>conftest.$ac_ext <<_ACEOF
12812/* end confdefs.h. */
12813$ac_includes_default
12814#include <X11/Xft/Xft.h>
12815_ACEOF
12816rm -f conftest.$ac_objext
c24fa7dc
MB
12817if { (ac_try="$ac_compile"
12818case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;;
12821esac
12822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12823 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12824 ac_status=$?
12825 grep -v '^ *+' conftest.er1 >conftest.err
12826 rm -f conftest.er1
12827 cat conftest.err >&5
12828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12829 (exit $ac_status); } && {
12830 test -z "$ac_c_werror_flag" ||
12831 test ! -s conftest.err
12832 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12833 ac_header_compiler=yes
12834else
12835 echo "$as_me: failed program was:" >&5
12836sed 's/^/| /' conftest.$ac_ext >&5
12837
c24fa7dc 12838 ac_header_compiler=no
45a4b03e 12839fi
c24fa7dc
MB
12840
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12842{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12843echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12844
12845# Is the header present?
c24fa7dc
MB
12846{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12847echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12848cat >conftest.$ac_ext <<_ACEOF
12849/* confdefs.h. */
12850_ACEOF
12851cat confdefs.h >>conftest.$ac_ext
12852cat >>conftest.$ac_ext <<_ACEOF
12853/* end confdefs.h. */
12854#include <X11/Xft/Xft.h>
12855_ACEOF
c24fa7dc
MB
12856if { (ac_try="$ac_cpp conftest.$ac_ext"
12857case "(($ac_try" in
12858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12859 *) ac_try_echo=$ac_try;;
12860esac
12861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12862 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12863 ac_status=$?
12864 grep -v '^ *+' conftest.er1 >conftest.err
12865 rm -f conftest.er1
12866 cat conftest.err >&5
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12868 (exit $ac_status); } >/dev/null && {
12869 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12870 test ! -s conftest.err
12871 }; then
45a4b03e
KH
12872 ac_header_preproc=yes
12873else
12874 echo "$as_me: failed program was:" >&5
12875sed 's/^/| /' conftest.$ac_ext >&5
12876
12877 ac_header_preproc=no
12878fi
c24fa7dc 12879
45a4b03e 12880rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12881{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12882echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12883
12884# So? What about this header?
12885case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12886 yes:no: )
12887 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12888echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12889 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12890echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12891 ac_header_preproc=yes
12892 ;;
12893 no:yes:* )
12894 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12895echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12896 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12897echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12898 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12899echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12900 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12901echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12902 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12903echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12904 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12905echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12906
45a4b03e
KH
12907 ;;
12908esac
c24fa7dc
MB
12909{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12910echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12911if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12912 echo $ECHO_N "(cached) $ECHO_C" >&6
12913else
12914 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12915fi
c24fa7dc
MB
12916{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12917echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12918
12919fi
12920if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12921 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12922echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12923if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12925else
12926 ac_check_lib_save_LIBS=$LIBS
12927LIBS="-lXft $XFT_LIBS $LIBS"
12928cat >conftest.$ac_ext <<_ACEOF
12929/* confdefs.h. */
12930_ACEOF
12931cat confdefs.h >>conftest.$ac_ext
12932cat >>conftest.$ac_ext <<_ACEOF
12933/* end confdefs.h. */
12934
c24fa7dc
MB
12935/* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12938#ifdef __cplusplus
12939extern "C"
12940#endif
45a4b03e
KH
12941char XftFontOpen ();
12942int
12943main ()
12944{
c24fa7dc 12945return XftFontOpen ();
45a4b03e
KH
12946 ;
12947 return 0;
12948}
12949_ACEOF
12950rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12951if { (ac_try="$ac_link"
12952case "(($ac_try" in
12953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12954 *) ac_try_echo=$ac_try;;
12955esac
12956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12957 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12958 ac_status=$?
12959 grep -v '^ *+' conftest.er1 >conftest.err
12960 rm -f conftest.er1
12961 cat conftest.err >&5
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12963 (exit $ac_status); } && {
12964 test -z "$ac_c_werror_flag" ||
12965 test ! -s conftest.err
12966 } && test -s conftest$ac_exeext &&
12967 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12968 ac_cv_lib_Xft_XftFontOpen=yes
12969else
12970 echo "$as_me: failed program was:" >&5
12971sed 's/^/| /' conftest.$ac_ext >&5
12972
c24fa7dc 12973 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12974fi
c24fa7dc
MB
12975
12976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12977 conftest$ac_exeext conftest.$ac_ext
12978LIBS=$ac_check_lib_save_LIBS
12979fi
c24fa7dc
MB
12980{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12981echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12982if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12983 HAVE_XFT=yes
12984fi
12985
12986fi
12987
12988
12989
12990 if test "${HAVE_XFT}" = "yes"; then
12991
12992cat >>confdefs.h <<\_ACEOF
12993#define HAVE_XFT 1
12994_ACEOF
12995
12996
12997 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12998 else
e70b2110 12999 CPPFLAGS="$OLD_CPPFLAGS"
45a4b03e
KH
13000 CFLAGS="$OLD_CFLAGS"
13001 LIBS="$OLD_LIBS"
77dfeef5
GM
13002 fi # "${HAVE_XFT}" = "yes"
13003 fi # "$HAVE_XFT" != no
13004 fi # "x${with_xft}" != "xno"
13005
13006 if test "$HAVE_XFT" != "yes"; then
13007 HAVE_XFT=no
45a4b03e 13008 fi
2ee27f27 13009
45a4b03e 13010
77dfeef5
GM
13011 HAVE_FREETYPE=no
13012 ### Use -lfreetype if available, unless `--with-freetype=no'.
13013 if test "${HAVE_XFT}" = "yes"; then
13014 HAVE_FREETYPE=yes
13015 elif test "x${with_freetype}" != "xno"; then
45a4b03e 13016
d235ca2f 13017
45a4b03e
KH
13018 succeeded=no
13019
d235ca2f 13020 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13021set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13022{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13023echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13024if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
13026else
13027 case $PKG_CONFIG in
13028 [\\/]* | ?:[\\/]*)
13029 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13030 ;;
13031 *)
13032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13033for as_dir in $PATH
13034do
13035 IFS=$as_save_IFS
13036 test -z "$as_dir" && as_dir=.
13037 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13038 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13039 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13040 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13041 break 2
13042 fi
13043done
13044done
c24fa7dc 13045IFS=$as_save_IFS
45a4b03e
KH
13046
13047 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13048 ;;
13049esac
13050fi
13051PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13052if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13053 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13054echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13055else
c24fa7dc
MB
13056 { echo "$as_me:$LINENO: result: no" >&5
13057echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13058fi
13059
c24fa7dc 13060
45a4b03e
KH
13061
13062 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13063 HAVE_FREETYPE=no
45a4b03e
KH
13064 else
13065 PKG_CONFIG_MIN_VERSION=0.9.0
13066 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13067 { echo "$as_me:$LINENO: checking for freetype2" >&5
13068echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13069
c24fa7dc
MB
13070 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13071 { echo "$as_me:$LINENO: result: yes" >&5
13072echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13073 succeeded=yes
13074
c24fa7dc
MB
13075 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13076echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13077 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13078 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13079echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13080
c24fa7dc
MB
13081 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13082echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13083 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13084 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13085echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13086 else
c24fa7dc
MB
13087 { echo "$as_me:$LINENO: result: no" >&5
13088echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13089 FREETYPE_CFLAGS=""
13090 FREETYPE_LIBS=""
13091 ## If we have a custom action on failure, don't print errors, but
13092 ## do set a variable so people can do so.
13093 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13094
13095 fi
13096
13097
13098
13099 else
13100 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13101 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13102 fi
13103 fi
13104
13105 if test $succeeded = yes; then
13106 HAVE_FREETYPE=yes
13107 else
13108 HAVE_FREETYPE=no
13109 fi
13110
77dfeef5 13111 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13112
13113 succeeded=no
13114
d235ca2f 13115 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13116set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13117{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13118echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13119if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13120 echo $ECHO_N "(cached) $ECHO_C" >&6
13121else
13122 case $PKG_CONFIG in
13123 [\\/]* | ?:[\\/]*)
13124 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13125 ;;
13126 *)
13127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13128for as_dir in $PATH
13129do
13130 IFS=$as_save_IFS
13131 test -z "$as_dir" && as_dir=.
13132 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13134 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13135 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13136 break 2
13137 fi
13138done
13139done
c24fa7dc 13140IFS=$as_save_IFS
45a4b03e
KH
13141
13142 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13143 ;;
13144esac
13145fi
13146PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13147if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13148 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13149echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13150else
c24fa7dc
MB
13151 { echo "$as_me:$LINENO: result: no" >&5
13152echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13153fi
13154
c24fa7dc 13155
45a4b03e
KH
13156
13157 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13158 HAVE_FC=no
45a4b03e
KH
13159 else
13160 PKG_CONFIG_MIN_VERSION=0.9.0
13161 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13162 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13163echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13164
c24fa7dc
MB
13165 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13166 { echo "$as_me:$LINENO: result: yes" >&5
13167echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13168 succeeded=yes
13169
c24fa7dc
MB
13170 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13171echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13172 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13173 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13174echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13175
c24fa7dc
MB
13176 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13177echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13178 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13179 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13180echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13181 else
c24fa7dc
MB
13182 { echo "$as_me:$LINENO: result: no" >&5
13183echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13184 FONTCONFIG_CFLAGS=""
13185 FONTCONFIG_LIBS=""
13186 ## If we have a custom action on failure, don't print errors, but
13187 ## do set a variable so people can do so.
13188 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13189
13190 fi
13191
13192
13193
13194 else
13195 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13196 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13197 fi
13198 fi
13199
13200 if test $succeeded = yes; then
13201 HAVE_FC=yes
13202 else
13203 HAVE_FC=no
13204 fi
13205
77dfeef5
GM
13206 if test "${HAVE_FC}" = "no"; then
13207 HAVE_FREETYPE=no
13208 fi
45a4b03e
KH
13209 fi
13210 fi
e70b2110 13211
77dfeef5
GM
13212 HAVE_LIBOTF=no
13213 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13214
13215cat >>confdefs.h <<\_ACEOF
13216#define HAVE_FREETYPE 1
13217_ACEOF
13218
77dfeef5 13219 if test "${with_libotf}" != "no"; then
e70b2110
KH
13220
13221 succeeded=no
13222
d235ca2f 13223 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13224set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13227if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13228 echo $ECHO_N "(cached) $ECHO_C" >&6
13229else
e70b2110
KH
13230 case $PKG_CONFIG in
13231 [\\/]* | ?:[\\/]*)
13232 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13233 ;;
13234 *)
13235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13236for as_dir in $PATH
13237do
13238 IFS=$as_save_IFS
13239 test -z "$as_dir" && as_dir=.
13240 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13241 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13242 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13243 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13244 break 2
13245 fi
13246done
13247done
c24fa7dc 13248IFS=$as_save_IFS
45a4b03e 13249
e70b2110
KH
13250 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13251 ;;
13252esac
45a4b03e 13253fi
e70b2110
KH
13254PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13255if test -n "$PKG_CONFIG"; then
13256 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13257echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13258else
c24fa7dc
MB
13259 { echo "$as_me:$LINENO: result: no" >&5
13260echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13261fi
13262
c24fa7dc 13263
45a4b03e 13264
e70b2110 13265 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13266 HAVE_LIBOTF=no
e70b2110
KH
13267 else
13268 PKG_CONFIG_MIN_VERSION=0.9.0
13269 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13270 { echo "$as_me:$LINENO: checking for libotf" >&5
13271echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13272
e70b2110
KH
13273 if $PKG_CONFIG --exists "libotf" 2>&5; then
13274 { echo "$as_me:$LINENO: result: yes" >&5
13275echo "${ECHO_T}yes" >&6; }
13276 succeeded=yes
6ed29d7b 13277
e70b2110
KH
13278 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13279echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13280 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13281 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13282echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13283
13284 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13285echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13286 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13287 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13288echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13289 else
13290 { echo "$as_me:$LINENO: result: no" >&5
13291echo "${ECHO_T}no" >&6; }
13292 LIBOTF_CFLAGS=""
13293 LIBOTF_LIBS=""
13294 ## If we have a custom action on failure, don't print errors, but
13295 ## do set a variable so people can do so.
13296 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13297
e70b2110 13298 fi
6ed29d7b 13299
6ed29d7b 13300
6ed29d7b 13301
e70b2110
KH
13302 else
13303 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13304 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13305 fi
13306 fi
13307
13308 if test $succeeded = yes; then
435f8bc5 13309 HAVE_LIBOTF=yes
e70b2110 13310 else
435f8bc5 13311 HAVE_LIBOTF=no
e70b2110
KH
13312 fi
13313
77dfeef5 13314 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13315
45a4b03e
KH
13316cat >>confdefs.h <<\_ACEOF
13317#define HAVE_LIBOTF 1
13318_ACEOF
13319
77dfeef5 13320 fi
6ed29d7b 13321 fi
45a4b03e 13322 fi
45a4b03e 13323
77dfeef5
GM
13324 HAVE_M17N_FLT=no
13325 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13326
13327 succeeded=no
13328
d235ca2f 13329 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13330set dummy pkg-config; ac_word=$2
13331{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13332echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13333if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13334 echo $ECHO_N "(cached) $ECHO_C" >&6
13335else
13336 case $PKG_CONFIG in
13337 [\\/]* | ?:[\\/]*)
13338 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13339 ;;
13340 *)
13341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342for as_dir in $PATH
13343do
13344 IFS=$as_save_IFS
13345 test -z "$as_dir" && as_dir=.
13346 for ac_exec_ext in '' $ac_executable_extensions; do
13347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13348 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13350 break 2
13351 fi
13352done
13353done
13354IFS=$as_save_IFS
13355
13356 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13357 ;;
13358esac
13359fi
13360PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13361if test -n "$PKG_CONFIG"; then
13362 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13363echo "${ECHO_T}$PKG_CONFIG" >&6; }
13364else
13365 { echo "$as_me:$LINENO: result: no" >&5
13366echo "${ECHO_T}no" >&6; }
13367fi
13368
13369
7f0942ba
KH
13370
13371 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13372 HAVE_M17N_FLT=no
7f0942ba
KH
13373 else
13374 PKG_CONFIG_MIN_VERSION=0.9.0
13375 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13376 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13377echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13378
13379 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13380 { echo "$as_me:$LINENO: result: yes" >&5
13381echo "${ECHO_T}yes" >&6; }
13382 succeeded=yes
13383
13384 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13385echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13386 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13387 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13388echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13389
13390 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13391echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13392 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13393 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13394echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13395 else
13396 { echo "$as_me:$LINENO: result: no" >&5
13397echo "${ECHO_T}no" >&6; }
13398 M17N_FLT_CFLAGS=""
13399 M17N_FLT_LIBS=""
13400 ## If we have a custom action on failure, don't print errors, but
13401 ## do set a variable so people can do so.
13402 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13403
13404 fi
13405
13406
13407
13408 else
13409 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13410 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13411 fi
13412 fi
13413
13414 if test $succeeded = yes; then
435f8bc5 13415 HAVE_M17N_FLT=yes
7f0942ba 13416 else
435f8bc5 13417 HAVE_M17N_FLT=no
7f0942ba
KH
13418 fi
13419
77dfeef5 13420 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13421
13422cat >>confdefs.h <<\_ACEOF
13423#define HAVE_M17N_FLT 1
13424_ACEOF
13425
77dfeef5 13426 fi
e70b2110 13427 fi
e70b2110
KH
13428
13429
13430
13431
13432
13433
13434
7f0942ba
KH
13435
13436
7f0942ba 13437
77dfeef5
GM
13438fi # "${USE_FONT_BACKEND}" = "yes"
13439### End of font-backend section.
98418dba
CW
13440
13441### Use -lXpm if available, unless `--with-xpm=no'.
13442HAVE_XPM=no
13443if test "${HAVE_X11}" = "yes"; then
13444 if test "${with_xpm}" != "no"; then
c0d27fcc 13445 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13446 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13447echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13448if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13449 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13450fi
4c34eeee
MB
13451{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13452echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13453else
c0d27fcc 13454 # Is the header compilable?
4c34eeee
MB
13455{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13456echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13458/* confdefs.h. */
13459_ACEOF
13460cat confdefs.h >>conftest.$ac_ext
13461cat >>conftest.$ac_ext <<_ACEOF
13462/* end confdefs.h. */
c0d27fcc
MR
13463$ac_includes_default
13464#include <X11/xpm.h>
13465_ACEOF
13466rm -f conftest.$ac_objext
4c34eeee
MB
13467if { (ac_try="$ac_compile"
13468case "(($ac_try" in
13469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13470 *) ac_try_echo=$ac_try;;
13471esac
13472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13473 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13474 ac_status=$?
edfaf76d
LK
13475 grep -v '^ *+' conftest.er1 >conftest.err
13476 rm -f conftest.er1
13477 cat conftest.err >&5
c0d27fcc 13478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13479 (exit $ac_status); } && {
13480 test -z "$ac_c_werror_flag" ||
13481 test ! -s conftest.err
13482 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13483 ac_header_compiler=yes
13484else
13485 echo "$as_me: failed program was:" >&5
19650fd6
AS
13486sed 's/^/| /' conftest.$ac_ext >&5
13487
4c34eeee 13488 ac_header_compiler=no
c0d27fcc 13489fi
4c34eeee
MB
13490
13491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13492{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13493echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13494
13495# Is the header present?
4c34eeee
MB
13496{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13497echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13498cat >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_ACEOF
4c34eeee
MB
13506if { (ac_try="$ac_cpp conftest.$ac_ext"
13507case "(($ac_try" in
13508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13509 *) ac_try_echo=$ac_try;;
13510esac
13511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13512 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13513 ac_status=$?
6bae0ccf 13514 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13515 rm -f conftest.er1
13516 cat conftest.err >&5
c0d27fcc 13517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13518 (exit $ac_status); } >/dev/null && {
13519 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13520 test ! -s conftest.err
13521 }; then
c0d27fcc 13522 ac_header_preproc=yes
98418dba
CW
13523else
13524 echo "$as_me: failed program was:" >&5
19650fd6
AS
13525sed 's/^/| /' conftest.$ac_ext >&5
13526
c0d27fcc 13527 ac_header_preproc=no
98418dba 13528fi
4c34eeee 13529
98418dba 13530rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13531{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13532echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13533
13534# So? What about this header?
edfaf76d
LK
13535case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13536 yes:no: )
c0d27fcc
MR
13537 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13538echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13539 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13540echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13541 ac_header_preproc=yes
13542 ;;
13543 no:yes:* )
13544 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13545echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13546 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13547echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13548 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13549echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13550 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13551echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13552 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13553echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13554 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13555echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13556
19650fd6 13557 ;;
c0d27fcc 13558esac
4c34eeee
MB
13559{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13560echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13561if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13562 echo $ECHO_N "(cached) $ECHO_C" >&6
13563else
13564 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13565fi
4c34eeee
MB
13566{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13567echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13568
13569fi
98418dba 13570if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13571 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13572echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13573if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13574 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13575else
98418dba
CW
13576 ac_check_lib_save_LIBS=$LIBS
13577LIBS="-lXpm -lX11 $LIBS"
13578cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13579/* confdefs.h. */
13580_ACEOF
13581cat confdefs.h >>conftest.$ac_ext
13582cat >>conftest.$ac_ext <<_ACEOF
13583/* end confdefs.h. */
98418dba 13584
4c34eeee
MB
13585/* Override any GCC internal prototype to avoid an error.
13586 Use char because int might match the return type of a GCC
13587 builtin and then its argument prototype would still apply. */
503d2be0
AS
13588#ifdef __cplusplus
13589extern "C"
13590#endif
98418dba 13591char XpmReadFileToPixmap ();
503d2be0
AS
13592int
13593main ()
13594{
4c34eeee 13595return XpmReadFileToPixmap ();
503d2be0
AS
13596 ;
13597 return 0;
13598}
13599_ACEOF
13600rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13601if { (ac_try="$ac_link"
13602case "(($ac_try" in
13603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13604 *) ac_try_echo=$ac_try;;
13605esac
13606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13607 (eval "$ac_link") 2>conftest.er1
503d2be0 13608 ac_status=$?
edfaf76d
LK
13609 grep -v '^ *+' conftest.er1 >conftest.err
13610 rm -f conftest.er1
13611 cat conftest.err >&5
c0d27fcc 13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13613 (exit $ac_status); } && {
13614 test -z "$ac_c_werror_flag" ||
13615 test ! -s conftest.err
13616 } && test -s conftest$ac_exeext &&
13617 $as_test_x conftest$ac_exeext; then
98418dba 13618 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13619else
13620 echo "$as_me: failed program was:" >&5
19650fd6
AS
13621sed 's/^/| /' conftest.$ac_ext >&5
13622
4c34eeee 13623 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13624fi
4c34eeee
MB
13625
13626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13627 conftest$ac_exeext conftest.$ac_ext
98418dba 13628LIBS=$ac_check_lib_save_LIBS
503d2be0 13629fi
4c34eeee
MB
13630{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13631echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13632if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13633 HAVE_XPM=yes
ba4481b5
DL
13634fi
13635
98418dba
CW
13636fi
13637
c0d27fcc 13638
98418dba 13639 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13640 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13641echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13643/* confdefs.h. */
13644_ACEOF
13645cat confdefs.h >>conftest.$ac_ext
13646cat >>conftest.$ac_ext <<_ACEOF
13647/* end confdefs.h. */
98418dba
CW
13648#include "X11/xpm.h"
13649#ifndef XpmReturnAllocPixels
13650no_return_alloc_pixels
503d2be0 13651#endif
ba4481b5 13652
98418dba
CW
13653_ACEOF
13654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13655 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13656 HAVE_XPM=no
13657else
13658 HAVE_XPM=yes
13659fi
13660rm -f conftest*
ba4481b5 13661
c0d27fcc 13662
98418dba 13663 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13664 { echo "$as_me:$LINENO: result: yes" >&5
13665echo "${ECHO_T}yes" >&6; }
98418dba 13666 else
4c34eeee
MB
13667 { echo "$as_me:$LINENO: result: no" >&5
13668echo "${ECHO_T}no" >&6; }
98418dba
CW
13669 fi
13670 fi
13671 fi
13672
13673 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13674
c0d27fcc 13675cat >>confdefs.h <<\_ACEOF
98418dba 13676#define HAVE_XPM 1
c0d27fcc 13677_ACEOF
98418dba
CW
13678
13679 fi
13680fi
13681
13682### Use -ljpeg if available, unless `--with-jpeg=no'.
13683HAVE_JPEG=no
13684if test "${HAVE_X11}" = "yes"; then
13685 if test "${with_jpeg}" != "no"; then
c0d27fcc 13686 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13687 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13688echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13689if test "${ac_cv_header_jerror_h+set}" = set; then
13690 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13691fi
ca81d7a0
JD
13692{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13693echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13694else
c0d27fcc 13695 # Is the header compilable?
ca81d7a0
JD
13696{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13697echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13698cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13699/* confdefs.h. */
13700_ACEOF
13701cat confdefs.h >>conftest.$ac_ext
13702cat >>conftest.$ac_ext <<_ACEOF
13703/* end confdefs.h. */
c0d27fcc
MR
13704$ac_includes_default
13705#include <jerror.h>
13706_ACEOF
13707rm -f conftest.$ac_objext
ca81d7a0
JD
13708if { (ac_try="$ac_compile"
13709case "(($ac_try" in
13710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13711 *) ac_try_echo=$ac_try;;
13712esac
13713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13714 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13715 ac_status=$?
edfaf76d
LK
13716 grep -v '^ *+' conftest.er1 >conftest.err
13717 rm -f conftest.er1
13718 cat conftest.err >&5
c0d27fcc 13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13720 (exit $ac_status); } && {
13721 test -z "$ac_c_werror_flag" ||
13722 test ! -s conftest.err
13723 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13724 ac_header_compiler=yes
13725else
13726 echo "$as_me: failed program was:" >&5
19650fd6
AS
13727sed 's/^/| /' conftest.$ac_ext >&5
13728
ca81d7a0 13729 ac_header_compiler=no
c0d27fcc 13730fi
ca81d7a0
JD
13731
13732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13733{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13734echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13735
13736# Is the header present?
ca81d7a0
JD
13737{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13738echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13739cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13740/* confdefs.h. */
13741_ACEOF
13742cat confdefs.h >>conftest.$ac_ext
13743cat >>conftest.$ac_ext <<_ACEOF
13744/* end confdefs.h. */
98418dba
CW
13745#include <jerror.h>
13746_ACEOF
ca81d7a0
JD
13747if { (ac_try="$ac_cpp conftest.$ac_ext"
13748case "(($ac_try" in
13749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13750 *) ac_try_echo=$ac_try;;
13751esac
13752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13753 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13754 ac_status=$?
6bae0ccf 13755 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13756 rm -f conftest.er1
13757 cat conftest.err >&5
c0d27fcc 13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13759 (exit $ac_status); } >/dev/null && {
13760 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13761 test ! -s conftest.err
13762 }; then
c0d27fcc 13763 ac_header_preproc=yes
ba4481b5 13764else
98418dba 13765 echo "$as_me: failed program was:" >&5
19650fd6
AS
13766sed 's/^/| /' conftest.$ac_ext >&5
13767
c0d27fcc 13768 ac_header_preproc=no
98418dba 13769fi
ca81d7a0 13770
98418dba 13771rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13772{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13773echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13774
13775# So? What about this header?
edfaf76d
LK
13776case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13777 yes:no: )
c0d27fcc
MR
13778 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13779echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13780 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13781echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13782 ac_header_preproc=yes
19650fd6 13783 ;;
edfaf76d 13784 no:yes:* )
c0d27fcc
MR
13785 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13786echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13787 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13788echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13789 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13790echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13791 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13792echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13793 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13794echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13795 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13796echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13797
19650fd6 13798 ;;
c0d27fcc 13799esac
ca81d7a0
JD
13800{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13801echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13802if test "${ac_cv_header_jerror_h+set}" = set; then
13803 echo $ECHO_N "(cached) $ECHO_C" >&6
13804else
13805 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13806fi
ca81d7a0
JD
13807{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13808echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13809
13810fi
98418dba 13811if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13812 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13813echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13814if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13815 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13816else
98418dba
CW
13817 ac_check_lib_save_LIBS=$LIBS
13818LIBS="-ljpeg $LIBS"
13819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13820/* confdefs.h. */
13821_ACEOF
13822cat confdefs.h >>conftest.$ac_ext
13823cat >>conftest.$ac_ext <<_ACEOF
13824/* end confdefs.h. */
98418dba 13825
ca81d7a0
JD
13826/* Override any GCC internal prototype to avoid an error.
13827 Use char because int might match the return type of a GCC
13828 builtin and then its argument prototype would still apply. */
98418dba
CW
13829#ifdef __cplusplus
13830extern "C"
13831#endif
98418dba 13832char jpeg_destroy_compress ();
503d2be0
AS
13833int
13834main ()
13835{
ca81d7a0 13836return jpeg_destroy_compress ();
503d2be0
AS
13837 ;
13838 return 0;
13839}
13840_ACEOF
13841rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13842if { (ac_try="$ac_link"
13843case "(($ac_try" in
13844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13845 *) ac_try_echo=$ac_try;;
13846esac
13847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13848 (eval "$ac_link") 2>conftest.er1
503d2be0 13849 ac_status=$?
edfaf76d
LK
13850 grep -v '^ *+' conftest.er1 >conftest.err
13851 rm -f conftest.er1
13852 cat conftest.err >&5
c0d27fcc 13853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13854 (exit $ac_status); } && {
13855 test -z "$ac_c_werror_flag" ||
13856 test ! -s conftest.err
13857 } && test -s conftest$ac_exeext &&
13858 $as_test_x conftest$ac_exeext; then
98418dba 13859 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13860else
503d2be0 13861 echo "$as_me: failed program was:" >&5
19650fd6
AS
13862sed 's/^/| /' conftest.$ac_ext >&5
13863
ca81d7a0 13864 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13865fi
ca81d7a0 13866
f053c89f 13867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13868 conftest$ac_exeext conftest.$ac_ext
98418dba 13869LIBS=$ac_check_lib_save_LIBS
ba4481b5 13870fi
ca81d7a0
JD
13871{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13872echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13873if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13874 HAVE_JPEG=yes
ba4481b5 13875fi
98418dba 13876
ba4481b5 13877fi
98418dba 13878
c0d27fcc 13879
ba4481b5 13880 fi
ba4481b5 13881
c0d27fcc 13882
98418dba 13883 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13884 cat >>confdefs.h <<\_ACEOF
98418dba 13885#define HAVE_JPEG 1
c0d27fcc 13886_ACEOF
98418dba
CW
13887
13888 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13889/* confdefs.h. */
13890_ACEOF
13891cat confdefs.h >>conftest.$ac_ext
13892cat >>conftest.$ac_ext <<_ACEOF
13893/* end confdefs.h. */
22044edf 13894#include <jpeglib.h>
98418dba
CW
13895 version=JPEG_LIB_VERSION
13896
13897_ACEOF
13898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13899 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13900 cat >>confdefs.h <<\_ACEOF
98418dba 13901#define HAVE_JPEG 1
c0d27fcc 13902_ACEOF
ba4481b5 13903
98418dba 13904else
c0d27fcc 13905 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13906echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13907 HAVE_JPEG=no
ba4481b5 13908fi
98418dba 13909rm -f conftest*
ba4481b5 13910
98418dba
CW
13911 fi
13912fi
503d2be0 13913
98418dba
CW
13914### Use -lpng if available, unless `--with-png=no'.
13915HAVE_PNG=no
13916if test "${HAVE_X11}" = "yes"; then
13917 if test "${with_png}" != "no"; then
f57bd967
DL
13918 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13919 # in /usr/include/libpng.
13920
13921
13922for ac_header in png.h libpng/png.h
13923do
13924as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13925if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13926 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13927echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13928if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13929 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13930fi
ca81d7a0
JD
13931ac_res=`eval echo '${'$as_ac_Header'}'`
13932 { echo "$as_me:$LINENO: result: $ac_res" >&5
13933echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13934else
c0d27fcc 13935 # Is the header compilable?
ca81d7a0
JD
13936{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13937echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13938cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13939/* confdefs.h. */
13940_ACEOF
13941cat confdefs.h >>conftest.$ac_ext
13942cat >>conftest.$ac_ext <<_ACEOF
13943/* end confdefs.h. */
c0d27fcc 13944$ac_includes_default
f57bd967 13945#include <$ac_header>
c0d27fcc
MR
13946_ACEOF
13947rm -f conftest.$ac_objext
ca81d7a0
JD
13948if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
c0d27fcc 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_objext; then
c0d27fcc
MR
13964 ac_header_compiler=yes
13965else
13966 echo "$as_me: failed program was:" >&5
19650fd6
AS
13967sed 's/^/| /' conftest.$ac_ext >&5
13968
ca81d7a0 13969 ac_header_compiler=no
c0d27fcc 13970fi
ca81d7a0
JD
13971
13972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13973{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13974echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13975
13976# Is the header present?
ca81d7a0
JD
13977{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13978echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13980/* confdefs.h. */
13981_ACEOF
13982cat confdefs.h >>conftest.$ac_ext
13983cat >>conftest.$ac_ext <<_ACEOF
13984/* end confdefs.h. */
f57bd967 13985#include <$ac_header>
503d2be0 13986_ACEOF
ca81d7a0
JD
13987if { (ac_try="$ac_cpp conftest.$ac_ext"
13988case "(($ac_try" in
13989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13990 *) ac_try_echo=$ac_try;;
13991esac
13992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13993 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13994 ac_status=$?
6bae0ccf 13995 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13996 rm -f conftest.er1
13997 cat conftest.err >&5
c0d27fcc 13998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13999 (exit $ac_status); } >/dev/null && {
14000 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14001 test ! -s conftest.err
14002 }; then
c0d27fcc 14003 ac_header_preproc=yes
503d2be0
AS
14004else
14005 echo "$as_me: failed program was:" >&5
19650fd6
AS
14006sed 's/^/| /' conftest.$ac_ext >&5
14007
c0d27fcc 14008 ac_header_preproc=no
ba4481b5 14009fi
ca81d7a0 14010
503d2be0 14011rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14012{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14013echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14014
14015# So? What about this header?
edfaf76d
LK
14016case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14017 yes:no: )
f57bd967
DL
14018 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14019echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14020 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14021echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14022 ac_header_preproc=yes
19650fd6 14023 ;;
edfaf76d 14024 no:yes:* )
f57bd967
DL
14025 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14026echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14027 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14028echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14029 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14030echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14031 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14032echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 14033 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14034echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14035 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14036echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14037
19650fd6 14038 ;;
c0d27fcc 14039esac
ca81d7a0
JD
14040{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14041echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14042if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
14043 echo $ECHO_N "(cached) $ECHO_C" >&6
14044else
edfaf76d 14045 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14046fi
ca81d7a0
JD
14047ac_res=`eval echo '${'$as_ac_Header'}'`
14048 { echo "$as_me:$LINENO: result: $ac_res" >&5
14049echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14050
ba4481b5 14051fi
f57bd967
DL
14052if test `eval echo '${'$as_ac_Header'}'` = yes; then
14053 cat >>confdefs.h <<_ACEOF
14054#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14055_ACEOF
c0d27fcc
MR
14056
14057fi
f57bd967
DL
14058
14059done
14060
14061 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
14062 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14063echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14064if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 14065 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14066else
98418dba
CW
14067 ac_check_lib_save_LIBS=$LIBS
14068LIBS="-lpng -lz -lm $LIBS"
14069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14070/* confdefs.h. */
14071_ACEOF
14072cat confdefs.h >>conftest.$ac_ext
14073cat >>conftest.$ac_ext <<_ACEOF
14074/* end confdefs.h. */
98418dba 14075
ca81d7a0
JD
14076/* Override any GCC internal prototype to avoid an error.
14077 Use char because int might match the return type of a GCC
14078 builtin and then its argument prototype would still apply. */
503d2be0
AS
14079#ifdef __cplusplus
14080extern "C"
14081#endif
98418dba 14082char png_get_channels ();
503d2be0
AS
14083int
14084main ()
14085{
ca81d7a0 14086return png_get_channels ();
503d2be0
AS
14087 ;
14088 return 0;
14089}
14090_ACEOF
14091rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14092if { (ac_try="$ac_link"
14093case "(($ac_try" in
14094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14095 *) ac_try_echo=$ac_try;;
14096esac
14097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14098 (eval "$ac_link") 2>conftest.er1
503d2be0 14099 ac_status=$?
edfaf76d
LK
14100 grep -v '^ *+' conftest.er1 >conftest.err
14101 rm -f conftest.er1
14102 cat conftest.err >&5
c0d27fcc 14103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14104 (exit $ac_status); } && {
14105 test -z "$ac_c_werror_flag" ||
14106 test ! -s conftest.err
14107 } && test -s conftest$ac_exeext &&
14108 $as_test_x conftest$ac_exeext; then
98418dba 14109 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14110else
98418dba 14111 echo "$as_me: failed program was:" >&5
19650fd6
AS
14112sed 's/^/| /' conftest.$ac_ext >&5
14113
ca81d7a0 14114 ac_cv_lib_png_png_get_channels=no
73b77ee5 14115fi
ca81d7a0 14116
f053c89f 14117rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14118 conftest$ac_exeext conftest.$ac_ext
98418dba 14119LIBS=$ac_check_lib_save_LIBS
73b77ee5 14120fi
ca81d7a0
JD
14121{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14122echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14123if test $ac_cv_lib_png_png_get_channels = yes; then
14124 HAVE_PNG=yes
73b77ee5 14125fi
503d2be0 14126
f57bd967 14127 fi
98418dba
CW
14128 fi
14129
14130 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14131
c0d27fcc 14132cat >>confdefs.h <<\_ACEOF
98418dba 14133#define HAVE_PNG 1
c0d27fcc 14134_ACEOF
73b77ee5 14135
98418dba 14136 fi
73b77ee5
GM
14137fi
14138
98418dba
CW
14139### Use -ltiff if available, unless `--with-tiff=no'.
14140HAVE_TIFF=no
14141if test "${HAVE_X11}" = "yes"; then
14142 if test "${with_tiff}" != "no"; then
c0d27fcc 14143 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14144 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14145echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14146if test "${ac_cv_header_tiffio_h+set}" = set; then
14147 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14148fi
ca81d7a0
JD
14149{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14150echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14151else
c0d27fcc 14152 # Is the header compilable?
ca81d7a0
JD
14153{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14154echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14156/* confdefs.h. */
14157_ACEOF
14158cat confdefs.h >>conftest.$ac_ext
14159cat >>conftest.$ac_ext <<_ACEOF
14160/* end confdefs.h. */
c0d27fcc
MR
14161$ac_includes_default
14162#include <tiffio.h>
14163_ACEOF
14164rm -f conftest.$ac_objext
ca81d7a0
JD
14165if { (ac_try="$ac_compile"
14166case "(($ac_try" in
14167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14168 *) ac_try_echo=$ac_try;;
14169esac
14170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14171 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14172 ac_status=$?
edfaf76d
LK
14173 grep -v '^ *+' conftest.er1 >conftest.err
14174 rm -f conftest.er1
14175 cat conftest.err >&5
c0d27fcc 14176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14177 (exit $ac_status); } && {
14178 test -z "$ac_c_werror_flag" ||
14179 test ! -s conftest.err
14180 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14181 ac_header_compiler=yes
14182else
14183 echo "$as_me: failed program was:" >&5
19650fd6
AS
14184sed 's/^/| /' conftest.$ac_ext >&5
14185
ca81d7a0 14186 ac_header_compiler=no
c0d27fcc 14187fi
ca81d7a0
JD
14188
14189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14190{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14191echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14192
14193# Is the header present?
ca81d7a0
JD
14194{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14195echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14197/* confdefs.h. */
14198_ACEOF
14199cat confdefs.h >>conftest.$ac_ext
14200cat >>conftest.$ac_ext <<_ACEOF
14201/* end confdefs.h. */
98418dba
CW
14202#include <tiffio.h>
14203_ACEOF
ca81d7a0
JD
14204if { (ac_try="$ac_cpp conftest.$ac_ext"
14205case "(($ac_try" in
14206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14207 *) ac_try_echo=$ac_try;;
14208esac
14209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14210 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14211 ac_status=$?
6bae0ccf 14212 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14213 rm -f conftest.er1
14214 cat conftest.err >&5
c0d27fcc 14215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14216 (exit $ac_status); } >/dev/null && {
14217 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14218 test ! -s conftest.err
14219 }; then
c0d27fcc 14220 ac_header_preproc=yes
98418dba
CW
14221else
14222 echo "$as_me: failed program was:" >&5
19650fd6
AS
14223sed 's/^/| /' conftest.$ac_ext >&5
14224
c0d27fcc 14225 ac_header_preproc=no
98418dba 14226fi
ca81d7a0 14227
98418dba 14228rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14229{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14230echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14231
14232# So? What about this header?
edfaf76d
LK
14233case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14234 yes:no: )
c0d27fcc
MR
14235 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14236echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14237 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14238echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14239 ac_header_preproc=yes
19650fd6 14240 ;;
edfaf76d 14241 no:yes:* )
c0d27fcc
MR
14242 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14243echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14244 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14245echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14246 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14247echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14248 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14249echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14250 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14251echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14252 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14253echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14254
19650fd6 14255 ;;
c0d27fcc 14256esac
ca81d7a0
JD
14257{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14258echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14259if test "${ac_cv_header_tiffio_h+set}" = set; then
14260 echo $ECHO_N "(cached) $ECHO_C" >&6
14261else
14262 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14263fi
ca81d7a0
JD
14264{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14265echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14266
14267fi
98418dba
CW
14268if test $ac_cv_header_tiffio_h = yes; then
14269 tifflibs="-lz -lm"
14270 # At least one tiff package requires the jpeg library.
14271 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14272 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14273echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14274if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14275 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14276else
503d2be0 14277 ac_check_lib_save_LIBS=$LIBS
98418dba 14278LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14279cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14280/* confdefs.h. */
14281_ACEOF
14282cat confdefs.h >>conftest.$ac_ext
14283cat >>conftest.$ac_ext <<_ACEOF
14284/* end confdefs.h. */
503d2be0 14285
ca81d7a0
JD
14286/* Override any GCC internal prototype to avoid an error.
14287 Use char because int might match the return type of a GCC
14288 builtin and then its argument prototype would still apply. */
503d2be0
AS
14289#ifdef __cplusplus
14290extern "C"
14291#endif
98418dba 14292char TIFFGetVersion ();
503d2be0
AS
14293int
14294main ()
14295{
ca81d7a0 14296return TIFFGetVersion ();
503d2be0
AS
14297 ;
14298 return 0;
14299}
14300_ACEOF
14301rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14302if { (ac_try="$ac_link"
14303case "(($ac_try" in
14304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14305 *) ac_try_echo=$ac_try;;
14306esac
14307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14308 (eval "$ac_link") 2>conftest.er1
503d2be0 14309 ac_status=$?
edfaf76d
LK
14310 grep -v '^ *+' conftest.er1 >conftest.err
14311 rm -f conftest.er1
14312 cat conftest.err >&5
c0d27fcc 14313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14314 (exit $ac_status); } && {
14315 test -z "$ac_c_werror_flag" ||
14316 test ! -s conftest.err
14317 } && test -s conftest$ac_exeext &&
14318 $as_test_x conftest$ac_exeext; then
98418dba 14319 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14320else
14321 echo "$as_me: failed program was:" >&5
19650fd6
AS
14322sed 's/^/| /' conftest.$ac_ext >&5
14323
ca81d7a0 14324 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14325fi
ca81d7a0 14326
f053c89f 14327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14328 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14329LIBS=$ac_check_lib_save_LIBS
14330fi
ca81d7a0
JD
14331{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14332echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14333if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14334 HAVE_TIFF=yes
14335fi
14336
14337fi
73b77ee5 14338
c0d27fcc 14339
98418dba
CW
14340 fi
14341
14342 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14343
c0d27fcc 14344cat >>confdefs.h <<\_ACEOF
98418dba 14345#define HAVE_TIFF 1
c0d27fcc 14346_ACEOF
98418dba
CW
14347
14348 fi
73b77ee5
GM
14349fi
14350
9aeb8aaa 14351### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14352HAVE_GIF=no
9aeb8aaa
GM
14353if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14354 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14355 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14356echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14357if test "${ac_cv_header_gif_lib_h+set}" = set; then
14358 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14359fi
ca81d7a0
JD
14360{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14361echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14362else
c0d27fcc 14363 # Is the header compilable?
ca81d7a0
JD
14364{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14365echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14366cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14367/* confdefs.h. */
14368_ACEOF
14369cat confdefs.h >>conftest.$ac_ext
14370cat >>conftest.$ac_ext <<_ACEOF
14371/* end confdefs.h. */
c0d27fcc
MR
14372$ac_includes_default
14373#include <gif_lib.h>
14374_ACEOF
14375rm -f conftest.$ac_objext
ca81d7a0
JD
14376if { (ac_try="$ac_compile"
14377case "(($ac_try" in
14378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14379 *) ac_try_echo=$ac_try;;
14380esac
14381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14382 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14383 ac_status=$?
edfaf76d
LK
14384 grep -v '^ *+' conftest.er1 >conftest.err
14385 rm -f conftest.er1
14386 cat conftest.err >&5
c0d27fcc 14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14388 (exit $ac_status); } && {
14389 test -z "$ac_c_werror_flag" ||
14390 test ! -s conftest.err
14391 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14392 ac_header_compiler=yes
14393else
14394 echo "$as_me: failed program was:" >&5
19650fd6
AS
14395sed 's/^/| /' conftest.$ac_ext >&5
14396
ca81d7a0 14397 ac_header_compiler=no
c0d27fcc 14398fi
ca81d7a0
JD
14399
14400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14401{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14402echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14403
14404# Is the header present?
ca81d7a0
JD
14405{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14406echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14408/* confdefs.h. */
14409_ACEOF
14410cat confdefs.h >>conftest.$ac_ext
14411cat >>conftest.$ac_ext <<_ACEOF
14412/* end confdefs.h. */
98418dba
CW
14413#include <gif_lib.h>
14414_ACEOF
ca81d7a0
JD
14415if { (ac_try="$ac_cpp conftest.$ac_ext"
14416case "(($ac_try" in
14417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14418 *) ac_try_echo=$ac_try;;
14419esac
14420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14421 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14422 ac_status=$?
6bae0ccf 14423 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14424 rm -f conftest.er1
14425 cat conftest.err >&5
c0d27fcc 14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14427 (exit $ac_status); } >/dev/null && {
14428 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14429 test ! -s conftest.err
14430 }; then
c0d27fcc 14431 ac_header_preproc=yes
98418dba
CW
14432else
14433 echo "$as_me: failed program was:" >&5
19650fd6
AS
14434sed 's/^/| /' conftest.$ac_ext >&5
14435
c0d27fcc 14436 ac_header_preproc=no
98418dba 14437fi
ca81d7a0 14438
98418dba 14439rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14440{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14441echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14442
14443# So? What about this header?
edfaf76d
LK
14444case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14445 yes:no: )
c0d27fcc
MR
14446 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14447echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14448 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14449echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14450 ac_header_preproc=yes
19650fd6 14451 ;;
edfaf76d 14452 no:yes:* )
c0d27fcc
MR
14453 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14454echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14455 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14456echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14457 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14458echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14459 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14460echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14461 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14462echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14463 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14464echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14465
19650fd6 14466 ;;
c0d27fcc 14467esac
ca81d7a0
JD
14468{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14469echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14470if test "${ac_cv_header_gif_lib_h+set}" = set; then
14471 echo $ECHO_N "(cached) $ECHO_C" >&6
14472else
14473 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14474fi
ca81d7a0
JD
14475{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14476echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14477
14478fi
98418dba
CW
14479if test $ac_cv_header_gif_lib_h = yes; then
14480 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14481# Earlier versions can crash Emacs.
63175cd2
GM
14482 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14483echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14484if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14485 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14486else
503d2be0 14487 ac_check_lib_save_LIBS=$LIBS
63175cd2 14488LIBS="-lgif $LIBS"
503d2be0 14489cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14490/* confdefs.h. */
14491_ACEOF
14492cat confdefs.h >>conftest.$ac_ext
14493cat >>conftest.$ac_ext <<_ACEOF
14494/* end confdefs.h. */
73b77ee5 14495
ca81d7a0
JD
14496/* Override any GCC internal prototype to avoid an error.
14497 Use char because int might match the return type of a GCC
14498 builtin and then its argument prototype would still apply. */
98418dba
CW
14499#ifdef __cplusplus
14500extern "C"
14501#endif
98418dba 14502char EGifPutExtensionLast ();
503d2be0
AS
14503int
14504main ()
14505{
ca81d7a0 14506return EGifPutExtensionLast ();
503d2be0
AS
14507 ;
14508 return 0;
14509}
14510_ACEOF
14511rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14512if { (ac_try="$ac_link"
14513case "(($ac_try" in
14514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14515 *) ac_try_echo=$ac_try;;
14516esac
14517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14518 (eval "$ac_link") 2>conftest.er1
503d2be0 14519 ac_status=$?
edfaf76d
LK
14520 grep -v '^ *+' conftest.er1 >conftest.err
14521 rm -f conftest.er1
14522 cat conftest.err >&5
c0d27fcc 14523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14524 (exit $ac_status); } && {
14525 test -z "$ac_c_werror_flag" ||
14526 test ! -s conftest.err
14527 } && test -s conftest$ac_exeext &&
14528 $as_test_x conftest$ac_exeext; then
63175cd2 14529 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14530else
98418dba 14531 echo "$as_me: failed program was:" >&5
19650fd6
AS
14532sed 's/^/| /' conftest.$ac_ext >&5
14533
63175cd2 14534 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14535fi
ca81d7a0 14536
f053c89f 14537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14538 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14539LIBS=$ac_check_lib_save_LIBS
14540fi
63175cd2
GM
14541{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14542echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14543if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14544 HAVE_GIF=yes
9aeb8aaa 14545else
63175cd2 14546 try_libungif=yes
98418dba
CW
14547fi
14548
14549fi
14550
c0d27fcc 14551
9aeb8aaa
GM
14552
14553 if test "$HAVE_GIF" = yes; then
63175cd2 14554 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14555 fi
14556
63175cd2
GM
14557# If gif_lib.h but no libgif, try libungif.
14558 if test x"$try_libungif" = xyes; then
14559 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14560echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14561if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14562 echo $ECHO_N "(cached) $ECHO_C" >&6
14563else
14564 ac_check_lib_save_LIBS=$LIBS
63175cd2 14565LIBS="-lungif $LIBS"
9aeb8aaa
GM
14566cat >conftest.$ac_ext <<_ACEOF
14567/* confdefs.h. */
14568_ACEOF
14569cat confdefs.h >>conftest.$ac_ext
14570cat >>conftest.$ac_ext <<_ACEOF
14571/* end confdefs.h. */
14572
14573/* Override any GCC internal prototype to avoid an error.
14574 Use char because int might match the return type of a GCC
14575 builtin and then its argument prototype would still apply. */
14576#ifdef __cplusplus
14577extern "C"
14578#endif
14579char EGifPutExtensionLast ();
14580int
14581main ()
14582{
14583return EGifPutExtensionLast ();
14584 ;
14585 return 0;
14586}
14587_ACEOF
14588rm -f conftest.$ac_objext conftest$ac_exeext
14589if { (ac_try="$ac_link"
14590case "(($ac_try" in
14591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14592 *) ac_try_echo=$ac_try;;
14593esac
14594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14595 (eval "$ac_link") 2>conftest.er1
14596 ac_status=$?
14597 grep -v '^ *+' conftest.er1 >conftest.err
14598 rm -f conftest.er1
14599 cat conftest.err >&5
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); } && {
14602 test -z "$ac_c_werror_flag" ||
14603 test ! -s conftest.err
14604 } && test -s conftest$ac_exeext &&
14605 $as_test_x conftest$ac_exeext; then
63175cd2 14606 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14607else
14608 echo "$as_me: failed program was:" >&5
14609sed 's/^/| /' conftest.$ac_ext >&5
14610
63175cd2 14611 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14612fi
14613
9aeb8aaa
GM
14614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14615 conftest$ac_exeext conftest.$ac_ext
14616LIBS=$ac_check_lib_save_LIBS
14617fi
63175cd2
GM
14618{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14619echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14620if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14621 HAVE_GIF=yes
98418dba
CW
14622fi
14623
c0d27fcc 14624
9aeb8aaa
GM
14625 if test "$HAVE_GIF" = yes; then
14626
14627cat >>confdefs.h <<\_ACEOF
63175cd2 14628#define LIBGIF -lungif
9aeb8aaa
GM
14629_ACEOF
14630
63175cd2 14631 ac_gif_lib_name="-lungif"
9aeb8aaa 14632 fi
98418dba
CW
14633 fi
14634
14635 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14636
c0d27fcc 14637cat >>confdefs.h <<\_ACEOF
98418dba 14638#define HAVE_GIF 1
c0d27fcc 14639_ACEOF
98418dba
CW
14640
14641 fi
14642fi
14643
5afbeb22
JD
14644if test "${HAVE_X11}" = "yes"; then
14645 MISSING=""
14646 WITH_NO=""
14647 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14648 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14649 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14650 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14651 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14652 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14653 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14654 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14655 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14656 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14657
14658 if test "X${MISSING}" != X; then
1bb9a689 14659 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14660 $MISSING
86e73516 14661Maybe some development libraries/packages are missing?
5afbeb22
JD
14662If you don't want to link with them give
14663 $WITH_NO
14664as options to configure" >&5
1bb9a689 14665echo "$as_me: error: The following required libraries were not found:
5afbeb22 14666 $MISSING
86e73516 14667Maybe some development libraries/packages are missing?
5afbeb22
JD
14668If you don't want to link with them give
14669 $WITH_NO
14670as options to configure" >&2;}
86e73516 14671 { (exit 1); exit 1; }; }
98418dba
CW
14672 fi
14673fi
14674
79011b82
NR
14675### Use -lgpm if available, unless `--with-gpm=no'.
14676HAVE_GPM=no
14677if test "${with_gpm}" != "no"; then
14678 if test "${ac_cv_header_gpm_h+set}" = set; then
14679 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14680echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14681if test "${ac_cv_header_gpm_h+set}" = set; then
14682 echo $ECHO_N "(cached) $ECHO_C" >&6
14683fi
14684{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14685echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14686else
14687 # Is the header compilable?
14688{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14689echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14690cat >conftest.$ac_ext <<_ACEOF
14691/* confdefs.h. */
14692_ACEOF
14693cat confdefs.h >>conftest.$ac_ext
14694cat >>conftest.$ac_ext <<_ACEOF
14695/* end confdefs.h. */
14696$ac_includes_default
14697#include <gpm.h>
14698_ACEOF
14699rm -f conftest.$ac_objext
14700if { (ac_try="$ac_compile"
14701case "(($ac_try" in
14702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14703 *) ac_try_echo=$ac_try;;
14704esac
14705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14706 (eval "$ac_compile") 2>conftest.er1
14707 ac_status=$?
14708 grep -v '^ *+' conftest.er1 >conftest.err
14709 rm -f conftest.er1
14710 cat conftest.err >&5
14711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14712 (exit $ac_status); } && {
14713 test -z "$ac_c_werror_flag" ||
14714 test ! -s conftest.err
14715 } && test -s conftest.$ac_objext; then
14716 ac_header_compiler=yes
14717else
14718 echo "$as_me: failed program was:" >&5
14719sed 's/^/| /' conftest.$ac_ext >&5
14720
14721 ac_header_compiler=no
14722fi
14723
14724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14725{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14726echo "${ECHO_T}$ac_header_compiler" >&6; }
14727
14728# Is the header present?
14729{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14730echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14731cat >conftest.$ac_ext <<_ACEOF
14732/* confdefs.h. */
14733_ACEOF
14734cat confdefs.h >>conftest.$ac_ext
14735cat >>conftest.$ac_ext <<_ACEOF
14736/* end confdefs.h. */
14737#include <gpm.h>
14738_ACEOF
14739if { (ac_try="$ac_cpp conftest.$ac_ext"
14740case "(($ac_try" in
14741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14742 *) ac_try_echo=$ac_try;;
14743esac
14744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14745 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14746 ac_status=$?
14747 grep -v '^ *+' conftest.er1 >conftest.err
14748 rm -f conftest.er1
14749 cat conftest.err >&5
14750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14751 (exit $ac_status); } >/dev/null && {
14752 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14753 test ! -s conftest.err
14754 }; then
14755 ac_header_preproc=yes
14756else
14757 echo "$as_me: failed program was:" >&5
14758sed 's/^/| /' conftest.$ac_ext >&5
14759
14760 ac_header_preproc=no
14761fi
14762
14763rm -f conftest.err conftest.$ac_ext
14764{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14765echo "${ECHO_T}$ac_header_preproc" >&6; }
14766
14767# So? What about this header?
14768case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14769 yes:no: )
14770 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14771echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14772 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14773echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14774 ac_header_preproc=yes
14775 ;;
14776 no:yes:* )
14777 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14778echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14779 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14780echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14781 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14782echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14783 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14784echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14785 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14786echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14787 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14788echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14789
14790 ;;
14791esac
14792{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14793echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14794if test "${ac_cv_header_gpm_h+set}" = set; then
14795 echo $ECHO_N "(cached) $ECHO_C" >&6
14796else
14797 ac_cv_header_gpm_h=$ac_header_preproc
14798fi
14799{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14800echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14801
14802fi
14803if test $ac_cv_header_gpm_h = yes; then
14804 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14805echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14806if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14807 echo $ECHO_N "(cached) $ECHO_C" >&6
14808else
14809 ac_check_lib_save_LIBS=$LIBS
14810LIBS="-lgpm $LIBS"
14811cat >conftest.$ac_ext <<_ACEOF
14812/* confdefs.h. */
14813_ACEOF
14814cat confdefs.h >>conftest.$ac_ext
14815cat >>conftest.$ac_ext <<_ACEOF
14816/* end confdefs.h. */
14817
14818/* Override any GCC internal prototype to avoid an error.
14819 Use char because int might match the return type of a GCC
14820 builtin and then its argument prototype would still apply. */
14821#ifdef __cplusplus
14822extern "C"
14823#endif
14824char Gpm_Open ();
14825int
14826main ()
14827{
14828return Gpm_Open ();
14829 ;
14830 return 0;
14831}
14832_ACEOF
14833rm -f conftest.$ac_objext conftest$ac_exeext
14834if { (ac_try="$ac_link"
14835case "(($ac_try" in
14836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14837 *) ac_try_echo=$ac_try;;
14838esac
14839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14840 (eval "$ac_link") 2>conftest.er1
14841 ac_status=$?
14842 grep -v '^ *+' conftest.er1 >conftest.err
14843 rm -f conftest.er1
14844 cat conftest.err >&5
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14846 (exit $ac_status); } && {
14847 test -z "$ac_c_werror_flag" ||
14848 test ! -s conftest.err
14849 } && test -s conftest$ac_exeext &&
14850 $as_test_x conftest$ac_exeext; then
14851 ac_cv_lib_gpm_Gpm_Open=yes
14852else
14853 echo "$as_me: failed program was:" >&5
14854sed 's/^/| /' conftest.$ac_ext >&5
14855
14856 ac_cv_lib_gpm_Gpm_Open=no
14857fi
14858
14859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14860 conftest$ac_exeext conftest.$ac_ext
14861LIBS=$ac_check_lib_save_LIBS
14862fi
14863{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14864echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14865if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14866 HAVE_GPM=yes
14867fi
14868
14869fi
14870
14871
14872fi
14873
14874if test "${HAVE_GPM}" = "yes"; then
14875
14876cat >>confdefs.h <<\_ACEOF
14877#define HAVE_GPM 1
14878_ACEOF
14879
14880fi
14881
cef11da2 14882if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14883 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14884echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14885if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14886 echo $ECHO_N "(cached) $ECHO_C" >&6
14887fi
ca81d7a0
JD
14888{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14889echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14890else
14891 # Is the header compilable?
ca81d7a0
JD
14892{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14893echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14894cat >conftest.$ac_ext <<_ACEOF
14895/* confdefs.h. */
14896_ACEOF
14897cat confdefs.h >>conftest.$ac_ext
14898cat >>conftest.$ac_ext <<_ACEOF
14899/* end confdefs.h. */
14900$ac_includes_default
14901#include <malloc/malloc.h>
14902_ACEOF
14903rm -f conftest.$ac_objext
ca81d7a0
JD
14904if { (ac_try="$ac_compile"
14905case "(($ac_try" in
14906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14907 *) ac_try_echo=$ac_try;;
14908esac
14909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14910 (eval "$ac_compile") 2>conftest.er1
cef11da2 14911 ac_status=$?
edfaf76d
LK
14912 grep -v '^ *+' conftest.er1 >conftest.err
14913 rm -f conftest.er1
14914 cat conftest.err >&5
cef11da2 14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14916 (exit $ac_status); } && {
14917 test -z "$ac_c_werror_flag" ||
14918 test ! -s conftest.err
14919 } && test -s conftest.$ac_objext; then
cef11da2
ST
14920 ac_header_compiler=yes
14921else
14922 echo "$as_me: failed program was:" >&5
14923sed 's/^/| /' conftest.$ac_ext >&5
14924
ca81d7a0 14925 ac_header_compiler=no
cef11da2 14926fi
ca81d7a0
JD
14927
14928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14930echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14931
14932# Is the header present?
ca81d7a0
JD
14933{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14934echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14935cat >conftest.$ac_ext <<_ACEOF
14936/* confdefs.h. */
14937_ACEOF
14938cat confdefs.h >>conftest.$ac_ext
14939cat >>conftest.$ac_ext <<_ACEOF
14940/* end confdefs.h. */
14941#include <malloc/malloc.h>
14942_ACEOF
ca81d7a0
JD
14943if { (ac_try="$ac_cpp conftest.$ac_ext"
14944case "(($ac_try" in
14945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14946 *) ac_try_echo=$ac_try;;
14947esac
14948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14950 ac_status=$?
14951 grep -v '^ *+' conftest.er1 >conftest.err
14952 rm -f conftest.er1
14953 cat conftest.err >&5
14954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14955 (exit $ac_status); } >/dev/null && {
14956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14957 test ! -s conftest.err
14958 }; then
cef11da2
ST
14959 ac_header_preproc=yes
14960else
14961 echo "$as_me: failed program was:" >&5
14962sed 's/^/| /' conftest.$ac_ext >&5
14963
14964 ac_header_preproc=no
14965fi
ca81d7a0 14966
cef11da2 14967rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14969echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14970
14971# So? What about this header?
edfaf76d
LK
14972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14973 yes:no: )
cef11da2
ST
14974 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14975echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14976 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14977echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14978 ac_header_preproc=yes
cef11da2 14979 ;;
edfaf76d 14980 no:yes:* )
cef11da2
ST
14981 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14982echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14983 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14984echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14985 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14986echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14987 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14988echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14989 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14990echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14991 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14992echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14993
cef11da2
ST
14994 ;;
14995esac
ca81d7a0
JD
14996{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14997echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14998if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14999 echo $ECHO_N "(cached) $ECHO_C" >&6
15000else
15001 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 15002fi
ca81d7a0
JD
15003{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
15004echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 15005
7c9e5167 15006fi
cef11da2
ST
15007if test $ac_cv_header_malloc_malloc_h = yes; then
15008
15009cat >>confdefs.h <<\_ACEOF
15010#define HAVE_MALLOC_MALLOC_H 1
15011_ACEOF
15012
7c9e5167
JD
15013fi
15014
cef11da2
ST
15015
15016
5d6da11e 15017### Use Mac OS X Carbon API to implement GUI.
e0f712ba 15018if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
15019
15020cat >>confdefs.h <<\_ACEOF
e0f712ba 15021#define HAVE_CARBON 1
7c9e5167
JD
15022_ACEOF
15023
dbdbca09
YM
15024
15025for ac_header in AvailabilityMacros.h
15026do
15027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15028if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15029 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15032 echo $ECHO_N "(cached) $ECHO_C" >&6
15033fi
15034ac_res=`eval echo '${'$as_ac_Header'}'`
15035 { echo "$as_me:$LINENO: result: $ac_res" >&5
15036echo "${ECHO_T}$ac_res" >&6; }
15037else
15038 # Is the header compilable?
15039{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15040echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
15041cat >conftest.$ac_ext <<_ACEOF
15042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
15047$ac_includes_default
15048#include <$ac_header>
15049_ACEOF
15050rm -f conftest.$ac_objext
15051if { (ac_try="$ac_compile"
15052case "(($ac_try" in
15053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15054 *) ac_try_echo=$ac_try;;
15055esac
15056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15057 (eval "$ac_compile") 2>conftest.er1
15058 ac_status=$?
15059 grep -v '^ *+' conftest.er1 >conftest.err
15060 rm -f conftest.er1
15061 cat conftest.err >&5
15062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15063 (exit $ac_status); } && {
15064 test -z "$ac_c_werror_flag" ||
15065 test ! -s conftest.err
15066 } && test -s conftest.$ac_objext; then
15067 ac_header_compiler=yes
15068else
15069 echo "$as_me: failed program was:" >&5
15070sed 's/^/| /' conftest.$ac_ext >&5
15071
15072 ac_header_compiler=no
15073fi
15074
15075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15077echo "${ECHO_T}$ac_header_compiler" >&6; }
15078
15079# Is the header present?
15080{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15081echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
15082cat >conftest.$ac_ext <<_ACEOF
15083/* confdefs.h. */
15084_ACEOF
15085cat confdefs.h >>conftest.$ac_ext
15086cat >>conftest.$ac_ext <<_ACEOF
15087/* end confdefs.h. */
15088#include <$ac_header>
15089_ACEOF
15090if { (ac_try="$ac_cpp conftest.$ac_ext"
15091case "(($ac_try" in
15092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15093 *) ac_try_echo=$ac_try;;
15094esac
15095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
15097 ac_status=$?
15098 grep -v '^ *+' conftest.er1 >conftest.err
15099 rm -f conftest.er1
15100 cat conftest.err >&5
15101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15102 (exit $ac_status); } >/dev/null && {
15103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15104 test ! -s conftest.err
15105 }; then
15106 ac_header_preproc=yes
15107else
15108 echo "$as_me: failed program was:" >&5
15109sed 's/^/| /' conftest.$ac_ext >&5
15110
15111 ac_header_preproc=no
15112fi
15113
15114rm -f conftest.err conftest.$ac_ext
15115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15116echo "${ECHO_T}$ac_header_preproc" >&6; }
15117
15118# So? What about this header?
15119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15120 yes:no: )
15121 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15122echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15123 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15124echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15125 ac_header_preproc=yes
15126 ;;
15127 no:yes:* )
15128 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15129echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15130 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15131echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15132 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15133echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15134 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15135echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15136 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15137echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15138 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15139echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15140
15141 ;;
15142esac
15143{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15144echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15145if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15146 echo $ECHO_N "(cached) $ECHO_C" >&6
15147else
15148 eval "$as_ac_Header=\$ac_header_preproc"
15149fi
15150ac_res=`eval echo '${'$as_ac_Header'}'`
15151 { echo "$as_me:$LINENO: result: $ac_res" >&5
15152echo "${ECHO_T}$ac_res" >&6; }
15153
15154fi
15155if test `eval echo '${'$as_ac_Header'}'` = yes; then
15156 cat >>confdefs.h <<_ACEOF
15157#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15158_ACEOF
15159
15160fi
15161
15162done
15163
6a3a24fa
JD
15164 ## Specify the install directory
15165 carbon_appdir=
15166 if test "${carbon_appdir_x}" != ""; then
15167 case ${carbon_appdir_x} in
15168 y | ye | yes) carbon_appdir=/Applications ;;
15169 * ) carbon_appdir=${carbon_appdir_x} ;;
15170 esac
7c9e5167 15171 fi
8f417b3b
AS
15172 # We also have mouse menus.
15173 HAVE_MENUS=yes
e0f712ba
AC
15174fi
15175
98418dba
CW
15176### Use session management (-lSM -lICE) if available
15177HAVE_X_SM=no
15178if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15179 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15180 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15181echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15182if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15183 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15184fi
ca81d7a0
JD
15185{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15186echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15187else
c0d27fcc 15188 # Is the header compilable?
ca81d7a0
JD
15189{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15190echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15191cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
c0d27fcc
MR
15197$ac_includes_default
15198#include <X11/SM/SMlib.h>
15199_ACEOF
15200rm -f conftest.$ac_objext
ca81d7a0
JD
15201if { (ac_try="$ac_compile"
15202case "(($ac_try" in
15203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15204 *) ac_try_echo=$ac_try;;
15205esac
15206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15207 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15208 ac_status=$?
edfaf76d
LK
15209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
c0d27fcc 15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15213 (exit $ac_status); } && {
15214 test -z "$ac_c_werror_flag" ||
15215 test ! -s conftest.err
15216 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15217 ac_header_compiler=yes
15218else
15219 echo "$as_me: failed program was:" >&5
19650fd6
AS
15220sed 's/^/| /' conftest.$ac_ext >&5
15221
ca81d7a0 15222 ac_header_compiler=no
c0d27fcc 15223fi
ca81d7a0
JD
15224
15225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15226{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15227echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15228
15229# Is the header present?
ca81d7a0
JD
15230{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15231echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15233/* confdefs.h. */
15234_ACEOF
15235cat confdefs.h >>conftest.$ac_ext
15236cat >>conftest.$ac_ext <<_ACEOF
15237/* end confdefs.h. */
98418dba
CW
15238#include <X11/SM/SMlib.h>
15239_ACEOF
ca81d7a0
JD
15240if { (ac_try="$ac_cpp conftest.$ac_ext"
15241case "(($ac_try" in
15242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15243 *) ac_try_echo=$ac_try;;
15244esac
15245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15246 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15247 ac_status=$?
6bae0ccf 15248 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15249 rm -f conftest.er1
15250 cat conftest.err >&5
c0d27fcc 15251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15252 (exit $ac_status); } >/dev/null && {
15253 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15254 test ! -s conftest.err
15255 }; then
c0d27fcc 15256 ac_header_preproc=yes
98418dba
CW
15257else
15258 echo "$as_me: failed program was:" >&5
19650fd6
AS
15259sed 's/^/| /' conftest.$ac_ext >&5
15260
c0d27fcc 15261 ac_header_preproc=no
98418dba 15262fi
ca81d7a0 15263
98418dba 15264rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15265{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15266echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15267
15268# So? What about this header?
edfaf76d
LK
15269case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15270 yes:no: )
c0d27fcc
MR
15271 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15272echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15273 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15274echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15275 ac_header_preproc=yes
19650fd6 15276 ;;
edfaf76d 15277 no:yes:* )
c0d27fcc
MR
15278 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15279echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15280 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15281echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15282 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15283echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15284 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15285echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15286 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15287echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15288 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15289echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15290
19650fd6 15291 ;;
c0d27fcc 15292esac
ca81d7a0
JD
15293{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15294echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15295if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15296 echo $ECHO_N "(cached) $ECHO_C" >&6
15297else
15298 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15299fi
ca81d7a0
JD
15300{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15301echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15302
15303fi
98418dba 15304if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15305 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15306echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15307if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15308 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15309else
503d2be0 15310 ac_check_lib_save_LIBS=$LIBS
1660500f 15311LIBS="-lSM -lICE $LIBS"
503d2be0 15312cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15313/* confdefs.h. */
15314_ACEOF
15315cat confdefs.h >>conftest.$ac_ext
15316cat >>conftest.$ac_ext <<_ACEOF
15317/* end confdefs.h. */
503d2be0 15318
ca81d7a0
JD
15319/* Override any GCC internal prototype to avoid an error.
15320 Use char because int might match the return type of a GCC
15321 builtin and then its argument prototype would still apply. */
503d2be0
AS
15322#ifdef __cplusplus
15323extern "C"
15324#endif
98418dba 15325char SmcOpenConnection ();
503d2be0
AS
15326int
15327main ()
15328{
ca81d7a0 15329return SmcOpenConnection ();
503d2be0
AS
15330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15335if { (ac_try="$ac_link"
15336case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
15340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15341 (eval "$ac_link") 2>conftest.er1
503d2be0 15342 ac_status=$?
edfaf76d
LK
15343 grep -v '^ *+' conftest.er1 >conftest.err
15344 rm -f conftest.er1
15345 cat conftest.err >&5
c0d27fcc 15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15347 (exit $ac_status); } && {
15348 test -z "$ac_c_werror_flag" ||
15349 test ! -s conftest.err
15350 } && test -s conftest$ac_exeext &&
15351 $as_test_x conftest$ac_exeext; then
98418dba 15352 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15353else
15354 echo "$as_me: failed program was:" >&5
19650fd6
AS
15355sed 's/^/| /' conftest.$ac_ext >&5
15356
ca81d7a0 15357 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15358fi
ca81d7a0 15359
f053c89f 15360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15361 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15362LIBS=$ac_check_lib_save_LIBS
15363fi
ca81d7a0
JD
15364{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15365echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15366if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15367 HAVE_X_SM=yes
73b77ee5
GM
15368fi
15369
73b77ee5 15370fi
73b77ee5 15371
c0d27fcc
MR
15372
15373
98418dba 15374 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15375
c0d27fcc 15376cat >>confdefs.h <<\_ACEOF
98418dba 15377#define HAVE_X_SM 1
c0d27fcc 15378_ACEOF
73b77ee5 15379
98418dba
CW
15380 case "$LIBS" in
15381 *-lSM*) ;;
15382 *) LIBS="-lSM -lICE $LIBS" ;;
15383 esac
73b77ee5 15384 fi
98418dba 15385fi
73b77ee5 15386
98418dba 15387# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15388{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15389echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15390if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15391 echo $ECHO_N "(cached) $ECHO_C" >&6
15392else
15393 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15394/* confdefs.h. */
15395_ACEOF
15396cat confdefs.h >>conftest.$ac_ext
15397cat >>conftest.$ac_ext <<_ACEOF
15398/* end confdefs.h. */
98418dba 15399#include <netdb.h>
503d2be0
AS
15400int
15401main ()
15402{
98418dba 15403return h_errno;
503d2be0
AS
15404 ;
15405 return 0;
15406}
15407_ACEOF
15408rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15409if { (ac_try="$ac_link"
15410case "(($ac_try" in
15411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15412 *) ac_try_echo=$ac_try;;
15413esac
15414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15415 (eval "$ac_link") 2>conftest.er1
503d2be0 15416 ac_status=$?
edfaf76d
LK
15417 grep -v '^ *+' conftest.er1 >conftest.err
15418 rm -f conftest.er1
15419 cat conftest.err >&5
c0d27fcc 15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15421 (exit $ac_status); } && {
15422 test -z "$ac_c_werror_flag" ||
15423 test ! -s conftest.err
15424 } && test -s conftest$ac_exeext &&
15425 $as_test_x conftest$ac_exeext; then
98418dba 15426 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15427else
503d2be0 15428 echo "$as_me: failed program was:" >&5
19650fd6
AS
15429sed 's/^/| /' conftest.$ac_ext >&5
15430
ca81d7a0 15431 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15432fi
ca81d7a0 15433
f053c89f 15434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15435 conftest$ac_exeext conftest.$ac_ext
98418dba 15436fi
ca81d7a0
JD
15437{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15438echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15439if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15440
c0d27fcc 15441cat >>confdefs.h <<\_ACEOF
98418dba 15442#define HAVE_H_ERRNO 1
c0d27fcc 15443_ACEOF
73b77ee5 15444
98418dba
CW
15445fi
15446
15447# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15448# for constant arguments. Useless!
ca81d7a0
JD
15449{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15450echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15451if test "${ac_cv_working_alloca_h+set}" = set; then
15452 echo $ECHO_N "(cached) $ECHO_C" >&6
15453else
15454 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15455/* confdefs.h. */
15456_ACEOF
15457cat confdefs.h >>conftest.$ac_ext
15458cat >>conftest.$ac_ext <<_ACEOF
15459/* end confdefs.h. */
98418dba 15460#include <alloca.h>
503d2be0
AS
15461int
15462main ()
15463{
98418dba 15464char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15465 if (p) return 0;
503d2be0
AS
15466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15471if { (ac_try="$ac_link"
15472case "(($ac_try" in
15473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15474 *) ac_try_echo=$ac_try;;
15475esac
15476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15477 (eval "$ac_link") 2>conftest.er1
503d2be0 15478 ac_status=$?
edfaf76d
LK
15479 grep -v '^ *+' conftest.er1 >conftest.err
15480 rm -f conftest.er1
15481 cat conftest.err >&5
c0d27fcc 15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15483 (exit $ac_status); } && {
15484 test -z "$ac_c_werror_flag" ||
15485 test ! -s conftest.err
15486 } && test -s conftest$ac_exeext &&
15487 $as_test_x conftest$ac_exeext; then
98418dba 15488 ac_cv_working_alloca_h=yes
73b77ee5 15489else
503d2be0 15490 echo "$as_me: failed program was:" >&5
19650fd6
AS
15491sed 's/^/| /' conftest.$ac_ext >&5
15492
ca81d7a0 15493 ac_cv_working_alloca_h=no
73b77ee5 15494fi
ca81d7a0 15495
f053c89f 15496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15497 conftest$ac_exeext conftest.$ac_ext
98418dba 15498fi
ca81d7a0
JD
15499{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15500echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15501if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15502
c0d27fcc 15503cat >>confdefs.h <<\_ACEOF
98418dba 15504#define HAVE_ALLOCA_H 1
c0d27fcc 15505_ACEOF
98418dba
CW
15506
15507fi
15508
ca81d7a0
JD
15509{ echo "$as_me:$LINENO: checking for alloca" >&5
15510echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15511if test "${ac_cv_func_alloca_works+set}" = set; then
15512 echo $ECHO_N "(cached) $ECHO_C" >&6
15513else
503d2be0 15514 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15515/* confdefs.h. */
15516_ACEOF
15517cat confdefs.h >>conftest.$ac_ext
15518cat >>conftest.$ac_ext <<_ACEOF
15519/* end confdefs.h. */
98418dba
CW
15520#ifdef __GNUC__
15521# define alloca __builtin_alloca
15522#else
15523# ifdef _MSC_VER
15524# include <malloc.h>
15525# define alloca _alloca
15526# else
f053c89f 15527# ifdef HAVE_ALLOCA_H
98418dba
CW
15528# include <alloca.h>
15529# else
15530# ifdef _AIX
15531 #pragma alloca
15532# else
15533# ifndef alloca /* predefined by HP cc +Olibcalls */
15534char *alloca ();
15535# endif
15536# endif
15537# endif
15538# endif
15539#endif
15540
503d2be0
AS
15541int
15542main ()
15543{
98418dba 15544char *p = (char *) alloca (1);
ca81d7a0 15545 if (p) return 0;
503d2be0
AS
15546 ;
15547 return 0;
15548}
15549_ACEOF
15550rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15551if { (ac_try="$ac_link"
15552case "(($ac_try" in
15553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15554 *) ac_try_echo=$ac_try;;
15555esac
15556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15557 (eval "$ac_link") 2>conftest.er1
503d2be0 15558 ac_status=$?
edfaf76d
LK
15559 grep -v '^ *+' conftest.er1 >conftest.err
15560 rm -f conftest.er1
15561 cat conftest.err >&5
c0d27fcc 15562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15563 (exit $ac_status); } && {
15564 test -z "$ac_c_werror_flag" ||
15565 test ! -s conftest.err
15566 } && test -s conftest$ac_exeext &&
15567 $as_test_x conftest$ac_exeext; then
98418dba 15568 ac_cv_func_alloca_works=yes
ac95a621 15569else
503d2be0 15570 echo "$as_me: failed program was:" >&5
19650fd6
AS
15571sed 's/^/| /' conftest.$ac_ext >&5
15572
ca81d7a0 15573 ac_cv_func_alloca_works=no
ac95a621 15574fi
ca81d7a0 15575
f053c89f 15576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15577 conftest$ac_exeext conftest.$ac_ext
98418dba 15578fi
ca81d7a0
JD
15579{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15580echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15581
98418dba
CW
15582if test $ac_cv_func_alloca_works = yes; then
15583
c0d27fcc 15584cat >>confdefs.h <<\_ACEOF
98418dba 15585#define HAVE_ALLOCA 1
c0d27fcc 15586_ACEOF
98418dba
CW
15587
15588else
15589 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15590# that cause trouble. Some versions do not even contain alloca or
15591# contain a buggy version. If you still want to use their alloca,
15592# use ar to extract alloca.o from them instead of compiling alloca.c.
15593
ca81d7a0 15594ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15595
c0d27fcc 15596cat >>confdefs.h <<\_ACEOF
98418dba 15597#define C_ALLOCA 1
c0d27fcc 15598_ACEOF
98418dba 15599
c0d27fcc 15600
ca81d7a0
JD
15601{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15602echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15603if test "${ac_cv_os_cray+set}" = set; then
15604 echo $ECHO_N "(cached) $ECHO_C" >&6
15605else
15606 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
ca81d7a0 15612#if defined CRAY && ! defined CRAY2
98418dba
CW
15613webecray
15614#else
15615wenotbecray
15616#endif
15617
15618_ACEOF
15619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15620 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15621 ac_cv_os_cray=yes
15622else
15623 ac_cv_os_cray=no
15624fi
15625rm -f conftest*
ac95a621 15626
98418dba 15627fi
ca81d7a0
JD
15628{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15629echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15630if test $ac_cv_os_cray = yes; then
15631 for ac_func in _getb67 GETB67 getb67; do
15632 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15633{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15635if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15636 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15637else
503d2be0 15638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15639/* confdefs.h. */
15640_ACEOF
15641cat confdefs.h >>conftest.$ac_ext
15642cat >>conftest.$ac_ext <<_ACEOF
15643/* end confdefs.h. */
edfaf76d
LK
15644/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15645 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15646#define $ac_func innocuous_$ac_func
15647
73b77ee5 15648/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15649 which can conflict with char $ac_func (); below.
15650 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15651 <limits.h> exists even on freestanding compilers. */
edfaf76d 15652
19650fd6
AS
15653#ifdef __STDC__
15654# include <limits.h>
15655#else
15656# include <assert.h>
15657#endif
edfaf76d
LK
15658
15659#undef $ac_func
15660
ca81d7a0
JD
15661/* Override any GCC internal prototype to avoid an error.
15662 Use char because int might match the return type of a GCC
15663 builtin and then its argument prototype would still apply. */
503d2be0
AS
15664#ifdef __cplusplus
15665extern "C"
15666#endif
503d2be0 15667char $ac_func ();
73b77ee5
GM
15668/* The GNU C library defines this for functions which it implements
15669 to always fail with ENOSYS. Some functions are actually named
15670 something starting with __ and the normal name is an alias. */
ca81d7a0 15671#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15672choke me
73b77ee5
GM
15673#endif
15674
19650fd6
AS
15675int
15676main ()
15677{
ca81d7a0 15678return $ac_func ();
503d2be0
AS
15679 ;
15680 return 0;
15681}
15682_ACEOF
15683rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15684if { (ac_try="$ac_link"
15685case "(($ac_try" in
15686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15687 *) ac_try_echo=$ac_try;;
15688esac
15689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15690 (eval "$ac_link") 2>conftest.er1
503d2be0 15691 ac_status=$?
edfaf76d
LK
15692 grep -v '^ *+' conftest.er1 >conftest.err
15693 rm -f conftest.er1
15694 cat conftest.err >&5
c0d27fcc 15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15696 (exit $ac_status); } && {
15697 test -z "$ac_c_werror_flag" ||
15698 test ! -s conftest.err
15699 } && test -s conftest$ac_exeext &&
15700 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15701 eval "$as_ac_var=yes"
15702else
15703 echo "$as_me: failed program was:" >&5
19650fd6
AS
15704sed 's/^/| /' conftest.$ac_ext >&5
15705
ca81d7a0 15706 eval "$as_ac_var=no"
503d2be0 15707fi
ca81d7a0 15708
f053c89f 15709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15710 conftest$ac_exeext conftest.$ac_ext
503d2be0 15711fi
ca81d7a0
JD
15712ac_res=`eval echo '${'$as_ac_var'}'`
15713 { echo "$as_me:$LINENO: result: $ac_res" >&5
15714echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15715if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15716
c0d27fcc 15717cat >>confdefs.h <<_ACEOF
98418dba 15718#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15719_ACEOF
98418dba
CW
15720
15721 break
73b77ee5 15722fi
73b77ee5 15723
98418dba 15724 done
73b77ee5
GM
15725fi
15726
ca81d7a0
JD
15727{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15728echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15729if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15730 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15731else
15732 if test "$cross_compiling" = yes; then
15733 ac_cv_c_stack_direction=0
73b77ee5 15734else
503d2be0 15735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15736/* confdefs.h. */
15737_ACEOF
15738cat confdefs.h >>conftest.$ac_ext
15739cat >>conftest.$ac_ext <<_ACEOF
15740/* end confdefs.h. */
ca81d7a0 15741$ac_includes_default
503d2be0 15742int
98418dba 15743find_stack_direction ()
503d2be0 15744{
98418dba
CW
15745 static char *addr = 0;
15746 auto char dummy;
15747 if (addr == 0)
15748 {
15749 addr = &dummy;
15750 return find_stack_direction ();
15751 }
73b77ee5 15752 else
98418dba
CW
15753 return (&dummy > addr) ? 1 : -1;
15754}
ba4481b5 15755
503d2be0
AS
15756int
15757main ()
15758{
ca81d7a0 15759 return find_stack_direction () < 0;
503d2be0
AS
15760}
15761_ACEOF
98418dba 15762rm -f conftest$ac_exeext
ca81d7a0
JD
15763if { (ac_try="$ac_link"
15764case "(($ac_try" in
15765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766 *) ac_try_echo=$ac_try;;
15767esac
15768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15769 (eval "$ac_link") 2>&5
503d2be0 15770 ac_status=$?
c0d27fcc 15771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15773 { (case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_try") 2>&5
503d2be0 15779 ac_status=$?
c0d27fcc 15780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15781 (exit $ac_status); }; }; then
98418dba 15782 ac_cv_c_stack_direction=1
ba4481b5 15783else
98418dba
CW
15784 echo "$as_me: program exited with status $ac_status" >&5
15785echo "$as_me: failed program was:" >&5
19650fd6
AS
15786sed 's/^/| /' conftest.$ac_ext >&5
15787
c0d27fcc 15788( exit $ac_status )
98418dba 15789ac_cv_c_stack_direction=-1
ba4481b5 15790fi
ca81d7a0 15791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15792fi
ca81d7a0
JD
15793
15794
98418dba 15795fi
ca81d7a0
JD
15796{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15797echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15798
c0d27fcc 15799cat >>confdefs.h <<_ACEOF
98418dba 15800#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15801_ACEOF
15802
ba4481b5 15803
ba4481b5
DL
15804fi
15805
c0d27fcc 15806
611adb3e
GM
15807if test x"$ac_cv_func_alloca_works" != xyes; then
15808 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15809echo "$as_me: error: a system implementation of alloca is required " >&2;}
15810 { (exit 1); exit 1; }; }
15811fi
15812
98418dba
CW
15813# fmod, logb, and frexp are found in -lm on most systems.
15814# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15815
ca81d7a0
JD
15816{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15817echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15818if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15819 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15820else
98418dba
CW
15821 ac_check_lib_save_LIBS=$LIBS
15822LIBS="-lm $LIBS"
15823cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15824/* confdefs.h. */
15825_ACEOF
15826cat confdefs.h >>conftest.$ac_ext
15827cat >>conftest.$ac_ext <<_ACEOF
15828/* end confdefs.h. */
ba4481b5 15829
ca81d7a0
JD
15830/* Override any GCC internal prototype to avoid an error.
15831 Use char because int might match the return type of a GCC
15832 builtin and then its argument prototype would still apply. */
98418dba
CW
15833#ifdef __cplusplus
15834extern "C"
15835#endif
98418dba 15836char sqrt ();
503d2be0
AS
15837int
15838main ()
15839{
ca81d7a0 15840return sqrt ();
503d2be0
AS
15841 ;
15842 return 0;
15843}
15844_ACEOF
15845rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15846if { (ac_try="$ac_link"
15847case "(($ac_try" in
15848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15849 *) ac_try_echo=$ac_try;;
15850esac
15851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15852 (eval "$ac_link") 2>conftest.er1
503d2be0 15853 ac_status=$?
edfaf76d
LK
15854 grep -v '^ *+' conftest.er1 >conftest.err
15855 rm -f conftest.er1
15856 cat conftest.err >&5
c0d27fcc 15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15858 (exit $ac_status); } && {
15859 test -z "$ac_c_werror_flag" ||
15860 test ! -s conftest.err
15861 } && test -s conftest$ac_exeext &&
15862 $as_test_x conftest$ac_exeext; then
98418dba 15863 ac_cv_lib_m_sqrt=yes
ba4481b5 15864else
503d2be0 15865 echo "$as_me: failed program was:" >&5
19650fd6
AS
15866sed 's/^/| /' conftest.$ac_ext >&5
15867
ca81d7a0 15868 ac_cv_lib_m_sqrt=no
ba4481b5 15869fi
ca81d7a0 15870
f053c89f 15871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15872 conftest$ac_exeext conftest.$ac_ext
98418dba 15873LIBS=$ac_check_lib_save_LIBS
ba4481b5 15874fi
ca81d7a0
JD
15875{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15876echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15877if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15878 cat >>confdefs.h <<_ACEOF
98418dba 15879#define HAVE_LIBM 1
c0d27fcc 15880_ACEOF
98418dba
CW
15881
15882 LIBS="-lm $LIBS"
ba4481b5 15883
ba4481b5
DL
15884fi
15885
c0d27fcc 15886
55597d70
DL
15887# Check for mail-locking functions in a "mail" library. Probably this should
15888# have the same check as for liblockfile below.
98418dba 15889
ca81d7a0
JD
15890{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15891echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15892if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15893 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15894else
98418dba
CW
15895 ac_check_lib_save_LIBS=$LIBS
15896LIBS="-lmail $LIBS"
15897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15898/* confdefs.h. */
15899_ACEOF
15900cat confdefs.h >>conftest.$ac_ext
15901cat >>conftest.$ac_ext <<_ACEOF
15902/* end confdefs.h. */
98418dba 15903
ca81d7a0
JD
15904/* Override any GCC internal prototype to avoid an error.
15905 Use char because int might match the return type of a GCC
15906 builtin and then its argument prototype would still apply. */
98418dba
CW
15907#ifdef __cplusplus
15908extern "C"
15909#endif
98418dba 15910char maillock ();
503d2be0
AS
15911int
15912main ()
15913{
ca81d7a0 15914return maillock ();
503d2be0
AS
15915 ;
15916 return 0;
15917}
15918_ACEOF
15919rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15920if { (ac_try="$ac_link"
15921case "(($ac_try" in
15922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15923 *) ac_try_echo=$ac_try;;
15924esac
15925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15926 (eval "$ac_link") 2>conftest.er1
503d2be0 15927 ac_status=$?
edfaf76d
LK
15928 grep -v '^ *+' conftest.er1 >conftest.err
15929 rm -f conftest.er1
15930 cat conftest.err >&5
c0d27fcc 15931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15932 (exit $ac_status); } && {
15933 test -z "$ac_c_werror_flag" ||
15934 test ! -s conftest.err
15935 } && test -s conftest$ac_exeext &&
15936 $as_test_x conftest$ac_exeext; then
98418dba 15937 ac_cv_lib_mail_maillock=yes
ba4481b5 15938else
503d2be0 15939 echo "$as_me: failed program was:" >&5
19650fd6
AS
15940sed 's/^/| /' conftest.$ac_ext >&5
15941
ca81d7a0 15942 ac_cv_lib_mail_maillock=no
ba4481b5 15943fi
ca81d7a0 15944
f053c89f 15945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15946 conftest$ac_exeext conftest.$ac_ext
98418dba 15947LIBS=$ac_check_lib_save_LIBS
ba4481b5 15948fi
ca81d7a0
JD
15949{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15950echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15951if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15952 cat >>confdefs.h <<_ACEOF
98418dba 15953#define HAVE_LIBMAIL 1
c0d27fcc 15954_ACEOF
ba4481b5 15955
98418dba 15956 LIBS="-lmail $LIBS"
ba4481b5 15957
98418dba 15958fi
ba4481b5 15959
c0d27fcc 15960
ca81d7a0
JD
15961{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15962echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15963if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15964 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15965else
503d2be0 15966 ac_check_lib_save_LIBS=$LIBS
98418dba 15967LIBS="-llockfile $LIBS"
503d2be0 15968cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15969/* confdefs.h. */
15970_ACEOF
15971cat confdefs.h >>conftest.$ac_ext
15972cat >>conftest.$ac_ext <<_ACEOF
15973/* end confdefs.h. */
503d2be0 15974
ca81d7a0
JD
15975/* Override any GCC internal prototype to avoid an error.
15976 Use char because int might match the return type of a GCC
15977 builtin and then its argument prototype would still apply. */
503d2be0
AS
15978#ifdef __cplusplus
15979extern "C"
15980#endif
98418dba 15981char maillock ();
503d2be0
AS
15982int
15983main ()
15984{
ca81d7a0 15985return maillock ();
503d2be0
AS
15986 ;
15987 return 0;
15988}
15989_ACEOF
15990rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15991if { (ac_try="$ac_link"
15992case "(($ac_try" in
15993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15994 *) ac_try_echo=$ac_try;;
15995esac
15996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15997 (eval "$ac_link") 2>conftest.er1
503d2be0 15998 ac_status=$?
edfaf76d
LK
15999 grep -v '^ *+' conftest.er1 >conftest.err
16000 rm -f conftest.er1
16001 cat conftest.err >&5
c0d27fcc 16002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16003 (exit $ac_status); } && {
16004 test -z "$ac_c_werror_flag" ||
16005 test ! -s conftest.err
16006 } && test -s conftest$ac_exeext &&
16007 $as_test_x conftest$ac_exeext; then
98418dba 16008 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
16009else
16010 echo "$as_me: failed program was:" >&5
19650fd6
AS
16011sed 's/^/| /' conftest.$ac_ext >&5
16012
ca81d7a0 16013 ac_cv_lib_lockfile_maillock=no
98418dba 16014fi
ca81d7a0 16015
f053c89f 16016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16017 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16018LIBS=$ac_check_lib_save_LIBS
16019fi
ca81d7a0
JD
16020{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
16021echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 16022if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 16023 cat >>confdefs.h <<_ACEOF
98418dba 16024#define HAVE_LIBLOCKFILE 1
c0d27fcc 16025_ACEOF
98418dba
CW
16026
16027 LIBS="-llockfile $LIBS"
16028
16029fi
16030
16031# If we have the shared liblockfile, assume we must use it for mail
16032# locking (e.g. Debian). If we couldn't link against liblockfile
16033# (no liblockfile.a installed), ensure that we don't need to.
16034if test "$ac_cv_lib_lockfile_maillock" = no; then
16035 # Extract the first word of "liblockfile.so", so it can be a program name with args.
16036set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
16037{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16038echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
16039if test "${ac_cv_prog_liblockfile+set}" = set; then
16040 echo $ECHO_N "(cached) $ECHO_C" >&6
16041else
16042 if test -n "$liblockfile"; then
16043 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
16044else
c0d27fcc 16045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
16046as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
16047for as_dir in $as_dummy
c0d27fcc
MR
16048do
16049 IFS=$as_save_IFS
16050 test -z "$as_dir" && as_dir=.
16051 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 16052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
16053 ac_cv_prog_liblockfile="yes"
16054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16055 break 2
16056 fi
16057done
98418dba 16058done
ca81d7a0 16059IFS=$as_save_IFS
98418dba
CW
16060
16061 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 16062fi
503d2be0 16063fi
98418dba
CW
16064liblockfile=$ac_cv_prog_liblockfile
16065if test -n "$liblockfile"; then
ca81d7a0
JD
16066 { echo "$as_me:$LINENO: result: $liblockfile" >&5
16067echo "${ECHO_T}$liblockfile" >&6; }
98418dba 16068else
ca81d7a0
JD
16069 { echo "$as_me:$LINENO: result: no" >&5
16070echo "${ECHO_T}no" >&6; }
ba4481b5
DL
16071fi
16072
ca81d7a0 16073
98418dba 16074 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 16075 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
16076This probably means that movemail could lose mail.
16077There may be a \`development' package to install containing liblockfile." >&5
16078echo "$as_me: error: Shared liblockfile found but can't link against it.
16079This probably means that movemail could lose mail.
16080There may be a \`development' package to install containing liblockfile." >&2;}
16081 { (exit 1); exit 1; }; }
98418dba 16082 else :
55597d70 16083 fi
98418dba 16084fi
503d2be0 16085
98418dba
CW
16086for ac_func in touchlock
16087do
16088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16089{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16091if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16092 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 16093else
98418dba 16094 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
edfaf76d
LK
16100/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16102#define $ac_func innocuous_$ac_func
16103
98418dba 16104/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16105 which can conflict with char $ac_func (); below.
16106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16107 <limits.h> exists even on freestanding compilers. */
edfaf76d 16108
19650fd6
AS
16109#ifdef __STDC__
16110# include <limits.h>
16111#else
16112# include <assert.h>
16113#endif
edfaf76d
LK
16114
16115#undef $ac_func
16116
ca81d7a0
JD
16117/* Override any GCC internal prototype to avoid an error.
16118 Use char because int might match the return type of a GCC
16119 builtin and then its argument prototype would still apply. */
503d2be0
AS
16120#ifdef __cplusplus
16121extern "C"
16122#endif
98418dba 16123char $ac_func ();
98418dba
CW
16124/* The GNU C library defines this for functions which it implements
16125 to always fail with ENOSYS. Some functions are actually named
16126 something starting with __ and the normal name is an alias. */
ca81d7a0 16127#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16128choke me
cd958eb3
MB
16129#endif
16130
19650fd6
AS
16131int
16132main ()
16133{
ca81d7a0 16134return $ac_func ();
503d2be0
AS
16135 ;
16136 return 0;
16137}
16138_ACEOF
16139rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16140if { (ac_try="$ac_link"
16141case "(($ac_try" in
16142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16143 *) ac_try_echo=$ac_try;;
16144esac
16145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16146 (eval "$ac_link") 2>conftest.er1
503d2be0 16147 ac_status=$?
edfaf76d
LK
16148 grep -v '^ *+' conftest.er1 >conftest.err
16149 rm -f conftest.er1
16150 cat conftest.err >&5
c0d27fcc 16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16152 (exit $ac_status); } && {
16153 test -z "$ac_c_werror_flag" ||
16154 test ! -s conftest.err
16155 } && test -s conftest$ac_exeext &&
16156 $as_test_x conftest$ac_exeext; then
98418dba 16157 eval "$as_ac_var=yes"
503d2be0
AS
16158else
16159 echo "$as_me: failed program was:" >&5
19650fd6
AS
16160sed 's/^/| /' conftest.$ac_ext >&5
16161
ca81d7a0 16162 eval "$as_ac_var=no"
503d2be0 16163fi
ca81d7a0 16164
f053c89f 16165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16166 conftest$ac_exeext conftest.$ac_ext
503d2be0 16167fi
ca81d7a0
JD
16168ac_res=`eval echo '${'$as_ac_var'}'`
16169 { echo "$as_me:$LINENO: result: $ac_res" >&5
16170echo "${ECHO_T}$ac_res" >&6; }
98418dba 16171if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16172 cat >>confdefs.h <<_ACEOF
98418dba 16173#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16174_ACEOF
457b792c 16175
457b792c 16176fi
98418dba 16177done
457b792c 16178
c0d27fcc 16179
98418dba
CW
16180for ac_header in maillock.h
16181do
16182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16183if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16184 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16186if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16187 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16188fi
ca81d7a0
JD
16189ac_res=`eval echo '${'$as_ac_Header'}'`
16190 { echo "$as_me:$LINENO: result: $ac_res" >&5
16191echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16192else
c0d27fcc 16193 # Is the header compilable?
ca81d7a0
JD
16194{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16195echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
c0d27fcc
MR
16202$ac_includes_default
16203#include <$ac_header>
16204_ACEOF
16205rm -f conftest.$ac_objext
ca81d7a0
JD
16206if { (ac_try="$ac_compile"
16207case "(($ac_try" in
16208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16209 *) ac_try_echo=$ac_try;;
16210esac
16211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16212 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16213 ac_status=$?
edfaf76d
LK
16214 grep -v '^ *+' conftest.er1 >conftest.err
16215 rm -f conftest.er1
16216 cat conftest.err >&5
c0d27fcc 16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16218 (exit $ac_status); } && {
16219 test -z "$ac_c_werror_flag" ||
16220 test ! -s conftest.err
16221 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16222 ac_header_compiler=yes
16223else
16224 echo "$as_me: failed program was:" >&5
19650fd6
AS
16225sed 's/^/| /' conftest.$ac_ext >&5
16226
ca81d7a0 16227 ac_header_compiler=no
c0d27fcc 16228fi
ca81d7a0
JD
16229
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16231{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16232echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16233
16234# Is the header present?
ca81d7a0
JD
16235{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16236echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16238/* confdefs.h. */
16239_ACEOF
16240cat confdefs.h >>conftest.$ac_ext
16241cat >>conftest.$ac_ext <<_ACEOF
16242/* end confdefs.h. */
98418dba 16243#include <$ac_header>
503d2be0 16244_ACEOF
ca81d7a0
JD
16245if { (ac_try="$ac_cpp conftest.$ac_ext"
16246case "(($ac_try" in
16247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16248 *) ac_try_echo=$ac_try;;
16249esac
16250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16251 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16252 ac_status=$?
6bae0ccf 16253 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16254 rm -f conftest.er1
16255 cat conftest.err >&5
c0d27fcc 16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16257 (exit $ac_status); } >/dev/null && {
16258 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16259 test ! -s conftest.err
16260 }; then
c0d27fcc 16261 ac_header_preproc=yes
98418dba
CW
16262else
16263 echo "$as_me: failed program was:" >&5
19650fd6
AS
16264sed 's/^/| /' conftest.$ac_ext >&5
16265
c0d27fcc 16266 ac_header_preproc=no
503d2be0 16267fi
ca81d7a0 16268
98418dba 16269rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16270{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16271echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16272
16273# So? What about this header?
edfaf76d
LK
16274case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16275 yes:no: )
c0d27fcc
MR
16276 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16277echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16279echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16280 ac_header_preproc=yes
19650fd6 16281 ;;
edfaf76d 16282 no:yes:* )
c0d27fcc
MR
16283 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16284echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16285 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16286echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16287 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16288echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16289 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16290echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16292echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16293 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16294echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16295
19650fd6 16296 ;;
c0d27fcc 16297esac
ca81d7a0
JD
16298{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16299echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16300if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
16302else
edfaf76d 16303 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16304fi
ca81d7a0
JD
16305ac_res=`eval echo '${'$as_ac_Header'}'`
16306 { echo "$as_me:$LINENO: result: $ac_res" >&5
16307echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16308
16309fi
98418dba 16310if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16311 cat >>confdefs.h <<_ACEOF
98418dba 16312#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16313_ACEOF
48d4b120 16314
ba4481b5 16315fi
c0d27fcc 16316
98418dba
CW
16317done
16318
c0d27fcc
MR
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
22044edf
DL
16374
16375
c0d27fcc 16376
b0e44248
RB
16377
16378
973a76b1
DL
16379
16380
16381
cd958eb3 16382
25ca0bca 16383
ea92fc9f 16384
e2fcf543 16385
c0d27fcc
MR
16386
16387
98418dba 16388for ac_func in gethostname getdomainname dup2 \
e2fcf543 16389rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16390random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16391strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16392utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16393__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16394sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16395gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 16396memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
16397do
16398as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16399{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16400echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16401if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16403else
503d2be0 16404 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
edfaf76d
LK
16410/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16411 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16412#define $ac_func innocuous_$ac_func
16413
98418dba 16414/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16415 which can conflict with char $ac_func (); below.
16416 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16417 <limits.h> exists even on freestanding compilers. */
edfaf76d 16418
19650fd6
AS
16419#ifdef __STDC__
16420# include <limits.h>
16421#else
16422# include <assert.h>
16423#endif
edfaf76d
LK
16424
16425#undef $ac_func
16426
ca81d7a0
JD
16427/* Override any GCC internal prototype to avoid an error.
16428 Use char because int might match the return type of a GCC
16429 builtin and then its argument prototype would still apply. */
503d2be0
AS
16430#ifdef __cplusplus
16431extern "C"
16432#endif
98418dba 16433char $ac_func ();
98418dba
CW
16434/* The GNU C library defines this for functions which it implements
16435 to always fail with ENOSYS. Some functions are actually named
16436 something starting with __ and the normal name is an alias. */
ca81d7a0 16437#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16438choke me
98418dba
CW
16439#endif
16440
19650fd6
AS
16441int
16442main ()
16443{
ca81d7a0 16444return $ac_func ();
503d2be0
AS
16445 ;
16446 return 0;
16447}
16448_ACEOF
16449rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16450if { (ac_try="$ac_link"
16451case "(($ac_try" in
16452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16453 *) ac_try_echo=$ac_try;;
16454esac
16455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16456 (eval "$ac_link") 2>conftest.er1
503d2be0 16457 ac_status=$?
edfaf76d
LK
16458 grep -v '^ *+' conftest.er1 >conftest.err
16459 rm -f conftest.er1
16460 cat conftest.err >&5
c0d27fcc 16461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16462 (exit $ac_status); } && {
16463 test -z "$ac_c_werror_flag" ||
16464 test ! -s conftest.err
16465 } && test -s conftest$ac_exeext &&
16466 $as_test_x conftest$ac_exeext; then
98418dba 16467 eval "$as_ac_var=yes"
503d2be0
AS
16468else
16469 echo "$as_me: failed program was:" >&5
19650fd6
AS
16470sed 's/^/| /' conftest.$ac_ext >&5
16471
ca81d7a0 16472 eval "$as_ac_var=no"
503d2be0 16473fi
ca81d7a0 16474
f053c89f 16475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16476 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16477fi
ca81d7a0
JD
16478ac_res=`eval echo '${'$as_ac_var'}'`
16479 { echo "$as_me:$LINENO: result: $ac_res" >&5
16480echo "${ECHO_T}$ac_res" >&6; }
98418dba 16481if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16482 cat >>confdefs.h <<_ACEOF
98418dba 16483#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16484_ACEOF
ba4481b5 16485
ba4481b5 16486fi
98418dba 16487done
ba4481b5 16488
c0d27fcc
MR
16489
16490
98418dba
CW
16491for ac_header in sys/un.h
16492do
16493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16494if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16495 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16497if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16499fi
ca81d7a0
JD
16500ac_res=`eval echo '${'$as_ac_Header'}'`
16501 { echo "$as_me:$LINENO: result: $ac_res" >&5
16502echo "${ECHO_T}$ac_res" >&6; }
98418dba 16503else
c0d27fcc 16504 # Is the header compilable?
ca81d7a0
JD
16505{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16506echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
c0d27fcc
MR
16513$ac_includes_default
16514#include <$ac_header>
16515_ACEOF
16516rm -f conftest.$ac_objext
ca81d7a0
JD
16517if { (ac_try="$ac_compile"
16518case "(($ac_try" in
16519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16520 *) ac_try_echo=$ac_try;;
16521esac
16522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16523 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16524 ac_status=$?
edfaf76d
LK
16525 grep -v '^ *+' conftest.er1 >conftest.err
16526 rm -f conftest.er1
16527 cat conftest.err >&5
c0d27fcc 16528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16529 (exit $ac_status); } && {
16530 test -z "$ac_c_werror_flag" ||
16531 test ! -s conftest.err
16532 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16533 ac_header_compiler=yes
16534else
16535 echo "$as_me: failed program was:" >&5
19650fd6
AS
16536sed 's/^/| /' conftest.$ac_ext >&5
16537
ca81d7a0 16538 ac_header_compiler=no
c0d27fcc 16539fi
ca81d7a0
JD
16540
16541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16542{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16543echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16544
16545# Is the header present?
ca81d7a0
JD
16546{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16547echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16548cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16549/* confdefs.h. */
16550_ACEOF
16551cat confdefs.h >>conftest.$ac_ext
16552cat >>conftest.$ac_ext <<_ACEOF
16553/* end confdefs.h. */
98418dba 16554#include <$ac_header>
503d2be0 16555_ACEOF
ca81d7a0
JD
16556if { (ac_try="$ac_cpp conftest.$ac_ext"
16557case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;;
16560esac
16561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16563 ac_status=$?
6bae0ccf 16564 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16565 rm -f conftest.er1
16566 cat conftest.err >&5
c0d27fcc 16567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16568 (exit $ac_status); } >/dev/null && {
16569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16570 test ! -s conftest.err
16571 }; then
c0d27fcc 16572 ac_header_preproc=yes
ba4481b5 16573else
503d2be0 16574 echo "$as_me: failed program was:" >&5
19650fd6
AS
16575sed 's/^/| /' conftest.$ac_ext >&5
16576
c0d27fcc 16577 ac_header_preproc=no
ba4481b5 16578fi
ca81d7a0 16579
503d2be0 16580rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16581{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16582echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16583
16584# So? What about this header?
edfaf76d
LK
16585case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16586 yes:no: )
c0d27fcc
MR
16587 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16588echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16589 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16590echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16591 ac_header_preproc=yes
19650fd6 16592 ;;
edfaf76d 16593 no:yes:* )
c0d27fcc
MR
16594 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16595echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16596 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16597echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16598 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16599echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16600 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16601echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16603echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16604 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16605echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16606
19650fd6 16607 ;;
c0d27fcc 16608esac
ca81d7a0
JD
16609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16612 echo $ECHO_N "(cached) $ECHO_C" >&6
16613else
edfaf76d 16614 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16615fi
ca81d7a0
JD
16616ac_res=`eval echo '${'$as_ac_Header'}'`
16617 { echo "$as_me:$LINENO: result: $ac_res" >&5
16618echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16619
16620fi
925c2f3f 16621if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16622 cat >>confdefs.h <<_ACEOF
925c2f3f 16623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16624_ACEOF
503d2be0 16625
925c2f3f 16626fi
c0d27fcc 16627
925c2f3f
EZ
16628done
16629
c0d27fcc
MR
16630
16631
16632
edfaf76d 16633
f053c89f
CY
16634
16635for ac_header in $ac_header_list
925c2f3f
EZ
16636do
16637as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16638if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16639 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16640echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16641if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16642 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16643fi
ca81d7a0
JD
16644ac_res=`eval echo '${'$as_ac_Header'}'`
16645 { echo "$as_me:$LINENO: result: $ac_res" >&5
16646echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16647else
c0d27fcc 16648 # Is the header compilable?
ca81d7a0
JD
16649{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16650echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16651cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16652/* confdefs.h. */
16653_ACEOF
16654cat confdefs.h >>conftest.$ac_ext
16655cat >>conftest.$ac_ext <<_ACEOF
16656/* end confdefs.h. */
c0d27fcc
MR
16657$ac_includes_default
16658#include <$ac_header>
16659_ACEOF
16660rm -f conftest.$ac_objext
ca81d7a0
JD
16661if { (ac_try="$ac_compile"
16662case "(($ac_try" in
16663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16664 *) ac_try_echo=$ac_try;;
16665esac
16666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16667 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16668 ac_status=$?
edfaf76d
LK
16669 grep -v '^ *+' conftest.er1 >conftest.err
16670 rm -f conftest.er1
16671 cat conftest.err >&5
c0d27fcc 16672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16673 (exit $ac_status); } && {
16674 test -z "$ac_c_werror_flag" ||
16675 test ! -s conftest.err
16676 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16677 ac_header_compiler=yes
16678else
16679 echo "$as_me: failed program was:" >&5
19650fd6
AS
16680sed 's/^/| /' conftest.$ac_ext >&5
16681
ca81d7a0 16682 ac_header_compiler=no
c0d27fcc 16683fi
ca81d7a0
JD
16684
16685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16686{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16687echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16688
16689# Is the header present?
ca81d7a0
JD
16690{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16691echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16692cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16693/* confdefs.h. */
16694_ACEOF
16695cat confdefs.h >>conftest.$ac_ext
16696cat >>conftest.$ac_ext <<_ACEOF
16697/* end confdefs.h. */
98418dba 16698#include <$ac_header>
503d2be0 16699_ACEOF
ca81d7a0
JD
16700if { (ac_try="$ac_cpp conftest.$ac_ext"
16701case "(($ac_try" in
16702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16703 *) ac_try_echo=$ac_try;;
16704esac
16705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16707 ac_status=$?
6bae0ccf 16708 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16709 rm -f conftest.er1
16710 cat conftest.err >&5
c0d27fcc 16711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16712 (exit $ac_status); } >/dev/null && {
16713 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16714 test ! -s conftest.err
16715 }; then
c0d27fcc 16716 ac_header_preproc=yes
98418dba
CW
16717else
16718 echo "$as_me: failed program was:" >&5
19650fd6
AS
16719sed 's/^/| /' conftest.$ac_ext >&5
16720
c0d27fcc 16721 ac_header_preproc=no
98418dba 16722fi
ca81d7a0 16723
98418dba 16724rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16725{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16726echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16727
16728# So? What about this header?
edfaf76d
LK
16729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16730 yes:no: )
c0d27fcc
MR
16731 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16732echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16733 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16734echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16735 ac_header_preproc=yes
19650fd6 16736 ;;
edfaf76d 16737 no:yes:* )
c0d27fcc
MR
16738 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16739echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16740 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16741echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16742 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16743echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16744 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16745echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16746 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16747echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16748 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16749echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16750
19650fd6 16751 ;;
c0d27fcc 16752esac
ca81d7a0
JD
16753{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16754echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16755if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16756 echo $ECHO_N "(cached) $ECHO_C" >&6
16757else
edfaf76d 16758 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16759fi
ca81d7a0
JD
16760ac_res=`eval echo '${'$as_ac_Header'}'`
16761 { echo "$as_me:$LINENO: result: $ac_res" >&5
16762echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16763
16764fi
98418dba 16765if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16766 cat >>confdefs.h <<_ACEOF
98418dba 16767#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16768_ACEOF
98418dba
CW
16769
16770fi
c0d27fcc 16771
98418dba
CW
16772done
16773
c0d27fcc 16774
f053c89f
CY
16775
16776
16777
16778
16779
16780
16781
16782for ac_func in $ac_func_list
98418dba
CW
16783do
16784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16785{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16787if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16788 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16789else
98418dba 16790 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16791/* confdefs.h. */
16792_ACEOF
16793cat confdefs.h >>conftest.$ac_ext
16794cat >>conftest.$ac_ext <<_ACEOF
16795/* end confdefs.h. */
edfaf76d
LK
16796/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16797 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16798#define $ac_func innocuous_$ac_func
16799
98418dba 16800/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16801 which can conflict with char $ac_func (); below.
16802 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16803 <limits.h> exists even on freestanding compilers. */
edfaf76d 16804
19650fd6
AS
16805#ifdef __STDC__
16806# include <limits.h>
16807#else
16808# include <assert.h>
16809#endif
edfaf76d
LK
16810
16811#undef $ac_func
16812
ca81d7a0
JD
16813/* Override any GCC internal prototype to avoid an error.
16814 Use char because int might match the return type of a GCC
16815 builtin and then its argument prototype would still apply. */
503d2be0
AS
16816#ifdef __cplusplus
16817extern "C"
16818#endif
98418dba 16819char $ac_func ();
98418dba
CW
16820/* The GNU C library defines this for functions which it implements
16821 to always fail with ENOSYS. Some functions are actually named
16822 something starting with __ and the normal name is an alias. */
ca81d7a0 16823#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16824choke me
98418dba
CW
16825#endif
16826
19650fd6
AS
16827int
16828main ()
16829{
ca81d7a0 16830return $ac_func ();
503d2be0
AS
16831 ;
16832 return 0;
16833}
16834_ACEOF
16835rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16836if { (ac_try="$ac_link"
16837case "(($ac_try" in
16838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16839 *) ac_try_echo=$ac_try;;
16840esac
16841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16842 (eval "$ac_link") 2>conftest.er1
503d2be0 16843 ac_status=$?
edfaf76d
LK
16844 grep -v '^ *+' conftest.er1 >conftest.err
16845 rm -f conftest.er1
16846 cat conftest.err >&5
c0d27fcc 16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16848 (exit $ac_status); } && {
16849 test -z "$ac_c_werror_flag" ||
16850 test ! -s conftest.err
16851 } && test -s conftest$ac_exeext &&
16852 $as_test_x conftest$ac_exeext; then
98418dba 16853 eval "$as_ac_var=yes"
503d2be0
AS
16854else
16855 echo "$as_me: failed program was:" >&5
19650fd6
AS
16856sed 's/^/| /' conftest.$ac_ext >&5
16857
ca81d7a0 16858 eval "$as_ac_var=no"
503d2be0 16859fi
ca81d7a0 16860
f053c89f 16861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16862 conftest$ac_exeext conftest.$ac_ext
ffe36136 16863fi
ca81d7a0
JD
16864ac_res=`eval echo '${'$as_ac_var'}'`
16865 { echo "$as_me:$LINENO: result: $ac_res" >&5
16866echo "${ECHO_T}$ac_res" >&6; }
98418dba 16867if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16868 cat >>confdefs.h <<_ACEOF
98418dba 16869#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16870_ACEOF
ffe36136 16871
ba4481b5 16872fi
98418dba 16873done
ba4481b5 16874
f053c89f
CY
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
ca81d7a0
JD
16891{ echo "$as_me:$LINENO: checking for working mktime" >&5
16892echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16893if test "${ac_cv_func_working_mktime+set}" = set; then
16894 echo $ECHO_N "(cached) $ECHO_C" >&6
16895else
16896 if test "$cross_compiling" = yes; then
16897 ac_cv_func_working_mktime=no
16898else
16899 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16900/* confdefs.h. */
16901_ACEOF
16902cat confdefs.h >>conftest.$ac_ext
16903cat >>conftest.$ac_ext <<_ACEOF
16904/* end confdefs.h. */
98418dba 16905/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16906#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16907# include <sys/time.h>
16908# include <time.h>
16909#else
f053c89f 16910# ifdef HAVE_SYS_TIME_H
98418dba
CW
16911# include <sys/time.h>
16912# else
16913# include <time.h>
16914# endif
16915#endif
ba4481b5 16916
f053c89f 16917#include <stdlib.h>
edfaf76d 16918
f053c89f 16919#ifdef HAVE_UNISTD_H
98418dba
CW
16920# include <unistd.h>
16921#endif
ba4481b5 16922
f053c89f 16923#ifndef HAVE_ALARM
98418dba
CW
16924# define alarm(X) /* empty */
16925#endif
df645f7c 16926
98418dba
CW
16927/* Work around redefinition to rpl_putenv by other config tests. */
16928#undef putenv
df645f7c 16929
98418dba 16930static time_t time_t_max;
edfaf76d 16931static time_t time_t_min;
df645f7c 16932
98418dba 16933/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16934static char *tz_strings[] = {
16935 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16936 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16937};
16938#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16939
ca81d7a0 16940/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16941 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16942static int
98418dba
CW
16943spring_forward_gap ()
16944{
16945 /* glibc (up to about 1998-10-07) failed this test. */
16946 struct tm tm;
16947
16948 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16949 instead of "TZ=America/Vancouver" in order to detect the bug even
16950 on systems that don't support the Olson extension, or don't have the
16951 full zoneinfo tables installed. */
16952 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16953
16954 tm.tm_year = 98;
16955 tm.tm_mon = 3;
16956 tm.tm_mday = 5;
16957 tm.tm_hour = 2;
16958 tm.tm_min = 0;
16959 tm.tm_sec = 0;
16960 tm.tm_isdst = -1;
ca81d7a0 16961 return mktime (&tm) != (time_t) -1;
98418dba
CW
16962}
16963
ca81d7a0 16964static int
edfaf76d 16965mktime_test1 (now)
98418dba
CW
16966 time_t now;
16967{
16968 struct tm *lt;
ca81d7a0 16969 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16970}
16971
ca81d7a0 16972static int
edfaf76d
LK
16973mktime_test (now)
16974 time_t now;
16975{
ca81d7a0
JD
16976 return (mktime_test1 (now)
16977 && mktime_test1 ((time_t) (time_t_max - now))
16978 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16979}
16980
ca81d7a0 16981static int
98418dba
CW
16982irix_6_4_bug ()
16983{
16984 /* Based on code from Ariel Faigon. */
16985 struct tm tm;
16986 tm.tm_year = 96;
16987 tm.tm_mon = 3;
16988 tm.tm_mday = 0;
16989 tm.tm_hour = 0;
16990 tm.tm_min = 0;
16991 tm.tm_sec = 0;
16992 tm.tm_isdst = -1;
16993 mktime (&tm);
ca81d7a0 16994 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16995}
16996
ca81d7a0 16997static int
98418dba
CW
16998bigtime_test (j)
16999 int j;
17000{
17001 struct tm tm;
17002 time_t now;
17003 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
17004 now = mktime (&tm);
17005 if (now != (time_t) -1)
17006 {
17007 struct tm *lt = localtime (&now);
17008 if (! (lt
17009 && lt->tm_year == tm.tm_year
17010 && lt->tm_mon == tm.tm_mon
17011 && lt->tm_mday == tm.tm_mday
17012 && lt->tm_hour == tm.tm_hour
17013 && lt->tm_min == tm.tm_min
17014 && lt->tm_sec == tm.tm_sec
17015 && lt->tm_yday == tm.tm_yday
17016 && lt->tm_wday == tm.tm_wday
17017 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
17018 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 17019 return 0;
98418dba 17020 }
ca81d7a0 17021 return 1;
98418dba
CW
17022}
17023
f053c89f
CY
17024static int
17025year_2050_test ()
17026{
17027 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
17028 ignoring leap seconds. */
17029 unsigned long int answer = 2527315200UL;
17030
17031 struct tm tm;
17032 time_t t;
17033 tm.tm_year = 2050 - 1900;
17034 tm.tm_mon = 2 - 1;
17035 tm.tm_mday = 1;
17036 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
17037 tm.tm_isdst = -1;
17038
17039 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
17040 instead of "TZ=America/Vancouver" in order to detect the bug even
17041 on systems that don't support the Olson extension, or don't have the
17042 full zoneinfo tables installed. */
17043 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
17044
17045 t = mktime (&tm);
17046
17047 /* Check that the result is either a failure, or close enough
17048 to the correct answer that we can assume the discrepancy is
17049 due to leap seconds. */
17050 return (t == (time_t) -1
17051 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
17052}
17053
17054int
17055main ()
17056{
17057 time_t t, delta;
17058 int i, j;
17059
17060 /* This test makes some buggy mktime implementations loop.
17061 Give up after 60 seconds; a mktime slower than that
17062 isn't worth using anyway. */
17063 alarm (60);
17064
73d798d5
SM
17065 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
17066 continue;
17067 time_t_max--;
17068 if ((time_t) -1 < 0)
17069 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
17070 continue;
98418dba
CW
17071 delta = time_t_max / 997; /* a suitable prime number */
17072 for (i = 0; i < N_STRINGS; i++)
17073 {
17074 if (tz_strings[i])
17075 putenv (tz_strings[i]);
503d2be0 17076
98418dba 17077 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
17078 if (! mktime_test (t))
17079 return 1;
17080 if (! (mktime_test ((time_t) 1)
17081 && mktime_test ((time_t) (60 * 60))
17082 && mktime_test ((time_t) (60 * 60 * 24))))
17083 return 1;
98418dba 17084
73d798d5 17085 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
17086 if (! bigtime_test (j))
17087 return 1;
73d798d5 17088 if (! bigtime_test (j - 1))
ca81d7a0 17089 return 1;
98418dba 17090 }
f053c89f 17091 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
17092}
17093_ACEOF
98418dba 17094rm -f conftest$ac_exeext
ca81d7a0
JD
17095if { (ac_try="$ac_link"
17096case "(($ac_try" in
17097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17098 *) ac_try_echo=$ac_try;;
17099esac
17100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17101 (eval "$ac_link") 2>&5
503d2be0 17102 ac_status=$?
c0d27fcc 17103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17104 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
17105 { (case "(($ac_try" in
17106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17107 *) ac_try_echo=$ac_try;;
17108esac
17109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17110 (eval "$ac_try") 2>&5
503d2be0 17111 ac_status=$?
c0d27fcc 17112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17113 (exit $ac_status); }; }; then
98418dba 17114 ac_cv_func_working_mktime=yes
503d2be0 17115else
98418dba
CW
17116 echo "$as_me: program exited with status $ac_status" >&5
17117echo "$as_me: failed program was:" >&5
19650fd6
AS
17118sed 's/^/| /' conftest.$ac_ext >&5
17119
c0d27fcc 17120( exit $ac_status )
98418dba 17121ac_cv_func_working_mktime=no
503d2be0 17122fi
ca81d7a0 17123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17124fi
ca81d7a0
JD
17125
17126
ba4481b5 17127fi
ca81d7a0
JD
17128{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17129echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17130if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17131 case " $LIBOBJS " in
edfaf76d 17132 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17133 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17134 ;;
edfaf76d
LK
17135esac
17136
ba4481b5
DL
17137fi
17138
98418dba 17139if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17140
c0d27fcc 17141cat >>confdefs.h <<\_ACEOF
98418dba 17142#define BROKEN_MKTIME 1
c0d27fcc 17143_ACEOF
ba4481b5 17144
ba4481b5 17145fi
503d2be0 17146
98418dba
CW
17147ac_have_func=no # yes means we've found a way to get the load average.
17148
6bae0ccf
DL
17149# Make sure getloadavg.c is where it belongs, at configure-time.
17150test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17151 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17152echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17153 { (exit 1); exit 1; }; }
17154
98418dba
CW
17155ac_save_LIBS=$LIBS
17156
17157# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17158({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17159echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17160if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17161 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17162else
503d2be0 17163 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17164/* confdefs.h. */
17165_ACEOF
17166cat confdefs.h >>conftest.$ac_ext
17167cat >>conftest.$ac_ext <<_ACEOF
17168/* end confdefs.h. */
edfaf76d
LK
17169/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17170 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17171#define getloadavg innocuous_getloadavg
17172
98418dba 17173/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17174 which can conflict with char getloadavg (); below.
17175 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17176 <limits.h> exists even on freestanding compilers. */
edfaf76d 17177
19650fd6
AS
17178#ifdef __STDC__
17179# include <limits.h>
17180#else
17181# include <assert.h>
17182#endif
edfaf76d
LK
17183
17184#undef getloadavg
17185
ca81d7a0
JD
17186/* Override any GCC internal prototype to avoid an error.
17187 Use char because int might match the return type of a GCC
17188 builtin and then its argument prototype would still apply. */
503d2be0
AS
17189#ifdef __cplusplus
17190extern "C"
17191#endif
98418dba 17192char getloadavg ();
98418dba
CW
17193/* The GNU C library defines this for functions which it implements
17194 to always fail with ENOSYS. Some functions are actually named
17195 something starting with __ and the normal name is an alias. */
ca81d7a0 17196#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17197choke me
cd958eb3
MB
17198#endif
17199
19650fd6
AS
17200int
17201main ()
17202{
ca81d7a0 17203return getloadavg ();
503d2be0
AS
17204 ;
17205 return 0;
17206}
17207_ACEOF
17208rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17209if { (ac_try="$ac_link"
17210case "(($ac_try" in
17211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17212 *) ac_try_echo=$ac_try;;
17213esac
17214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17215 (eval "$ac_link") 2>conftest.er1
503d2be0 17216 ac_status=$?
edfaf76d
LK
17217 grep -v '^ *+' conftest.er1 >conftest.err
17218 rm -f conftest.er1
17219 cat conftest.err >&5
c0d27fcc 17220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17221 (exit $ac_status); } && {
17222 test -z "$ac_c_werror_flag" ||
17223 test ! -s conftest.err
17224 } && test -s conftest$ac_exeext &&
17225 $as_test_x conftest$ac_exeext; then
98418dba 17226 ac_cv_func_getloadavg=yes
503d2be0
AS
17227else
17228 echo "$as_me: failed program was:" >&5
19650fd6
AS
17229sed 's/^/| /' conftest.$ac_ext >&5
17230
ca81d7a0 17231 ac_cv_func_getloadavg=no
503d2be0 17232fi
ca81d7a0 17233
f053c89f 17234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17235 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17236fi
ca81d7a0
JD
17237{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17238echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17239if test $ac_cv_func_getloadavg = yes; then
17240 exit 0
17241else
17242 exit 1
ba4481b5 17243fi
98418dba 17244) && ac_have_func=yes
ba4481b5 17245
98418dba 17246# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17247
98418dba
CW
17248for ac_func in pstat_getdynamic
17249do
17250as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17251{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17252echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17253if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17254 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17255else
503d2be0 17256 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17257/* confdefs.h. */
17258_ACEOF
17259cat confdefs.h >>conftest.$ac_ext
17260cat >>conftest.$ac_ext <<_ACEOF
17261/* end confdefs.h. */
edfaf76d
LK
17262/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17264#define $ac_func innocuous_$ac_func
17265
98418dba 17266/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17267 which can conflict with char $ac_func (); below.
17268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17269 <limits.h> exists even on freestanding compilers. */
edfaf76d 17270
19650fd6
AS
17271#ifdef __STDC__
17272# include <limits.h>
17273#else
17274# include <assert.h>
17275#endif
edfaf76d
LK
17276
17277#undef $ac_func
17278
ca81d7a0
JD
17279/* Override any GCC internal prototype to avoid an error.
17280 Use char because int might match the return type of a GCC
17281 builtin and then its argument prototype would still apply. */
503d2be0
AS
17282#ifdef __cplusplus
17283extern "C"
17284#endif
98418dba 17285char $ac_func ();
98418dba
CW
17286/* The GNU C library defines this for functions which it implements
17287 to always fail with ENOSYS. Some functions are actually named
17288 something starting with __ and the normal name is an alias. */
ca81d7a0 17289#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17290choke me
98418dba
CW
17291#endif
17292
19650fd6
AS
17293int
17294main ()
17295{
ca81d7a0 17296return $ac_func ();
98418dba
CW
17297 ;
17298 return 0;
17299}
f21fadcc 17300_ACEOF
98418dba 17301rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17302if { (ac_try="$ac_link"
17303case "(($ac_try" in
17304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17305 *) ac_try_echo=$ac_try;;
17306esac
17307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17308 (eval "$ac_link") 2>conftest.er1
f21fadcc 17309 ac_status=$?
edfaf76d
LK
17310 grep -v '^ *+' conftest.er1 >conftest.err
17311 rm -f conftest.er1
17312 cat conftest.err >&5
c0d27fcc 17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17314 (exit $ac_status); } && {
17315 test -z "$ac_c_werror_flag" ||
17316 test ! -s conftest.err
17317 } && test -s conftest$ac_exeext &&
17318 $as_test_x conftest$ac_exeext; then
98418dba 17319 eval "$as_ac_var=yes"
f21fadcc
JD
17320else
17321 echo "$as_me: failed program was:" >&5
19650fd6
AS
17322sed 's/^/| /' conftest.$ac_ext >&5
17323
ca81d7a0 17324 eval "$as_ac_var=no"
f21fadcc 17325fi
ca81d7a0 17326
f053c89f 17327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17328 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17329fi
ca81d7a0
JD
17330ac_res=`eval echo '${'$as_ac_var'}'`
17331 { echo "$as_me:$LINENO: result: $ac_res" >&5
17332echo "${ECHO_T}$ac_res" >&6; }
98418dba 17333if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17334 cat >>confdefs.h <<_ACEOF
98418dba 17335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17336_ACEOF
98418dba
CW
17337
17338fi
17339done
17340
c0d27fcc 17341
98418dba
CW
17342# Solaris has libkstat which does not require root.
17343
ca81d7a0
JD
17344{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17345echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17346if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17347 echo $ECHO_N "(cached) $ECHO_C" >&6
17348else
17349 ac_check_lib_save_LIBS=$LIBS
98418dba 17350LIBS="-lkstat $LIBS"
f21fadcc 17351cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17352/* confdefs.h. */
17353_ACEOF
17354cat confdefs.h >>conftest.$ac_ext
17355cat >>conftest.$ac_ext <<_ACEOF
17356/* end confdefs.h. */
f21fadcc 17357
ca81d7a0
JD
17358/* Override any GCC internal prototype to avoid an error.
17359 Use char because int might match the return type of a GCC
17360 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17361#ifdef __cplusplus
17362extern "C"
17363#endif
98418dba 17364char kstat_open ();
f21fadcc
JD
17365int
17366main ()
17367{
ca81d7a0 17368return kstat_open ();
f21fadcc
JD
17369 ;
17370 return 0;
17371}
17372_ACEOF
17373rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17374if { (ac_try="$ac_link"
17375case "(($ac_try" in
17376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17377 *) ac_try_echo=$ac_try;;
17378esac
17379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17380 (eval "$ac_link") 2>conftest.er1
f21fadcc 17381 ac_status=$?
edfaf76d
LK
17382 grep -v '^ *+' conftest.er1 >conftest.err
17383 rm -f conftest.er1
17384 cat conftest.err >&5
c0d27fcc 17385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17386 (exit $ac_status); } && {
17387 test -z "$ac_c_werror_flag" ||
17388 test ! -s conftest.err
17389 } && test -s conftest$ac_exeext &&
17390 $as_test_x conftest$ac_exeext; then
98418dba 17391 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17392else
17393 echo "$as_me: failed program was:" >&5
19650fd6
AS
17394sed 's/^/| /' conftest.$ac_ext >&5
17395
ca81d7a0 17396 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17397fi
ca81d7a0 17398
f053c89f 17399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17400 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17401LIBS=$ac_check_lib_save_LIBS
17402fi
ca81d7a0
JD
17403{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17404echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17405if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17406 cat >>confdefs.h <<_ACEOF
98418dba 17407#define HAVE_LIBKSTAT 1
c0d27fcc 17408_ACEOF
f21fadcc 17409
98418dba 17410 LIBS="-lkstat $LIBS"
f21fadcc 17411
f21fadcc
JD
17412fi
17413
98418dba
CW
17414test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17415
17416# Some systems with -lutil have (and need) -lkvm as well, some do not.
17417# On Solaris, -lkvm requires nlist from -lelf, so check that first
17418# to get the right answer into the cache.
17419# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17420if test $ac_have_func = no; then
ca81d7a0
JD
17421 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17422echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17423if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17424 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17425else
98418dba
CW
17426 ac_check_lib_save_LIBS=$LIBS
17427LIBS="-lelf $LIBS"
17428cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17429/* confdefs.h. */
17430_ACEOF
17431cat confdefs.h >>conftest.$ac_ext
17432cat >>conftest.$ac_ext <<_ACEOF
17433/* end confdefs.h. */
98418dba 17434
ca81d7a0
JD
17435/* Override any GCC internal prototype to avoid an error.
17436 Use char because int might match the return type of a GCC
17437 builtin and then its argument prototype would still apply. */
98418dba
CW
17438#ifdef __cplusplus
17439extern "C"
17440#endif
98418dba 17441char elf_begin ();
503d2be0
AS
17442int
17443main ()
17444{
ca81d7a0 17445return elf_begin ();
503d2be0
AS
17446 ;
17447 return 0;
17448}
17449_ACEOF
17450rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17451if { (ac_try="$ac_link"
17452case "(($ac_try" in
17453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17454 *) ac_try_echo=$ac_try;;
17455esac
17456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17457 (eval "$ac_link") 2>conftest.er1
503d2be0 17458 ac_status=$?
edfaf76d
LK
17459 grep -v '^ *+' conftest.er1 >conftest.err
17460 rm -f conftest.er1
17461 cat conftest.err >&5
c0d27fcc 17462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17463 (exit $ac_status); } && {
17464 test -z "$ac_c_werror_flag" ||
17465 test ! -s conftest.err
17466 } && test -s conftest$ac_exeext &&
17467 $as_test_x conftest$ac_exeext; then
98418dba 17468 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17469else
503d2be0 17470 echo "$as_me: failed program was:" >&5
19650fd6
AS
17471sed 's/^/| /' conftest.$ac_ext >&5
17472
ca81d7a0 17473 ac_cv_lib_elf_elf_begin=no
ba4481b5 17474fi
ca81d7a0 17475
f053c89f 17476rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17477 conftest$ac_exeext conftest.$ac_ext
98418dba 17478LIBS=$ac_check_lib_save_LIBS
ba4481b5 17479fi
ca81d7a0
JD
17480{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17481echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17482if test $ac_cv_lib_elf_elf_begin = yes; then
17483 LIBS="-lelf $LIBS"
ba4481b5
DL
17484fi
17485
98418dba
CW
17486fi
17487if test $ac_have_func = no; then
ca81d7a0
JD
17488 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17489echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17490if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17491 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17492else
98418dba
CW
17493 ac_check_lib_save_LIBS=$LIBS
17494LIBS="-lkvm $LIBS"
17495cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17496/* confdefs.h. */
17497_ACEOF
17498cat confdefs.h >>conftest.$ac_ext
17499cat >>conftest.$ac_ext <<_ACEOF
17500/* end confdefs.h. */
98418dba 17501
ca81d7a0
JD
17502/* Override any GCC internal prototype to avoid an error.
17503 Use char because int might match the return type of a GCC
17504 builtin and then its argument prototype would still apply. */
98418dba
CW
17505#ifdef __cplusplus
17506extern "C"
17507#endif
98418dba 17508char kvm_open ();
503d2be0
AS
17509int
17510main ()
17511{
ca81d7a0 17512return kvm_open ();
503d2be0
AS
17513 ;
17514 return 0;
17515}
17516_ACEOF
17517rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17518if { (ac_try="$ac_link"
17519case "(($ac_try" in
17520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17521 *) ac_try_echo=$ac_try;;
17522esac
17523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17524 (eval "$ac_link") 2>conftest.er1
503d2be0 17525 ac_status=$?
edfaf76d
LK
17526 grep -v '^ *+' conftest.er1 >conftest.err
17527 rm -f conftest.er1
17528 cat conftest.err >&5
c0d27fcc 17529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17530 (exit $ac_status); } && {
17531 test -z "$ac_c_werror_flag" ||
17532 test ! -s conftest.err
17533 } && test -s conftest$ac_exeext &&
17534 $as_test_x conftest$ac_exeext; then
98418dba 17535 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17536else
17537 echo "$as_me: failed program was:" >&5
19650fd6
AS
17538sed 's/^/| /' conftest.$ac_ext >&5
17539
ca81d7a0 17540 ac_cv_lib_kvm_kvm_open=no
503d2be0 17541fi
ca81d7a0 17542
f053c89f 17543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17544 conftest$ac_exeext conftest.$ac_ext
98418dba 17545LIBS=$ac_check_lib_save_LIBS
503d2be0 17546fi
ca81d7a0
JD
17547{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17548echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17549if test $ac_cv_lib_kvm_kvm_open = yes; then
17550 LIBS="-lkvm $LIBS"
ba4481b5
DL
17551fi
17552
98418dba 17553 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17554 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17555echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17556if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17557 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17558else
98418dba
CW
17559 ac_check_lib_save_LIBS=$LIBS
17560LIBS="-lutil $LIBS"
17561cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17562/* confdefs.h. */
17563_ACEOF
17564cat confdefs.h >>conftest.$ac_ext
17565cat >>conftest.$ac_ext <<_ACEOF
17566/* end confdefs.h. */
98418dba 17567
ca81d7a0
JD
17568/* Override any GCC internal prototype to avoid an error.
17569 Use char because int might match the return type of a GCC
17570 builtin and then its argument prototype would still apply. */
98418dba
CW
17571#ifdef __cplusplus
17572extern "C"
17573#endif
98418dba 17574char getloadavg ();
503d2be0
AS
17575int
17576main ()
17577{
ca81d7a0 17578return getloadavg ();
503d2be0
AS
17579 ;
17580 return 0;
17581}
17582_ACEOF
17583rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17584if { (ac_try="$ac_link"
17585case "(($ac_try" in
17586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17587 *) ac_try_echo=$ac_try;;
17588esac
17589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17590 (eval "$ac_link") 2>conftest.er1
503d2be0 17591 ac_status=$?
edfaf76d
LK
17592 grep -v '^ *+' conftest.er1 >conftest.err
17593 rm -f conftest.er1
17594 cat conftest.err >&5
c0d27fcc 17595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17596 (exit $ac_status); } && {
17597 test -z "$ac_c_werror_flag" ||
17598 test ! -s conftest.err
17599 } && test -s conftest$ac_exeext &&
17600 $as_test_x conftest$ac_exeext; then
35996d22
AS
17601 ac_cv_lib_util_getloadavg=yes
17602else
503d2be0 17603 echo "$as_me: failed program was:" >&5
19650fd6
AS
17604sed 's/^/| /' conftest.$ac_ext >&5
17605
ca81d7a0 17606 ac_cv_lib_util_getloadavg=no
ba4481b5 17607fi
ca81d7a0 17608
f053c89f 17609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17610 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17611LIBS=$ac_check_lib_save_LIBS
17612fi
ca81d7a0
JD
17613{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17614echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17615if test $ac_cv_lib_util_getloadavg = yes; then
17616 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17617fi
503d2be0 17618
98418dba 17619fi
ba4481b5 17620
98418dba
CW
17621if test $ac_have_func = no; then
17622 # There is a commonly available library for RS/6000 AIX.
17623 # Since it is not a standard part of AIX, it might be installed locally.
17624 ac_getloadavg_LIBS=$LIBS
17625 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17626 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17627echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17628if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17629 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17630else
98418dba
CW
17631 ac_check_lib_save_LIBS=$LIBS
17632LIBS="-lgetloadavg $LIBS"
17633cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17634/* confdefs.h. */
17635_ACEOF
17636cat confdefs.h >>conftest.$ac_ext
17637cat >>conftest.$ac_ext <<_ACEOF
17638/* end confdefs.h. */
ba4481b5 17639
ca81d7a0
JD
17640/* Override any GCC internal prototype to avoid an error.
17641 Use char because int might match the return type of a GCC
17642 builtin and then its argument prototype would still apply. */
98418dba
CW
17643#ifdef __cplusplus
17644extern "C"
17645#endif
98418dba 17646char getloadavg ();
98418dba
CW
17647int
17648main ()
17649{
ca81d7a0 17650return getloadavg ();
98418dba
CW
17651 ;
17652 return 0;
17653}
503d2be0 17654_ACEOF
98418dba 17655rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17656if { (ac_try="$ac_link"
17657case "(($ac_try" in
17658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17659 *) ac_try_echo=$ac_try;;
17660esac
17661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17662 (eval "$ac_link") 2>conftest.er1
98418dba 17663 ac_status=$?
edfaf76d
LK
17664 grep -v '^ *+' conftest.er1 >conftest.err
17665 rm -f conftest.er1
17666 cat conftest.err >&5
c0d27fcc 17667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17668 (exit $ac_status); } && {
17669 test -z "$ac_c_werror_flag" ||
17670 test ! -s conftest.err
17671 } && test -s conftest$ac_exeext &&
17672 $as_test_x conftest$ac_exeext; then
98418dba 17673 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17674else
98418dba 17675 echo "$as_me: failed program was:" >&5
19650fd6
AS
17676sed 's/^/| /' conftest.$ac_ext >&5
17677
ca81d7a0 17678 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17679fi
ca81d7a0 17680
f053c89f 17681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17682 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17683LIBS=$ac_check_lib_save_LIBS
17684fi
ca81d7a0
JD
17685{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17686echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17687if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17688 LIBS="-lgetloadavg $LIBS"
17689else
17690 LIBS=$ac_getloadavg_LIBS
ba4481b5 17691fi
ba4481b5
DL
17692
17693fi
98418dba
CW
17694
17695# Make sure it is really in the library, if we think we found it,
17696# otherwise set up the replacement function.
17697
17698for ac_func in getloadavg
17699do
17700as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17701{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17702echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17703if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17704 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17705else
503d2be0 17706 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17707/* confdefs.h. */
17708_ACEOF
17709cat confdefs.h >>conftest.$ac_ext
17710cat >>conftest.$ac_ext <<_ACEOF
17711/* end confdefs.h. */
edfaf76d
LK
17712/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17713 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17714#define $ac_func innocuous_$ac_func
17715
ba4481b5 17716/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17717 which can conflict with char $ac_func (); below.
17718 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17719 <limits.h> exists even on freestanding compilers. */
edfaf76d 17720
19650fd6
AS
17721#ifdef __STDC__
17722# include <limits.h>
17723#else
17724# include <assert.h>
17725#endif
edfaf76d
LK
17726
17727#undef $ac_func
17728
ca81d7a0
JD
17729/* Override any GCC internal prototype to avoid an error.
17730 Use char because int might match the return type of a GCC
17731 builtin and then its argument prototype would still apply. */
503d2be0
AS
17732#ifdef __cplusplus
17733extern "C"
17734#endif
503d2be0 17735char $ac_func ();
ba4481b5
DL
17736/* The GNU C library defines this for functions which it implements
17737 to always fail with ENOSYS. Some functions are actually named
17738 something starting with __ and the normal name is an alias. */
ca81d7a0 17739#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17740choke me
cd958eb3
MB
17741#endif
17742
19650fd6
AS
17743int
17744main ()
17745{
ca81d7a0 17746return $ac_func ();
503d2be0
AS
17747 ;
17748 return 0;
17749}
17750_ACEOF
17751rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17752if { (ac_try="$ac_link"
17753case "(($ac_try" in
17754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17755 *) ac_try_echo=$ac_try;;
17756esac
17757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17758 (eval "$ac_link") 2>conftest.er1
503d2be0 17759 ac_status=$?
edfaf76d
LK
17760 grep -v '^ *+' conftest.er1 >conftest.err
17761 rm -f conftest.er1
17762 cat conftest.err >&5
c0d27fcc 17763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17764 (exit $ac_status); } && {
17765 test -z "$ac_c_werror_flag" ||
17766 test ! -s conftest.err
17767 } && test -s conftest$ac_exeext &&
17768 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17769 eval "$as_ac_var=yes"
17770else
17771 echo "$as_me: failed program was:" >&5
19650fd6
AS
17772sed 's/^/| /' conftest.$ac_ext >&5
17773
ca81d7a0 17774 eval "$as_ac_var=no"
503d2be0 17775fi
ca81d7a0 17776
f053c89f 17777rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17778 conftest$ac_exeext conftest.$ac_ext
503d2be0 17779fi
ca81d7a0
JD
17780ac_res=`eval echo '${'$as_ac_var'}'`
17781 { echo "$as_me:$LINENO: result: $ac_res" >&5
17782echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17783if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17784 cat >>confdefs.h <<_ACEOF
98418dba 17785#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17786_ACEOF
503d2be0 17787
98418dba 17788else
ca81d7a0 17789 case " $LIBOBJS " in
edfaf76d 17790 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17791 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17792 ;;
edfaf76d
LK
17793esac
17794
ba4481b5 17795
c0d27fcc 17796cat >>confdefs.h <<\_ACEOF
98418dba 17797#define C_GETLOADAVG 1
c0d27fcc 17798_ACEOF
ba4481b5 17799
98418dba
CW
17800# Figure out what our getloadavg.c needs.
17801ac_have_func=no
c0d27fcc 17802if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17803 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17804echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17805if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17806 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17807fi
ca81d7a0
JD
17808{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17809echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17810else
c0d27fcc 17811 # Is the header compilable?
ca81d7a0
JD
17812{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17813echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17814cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17815/* confdefs.h. */
17816_ACEOF
17817cat confdefs.h >>conftest.$ac_ext
17818cat >>conftest.$ac_ext <<_ACEOF
17819/* end confdefs.h. */
c0d27fcc
MR
17820$ac_includes_default
17821#include <sys/dg_sys_info.h>
17822_ACEOF
17823rm -f conftest.$ac_objext
ca81d7a0
JD
17824if { (ac_try="$ac_compile"
17825case "(($ac_try" in
17826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827 *) ac_try_echo=$ac_try;;
17828esac
17829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17830 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17831 ac_status=$?
edfaf76d
LK
17832 grep -v '^ *+' conftest.er1 >conftest.err
17833 rm -f conftest.er1
17834 cat conftest.err >&5
c0d27fcc 17835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17836 (exit $ac_status); } && {
17837 test -z "$ac_c_werror_flag" ||
17838 test ! -s conftest.err
17839 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17840 ac_header_compiler=yes
17841else
17842 echo "$as_me: failed program was:" >&5
19650fd6
AS
17843sed 's/^/| /' conftest.$ac_ext >&5
17844
ca81d7a0 17845 ac_header_compiler=no
c0d27fcc 17846fi
ca81d7a0
JD
17847
17848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17849{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17850echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17851
17852# Is the header present?
ca81d7a0
JD
17853{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17854echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17856/* confdefs.h. */
17857_ACEOF
17858cat confdefs.h >>conftest.$ac_ext
17859cat >>conftest.$ac_ext <<_ACEOF
17860/* end confdefs.h. */
98418dba
CW
17861#include <sys/dg_sys_info.h>
17862_ACEOF
ca81d7a0
JD
17863if { (ac_try="$ac_cpp conftest.$ac_ext"
17864case "(($ac_try" in
17865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17866 *) ac_try_echo=$ac_try;;
17867esac
17868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17869 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17870 ac_status=$?
6bae0ccf 17871 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17872 rm -f conftest.er1
17873 cat conftest.err >&5
c0d27fcc 17874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17875 (exit $ac_status); } >/dev/null && {
17876 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17877 test ! -s conftest.err
17878 }; then
c0d27fcc 17879 ac_header_preproc=yes
98418dba
CW
17880else
17881 echo "$as_me: failed program was:" >&5
19650fd6
AS
17882sed 's/^/| /' conftest.$ac_ext >&5
17883
c0d27fcc 17884 ac_header_preproc=no
ba4481b5 17885fi
ca81d7a0 17886
98418dba 17887rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17888{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17889echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17890
17891# So? What about this header?
edfaf76d
LK
17892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17893 yes:no: )
c0d27fcc
MR
17894 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17895echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17896 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17897echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17898 ac_header_preproc=yes
19650fd6 17899 ;;
edfaf76d 17900 no:yes:* )
c0d27fcc
MR
17901 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17902echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17903 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17904echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17905 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17906echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17907 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17908echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17909 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17910echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17911 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17912echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17913
19650fd6 17914 ;;
c0d27fcc 17915esac
ca81d7a0
JD
17916{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17917echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17918if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17919 echo $ECHO_N "(cached) $ECHO_C" >&6
17920else
17921 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17922fi
ca81d7a0
JD
17923{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17924echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17925
17926fi
98418dba
CW
17927if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17928 ac_have_func=yes
ba4481b5 17929
c0d27fcc 17930cat >>confdefs.h <<\_ACEOF
98418dba 17931#define DGUX 1
c0d27fcc
MR
17932_ACEOF
17933
503d2be0 17934
ca81d7a0
JD
17935{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17936echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17937if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17938 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17939else
503d2be0 17940 ac_check_lib_save_LIBS=$LIBS
98418dba 17941LIBS="-ldgc $LIBS"
503d2be0 17942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17943/* confdefs.h. */
17944_ACEOF
17945cat confdefs.h >>conftest.$ac_ext
17946cat >>conftest.$ac_ext <<_ACEOF
17947/* end confdefs.h. */
503d2be0 17948
ca81d7a0
JD
17949/* Override any GCC internal prototype to avoid an error.
17950 Use char because int might match the return type of a GCC
17951 builtin and then its argument prototype would still apply. */
503d2be0
AS
17952#ifdef __cplusplus
17953extern "C"
17954#endif
98418dba 17955char dg_sys_info ();
503d2be0
AS
17956int
17957main ()
17958{
ca81d7a0 17959return dg_sys_info ();
503d2be0
AS
17960 ;
17961 return 0;
17962}
17963_ACEOF
17964rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17965if { (ac_try="$ac_link"
17966case "(($ac_try" in
17967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17968 *) ac_try_echo=$ac_try;;
17969esac
17970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17971 (eval "$ac_link") 2>conftest.er1
503d2be0 17972 ac_status=$?
edfaf76d
LK
17973 grep -v '^ *+' conftest.er1 >conftest.err
17974 rm -f conftest.er1
17975 cat conftest.err >&5
c0d27fcc 17976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17977 (exit $ac_status); } && {
17978 test -z "$ac_c_werror_flag" ||
17979 test ! -s conftest.err
17980 } && test -s conftest$ac_exeext &&
17981 $as_test_x conftest$ac_exeext; then
98418dba 17982 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17983else
17984 echo "$as_me: failed program was:" >&5
19650fd6
AS
17985sed 's/^/| /' conftest.$ac_ext >&5
17986
ca81d7a0 17987 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17988fi
ca81d7a0 17989
f053c89f 17990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17991 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17992LIBS=$ac_check_lib_save_LIBS
17993fi
ca81d7a0
JD
17994{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17995echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17996if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17997 cat >>confdefs.h <<_ACEOF
98418dba 17998#define HAVE_LIBDGC 1
c0d27fcc 17999_ACEOF
ba4481b5 18000
98418dba 18001 LIBS="-ldgc $LIBS"
ba4481b5 18002
ba4481b5
DL
18003fi
18004
98418dba 18005fi
503d2be0 18006
c0d27fcc
MR
18007
18008
18009if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
18010 { echo "$as_me:$LINENO: checking for locale.h" >&5
18011echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 18012if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 18013 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18014fi
ca81d7a0
JD
18015{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18016echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 18017else
c0d27fcc 18018 # Is the header compilable?
ca81d7a0
JD
18019{ echo "$as_me:$LINENO: checking locale.h usability" >&5
18020echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 18021cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18022/* confdefs.h. */
18023_ACEOF
18024cat confdefs.h >>conftest.$ac_ext
18025cat >>conftest.$ac_ext <<_ACEOF
18026/* end confdefs.h. */
c0d27fcc
MR
18027$ac_includes_default
18028#include <locale.h>
18029_ACEOF
18030rm -f conftest.$ac_objext
ca81d7a0
JD
18031if { (ac_try="$ac_compile"
18032case "(($ac_try" in
18033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18034 *) ac_try_echo=$ac_try;;
18035esac
18036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18037 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18038 ac_status=$?
edfaf76d
LK
18039 grep -v '^ *+' conftest.er1 >conftest.err
18040 rm -f conftest.er1
18041 cat conftest.err >&5
c0d27fcc 18042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18043 (exit $ac_status); } && {
18044 test -z "$ac_c_werror_flag" ||
18045 test ! -s conftest.err
18046 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18047 ac_header_compiler=yes
18048else
18049 echo "$as_me: failed program was:" >&5
19650fd6
AS
18050sed 's/^/| /' conftest.$ac_ext >&5
18051
ca81d7a0 18052 ac_header_compiler=no
c0d27fcc 18053fi
ca81d7a0
JD
18054
18055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18056{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18057echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18058
18059# Is the header present?
ca81d7a0
JD
18060{ echo "$as_me:$LINENO: checking locale.h presence" >&5
18061echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 18062cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18063/* confdefs.h. */
18064_ACEOF
18065cat confdefs.h >>conftest.$ac_ext
18066cat >>conftest.$ac_ext <<_ACEOF
18067/* end confdefs.h. */
98418dba 18068#include <locale.h>
503d2be0 18069_ACEOF
ca81d7a0
JD
18070if { (ac_try="$ac_cpp conftest.$ac_ext"
18071case "(($ac_try" in
18072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18073 *) ac_try_echo=$ac_try;;
18074esac
18075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18076 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18077 ac_status=$?
6bae0ccf 18078 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18079 rm -f conftest.er1
18080 cat conftest.err >&5
c0d27fcc 18081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18082 (exit $ac_status); } >/dev/null && {
18083 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18084 test ! -s conftest.err
18085 }; then
c0d27fcc 18086 ac_header_preproc=yes
98418dba
CW
18087else
18088 echo "$as_me: failed program was:" >&5
19650fd6
AS
18089sed 's/^/| /' conftest.$ac_ext >&5
18090
c0d27fcc 18091 ac_header_preproc=no
ba4481b5 18092fi
ca81d7a0 18093
98418dba 18094rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18095{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18096echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18097
18098# So? What about this header?
edfaf76d
LK
18099case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18100 yes:no: )
c0d27fcc
MR
18101 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
18102echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18103 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
18104echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
18105 ac_header_preproc=yes
19650fd6 18106 ;;
edfaf76d 18107 no:yes:* )
c0d27fcc
MR
18108 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
18109echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18110 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
18111echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
18112 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
18113echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
18114 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
18115echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18116 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 18117echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18118 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
18119echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18120
19650fd6 18121 ;;
c0d27fcc 18122esac
ca81d7a0
JD
18123{ echo "$as_me:$LINENO: checking for locale.h" >&5
18124echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
18125if test "${ac_cv_header_locale_h+set}" = set; then
18126 echo $ECHO_N "(cached) $ECHO_C" >&6
18127else
18128 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18129fi
ca81d7a0
JD
18130{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18131echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18132
c0d27fcc
MR
18133fi
18134
18135
18136
98418dba 18137for ac_func in setlocale
ba4481b5 18138do
503d2be0 18139as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18140{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18141echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18142if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18143 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18144else
503d2be0 18145 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18146/* confdefs.h. */
18147_ACEOF
18148cat confdefs.h >>conftest.$ac_ext
18149cat >>conftest.$ac_ext <<_ACEOF
18150/* end confdefs.h. */
edfaf76d
LK
18151/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18152 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18153#define $ac_func innocuous_$ac_func
18154
ba4481b5 18155/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18156 which can conflict with char $ac_func (); below.
18157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18158 <limits.h> exists even on freestanding compilers. */
edfaf76d 18159
19650fd6
AS
18160#ifdef __STDC__
18161# include <limits.h>
18162#else
18163# include <assert.h>
18164#endif
edfaf76d
LK
18165
18166#undef $ac_func
18167
ca81d7a0
JD
18168/* Override any GCC internal prototype to avoid an error.
18169 Use char because int might match the return type of a GCC
18170 builtin and then its argument prototype would still apply. */
503d2be0
AS
18171#ifdef __cplusplus
18172extern "C"
18173#endif
503d2be0 18174char $ac_func ();
ba4481b5
DL
18175/* The GNU C library defines this for functions which it implements
18176 to always fail with ENOSYS. Some functions are actually named
18177 something starting with __ and the normal name is an alias. */
ca81d7a0 18178#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18179choke me
ba4481b5
DL
18180#endif
18181
19650fd6
AS
18182int
18183main ()
18184{
ca81d7a0 18185return $ac_func ();
503d2be0
AS
18186 ;
18187 return 0;
18188}
18189_ACEOF
18190rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18191if { (ac_try="$ac_link"
18192case "(($ac_try" in
18193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18194 *) ac_try_echo=$ac_try;;
18195esac
18196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18197 (eval "$ac_link") 2>conftest.er1
503d2be0 18198 ac_status=$?
edfaf76d
LK
18199 grep -v '^ *+' conftest.er1 >conftest.err
18200 rm -f conftest.er1
18201 cat conftest.err >&5
c0d27fcc 18202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18203 (exit $ac_status); } && {
18204 test -z "$ac_c_werror_flag" ||
18205 test ! -s conftest.err
18206 } && test -s conftest$ac_exeext &&
18207 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18208 eval "$as_ac_var=yes"
18209else
18210 echo "$as_me: failed program was:" >&5
19650fd6
AS
18211sed 's/^/| /' conftest.$ac_ext >&5
18212
ca81d7a0 18213 eval "$as_ac_var=no"
503d2be0 18214fi
ca81d7a0 18215
f053c89f 18216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18217 conftest$ac_exeext conftest.$ac_ext
503d2be0 18218fi
ca81d7a0
JD
18219ac_res=`eval echo '${'$as_ac_var'}'`
18220 { echo "$as_me:$LINENO: result: $ac_res" >&5
18221echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18222if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18223 cat >>confdefs.h <<_ACEOF
503d2be0 18224#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18225_ACEOF
ba4481b5 18226
ba4481b5
DL
18227fi
18228done
18229
c0d27fcc 18230
98418dba
CW
18231# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18232# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18233# Irix 4.0.5F has the header but not the library.
18234if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18235 ac_have_func=yes
18236
c0d27fcc 18237cat >>confdefs.h <<\_ACEOF
98418dba 18238#define SVR4 1
c0d27fcc 18239_ACEOF
98418dba
CW
18240
18241fi
18242
18243if test $ac_have_func = no; then
c0d27fcc 18244 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18245 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18246echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18247if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18248 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18249fi
ca81d7a0
JD
18250{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18251echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18252else
c0d27fcc 18253 # Is the header compilable?
ca81d7a0
JD
18254{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18255echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18256cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18257/* confdefs.h. */
18258_ACEOF
18259cat confdefs.h >>conftest.$ac_ext
18260cat >>conftest.$ac_ext <<_ACEOF
18261/* end confdefs.h. */
c0d27fcc
MR
18262$ac_includes_default
18263#include <inq_stats/cpustats.h>
18264_ACEOF
18265rm -f conftest.$ac_objext
ca81d7a0
JD
18266if { (ac_try="$ac_compile"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
18271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18272 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18273 ac_status=$?
edfaf76d
LK
18274 grep -v '^ *+' conftest.er1 >conftest.err
18275 rm -f conftest.er1
18276 cat conftest.err >&5
c0d27fcc 18277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18278 (exit $ac_status); } && {
18279 test -z "$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18282 ac_header_compiler=yes
18283else
18284 echo "$as_me: failed program was:" >&5
19650fd6
AS
18285sed 's/^/| /' conftest.$ac_ext >&5
18286
ca81d7a0 18287 ac_header_compiler=no
c0d27fcc 18288fi
ca81d7a0
JD
18289
18290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18291{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18292echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18293
18294# Is the header present?
ca81d7a0
JD
18295{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18296echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18297cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18298/* confdefs.h. */
18299_ACEOF
18300cat confdefs.h >>conftest.$ac_ext
18301cat >>conftest.$ac_ext <<_ACEOF
18302/* end confdefs.h. */
98418dba 18303#include <inq_stats/cpustats.h>
503d2be0 18304_ACEOF
ca81d7a0
JD
18305if { (ac_try="$ac_cpp conftest.$ac_ext"
18306case "(($ac_try" in
18307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18308 *) ac_try_echo=$ac_try;;
18309esac
18310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18311 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18312 ac_status=$?
6bae0ccf 18313 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18314 rm -f conftest.er1
18315 cat conftest.err >&5
c0d27fcc 18316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18317 (exit $ac_status); } >/dev/null && {
18318 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18319 test ! -s conftest.err
18320 }; then
c0d27fcc 18321 ac_header_preproc=yes
503d2be0
AS
18322else
18323 echo "$as_me: failed program was:" >&5
19650fd6
AS
18324sed 's/^/| /' conftest.$ac_ext >&5
18325
c0d27fcc 18326 ac_header_preproc=no
ba4481b5 18327fi
ca81d7a0 18328
503d2be0 18329rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18330{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18331echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18332
18333# So? What about this header?
edfaf76d
LK
18334case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18335 yes:no: )
c0d27fcc
MR
18336 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18337echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18338 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18339echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18340 ac_header_preproc=yes
19650fd6 18341 ;;
edfaf76d 18342 no:yes:* )
c0d27fcc
MR
18343 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18344echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18345 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18346echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18347 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18348echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18349 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18350echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18351 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18352echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18353 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18354echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18355
19650fd6 18356 ;;
c0d27fcc 18357esac
ca81d7a0
JD
18358{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18359echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18360if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18361 echo $ECHO_N "(cached) $ECHO_C" >&6
18362else
18363 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18364fi
ca81d7a0
JD
18365{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18366echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18367
18368fi
98418dba
CW
18369if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18370 ac_have_func=yes
ba4481b5 18371
c0d27fcc 18372cat >>confdefs.h <<\_ACEOF
98418dba 18373#define UMAX 1
c0d27fcc 18374_ACEOF
98418dba 18375
c0d27fcc
MR
18376
18377cat >>confdefs.h <<\_ACEOF
98418dba 18378#define UMAX4_3 1
c0d27fcc 18379_ACEOF
98418dba
CW
18380
18381fi
18382
c0d27fcc 18383
98418dba
CW
18384fi
18385
18386if test $ac_have_func = no; then
c0d27fcc 18387 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18388 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18389echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18390if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18391 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18392fi
ca81d7a0
JD
18393{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18394echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18395else
c0d27fcc 18396 # Is the header compilable?
ca81d7a0
JD
18397{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18398echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18400/* confdefs.h. */
18401_ACEOF
18402cat confdefs.h >>conftest.$ac_ext
18403cat >>conftest.$ac_ext <<_ACEOF
18404/* end confdefs.h. */
c0d27fcc
MR
18405$ac_includes_default
18406#include <sys/cpustats.h>
18407_ACEOF
18408rm -f conftest.$ac_objext
ca81d7a0
JD
18409if { (ac_try="$ac_compile"
18410case "(($ac_try" in
18411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18412 *) ac_try_echo=$ac_try;;
18413esac
18414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18415 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18416 ac_status=$?
edfaf76d
LK
18417 grep -v '^ *+' conftest.er1 >conftest.err
18418 rm -f conftest.er1
18419 cat conftest.err >&5
c0d27fcc 18420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18421 (exit $ac_status); } && {
18422 test -z "$ac_c_werror_flag" ||
18423 test ! -s conftest.err
18424 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18425 ac_header_compiler=yes
18426else
18427 echo "$as_me: failed program was:" >&5
19650fd6
AS
18428sed 's/^/| /' conftest.$ac_ext >&5
18429
ca81d7a0 18430 ac_header_compiler=no
c0d27fcc 18431fi
ca81d7a0
JD
18432
18433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18434{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18435echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18436
18437# Is the header present?
ca81d7a0
JD
18438{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18439echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18440cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18441/* confdefs.h. */
18442_ACEOF
18443cat confdefs.h >>conftest.$ac_ext
18444cat >>conftest.$ac_ext <<_ACEOF
18445/* end confdefs.h. */
98418dba
CW
18446#include <sys/cpustats.h>
18447_ACEOF
ca81d7a0
JD
18448if { (ac_try="$ac_cpp conftest.$ac_ext"
18449case "(($ac_try" in
18450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18451 *) ac_try_echo=$ac_try;;
18452esac
18453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18454 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18455 ac_status=$?
6bae0ccf 18456 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18457 rm -f conftest.er1
18458 cat conftest.err >&5
c0d27fcc 18459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18460 (exit $ac_status); } >/dev/null && {
18461 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18462 test ! -s conftest.err
18463 }; then
c0d27fcc 18464 ac_header_preproc=yes
98418dba
CW
18465else
18466 echo "$as_me: failed program was:" >&5
19650fd6
AS
18467sed 's/^/| /' conftest.$ac_ext >&5
18468
c0d27fcc 18469 ac_header_preproc=no
98418dba 18470fi
ca81d7a0 18471
98418dba 18472rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18473{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18474echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18475
18476# So? What about this header?
edfaf76d
LK
18477case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18478 yes:no: )
c0d27fcc
MR
18479 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18480echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18481 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18482echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18483 ac_header_preproc=yes
19650fd6 18484 ;;
edfaf76d 18485 no:yes:* )
c0d27fcc
MR
18486 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18487echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18488 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18489echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18490 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18491echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18492 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18493echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18494 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18495echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18496 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18497echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18498
19650fd6 18499 ;;
c0d27fcc 18500esac
ca81d7a0
JD
18501{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18502echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18503if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18504 echo $ECHO_N "(cached) $ECHO_C" >&6
18505else
18506 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18507fi
ca81d7a0
JD
18508{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18509echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18510
18511fi
98418dba 18512if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18513 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18514#define UMAX 1
c0d27fcc 18515_ACEOF
ba4481b5 18516
98418dba
CW
18517fi
18518
c0d27fcc 18519
98418dba
CW
18520fi
18521
18522if test $ac_have_func = no; then
18523
18524for ac_header in mach/mach.h
2c9dccc9
PJ
18525do
18526as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18527if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
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
2c9dccc9 18531 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18532fi
ca81d7a0
JD
18533ac_res=`eval echo '${'$as_ac_Header'}'`
18534 { echo "$as_me:$LINENO: result: $ac_res" >&5
18535echo "${ECHO_T}$ac_res" >&6; }
98418dba 18536else
c0d27fcc 18537 # Is the header compilable?
ca81d7a0
JD
18538{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18539echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18540cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18541/* confdefs.h. */
18542_ACEOF
18543cat confdefs.h >>conftest.$ac_ext
18544cat >>conftest.$ac_ext <<_ACEOF
18545/* end confdefs.h. */
c0d27fcc
MR
18546$ac_includes_default
18547#include <$ac_header>
18548_ACEOF
18549rm -f conftest.$ac_objext
ca81d7a0
JD
18550if { (ac_try="$ac_compile"
18551case "(($ac_try" in
18552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18553 *) ac_try_echo=$ac_try;;
18554esac
18555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18556 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18557 ac_status=$?
edfaf76d
LK
18558 grep -v '^ *+' conftest.er1 >conftest.err
18559 rm -f conftest.er1
18560 cat conftest.err >&5
c0d27fcc 18561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18562 (exit $ac_status); } && {
18563 test -z "$ac_c_werror_flag" ||
18564 test ! -s conftest.err
18565 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18566 ac_header_compiler=yes
18567else
18568 echo "$as_me: failed program was:" >&5
19650fd6
AS
18569sed 's/^/| /' conftest.$ac_ext >&5
18570
ca81d7a0 18571 ac_header_compiler=no
c0d27fcc 18572fi
ca81d7a0
JD
18573
18574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18575{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18576echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18577
18578# Is the header present?
ca81d7a0
JD
18579{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18580echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18581cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18582/* confdefs.h. */
18583_ACEOF
18584cat confdefs.h >>conftest.$ac_ext
18585cat >>conftest.$ac_ext <<_ACEOF
18586/* end confdefs.h. */
2c9dccc9
PJ
18587#include <$ac_header>
18588_ACEOF
ca81d7a0
JD
18589if { (ac_try="$ac_cpp conftest.$ac_ext"
18590case "(($ac_try" in
18591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18592 *) ac_try_echo=$ac_try;;
18593esac
18594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18595 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18596 ac_status=$?
6bae0ccf 18597 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18598 rm -f conftest.er1
18599 cat conftest.err >&5
c0d27fcc 18600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18601 (exit $ac_status); } >/dev/null && {
18602 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18603 test ! -s conftest.err
18604 }; then
c0d27fcc
MR
18605 ac_header_preproc=yes
18606else
18607 echo "$as_me: failed program was:" >&5
19650fd6
AS
18608sed 's/^/| /' conftest.$ac_ext >&5
18609
c0d27fcc
MR
18610 ac_header_preproc=no
18611fi
ca81d7a0 18612
c0d27fcc 18613rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18614{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18615echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18616
18617# So? What about this header?
edfaf76d
LK
18618case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18619 yes:no: )
c0d27fcc
MR
18620 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18621echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18622 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18623echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18624 ac_header_preproc=yes
19650fd6 18625 ;;
edfaf76d 18626 no:yes:* )
c0d27fcc
MR
18627 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18628echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18629 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18630echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18631 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18632echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18633 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18634echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18635 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18636echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18637 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18638echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18639
19650fd6 18640 ;;
c0d27fcc 18641esac
ca81d7a0
JD
18642{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18643echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18644if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18645 echo $ECHO_N "(cached) $ECHO_C" >&6
18646else
edfaf76d 18647 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18648fi
ca81d7a0
JD
18649ac_res=`eval echo '${'$as_ac_Header'}'`
18650 { echo "$as_me:$LINENO: result: $ac_res" >&5
18651echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18652
18653fi
18654if test `eval echo '${'$as_ac_Header'}'` = yes; then
18655 cat >>confdefs.h <<_ACEOF
18656#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18657_ACEOF
18658
18659fi
18660
18661done
18662
18663fi
18664
18665
18666for ac_header in nlist.h
18667do
18668as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18669if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18670 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18671echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18672if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18673 echo $ECHO_N "(cached) $ECHO_C" >&6
18674fi
ca81d7a0
JD
18675ac_res=`eval echo '${'$as_ac_Header'}'`
18676 { echo "$as_me:$LINENO: result: $ac_res" >&5
18677echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18678else
18679 # Is the header compilable?
ca81d7a0
JD
18680{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18681echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18682cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18683/* confdefs.h. */
18684_ACEOF
18685cat confdefs.h >>conftest.$ac_ext
18686cat >>conftest.$ac_ext <<_ACEOF
18687/* end confdefs.h. */
c0d27fcc
MR
18688$ac_includes_default
18689#include <$ac_header>
18690_ACEOF
18691rm -f conftest.$ac_objext
ca81d7a0
JD
18692if { (ac_try="$ac_compile"
18693case "(($ac_try" in
18694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18695 *) ac_try_echo=$ac_try;;
18696esac
18697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18698 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18699 ac_status=$?
edfaf76d
LK
18700 grep -v '^ *+' conftest.er1 >conftest.err
18701 rm -f conftest.er1
18702 cat conftest.err >&5
c0d27fcc 18703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18704 (exit $ac_status); } && {
18705 test -z "$ac_c_werror_flag" ||
18706 test ! -s conftest.err
18707 } && test -s conftest.$ac_objext; then
c0d27fcc 18708 ac_header_compiler=yes
2c9dccc9
PJ
18709else
18710 echo "$as_me: failed program was:" >&5
19650fd6
AS
18711sed 's/^/| /' conftest.$ac_ext >&5
18712
ca81d7a0 18713 ac_header_compiler=no
98418dba 18714fi
ca81d7a0
JD
18715
18716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18717{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18718echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18719
c0d27fcc 18720# Is the header present?
ca81d7a0
JD
18721{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18722echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18723cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18724/* confdefs.h. */
18725_ACEOF
18726cat confdefs.h >>conftest.$ac_ext
18727cat >>conftest.$ac_ext <<_ACEOF
18728/* end confdefs.h. */
503d2be0
AS
18729#include <$ac_header>
18730_ACEOF
ca81d7a0
JD
18731if { (ac_try="$ac_cpp conftest.$ac_ext"
18732case "(($ac_try" in
18733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18734 *) ac_try_echo=$ac_try;;
18735esac
18736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18737 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18738 ac_status=$?
6bae0ccf 18739 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18740 rm -f conftest.er1
18741 cat conftest.err >&5
c0d27fcc 18742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18743 (exit $ac_status); } >/dev/null && {
18744 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18745 test ! -s conftest.err
18746 }; then
c0d27fcc 18747 ac_header_preproc=yes
503d2be0
AS
18748else
18749 echo "$as_me: failed program was:" >&5
19650fd6
AS
18750sed 's/^/| /' conftest.$ac_ext >&5
18751
c0d27fcc 18752 ac_header_preproc=no
b5de8dc0 18753fi
ca81d7a0 18754
503d2be0 18755rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18756{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18757echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18758
18759# So? What about this header?
edfaf76d
LK
18760case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18761 yes:no: )
c0d27fcc
MR
18762 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18763echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18764 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18765echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18766 ac_header_preproc=yes
19650fd6 18767 ;;
edfaf76d 18768 no:yes:* )
c0d27fcc
MR
18769 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18770echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18771 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18772echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18773 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18774echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18775 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18776echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18777 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18778echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18779 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18780echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18781
19650fd6 18782 ;;
c0d27fcc 18783esac
ca81d7a0
JD
18784{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18785echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18786if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18787 echo $ECHO_N "(cached) $ECHO_C" >&6
18788else
edfaf76d 18789 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18790fi
ca81d7a0
JD
18791ac_res=`eval echo '${'$as_ac_Header'}'`
18792 { echo "$as_me:$LINENO: result: $ac_res" >&5
18793echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18794
18795fi
98418dba 18796if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18797 cat >>confdefs.h <<_ACEOF
98418dba 18798#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18799_ACEOF
ca81d7a0
JD
18800 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18801echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18802if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18803 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18804else
503d2be0 18805 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18806/* confdefs.h. */
18807_ACEOF
18808cat confdefs.h >>conftest.$ac_ext
18809cat >>conftest.$ac_ext <<_ACEOF
18810/* end confdefs.h. */
98418dba 18811#include <nlist.h>
b5de8dc0 18812
503d2be0
AS
18813int
18814main ()
18815{
98418dba
CW
18816static struct nlist ac_aggr;
18817if (ac_aggr.n_un.n_name)
18818return 0;
503d2be0
AS
18819 ;
18820 return 0;
18821}
18822_ACEOF
98418dba 18823rm -f conftest.$ac_objext
ca81d7a0
JD
18824if { (ac_try="$ac_compile"
18825case "(($ac_try" in
18826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18827 *) ac_try_echo=$ac_try;;
18828esac
18829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18830 (eval "$ac_compile") 2>conftest.er1
503d2be0 18831 ac_status=$?
edfaf76d
LK
18832 grep -v '^ *+' conftest.er1 >conftest.err
18833 rm -f conftest.er1
18834 cat conftest.err >&5
c0d27fcc 18835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18836 (exit $ac_status); } && {
18837 test -z "$ac_c_werror_flag" ||
18838 test ! -s conftest.err
18839 } && test -s conftest.$ac_objext; then
edfaf76d 18840 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18841else
18842 echo "$as_me: failed program was:" >&5
19650fd6
AS
18843sed 's/^/| /' conftest.$ac_ext >&5
18844
ca81d7a0 18845 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18846/* confdefs.h. */
18847_ACEOF
18848cat confdefs.h >>conftest.$ac_ext
18849cat >>conftest.$ac_ext <<_ACEOF
18850/* end confdefs.h. */
6bae0ccf
DL
18851#include <nlist.h>
18852
18853int
18854main ()
18855{
18856static struct nlist ac_aggr;
18857if (sizeof ac_aggr.n_un.n_name)
18858return 0;
18859 ;
18860 return 0;
18861}
18862_ACEOF
18863rm -f conftest.$ac_objext
ca81d7a0
JD
18864if { (ac_try="$ac_compile"
18865case "(($ac_try" in
18866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18867 *) ac_try_echo=$ac_try;;
18868esac
18869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18870 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18871 ac_status=$?
edfaf76d
LK
18872 grep -v '^ *+' conftest.er1 >conftest.err
18873 rm -f conftest.er1
18874 cat conftest.err >&5
6bae0ccf 18875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18876 (exit $ac_status); } && {
18877 test -z "$ac_c_werror_flag" ||
18878 test ! -s conftest.err
18879 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18880 ac_cv_member_struct_nlist_n_un_n_name=yes
18881else
18882 echo "$as_me: failed program was:" >&5
19650fd6
AS
18883sed 's/^/| /' conftest.$ac_ext >&5
18884
ca81d7a0 18885 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18886fi
ca81d7a0
JD
18887
18888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18889fi
ca81d7a0
JD
18890
18891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18892fi
ca81d7a0
JD
18893{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18894echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18895if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18896
c0d27fcc 18897cat >>confdefs.h <<_ACEOF
98418dba 18898#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18899_ACEOF
b5de8dc0 18900
c0d27fcc
MR
18901
18902cat >>confdefs.h <<\_ACEOF
98418dba 18903#define NLIST_NAME_UNION 1
c0d27fcc 18904_ACEOF
b5de8dc0 18905
98418dba 18906fi
b5de8dc0 18907
c0d27fcc 18908
98418dba 18909fi
c0d27fcc 18910
98418dba 18911done
b5de8dc0 18912
98418dba
CW
18913fi
18914done
b5de8dc0 18915
c0d27fcc 18916
98418dba 18917# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18918{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18919echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18920if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18921 echo $ECHO_N "(cached) $ECHO_C" >&6
18922else
18923 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18924/* confdefs.h. */
18925_ACEOF
18926cat confdefs.h >>conftest.$ac_ext
18927cat >>conftest.$ac_ext <<_ACEOF
18928/* end confdefs.h. */
6bae0ccf 18929#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18930#ifdef LDAV_PRIVILEGED
18931Yowza Am I SETGID yet
18932#endif
18933_ACEOF
18934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18935 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18936 ac_cv_func_getloadavg_setgid=yes
18937else
18938 ac_cv_func_getloadavg_setgid=no
18939fi
18940rm -f conftest*
b5de8dc0 18941
98418dba 18942fi
ca81d7a0
JD
18943{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18944echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18945if test $ac_cv_func_getloadavg_setgid = yes; then
18946 NEED_SETGID=true
b5de8dc0 18947
c0d27fcc 18948cat >>confdefs.h <<\_ACEOF
98418dba 18949#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18950_ACEOF
98418dba 18951
b5de8dc0 18952else
98418dba 18953 NEED_SETGID=false
b5de8dc0 18954fi
98418dba
CW
18955
18956if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18957 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18958echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18959if test "${ac_cv_group_kmem+set}" = set; then
18960 echo $ECHO_N "(cached) $ECHO_C" >&6
18961else
18962 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18963 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18964 # If we got an error (system does not support symlinks), try without -L.
18965 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18966 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18967 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18968 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18969 / /s/.* //;p;'`
18970
b5de8dc0 18971fi
ca81d7a0
JD
18972{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18973echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18974 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18975fi
98418dba
CW
18976if test "x$ac_save_LIBS" = x; then
18977 GETLOADAVG_LIBS=$LIBS
18978else
18979 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18980fi
98418dba 18981LIBS=$ac_save_LIBS
b5de8dc0 18982
c0d27fcc
MR
18983
18984
ca81d7a0
JD
18985{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18986echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18987if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18988 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18989else
b936fae4 18990 while :; do
503d2be0 18991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18992/* confdefs.h. */
18993_ACEOF
18994cat confdefs.h >>conftest.$ac_ext
18995cat >>conftest.$ac_ext <<_ACEOF
18996/* end confdefs.h. */
73d798d5 18997#include <stdio.h>
503d2be0
AS
18998int
18999main ()
19000{
73d798d5 19001return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
19002 ;
19003 return 0;
19004}
19005_ACEOF
f053c89f
CY
19006rm -f conftest.$ac_objext conftest$ac_exeext
19007if { (ac_try="$ac_link"
ca81d7a0
JD
19008case "(($ac_try" in
19009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19010 *) ac_try_echo=$ac_try;;
19011esac
19012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19013 (eval "$ac_link") 2>conftest.er1
b936fae4 19014 ac_status=$?
edfaf76d
LK
19015 grep -v '^ *+' conftest.er1 >conftest.err
19016 rm -f conftest.er1
19017 cat conftest.err >&5
c0d27fcc 19018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19019 (exit $ac_status); } && {
19020 test -z "$ac_c_werror_flag" ||
19021 test ! -s conftest.err
19022 } && test -s conftest$ac_exeext &&
19023 $as_test_x conftest$ac_exeext; then
19024 ac_cv_sys_largefile_source=no; break
b936fae4
AS
19025else
19026 echo "$as_me: failed program was:" >&5
19650fd6
AS
19027sed 's/^/| /' conftest.$ac_ext >&5
19028
ca81d7a0 19029
b936fae4 19030fi
ca81d7a0 19031
f053c89f
CY
19032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19033 conftest$ac_exeext conftest.$ac_ext
b936fae4 19034 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19035/* confdefs.h. */
19036_ACEOF
19037cat confdefs.h >>conftest.$ac_ext
19038cat >>conftest.$ac_ext <<_ACEOF
19039/* end confdefs.h. */
b936fae4 19040#define _LARGEFILE_SOURCE 1
73d798d5 19041#include <stdio.h>
b936fae4
AS
19042int
19043main ()
19044{
73d798d5 19045return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
19046 ;
19047 return 0;
19048}
19049_ACEOF
f053c89f
CY
19050rm -f conftest.$ac_objext conftest$ac_exeext
19051if { (ac_try="$ac_link"
ca81d7a0
JD
19052case "(($ac_try" in
19053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19054 *) ac_try_echo=$ac_try;;
19055esac
19056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19057 (eval "$ac_link") 2>conftest.er1
b936fae4 19058 ac_status=$?
edfaf76d
LK
19059 grep -v '^ *+' conftest.er1 >conftest.err
19060 rm -f conftest.er1
19061 cat conftest.err >&5
c0d27fcc 19062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19063 (exit $ac_status); } && {
19064 test -z "$ac_c_werror_flag" ||
19065 test ! -s conftest.err
19066 } && test -s conftest$ac_exeext &&
19067 $as_test_x conftest$ac_exeext; then
b936fae4
AS
19068 ac_cv_sys_largefile_source=1; break
19069else
19070 echo "$as_me: failed program was:" >&5
19650fd6
AS
19071sed 's/^/| /' conftest.$ac_ext >&5
19072
ca81d7a0 19073
b936fae4 19074fi
ca81d7a0 19075
f053c89f
CY
19076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19077 conftest$ac_exeext conftest.$ac_ext
19078 ac_cv_sys_largefile_source=unknown
b936fae4
AS
19079 break
19080done
19081fi
ca81d7a0
JD
19082{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19083echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
19084case $ac_cv_sys_largefile_source in #(
19085 no | unknown) ;;
19086 *)
c0d27fcc 19087cat >>confdefs.h <<_ACEOF
b936fae4 19088#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 19089_ACEOF
f053c89f
CY
19090;;
19091esac
b936fae4 19092rm -f conftest*
4c343001 19093
b936fae4
AS
19094# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19095# in glibc 2.1.3, but that breaks too many other things.
19096# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 19097if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 19098
c0d27fcc 19099cat >>confdefs.h <<\_ACEOF
b936fae4 19100#define HAVE_FSEEKO 1
c0d27fcc 19101_ACEOF
b936fae4 19102
4c343001
DL
19103fi
19104
c0d27fcc 19105
52dbaac8
PE
19106# Configure getopt.
19107# getopt.m4 serial 10
19108
19109# The getopt module assume you want GNU getopt, with getopt_long etc,
19110# rather than vanilla POSIX getopt. This means your your code should
19111# always include <getopt.h> for the getopt prototypes.
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123# Prerequisites of lib/getopt*.
19124
19125
19126
10a3b1a1 19127
52dbaac8
PE
19128 GETOPT_H=
19129
19130for ac_header in getopt.h
19131do
19132as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19133if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19134 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19135echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19137 echo $ECHO_N "(cached) $ECHO_C" >&6
19138fi
ca81d7a0
JD
19139ac_res=`eval echo '${'$as_ac_Header'}'`
19140 { echo "$as_me:$LINENO: result: $ac_res" >&5
19141echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19142else
19143 # Is the header compilable?
ca81d7a0
JD
19144{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19145echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19146cat >conftest.$ac_ext <<_ACEOF
19147/* confdefs.h. */
19148_ACEOF
19149cat confdefs.h >>conftest.$ac_ext
19150cat >>conftest.$ac_ext <<_ACEOF
19151/* end confdefs.h. */
19152$ac_includes_default
19153#include <$ac_header>
19154_ACEOF
19155rm -f conftest.$ac_objext
ca81d7a0
JD
19156if { (ac_try="$ac_compile"
19157case "(($ac_try" in
19158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19159 *) ac_try_echo=$ac_try;;
19160esac
19161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19162 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19163 ac_status=$?
19164 grep -v '^ *+' conftest.er1 >conftest.err
19165 rm -f conftest.er1
19166 cat conftest.err >&5
19167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19168 (exit $ac_status); } && {
19169 test -z "$ac_c_werror_flag" ||
19170 test ! -s conftest.err
19171 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19172 ac_header_compiler=yes
19173else
19174 echo "$as_me: failed program was:" >&5
19175sed 's/^/| /' conftest.$ac_ext >&5
19176
ca81d7a0 19177 ac_header_compiler=no
52dbaac8 19178fi
ca81d7a0
JD
19179
19180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19181{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19182echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19183
19184# Is the header present?
ca81d7a0
JD
19185{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19186echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19187cat >conftest.$ac_ext <<_ACEOF
19188/* confdefs.h. */
19189_ACEOF
19190cat confdefs.h >>conftest.$ac_ext
19191cat >>conftest.$ac_ext <<_ACEOF
19192/* end confdefs.h. */
19193#include <$ac_header>
19194_ACEOF
ca81d7a0
JD
19195if { (ac_try="$ac_cpp conftest.$ac_ext"
19196case "(($ac_try" in
19197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19198 *) ac_try_echo=$ac_try;;
19199esac
19200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19202 ac_status=$?
19203 grep -v '^ *+' conftest.er1 >conftest.err
19204 rm -f conftest.er1
19205 cat conftest.err >&5
19206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19207 (exit $ac_status); } >/dev/null && {
19208 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19209 test ! -s conftest.err
19210 }; then
52dbaac8
PE
19211 ac_header_preproc=yes
19212else
19213 echo "$as_me: failed program was:" >&5
19214sed 's/^/| /' conftest.$ac_ext >&5
19215
19216 ac_header_preproc=no
19217fi
ca81d7a0 19218
52dbaac8 19219rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19220{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19221echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19222
19223# So? What about this header?
19224case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19225 yes:no: )
19226 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19227echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19229echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19230 ac_header_preproc=yes
19231 ;;
19232 no:yes:* )
19233 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19234echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19235 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19236echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19237 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19238echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19239 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19240echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19241 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19242echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19243 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19244echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19245
52dbaac8
PE
19246 ;;
19247esac
ca81d7a0
JD
19248{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19249echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19251 echo $ECHO_N "(cached) $ECHO_C" >&6
19252else
19253 eval "$as_ac_Header=\$ac_header_preproc"
19254fi
ca81d7a0
JD
19255ac_res=`eval echo '${'$as_ac_Header'}'`
19256 { echo "$as_me:$LINENO: result: $ac_res" >&5
19257echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19258
19259fi
19260if test `eval echo '${'$as_ac_Header'}'` = yes; then
19261 cat >>confdefs.h <<_ACEOF
19262#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19263_ACEOF
19264
19265else
19266 GETOPT_H=getopt.h
19267fi
19268
19269done
19270
19271 if test -z "$GETOPT_H"; then
19272
19273for ac_func in getopt_long_only
19274do
19275as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19276{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19277echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19278if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19279 echo $ECHO_N "(cached) $ECHO_C" >&6
19280else
19281 cat >conftest.$ac_ext <<_ACEOF
19282/* confdefs.h. */
19283_ACEOF
19284cat confdefs.h >>conftest.$ac_ext
19285cat >>conftest.$ac_ext <<_ACEOF
19286/* end confdefs.h. */
19287/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19289#define $ac_func innocuous_$ac_func
19290
19291/* System header to define __stub macros and hopefully few prototypes,
19292 which can conflict with char $ac_func (); below.
19293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19294 <limits.h> exists even on freestanding compilers. */
19295
19296#ifdef __STDC__
19297# include <limits.h>
19298#else
19299# include <assert.h>
19300#endif
19301
19302#undef $ac_func
19303
ca81d7a0
JD
19304/* Override any GCC internal prototype to avoid an error.
19305 Use char because int might match the return type of a GCC
19306 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19307#ifdef __cplusplus
19308extern "C"
52dbaac8 19309#endif
52dbaac8
PE
19310char $ac_func ();
19311/* The GNU C library defines this for functions which it implements
19312 to always fail with ENOSYS. Some functions are actually named
19313 something starting with __ and the normal name is an alias. */
ca81d7a0 19314#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19315choke me
52dbaac8
PE
19316#endif
19317
19318int
19319main ()
19320{
ca81d7a0 19321return $ac_func ();
52dbaac8
PE
19322 ;
19323 return 0;
19324}
19325_ACEOF
19326rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19327if { (ac_try="$ac_link"
19328case "(($ac_try" in
19329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19330 *) ac_try_echo=$ac_try;;
19331esac
19332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19333 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19334 ac_status=$?
19335 grep -v '^ *+' conftest.er1 >conftest.err
19336 rm -f conftest.er1
19337 cat conftest.err >&5
19338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19339 (exit $ac_status); } && {
19340 test -z "$ac_c_werror_flag" ||
19341 test ! -s conftest.err
19342 } && test -s conftest$ac_exeext &&
19343 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19344 eval "$as_ac_var=yes"
19345else
19346 echo "$as_me: failed program was:" >&5
19347sed 's/^/| /' conftest.$ac_ext >&5
19348
ca81d7a0 19349 eval "$as_ac_var=no"
52dbaac8 19350fi
ca81d7a0 19351
f053c89f 19352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19353 conftest$ac_exeext conftest.$ac_ext
19354fi
ca81d7a0
JD
19355ac_res=`eval echo '${'$as_ac_var'}'`
19356 { echo "$as_me:$LINENO: result: $ac_res" >&5
19357echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19358if test `eval echo '${'$as_ac_var'}'` = yes; then
19359 cat >>confdefs.h <<_ACEOF
19360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19361_ACEOF
19362
19363else
19364 GETOPT_H=getopt.h
19365fi
19366done
19367
19368 fi
19369
19370 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19371 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19372echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19373if test "${ac_cv_have_decl_optreset+set}" = set; then
19374 echo $ECHO_N "(cached) $ECHO_C" >&6
19375else
19376 cat >conftest.$ac_ext <<_ACEOF
19377/* confdefs.h. */
19378_ACEOF
19379cat confdefs.h >>conftest.$ac_ext
19380cat >>conftest.$ac_ext <<_ACEOF
19381/* end confdefs.h. */
19382#include <getopt.h>
19383
19384int
19385main ()
19386{
19387#ifndef optreset
f053c89f 19388 (void) optreset;
52dbaac8
PE
19389#endif
19390
19391 ;
19392 return 0;
19393}
19394_ACEOF
19395rm -f conftest.$ac_objext
ca81d7a0
JD
19396if { (ac_try="$ac_compile"
19397case "(($ac_try" in
19398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19399 *) ac_try_echo=$ac_try;;
19400esac
19401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19402 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19403 ac_status=$?
19404 grep -v '^ *+' conftest.er1 >conftest.err
19405 rm -f conftest.er1
19406 cat conftest.err >&5
19407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19408 (exit $ac_status); } && {
19409 test -z "$ac_c_werror_flag" ||
19410 test ! -s conftest.err
19411 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19412 ac_cv_have_decl_optreset=yes
19413else
19414 echo "$as_me: failed program was:" >&5
19415sed 's/^/| /' conftest.$ac_ext >&5
19416
ca81d7a0 19417 ac_cv_have_decl_optreset=no
52dbaac8 19418fi
ca81d7a0
JD
19419
19420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19421fi
ca81d7a0
JD
19422{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19423echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19424if test $ac_cv_have_decl_optreset = yes; then
19425 GETOPT_H=getopt.h
19426fi
19427
19428 fi
19429
19430 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19431 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19432echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19433if test "${gl_cv_func_gnu_getopt+set}" = set; then
19434 echo $ECHO_N "(cached) $ECHO_C" >&6
19435else
19436 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19437 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19438echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19439if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19440 echo $ECHO_N "(cached) $ECHO_C" >&6
19441else
19442 cat >conftest.$ac_ext <<_ACEOF
19443/* confdefs.h. */
19444_ACEOF
19445cat confdefs.h >>conftest.$ac_ext
19446cat >>conftest.$ac_ext <<_ACEOF
19447/* end confdefs.h. */
19448#include <getopt.h>
19449
19450int
19451main ()
19452{
19453#ifndef getopt_clip
f053c89f 19454 (void) getopt_clip;
52dbaac8
PE
19455#endif
19456
19457 ;
19458 return 0;
19459}
19460_ACEOF
19461rm -f conftest.$ac_objext
ca81d7a0
JD
19462if { (ac_try="$ac_compile"
19463case "(($ac_try" in
19464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19465 *) ac_try_echo=$ac_try;;
19466esac
19467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19468 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19469 ac_status=$?
19470 grep -v '^ *+' conftest.er1 >conftest.err
19471 rm -f conftest.er1
19472 cat conftest.err >&5
19473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19474 (exit $ac_status); } && {
19475 test -z "$ac_c_werror_flag" ||
19476 test ! -s conftest.err
19477 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19478 ac_cv_have_decl_getopt_clip=yes
19479else
19480 echo "$as_me: failed program was:" >&5
19481sed 's/^/| /' conftest.$ac_ext >&5
19482
ca81d7a0 19483 ac_cv_have_decl_getopt_clip=no
52dbaac8 19484fi
ca81d7a0
JD
19485
19486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19487fi
ca81d7a0
JD
19488{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19489echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19490if test $ac_cv_have_decl_getopt_clip = yes; then
19491 gl_cv_func_gnu_getopt=no
19492else
19493 gl_cv_func_gnu_getopt=yes
19494fi
19495
19496else
19497 cat >conftest.$ac_ext <<_ACEOF
19498/* confdefs.h. */
19499_ACEOF
19500cat confdefs.h >>conftest.$ac_ext
19501cat >>conftest.$ac_ext <<_ACEOF
19502/* end confdefs.h. */
19503#include <getopt.h>
19504int
19505main ()
19506{
19507
19508 char *myargv[3];
19509 myargv[0] = "conftest";
19510 myargv[1] = "-+";
19511 myargv[2] = 0;
19512 return getopt (2, myargv, "+a") != '?';
19513
19514 ;
19515 return 0;
19516}
19517_ACEOF
19518rm -f conftest$ac_exeext
ca81d7a0
JD
19519if { (ac_try="$ac_link"
19520case "(($ac_try" in
19521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19522 *) ac_try_echo=$ac_try;;
19523esac
19524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19525 (eval "$ac_link") 2>&5
52dbaac8
PE
19526 ac_status=$?
19527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19529 { (case "(($ac_try" in
19530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19531 *) ac_try_echo=$ac_try;;
19532esac
19533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19534 (eval "$ac_try") 2>&5
52dbaac8
PE
19535 ac_status=$?
19536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19537 (exit $ac_status); }; }; then
19538 gl_cv_func_gnu_getopt=yes
19539else
19540 echo "$as_me: program exited with status $ac_status" >&5
19541echo "$as_me: failed program was:" >&5
19542sed 's/^/| /' conftest.$ac_ext >&5
19543
19544( exit $ac_status )
19545gl_cv_func_gnu_getopt=no
19546fi
ca81d7a0 19547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19548fi
ca81d7a0
JD
19549
19550
52dbaac8 19551fi
ca81d7a0
JD
19552{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19553echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19554 if test "$gl_cv_func_gnu_getopt" = "no"; then
19555 GETOPT_H=getopt.h
19556 fi
19557 fi
19558
19559
19560
19561 if test -n "$GETOPT_H"; then
19562
19563
19564 GETOPT_H=getopt.h
19565
19566cat >>confdefs.h <<\_ACEOF
19567#define __GETOPT_PREFIX rpl_
19568_ACEOF
19569
19570
19571
19572 :
19573 GETOPTOBJS='getopt.o getopt1.o'
19574
19575fi
19576
19577
19578
19579
ca81d7a0
JD
19580{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19581echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19582if test "${ac_cv_func_getpgrp_void+set}" = set; then
19583 echo $ECHO_N "(cached) $ECHO_C" >&6
19584else
19585 # Use it with a single arg.
19586cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19587/* confdefs.h. */
19588_ACEOF
19589cat confdefs.h >>conftest.$ac_ext
19590cat >>conftest.$ac_ext <<_ACEOF
19591/* end confdefs.h. */
cd958eb3
MB
19592$ac_includes_default
19593int
19594main ()
19595{
19596getpgrp (0);
19597 ;
19598 return 0;
19599}
19600_ACEOF
19601rm -f conftest.$ac_objext
ca81d7a0
JD
19602if { (ac_try="$ac_compile"
19603case "(($ac_try" in
19604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19605 *) ac_try_echo=$ac_try;;
19606esac
19607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19608 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19609 ac_status=$?
edfaf76d
LK
19610 grep -v '^ *+' conftest.er1 >conftest.err
19611 rm -f conftest.er1
19612 cat conftest.err >&5
cd958eb3 19613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19614 (exit $ac_status); } && {
19615 test -z "$ac_c_werror_flag" ||
19616 test ! -s conftest.err
19617 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19618 ac_cv_func_getpgrp_void=no
19619else
19620 echo "$as_me: failed program was:" >&5
19650fd6
AS
19621sed 's/^/| /' conftest.$ac_ext >&5
19622
ca81d7a0 19623 ac_cv_func_getpgrp_void=yes
cd958eb3 19624fi
ca81d7a0
JD
19625
19626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19627
19628fi
ca81d7a0
JD
19629{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19630echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19631if test $ac_cv_func_getpgrp_void = yes; then
19632
19633cat >>confdefs.h <<\_ACEOF
19634#define GETPGRP_VOID 1
19635_ACEOF
19636
19637fi
19638
19639
973a76b1
DL
19640
19641for ac_func in strftime
19642do
19643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19647 echo $ECHO_N "(cached) $ECHO_C" >&6
19648else
19649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19650/* confdefs.h. */
19651_ACEOF
19652cat confdefs.h >>conftest.$ac_ext
19653cat >>conftest.$ac_ext <<_ACEOF
19654/* end confdefs.h. */
edfaf76d
LK
19655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19657#define $ac_func innocuous_$ac_func
19658
973a76b1 19659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19660 which can conflict with char $ac_func (); below.
19661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19662 <limits.h> exists even on freestanding compilers. */
edfaf76d 19663
19650fd6
AS
19664#ifdef __STDC__
19665# include <limits.h>
19666#else
19667# include <assert.h>
19668#endif
edfaf76d
LK
19669
19670#undef $ac_func
19671
ca81d7a0
JD
19672/* Override any GCC internal prototype to avoid an error.
19673 Use char because int might match the return type of a GCC
19674 builtin and then its argument prototype would still apply. */
973a76b1
DL
19675#ifdef __cplusplus
19676extern "C"
973a76b1 19677#endif
973a76b1
DL
19678char $ac_func ();
19679/* The GNU C library defines this for functions which it implements
19680 to always fail with ENOSYS. Some functions are actually named
19681 something starting with __ and the normal name is an alias. */
ca81d7a0 19682#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19683choke me
973a76b1
DL
19684#endif
19685
19650fd6
AS
19686int
19687main ()
19688{
ca81d7a0 19689return $ac_func ();
973a76b1
DL
19690 ;
19691 return 0;
19692}
19693_ACEOF
19694rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19695if { (ac_try="$ac_link"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
19700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19701 (eval "$ac_link") 2>conftest.er1
973a76b1 19702 ac_status=$?
edfaf76d
LK
19703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
973a76b1 19706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
19710 } && test -s conftest$ac_exeext &&
19711 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19712 eval "$as_ac_var=yes"
19713else
19714 echo "$as_me: failed program was:" >&5
19650fd6
AS
19715sed 's/^/| /' conftest.$ac_ext >&5
19716
ca81d7a0 19717 eval "$as_ac_var=no"
973a76b1 19718fi
ca81d7a0 19719
f053c89f 19720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19721 conftest$ac_exeext conftest.$ac_ext
973a76b1 19722fi
ca81d7a0
JD
19723ac_res=`eval echo '${'$as_ac_var'}'`
19724 { echo "$as_me:$LINENO: result: $ac_res" >&5
19725echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19726if test `eval echo '${'$as_ac_var'}'` = yes; then
19727 cat >>confdefs.h <<_ACEOF
19728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19729_ACEOF
19730
19731else
19732 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19733{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19734echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19735if test "${ac_cv_lib_intl_strftime+set}" = set; then
19736 echo $ECHO_N "(cached) $ECHO_C" >&6
19737else
19738 ac_check_lib_save_LIBS=$LIBS
19739LIBS="-lintl $LIBS"
19740cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19741/* confdefs.h. */
19742_ACEOF
19743cat confdefs.h >>conftest.$ac_ext
19744cat >>conftest.$ac_ext <<_ACEOF
19745/* end confdefs.h. */
973a76b1 19746
ca81d7a0
JD
19747/* Override any GCC internal prototype to avoid an error.
19748 Use char because int might match the return type of a GCC
19749 builtin and then its argument prototype would still apply. */
973a76b1
DL
19750#ifdef __cplusplus
19751extern "C"
19752#endif
973a76b1
DL
19753char strftime ();
19754int
19755main ()
19756{
ca81d7a0 19757return strftime ();
973a76b1
DL
19758 ;
19759 return 0;
19760}
19761_ACEOF
19762rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19763if { (ac_try="$ac_link"
19764case "(($ac_try" in
19765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19766 *) ac_try_echo=$ac_try;;
19767esac
19768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19769 (eval "$ac_link") 2>conftest.er1
973a76b1 19770 ac_status=$?
edfaf76d
LK
19771 grep -v '^ *+' conftest.er1 >conftest.err
19772 rm -f conftest.er1
19773 cat conftest.err >&5
973a76b1 19774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19775 (exit $ac_status); } && {
19776 test -z "$ac_c_werror_flag" ||
19777 test ! -s conftest.err
19778 } && test -s conftest$ac_exeext &&
19779 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19780 ac_cv_lib_intl_strftime=yes
19781else
19782 echo "$as_me: failed program was:" >&5
19650fd6
AS
19783sed 's/^/| /' conftest.$ac_ext >&5
19784
ca81d7a0 19785 ac_cv_lib_intl_strftime=no
973a76b1 19786fi
ca81d7a0 19787
f053c89f 19788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19789 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19790LIBS=$ac_check_lib_save_LIBS
19791fi
ca81d7a0
JD
19792{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19793echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19794if test $ac_cv_lib_intl_strftime = yes; then
19795 cat >>confdefs.h <<\_ACEOF
19796#define HAVE_STRFTIME 1
19797_ACEOF
19798
19799LIBS="-lintl $LIBS"
19800fi
19801
19802fi
19803done
19804
19805
b936fae4
AS
19806# UNIX98 PTYs.
19807
19808for ac_func in grantpt
503d2be0
AS
19809do
19810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19811{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19813if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19814 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19815else
503d2be0 19816 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19817/* confdefs.h. */
19818_ACEOF
19819cat confdefs.h >>conftest.$ac_ext
19820cat >>conftest.$ac_ext <<_ACEOF
19821/* end confdefs.h. */
edfaf76d
LK
19822/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19823 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19824#define $ac_func innocuous_$ac_func
19825
503d2be0 19826/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19827 which can conflict with char $ac_func (); below.
19828 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19829 <limits.h> exists even on freestanding compilers. */
edfaf76d 19830
19650fd6
AS
19831#ifdef __STDC__
19832# include <limits.h>
19833#else
19834# include <assert.h>
19835#endif
edfaf76d
LK
19836
19837#undef $ac_func
19838
ca81d7a0
JD
19839/* Override any GCC internal prototype to avoid an error.
19840 Use char because int might match the return type of a GCC
19841 builtin and then its argument prototype would still apply. */
503d2be0
AS
19842#ifdef __cplusplus
19843extern "C"
19844#endif
503d2be0 19845char $ac_func ();
503d2be0
AS
19846/* The GNU C library defines this for functions which it implements
19847 to always fail with ENOSYS. Some functions are actually named
19848 something starting with __ and the normal name is an alias. */
ca81d7a0 19849#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19850choke me
503d2be0 19851#endif
4c343001 19852
19650fd6
AS
19853int
19854main ()
19855{
ca81d7a0 19856return $ac_func ();
503d2be0
AS
19857 ;
19858 return 0;
19859}
19860_ACEOF
19861rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19862if { (ac_try="$ac_link"
19863case "(($ac_try" in
19864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865 *) ac_try_echo=$ac_try;;
19866esac
19867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19868 (eval "$ac_link") 2>conftest.er1
503d2be0 19869 ac_status=$?
edfaf76d
LK
19870 grep -v '^ *+' conftest.er1 >conftest.err
19871 rm -f conftest.er1
19872 cat conftest.err >&5
c0d27fcc 19873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19874 (exit $ac_status); } && {
19875 test -z "$ac_c_werror_flag" ||
19876 test ! -s conftest.err
19877 } && test -s conftest$ac_exeext &&
19878 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19879 eval "$as_ac_var=yes"
19880else
19881 echo "$as_me: failed program was:" >&5
19650fd6
AS
19882sed 's/^/| /' conftest.$ac_ext >&5
19883
ca81d7a0 19884 eval "$as_ac_var=no"
503d2be0 19885fi
ca81d7a0 19886
f053c89f 19887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19888 conftest$ac_exeext conftest.$ac_ext
503d2be0 19889fi
ca81d7a0
JD
19890ac_res=`eval echo '${'$as_ac_var'}'`
19891 { echo "$as_me:$LINENO: result: $ac_res" >&5
19892echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19893if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19894 cat >>confdefs.h <<_ACEOF
503d2be0 19895#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19896_ACEOF
4c343001
DL
19897
19898fi
503d2be0
AS
19899done
19900
c0d27fcc 19901
b936fae4 19902# PTY-related GNU extensions.
4c343001 19903
b936fae4
AS
19904for ac_func in getpt
19905do
19906as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19907{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19908echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19909if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19910 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19911else
b936fae4 19912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
edfaf76d
LK
19918/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19919 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19920#define $ac_func innocuous_$ac_func
19921
087121cc 19922/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19923 which can conflict with char $ac_func (); below.
19924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19925 <limits.h> exists even on freestanding compilers. */
edfaf76d 19926
19650fd6
AS
19927#ifdef __STDC__
19928# include <limits.h>
19929#else
19930# include <assert.h>
19931#endif
edfaf76d
LK
19932
19933#undef $ac_func
19934
ca81d7a0
JD
19935/* Override any GCC internal prototype to avoid an error.
19936 Use char because int might match the return type of a GCC
19937 builtin and then its argument prototype would still apply. */
503d2be0
AS
19938#ifdef __cplusplus
19939extern "C"
19940#endif
503d2be0 19941char $ac_func ();
087121cc
GM
19942/* The GNU C library defines this for functions which it implements
19943 to always fail with ENOSYS. Some functions are actually named
19944 something starting with __ and the normal name is an alias. */
ca81d7a0 19945#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19946choke me
087121cc
GM
19947#endif
19948
19650fd6
AS
19949int
19950main ()
19951{
ca81d7a0 19952return $ac_func ();
503d2be0
AS
19953 ;
19954 return 0;
19955}
19956_ACEOF
19957rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19958if { (ac_try="$ac_link"
19959case "(($ac_try" in
19960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961 *) ac_try_echo=$ac_try;;
19962esac
19963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19964 (eval "$ac_link") 2>conftest.er1
503d2be0 19965 ac_status=$?
edfaf76d
LK
19966 grep -v '^ *+' conftest.er1 >conftest.err
19967 rm -f conftest.er1
19968 cat conftest.err >&5
c0d27fcc 19969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19970 (exit $ac_status); } && {
19971 test -z "$ac_c_werror_flag" ||
19972 test ! -s conftest.err
19973 } && test -s conftest$ac_exeext &&
19974 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19975 eval "$as_ac_var=yes"
19976else
19977 echo "$as_me: failed program was:" >&5
19650fd6
AS
19978sed 's/^/| /' conftest.$ac_ext >&5
19979
ca81d7a0 19980 eval "$as_ac_var=no"
503d2be0 19981fi
ca81d7a0 19982
f053c89f 19983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19984 conftest$ac_exeext conftest.$ac_ext
503d2be0 19985fi
ca81d7a0
JD
19986ac_res=`eval echo '${'$as_ac_var'}'`
19987 { echo "$as_me:$LINENO: result: $ac_res" >&5
19988echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19989if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19990 cat >>confdefs.h <<_ACEOF
503d2be0 19991#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19992_ACEOF
087121cc 19993
087121cc
GM
19994fi
19995done
19996
c0d27fcc 19997
ba4481b5
DL
19998# Check this now, so that we will NOT find the above functions in ncurses.
19999# That is because we have not set up to link ncurses in lib-src.
20000# It's better to believe a function is not available
20001# than to expect to find it in ncurses.
503d2be0 20002
ca81d7a0
JD
20003{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
20004echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
20005if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
20006 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20007else
503d2be0 20008 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20009LIBS="-lncurses $LIBS"
503d2be0 20010cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20011/* confdefs.h. */
20012_ACEOF
20013cat confdefs.h >>conftest.$ac_ext
20014cat >>conftest.$ac_ext <<_ACEOF
20015/* end confdefs.h. */
503d2be0 20016
ca81d7a0
JD
20017/* Override any GCC internal prototype to avoid an error.
20018 Use char because int might match the return type of a GCC
20019 builtin and then its argument prototype would still apply. */
503d2be0
AS
20020#ifdef __cplusplus
20021extern "C"
20022#endif
503d2be0
AS
20023char tparm ();
20024int
20025main ()
20026{
ca81d7a0 20027return tparm ();
503d2be0
AS
20028 ;
20029 return 0;
20030}
20031_ACEOF
20032rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20033if { (ac_try="$ac_link"
20034case "(($ac_try" in
20035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036 *) ac_try_echo=$ac_try;;
20037esac
20038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20039 (eval "$ac_link") 2>conftest.er1
503d2be0 20040 ac_status=$?
edfaf76d
LK
20041 grep -v '^ *+' conftest.er1 >conftest.err
20042 rm -f conftest.er1
20043 cat conftest.err >&5
c0d27fcc 20044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20045 (exit $ac_status); } && {
20046 test -z "$ac_c_werror_flag" ||
20047 test ! -s conftest.err
20048 } && test -s conftest$ac_exeext &&
20049 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20050 ac_cv_lib_ncurses_tparm=yes
20051else
20052 echo "$as_me: failed program was:" >&5
19650fd6
AS
20053sed 's/^/| /' conftest.$ac_ext >&5
20054
ca81d7a0 20055 ac_cv_lib_ncurses_tparm=no
503d2be0 20056fi
ca81d7a0 20057
f053c89f 20058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20059 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20060LIBS=$ac_check_lib_save_LIBS
20061fi
ca81d7a0
JD
20062{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
20063echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 20064if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 20065 cat >>confdefs.h <<_ACEOF
503d2be0 20066#define HAVE_LIBNCURSES 1
c0d27fcc 20067_ACEOF
ba4481b5
DL
20068
20069 LIBS="-lncurses $LIBS"
20070
ba4481b5
DL
20071fi
20072
c0d27fcc 20073
bc3512d0
CY
20074# Do we have res_init, for detecting changes in /etc/resolv.conf?
20075
20076resolv=no
074767f2 20077cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
20078/* confdefs.h. */
20079_ACEOF
20080cat confdefs.h >>conftest.$ac_ext
20081cat >>conftest.$ac_ext <<_ACEOF
20082/* end confdefs.h. */
074767f2
AS
20083#include <netinet/in.h>
20084#include <arpa/nameser.h>
20085#include <resolv.h>
bc3512d0
CY
20086int
20087main ()
20088{
074767f2 20089return res_init();
bc3512d0
CY
20090 ;
20091 return 0;
20092}
20093_ACEOF
20094rm -f conftest.$ac_objext conftest$ac_exeext
20095if { (ac_try="$ac_link"
20096case "(($ac_try" in
20097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20098 *) ac_try_echo=$ac_try;;
20099esac
20100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20101 (eval "$ac_link") 2>conftest.er1
20102 ac_status=$?
20103 grep -v '^ *+' conftest.er1 >conftest.err
20104 rm -f conftest.er1
20105 cat conftest.err >&5
20106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20107 (exit $ac_status); } && {
20108 test -z "$ac_c_werror_flag" ||
20109 test ! -s conftest.err
20110 } && test -s conftest$ac_exeext &&
20111 $as_test_x conftest$ac_exeext; then
074767f2 20112 have_res_init=yes
bc3512d0
CY
20113else
20114 echo "$as_me: failed program was:" >&5
20115sed 's/^/| /' conftest.$ac_ext >&5
20116
074767f2 20117 have_res_init=no
bc3512d0
CY
20118fi
20119
20120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20121 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
20122if test "$have_res_init" = no; then
20123 OLIBS="$LIBS"
20124 LIBS="$LIBS -lresolv"
20125 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
20126echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
20127 cat >conftest.$ac_ext <<_ACEOF
20128/* confdefs.h. */
20129_ACEOF
20130cat confdefs.h >>conftest.$ac_ext
20131cat >>conftest.$ac_ext <<_ACEOF
20132/* end confdefs.h. */
20133#include <netinet/in.h>
20134#include <arpa/nameser.h>
20135#include <resolv.h>
20136int
20137main ()
20138{
074767f2 20139return res_init();
bc3512d0
CY
20140 ;
20141 return 0;
20142}
20143_ACEOF
20144rm -f conftest.$ac_objext conftest$ac_exeext
20145if { (ac_try="$ac_link"
20146case "(($ac_try" in
20147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20148 *) ac_try_echo=$ac_try;;
20149esac
20150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20151 (eval "$ac_link") 2>conftest.er1
20152 ac_status=$?
20153 grep -v '^ *+' conftest.er1 >conftest.err
20154 rm -f conftest.er1
20155 cat conftest.err >&5
20156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20157 (exit $ac_status); } && {
20158 test -z "$ac_c_werror_flag" ||
20159 test ! -s conftest.err
20160 } && test -s conftest$ac_exeext &&
20161 $as_test_x conftest$ac_exeext; then
20162 have_res_init=yes
20163else
20164 echo "$as_me: failed program was:" >&5
20165sed 's/^/| /' conftest.$ac_ext >&5
20166
20167 have_res_init=no
20168fi
20169
20170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20171 conftest$ac_exeext conftest.$ac_ext
20172 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20173echo "${ECHO_T}$have_res_init" >&6; }
20174 if test "$have_res_init" = yes ; then
20175 resolv=yes
20176 fi
20177 LIBS="$OLIBS"
20178fi
20179
20180if test "$have_res_init" = yes; then
20181
20182cat >>confdefs.h <<\_ACEOF
20183#define HAVE_RES_INIT 1
20184_ACEOF
20185
20186fi
20187
84e70f78
KR
20188# Do we need the Hesiod library to provide the support routines?
20189if test "$with_hesiod" = yes ; then
20190 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
20191 { echo "$as_me:$LINENO: checking for res_send" >&5
20192echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
20193if test "${ac_cv_func_res_send+set}" = set; then
20194 echo $ECHO_N "(cached) $ECHO_C" >&6
20195else
20196 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20197/* confdefs.h. */
20198_ACEOF
20199cat confdefs.h >>conftest.$ac_ext
20200cat >>conftest.$ac_ext <<_ACEOF
20201/* end confdefs.h. */
edfaf76d
LK
20202/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20203 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20204#define res_send innocuous_res_send
20205
84e70f78 20206/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20207 which can conflict with char res_send (); below.
20208 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20209 <limits.h> exists even on freestanding compilers. */
edfaf76d 20210
19650fd6
AS
20211#ifdef __STDC__
20212# include <limits.h>
20213#else
20214# include <assert.h>
20215#endif
edfaf76d
LK
20216
20217#undef res_send
20218
ca81d7a0
JD
20219/* Override any GCC internal prototype to avoid an error.
20220 Use char because int might match the return type of a GCC
20221 builtin and then its argument prototype would still apply. */
84e70f78
KR
20222#ifdef __cplusplus
20223extern "C"
20224#endif
84e70f78 20225char res_send ();
84e70f78
KR
20226/* The GNU C library defines this for functions which it implements
20227 to always fail with ENOSYS. Some functions are actually named
20228 something starting with __ and the normal name is an alias. */
ca81d7a0 20229#if defined __stub_res_send || defined __stub___res_send
84e70f78 20230choke me
cd958eb3
MB
20231#endif
20232
19650fd6
AS
20233int
20234main ()
20235{
ca81d7a0 20236return res_send ();
84e70f78
KR
20237 ;
20238 return 0;
20239}
20240_ACEOF
20241rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20242if { (ac_try="$ac_link"
20243case "(($ac_try" in
20244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245 *) ac_try_echo=$ac_try;;
20246esac
20247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20248 (eval "$ac_link") 2>conftest.er1
84e70f78 20249 ac_status=$?
edfaf76d
LK
20250 grep -v '^ *+' conftest.er1 >conftest.err
20251 rm -f conftest.er1
20252 cat conftest.err >&5
c0d27fcc 20253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20254 (exit $ac_status); } && {
20255 test -z "$ac_c_werror_flag" ||
20256 test ! -s conftest.err
20257 } && test -s conftest$ac_exeext &&
20258 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20259 ac_cv_func_res_send=yes
20260else
20261 echo "$as_me: failed program was:" >&5
19650fd6
AS
20262sed 's/^/| /' conftest.$ac_ext >&5
20263
ca81d7a0 20264 ac_cv_func_res_send=no
84e70f78 20265fi
ca81d7a0 20266
f053c89f 20267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20268 conftest$ac_exeext conftest.$ac_ext
84e70f78 20269fi
ca81d7a0
JD
20270{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20271echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20272if test $ac_cv_func_res_send = yes; then
20273 :
20274else
ca81d7a0
JD
20275 { echo "$as_me:$LINENO: checking for __res_send" >&5
20276echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20277if test "${ac_cv_func___res_send+set}" = set; then
20278 echo $ECHO_N "(cached) $ECHO_C" >&6
20279else
20280 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20281/* confdefs.h. */
20282_ACEOF
20283cat confdefs.h >>conftest.$ac_ext
20284cat >>conftest.$ac_ext <<_ACEOF
20285/* end confdefs.h. */
edfaf76d
LK
20286/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20288#define __res_send innocuous___res_send
20289
84e70f78 20290/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20291 which can conflict with char __res_send (); below.
20292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20293 <limits.h> exists even on freestanding compilers. */
edfaf76d 20294
19650fd6
AS
20295#ifdef __STDC__
20296# include <limits.h>
20297#else
20298# include <assert.h>
20299#endif
edfaf76d
LK
20300
20301#undef __res_send
20302
ca81d7a0
JD
20303/* Override any GCC internal prototype to avoid an error.
20304 Use char because int might match the return type of a GCC
20305 builtin and then its argument prototype would still apply. */
84e70f78
KR
20306#ifdef __cplusplus
20307extern "C"
20308#endif
84e70f78 20309char __res_send ();
84e70f78
KR
20310/* The GNU C library defines this for functions which it implements
20311 to always fail with ENOSYS. Some functions are actually named
20312 something starting with __ and the normal name is an alias. */
ca81d7a0 20313#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20314choke me
84e70f78
KR
20315#endif
20316
19650fd6
AS
20317int
20318main ()
20319{
ca81d7a0 20320return __res_send ();
84e70f78
KR
20321 ;
20322 return 0;
20323}
20324_ACEOF
20325rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20326if { (ac_try="$ac_link"
20327case "(($ac_try" in
20328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20329 *) ac_try_echo=$ac_try;;
20330esac
20331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20332 (eval "$ac_link") 2>conftest.er1
84e70f78 20333 ac_status=$?
edfaf76d
LK
20334 grep -v '^ *+' conftest.er1 >conftest.err
20335 rm -f conftest.er1
20336 cat conftest.err >&5
c0d27fcc 20337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20338 (exit $ac_status); } && {
20339 test -z "$ac_c_werror_flag" ||
20340 test ! -s conftest.err
20341 } && test -s conftest$ac_exeext &&
20342 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20343 ac_cv_func___res_send=yes
20344else
20345 echo "$as_me: failed program was:" >&5
19650fd6
AS
20346sed 's/^/| /' conftest.$ac_ext >&5
20347
ca81d7a0 20348 ac_cv_func___res_send=no
84e70f78 20349fi
ca81d7a0 20350
f053c89f 20351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20352 conftest$ac_exeext conftest.$ac_ext
84e70f78 20353fi
ca81d7a0
JD
20354{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20355echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20356if test $ac_cv_func___res_send = yes; then
20357 :
20358else
ca81d7a0
JD
20359 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20360echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20361if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20362 echo $ECHO_N "(cached) $ECHO_C" >&6
20363else
20364 ac_check_lib_save_LIBS=$LIBS
20365LIBS="-lresolv $LIBS"
20366cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20367/* confdefs.h. */
20368_ACEOF
20369cat confdefs.h >>conftest.$ac_ext
20370cat >>conftest.$ac_ext <<_ACEOF
20371/* end confdefs.h. */
84e70f78 20372
ca81d7a0
JD
20373/* Override any GCC internal prototype to avoid an error.
20374 Use char because int might match the return type of a GCC
20375 builtin and then its argument prototype would still apply. */
84e70f78
KR
20376#ifdef __cplusplus
20377extern "C"
20378#endif
84e70f78
KR
20379char res_send ();
20380int
20381main ()
20382{
ca81d7a0 20383return res_send ();
84e70f78
KR
20384 ;
20385 return 0;
20386}
20387_ACEOF
20388rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20389if { (ac_try="$ac_link"
20390case "(($ac_try" in
20391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20392 *) ac_try_echo=$ac_try;;
20393esac
20394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20395 (eval "$ac_link") 2>conftest.er1
84e70f78 20396 ac_status=$?
edfaf76d
LK
20397 grep -v '^ *+' conftest.er1 >conftest.err
20398 rm -f conftest.er1
20399 cat conftest.err >&5
c0d27fcc 20400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20401 (exit $ac_status); } && {
20402 test -z "$ac_c_werror_flag" ||
20403 test ! -s conftest.err
20404 } && test -s conftest$ac_exeext &&
20405 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20406 ac_cv_lib_resolv_res_send=yes
20407else
20408 echo "$as_me: failed program was:" >&5
19650fd6
AS
20409sed 's/^/| /' conftest.$ac_ext >&5
20410
ca81d7a0 20411 ac_cv_lib_resolv_res_send=no
84e70f78 20412fi
ca81d7a0 20413
f053c89f 20414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20415 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20416LIBS=$ac_check_lib_save_LIBS
20417fi
ca81d7a0
JD
20418{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20419echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20420if test $ac_cv_lib_resolv_res_send = yes; then
20421 resolv=yes
20422else
ca81d7a0
JD
20423 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20424echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20425if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20426 echo $ECHO_N "(cached) $ECHO_C" >&6
20427else
20428 ac_check_lib_save_LIBS=$LIBS
20429LIBS="-lresolv $LIBS"
20430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20431/* confdefs.h. */
20432_ACEOF
20433cat confdefs.h >>conftest.$ac_ext
20434cat >>conftest.$ac_ext <<_ACEOF
20435/* end confdefs.h. */
84e70f78 20436
ca81d7a0
JD
20437/* Override any GCC internal prototype to avoid an error.
20438 Use char because int might match the return type of a GCC
20439 builtin and then its argument prototype would still apply. */
84e70f78
KR
20440#ifdef __cplusplus
20441extern "C"
20442#endif
84e70f78
KR
20443char __res_send ();
20444int
20445main ()
20446{
ca81d7a0 20447return __res_send ();
84e70f78
KR
20448 ;
20449 return 0;
20450}
20451_ACEOF
20452rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20453if { (ac_try="$ac_link"
20454case "(($ac_try" in
20455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20456 *) ac_try_echo=$ac_try;;
20457esac
20458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20459 (eval "$ac_link") 2>conftest.er1
84e70f78 20460 ac_status=$?
edfaf76d
LK
20461 grep -v '^ *+' conftest.er1 >conftest.err
20462 rm -f conftest.er1
20463 cat conftest.err >&5
c0d27fcc 20464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20465 (exit $ac_status); } && {
20466 test -z "$ac_c_werror_flag" ||
20467 test ! -s conftest.err
20468 } && test -s conftest$ac_exeext &&
20469 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20470 ac_cv_lib_resolv___res_send=yes
20471else
20472 echo "$as_me: failed program was:" >&5
19650fd6
AS
20473sed 's/^/| /' conftest.$ac_ext >&5
20474
ca81d7a0 20475 ac_cv_lib_resolv___res_send=no
84e70f78 20476fi
ca81d7a0 20477
f053c89f 20478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20479 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20480LIBS=$ac_check_lib_save_LIBS
20481fi
ca81d7a0
JD
20482{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20483echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20484if test $ac_cv_lib_resolv___res_send = yes; then
20485 resolv=yes
20486fi
20487
20488fi
20489
20490fi
20491
20492fi
20493
20494 if test "$resolv" = yes ; then
20495 RESOLVLIB=-lresolv
84e70f78
KR
20496 else
20497 RESOLVLIB=
20498 fi
ca81d7a0
JD
20499 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20500echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20501if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20502 echo $ECHO_N "(cached) $ECHO_C" >&6
20503else
20504 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20505/* confdefs.h. */
20506_ACEOF
20507cat confdefs.h >>conftest.$ac_ext
20508cat >>conftest.$ac_ext <<_ACEOF
20509/* end confdefs.h. */
edfaf76d
LK
20510/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20511 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20512#define hes_getmailhost innocuous_hes_getmailhost
20513
84e70f78 20514/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20515 which can conflict with char hes_getmailhost (); below.
20516 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20517 <limits.h> exists even on freestanding compilers. */
edfaf76d 20518
19650fd6
AS
20519#ifdef __STDC__
20520# include <limits.h>
20521#else
20522# include <assert.h>
20523#endif
edfaf76d
LK
20524
20525#undef hes_getmailhost
20526
ca81d7a0
JD
20527/* Override any GCC internal prototype to avoid an error.
20528 Use char because int might match the return type of a GCC
20529 builtin and then its argument prototype would still apply. */
84e70f78
KR
20530#ifdef __cplusplus
20531extern "C"
20532#endif
84e70f78 20533char hes_getmailhost ();
84e70f78
KR
20534/* The GNU C library defines this for functions which it implements
20535 to always fail with ENOSYS. Some functions are actually named
20536 something starting with __ and the normal name is an alias. */
ca81d7a0 20537#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20538choke me
cd958eb3
MB
20539#endif
20540
19650fd6
AS
20541int
20542main ()
20543{
ca81d7a0 20544return hes_getmailhost ();
84e70f78
KR
20545 ;
20546 return 0;
20547}
20548_ACEOF
20549rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20550if { (ac_try="$ac_link"
20551case "(($ac_try" in
20552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20553 *) ac_try_echo=$ac_try;;
20554esac
20555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20556 (eval "$ac_link") 2>conftest.er1
84e70f78 20557 ac_status=$?
edfaf76d
LK
20558 grep -v '^ *+' conftest.er1 >conftest.err
20559 rm -f conftest.er1
20560 cat conftest.err >&5
c0d27fcc 20561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20562 (exit $ac_status); } && {
20563 test -z "$ac_c_werror_flag" ||
20564 test ! -s conftest.err
20565 } && test -s conftest$ac_exeext &&
20566 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20567 ac_cv_func_hes_getmailhost=yes
20568else
20569 echo "$as_me: failed program was:" >&5
19650fd6
AS
20570sed 's/^/| /' conftest.$ac_ext >&5
20571
ca81d7a0 20572 ac_cv_func_hes_getmailhost=no
84e70f78 20573fi
ca81d7a0 20574
f053c89f 20575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20576 conftest$ac_exeext conftest.$ac_ext
84e70f78 20577fi
ca81d7a0
JD
20578{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20579echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20580if test $ac_cv_func_hes_getmailhost = yes; then
20581 :
20582else
ca81d7a0
JD
20583 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20584echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20585if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20586 echo $ECHO_N "(cached) $ECHO_C" >&6
20587else
20588 ac_check_lib_save_LIBS=$LIBS
20589LIBS="-lhesiod $RESOLVLIB $LIBS"
20590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20591/* confdefs.h. */
20592_ACEOF
20593cat confdefs.h >>conftest.$ac_ext
20594cat >>conftest.$ac_ext <<_ACEOF
20595/* end confdefs.h. */
84e70f78 20596
ca81d7a0
JD
20597/* Override any GCC internal prototype to avoid an error.
20598 Use char because int might match the return type of a GCC
20599 builtin and then its argument prototype would still apply. */
84e70f78
KR
20600#ifdef __cplusplus
20601extern "C"
20602#endif
84e70f78
KR
20603char hes_getmailhost ();
20604int
20605main ()
20606{
ca81d7a0 20607return hes_getmailhost ();
84e70f78
KR
20608 ;
20609 return 0;
20610}
20611_ACEOF
20612rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20613if { (ac_try="$ac_link"
20614case "(($ac_try" in
20615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20616 *) ac_try_echo=$ac_try;;
20617esac
20618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20619 (eval "$ac_link") 2>conftest.er1
84e70f78 20620 ac_status=$?
edfaf76d
LK
20621 grep -v '^ *+' conftest.er1 >conftest.err
20622 rm -f conftest.er1
20623 cat conftest.err >&5
c0d27fcc 20624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20625 (exit $ac_status); } && {
20626 test -z "$ac_c_werror_flag" ||
20627 test ! -s conftest.err
20628 } && test -s conftest$ac_exeext &&
20629 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20630 ac_cv_lib_hesiod_hes_getmailhost=yes
20631else
20632 echo "$as_me: failed program was:" >&5
19650fd6
AS
20633sed 's/^/| /' conftest.$ac_ext >&5
20634
ca81d7a0 20635 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20636fi
ca81d7a0 20637
f053c89f 20638rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20639 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20640LIBS=$ac_check_lib_save_LIBS
20641fi
ca81d7a0
JD
20642{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20643echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20644if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20645
c0d27fcc 20646cat >>confdefs.h <<\_ACEOF
84e70f78 20647#define HAVE_LIBHESIOD 1
c0d27fcc 20648_ACEOF
84e70f78
KR
20649
20650else
20651 :
20652fi
20653
20654fi
20655
20656fi
20657
bc3512d0
CY
20658# Do we need libresolv (due to res_init or Hesiod)?
20659if test "$resolv" = yes ; then
20660
20661cat >>confdefs.h <<\_ACEOF
20662#define HAVE_LIBRESOLV 1
20663_ACEOF
20664
20665fi
20666
a21616bd
KR
20667# These tell us which Kerberos-related libraries to use.
20668if test "${with_kerberos+set}" = set; then
503d2be0 20669
ca81d7a0
JD
20670{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20671echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20672if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20673 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20674else
503d2be0 20675 ac_check_lib_save_LIBS=$LIBS
a21616bd 20676LIBS="-lcom_err $LIBS"
503d2be0 20677cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20678/* confdefs.h. */
20679_ACEOF
20680cat confdefs.h >>conftest.$ac_ext
20681cat >>conftest.$ac_ext <<_ACEOF
20682/* end confdefs.h. */
503d2be0 20683
ca81d7a0
JD
20684/* Override any GCC internal prototype to avoid an error.
20685 Use char because int might match the return type of a GCC
20686 builtin and then its argument prototype would still apply. */
503d2be0
AS
20687#ifdef __cplusplus
20688extern "C"
20689#endif
503d2be0
AS
20690char com_err ();
20691int
20692main ()
20693{
ca81d7a0 20694return com_err ();
503d2be0
AS
20695 ;
20696 return 0;
20697}
20698_ACEOF
20699rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20700if { (ac_try="$ac_link"
20701case "(($ac_try" in
20702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703 *) ac_try_echo=$ac_try;;
20704esac
20705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20706 (eval "$ac_link") 2>conftest.er1
503d2be0 20707 ac_status=$?
edfaf76d
LK
20708 grep -v '^ *+' conftest.er1 >conftest.err
20709 rm -f conftest.er1
20710 cat conftest.err >&5
c0d27fcc 20711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20712 (exit $ac_status); } && {
20713 test -z "$ac_c_werror_flag" ||
20714 test ! -s conftest.err
20715 } && test -s conftest$ac_exeext &&
20716 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20717 ac_cv_lib_com_err_com_err=yes
20718else
20719 echo "$as_me: failed program was:" >&5
19650fd6
AS
20720sed 's/^/| /' conftest.$ac_ext >&5
20721
ca81d7a0 20722 ac_cv_lib_com_err_com_err=no
503d2be0 20723fi
ca81d7a0 20724
f053c89f 20725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20726 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20727LIBS=$ac_check_lib_save_LIBS
20728fi
ca81d7a0
JD
20729{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20730echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20731if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20732 cat >>confdefs.h <<_ACEOF
503d2be0 20733#define HAVE_LIBCOM_ERR 1
c0d27fcc 20734_ACEOF
a21616bd
KR
20735
20736 LIBS="-lcom_err $LIBS"
20737
a21616bd
KR
20738fi
20739
c0d27fcc 20740
ca81d7a0
JD
20741{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20742echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20743if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20744 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20745else
503d2be0 20746 ac_check_lib_save_LIBS=$LIBS
a21616bd 20747LIBS="-lk5crypto $LIBS"
503d2be0 20748cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20749/* confdefs.h. */
20750_ACEOF
20751cat confdefs.h >>conftest.$ac_ext
20752cat >>conftest.$ac_ext <<_ACEOF
20753/* end confdefs.h. */
503d2be0 20754
ca81d7a0
JD
20755/* Override any GCC internal prototype to avoid an error.
20756 Use char because int might match the return type of a GCC
20757 builtin and then its argument prototype would still apply. */
503d2be0
AS
20758#ifdef __cplusplus
20759extern "C"
20760#endif
503d2be0
AS
20761char mit_des_cbc_encrypt ();
20762int
20763main ()
20764{
ca81d7a0 20765return mit_des_cbc_encrypt ();
503d2be0
AS
20766 ;
20767 return 0;
20768}
20769_ACEOF
20770rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20771if { (ac_try="$ac_link"
20772case "(($ac_try" in
20773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20774 *) ac_try_echo=$ac_try;;
20775esac
20776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20777 (eval "$ac_link") 2>conftest.er1
503d2be0 20778 ac_status=$?
edfaf76d
LK
20779 grep -v '^ *+' conftest.er1 >conftest.err
20780 rm -f conftest.er1
20781 cat conftest.err >&5
c0d27fcc 20782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20783 (exit $ac_status); } && {
20784 test -z "$ac_c_werror_flag" ||
20785 test ! -s conftest.err
20786 } && test -s conftest$ac_exeext &&
20787 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20788 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20789else
20790 echo "$as_me: failed program was:" >&5
19650fd6
AS
20791sed 's/^/| /' conftest.$ac_ext >&5
20792
ca81d7a0 20793 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20794fi
ca81d7a0 20795
f053c89f 20796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20797 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20798LIBS=$ac_check_lib_save_LIBS
20799fi
ca81d7a0
JD
20800{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20801echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20802if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20803 cat >>confdefs.h <<_ACEOF
503d2be0 20804#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20805_ACEOF
a21616bd
KR
20806
20807 LIBS="-lk5crypto $LIBS"
20808
a21616bd
KR
20809fi
20810
c0d27fcc 20811
ca81d7a0
JD
20812{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20813echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20814if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20815 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20816else
503d2be0 20817 ac_check_lib_save_LIBS=$LIBS
a21616bd 20818LIBS="-lcrypto $LIBS"
503d2be0 20819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20820/* confdefs.h. */
20821_ACEOF
20822cat confdefs.h >>conftest.$ac_ext
20823cat >>conftest.$ac_ext <<_ACEOF
20824/* end confdefs.h. */
503d2be0 20825
ca81d7a0
JD
20826/* Override any GCC internal prototype to avoid an error.
20827 Use char because int might match the return type of a GCC
20828 builtin and then its argument prototype would still apply. */
503d2be0
AS
20829#ifdef __cplusplus
20830extern "C"
20831#endif
503d2be0
AS
20832char mit_des_cbc_encrypt ();
20833int
20834main ()
20835{
ca81d7a0 20836return mit_des_cbc_encrypt ();
503d2be0
AS
20837 ;
20838 return 0;
20839}
20840_ACEOF
20841rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20842if { (ac_try="$ac_link"
20843case "(($ac_try" in
20844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20845 *) ac_try_echo=$ac_try;;
20846esac
20847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20848 (eval "$ac_link") 2>conftest.er1
503d2be0 20849 ac_status=$?
edfaf76d
LK
20850 grep -v '^ *+' conftest.er1 >conftest.err
20851 rm -f conftest.er1
20852 cat conftest.err >&5
c0d27fcc 20853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20854 (exit $ac_status); } && {
20855 test -z "$ac_c_werror_flag" ||
20856 test ! -s conftest.err
20857 } && test -s conftest$ac_exeext &&
20858 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20859 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20860else
20861 echo "$as_me: failed program was:" >&5
19650fd6
AS
20862sed 's/^/| /' conftest.$ac_ext >&5
20863
ca81d7a0 20864 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20865fi
ca81d7a0 20866
f053c89f 20867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20868 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20869LIBS=$ac_check_lib_save_LIBS
20870fi
ca81d7a0
JD
20871{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20872echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20873if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20874 cat >>confdefs.h <<_ACEOF
503d2be0 20875#define HAVE_LIBCRYPTO 1
c0d27fcc 20876_ACEOF
a21616bd
KR
20877
20878 LIBS="-lcrypto $LIBS"
20879
a21616bd
KR
20880fi
20881
c0d27fcc 20882
ca81d7a0
JD
20883{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20884echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20885if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20886 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20887else
503d2be0 20888 ac_check_lib_save_LIBS=$LIBS
a21616bd 20889LIBS="-lkrb5 $LIBS"
503d2be0 20890cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20891/* confdefs.h. */
20892_ACEOF
20893cat confdefs.h >>conftest.$ac_ext
20894cat >>conftest.$ac_ext <<_ACEOF
20895/* end confdefs.h. */
a21616bd 20896
ca81d7a0
JD
20897/* Override any GCC internal prototype to avoid an error.
20898 Use char because int might match the return type of a GCC
20899 builtin and then its argument prototype would still apply. */
503d2be0
AS
20900#ifdef __cplusplus
20901extern "C"
20902#endif
503d2be0
AS
20903char krb5_init_context ();
20904int
20905main ()
20906{
ca81d7a0 20907return krb5_init_context ();
503d2be0
AS
20908 ;
20909 return 0;
20910}
20911_ACEOF
20912rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20913if { (ac_try="$ac_link"
20914case "(($ac_try" in
20915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20916 *) ac_try_echo=$ac_try;;
20917esac
20918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20919 (eval "$ac_link") 2>conftest.er1
503d2be0 20920 ac_status=$?
edfaf76d
LK
20921 grep -v '^ *+' conftest.er1 >conftest.err
20922 rm -f conftest.er1
20923 cat conftest.err >&5
c0d27fcc 20924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20925 (exit $ac_status); } && {
20926 test -z "$ac_c_werror_flag" ||
20927 test ! -s conftest.err
20928 } && test -s conftest$ac_exeext &&
20929 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20930 ac_cv_lib_krb5_krb5_init_context=yes
20931else
20932 echo "$as_me: failed program was:" >&5
19650fd6
AS
20933sed 's/^/| /' conftest.$ac_ext >&5
20934
ca81d7a0 20935 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20936fi
ca81d7a0 20937
f053c89f 20938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20939 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20940LIBS=$ac_check_lib_save_LIBS
20941fi
ca81d7a0
JD
20942{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20943echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20944if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20945 cat >>confdefs.h <<_ACEOF
503d2be0 20946#define HAVE_LIBKRB5 1
c0d27fcc 20947_ACEOF
a21616bd
KR
20948
20949 LIBS="-lkrb5 $LIBS"
20950
a21616bd
KR
20951fi
20952
20953 if test "${with_kerberos5+set}" != set; then
503d2be0 20954
ca81d7a0
JD
20955{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20956echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20957if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20958 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20959else
503d2be0 20960 ac_check_lib_save_LIBS=$LIBS
a21616bd 20961LIBS="-ldes425 $LIBS"
503d2be0 20962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20963/* confdefs.h. */
20964_ACEOF
20965cat confdefs.h >>conftest.$ac_ext
20966cat >>conftest.$ac_ext <<_ACEOF
20967/* end confdefs.h. */
503d2be0 20968
ca81d7a0
JD
20969/* Override any GCC internal prototype to avoid an error.
20970 Use char because int might match the return type of a GCC
20971 builtin and then its argument prototype would still apply. */
503d2be0
AS
20972#ifdef __cplusplus
20973extern "C"
20974#endif
503d2be0
AS
20975char des_cbc_encrypt ();
20976int
20977main ()
20978{
ca81d7a0 20979return des_cbc_encrypt ();
503d2be0
AS
20980 ;
20981 return 0;
20982}
20983_ACEOF
20984rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20985if { (ac_try="$ac_link"
20986case "(($ac_try" in
20987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20988 *) ac_try_echo=$ac_try;;
20989esac
20990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20991 (eval "$ac_link") 2>conftest.er1
503d2be0 20992 ac_status=$?
edfaf76d
LK
20993 grep -v '^ *+' conftest.er1 >conftest.err
20994 rm -f conftest.er1
20995 cat conftest.err >&5
c0d27fcc 20996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20997 (exit $ac_status); } && {
20998 test -z "$ac_c_werror_flag" ||
20999 test ! -s conftest.err
21000 } && test -s conftest$ac_exeext &&
21001 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21002 ac_cv_lib_des425_des_cbc_encrypt=yes
21003else
21004 echo "$as_me: failed program was:" >&5
19650fd6
AS
21005sed 's/^/| /' conftest.$ac_ext >&5
21006
ca81d7a0 21007 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 21008fi
ca81d7a0 21009
f053c89f 21010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21011 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21012LIBS=$ac_check_lib_save_LIBS
21013fi
ca81d7a0
JD
21014{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
21015echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 21016if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 21017 cat >>confdefs.h <<_ACEOF
503d2be0 21018#define HAVE_LIBDES425 1
c0d27fcc 21019_ACEOF
a21616bd
KR
21020
21021 LIBS="-ldes425 $LIBS"
21022
21023else
503d2be0 21024
ca81d7a0
JD
21025{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
21026echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
21027if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
21028 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21029else
503d2be0 21030 ac_check_lib_save_LIBS=$LIBS
a21616bd 21031LIBS="-ldes $LIBS"
503d2be0 21032cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21033/* confdefs.h. */
21034_ACEOF
21035cat confdefs.h >>conftest.$ac_ext
21036cat >>conftest.$ac_ext <<_ACEOF
21037/* end confdefs.h. */
503d2be0 21038
ca81d7a0
JD
21039/* Override any GCC internal prototype to avoid an error.
21040 Use char because int might match the return type of a GCC
21041 builtin and then its argument prototype would still apply. */
503d2be0
AS
21042#ifdef __cplusplus
21043extern "C"
21044#endif
503d2be0
AS
21045char des_cbc_encrypt ();
21046int
21047main ()
21048{
ca81d7a0 21049return des_cbc_encrypt ();
503d2be0
AS
21050 ;
21051 return 0;
21052}
21053_ACEOF
21054rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21055if { (ac_try="$ac_link"
21056case "(($ac_try" in
21057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21058 *) ac_try_echo=$ac_try;;
21059esac
21060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21061 (eval "$ac_link") 2>conftest.er1
503d2be0 21062 ac_status=$?
edfaf76d
LK
21063 grep -v '^ *+' conftest.er1 >conftest.err
21064 rm -f conftest.er1
21065 cat conftest.err >&5
c0d27fcc 21066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21067 (exit $ac_status); } && {
21068 test -z "$ac_c_werror_flag" ||
21069 test ! -s conftest.err
21070 } && test -s conftest$ac_exeext &&
21071 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21072 ac_cv_lib_des_des_cbc_encrypt=yes
21073else
21074 echo "$as_me: failed program was:" >&5
19650fd6
AS
21075sed 's/^/| /' conftest.$ac_ext >&5
21076
ca81d7a0 21077 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 21078fi
ca81d7a0 21079
f053c89f 21080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21081 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21082LIBS=$ac_check_lib_save_LIBS
21083fi
ca81d7a0
JD
21084{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
21085echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 21086if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 21087 cat >>confdefs.h <<_ACEOF
503d2be0 21088#define HAVE_LIBDES 1
c0d27fcc 21089_ACEOF
a21616bd
KR
21090
21091 LIBS="-ldes $LIBS"
21092
a21616bd
KR
21093fi
21094
21095fi
21096
c0d27fcc 21097
ca81d7a0
JD
21098{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
21099echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
21100if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
21101 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21102else
503d2be0 21103 ac_check_lib_save_LIBS=$LIBS
a21616bd 21104LIBS="-lkrb4 $LIBS"
503d2be0 21105cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21106/* confdefs.h. */
21107_ACEOF
21108cat confdefs.h >>conftest.$ac_ext
21109cat >>conftest.$ac_ext <<_ACEOF
21110/* end confdefs.h. */
503d2be0 21111
ca81d7a0
JD
21112/* Override any GCC internal prototype to avoid an error.
21113 Use char because int might match the return type of a GCC
21114 builtin and then its argument prototype would still apply. */
503d2be0
AS
21115#ifdef __cplusplus
21116extern "C"
21117#endif
503d2be0
AS
21118char krb_get_cred ();
21119int
21120main ()
21121{
f053c89f 21122return krb_get_cred ();
503d2be0
AS
21123 ;
21124 return 0;
21125}
21126_ACEOF
21127rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
21128if { (ac_try="$ac_link"
21129case "(($ac_try" in
ca81d7a0
JD
21130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21131 *) ac_try_echo=$ac_try;;
21132esac
21133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21134 (eval "$ac_link") 2>conftest.er1
503d2be0 21135 ac_status=$?
edfaf76d
LK
21136 grep -v '^ *+' conftest.er1 >conftest.err
21137 rm -f conftest.er1
21138 cat conftest.err >&5
c0d27fcc 21139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21140 (exit $ac_status); } && {
21141 test -z "$ac_c_werror_flag" ||
21142 test ! -s conftest.err
21143 } && test -s conftest$ac_exeext &&
21144 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21145 ac_cv_lib_krb4_krb_get_cred=yes
21146else
21147 echo "$as_me: failed program was:" >&5
19650fd6
AS
21148sed 's/^/| /' conftest.$ac_ext >&5
21149
ca81d7a0 21150 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21151fi
ca81d7a0 21152
f053c89f 21153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21154 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21155LIBS=$ac_check_lib_save_LIBS
21156fi
ca81d7a0
JD
21157{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21158echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 21159if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21160 cat >>confdefs.h <<_ACEOF
503d2be0 21161#define HAVE_LIBKRB4 1
c0d27fcc 21162_ACEOF
a21616bd
KR
21163
21164 LIBS="-lkrb4 $LIBS"
21165
21166else
503d2be0 21167
ca81d7a0
JD
21168{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21169echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
21170if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
21171 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21172else
503d2be0 21173 ac_check_lib_save_LIBS=$LIBS
a21616bd 21174LIBS="-lkrb $LIBS"
503d2be0 21175cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21176/* confdefs.h. */
21177_ACEOF
21178cat confdefs.h >>conftest.$ac_ext
21179cat >>conftest.$ac_ext <<_ACEOF
21180/* end confdefs.h. */
503d2be0 21181
ca81d7a0
JD
21182/* Override any GCC internal prototype to avoid an error.
21183 Use char because int might match the return type of a GCC
21184 builtin and then its argument prototype would still apply. */
503d2be0
AS
21185#ifdef __cplusplus
21186extern "C"
21187#endif
503d2be0
AS
21188char krb_get_cred ();
21189int
21190main ()
21191{
ca81d7a0 21192return krb_get_cred ();
503d2be0
AS
21193 ;
21194 return 0;
21195}
21196_ACEOF
21197rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21198if { (ac_try="$ac_link"
21199case "(($ac_try" in
21200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21201 *) ac_try_echo=$ac_try;;
21202esac
21203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21204 (eval "$ac_link") 2>conftest.er1
503d2be0 21205 ac_status=$?
edfaf76d
LK
21206 grep -v '^ *+' conftest.er1 >conftest.err
21207 rm -f conftest.er1
21208 cat conftest.err >&5
c0d27fcc 21209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21210 (exit $ac_status); } && {
21211 test -z "$ac_c_werror_flag" ||
21212 test ! -s conftest.err
21213 } && test -s conftest$ac_exeext &&
21214 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21215 ac_cv_lib_krb_krb_get_cred=yes
21216else
21217 echo "$as_me: failed program was:" >&5
19650fd6
AS
21218sed 's/^/| /' conftest.$ac_ext >&5
21219
ca81d7a0 21220 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21221fi
ca81d7a0 21222
f053c89f 21223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21224 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21225LIBS=$ac_check_lib_save_LIBS
21226fi
ca81d7a0
JD
21227{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21228echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21229if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21230 cat >>confdefs.h <<_ACEOF
503d2be0 21231#define HAVE_LIBKRB 1
c0d27fcc 21232_ACEOF
a21616bd
KR
21233
21234 LIBS="-lkrb $LIBS"
21235
a21616bd
KR
21236fi
21237
21238fi
21239
21240 fi
21241
21242 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
21243
21244for ac_header in krb5.h
a21616bd 21245do
503d2be0 21246as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21247if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21248 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21249echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21251 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21252fi
ca81d7a0
JD
21253ac_res=`eval echo '${'$as_ac_Header'}'`
21254 { echo "$as_me:$LINENO: result: $ac_res" >&5
21255echo "${ECHO_T}$ac_res" >&6; }
98418dba 21256else
c0d27fcc 21257 # Is the header compilable?
ca81d7a0
JD
21258{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21259echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21260cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21261/* confdefs.h. */
21262_ACEOF
21263cat confdefs.h >>conftest.$ac_ext
21264cat >>conftest.$ac_ext <<_ACEOF
21265/* end confdefs.h. */
c0d27fcc
MR
21266$ac_includes_default
21267#include <$ac_header>
21268_ACEOF
21269rm -f conftest.$ac_objext
ca81d7a0
JD
21270if { (ac_try="$ac_compile"
21271case "(($ac_try" in
21272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21273 *) ac_try_echo=$ac_try;;
21274esac
21275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21276 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21277 ac_status=$?
edfaf76d
LK
21278 grep -v '^ *+' conftest.er1 >conftest.err
21279 rm -f conftest.er1
21280 cat conftest.err >&5
c0d27fcc 21281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21282 (exit $ac_status); } && {
21283 test -z "$ac_c_werror_flag" ||
21284 test ! -s conftest.err
21285 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21286 ac_header_compiler=yes
21287else
21288 echo "$as_me: failed program was:" >&5
19650fd6
AS
21289sed 's/^/| /' conftest.$ac_ext >&5
21290
ca81d7a0 21291 ac_header_compiler=no
c0d27fcc 21292fi
ca81d7a0
JD
21293
21294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21295{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21296echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21297
21298# Is the header present?
ca81d7a0
JD
21299{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21300echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21301cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21302/* confdefs.h. */
21303_ACEOF
21304cat confdefs.h >>conftest.$ac_ext
21305cat >>conftest.$ac_ext <<_ACEOF
21306/* end confdefs.h. */
503d2be0
AS
21307#include <$ac_header>
21308_ACEOF
ca81d7a0
JD
21309if { (ac_try="$ac_cpp conftest.$ac_ext"
21310case "(($ac_try" in
21311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21312 *) ac_try_echo=$ac_try;;
21313esac
21314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21315 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21316 ac_status=$?
6bae0ccf 21317 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21318 rm -f conftest.er1
21319 cat conftest.err >&5
c0d27fcc 21320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21321 (exit $ac_status); } >/dev/null && {
21322 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21323 test ! -s conftest.err
21324 }; then
c0d27fcc 21325 ac_header_preproc=yes
503d2be0
AS
21326else
21327 echo "$as_me: failed program was:" >&5
19650fd6
AS
21328sed 's/^/| /' conftest.$ac_ext >&5
21329
c0d27fcc 21330 ac_header_preproc=no
a21616bd 21331fi
ca81d7a0 21332
503d2be0 21333rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21334{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21335echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21336
21337# So? What about this header?
edfaf76d
LK
21338case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21339 yes:no: )
c0d27fcc
MR
21340 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21341echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21342 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21343echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21344 ac_header_preproc=yes
19650fd6 21345 ;;
edfaf76d 21346 no:yes:* )
c0d27fcc
MR
21347 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21348echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21349 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21350echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21351 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21352echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21353 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21354echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21355 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21356echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21357 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21358echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21359
19650fd6 21360 ;;
c0d27fcc 21361esac
ca81d7a0
JD
21362{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21363echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21364if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21365 echo $ECHO_N "(cached) $ECHO_C" >&6
21366else
edfaf76d 21367 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21368fi
ca81d7a0
JD
21369ac_res=`eval echo '${'$as_ac_Header'}'`
21370 { echo "$as_me:$LINENO: result: $ac_res" >&5
21371echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21372
21373fi
503d2be0 21374if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21375 cat >>confdefs.h <<_ACEOF
503d2be0 21376#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21377_ACEOF
503d2be0 21378
a21616bd 21379fi
c0d27fcc 21380
a21616bd
KR
21381done
21382
21383 else
503d2be0
AS
21384
21385for ac_header in des.h
a21616bd 21386do
503d2be0 21387as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21388if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21389 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21390echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21392 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21393fi
ca81d7a0
JD
21394ac_res=`eval echo '${'$as_ac_Header'}'`
21395 { echo "$as_me:$LINENO: result: $ac_res" >&5
21396echo "${ECHO_T}$ac_res" >&6; }
98418dba 21397else
c0d27fcc 21398 # Is the header compilable?
ca81d7a0
JD
21399{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21400echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21401cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21402/* confdefs.h. */
21403_ACEOF
21404cat confdefs.h >>conftest.$ac_ext
21405cat >>conftest.$ac_ext <<_ACEOF
21406/* end confdefs.h. */
c0d27fcc
MR
21407$ac_includes_default
21408#include <$ac_header>
21409_ACEOF
21410rm -f conftest.$ac_objext
ca81d7a0
JD
21411if { (ac_try="$ac_compile"
21412case "(($ac_try" in
21413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21414 *) ac_try_echo=$ac_try;;
21415esac
21416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21417 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21418 ac_status=$?
edfaf76d
LK
21419 grep -v '^ *+' conftest.er1 >conftest.err
21420 rm -f conftest.er1
21421 cat conftest.err >&5
c0d27fcc 21422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21423 (exit $ac_status); } && {
21424 test -z "$ac_c_werror_flag" ||
21425 test ! -s conftest.err
21426 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21427 ac_header_compiler=yes
21428else
21429 echo "$as_me: failed program was:" >&5
19650fd6
AS
21430sed 's/^/| /' conftest.$ac_ext >&5
21431
ca81d7a0 21432 ac_header_compiler=no
c0d27fcc 21433fi
ca81d7a0
JD
21434
21435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21436{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21437echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21438
21439# Is the header present?
ca81d7a0
JD
21440{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21441echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21442cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21443/* confdefs.h. */
21444_ACEOF
21445cat confdefs.h >>conftest.$ac_ext
21446cat >>conftest.$ac_ext <<_ACEOF
21447/* end confdefs.h. */
503d2be0
AS
21448#include <$ac_header>
21449_ACEOF
ca81d7a0
JD
21450if { (ac_try="$ac_cpp conftest.$ac_ext"
21451case "(($ac_try" in
21452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21453 *) ac_try_echo=$ac_try;;
21454esac
21455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21456 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21457 ac_status=$?
6bae0ccf 21458 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21459 rm -f conftest.er1
21460 cat conftest.err >&5
c0d27fcc 21461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21462 (exit $ac_status); } >/dev/null && {
21463 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21464 test ! -s conftest.err
21465 }; then
c0d27fcc 21466 ac_header_preproc=yes
503d2be0
AS
21467else
21468 echo "$as_me: failed program was:" >&5
19650fd6
AS
21469sed 's/^/| /' conftest.$ac_ext >&5
21470
c0d27fcc 21471 ac_header_preproc=no
a21616bd 21472fi
ca81d7a0 21473
503d2be0 21474rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21475{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21476echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21477
21478# So? What about this header?
edfaf76d
LK
21479case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21480 yes:no: )
c0d27fcc
MR
21481 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21482echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21483 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21484echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21485 ac_header_preproc=yes
19650fd6 21486 ;;
edfaf76d 21487 no:yes:* )
c0d27fcc
MR
21488 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21489echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21490 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21491echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21492 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21493echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21494 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21495echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21496 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21497echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21498 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21499echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21500
19650fd6 21501 ;;
c0d27fcc 21502esac
ca81d7a0
JD
21503{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21505if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21506 echo $ECHO_N "(cached) $ECHO_C" >&6
21507else
edfaf76d 21508 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21509fi
ca81d7a0
JD
21510ac_res=`eval echo '${'$as_ac_Header'}'`
21511 { echo "$as_me:$LINENO: result: $ac_res" >&5
21512echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21513
21514fi
503d2be0 21515if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21516 cat >>confdefs.h <<_ACEOF
503d2be0 21517#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21518_ACEOF
503d2be0 21519
a21616bd 21520else
503d2be0
AS
21521
21522for ac_header in kerberosIV/des.h
a21616bd 21523do
503d2be0 21524as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21525if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21526 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21527echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21528if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21529 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21530fi
ca81d7a0
JD
21531ac_res=`eval echo '${'$as_ac_Header'}'`
21532 { echo "$as_me:$LINENO: result: $ac_res" >&5
21533echo "${ECHO_T}$ac_res" >&6; }
98418dba 21534else
c0d27fcc 21535 # Is the header compilable?
ca81d7a0
JD
21536{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21537echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21538cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21539/* confdefs.h. */
21540_ACEOF
21541cat confdefs.h >>conftest.$ac_ext
21542cat >>conftest.$ac_ext <<_ACEOF
21543/* end confdefs.h. */
c0d27fcc
MR
21544$ac_includes_default
21545#include <$ac_header>
21546_ACEOF
21547rm -f conftest.$ac_objext
ca81d7a0
JD
21548if { (ac_try="$ac_compile"
21549case "(($ac_try" in
21550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21551 *) ac_try_echo=$ac_try;;
21552esac
21553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21554 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21555 ac_status=$?
edfaf76d
LK
21556 grep -v '^ *+' conftest.er1 >conftest.err
21557 rm -f conftest.er1
21558 cat conftest.err >&5
c0d27fcc 21559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21560 (exit $ac_status); } && {
21561 test -z "$ac_c_werror_flag" ||
21562 test ! -s conftest.err
21563 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21564 ac_header_compiler=yes
21565else
21566 echo "$as_me: failed program was:" >&5
19650fd6
AS
21567sed 's/^/| /' conftest.$ac_ext >&5
21568
ca81d7a0 21569 ac_header_compiler=no
c0d27fcc 21570fi
ca81d7a0
JD
21571
21572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21573{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21574echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21575
21576# Is the header present?
ca81d7a0
JD
21577{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21578echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21579cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21580/* confdefs.h. */
21581_ACEOF
21582cat confdefs.h >>conftest.$ac_ext
21583cat >>conftest.$ac_ext <<_ACEOF
21584/* end confdefs.h. */
503d2be0
AS
21585#include <$ac_header>
21586_ACEOF
ca81d7a0
JD
21587if { (ac_try="$ac_cpp conftest.$ac_ext"
21588case "(($ac_try" in
21589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21590 *) ac_try_echo=$ac_try;;
21591esac
21592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21593 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21594 ac_status=$?
6bae0ccf 21595 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21596 rm -f conftest.er1
21597 cat conftest.err >&5
c0d27fcc 21598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21599 (exit $ac_status); } >/dev/null && {
21600 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21601 test ! -s conftest.err
21602 }; then
c0d27fcc 21603 ac_header_preproc=yes
503d2be0
AS
21604else
21605 echo "$as_me: failed program was:" >&5
19650fd6
AS
21606sed 's/^/| /' conftest.$ac_ext >&5
21607
c0d27fcc 21608 ac_header_preproc=no
a21616bd 21609fi
ca81d7a0 21610
503d2be0 21611rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21612{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21613echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21614
21615# So? What about this header?
edfaf76d
LK
21616case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21617 yes:no: )
c0d27fcc
MR
21618 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21619echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21620 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21621echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21622 ac_header_preproc=yes
19650fd6 21623 ;;
edfaf76d 21624 no:yes:* )
c0d27fcc
MR
21625 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21626echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21627 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21628echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21629 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21630echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21631 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21632echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21633 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21634echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21635 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21636echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21637
19650fd6 21638 ;;
c0d27fcc 21639esac
ca81d7a0
JD
21640{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21641echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21642if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21643 echo $ECHO_N "(cached) $ECHO_C" >&6
21644else
edfaf76d 21645 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21646fi
ca81d7a0
JD
21647ac_res=`eval echo '${'$as_ac_Header'}'`
21648 { echo "$as_me:$LINENO: result: $ac_res" >&5
21649echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21650
21651fi
503d2be0 21652if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21653 cat >>confdefs.h <<_ACEOF
503d2be0 21654#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21655_ACEOF
503d2be0 21656
a21616bd 21657else
503d2be0
AS
21658
21659for ac_header in kerberos/des.h
a21616bd 21660do
503d2be0 21661as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21662if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21663 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21664echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21665if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21666 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21667fi
ca81d7a0
JD
21668ac_res=`eval echo '${'$as_ac_Header'}'`
21669 { echo "$as_me:$LINENO: result: $ac_res" >&5
21670echo "${ECHO_T}$ac_res" >&6; }
98418dba 21671else
c0d27fcc 21672 # Is the header compilable?
ca81d7a0
JD
21673{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21674echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21675cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21676/* confdefs.h. */
21677_ACEOF
21678cat confdefs.h >>conftest.$ac_ext
21679cat >>conftest.$ac_ext <<_ACEOF
21680/* end confdefs.h. */
c0d27fcc
MR
21681$ac_includes_default
21682#include <$ac_header>
21683_ACEOF
21684rm -f conftest.$ac_objext
ca81d7a0
JD
21685if { (ac_try="$ac_compile"
21686case "(($ac_try" in
21687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21688 *) ac_try_echo=$ac_try;;
21689esac
21690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21691 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21692 ac_status=$?
edfaf76d
LK
21693 grep -v '^ *+' conftest.er1 >conftest.err
21694 rm -f conftest.er1
21695 cat conftest.err >&5
c0d27fcc 21696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21697 (exit $ac_status); } && {
21698 test -z "$ac_c_werror_flag" ||
21699 test ! -s conftest.err
21700 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21701 ac_header_compiler=yes
21702else
21703 echo "$as_me: failed program was:" >&5
19650fd6
AS
21704sed 's/^/| /' conftest.$ac_ext >&5
21705
ca81d7a0 21706 ac_header_compiler=no
c0d27fcc 21707fi
ca81d7a0
JD
21708
21709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21710{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21711echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21712
21713# Is the header present?
ca81d7a0
JD
21714{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21715echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21716cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21717/* confdefs.h. */
21718_ACEOF
21719cat confdefs.h >>conftest.$ac_ext
21720cat >>conftest.$ac_ext <<_ACEOF
21721/* end confdefs.h. */
503d2be0
AS
21722#include <$ac_header>
21723_ACEOF
ca81d7a0
JD
21724if { (ac_try="$ac_cpp conftest.$ac_ext"
21725case "(($ac_try" in
21726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21727 *) ac_try_echo=$ac_try;;
21728esac
21729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21730 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21731 ac_status=$?
6bae0ccf 21732 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21733 rm -f conftest.er1
21734 cat conftest.err >&5
c0d27fcc 21735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21736 (exit $ac_status); } >/dev/null && {
21737 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21738 test ! -s conftest.err
21739 }; then
c0d27fcc 21740 ac_header_preproc=yes
503d2be0
AS
21741else
21742 echo "$as_me: failed program was:" >&5
19650fd6
AS
21743sed 's/^/| /' conftest.$ac_ext >&5
21744
c0d27fcc 21745 ac_header_preproc=no
a21616bd 21746fi
ca81d7a0 21747
503d2be0 21748rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21749{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21750echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21751
21752# So? What about this header?
edfaf76d
LK
21753case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21754 yes:no: )
c0d27fcc
MR
21755 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21756echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21757 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21758echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21759 ac_header_preproc=yes
19650fd6 21760 ;;
edfaf76d 21761 no:yes:* )
c0d27fcc
MR
21762 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21763echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21764 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21765echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21766 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21767echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21768 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21769echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21770 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21771echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21772 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21773echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21774
19650fd6 21775 ;;
c0d27fcc 21776esac
ca81d7a0
JD
21777{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21778echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21779if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21780 echo $ECHO_N "(cached) $ECHO_C" >&6
21781else
edfaf76d 21782 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21783fi
ca81d7a0
JD
21784ac_res=`eval echo '${'$as_ac_Header'}'`
21785 { echo "$as_me:$LINENO: result: $ac_res" >&5
21786echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21787
21788fi
503d2be0 21789if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21790 cat >>confdefs.h <<_ACEOF
503d2be0 21791#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21792_ACEOF
a21616bd
KR
21793
21794fi
c0d27fcc 21795
a21616bd
KR
21796done
21797
98418dba 21798fi
c0d27fcc 21799
925c2f3f
EZ
21800done
21801
98418dba 21802fi
c0d27fcc 21803
925c2f3f 21804done
98418dba 21805
c0d27fcc 21806
925c2f3f
EZ
21807for ac_header in krb.h
21808do
21809as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21810if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21811 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21814 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21815fi
ca81d7a0
JD
21816ac_res=`eval echo '${'$as_ac_Header'}'`
21817 { echo "$as_me:$LINENO: result: $ac_res" >&5
21818echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21819else
21820 # Is the header compilable?
ca81d7a0
JD
21821{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21822echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21823cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
c0d27fcc
MR
21829$ac_includes_default
21830#include <$ac_header>
21831_ACEOF
21832rm -f conftest.$ac_objext
ca81d7a0
JD
21833if { (ac_try="$ac_compile"
21834case "(($ac_try" in
21835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21836 *) ac_try_echo=$ac_try;;
21837esac
21838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21839 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21840 ac_status=$?
edfaf76d
LK
21841 grep -v '^ *+' conftest.er1 >conftest.err
21842 rm -f conftest.er1
21843 cat conftest.err >&5
c0d27fcc 21844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21845 (exit $ac_status); } && {
21846 test -z "$ac_c_werror_flag" ||
21847 test ! -s conftest.err
21848 } && test -s conftest.$ac_objext; then
c0d27fcc 21849 ac_header_compiler=yes
925c2f3f 21850else
c0d27fcc 21851 echo "$as_me: failed program was:" >&5
19650fd6
AS
21852sed 's/^/| /' conftest.$ac_ext >&5
21853
ca81d7a0 21854 ac_header_compiler=no
c0d27fcc 21855fi
ca81d7a0
JD
21856
21857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21858{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21859echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21860
21861# Is the header present?
ca81d7a0
JD
21862{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21863echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21864cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21865/* confdefs.h. */
21866_ACEOF
21867cat confdefs.h >>conftest.$ac_ext
21868cat >>conftest.$ac_ext <<_ACEOF
21869/* end confdefs.h. */
503d2be0
AS
21870#include <$ac_header>
21871_ACEOF
ca81d7a0
JD
21872if { (ac_try="$ac_cpp conftest.$ac_ext"
21873case "(($ac_try" in
21874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21875 *) ac_try_echo=$ac_try;;
21876esac
21877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21878 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21879 ac_status=$?
6bae0ccf 21880 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21881 rm -f conftest.er1
21882 cat conftest.err >&5
c0d27fcc 21883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21884 (exit $ac_status); } >/dev/null && {
21885 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21886 test ! -s conftest.err
21887 }; then
c0d27fcc 21888 ac_header_preproc=yes
503d2be0
AS
21889else
21890 echo "$as_me: failed program was:" >&5
19650fd6
AS
21891sed 's/^/| /' conftest.$ac_ext >&5
21892
c0d27fcc 21893 ac_header_preproc=no
a21616bd 21894fi
ca81d7a0 21895
503d2be0 21896rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21897{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21898echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21899
21900# So? What about this header?
edfaf76d
LK
21901case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21902 yes:no: )
c0d27fcc
MR
21903 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21904echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21905 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21906echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21907 ac_header_preproc=yes
19650fd6 21908 ;;
edfaf76d 21909 no:yes:* )
c0d27fcc
MR
21910 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21911echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21912 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21913echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21914 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21915echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21916 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21917echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21918 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21919echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21920 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21921echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21922
19650fd6 21923 ;;
c0d27fcc 21924esac
ca81d7a0
JD
21925{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21927if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21928 echo $ECHO_N "(cached) $ECHO_C" >&6
21929else
edfaf76d 21930 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21931fi
ca81d7a0
JD
21932ac_res=`eval echo '${'$as_ac_Header'}'`
21933 { echo "$as_me:$LINENO: result: $ac_res" >&5
21934echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21935
21936fi
503d2be0 21937if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21938 cat >>confdefs.h <<_ACEOF
503d2be0 21939#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21940_ACEOF
503d2be0 21941
a21616bd 21942else
503d2be0
AS
21943
21944for ac_header in kerberosIV/krb.h
a21616bd 21945do
503d2be0 21946as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21947if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21948 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21949echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21950if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21951 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21952fi
ca81d7a0
JD
21953ac_res=`eval echo '${'$as_ac_Header'}'`
21954 { echo "$as_me:$LINENO: result: $ac_res" >&5
21955echo "${ECHO_T}$ac_res" >&6; }
98418dba 21956else
c0d27fcc 21957 # Is the header compilable?
ca81d7a0
JD
21958{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21959echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21960cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21961/* confdefs.h. */
21962_ACEOF
21963cat confdefs.h >>conftest.$ac_ext
21964cat >>conftest.$ac_ext <<_ACEOF
21965/* end confdefs.h. */
c0d27fcc
MR
21966$ac_includes_default
21967#include <$ac_header>
21968_ACEOF
21969rm -f conftest.$ac_objext
ca81d7a0
JD
21970if { (ac_try="$ac_compile"
21971case "(($ac_try" in
21972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21973 *) ac_try_echo=$ac_try;;
21974esac
21975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21976 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21977 ac_status=$?
edfaf76d
LK
21978 grep -v '^ *+' conftest.er1 >conftest.err
21979 rm -f conftest.er1
21980 cat conftest.err >&5
c0d27fcc 21981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21982 (exit $ac_status); } && {
21983 test -z "$ac_c_werror_flag" ||
21984 test ! -s conftest.err
21985 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21986 ac_header_compiler=yes
21987else
21988 echo "$as_me: failed program was:" >&5
19650fd6
AS
21989sed 's/^/| /' conftest.$ac_ext >&5
21990
ca81d7a0 21991 ac_header_compiler=no
c0d27fcc 21992fi
ca81d7a0
JD
21993
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21995{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21996echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21997
21998# Is the header present?
ca81d7a0
JD
21999{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22000echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22001cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22002/* confdefs.h. */
22003_ACEOF
22004cat confdefs.h >>conftest.$ac_ext
22005cat >>conftest.$ac_ext <<_ACEOF
22006/* end confdefs.h. */
503d2be0
AS
22007#include <$ac_header>
22008_ACEOF
ca81d7a0
JD
22009if { (ac_try="$ac_cpp conftest.$ac_ext"
22010case "(($ac_try" in
22011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22012 *) ac_try_echo=$ac_try;;
22013esac
22014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22015 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22016 ac_status=$?
6bae0ccf 22017 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22018 rm -f conftest.er1
22019 cat conftest.err >&5
c0d27fcc 22020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22021 (exit $ac_status); } >/dev/null && {
22022 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22023 test ! -s conftest.err
22024 }; then
c0d27fcc 22025 ac_header_preproc=yes
503d2be0
AS
22026else
22027 echo "$as_me: failed program was:" >&5
19650fd6
AS
22028sed 's/^/| /' conftest.$ac_ext >&5
22029
c0d27fcc 22030 ac_header_preproc=no
a21616bd 22031fi
ca81d7a0 22032
503d2be0 22033rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22034{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22035echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22036
22037# So? What about this header?
edfaf76d
LK
22038case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22039 yes:no: )
c0d27fcc
MR
22040 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22041echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22042 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22043echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22044 ac_header_preproc=yes
19650fd6 22045 ;;
edfaf76d 22046 no:yes:* )
c0d27fcc
MR
22047 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22048echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22049 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22050echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22051 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22052echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22053 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22054echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22055 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22056echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22057 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22058echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22059
19650fd6 22060 ;;
c0d27fcc 22061esac
ca81d7a0
JD
22062{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22063echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22064if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22065 echo $ECHO_N "(cached) $ECHO_C" >&6
22066else
edfaf76d 22067 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22068fi
ca81d7a0
JD
22069ac_res=`eval echo '${'$as_ac_Header'}'`
22070 { echo "$as_me:$LINENO: result: $ac_res" >&5
22071echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22072
22073fi
503d2be0 22074if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22075 cat >>confdefs.h <<_ACEOF
503d2be0 22076#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22077_ACEOF
503d2be0 22078
a21616bd 22079else
503d2be0
AS
22080
22081for ac_header in kerberos/krb.h
a21616bd 22082do
503d2be0 22083as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22084if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22085 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22086echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22087if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22088 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22089fi
ca81d7a0
JD
22090ac_res=`eval echo '${'$as_ac_Header'}'`
22091 { echo "$as_me:$LINENO: result: $ac_res" >&5
22092echo "${ECHO_T}$ac_res" >&6; }
98418dba 22093else
c0d27fcc 22094 # Is the header compilable?
ca81d7a0
JD
22095{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22096echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22098/* confdefs.h. */
22099_ACEOF
22100cat confdefs.h >>conftest.$ac_ext
22101cat >>conftest.$ac_ext <<_ACEOF
22102/* end confdefs.h. */
c0d27fcc
MR
22103$ac_includes_default
22104#include <$ac_header>
22105_ACEOF
22106rm -f conftest.$ac_objext
ca81d7a0
JD
22107if { (ac_try="$ac_compile"
22108case "(($ac_try" in
22109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22110 *) ac_try_echo=$ac_try;;
22111esac
22112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22113 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22114 ac_status=$?
edfaf76d
LK
22115 grep -v '^ *+' conftest.er1 >conftest.err
22116 rm -f conftest.er1
22117 cat conftest.err >&5
c0d27fcc 22118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22119 (exit $ac_status); } && {
22120 test -z "$ac_c_werror_flag" ||
22121 test ! -s conftest.err
22122 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22123 ac_header_compiler=yes
22124else
22125 echo "$as_me: failed program was:" >&5
19650fd6
AS
22126sed 's/^/| /' conftest.$ac_ext >&5
22127
ca81d7a0 22128 ac_header_compiler=no
c0d27fcc 22129fi
ca81d7a0
JD
22130
22131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22132{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22133echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22134
22135# Is the header present?
ca81d7a0
JD
22136{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22137echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22138cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22139/* confdefs.h. */
22140_ACEOF
22141cat confdefs.h >>conftest.$ac_ext
22142cat >>conftest.$ac_ext <<_ACEOF
22143/* end confdefs.h. */
503d2be0
AS
22144#include <$ac_header>
22145_ACEOF
ca81d7a0
JD
22146if { (ac_try="$ac_cpp conftest.$ac_ext"
22147case "(($ac_try" in
22148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22149 *) ac_try_echo=$ac_try;;
22150esac
22151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22152 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22153 ac_status=$?
6bae0ccf 22154 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22155 rm -f conftest.er1
22156 cat conftest.err >&5
c0d27fcc 22157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22158 (exit $ac_status); } >/dev/null && {
22159 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22160 test ! -s conftest.err
22161 }; then
c0d27fcc 22162 ac_header_preproc=yes
503d2be0
AS
22163else
22164 echo "$as_me: failed program was:" >&5
19650fd6
AS
22165sed 's/^/| /' conftest.$ac_ext >&5
22166
c0d27fcc 22167 ac_header_preproc=no
a21616bd 22168fi
ca81d7a0 22169
503d2be0 22170rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22171{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22172echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22173
22174# So? What about this header?
edfaf76d
LK
22175case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22176 yes:no: )
35996d22
AS
22177 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22178echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22179 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22180echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22181 ac_header_preproc=yes
19650fd6 22182 ;;
edfaf76d 22183 no:yes:* )
c0d27fcc
MR
22184 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22185echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22186 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22187echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22188 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22189echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22190 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22191echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22192 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22193echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22194 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22195echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22196
19650fd6 22197 ;;
c0d27fcc 22198esac
ca81d7a0
JD
22199{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22200echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22201if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22202 echo $ECHO_N "(cached) $ECHO_C" >&6
22203else
edfaf76d 22204 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22205fi
ca81d7a0
JD
22206ac_res=`eval echo '${'$as_ac_Header'}'`
22207 { echo "$as_me:$LINENO: result: $ac_res" >&5
22208echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22209
22210fi
503d2be0 22211if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22212 cat >>confdefs.h <<_ACEOF
503d2be0 22213#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22214_ACEOF
503d2be0 22215
a21616bd 22216fi
c0d27fcc 22217
a21616bd
KR
22218done
22219
22220fi
c0d27fcc 22221
a21616bd
KR
22222done
22223
22224fi
c0d27fcc 22225
a21616bd
KR
22226done
22227
22228 fi
503d2be0
AS
22229
22230for ac_header in com_err.h
a21616bd 22231do
503d2be0 22232as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22233if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22234 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22235echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22236if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22237 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22238fi
ca81d7a0
JD
22239ac_res=`eval echo '${'$as_ac_Header'}'`
22240 { echo "$as_me:$LINENO: result: $ac_res" >&5
22241echo "${ECHO_T}$ac_res" >&6; }
98418dba 22242else
c0d27fcc 22243 # Is the header compilable?
ca81d7a0
JD
22244{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22245echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22246cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22247/* confdefs.h. */
22248_ACEOF
22249cat confdefs.h >>conftest.$ac_ext
22250cat >>conftest.$ac_ext <<_ACEOF
22251/* end confdefs.h. */
c0d27fcc
MR
22252$ac_includes_default
22253#include <$ac_header>
22254_ACEOF
22255rm -f conftest.$ac_objext
ca81d7a0
JD
22256if { (ac_try="$ac_compile"
22257case "(($ac_try" in
22258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22259 *) ac_try_echo=$ac_try;;
22260esac
22261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22262 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22263 ac_status=$?
22264 grep -v '^ *+' conftest.er1 >conftest.err
22265 rm -f conftest.er1
22266 cat conftest.err >&5
22267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22268 (exit $ac_status); } && {
22269 test -z "$ac_c_werror_flag" ||
22270 test ! -s conftest.err
22271 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22272 ac_header_compiler=yes
22273else
22274 echo "$as_me: failed program was:" >&5
19650fd6
AS
22275sed 's/^/| /' conftest.$ac_ext >&5
22276
ca81d7a0 22277 ac_header_compiler=no
c0d27fcc 22278fi
ca81d7a0
JD
22279
22280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22281{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22282echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22283
22284# Is the header present?
ca81d7a0
JD
22285{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22286echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22288/* confdefs.h. */
22289_ACEOF
22290cat confdefs.h >>conftest.$ac_ext
22291cat >>conftest.$ac_ext <<_ACEOF
22292/* end confdefs.h. */
503d2be0
AS
22293#include <$ac_header>
22294_ACEOF
ca81d7a0
JD
22295if { (ac_try="$ac_cpp conftest.$ac_ext"
22296case "(($ac_try" in
22297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22298 *) ac_try_echo=$ac_try;;
22299esac
22300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22301 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22302 ac_status=$?
6bae0ccf 22303 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22304 rm -f conftest.er1
22305 cat conftest.err >&5
c0d27fcc 22306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22307 (exit $ac_status); } >/dev/null && {
22308 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22309 test ! -s conftest.err
22310 }; then
c0d27fcc 22311 ac_header_preproc=yes
503d2be0
AS
22312else
22313 echo "$as_me: failed program was:" >&5
19650fd6
AS
22314sed 's/^/| /' conftest.$ac_ext >&5
22315
c0d27fcc 22316 ac_header_preproc=no
a21616bd 22317fi
ca81d7a0 22318
503d2be0 22319rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22320{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22321echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22322
22323# So? What about this header?
edfaf76d
LK
22324case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22325 yes:no: )
c0d27fcc
MR
22326 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22327echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22328 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22329echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22330 ac_header_preproc=yes
19650fd6 22331 ;;
edfaf76d 22332 no:yes:* )
c0d27fcc
MR
22333 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22334echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22335 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22336echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22337 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22338echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22339 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22340echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22341 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22342echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22343 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22344echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22345
19650fd6 22346 ;;
c0d27fcc 22347esac
ca81d7a0
JD
22348{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22349echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22350if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22351 echo $ECHO_N "(cached) $ECHO_C" >&6
22352else
edfaf76d 22353 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22354fi
ca81d7a0
JD
22355ac_res=`eval echo '${'$as_ac_Header'}'`
22356 { echo "$as_me:$LINENO: result: $ac_res" >&5
22357echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22358
22359fi
503d2be0 22360if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22361 cat >>confdefs.h <<_ACEOF
503d2be0 22362#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22363_ACEOF
503d2be0 22364
a21616bd 22365fi
c0d27fcc 22366
a21616bd
KR
22367done
22368
22369fi
22370
ba4481b5
DL
22371# Solaris requires -lintl if you want strerror (which calls dgettext)
22372# to return localized messages.
503d2be0 22373
ca81d7a0
JD
22374{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22375echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22376if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22377 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22378else
503d2be0 22379 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22380LIBS="-lintl $LIBS"
503d2be0 22381cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22382/* confdefs.h. */
22383_ACEOF
22384cat confdefs.h >>conftest.$ac_ext
22385cat >>conftest.$ac_ext <<_ACEOF
22386/* end confdefs.h. */
503d2be0 22387
ca81d7a0
JD
22388/* Override any GCC internal prototype to avoid an error.
22389 Use char because int might match the return type of a GCC
22390 builtin and then its argument prototype would still apply. */
503d2be0
AS
22391#ifdef __cplusplus
22392extern "C"
22393#endif
503d2be0
AS
22394char dgettext ();
22395int
22396main ()
22397{
ca81d7a0 22398return dgettext ();
503d2be0
AS
22399 ;
22400 return 0;
22401}
22402_ACEOF
22403rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22404if { (ac_try="$ac_link"
22405case "(($ac_try" in
22406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22407 *) ac_try_echo=$ac_try;;
22408esac
22409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22410 (eval "$ac_link") 2>conftest.er1
503d2be0 22411 ac_status=$?
edfaf76d
LK
22412 grep -v '^ *+' conftest.er1 >conftest.err
22413 rm -f conftest.er1
22414 cat conftest.err >&5
c0d27fcc 22415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22416 (exit $ac_status); } && {
22417 test -z "$ac_c_werror_flag" ||
22418 test ! -s conftest.err
22419 } && test -s conftest$ac_exeext &&
22420 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22421 ac_cv_lib_intl_dgettext=yes
22422else
22423 echo "$as_me: failed program was:" >&5
19650fd6
AS
22424sed 's/^/| /' conftest.$ac_ext >&5
22425
ca81d7a0 22426 ac_cv_lib_intl_dgettext=no
503d2be0 22427fi
ca81d7a0 22428
f053c89f 22429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22430 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22431LIBS=$ac_check_lib_save_LIBS
22432fi
ca81d7a0
JD
22433{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22434echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22435if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22436 cat >>confdefs.h <<_ACEOF
503d2be0 22437#define HAVE_LIBINTL 1
c0d27fcc 22438_ACEOF
ba4481b5
DL
22439
22440 LIBS="-lintl $LIBS"
22441
ba4481b5
DL
22442fi
22443
c0d27fcc 22444
ca81d7a0
JD
22445{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22446echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22447if test "${emacs_cv_localtime_cache+set}" = set; then
22448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22449else
22450 if test x$ac_cv_func_tzset = xyes; then
22451if test "$cross_compiling" = yes; then
22452 # If we have tzset, assume the worst when cross-compiling.
22453emacs_cv_localtime_cache=yes
22454else
503d2be0 22455 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22456/* confdefs.h. */
22457_ACEOF
22458cat confdefs.h >>conftest.$ac_ext
22459cat >>conftest.$ac_ext <<_ACEOF
22460/* end confdefs.h. */
ba4481b5 22461#include <time.h>
ba4481b5
DL
22462extern char **environ;
22463unset_TZ ()
22464{
22465 char **from, **to;
22466 for (to = from = environ; (*to = *from); from++)
22467 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22468 to++;
22469}
22470char TZ_GMT0[] = "TZ=GMT0";
22471char TZ_PST8[] = "TZ=PST8";
22472main()
22473{
22474 time_t now = time ((time_t *) 0);
22475 int hour_GMT0, hour_unset;
22476 if (putenv (TZ_GMT0) != 0)
22477 exit (1);
22478 hour_GMT0 = localtime (&now)->tm_hour;
22479 unset_TZ ();
22480 hour_unset = localtime (&now)->tm_hour;
22481 if (putenv (TZ_PST8) != 0)
22482 exit (1);
22483 if (localtime (&now)->tm_hour == hour_GMT0)
22484 exit (1);
22485 unset_TZ ();
22486 if (localtime (&now)->tm_hour != hour_unset)
22487 exit (1);
22488 exit (0);
22489}
503d2be0
AS
22490_ACEOF
22491rm -f conftest$ac_exeext
ca81d7a0
JD
22492if { (ac_try="$ac_link"
22493case "(($ac_try" in
22494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22495 *) ac_try_echo=$ac_try;;
22496esac
22497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22498 (eval "$ac_link") 2>&5
503d2be0 22499 ac_status=$?
c0d27fcc 22500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22502 { (case "(($ac_try" in
22503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22504 *) ac_try_echo=$ac_try;;
22505esac
22506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22507 (eval "$ac_try") 2>&5
503d2be0 22508 ac_status=$?
c0d27fcc 22509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22510 (exit $ac_status); }; }; then
ba4481b5
DL
22511 emacs_cv_localtime_cache=no
22512else
503d2be0
AS
22513 echo "$as_me: program exited with status $ac_status" >&5
22514echo "$as_me: failed program was:" >&5
19650fd6
AS
22515sed 's/^/| /' conftest.$ac_ext >&5
22516
c0d27fcc 22517( exit $ac_status )
503d2be0 22518emacs_cv_localtime_cache=yes
ba4481b5 22519fi
ca81d7a0 22520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22521fi
ca81d7a0
JD
22522
22523
ba4481b5
DL
22524else
22525 # If we lack tzset, report that localtime does not cache TZ,
22526 # since we can't invalidate the cache if we don't have tzset.
22527 emacs_cv_localtime_cache=no
22528fi
22529fi
ca81d7a0
JD
22530{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22531echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22532if test $emacs_cv_localtime_cache = yes; then
b936fae4 22533
c0d27fcc 22534cat >>confdefs.h <<\_ACEOF
ba4481b5 22535#define LOCALTIME_CACHE 1
c0d27fcc 22536_ACEOF
ba4481b5
DL
22537
22538fi
22539
22540if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22541
22542for ac_func in gettimeofday
48d4b120 22543do
503d2be0 22544as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22545{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22546echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22547if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22548 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22549else
503d2be0 22550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22551/* confdefs.h. */
22552_ACEOF
22553cat confdefs.h >>conftest.$ac_ext
22554cat >>conftest.$ac_ext <<_ACEOF
22555/* end confdefs.h. */
edfaf76d
LK
22556/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22557 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22558#define $ac_func innocuous_$ac_func
22559
48d4b120 22560/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22561 which can conflict with char $ac_func (); below.
22562 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22563 <limits.h> exists even on freestanding compilers. */
edfaf76d 22564
19650fd6
AS
22565#ifdef __STDC__
22566# include <limits.h>
22567#else
22568# include <assert.h>
22569#endif
edfaf76d
LK
22570
22571#undef $ac_func
22572
ca81d7a0
JD
22573/* Override any GCC internal prototype to avoid an error.
22574 Use char because int might match the return type of a GCC
22575 builtin and then its argument prototype would still apply. */
503d2be0
AS
22576#ifdef __cplusplus
22577extern "C"
22578#endif
503d2be0 22579char $ac_func ();
48d4b120
DL
22580/* The GNU C library defines this for functions which it implements
22581 to always fail with ENOSYS. Some functions are actually named
22582 something starting with __ and the normal name is an alias. */
ca81d7a0 22583#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22584choke me
cd958eb3
MB
22585#endif
22586
19650fd6
AS
22587int
22588main ()
22589{
ca81d7a0 22590return $ac_func ();
503d2be0
AS
22591 ;
22592 return 0;
22593}
22594_ACEOF
22595rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22596if { (ac_try="$ac_link"
22597case "(($ac_try" in
22598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22599 *) ac_try_echo=$ac_try;;
22600esac
22601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22602 (eval "$ac_link") 2>conftest.er1
503d2be0 22603 ac_status=$?
edfaf76d
LK
22604 grep -v '^ *+' conftest.er1 >conftest.err
22605 rm -f conftest.er1
22606 cat conftest.err >&5
c0d27fcc 22607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22608 (exit $ac_status); } && {
22609 test -z "$ac_c_werror_flag" ||
22610 test ! -s conftest.err
22611 } && test -s conftest$ac_exeext &&
22612 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22613 eval "$as_ac_var=yes"
22614else
22615 echo "$as_me: failed program was:" >&5
19650fd6
AS
22616sed 's/^/| /' conftest.$ac_ext >&5
22617
ca81d7a0 22618 eval "$as_ac_var=no"
503d2be0 22619fi
ca81d7a0 22620
f053c89f 22621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22622 conftest$ac_exeext conftest.$ac_ext
503d2be0 22623fi
ca81d7a0
JD
22624ac_res=`eval echo '${'$as_ac_var'}'`
22625 { echo "$as_me:$LINENO: result: $ac_res" >&5
22626echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22627if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22628 cat >>confdefs.h <<_ACEOF
503d2be0 22629#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22630_ACEOF
48d4b120 22631
48d4b120
DL
22632fi
22633done
22634
b936fae4 22635 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22636 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22637echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22638if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22639 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22640else
503d2be0 22641 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22642/* confdefs.h. */
22643_ACEOF
22644cat confdefs.h >>conftest.$ac_ext
22645cat >>conftest.$ac_ext <<_ACEOF
22646/* end confdefs.h. */
ba4481b5 22647
a3f08d9e
DL
22648#ifdef TIME_WITH_SYS_TIME
22649#include <sys/time.h>
22650#include <time.h>
22651#else
22652#ifdef HAVE_SYS_TIME_H
22653#include <sys/time.h>
22654#else
22655#include <time.h>
22656#endif
22657#endif
503d2be0
AS
22658int
22659main ()
22660{
a3f08d9e 22661struct timeval time;
b936fae4 22662 gettimeofday (&time, 0);
503d2be0
AS
22663 ;
22664 return 0;
22665}
22666_ACEOF
22667rm -f conftest.$ac_objext
f053c89f
CY
22668if { (ac_try="$ac_compile"
22669case "(($ac_try" in
ca81d7a0
JD
22670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22671 *) ac_try_echo=$ac_try;;
22672esac
22673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22674 (eval "$ac_compile") 2>conftest.er1
503d2be0 22675 ac_status=$?
edfaf76d
LK
22676 grep -v '^ *+' conftest.er1 >conftest.err
22677 rm -f conftest.er1
22678 cat conftest.err >&5
c0d27fcc 22679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22680 (exit $ac_status); } && {
22681 test -z "$ac_c_werror_flag" ||
22682 test ! -s conftest.err
22683 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22684 emacs_cv_gettimeofday_two_arguments=yes
22685else
503d2be0 22686 echo "$as_me: failed program was:" >&5
19650fd6
AS
22687sed 's/^/| /' conftest.$ac_ext >&5
22688
ca81d7a0 22689 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22690fi
ca81d7a0
JD
22691
22692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22693fi
ca81d7a0
JD
22694{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22695echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22696 if test $emacs_cv_gettimeofday_two_arguments = no; then
22697
c0d27fcc 22698cat >>confdefs.h <<\_ACEOF
ba4481b5 22699#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22700_ACEOF
ba4481b5 22701
b936fae4 22702 fi
ba4481b5
DL
22703 fi
22704fi
22705
22706ok_so_far=yes
ca81d7a0
JD
22707{ echo "$as_me:$LINENO: checking for socket" >&5
22708echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22709if test "${ac_cv_func_socket+set}" = set; then
22710 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22711else
503d2be0 22712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22713/* confdefs.h. */
22714_ACEOF
22715cat confdefs.h >>conftest.$ac_ext
22716cat >>conftest.$ac_ext <<_ACEOF
22717/* end confdefs.h. */
edfaf76d
LK
22718/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22720#define socket innocuous_socket
22721
ba4481b5 22722/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22723 which can conflict with char socket (); below.
22724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22725 <limits.h> exists even on freestanding compilers. */
edfaf76d 22726
19650fd6
AS
22727#ifdef __STDC__
22728# include <limits.h>
22729#else
22730# include <assert.h>
22731#endif
edfaf76d
LK
22732
22733#undef socket
22734
ca81d7a0
JD
22735/* Override any GCC internal prototype to avoid an error.
22736 Use char because int might match the return type of a GCC
22737 builtin and then its argument prototype would still apply. */
503d2be0
AS
22738#ifdef __cplusplus
22739extern "C"
22740#endif
503d2be0 22741char socket ();
ba4481b5
DL
22742/* The GNU C library defines this for functions which it implements
22743 to always fail with ENOSYS. Some functions are actually named
22744 something starting with __ and the normal name is an alias. */
ca81d7a0 22745#if defined __stub_socket || defined __stub___socket
ba4481b5 22746choke me
cd958eb3
MB
22747#endif
22748
19650fd6
AS
22749int
22750main ()
22751{
ca81d7a0 22752return socket ();
503d2be0
AS
22753 ;
22754 return 0;
22755}
22756_ACEOF
22757rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22758if { (ac_try="$ac_link"
22759case "(($ac_try" in
22760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22761 *) ac_try_echo=$ac_try;;
22762esac
22763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22764 (eval "$ac_link") 2>conftest.er1
503d2be0 22765 ac_status=$?
edfaf76d
LK
22766 grep -v '^ *+' conftest.er1 >conftest.err
22767 rm -f conftest.er1
22768 cat conftest.err >&5
c0d27fcc 22769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22770 (exit $ac_status); } && {
22771 test -z "$ac_c_werror_flag" ||
22772 test ! -s conftest.err
22773 } && test -s conftest$ac_exeext &&
22774 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22775 ac_cv_func_socket=yes
22776else
22777 echo "$as_me: failed program was:" >&5
19650fd6
AS
22778sed 's/^/| /' conftest.$ac_ext >&5
22779
ca81d7a0 22780 ac_cv_func_socket=no
503d2be0 22781fi
ca81d7a0 22782
f053c89f 22783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22784 conftest$ac_exeext conftest.$ac_ext
503d2be0 22785fi
ca81d7a0
JD
22786{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22787echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22788if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22789 :
22790else
503d2be0 22791 ok_so_far=no
ba4481b5
DL
22792fi
22793
22794if test $ok_so_far = yes; then
c0d27fcc 22795 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22796 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22797echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22798if test "${ac_cv_header_netinet_in_h+set}" = set; then
22799 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22800fi
ca81d7a0
JD
22801{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22802echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22803else
c0d27fcc 22804 # Is the header compilable?
ca81d7a0
JD
22805{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22806echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22807cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22808/* confdefs.h. */
22809_ACEOF
22810cat confdefs.h >>conftest.$ac_ext
22811cat >>conftest.$ac_ext <<_ACEOF
22812/* end confdefs.h. */
c0d27fcc
MR
22813$ac_includes_default
22814#include <netinet/in.h>
22815_ACEOF
22816rm -f conftest.$ac_objext
ca81d7a0
JD
22817if { (ac_try="$ac_compile"
22818case "(($ac_try" in
22819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22820 *) ac_try_echo=$ac_try;;
22821esac
22822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22823 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22824 ac_status=$?
edfaf76d
LK
22825 grep -v '^ *+' conftest.er1 >conftest.err
22826 rm -f conftest.er1
22827 cat conftest.err >&5
c0d27fcc 22828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22829 (exit $ac_status); } && {
22830 test -z "$ac_c_werror_flag" ||
22831 test ! -s conftest.err
22832 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22833 ac_header_compiler=yes
22834else
22835 echo "$as_me: failed program was:" >&5
19650fd6
AS
22836sed 's/^/| /' conftest.$ac_ext >&5
22837
ca81d7a0 22838 ac_header_compiler=no
c0d27fcc 22839fi
ca81d7a0
JD
22840
22841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22842{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22843echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22844
22845# Is the header present?
ca81d7a0
JD
22846{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22847echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22848cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22849/* confdefs.h. */
22850_ACEOF
22851cat confdefs.h >>conftest.$ac_ext
22852cat >>conftest.$ac_ext <<_ACEOF
22853/* end confdefs.h. */
ba4481b5 22854#include <netinet/in.h>
503d2be0 22855_ACEOF
ca81d7a0
JD
22856if { (ac_try="$ac_cpp conftest.$ac_ext"
22857case "(($ac_try" in
22858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22859 *) ac_try_echo=$ac_try;;
22860esac
22861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22862 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22863 ac_status=$?
6bae0ccf 22864 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22865 rm -f conftest.er1
22866 cat conftest.err >&5
c0d27fcc 22867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22868 (exit $ac_status); } >/dev/null && {
22869 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22870 test ! -s conftest.err
22871 }; then
c0d27fcc 22872 ac_header_preproc=yes
ba4481b5 22873else
503d2be0 22874 echo "$as_me: failed program was:" >&5
19650fd6
AS
22875sed 's/^/| /' conftest.$ac_ext >&5
22876
c0d27fcc 22877 ac_header_preproc=no
ba4481b5 22878fi
ca81d7a0 22879
503d2be0 22880rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22881{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22882echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22883
22884# So? What about this header?
edfaf76d
LK
22885case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22886 yes:no: )
c0d27fcc
MR
22887 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22888echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22889 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22890echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22891 ac_header_preproc=yes
19650fd6 22892 ;;
edfaf76d 22893 no:yes:* )
c0d27fcc
MR
22894 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22895echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22896 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22897echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22898 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22899echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22900 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22901echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22902 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22903echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22904 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22905echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22906
19650fd6 22907 ;;
c0d27fcc 22908esac
ca81d7a0
JD
22909{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22910echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22911if test "${ac_cv_header_netinet_in_h+set}" = set; then
22912 echo $ECHO_N "(cached) $ECHO_C" >&6
22913else
22914 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22915fi
ca81d7a0
JD
22916{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22917echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22918
22919fi
503d2be0 22920if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22921 :
22922else
503d2be0 22923 ok_so_far=no
ba4481b5
DL
22924fi
22925
c0d27fcc 22926
ba4481b5
DL
22927fi
22928if test $ok_so_far = yes; then
c0d27fcc 22929 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22930 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22931echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22932if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22933 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22934fi
ca81d7a0
JD
22935{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22936echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22937else
c0d27fcc 22938 # Is the header compilable?
ca81d7a0
JD
22939{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22940echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22941cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22942/* confdefs.h. */
22943_ACEOF
22944cat confdefs.h >>conftest.$ac_ext
22945cat >>conftest.$ac_ext <<_ACEOF
22946/* end confdefs.h. */
c0d27fcc
MR
22947$ac_includes_default
22948#include <arpa/inet.h>
22949_ACEOF
22950rm -f conftest.$ac_objext
ca81d7a0
JD
22951if { (ac_try="$ac_compile"
22952case "(($ac_try" in
22953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22954 *) ac_try_echo=$ac_try;;
22955esac
22956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22957 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22958 ac_status=$?
edfaf76d
LK
22959 grep -v '^ *+' conftest.er1 >conftest.err
22960 rm -f conftest.er1
22961 cat conftest.err >&5
c0d27fcc 22962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22963 (exit $ac_status); } && {
22964 test -z "$ac_c_werror_flag" ||
22965 test ! -s conftest.err
22966 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22967 ac_header_compiler=yes
22968else
22969 echo "$as_me: failed program was:" >&5
19650fd6
AS
22970sed 's/^/| /' conftest.$ac_ext >&5
22971
ca81d7a0 22972 ac_header_compiler=no
c0d27fcc 22973fi
ca81d7a0
JD
22974
22975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22976{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22977echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22978
22979# Is the header present?
ca81d7a0
JD
22980{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22981echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22982cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22983/* confdefs.h. */
22984_ACEOF
22985cat confdefs.h >>conftest.$ac_ext
22986cat >>conftest.$ac_ext <<_ACEOF
22987/* end confdefs.h. */
ba4481b5 22988#include <arpa/inet.h>
503d2be0 22989_ACEOF
ca81d7a0
JD
22990if { (ac_try="$ac_cpp conftest.$ac_ext"
22991case "(($ac_try" in
22992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22993 *) ac_try_echo=$ac_try;;
22994esac
22995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22996 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22997 ac_status=$?
6bae0ccf 22998 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22999 rm -f conftest.er1
23000 cat conftest.err >&5
c0d27fcc 23001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23002 (exit $ac_status); } >/dev/null && {
23003 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23004 test ! -s conftest.err
23005 }; then
c0d27fcc 23006 ac_header_preproc=yes
ba4481b5 23007else
503d2be0 23008 echo "$as_me: failed program was:" >&5
19650fd6
AS
23009sed 's/^/| /' conftest.$ac_ext >&5
23010
c0d27fcc 23011 ac_header_preproc=no
ba4481b5 23012fi
ca81d7a0 23013
503d2be0 23014rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23015{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23016echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23017
23018# So? What about this header?
edfaf76d
LK
23019case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23020 yes:no: )
c0d27fcc
MR
23021 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23022echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23023 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23024echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
23025 ac_header_preproc=yes
19650fd6 23026 ;;
edfaf76d 23027 no:yes:* )
c0d27fcc
MR
23028 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23029echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
23030 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23031echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23032 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23033echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23034 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23035echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23036 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23037echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23038 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23039echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23040
19650fd6 23041 ;;
c0d27fcc 23042esac
ca81d7a0
JD
23043{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23044echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23045if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23047else
23048 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23049fi
ca81d7a0
JD
23050{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23051echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23052
23053fi
503d2be0 23054if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23055 :
23056else
503d2be0 23057 ok_so_far=no
ba4481b5
DL
23058fi
23059
c0d27fcc 23060
ba4481b5
DL
23061fi
23062if test $ok_so_far = yes; then
b936fae4 23063
c0d27fcc 23064cat >>confdefs.h <<\_ACEOF
ba4481b5 23065#define HAVE_INET_SOCKETS 1
c0d27fcc 23066_ACEOF
ba4481b5
DL
23067
23068fi
23069
2d2b6695 23070
7862d3a8 23071for ac_header in sys/ioctl.h
2d2b6695
KS
23072do
23073as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23074if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23075 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23076echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23077if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23078 echo $ECHO_N "(cached) $ECHO_C" >&6
23079fi
ca81d7a0
JD
23080ac_res=`eval echo '${'$as_ac_Header'}'`
23081 { echo "$as_me:$LINENO: result: $ac_res" >&5
23082echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23083else
23084 # Is the header compilable?
ca81d7a0
JD
23085{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23086echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23087cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23088/* confdefs.h. */
23089_ACEOF
23090cat confdefs.h >>conftest.$ac_ext
23091cat >>conftest.$ac_ext <<_ACEOF
23092/* end confdefs.h. */
23093$ac_includes_default
23094#include <$ac_header>
23095_ACEOF
23096rm -f conftest.$ac_objext
ca81d7a0
JD
23097if { (ac_try="$ac_compile"
23098case "(($ac_try" in
23099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23100 *) ac_try_echo=$ac_try;;
23101esac
23102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23103 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23104 ac_status=$?
edfaf76d
LK
23105 grep -v '^ *+' conftest.er1 >conftest.err
23106 rm -f conftest.er1
23107 cat conftest.err >&5
2d2b6695 23108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23109 (exit $ac_status); } && {
23110 test -z "$ac_c_werror_flag" ||
23111 test ! -s conftest.err
23112 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23113 ac_header_compiler=yes
23114else
23115 echo "$as_me: failed program was:" >&5
23116sed 's/^/| /' conftest.$ac_ext >&5
23117
ca81d7a0 23118 ac_header_compiler=no
2d2b6695 23119fi
ca81d7a0
JD
23120
23121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23122{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23123echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23124
23125# Is the header present?
ca81d7a0
JD
23126{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23127echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23128cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23129/* confdefs.h. */
23130_ACEOF
23131cat confdefs.h >>conftest.$ac_ext
23132cat >>conftest.$ac_ext <<_ACEOF
23133/* end confdefs.h. */
23134#include <$ac_header>
23135_ACEOF
ca81d7a0
JD
23136if { (ac_try="$ac_cpp conftest.$ac_ext"
23137case "(($ac_try" in
23138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23139 *) ac_try_echo=$ac_try;;
23140esac
23141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23142 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23143 ac_status=$?
23144 grep -v '^ *+' conftest.er1 >conftest.err
23145 rm -f conftest.er1
23146 cat conftest.err >&5
23147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23148 (exit $ac_status); } >/dev/null && {
23149 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23150 test ! -s conftest.err
23151 }; then
2d2b6695
KS
23152 ac_header_preproc=yes
23153else
23154 echo "$as_me: failed program was:" >&5
23155sed 's/^/| /' conftest.$ac_ext >&5
23156
23157 ac_header_preproc=no
23158fi
ca81d7a0 23159
2d2b6695 23160rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23161{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23162echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23163
23164# So? What about this header?
edfaf76d
LK
23165case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23166 yes:no: )
2d2b6695
KS
23167 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23168echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23169 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23170echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23171 ac_header_preproc=yes
2d2b6695 23172 ;;
edfaf76d 23173 no:yes:* )
2d2b6695
KS
23174 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23175echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23176 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23177echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23178 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23179echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23180 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23181echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23182 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23183echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23184 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23185echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23186
2d2b6695
KS
23187 ;;
23188esac
ca81d7a0
JD
23189{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23190echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23191if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23192 echo $ECHO_N "(cached) $ECHO_C" >&6
23193else
edfaf76d 23194 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23195fi
ca81d7a0
JD
23196ac_res=`eval echo '${'$as_ac_Header'}'`
23197 { echo "$as_me:$LINENO: result: $ac_res" >&5
23198echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23199
23200fi
23201if test `eval echo '${'$as_ac_Header'}'` = yes; then
23202 cat >>confdefs.h <<_ACEOF
23203#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23204_ACEOF
23205
23206fi
23207
23208done
23209
23210
ba4481b5 23211if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23212
c0d27fcc 23213cat >>confdefs.h <<\_ACEOF
ba4481b5 23214#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23215_ACEOF
ba4481b5
DL
23216
23217fi
23218
ca81d7a0
JD
23219{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23220echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23221if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23222 { echo "$as_me:$LINENO: result: yes" >&5
23223echo "${ECHO_T}yes" >&6; }
b936fae4 23224
c0d27fcc 23225cat >>confdefs.h <<\_ACEOF
3d9fec71 23226#define HAVE_DEV_PTMX 1
c0d27fcc 23227_ACEOF
3d9fec71
DL
23228
23229else
ca81d7a0
JD
23230 { echo "$as_me:$LINENO: result: no" >&5
23231echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23232fi
23233
ca81d7a0
JD
23234{ echo "$as_me:$LINENO: checking for pid_t" >&5
23235echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23236if test "${ac_cv_type_pid_t+set}" = set; then
23237 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23238else
503d2be0 23239 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23240/* confdefs.h. */
23241_ACEOF
23242cat confdefs.h >>conftest.$ac_ext
23243cat >>conftest.$ac_ext <<_ACEOF
23244/* end confdefs.h. */
503d2be0 23245$ac_includes_default
ca81d7a0 23246typedef pid_t ac__type_new_;
503d2be0
AS
23247int
23248main ()
23249{
ca81d7a0 23250if ((ac__type_new_ *) 0)
503d2be0 23251 return 0;
ca81d7a0 23252if (sizeof (ac__type_new_))
503d2be0
AS
23253 return 0;
23254 ;
23255 return 0;
23256}
23257_ACEOF
23258rm -f conftest.$ac_objext
ca81d7a0
JD
23259if { (ac_try="$ac_compile"
23260case "(($ac_try" in
23261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23262 *) ac_try_echo=$ac_try;;
23263esac
23264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23265 (eval "$ac_compile") 2>conftest.er1
503d2be0 23266 ac_status=$?
edfaf76d
LK
23267 grep -v '^ *+' conftest.er1 >conftest.err
23268 rm -f conftest.er1
23269 cat conftest.err >&5
c0d27fcc 23270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23271 (exit $ac_status); } && {
23272 test -z "$ac_c_werror_flag" ||
23273 test ! -s conftest.err
23274 } && test -s conftest.$ac_objext; then
647847ea
DL
23275 ac_cv_type_pid_t=yes
23276else
503d2be0 23277 echo "$as_me: failed program was:" >&5
19650fd6
AS
23278sed 's/^/| /' conftest.$ac_ext >&5
23279
ca81d7a0 23280 ac_cv_type_pid_t=no
647847ea 23281fi
ca81d7a0
JD
23282
23283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23284fi
ca81d7a0
JD
23285{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23286echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23287if test $ac_cv_type_pid_t = yes; then
23288 :
23289else
23290
c0d27fcc 23291cat >>confdefs.h <<_ACEOF
647847ea 23292#define pid_t int
c0d27fcc 23293_ACEOF
647847ea
DL
23294
23295fi
23296
c0d27fcc 23297
ca81d7a0 23298for ac_header in vfork.h
503d2be0
AS
23299do
23300as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23301if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23302 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23303echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23304if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23305 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23306fi
ca81d7a0
JD
23307ac_res=`eval echo '${'$as_ac_Header'}'`
23308 { echo "$as_me:$LINENO: result: $ac_res" >&5
23309echo "${ECHO_T}$ac_res" >&6; }
98418dba 23310else
c0d27fcc 23311 # Is the header compilable?
ca81d7a0
JD
23312{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23313echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23314cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23315/* confdefs.h. */
23316_ACEOF
23317cat confdefs.h >>conftest.$ac_ext
23318cat >>conftest.$ac_ext <<_ACEOF
23319/* end confdefs.h. */
c0d27fcc
MR
23320$ac_includes_default
23321#include <$ac_header>
23322_ACEOF
23323rm -f conftest.$ac_objext
ca81d7a0
JD
23324if { (ac_try="$ac_compile"
23325case "(($ac_try" in
23326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23327 *) ac_try_echo=$ac_try;;
23328esac
23329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23330 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23331 ac_status=$?
edfaf76d
LK
23332 grep -v '^ *+' conftest.er1 >conftest.err
23333 rm -f conftest.er1
23334 cat conftest.err >&5
c0d27fcc 23335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23336 (exit $ac_status); } && {
23337 test -z "$ac_c_werror_flag" ||
23338 test ! -s conftest.err
23339 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23340 ac_header_compiler=yes
23341else
23342 echo "$as_me: failed program was:" >&5
19650fd6
AS
23343sed 's/^/| /' conftest.$ac_ext >&5
23344
ca81d7a0 23345 ac_header_compiler=no
c0d27fcc 23346fi
ca81d7a0
JD
23347
23348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23349{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23350echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23351
23352# Is the header present?
ca81d7a0
JD
23353{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23354echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23355cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23356/* confdefs.h. */
23357_ACEOF
23358cat confdefs.h >>conftest.$ac_ext
23359cat >>conftest.$ac_ext <<_ACEOF
23360/* end confdefs.h. */
503d2be0
AS
23361#include <$ac_header>
23362_ACEOF
ca81d7a0
JD
23363if { (ac_try="$ac_cpp conftest.$ac_ext"
23364case "(($ac_try" in
23365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23366 *) ac_try_echo=$ac_try;;
23367esac
23368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23369 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23370 ac_status=$?
6bae0ccf 23371 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23372 rm -f conftest.er1
23373 cat conftest.err >&5
c0d27fcc 23374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23375 (exit $ac_status); } >/dev/null && {
23376 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23377 test ! -s conftest.err
23378 }; then
c0d27fcc 23379 ac_header_preproc=yes
647847ea 23380else
503d2be0 23381 echo "$as_me: failed program was:" >&5
19650fd6
AS
23382sed 's/^/| /' conftest.$ac_ext >&5
23383
c0d27fcc 23384 ac_header_preproc=no
647847ea 23385fi
ca81d7a0 23386
503d2be0 23387rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23388{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23389echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23390
23391# So? What about this header?
edfaf76d
LK
23392case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23393 yes:no: )
c0d27fcc
MR
23394 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23395echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23396 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23397echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23398 ac_header_preproc=yes
19650fd6 23399 ;;
edfaf76d 23400 no:yes:* )
c0d27fcc
MR
23401 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23402echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23403 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23404echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23405 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23406echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23407 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23408echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23409 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23410echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23411 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23412echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23413
19650fd6 23414 ;;
c0d27fcc 23415esac
ca81d7a0
JD
23416{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23417echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23418if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23419 echo $ECHO_N "(cached) $ECHO_C" >&6
23420else
edfaf76d 23421 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23422fi
ca81d7a0
JD
23423ac_res=`eval echo '${'$as_ac_Header'}'`
23424 { echo "$as_me:$LINENO: result: $ac_res" >&5
23425echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23426
23427fi
503d2be0 23428if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23429 cat >>confdefs.h <<_ACEOF
503d2be0 23430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23431_ACEOF
647847ea 23432
73b77ee5 23433fi
c0d27fcc 23434
503d2be0 23435done
73b77ee5 23436
c0d27fcc
MR
23437
23438
503d2be0
AS
23439for ac_func in fork vfork
23440do
23441as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23442{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23443echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23444if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23445 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23446else
503d2be0 23447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23448/* confdefs.h. */
23449_ACEOF
23450cat confdefs.h >>conftest.$ac_ext
23451cat >>conftest.$ac_ext <<_ACEOF
23452/* end confdefs.h. */
edfaf76d
LK
23453/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23454 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23455#define $ac_func innocuous_$ac_func
23456
fa0b693c 23457/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23458 which can conflict with char $ac_func (); below.
23459 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23460 <limits.h> exists even on freestanding compilers. */
edfaf76d 23461
19650fd6
AS
23462#ifdef __STDC__
23463# include <limits.h>
23464#else
23465# include <assert.h>
23466#endif
edfaf76d
LK
23467
23468#undef $ac_func
23469
ca81d7a0
JD
23470/* Override any GCC internal prototype to avoid an error.
23471 Use char because int might match the return type of a GCC
23472 builtin and then its argument prototype would still apply. */
503d2be0
AS
23473#ifdef __cplusplus
23474extern "C"
23475#endif
503d2be0 23476char $ac_func ();
fa0b693c
GM
23477/* The GNU C library defines this for functions which it implements
23478 to always fail with ENOSYS. Some functions are actually named
23479 something starting with __ and the normal name is an alias. */
ca81d7a0 23480#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23481choke me
fa0b693c
GM
23482#endif
23483
19650fd6
AS
23484int
23485main ()
23486{
ca81d7a0 23487return $ac_func ();
503d2be0
AS
23488 ;
23489 return 0;
23490}
23491_ACEOF
23492rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23493if { (ac_try="$ac_link"
23494case "(($ac_try" in
23495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23496 *) ac_try_echo=$ac_try;;
23497esac
23498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23499 (eval "$ac_link") 2>conftest.er1
503d2be0 23500 ac_status=$?
edfaf76d
LK
23501 grep -v '^ *+' conftest.er1 >conftest.err
23502 rm -f conftest.er1
23503 cat conftest.err >&5
c0d27fcc 23504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23505 (exit $ac_status); } && {
23506 test -z "$ac_c_werror_flag" ||
23507 test ! -s conftest.err
23508 } && test -s conftest$ac_exeext &&
23509 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23510 eval "$as_ac_var=yes"
23511else
23512 echo "$as_me: failed program was:" >&5
19650fd6
AS
23513sed 's/^/| /' conftest.$ac_ext >&5
23514
ca81d7a0 23515 eval "$as_ac_var=no"
503d2be0 23516fi
ca81d7a0 23517
f053c89f 23518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23519 conftest$ac_exeext conftest.$ac_ext
503d2be0 23520fi
ca81d7a0
JD
23521ac_res=`eval echo '${'$as_ac_var'}'`
23522 { echo "$as_me:$LINENO: result: $ac_res" >&5
23523echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23524if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23525 cat >>confdefs.h <<_ACEOF
503d2be0 23526#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23527_ACEOF
503d2be0 23528
fa0b693c 23529fi
503d2be0 23530done
fa0b693c 23531
503d2be0 23532if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23533 { echo "$as_me:$LINENO: checking for working fork" >&5
23534echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23535if test "${ac_cv_func_fork_works+set}" = set; then
23536 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23537else
503d2be0
AS
23538 if test "$cross_compiling" = yes; then
23539 ac_cv_func_fork_works=cross
23540else
23541 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23542/* confdefs.h. */
23543_ACEOF
23544cat confdefs.h >>conftest.$ac_ext
23545cat >>conftest.$ac_ext <<_ACEOF
23546/* end confdefs.h. */
23547$ac_includes_default
23548int
23549main ()
23550{
23551
23552 /* By Ruediger Kuhlmann. */
23553 return fork () < 0;
23554
23555 ;
23556 return 0;
23557}
503d2be0
AS
23558_ACEOF
23559rm -f conftest$ac_exeext
ca81d7a0
JD
23560if { (ac_try="$ac_link"
23561case "(($ac_try" in
23562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23563 *) ac_try_echo=$ac_try;;
23564esac
23565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23566 (eval "$ac_link") 2>&5
503d2be0 23567 ac_status=$?
c0d27fcc 23568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23570 { (case "(($ac_try" in
23571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23572 *) ac_try_echo=$ac_try;;
23573esac
23574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23575 (eval "$ac_try") 2>&5
503d2be0 23576 ac_status=$?
c0d27fcc 23577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23578 (exit $ac_status); }; }; then
23579 ac_cv_func_fork_works=yes
23580else
23581 echo "$as_me: program exited with status $ac_status" >&5
23582echo "$as_me: failed program was:" >&5
19650fd6
AS
23583sed 's/^/| /' conftest.$ac_ext >&5
23584
c0d27fcc 23585( exit $ac_status )
503d2be0
AS
23586ac_cv_func_fork_works=no
23587fi
ca81d7a0 23588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23589fi
ca81d7a0
JD
23590
23591
503d2be0 23592fi
ca81d7a0
JD
23593{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23594echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23595
6bae0ccf
DL
23596else
23597 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23598fi
23599if test "x$ac_cv_func_fork_works" = xcross; then
23600 case $host in
23601 *-*-amigaos* | *-*-msdosdjgpp*)
23602 # Override, as these systems have only a dummy fork() stub
23603 ac_cv_func_fork_works=no
23604 ;;
23605 *)
23606 ac_cv_func_fork_works=yes
23607 ;;
23608 esac
c0d27fcc
MR
23609 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23610echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23611fi
73b77ee5 23612ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23613if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23614 { echo "$as_me:$LINENO: checking for working vfork" >&5
23615echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23616if test "${ac_cv_func_vfork_works+set}" = set; then
23617 echo $ECHO_N "(cached) $ECHO_C" >&6
23618else
23619 if test "$cross_compiling" = yes; then
23620 ac_cv_func_vfork_works=cross
fa0b693c 23621else
503d2be0 23622 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23623/* confdefs.h. */
23624_ACEOF
23625cat confdefs.h >>conftest.$ac_ext
23626cat >>conftest.$ac_ext <<_ACEOF
23627/* end confdefs.h. */
73b77ee5 23628/* Thanks to Paul Eggert for this test. */
ca81d7a0 23629$ac_includes_default
19650fd6 23630#include <sys/wait.h>
f053c89f 23631#ifdef HAVE_VFORK_H
503d2be0 23632# include <vfork.h>
73b77ee5
GM
23633#endif
23634/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23635 argument registers are propagated back to the parent. The compiler
23636 is told about this with #include <vfork.h>, but some compilers
23637 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23638 static variable whose address is put into a register that is
23639 clobbered by the vfork. */
19650fd6 23640static void
fa0b693c 23641#ifdef __cplusplus
73b77ee5 23642sparc_address_test (int arg)
503d2be0 23643# else
73b77ee5 23644sparc_address_test (arg) int arg;
fa0b693c 23645#endif
fa0b693c 23646{
73b77ee5
GM
23647 static pid_t child;
23648 if (!child) {
23649 child = vfork ();
23650 if (child < 0) {
23651 perror ("vfork");
23652 _exit(2);
23653 }
23654 if (!child) {
23655 arg = getpid();
23656 write(-1, "", 0);
23657 _exit (arg);
23658 }
23659 }
23660}
503d2be0
AS
23661
23662int
23663main ()
23664{
73b77ee5
GM
23665 pid_t parent = getpid ();
23666 pid_t child;
fa0b693c 23667
19650fd6 23668 sparc_address_test (0);
fa0b693c 23669
73b77ee5 23670 child = vfork ();
fa0b693c 23671
73b77ee5 23672 if (child == 0) {
503d2be0
AS
23673 /* Here is another test for sparc vfork register problems. This
23674 test uses lots of local variables, at least as many local
23675 variables as main has allocated so far including compiler
23676 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23677 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23678 reuse the register of parent for one of the local variables,
23679 since it will think that parent can't possibly be used any more
23680 in this routine. Assigning to the local variable will thus
23681 munge parent in the parent process. */
73b77ee5
GM
23682 pid_t
23683 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23684 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23685 /* Convince the compiler that p..p7 are live; otherwise, it might
23686 use the same hardware register for all 8 local variables. */
23687 if (p != p1 || p != p2 || p != p3 || p != p4
23688 || p != p5 || p != p6 || p != p7)
23689 _exit(1);
fa0b693c 23690
503d2be0
AS
23691 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23692 from child file descriptors. If the child closes a descriptor
23693 before it execs or exits, this munges the parent's descriptor
23694 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23695 _exit(close(fileno(stdout)) != 0);
23696 } else {
23697 int status;
23698 struct stat st;
23699
23700 while (wait(&status) != child)
23701 ;
ca81d7a0 23702 return (
73b77ee5
GM
23703 /* Was there some problem with vforking? */
23704 child < 0
23705
23706 /* Did the child fail? (This shouldn't happen.) */
23707 || status
23708
23709 /* Did the vfork/compiler bug occur? */
23710 || parent != getpid()
fa0b693c 23711
73b77ee5
GM
23712 /* Did the file descriptor bug occur? */
23713 || fstat(fileno(stdout), &st) != 0
23714 );
23715 }
23716}
503d2be0
AS
23717_ACEOF
23718rm -f conftest$ac_exeext
ca81d7a0
JD
23719if { (ac_try="$ac_link"
23720case "(($ac_try" in
23721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23722 *) ac_try_echo=$ac_try;;
23723esac
23724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23725 (eval "$ac_link") 2>&5
503d2be0 23726 ac_status=$?
c0d27fcc 23727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23728 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23729 { (case "(($ac_try" in
23730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23731 *) ac_try_echo=$ac_try;;
23732esac
23733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23734 (eval "$ac_try") 2>&5
503d2be0 23735 ac_status=$?
c0d27fcc 23736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23737 (exit $ac_status); }; }; then
73b77ee5 23738 ac_cv_func_vfork_works=yes
fa0b693c 23739else
503d2be0
AS
23740 echo "$as_me: program exited with status $ac_status" >&5
23741echo "$as_me: failed program was:" >&5
19650fd6
AS
23742sed 's/^/| /' conftest.$ac_ext >&5
23743
c0d27fcc 23744( exit $ac_status )
503d2be0
AS
23745ac_cv_func_vfork_works=no
23746fi
ca81d7a0 23747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23748fi
ca81d7a0
JD
23749
23750
fa0b693c 23751fi
ca81d7a0
JD
23752{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23753echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23754
503d2be0
AS
23755fi;
23756if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23757 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23758 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23759echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23760fi
23761
503d2be0
AS
23762if test "x$ac_cv_func_vfork_works" = xyes; then
23763
c0d27fcc 23764cat >>confdefs.h <<\_ACEOF
503d2be0 23765#define HAVE_WORKING_VFORK 1
c0d27fcc 23766_ACEOF
503d2be0
AS
23767
23768else
23769
c0d27fcc 23770cat >>confdefs.h <<\_ACEOF
73b77ee5 23771#define vfork fork
c0d27fcc 23772_ACEOF
fa0b693c
GM
23773
23774fi
503d2be0
AS
23775if test "x$ac_cv_func_fork_works" = xyes; then
23776
c0d27fcc 23777cat >>confdefs.h <<\_ACEOF
503d2be0 23778#define HAVE_WORKING_FORK 1
c0d27fcc 23779_ACEOF
fa0b693c 23780
503d2be0 23781fi
647847ea 23782
c0d27fcc 23783
ca81d7a0
JD
23784{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23785echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23786if test "${emacs_cv_langinfo_codeset+set}" = set; then
23787 echo $ECHO_N "(cached) $ECHO_C" >&6
23788else
23789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23790/* confdefs.h. */
23791_ACEOF
23792cat confdefs.h >>conftest.$ac_ext
23793cat >>conftest.$ac_ext <<_ACEOF
23794/* end confdefs.h. */
6a3a24fa
JD
23795#include <langinfo.h>
23796int
23797main ()
23798{
23799char* cs = nl_langinfo(CODESET);
23800 ;
23801 return 0;
23802}
23803_ACEOF
23804rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23805if { (ac_try="$ac_link"
23806case "(($ac_try" in
23807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23808 *) ac_try_echo=$ac_try;;
23809esac
23810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23811 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23812 ac_status=$?
edfaf76d
LK
23813 grep -v '^ *+' conftest.er1 >conftest.err
23814 rm -f conftest.er1
23815 cat conftest.err >&5
6a3a24fa 23816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23817 (exit $ac_status); } && {
23818 test -z "$ac_c_werror_flag" ||
23819 test ! -s conftest.err
23820 } && test -s conftest$ac_exeext &&
23821 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23822 emacs_cv_langinfo_codeset=yes
23823else
23824 echo "$as_me: failed program was:" >&5
19650fd6
AS
23825sed 's/^/| /' conftest.$ac_ext >&5
23826
ca81d7a0 23827 emacs_cv_langinfo_codeset=no
6a3a24fa 23828fi
ca81d7a0 23829
f053c89f 23830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23831 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23832
23833fi
ca81d7a0
JD
23834{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23835echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23836if test $emacs_cv_langinfo_codeset = yes; then
23837
23838cat >>confdefs.h <<\_ACEOF
23839#define HAVE_LANGINFO_CODESET 1
23840_ACEOF
23841
23842fi
23843
ca81d7a0
JD
23844{ echo "$as_me:$LINENO: checking for size_t" >&5
23845echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23846if test "${ac_cv_type_size_t+set}" = set; then
23847 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23848else
503d2be0 23849 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23850/* confdefs.h. */
23851_ACEOF
23852cat confdefs.h >>conftest.$ac_ext
23853cat >>conftest.$ac_ext <<_ACEOF
23854/* end confdefs.h. */
503d2be0 23855$ac_includes_default
ca81d7a0 23856typedef size_t ac__type_new_;
503d2be0
AS
23857int
23858main ()
23859{
ca81d7a0 23860if ((ac__type_new_ *) 0)
503d2be0 23861 return 0;
ca81d7a0 23862if (sizeof (ac__type_new_))
503d2be0
AS
23863 return 0;
23864 ;
23865 return 0;
23866}
23867_ACEOF
23868rm -f conftest.$ac_objext
ca81d7a0
JD
23869if { (ac_try="$ac_compile"
23870case "(($ac_try" in
23871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23872 *) ac_try_echo=$ac_try;;
23873esac
23874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23875 (eval "$ac_compile") 2>conftest.er1
503d2be0 23876 ac_status=$?
edfaf76d
LK
23877 grep -v '^ *+' conftest.er1 >conftest.err
23878 rm -f conftest.er1
23879 cat conftest.err >&5
c0d27fcc 23880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23881 (exit $ac_status); } && {
23882 test -z "$ac_c_werror_flag" ||
23883 test ! -s conftest.err
23884 } && test -s conftest.$ac_objext; then
8730a8da
DL
23885 ac_cv_type_size_t=yes
23886else
503d2be0 23887 echo "$as_me: failed program was:" >&5
19650fd6
AS
23888sed 's/^/| /' conftest.$ac_ext >&5
23889
ca81d7a0 23890 ac_cv_type_size_t=no
8730a8da 23891fi
ca81d7a0
JD
23892
23893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23894fi
ca81d7a0
JD
23895{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23896echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23897if test $ac_cv_type_size_t = yes; then
503d2be0 23898
c0d27fcc
MR
23899cat >>confdefs.h <<_ACEOF
23900#define HAVE_SIZE_T 1
23901_ACEOF
23902
8730a8da
DL
23903
23904fi
23905
c0d27fcc 23906
ca81d7a0
JD
23907{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23908echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23909if test "${ac_cv_type_mbstate_t+set}" = set; then
23910 echo $ECHO_N "(cached) $ECHO_C" >&6
23911else
23912 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23913/* confdefs.h. */
23914_ACEOF
23915cat confdefs.h >>conftest.$ac_ext
23916cat >>conftest.$ac_ext <<_ACEOF
23917/* end confdefs.h. */
973a76b1
DL
23918$ac_includes_default
23919# include <wchar.h>
23920int
23921main ()
23922{
23923mbstate_t x; return sizeof x;
23924 ;
23925 return 0;
23926}
23927_ACEOF
23928rm -f conftest.$ac_objext
ca81d7a0
JD
23929if { (ac_try="$ac_compile"
23930case "(($ac_try" in
23931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23932 *) ac_try_echo=$ac_try;;
23933esac
23934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23935 (eval "$ac_compile") 2>conftest.er1
973a76b1 23936 ac_status=$?
edfaf76d
LK
23937 grep -v '^ *+' conftest.er1 >conftest.err
23938 rm -f conftest.er1
23939 cat conftest.err >&5
973a76b1 23940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23941 (exit $ac_status); } && {
23942 test -z "$ac_c_werror_flag" ||
23943 test ! -s conftest.err
23944 } && test -s conftest.$ac_objext; then
973a76b1
DL
23945 ac_cv_type_mbstate_t=yes
23946else
23947 echo "$as_me: failed program was:" >&5
19650fd6
AS
23948sed 's/^/| /' conftest.$ac_ext >&5
23949
ca81d7a0 23950 ac_cv_type_mbstate_t=no
973a76b1 23951fi
ca81d7a0
JD
23952
23953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23954fi
ca81d7a0
JD
23955{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23956echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23957 if test $ac_cv_type_mbstate_t = yes; then
23958
23959cat >>confdefs.h <<\_ACEOF
23960#define HAVE_MBSTATE_T 1
23961_ACEOF
23962
23963 else
23964
23965cat >>confdefs.h <<\_ACEOF
23966#define mbstate_t int
23967_ACEOF
23968
23969 fi
23970
ca81d7a0
JD
23971{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23972echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23973if test "${emacs_cv_c_restrict+set}" = set; then
23974 echo $ECHO_N "(cached) $ECHO_C" >&6
23975else
23976 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23977/* confdefs.h. */
23978_ACEOF
23979cat confdefs.h >>conftest.$ac_ext
23980cat >>conftest.$ac_ext <<_ACEOF
23981/* end confdefs.h. */
22044edf
DL
23982void fred (int *restrict x);
23983int
23984main ()
23985{
b936fae4 23986
22044edf
DL
23987 ;
23988 return 0;
23989}
c0d27fcc 23990_ACEOF
22044edf 23991rm -f conftest.$ac_objext
ca81d7a0
JD
23992if { (ac_try="$ac_compile"
23993case "(($ac_try" in
23994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23995 *) ac_try_echo=$ac_try;;
23996esac
23997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23998 (eval "$ac_compile") 2>conftest.er1
22044edf 23999 ac_status=$?
edfaf76d
LK
24000 grep -v '^ *+' conftest.er1 >conftest.err
24001 rm -f conftest.er1
24002 cat conftest.err >&5
22044edf 24003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24004 (exit $ac_status); } && {
24005 test -z "$ac_c_werror_flag" ||
24006 test ! -s conftest.err
24007 } && test -s conftest.$ac_objext; then
22044edf
DL
24008 emacs_cv_c_restrict=yes
24009else
24010 echo "$as_me: failed program was:" >&5
19650fd6
AS
24011sed 's/^/| /' conftest.$ac_ext >&5
24012
ca81d7a0 24013 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24014/* confdefs.h. */
24015_ACEOF
24016cat confdefs.h >>conftest.$ac_ext
24017cat >>conftest.$ac_ext <<_ACEOF
24018/* end confdefs.h. */
22044edf
DL
24019void fred (int *__restrict x);
24020int
24021main ()
24022{
c0d27fcc 24023
22044edf
DL
24024 ;
24025 return 0;
24026}
c0d27fcc 24027_ACEOF
22044edf 24028rm -f conftest.$ac_objext
ca81d7a0
JD
24029if { (ac_try="$ac_compile"
24030case "(($ac_try" in
24031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24032 *) ac_try_echo=$ac_try;;
24033esac
24034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24035 (eval "$ac_compile") 2>conftest.er1
22044edf 24036 ac_status=$?
edfaf76d
LK
24037 grep -v '^ *+' conftest.er1 >conftest.err
24038 rm -f conftest.er1
24039 cat conftest.err >&5
22044edf 24040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24041 (exit $ac_status); } && {
24042 test -z "$ac_c_werror_flag" ||
24043 test ! -s conftest.err
24044 } && test -s conftest.$ac_objext; then
22044edf
DL
24045 emacs_cv_c_restrict=__restrict
24046else
24047 echo "$as_me: failed program was:" >&5
19650fd6
AS
24048sed 's/^/| /' conftest.$ac_ext >&5
24049
ca81d7a0 24050 emacs_cv_c_restrict=no
ba4481b5 24051fi
ca81d7a0
JD
24052
24053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24054fi
ca81d7a0
JD
24055
24056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24057fi
ca81d7a0
JD
24058{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24059echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24060case "$emacs_cv_c_restrict" in
24061 yes) emacs_restrict=restrict;;
24062 no) emacs_restrict="";;
24063 *) emacs_restrict="$emacs_cv_c_restrict";;
24064esac
24065if test "$emacs_restrict" != __restrict; then
b936fae4 24066
22044edf
DL
24067cat >>confdefs.h <<_ACEOF
24068#define __restrict $emacs_restrict
c0d27fcc 24069_ACEOF
ba4481b5
DL
24070
24071fi
ba4481b5 24072
ca81d7a0
JD
24073{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24074echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24075if test "${emacs_cv_c_restrict_arr+set}" = set; then
24076 echo $ECHO_N "(cached) $ECHO_C" >&6
24077else
24078 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24079/* confdefs.h. */
24080_ACEOF
24081cat confdefs.h >>conftest.$ac_ext
24082cat >>conftest.$ac_ext <<_ACEOF
24083/* end confdefs.h. */
22044edf
DL
24084void fred (int x[__restrict]);
24085int
24086main ()
24087{
b936fae4 24088
22044edf
DL
24089 ;
24090 return 0;
24091}
c0d27fcc 24092_ACEOF
22044edf 24093rm -f conftest.$ac_objext
ca81d7a0
JD
24094if { (ac_try="$ac_compile"
24095case "(($ac_try" in
24096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24097 *) ac_try_echo=$ac_try;;
24098esac
24099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24100 (eval "$ac_compile") 2>conftest.er1
22044edf 24101 ac_status=$?
edfaf76d
LK
24102 grep -v '^ *+' conftest.er1 >conftest.err
24103 rm -f conftest.er1
24104 cat conftest.err >&5
22044edf 24105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24106 (exit $ac_status); } && {
24107 test -z "$ac_c_werror_flag" ||
24108 test ! -s conftest.err
24109 } && test -s conftest.$ac_objext; then
22044edf
DL
24110 emacs_cv_c_restrict_arr=yes
24111else
24112 echo "$as_me: failed program was:" >&5
19650fd6
AS
24113sed 's/^/| /' conftest.$ac_ext >&5
24114
ca81d7a0 24115 emacs_cv_c_restrict_arr=no
ba4481b5 24116fi
ca81d7a0
JD
24117
24118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24119fi
ca81d7a0
JD
24120{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24121echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24122if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24123
c0d27fcc 24124cat >>confdefs.h <<\_ACEOF
22044edf 24125#define __restrict_arr __restrict
c0d27fcc 24126_ACEOF
ba4481b5 24127
ba4481b5
DL
24128fi
24129
c0d27fcc 24130
c0d27fcc 24131
22044edf
DL
24132# Set up the CFLAGS for real compilation, so we can substitute it.
24133CFLAGS="$REAL_CFLAGS"
24134CPPFLAGS="$REAL_CPPFLAGS"
24135
24136#### Find out which version of Emacs this is.
24137version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24138 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24139if test x"${version}" = x; then
24140 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24141echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24142 { (exit 1); exit 1; }; }
24143fi
24144
24145### Specify what sort of things we'll be editing into Makefile and config.h.
24146### Use configuration here uncanonicalized to avoid exceeding size limits.
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
6a3a24fa 24179
22044edf
DL
24180
24181
24182cat >>confdefs.h <<_ACEOF
24183#define EMACS_CONFIGURATION "${canonical}"
24184_ACEOF
24185
24186
24187cat >>confdefs.h <<_ACEOF
24188#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24189_ACEOF
24190
24191
24192cat >>confdefs.h <<_ACEOF
24193#define config_machfile "${machfile}"
24194_ACEOF
24195
24196
24197cat >>confdefs.h <<_ACEOF
24198#define config_opsysfile "${opsysfile}"
24199_ACEOF
24200
24201
24202cat >>confdefs.h <<_ACEOF
24203#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24204_ACEOF
24205
24206
24207cat >>confdefs.h <<_ACEOF
24208#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24209_ACEOF
24210
24211
24212cat >>confdefs.h <<_ACEOF
24213#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24214_ACEOF
24215
24216
24217cat >>confdefs.h <<_ACEOF
24218#define UNEXEC_SRC ${UNEXEC_SRC}
24219_ACEOF
24220
24221
24222if test "${HAVE_X_WINDOWS}" = "yes" ; then
24223
24224cat >>confdefs.h <<\_ACEOF
24225#define HAVE_X_WINDOWS 1
24226_ACEOF
24227
24228fi
24229if test "${USE_X_TOOLKIT}" != "none" ; then
24230
24231cat >>confdefs.h <<\_ACEOF
24232#define USE_X_TOOLKIT 1
24233_ACEOF
24234
73d798d5
SM
24235 if test "${USE_X_TOOLKIT}" == "LUCID"; then
24236
24237cat >>confdefs.h <<\_ACEOF
24238#define USE_LUCID 1
24239_ACEOF
24240
24241 elif test "${USE_X_TOOLKIT}" == "MOTIF"; then
24242
24243cat >>confdefs.h <<\_ACEOF
24244#define USE_MOTIF 1
24245_ACEOF
24246
24247 fi
22044edf
DL
24248fi
24249if test "${HAVE_X11}" = "yes" ; then
24250
24251cat >>confdefs.h <<\_ACEOF
24252#define HAVE_X11 1
24253_ACEOF
24254
22044edf
DL
24255fi
24256if test "${HAVE_MENUS}" = "yes" ; then
24257
24258cat >>confdefs.h <<\_ACEOF
24259#define HAVE_MENUS 1
24260_ACEOF
24261
24262fi
24263if test "${GNU_MALLOC}" = "yes" ; then
24264
24265cat >>confdefs.h <<\_ACEOF
24266#define GNU_MALLOC 1
24267_ACEOF
24268
24269fi
24270if test "${REL_ALLOC}" = "yes" ; then
24271
24272cat >>confdefs.h <<\_ACEOF
24273#define REL_ALLOC 1
24274_ACEOF
24275
24276fi
24277
24278
24279
c0d27fcc
MR
24280
24281
5afbeb22 24282
ba4481b5 24283#### Report on what we decided to do.
488dd4c4
JD
24284#### Report GTK as a toolkit, even if it doesn't use Xt.
24285#### It makes printing result more understandable as using GTK sets
24286#### toolkit_scroll_bars to yes by default.
24287if test "${HAVE_GTK}" = "yes"; then
24288 USE_X_TOOLKIT=GTK
24289fi
24290
ba4481b5
DL
24291echo "
24292Configured for \`${canonical}'.
24293
24294 Where should the build process find the source code? ${srcdir}
24295 What operating system and machine description files should Emacs use?
24296 \`${opsysfile}' and \`${machfile}'
24297 What compiler should emacs be built with? ${CC} ${CFLAGS}
24298 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24299 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24300 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24301 What window system should Emacs use? ${window_system}
8e967cf7 24302 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24303
24304if test -n "${x_includes}"; then
24305echo " Where do we find X Windows header files? ${x_includes}"
24306else
24307echo " Where do we find X Windows header files? Standard dirs"
24308fi
24309if test -n "${x_libraries}"; then
24310echo " Where do we find X Windows libraries? ${x_libraries}"
24311else
24312echo " Where do we find X Windows libraries? Standard dirs"
24313fi
24314
24315echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24316echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24317echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24318echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24319echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24320echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24321echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24322echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24323echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27
EZ
24324echo " Does Emacs use a font backend? ${USE_FONT_BACKEND}"
24325
24326if test "${USE_FONT_BACKEND}" = "yes"; then
24327 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24328 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24329 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24330 echo " Does Emacs use -lxft? ${HAVE_XFT}"
24331fi
ba4481b5
DL
24332echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24333echo
24334
d0098f13
JD
24335if test $USE_XASSERTS = yes; then
24336 echo " Compiling with asserts turned on."
d0098f13 24337 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24338fi
05cf15c6 24339
ca34d75a
JD
24340echo
24341
a2d3b5bd
JD
24342if test "$USE_X_TOOLKIT" = GTK; then
24343 case "$canonical" in
24344 *cygwin*)
24345 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24346 will probably get a crash on startup. If this happens, please use another
24347 toolkit for Emacs. See etc/PROBLEMS for more information."
24348 ;;
24349 esac
24350fi
24351
05cf15c6 24352
f0e04acc
GM
24353if test "$HAVE_CARBON" = "yes"; then
24354 echo
24355 echo "Warning: The Mac Carbon port is currently unsupported and has
24356known problems. It is not recommended for use by non-developers.
24357Read the emacs-devel archives for more information."
24358 echo
24359fi
24360
131e4133
MA
24361if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24362 echo "D-Bus integration has been tested for GNU/Linux only."
24363 echo
24364fi
24365
05cf15c6 24366
ba4481b5
DL
24367# Remove any trailing slashes in these variables.
24368test "${prefix}" != NONE &&
24369 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24370test "${exec_prefix}" != NONE &&
24371 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24372
d0e9bfd2
GM
24373## Check if the C preprocessor will convert `..' to `. .'. If so, set
24374## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24375## from Makefile.c can correctly provide the arg `-traditional' to the
24376## C preprocessor.
24377
503d2be0 24378cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24379/* confdefs.h. */
24380_ACEOF
24381cat confdefs.h >>conftest.$ac_ext
24382cat >>conftest.$ac_ext <<_ACEOF
24383/* end confdefs.h. */
d0e9bfd2 24384yes..yes
503d2be0 24385_ACEOF
d0e9bfd2 24386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24387 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24388 CPP_NEED_TRADITIONAL=no
24389else
d0e9bfd2
GM
24390 CPP_NEED_TRADITIONAL=yes
24391fi
24392rm -f conftest*
24393
c0d27fcc 24394
f657c21b 24395ac_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
24396
24397ac_config_commands="$ac_config_commands default"
24398
503d2be0 24399cat >confcache <<\_ACEOF
ba4481b5
DL
24400# This file is a shell script that caches the results of configure
24401# tests run on this system so they can be shared between configure
503d2be0
AS
24402# scripts and configure runs, see configure's option --config-cache.
24403# It is not useful on other systems. If it contains results you don't
24404# want to keep, you may remove or edit it.
ba4481b5 24405#
503d2be0
AS
24406# config.status only pays attention to the cache file if you give it
24407# the --recheck option to rerun configure.
ba4481b5 24408#
6bae0ccf 24409# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24410# loading this file, other *unset* `ac_cv_foo' will be assigned the
24411# following values.
24412
24413_ACEOF
24414
ba4481b5
DL
24415# The following way of writing the cache mishandles newlines in values,
24416# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24417# So, we kill variables containing newlines.
ba4481b5
DL
24418# Ultrix sh set writes to stderr and can't be redirected directly,
24419# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24420(
24421 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24422 eval ac_val=\$$ac_var
24423 case $ac_val in #(
24424 *${as_nl}*)
24425 case $ac_var in #(
24426 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24427echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24428 esac
24429 case $ac_var in #(
24430 _ | IFS | as_nl) ;; #(
24431 *) $as_unset $ac_var ;;
24432 esac ;;
24433 esac
24434 done
24435
503d2be0 24436 (set) 2>&1 |
ca81d7a0
JD
24437 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24438 *${as_nl}ac_space=\ *)
503d2be0
AS
24439 # `set' does not quote correctly, so add quotes (double-quote
24440 # substitution turns \\\\ into \\, and sed turns \\ into \).
24441 sed -n \
edfaf76d
LK
24442 "s/'/'\\\\''/g;
24443 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24444 ;; #(
503d2be0
AS
24445 *)
24446 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24447 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24448 ;;
ca81d7a0
JD
24449 esac |
24450 sort
24451) |
503d2be0 24452 sed '
ca81d7a0 24453 /^ac_cv_env_/b end
503d2be0 24454 t clear
ca81d7a0 24455 :clear
503d2be0
AS
24456 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24457 t end
ca81d7a0
JD
24458 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24459 :end' >>confcache
24460if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24461 if test -w "$cache_file"; then
24462 test "x$cache_file" != "x/dev/null" &&
24463 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24464echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24465 cat confcache >$cache_file
ba4481b5 24466 else
ca81d7a0
JD
24467 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24468echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24469 fi
24470fi
24471rm -f confcache
24472
ba4481b5
DL
24473test "x$prefix" = xNONE && prefix=$ac_default_prefix
24474# Let make expand exec_prefix.
24475test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24476
ba4481b5
DL
24477DEFS=-DHAVE_CONFIG_H
24478
6bae0ccf
DL
24479ac_libobjs=
24480ac_ltlibobjs=
24481for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24482 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24483 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24484 ac_i=`echo "$ac_i" | sed "$ac_script"`
24485 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24486 # will be set to the directory where LIBOBJS objects are built.
24487 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24488 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24489done
24490LIBOBJS=$ac_libobjs
24491
24492LTLIBOBJS=$ac_ltlibobjs
24493
24494
c0d27fcc 24495
ba4481b5 24496: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24497ac_clean_files_save=$ac_clean_files
24498ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24499{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24500echo "$as_me: creating $CONFIG_STATUS" >&6;}
24501cat >$CONFIG_STATUS <<_ACEOF
24502#! $SHELL
c0d27fcc 24503# Generated by $as_me.
ba4481b5 24504# Run this file to recreate the current configuration.
ba4481b5 24505# Compiler output produced by configure, useful for debugging
503d2be0 24506# configure, is in config.log if it exists.
ba4481b5 24507
503d2be0 24508debug=false
19650fd6
AS
24509ac_cs_recheck=false
24510ac_cs_silent=false
503d2be0 24511SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24512_ACEOF
24513
24514cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24515## --------------------- ##
24516## M4sh Initialization. ##
24517## --------------------- ##
24518
f053c89f
CY
24519# Be more Bourne compatible
24520DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24521if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24522 emulate sh
24523 NULLCMD=:
6bae0ccf
DL
24524 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24525 # is contrary to our usage. Disable this feature.
24526 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24527 setopt NO_GLOB_SUBST
24528else
f053c89f
CY
24529 case `(set -o) 2>/dev/null` in
24530 *posix*) set -o posix ;;
24531esac
24532
503d2be0 24533fi
f053c89f
CY
24534
24535
503d2be0 24536
ca81d7a0
JD
24537
24538# PATH needs CR
24539# Avoid depending upon Character Ranges.
24540as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24541as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24542as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24543as_cr_digits='0123456789'
24544as_cr_alnum=$as_cr_Letters$as_cr_digits
24545
24546# The user is always right.
24547if test "${PATH_SEPARATOR+set}" != set; then
24548 echo "#! /bin/sh" >conf$$.sh
24549 echo "exit 0" >>conf$$.sh
24550 chmod +x conf$$.sh
24551 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24552 PATH_SEPARATOR=';'
24553 else
24554 PATH_SEPARATOR=:
24555 fi
24556 rm -f conf$$.sh
503d2be0
AS
24557fi
24558
c0d27fcc 24559# Support unset when possible.
edfaf76d 24560if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24561 as_unset=unset
24562else
24563 as_unset=false
24564fi
24565
6bae0ccf 24566
ca81d7a0
JD
24567# IFS
24568# We need space, tab and new line, in precisely that order. Quoting is
24569# there to prevent editors from complaining about space-tab.
24570# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24571# splitting by setting IFS to empty value.)
24572as_nl='
24573'
24574IFS=" "" $as_nl"
24575
24576# Find who we are. Look in the path if we contain no directory separator.
24577case $0 in
24578 *[\\/]* ) as_myself=$0 ;;
24579 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24580for as_dir in $PATH
24581do
24582 IFS=$as_save_IFS
24583 test -z "$as_dir" && as_dir=.
24584 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24585done
24586IFS=$as_save_IFS
24587
24588 ;;
24589esac
24590# We did not find ourselves, most probably we were run as `sh COMMAND'
24591# in which case we are not to be found in the path.
24592if test "x$as_myself" = x; then
24593 as_myself=$0
24594fi
24595if test ! -f "$as_myself"; then
24596 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24597 { (exit 1); exit 1; }
24598fi
24599
6bae0ccf 24600# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24601for as_var in ENV MAIL MAILPATH
24602do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24603done
6bae0ccf
DL
24604PS1='$ '
24605PS2='> '
24606PS4='+ '
24607
24608# NLS nuisances.
19650fd6
AS
24609for as_var in \
24610 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24611 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24612 LC_TELEPHONE LC_TIME
6bae0ccf 24613do
edfaf76d 24614 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24615 eval $as_var=C; export $as_var
24616 else
ca81d7a0 24617 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24618 fi
24619done
24620
24621# Required to use basename.
ca81d7a0
JD
24622if expr a : '\(a\)' >/dev/null 2>&1 &&
24623 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24624 as_expr=expr
24625else
24626 as_expr=false
24627fi
24628
ca81d7a0 24629if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24630 as_basename=basename
24631else
24632 as_basename=false
24633fi
c0d27fcc
MR
24634
24635
503d2be0 24636# Name of the executable.
ca81d7a0 24637as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24638$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24639 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24640 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24641echo X/"$0" |
ca81d7a0
JD
24642 sed '/^.*\/\([^/][^/]*\)\/*$/{
24643 s//\1/
24644 q
24645 }
24646 /^X\/\(\/\/\)$/{
24647 s//\1/
24648 q
24649 }
24650 /^X\/\(\/\).*/{
24651 s//\1/
24652 q
24653 }
24654 s/.*/./; q'`
c0d27fcc 24655
ca81d7a0
JD
24656# CDPATH.
24657$as_unset CDPATH
c0d27fcc
MR
24658
24659
c0d27fcc 24660
c0d27fcc 24661 as_lineno_1=$LINENO
c0d27fcc 24662 as_lineno_2=$LINENO
c0d27fcc 24663 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24664 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24665
24666 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24667 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24668 # line-number line after each line using $LINENO; the second 'sed'
24669 # does the real work. The second script uses 'N' to pair each
24670 # line-number line with the line containing $LINENO, and appends
24671 # trailing '-' during substitution so that $LINENO is not a special
24672 # case at line end.
c0d27fcc 24673 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24674 # scripts with optimization help from Paolo Bonzini. Blame Lee
24675 # E. McMahon (1931-1989) for sed's syntax. :-)
24676 sed -n '
24677 p
24678 /[$]LINENO/=
24679 ' <$as_myself |
c0d27fcc 24680 sed '
ca81d7a0
JD
24681 s/[$]LINENO.*/&-/
24682 t lineno
24683 b
24684 :lineno
c0d27fcc 24685 N
ca81d7a0
JD
24686 :loop
24687 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24688 t loop
ca81d7a0 24689 s/-\n.*//
c0d27fcc 24690 ' >$as_me.lineno &&
ca81d7a0
JD
24691 chmod +x "$as_me.lineno" ||
24692 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24693 { (exit 1); exit 1; }; }
24694
24695 # Don't try to exec as it changes $[0], causing all sort of problems
24696 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24697 # original and so on. Autoconf is especially sensitive to this).
24698 . "./$as_me.lineno"
c0d27fcc
MR
24699 # Exit status is that of the last command.
24700 exit
24701}
24702
24703
ca81d7a0
JD
24704if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24705 as_dirname=dirname
24706else
24707 as_dirname=false
24708fi
24709
24710ECHO_C= ECHO_N= ECHO_T=
24711case `echo -n x` in
24712-n*)
24713 case `echo 'x\c'` in
24714 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24715 *) ECHO_C='\c';;
24716 esac;;
24717*)
24718 ECHO_N='-n';;
c0d27fcc 24719esac
503d2be0 24720
ca81d7a0
JD
24721if expr a : '\(a\)' >/dev/null 2>&1 &&
24722 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24723 as_expr=expr
24724else
24725 as_expr=false
24726fi
24727
24728rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24729if test -d conf$$.dir; then
24730 rm -f conf$$.dir/conf$$.file
24731else
24732 rm -f conf$$.dir
24733 mkdir conf$$.dir
24734fi
503d2be0
AS
24735echo >conf$$.file
24736if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24737 as_ln_s='ln -s'
24738 # ... but there are two gotchas:
24739 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24740 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24741 # In both cases, we have to default to `cp -p'.
24742 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24743 as_ln_s='cp -p'
503d2be0
AS
24744elif ln conf$$.file conf$$ 2>/dev/null; then
24745 as_ln_s=ln
24746else
24747 as_ln_s='cp -p'
24748fi
ca81d7a0
JD
24749rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24750rmdir conf$$.dir 2>/dev/null
503d2be0 24751
6bae0ccf
DL
24752if mkdir -p . 2>/dev/null; then
24753 as_mkdir_p=:
24754else
edfaf76d 24755 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24756 as_mkdir_p=false
24757fi
24758
f053c89f
CY
24759if test -x / >/dev/null 2>&1; then
24760 as_test_x='test -x'
ca81d7a0 24761else
f053c89f
CY
24762 if ls -dL / >/dev/null 2>&1; then
24763 as_ls_L_option=L
24764 else
24765 as_ls_L_option=
24766 fi
24767 as_test_x='
24768 eval sh -c '\''
24769 if test -d "$1"; then
24770 test -d "$1/.";
24771 else
24772 case $1 in
24773 -*)set "./$1";;
24774 esac;
24775 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24776 ???[sx]*):;;*)false;;esac;fi
24777 '\'' sh
24778 '
ca81d7a0 24779fi
f053c89f 24780as_executable_p=$as_test_x
503d2be0 24781
c0d27fcc 24782# Sed expression to map a string onto a valid CPP name.
edfaf76d 24783as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24784
24785# Sed expression to map a string onto a valid variable name.
edfaf76d 24786as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24787
503d2be0 24788
503d2be0
AS
24789exec 6>&1
24790
ca81d7a0 24791# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24792# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24793# values after options handling.
24794ac_log="
5d374ce1 24795This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24796generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24797
24798 CONFIG_FILES = $CONFIG_FILES
24799 CONFIG_HEADERS = $CONFIG_HEADERS
24800 CONFIG_LINKS = $CONFIG_LINKS
24801 CONFIG_COMMANDS = $CONFIG_COMMANDS
24802 $ $0 $@
24803
ca81d7a0
JD
24804on `(hostname || uname -n) 2>/dev/null | sed 1q`
24805"
24806
503d2be0
AS
24807_ACEOF
24808
ca81d7a0 24809cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24810# Files that config.status was made for.
ca81d7a0
JD
24811config_files="$ac_config_files"
24812config_headers="$ac_config_headers"
24813config_commands="$ac_config_commands"
503d2be0 24814
ca81d7a0 24815_ACEOF
503d2be0 24816
c0d27fcc 24817cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24818ac_cs_usage="\
24819\`$as_me' instantiates files from templates according to the
24820current configuration.
24821
24822Usage: $0 [OPTIONS] [FILE]...
24823
24824 -h, --help print this help, then exit
f053c89f 24825 -V, --version print version number and configuration settings, then exit
19650fd6 24826 -q, --quiet do not print progress messages
503d2be0
AS
24827 -d, --debug don't remove temporary files
24828 --recheck update $as_me by reconfiguring in the same conditions
24829 --file=FILE[:TEMPLATE]
edfaf76d 24830 instantiate the configuration file FILE
503d2be0 24831 --header=FILE[:TEMPLATE]
edfaf76d 24832 instantiate the configuration header FILE
503d2be0
AS
24833
24834Configuration files:
24835$config_files
24836
24837Configuration headers:
24838$config_headers
24839
24840Configuration commands:
24841$config_commands
24842
24843Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24844
ca81d7a0 24845_ACEOF
c0d27fcc 24846cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24847ac_cs_version="\\
5d374ce1 24848emacs config.status 23.0.60
f053c89f 24849configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24850 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24851
ca81d7a0 24852Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24853This config.status script is free software; the Free Software Foundation
24854gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24855
24856ac_pwd='$ac_pwd'
24857srcdir='$srcdir'
24858INSTALL='$INSTALL'
c0d27fcc 24859_ACEOF
503d2be0 24860
c0d27fcc 24861cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24862# If no file are specified by the user, then we need to provide default
24863# value. By we need to know if files were specified by the user.
24864ac_need_defaults=:
24865while test $# != 0
ba4481b5 24866do
503d2be0
AS
24867 case $1 in
24868 --*=*)
ca81d7a0
JD
24869 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24870 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24871 ac_shift=:
24872 ;;
ca81d7a0 24873 *)
6bae0ccf
DL
24874 ac_option=$1
24875 ac_optarg=$2
24876 ac_shift=shift
503d2be0 24877 ;;
503d2be0
AS
24878 esac
24879
6bae0ccf 24880 case $ac_option in
503d2be0 24881 # Handling of the options.
19650fd6
AS
24882 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24883 ac_cs_recheck=: ;;
ca81d7a0
JD
24884 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24885 echo "$ac_cs_version"; exit ;;
24886 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24887 debug=: ;;
24888 --file | --fil | --fi | --f )
6bae0ccf
DL
24889 $ac_shift
24890 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24891 ac_need_defaults=false;;
24892 --header | --heade | --head | --hea )
6bae0ccf
DL
24893 $ac_shift
24894 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24895 ac_need_defaults=false;;
ca81d7a0
JD
24896 --he | --h)
24897 # Conflict between --help and --header
24898 { echo "$as_me: error: ambiguous option: $1
24899Try \`$0 --help' for more information." >&2
24900 { (exit 1); exit 1; }; };;
24901 --help | --hel | -h )
24902 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24903 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24904 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24905 ac_cs_silent=: ;;
503d2be0
AS
24906
24907 # This is an error.
ca81d7a0
JD
24908 -*) { echo "$as_me: error: unrecognized option: $1
24909Try \`$0 --help' for more information." >&2
503d2be0
AS
24910 { (exit 1); exit 1; }; } ;;
24911
ca81d7a0
JD
24912 *) ac_config_targets="$ac_config_targets $1"
24913 ac_need_defaults=false ;;
503d2be0 24914
ba4481b5 24915 esac
503d2be0 24916 shift
ba4481b5
DL
24917done
24918
19650fd6
AS
24919ac_configure_extra_args=
24920
24921if $ac_cs_silent; then
24922 exec 6>/dev/null
24923 ac_configure_extra_args="$ac_configure_extra_args --silent"
24924fi
24925
24926_ACEOF
24927cat >>$CONFIG_STATUS <<_ACEOF
24928if \$ac_cs_recheck; then
ca81d7a0
JD
24929 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24930 CONFIG_SHELL=$SHELL
24931 export CONFIG_SHELL
24932 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24933fi
24934
503d2be0 24935_ACEOF
ca81d7a0
JD
24936cat >>$CONFIG_STATUS <<\_ACEOF
24937exec 5>>config.log
24938{
24939 echo
24940 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24941## Running $as_me. ##
24942_ASBOX
24943 echo "$ac_log"
24944} >&5
ba4481b5 24945
ca81d7a0 24946_ACEOF
c0d27fcc 24947cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24948#
ca81d7a0 24949# INIT-COMMANDS
503d2be0 24950#
503d2be0
AS
24951GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24952
c0d27fcc
MR
24953_ACEOF
24954
c0d27fcc 24955cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24956
24957# Handling of arguments.
503d2be0
AS
24958for ac_config_target in $ac_config_targets
24959do
ca81d7a0
JD
24960 case $ac_config_target in
24961 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24962 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24963 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24964 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24965 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24966 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24967 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24968 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24969 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24970 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24971 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24972 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24973 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24974
c0d27fcc 24975 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24976echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24977 { (exit 1); exit 1; }; };;
24978 esac
ba4481b5 24979done
503d2be0 24980
ca81d7a0 24981
503d2be0
AS
24982# If the user did not use the arguments to specify the items to instantiate,
24983# then the envvar interface is used. Set only those that are not.
24984# We use the long form for the default assignment because of an extremely
24985# bizarre bug on SunOS 4.1.3.
24986if $ac_need_defaults; then
24987 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24988 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24989 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24990fi
503d2be0 24991
19650fd6 24992# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24993# simply because there is no reason against having it here, and in addition,
19650fd6 24994# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24995# Hook for its removal unless debugging.
24996# Note that there is a small window in which the directory will not be cleaned:
24997# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24998$debug ||
24999{
ca81d7a0
JD
25000 tmp=
25001 trap 'exit_status=$?
25002 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25003' 0
503d2be0
AS
25004 trap '{ (exit 1); exit 1; }' 1 2 13 15
25005}
503d2be0 25006# Create a (secure) tmp directory for tmp files.
19650fd6 25007
503d2be0 25008{
ca81d7a0 25009 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25010 test -n "$tmp" && test -d "$tmp"
25011} ||
25012{
ca81d7a0
JD
25013 tmp=./conf$$-$RANDOM
25014 (umask 077 && mkdir "$tmp")
503d2be0
AS
25015} ||
25016{
19650fd6 25017 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25018 { (exit 1); exit 1; }
25019}
25020
503d2be0 25021#
ca81d7a0 25022# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
25023#
25024
25025# No need to generate the scripts if there are no CONFIG_FILES.
25026# This happens for instance when ./config.status config.h
ca81d7a0
JD
25027if test -n "$CONFIG_FILES"; then
25028
25029_ACEOF
25030
25031
25032
25033ac_delim='%!_!# '
25034for ac_last_try in false false false false false :; do
25035 cat >conf$$subs.sed <<_ACEOF
25036SHELL!$SHELL$ac_delim
25037PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25038PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25039PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25040PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25041PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25042PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25043exec_prefix!$exec_prefix$ac_delim
25044prefix!$prefix$ac_delim
25045program_transform_name!$program_transform_name$ac_delim
25046bindir!$bindir$ac_delim
25047sbindir!$sbindir$ac_delim
25048libexecdir!$libexecdir$ac_delim
25049datarootdir!$datarootdir$ac_delim
25050datadir!$datadir$ac_delim
25051sysconfdir!$sysconfdir$ac_delim
25052sharedstatedir!$sharedstatedir$ac_delim
25053localstatedir!$localstatedir$ac_delim
25054includedir!$includedir$ac_delim
25055oldincludedir!$oldincludedir$ac_delim
25056docdir!$docdir$ac_delim
25057infodir!$infodir$ac_delim
25058htmldir!$htmldir$ac_delim
25059dvidir!$dvidir$ac_delim
25060pdfdir!$pdfdir$ac_delim
25061psdir!$psdir$ac_delim
25062libdir!$libdir$ac_delim
25063localedir!$localedir$ac_delim
25064mandir!$mandir$ac_delim
25065DEFS!$DEFS$ac_delim
25066ECHO_C!$ECHO_C$ac_delim
25067ECHO_N!$ECHO_N$ac_delim
25068ECHO_T!$ECHO_T$ac_delim
25069LIBS!$LIBS$ac_delim
25070build_alias!$build_alias$ac_delim
25071host_alias!$host_alias$ac_delim
25072target_alias!$target_alias$ac_delim
25073MAINT!$MAINT$ac_delim
25074build!$build$ac_delim
25075build_cpu!$build_cpu$ac_delim
25076build_vendor!$build_vendor$ac_delim
25077build_os!$build_os$ac_delim
25078host!$host$ac_delim
25079host_cpu!$host_cpu$ac_delim
25080host_vendor!$host_vendor$ac_delim
25081host_os!$host_os$ac_delim
25082CC!$CC$ac_delim
25083CFLAGS!$CFLAGS$ac_delim
25084LDFLAGS!$LDFLAGS$ac_delim
25085CPPFLAGS!$CPPFLAGS$ac_delim
25086ac_ct_CC!$ac_ct_CC$ac_delim
25087EXEEXT!$EXEEXT$ac_delim
25088OBJEXT!$OBJEXT$ac_delim
25089CPP!$CPP$ac_delim
25090GREP!$GREP$ac_delim
25091EGREP!$EGREP$ac_delim
25092LN_S!$LN_S$ac_delim
25093INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25094INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25095INSTALL_DATA!$INSTALL_DATA$ac_delim
25096RANLIB!$RANLIB$ac_delim
25097INSTALL_INFO!$INSTALL_INFO$ac_delim
25098GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25099MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25100LIBSOUND!$LIBSOUND$ac_delim
25101PKG_CONFIG!$PKG_CONFIG$ac_delim
25102ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25103ALSA_LIBS!$ALSA_LIBS$ac_delim
25104CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25105SET_MAKE!$SET_MAKE$ac_delim
25106XMKMF!$XMKMF$ac_delim
cfe440b8 25107HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25108RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25109RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25110GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25111GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25112DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25113DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
25114XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25115XFT_LIBS!$XFT_LIBS$ac_delim
25116FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25117FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25118FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25119FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25120LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25121LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25122M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25123M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25124ALLOCA!$ALLOCA$ac_delim
25125liblockfile!$liblockfile$ac_delim
25126LIBOBJS!$LIBOBJS$ac_delim
25127NEED_SETGID!$NEED_SETGID$ac_delim
25128KMEM_GROUP!$KMEM_GROUP$ac_delim
25129GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25130GETOPT_H!$GETOPT_H$ac_delim
25131GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25132version!$version$ac_delim
ca81d7a0
JD
25133_ACEOF
25134
25135 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25136 break
25137 elif $ac_last_try; then
25138 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25139echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25140 { (exit 1); exit 1; }; }
25141 else
25142 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25143 fi
ca81d7a0
JD
25144done
25145
25146ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25147if test -n "$ac_eof"; then
25148 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25149 ac_eof=`expr $ac_eof + 1`
25150fi
503d2be0 25151
c0d27fcc 25152cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25153cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25154/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25155_ACEOF
25156sed '
25157s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25158s/^/s,@/; s/!/@,|#_!!_#|/
25159:n
25160t n
25161s/'"$ac_delim"'$/,g/; t
25162s/$/\\/; p
25163N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25164' >>$CONFIG_STATUS <conf$$subs.sed
25165rm -f conf$$subs.sed
25166cat >>$CONFIG_STATUS <<_ACEOF
25167CEOF$ac_eof
25168_ACEOF
503d2be0 25169
ca81d7a0
JD
25170
25171ac_delim='%!_!# '
25172for ac_last_try in false false false false false :; do
25173 cat >conf$$subs.sed <<_ACEOF
0bd50841 25174configuration!$configuration$ac_delim
7f0942ba
KH
25175canonical!$canonical$ac_delim
25176srcdir!$srcdir$ac_delim
1bb9a689
MB
25177lispdir!$lispdir$ac_delim
25178locallisppath!$locallisppath$ac_delim
25179lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25180x_default_search_path!$x_default_search_path$ac_delim
25181etcdir!$etcdir$ac_delim
25182archlibdir!$archlibdir$ac_delim
25183bitmapdir!$bitmapdir$ac_delim
25184gamedir!$gamedir$ac_delim
25185gameuser!$gameuser$ac_delim
25186c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25187c_switch_machine!$c_switch_machine$ac_delim
25188LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25189LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25190C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25191X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25192machfile!$machfile$ac_delim
25193opsysfile!$opsysfile$ac_delim
25194carbon_appdir!$carbon_appdir$ac_delim
25195LTLIBOBJS!$LTLIBOBJS$ac_delim
25196_ACEOF
503d2be0 25197
e70b2110 25198 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
c24fa7dc
MB
25199 break
25200 elif $ac_last_try; then
25201 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25202echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25203 { (exit 1); exit 1; }; }
25204 else
25205 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25206 fi
ca81d7a0
JD
25207done
25208
25209ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25210if test -n "$ac_eof"; then
25211 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25212 ac_eof=`expr $ac_eof + 1`
25213fi
ba4481b5 25214
ca81d7a0
JD
25215cat >>$CONFIG_STATUS <<_ACEOF
25216cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25217/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25218_ACEOF
25219sed '
25220s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25221s/^/s,@/; s/!/@,|#_!!_#|/
25222:n
25223t n
25224s/'"$ac_delim"'$/,g/; t
25225s/$/\\/; p
25226N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25227' >>$CONFIG_STATUS <conf$$subs.sed
25228rm -f conf$$subs.sed
25229cat >>$CONFIG_STATUS <<_ACEOF
25230:end
25231s/|#_!!_#|//g
25232CEOF$ac_eof
c0d27fcc 25233_ACEOF
ca81d7a0
JD
25234
25235
25236# VPATH may cause trouble with some makes, so we remove $(srcdir),
25237# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25238# trailing colons and then remove the whole line if VPATH becomes empty
25239# (actually we leave an empty line to preserve line numbers).
25240if test "x$srcdir" = x.; then
25241 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25242s/:*\$(srcdir):*/:/
25243s/:*\${srcdir}:*/:/
25244s/:*@srcdir@:*/:/
25245s/^\([^=]*=[ ]*\):*/\1/
25246s/:*$//
25247s/^[^=]*=[ ]*$//
25248}'
25249fi
25250
c0d27fcc 25251cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25252fi # test -n "$CONFIG_FILES"
25253
25254
25255for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25256do
25257 case $ac_tag in
25258 :[FHLC]) ac_mode=$ac_tag; continue;;
25259 esac
25260 case $ac_mode$ac_tag in
25261 :[FHL]*:*);;
25262 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25263echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25264 { (exit 1); exit 1; }; };;
25265 :[FH]-) ac_tag=-:-;;
25266 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25267 esac
25268 ac_save_IFS=$IFS
25269 IFS=:
25270 set x $ac_tag
25271 IFS=$ac_save_IFS
25272 shift
25273 ac_file=$1
25274 shift
25275
25276 case $ac_mode in
25277 :L) ac_source=$1;;
25278 :[FH])
25279 ac_file_inputs=
25280 for ac_f
25281 do
25282 case $ac_f in
25283 -) ac_f="$tmp/stdin";;
25284 *) # Look for the file first in the build tree, then in the source tree
25285 # (if the path is not absolute). The absolute path cannot be DOS-style,
25286 # because $ac_f cannot contain `:'.
25287 test -f "$ac_f" ||
25288 case $ac_f in
25289 [\\/$]*) false;;
25290 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25291 esac ||
25292 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25293echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25294 { (exit 1); exit 1; }; };;
25295 esac
25296 ac_file_inputs="$ac_file_inputs $ac_f"
25297 done
25298
25299 # Let's still pretend it is `configure' which instantiates (i.e., don't
25300 # use $as_me), people would be surprised to read:
25301 # /* config.h. Generated by config.status. */
25302 configure_input="Generated from "`IFS=:
25303 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25304 if test x"$ac_file" != x-; then
25305 configure_input="$ac_file. $configure_input"
25306 { echo "$as_me:$LINENO: creating $ac_file" >&5
25307echo "$as_me: creating $ac_file" >&6;}
25308 fi
25309
25310 case $ac_tag in
25311 *:-:* | *:-) cat >"$tmp/stdin";;
25312 esac
25313 ;;
ba4481b5
DL
25314 esac
25315
ca81d7a0 25316 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25317$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25318 X"$ac_file" : 'X\(//\)[^/]' \| \
25319 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25320 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25321echo X"$ac_file" |
ca81d7a0
JD
25322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25323 s//\1/
25324 q
25325 }
25326 /^X\(\/\/\)[^/].*/{
25327 s//\1/
25328 q
25329 }
25330 /^X\(\/\/\)$/{
25331 s//\1/
25332 q
25333 }
25334 /^X\(\/\).*/{
25335 s//\1/
25336 q
25337 }
25338 s/.*/./; q'`
25339 { as_dir="$ac_dir"
25340 case $as_dir in #(
25341 -*) as_dir=./$as_dir;;
25342 esac
25343 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25344 as_dirs=
ca81d7a0
JD
25345 while :; do
25346 case $as_dir in #(
25347 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25348 *) as_qdir=$as_dir;;
25349 esac
25350 as_dirs="'$as_qdir' $as_dirs"
25351 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25352$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25353 X"$as_dir" : 'X\(//\)[^/]' \| \
25354 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25355 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25356echo X"$as_dir" |
ca81d7a0
JD
25357 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25358 s//\1/
25359 q
25360 }
25361 /^X\(\/\/\)[^/].*/{
25362 s//\1/
25363 q
25364 }
25365 /^X\(\/\/\)$/{
25366 s//\1/
25367 q
25368 }
25369 /^X\(\/\).*/{
25370 s//\1/
25371 q
25372 }
25373 s/.*/./; q'`
25374 test -d "$as_dir" && break
6bae0ccf 25375 done
ca81d7a0
JD
25376 test -z "$as_dirs" || eval "mkdir $as_dirs"
25377 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25378echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25379 { (exit 1); exit 1; }; }; }
c0d27fcc 25380 ac_builddir=.
98418dba 25381
ca81d7a0
JD
25382case "$ac_dir" in
25383.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25384*)
c0d27fcc 25385 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25386 # A ".." for each directory in $ac_dir_suffix.
25387 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25388 case $ac_top_builddir_sub in
25389 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25390 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25391 esac ;;
25392esac
25393ac_abs_top_builddir=$ac_pwd
25394ac_abs_builddir=$ac_pwd$ac_dir_suffix
25395# for backward compatibility:
25396ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25397
25398case $srcdir in
ca81d7a0 25399 .) # We are building in place.
c0d27fcc 25400 ac_srcdir=.
ca81d7a0
JD
25401 ac_top_srcdir=$ac_top_builddir_sub
25402 ac_abs_top_srcdir=$ac_pwd ;;
25403 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25404 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25405 ac_top_srcdir=$srcdir
25406 ac_abs_top_srcdir=$srcdir ;;
25407 *) # Relative name.
25408 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25409 ac_top_srcdir=$ac_top_build_prefix$srcdir
25410 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25411esac
ca81d7a0 25412ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25413
c0d27fcc 25414
ca81d7a0
JD
25415 case $ac_mode in
25416 :F)
25417 #
25418 # CONFIG_FILE
25419 #
ba4481b5 25420
503d2be0
AS
25421 case $INSTALL in
25422 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25423 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25424 esac
ca81d7a0 25425_ACEOF
ba4481b5 25426
ca81d7a0
JD
25427cat >>$CONFIG_STATUS <<\_ACEOF
25428# If the template does not know about datarootdir, expand it.
25429# FIXME: This hack should be removed a few years after 2.60.
25430ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25431
ca81d7a0
JD
25432case `sed -n '/datarootdir/ {
25433 p
25434 q
25435}
25436/@datadir@/p
25437/@docdir@/p
25438/@infodir@/p
25439/@localedir@/p
25440/@mandir@/p
25441' $ac_file_inputs` in
25442*datarootdir*) ac_datarootdir_seen=yes;;
25443*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25444 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25445echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25446_ACEOF
ca81d7a0
JD
25447cat >>$CONFIG_STATUS <<_ACEOF
25448 ac_datarootdir_hack='
25449 s&@datadir@&$datadir&g
25450 s&@docdir@&$docdir&g
25451 s&@infodir@&$infodir&g
25452 s&@localedir@&$localedir&g
25453 s&@mandir@&$mandir&g
25454 s&\\\${datarootdir}&$datarootdir&g' ;;
25455esac
c0d27fcc 25456_ACEOF
ca81d7a0
JD
25457
25458# Neutralize VPATH when `$srcdir' = `.'.
25459# Shell code in configure.ac might set extrasub.
25460# FIXME: do we really want to maintain this feature?
c0d27fcc 25461cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25462 sed "$ac_vpsub
25463$extrasub
c0d27fcc
MR
25464_ACEOF
25465cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25466:t
25467/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25468s&@configure_input@&$configure_input&;t t
25469s&@top_builddir@&$ac_top_builddir_sub&;t t
25470s&@srcdir@&$ac_srcdir&;t t
25471s&@abs_srcdir@&$ac_abs_srcdir&;t t
25472s&@top_srcdir@&$ac_top_srcdir&;t t
25473s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25474s&@builddir@&$ac_builddir&;t t
25475s&@abs_builddir@&$ac_abs_builddir&;t t
25476s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25477s&@INSTALL@&$ac_INSTALL&;t t
25478$ac_datarootdir_hack
25479" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25480
25481test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25482 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25483 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25484 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25485which seems to be undefined. Please make sure it is defined." >&5
25486echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25487which seems to be undefined. Please make sure it is defined." >&2;}
25488
25489 rm -f "$tmp/stdin"
503d2be0 25490 case $ac_file in
ca81d7a0
JD
25491 -) cat "$tmp/out"; rm -f "$tmp/out";;
25492 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25493 esac
ca81d7a0
JD
25494 ;;
25495 :H)
25496 #
25497 # CONFIG_HEADER
25498 #
25499_ACEOF
25500
25501# Transform confdefs.h into a sed script `conftest.defines', that
25502# substitutes the proper values into config.h.in to produce config.h.
25503rm -f conftest.defines conftest.tail
25504# First, append a space to every undef/define line, to ease matching.
25505echo 's/$/ /' >conftest.defines
25506# Then, protect against being on the right side of a sed subst, or in
25507# an unquoted here document, in config.status. If some macros were
25508# called several times there might be several #defines for the same
25509# symbol, which is useless. But do not sort them, since the last
25510# AC_DEFINE must be honored.
25511ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25512# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25513# NAME is the cpp macro being defined, VALUE is the value it is being given.
25514# PARAMS is the parameter list in the macro definition--in most cases, it's
25515# just an empty string.
25516ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25517ac_dB='\\)[ (].*,\\1define\\2'
25518ac_dC=' '
25519ac_dD=' ,'
25520
25521uniq confdefs.h |
25522 sed -n '
25523 t rset
25524 :rset
25525 s/^[ ]*#[ ]*define[ ][ ]*//
25526 t ok
25527 d
25528 :ok
25529 s/[\\&,]/\\&/g
25530 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25531 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25532 ' >>conftest.defines
25533
25534# Remove the space that was appended to ease matching.
25535# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25536# example, in the case of _POSIX_SOURCE, which is predefined and required
25537# on some systems where configure will not decide to define it.
ca81d7a0
JD
25538# (The regexp can be short, since the line contains either #define or #undef.)
25539echo 's/ $//
25540s,^[ #]*u.*,/* & */,' >>conftest.defines
25541
25542# Break up conftest.defines:
25543ac_max_sed_lines=50
25544
25545# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25546# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25547# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25548# et cetera.
25549ac_in='$ac_file_inputs'
25550ac_out='"$tmp/out1"'
25551ac_nxt='"$tmp/out2"'
25552
25553while :
503d2be0 25554do
ca81d7a0
JD
25555 # Write a here document:
25556 cat >>$CONFIG_STATUS <<_ACEOF
25557 # First, check the format of the line:
25558 cat >"\$tmp/defines.sed" <<\\CEOF
25559/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25560/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25561b
25562:def
25563_ACEOF
25564 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25565 echo 'CEOF
ca81d7a0
JD
25566 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25567 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25568 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25569 grep . conftest.tail >/dev/null || break
503d2be0
AS
25570 rm -f conftest.defines
25571 mv conftest.tail conftest.defines
25572done
ca81d7a0 25573rm -f conftest.defines conftest.tail
503d2be0 25574
ca81d7a0 25575echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25576cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25577 if test x"$ac_file" != x-; then
ca81d7a0
JD
25578 echo "/* $configure_input */" >"$tmp/config.h"
25579 cat "$ac_result" >>"$tmp/config.h"
25580 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25581 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25582echo "$as_me: $ac_file is unchanged" >&6;}
25583 else
503d2be0 25584 rm -f $ac_file
ca81d7a0 25585 mv "$tmp/config.h" $ac_file
ba4481b5 25586 fi
503d2be0 25587 else
ca81d7a0
JD
25588 echo "/* $configure_input */"
25589 cat "$ac_result"
ba4481b5 25590 fi
ca81d7a0
JD
25591 rm -f "$tmp/out12"
25592 ;;
edfaf76d 25593
ca81d7a0
JD
25594 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25595echo "$as_me: executing $ac_file commands" >&6;}
25596 ;;
25597 esac
ba4481b5 25598
c0d27fcc 25599
ca81d7a0
JD
25600 case $ac_file$ac_mode in
25601 "default":C)
ba4481b5
DL
25602
25603### Make the necessary directories, if they don't exist.
25604for dir in etc lisp ; do
25605 test -d ${dir} || mkdir ${dir}
25606done
25607
25608# Build src/Makefile from ${srcdir}/src/Makefile.c
25609# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25610# This must be done after src/config.h is built, since we rely on that file.
25611
25612# Now get this: Some word that is part of the ${srcdir} directory name
25613# or the ${configuration} value might, just might, happen to be an
25614# identifier like `sun4' or `i386' or something, and be predefined by
25615# the C preprocessor to some helpful value like 1, or maybe the empty
25616# string. Needless to say consequent macro substitutions are less
25617# than conducive to the makefile finding the correct directory.
25618undefs="`echo $top_srcdir $configuration $canonical |
25619sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25620 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25621`"
25622
25623echo creating src/epaths.h
4aa6b955 25624${MAKE-make} epaths-force
ba4481b5 25625
1c203d4c
DL
25626# As of 2000-11-19, newest development versions of GNU cpp preprocess
25627# `..' to `. .' unless invoked with -traditional
25628
d0e9bfd2 25629if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25630 CPPFLAGS="$CPPFLAGS -traditional"
25631fi
25632
ba4481b5
DL
25633echo creating lib-src/Makefile
25634( cd lib-src
25635 rm -f junk.c junk1.c junk2.c
25636 sed -e '/start of cpp stuff/q' \
25637 < Makefile.c > junk1.c
25638 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25639 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25640 < Makefile.c > junk.c
503d2be0 25641 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25642 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25643 cat junk1.c junk2.c > Makefile.new
25644 rm -f junk.c junk1.c junk2.c
25645 chmod 444 Makefile.new
25646 mv -f Makefile.new Makefile
25647)
25648
25649echo creating src/Makefile
25650( cd src
25651 rm -f junk.c junk1.c junk2.c
25652 sed -e '/start of cpp stuff/q' \
25653 < Makefile.c > junk1.c
25654 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25655 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25656 < Makefile.c > junk.c
503d2be0 25657 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25658 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25659 cat junk1.c junk2.c > Makefile.new
25660 rm -f junk.c junk1.c junk2.c
25661 chmod 444 Makefile.new
25662 mv -f Makefile.new Makefile
25663)
25664
503d2be0 25665if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25666 echo creating src/.gdbinit
503d2be0 25667 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25668fi
25669
25670# This is how we know whether to re-run configure in certain cases.
25671touch src/config.stamp
25672
503d2be0 25673 ;;
ca81d7a0 25674
503d2be0 25675 esac
ca81d7a0 25676done # for ac_tag
503d2be0 25677
ba4481b5 25678
503d2be0 25679{ (exit 0); exit 0; }
c0d27fcc 25680_ACEOF
ba4481b5 25681chmod +x $CONFIG_STATUS
503d2be0
AS
25682ac_clean_files=$ac_clean_files_save
25683
c0d27fcc 25684
503d2be0
AS
25685# configure is writing to config.log, and then calls config.status.
25686# config.status does its own redirection, appending to config.log.
25687# Unfortunately, on DOS this fails, as config.log is still kept open
25688# by configure, so config.status won't be able to write to it; its
25689# output is simply discarded. So we exec the FD to /dev/null,
25690# effectively closing config.log, so it can be properly (re)opened and
25691# appended to by config.status. When coming back to configure, we
25692# need to make the FD available again.
25693if test "$no_create" != yes; then
25694 ac_cs_success=:
19650fd6
AS
25695 ac_config_status_args=
25696 test "$silent" = yes &&
25697 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25698 exec 5>/dev/null
19650fd6 25699 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25700 exec 5>>config.log
25701 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25702 # would make configure fail if this is the last instruction.
25703 $ac_cs_success || { (exit 1); exit 1; }
25704fi
f5f47add 25705
c0d27fcc 25706