* Makefile.in: Undef LIB_STANDARD before defining it to silence warning
[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
edfda783 737ns_appdir
facfbbbd 738GNUSTEP_MAKEFILES
c24fa7dc 739LTLIBOBJS'
6bae0ccf 740ac_subst_files=''
ca81d7a0
JD
741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
f053c89f 747LIBS
ca81d7a0
JD
748CPPFLAGS
749CPP
750XMKMF'
751
c0d27fcc 752
ba4481b5 753# Initialize some variables set by options.
503d2be0
AS
754ac_init_help=
755ac_init_version=false
ba4481b5
DL
756# The variables have the same names as the options, with
757# dashes changed to underlines.
503d2be0 758cache_file=/dev/null
ba4481b5 759exec_prefix=NONE
ba4481b5 760no_create=
ba4481b5
DL
761no_recursion=
762prefix=NONE
763program_prefix=NONE
764program_suffix=NONE
765program_transform_name=s,x,x,
766silent=
767site=
768srcdir=
ba4481b5
DL
769verbose=
770x_includes=NONE
771x_libraries=NONE
503d2be0
AS
772
773# Installation directory options.
774# These are left unexpanded so users can "make install exec_prefix=/foo"
775# and all the variables that are supposed to be based on exec_prefix
776# by default will actually change.
777# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 778# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
779bindir='${exec_prefix}/bin'
780sbindir='${exec_prefix}/sbin'
781libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
782datarootdir='${prefix}/share'
783datadir='${datarootdir}'
ba4481b5
DL
784sysconfdir='${prefix}/etc'
785sharedstatedir='${prefix}/com'
786localstatedir='${prefix}/var'
ba4481b5
DL
787includedir='${prefix}/include'
788oldincludedir='/usr/include'
9cf8f393 789docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
790infodir='${datarootdir}/info'
791htmldir='${docdir}'
792dvidir='${docdir}'
793pdfdir='${docdir}'
794psdir='${docdir}'
795libdir='${exec_prefix}/lib'
796localedir='${datarootdir}/locale'
797mandir='${datarootdir}/man'
ba4481b5 798
ba4481b5 799ac_prev=
ca81d7a0 800ac_dashdash=
ba4481b5
DL
801for ac_option
802do
ba4481b5
DL
803 # If the previous option needs an argument, assign it.
804 if test -n "$ac_prev"; then
ca81d7a0 805 eval $ac_prev=\$ac_option
ba4481b5
DL
806 ac_prev=
807 continue
808 fi
809
ca81d7a0
JD
810 case $ac_option in
811 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
812 *) ac_optarg=yes ;;
813 esac
ba4481b5
DL
814
815 # Accept the important Cygnus configure options, so we can diagnose typos.
816
ca81d7a0
JD
817 case $ac_dashdash$ac_option in
818 --)
819 ac_dashdash=yes ;;
ba4481b5
DL
820
821 -bindir | --bindir | --bindi | --bind | --bin | --bi)
822 ac_prev=bindir ;;
823 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 824 bindir=$ac_optarg ;;
ba4481b5
DL
825
826 -build | --build | --buil | --bui | --bu)
503d2be0 827 ac_prev=build_alias ;;
ba4481b5 828 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 829 build_alias=$ac_optarg ;;
ba4481b5
DL
830
831 -cache-file | --cache-file | --cache-fil | --cache-fi \
832 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
833 ac_prev=cache_file ;;
834 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
835 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
836 cache_file=$ac_optarg ;;
837
838 --config-cache | -C)
839 cache_file=config.cache ;;
ba4481b5 840
ca81d7a0 841 -datadir | --datadir | --datadi | --datad)
ba4481b5 842 ac_prev=datadir ;;
ca81d7a0 843 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 844 datadir=$ac_optarg ;;
ba4481b5 845
ca81d7a0
JD
846 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
847 | --dataroo | --dataro | --datar)
848 ac_prev=datarootdir ;;
849 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
850 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
851 datarootdir=$ac_optarg ;;
852
ba4481b5 853 -disable-* | --disable-*)
503d2be0 854 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 855 # Reject names that are not valid shell variable names.
f053c89f 856 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
857 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
858 { (exit 1); exit 1; }; }
f053c89f 859 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
860 eval enable_$ac_feature=no ;;
861
862 -docdir | --docdir | --docdi | --doc | --do)
863 ac_prev=docdir ;;
864 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
865 docdir=$ac_optarg ;;
866
867 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
868 ac_prev=dvidir ;;
869 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
870 dvidir=$ac_optarg ;;
ba4481b5
DL
871
872 -enable-* | --enable-*)
503d2be0 873 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 874 # Reject names that are not valid shell variable names.
f053c89f 875 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
876 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
877 { (exit 1); exit 1; }; }
f053c89f 878 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 879 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
880
881 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
882 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
883 | --exec | --exe | --ex)
884 ac_prev=exec_prefix ;;
885 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
886 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
887 | --exec=* | --exe=* | --ex=*)
503d2be0 888 exec_prefix=$ac_optarg ;;
ba4481b5
DL
889
890 -gas | --gas | --ga | --g)
891 # Obsolete; use --with-gas.
892 with_gas=yes ;;
893
503d2be0
AS
894 -help | --help | --hel | --he | -h)
895 ac_init_help=long ;;
896 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
897 ac_init_help=recursive ;;
898 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
899 ac_init_help=short ;;
ba4481b5
DL
900
901 -host | --host | --hos | --ho)
503d2be0 902 ac_prev=host_alias ;;
ba4481b5 903 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 904 host_alias=$ac_optarg ;;
ba4481b5 905
ca81d7a0
JD
906 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
907 ac_prev=htmldir ;;
908 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
909 | --ht=*)
910 htmldir=$ac_optarg ;;
911
ba4481b5
DL
912 -includedir | --includedir | --includedi | --included | --include \
913 | --includ | --inclu | --incl | --inc)
914 ac_prev=includedir ;;
915 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
916 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 917 includedir=$ac_optarg ;;
ba4481b5
DL
918
919 -infodir | --infodir | --infodi | --infod | --info | --inf)
920 ac_prev=infodir ;;
921 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 922 infodir=$ac_optarg ;;
ba4481b5
DL
923
924 -libdir | --libdir | --libdi | --libd)
925 ac_prev=libdir ;;
926 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 927 libdir=$ac_optarg ;;
ba4481b5
DL
928
929 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
930 | --libexe | --libex | --libe)
931 ac_prev=libexecdir ;;
932 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
933 | --libexe=* | --libex=* | --libe=*)
503d2be0 934 libexecdir=$ac_optarg ;;
ba4481b5 935
ca81d7a0
JD
936 -localedir | --localedir | --localedi | --localed | --locale)
937 ac_prev=localedir ;;
938 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
939 localedir=$ac_optarg ;;
940
ba4481b5 941 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 942 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
943 ac_prev=localstatedir ;;
944 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 945 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 946 localstatedir=$ac_optarg ;;
ba4481b5
DL
947
948 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
949 ac_prev=mandir ;;
950 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 951 mandir=$ac_optarg ;;
ba4481b5
DL
952
953 -nfp | --nfp | --nf)
954 # Obsolete; use --without-fp.
955 with_fp=no ;;
956
957 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 958 | --no-cr | --no-c | -n)
ba4481b5
DL
959 no_create=yes ;;
960
961 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
963 no_recursion=yes ;;
964
965 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
966 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
967 | --oldin | --oldi | --old | --ol | --o)
968 ac_prev=oldincludedir ;;
969 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
970 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
971 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 972 oldincludedir=$ac_optarg ;;
ba4481b5
DL
973
974 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
975 ac_prev=prefix ;;
976 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 977 prefix=$ac_optarg ;;
ba4481b5
DL
978
979 -program-prefix | --program-prefix | --program-prefi | --program-pref \
980 | --program-pre | --program-pr | --program-p)
981 ac_prev=program_prefix ;;
982 -program-prefix=* | --program-prefix=* | --program-prefi=* \
983 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 984 program_prefix=$ac_optarg ;;
ba4481b5
DL
985
986 -program-suffix | --program-suffix | --program-suffi | --program-suff \
987 | --program-suf | --program-su | --program-s)
988 ac_prev=program_suffix ;;
989 -program-suffix=* | --program-suffix=* | --program-suffi=* \
990 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 991 program_suffix=$ac_optarg ;;
ba4481b5
DL
992
993 -program-transform-name | --program-transform-name \
994 | --program-transform-nam | --program-transform-na \
995 | --program-transform-n | --program-transform- \
996 | --program-transform | --program-transfor \
997 | --program-transfo | --program-transf \
998 | --program-trans | --program-tran \
999 | --progr-tra | --program-tr | --program-t)
1000 ac_prev=program_transform_name ;;
1001 -program-transform-name=* | --program-transform-name=* \
1002 | --program-transform-nam=* | --program-transform-na=* \
1003 | --program-transform-n=* | --program-transform-=* \
1004 | --program-transform=* | --program-transfor=* \
1005 | --program-transfo=* | --program-transf=* \
1006 | --program-trans=* | --program-tran=* \
1007 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1008 program_transform_name=$ac_optarg ;;
ba4481b5 1009
ca81d7a0
JD
1010 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1011 ac_prev=pdfdir ;;
1012 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1013 pdfdir=$ac_optarg ;;
1014
1015 -psdir | --psdir | --psdi | --psd | --ps)
1016 ac_prev=psdir ;;
1017 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1018 psdir=$ac_optarg ;;
1019
ba4481b5
DL
1020 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1021 | -silent | --silent | --silen | --sile | --sil)
1022 silent=yes ;;
1023
1024 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1025 ac_prev=sbindir ;;
1026 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1027 | --sbi=* | --sb=*)
503d2be0 1028 sbindir=$ac_optarg ;;
ba4481b5
DL
1029
1030 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1031 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1032 | --sharedst | --shareds | --shared | --share | --shar \
1033 | --sha | --sh)
1034 ac_prev=sharedstatedir ;;
1035 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1036 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1037 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1038 | --sha=* | --sh=*)
503d2be0 1039 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1040
1041 -site | --site | --sit)
1042 ac_prev=site ;;
1043 -site=* | --site=* | --sit=*)
503d2be0 1044 site=$ac_optarg ;;
ba4481b5
DL
1045
1046 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1047 ac_prev=srcdir ;;
1048 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1049 srcdir=$ac_optarg ;;
ba4481b5
DL
1050
1051 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1052 | --syscon | --sysco | --sysc | --sys | --sy)
1053 ac_prev=sysconfdir ;;
1054 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1055 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1056 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1057
1058 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1059 ac_prev=target_alias ;;
ba4481b5 1060 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1061 target_alias=$ac_optarg ;;
ba4481b5
DL
1062
1063 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1064 verbose=yes ;;
1065
503d2be0
AS
1066 -version | --version | --versio | --versi | --vers | -V)
1067 ac_init_version=: ;;
ba4481b5
DL
1068
1069 -with-* | --with-*)
503d2be0 1070 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1071 # Reject names that are not valid shell variable names.
f053c89f 1072 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1073 { echo "$as_me: error: invalid package name: $ac_package" >&2
1074 { (exit 1); exit 1; }; }
f053c89f 1075 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1076 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1077
1078 -without-* | --without-*)
503d2be0 1079 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1080 # Reject names that are not valid shell variable names.
f053c89f 1081 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1082 { echo "$as_me: error: invalid package name: $ac_package" >&2
1083 { (exit 1); exit 1; }; }
f053c89f 1084 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1085 eval with_$ac_package=no ;;
ba4481b5
DL
1086
1087 --x)
1088 # Obsolete; use --with-x.
1089 with_x=yes ;;
1090
1091 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1092 | --x-incl | --x-inc | --x-in | --x-i)
1093 ac_prev=x_includes ;;
1094 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1095 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1096 x_includes=$ac_optarg ;;
ba4481b5
DL
1097
1098 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1099 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1100 ac_prev=x_libraries ;;
1101 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1102 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1103 x_libraries=$ac_optarg ;;
ba4481b5 1104
503d2be0
AS
1105 -*) { echo "$as_me: error: unrecognized option: $ac_option
1106Try \`$0 --help' for more information." >&2
1107 { (exit 1); exit 1; }; }
ba4481b5
DL
1108 ;;
1109
503d2be0
AS
1110 *=*)
1111 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 # Reject names that are not valid shell variable names.
1113 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1114 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1115 { (exit 1); exit 1; }; }
ca81d7a0 1116 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1117 export $ac_envvar ;;
1118
ba4481b5 1119 *)
503d2be0
AS
1120 # FIXME: should be removed in autoconf 3.0.
1121 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1122 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1123 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1124 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1125 ;;
1126
1127 esac
1128done
1129
1130if test -n "$ac_prev"; then
503d2be0
AS
1131 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1132 { echo "$as_me: error: missing argument to $ac_option" >&2
1133 { (exit 1); exit 1; }; }
ba4481b5 1134fi
ba4481b5 1135
ca81d7a0
JD
1136# Be sure to have absolute directory names.
1137for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1138 datadir sysconfdir sharedstatedir localstatedir includedir \
1139 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1140 libdir localedir mandir
ba4481b5 1141do
ca81d7a0 1142 eval ac_val=\$$ac_var
503d2be0 1143 case $ac_val in
ca81d7a0
JD
1144 [\\/$]* | ?:[\\/]* ) continue;;
1145 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1146 esac
ca81d7a0
JD
1147 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1148 { (exit 1); exit 1; }; }
ba4481b5
DL
1149done
1150
503d2be0
AS
1151# There might be people who depend on the old broken behavior: `$host'
1152# used to hold the argument of --host etc.
c0d27fcc 1153# FIXME: To remove some day.
503d2be0
AS
1154build=$build_alias
1155host=$host_alias
1156target=$target_alias
1157
c0d27fcc 1158# FIXME: To remove some day.
503d2be0
AS
1159if test "x$host_alias" != x; then
1160 if test "x$build_alias" = x; then
1161 cross_compiling=maybe
1162 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1163 If a cross compiler is detected then cross compile mode will be used." >&2
1164 elif test "x$build_alias" != "x$host_alias"; then
1165 cross_compiling=yes
1166 fi
1167fi
ba4481b5 1168
503d2be0
AS
1169ac_tool_prefix=
1170test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1171
503d2be0 1172test "$silent" = yes && exec 6>/dev/null
ba4481b5 1173
c0d27fcc 1174
ca81d7a0
JD
1175ac_pwd=`pwd` && test -n "$ac_pwd" &&
1176ac_ls_di=`ls -di .` &&
1177ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1178 { echo "$as_me: error: Working directory cannot be determined" >&2
1179 { (exit 1); exit 1; }; }
1180test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1181 { echo "$as_me: error: pwd does not report name of working directory" >&2
1182 { (exit 1); exit 1; }; }
1183
1184
ba4481b5
DL
1185# Find the source files, if location was not specified.
1186if test -z "$srcdir"; then
1187 ac_srcdir_defaulted=yes
ca81d7a0
JD
1188 # Try the directory containing this script, then the parent directory.
1189 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1190$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1191 X"$0" : 'X\(//\)[^/]' \| \
1192 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1193 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1194echo X"$0" |
ca81d7a0
JD
1195 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)[^/].*/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\/\)$/{
1204 s//\1/
1205 q
1206 }
1207 /^X\(\/\).*/{
1208 s//\1/
1209 q
1210 }
1211 s/.*/./; q'`
ba4481b5 1212 srcdir=$ac_confdir
ca81d7a0 1213 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1214 srcdir=..
1215 fi
1216else
1217 ac_srcdir_defaulted=no
1218fi
ca81d7a0
JD
1219if test ! -r "$srcdir/$ac_unique_file"; then
1220 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1221 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1222 { (exit 1); exit 1; }; }
ba4481b5 1223fi
ca81d7a0
JD
1224ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1225ac_abs_confdir=`(
1226 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1227 { (exit 1); exit 1; }; }
ca81d7a0
JD
1228 pwd)`
1229# When building in place, set srcdir=.
1230if test "$ac_abs_confdir" = "$ac_pwd"; then
1231 srcdir=.
1232fi
1233# Remove unnecessary trailing slashes from srcdir.
1234# Double slashes in file names in object file debugging info
1235# mess up M-x gdb in Emacs.
1236case $srcdir in
1237*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1238esac
1239for ac_var in $ac_precious_vars; do
1240 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_env_${ac_var}_value=\$${ac_var}
1242 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1244done
503d2be0
AS
1245
1246#
1247# Report the --help message.
1248#
1249if test "$ac_init_help" = "long"; then
1250 # Omit some internal or obsolete options to make the list less imposing.
1251 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1252 cat <<_ACEOF
5d374ce1 1253\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1254
1255Usage: $0 [OPTION]... [VAR=VALUE]...
1256
1257To assign environment variables (e.g., CC, CFLAGS...), specify them as
1258VAR=VALUE. See below for descriptions of some of the useful variables.
1259
1260Defaults for the options are specified in brackets.
1261
1262Configuration:
1263 -h, --help display this help and exit
1264 --help=short display options specific to this package
1265 --help=recursive display the short help of all the included packages
1266 -V, --version display version information and exit
1267 -q, --quiet, --silent do not print \`checking...' messages
1268 --cache-file=FILE cache test results in FILE [disabled]
1269 -C, --config-cache alias for \`--cache-file=config.cache'
1270 -n, --no-create do not create output files
1271 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1272
503d2be0
AS
1273Installation directories:
1274 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1275 [$ac_default_prefix]
503d2be0 1276 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1277 [PREFIX]
503d2be0
AS
1278
1279By default, \`make install' will install all the files in
1280\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1281an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1282for instance \`--prefix=\$HOME'.
1283
1284For better control, use the options below.
1285
1286Fine tuning of the installation directories:
1287 --bindir=DIR user executables [EPREFIX/bin]
1288 --sbindir=DIR system admin executables [EPREFIX/sbin]
1289 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1290 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1291 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1292 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1293 --libdir=DIR object code libraries [EPREFIX/lib]
1294 --includedir=DIR C header files [PREFIX/include]
1295 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1296 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1297 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1298 --infodir=DIR info documentation [DATAROOTDIR/info]
1299 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1300 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1301 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1302 --htmldir=DIR html documentation [DOCDIR]
1303 --dvidir=DIR dvi documentation [DOCDIR]
1304 --pdfdir=DIR pdf documentation [DOCDIR]
1305 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1306_ACEOF
503d2be0 1307
c0d27fcc 1308 cat <<\_ACEOF
503d2be0 1309
ba5da88a
PJ
1310Program names:
1311 --program-prefix=PREFIX prepend PREFIX to installed program names
1312 --program-suffix=SUFFIX append SUFFIX to installed program names
1313 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1314
503d2be0
AS
1315X features:
1316 --x-includes=DIR X include files are in DIR
1317 --x-libraries=DIR X library files are in DIR
1318
1319System types:
1320 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1321 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1322_ACEOF
503d2be0
AS
1323fi
1324
1325if test -n "$ac_init_help"; then
9cf8f393 1326 case $ac_init_help in
5d374ce1 1327 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1328 esac
c0d27fcc 1329 cat <<\_ACEOF
503d2be0
AS
1330
1331Optional Features:
1332 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1333 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1334 --enable-carbon-app[=DIR]
6a3a24fa 1335 specify install directory for Emacs.app on Mac OS X
709e90de 1336 [DIR=/Application]
edfda783
AR
1337 --enable-ns-app[=DIR] [DIR=/Applications]
1338 specify install directory for Emacs.app under NS
1339 --enable-cocoa-experimental-ctrl-g enable experimental improved ctrl-g recognition
d0098f13 1340 --enable-asserts compile code with asserts enabled
709e90de
AS
1341 --enable-maintainer-mode
1342 enable make rules and dependencies not useful (and
1343 sometimes confusing) to the casual installer
9adfabc2
LK
1344 --enable-locallisppath=PATH
1345 directories Emacs should search for lisp files
1346 specific to this site
503d2be0
AS
1347 --disable-largefile omit support for large files
1348
1349Optional Packages:
1350 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1351 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1352 --without-pop don't support POP mail retrieval with movemail
1353 --with-kerberos support Kerberos-authenticated POP
1354 --with-kerberos5 support Kerberos version 5 authenticated POP
1355 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1356 --without-sound don't compile with sound support
a51f4969 1357 --without-sync-input Process async input synchronously
49adb60f
TTN
1358 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1359 motif, gtk, no)
c8467c40
GM
1360 --without-xpm don't compile with XPM image support
1361 --without-jpeg don't compile with JPEG image support
1362 --without-tiff don't compile with TIFF image support
1363 --without-gif don't compile with GIF image support
1364 --without-png don't compile with PNG image support
1365 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1366 --without-freetype don't use Freetype for local font support
1367 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1368 --without-libotf don't use libotf for OpenType font support
1369 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1370 --without-toolkit-scroll-bars
cc227489 1371 don't use Motif or Xaw3d scroll bars
c982cf7d 1372 --without-xaw3d don't use Xaw3d
cc227489 1373 --without-xim don't use X11 XIM
2aea825c 1374 --with-carbon use Carbon GUI on Mac OS X. This is unsupported!
edfda783 1375 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1376 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1377 console
b5a922de 1378 --without-dbus don't compile with D-Bus support
921fbdf0 1379 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1380
00b9c927
MO
1381 --with-pkg-config-prog=PATH
1382 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1383 --with-x use the X Window System
1384
1385Some influential environment variables:
1386 CC C compiler command
1387 CFLAGS C compiler flags
1388 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1389 nonstandard directory <lib dir>
f053c89f 1390 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1391 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1392 you have headers in a nonstandard directory <include dir>
503d2be0 1393 CPP C preprocessor
ca81d7a0 1394 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1395
1396Use these variables to override the choices made by `configure' or to help
1397it to find libraries and programs with nonstandard names/locations.
1398
c0d27fcc 1399_ACEOF
ca81d7a0 1400ac_status=$?
503d2be0
AS
1401fi
1402
1403if test "$ac_init_help" = "recursive"; then
1404 # If there are subdirs, report their specific --help.
c0d27fcc 1405 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1406 test -d "$ac_dir" || continue
c0d27fcc
MR
1407 ac_builddir=.
1408
ca81d7a0
JD
1409case "$ac_dir" in
1410.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1411*)
c0d27fcc 1412 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1413 # A ".." for each directory in $ac_dir_suffix.
1414 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1415 case $ac_top_builddir_sub in
1416 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1417 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1418 esac ;;
1419esac
1420ac_abs_top_builddir=$ac_pwd
1421ac_abs_builddir=$ac_pwd$ac_dir_suffix
1422# for backward compatibility:
1423ac_top_builddir=$ac_top_build_prefix
503d2be0 1424
c0d27fcc 1425case $srcdir in
ca81d7a0 1426 .) # We are building in place.
c0d27fcc 1427 ac_srcdir=.
ca81d7a0
JD
1428 ac_top_srcdir=$ac_top_builddir_sub
1429 ac_abs_top_srcdir=$ac_pwd ;;
1430 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1431 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1432 ac_top_srcdir=$srcdir
1433 ac_abs_top_srcdir=$srcdir ;;
1434 *) # Relative name.
1435 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1436 ac_top_srcdir=$ac_top_build_prefix$srcdir
1437 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1438esac
ca81d7a0
JD
1439ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1440
1441 cd "$ac_dir" || { ac_status=$?; continue; }
1442 # Check for guested configure.
1443 if test -f "$ac_srcdir/configure.gnu"; then
1444 echo &&
1445 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1446 elif test -f "$ac_srcdir/configure"; then
1447 echo &&
1448 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1449 else
c0d27fcc 1450 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1451 fi || ac_status=$?
1452 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1453 done
1454fi
1455
ca81d7a0 1456test -n "$ac_init_help" && exit $ac_status
503d2be0 1457if $ac_init_version; then
c0d27fcc 1458 cat <<\_ACEOF
5d374ce1 1459emacs configure 23.0.60
f053c89f 1460generated by GNU Autoconf 2.61
503d2be0 1461
ca81d7a0
JD
1462Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14632002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1464This configure script is free software; the Free Software Foundation
1465gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1466_ACEOF
ca81d7a0 1467 exit
503d2be0 1468fi
ca81d7a0 1469cat >config.log <<_ACEOF
503d2be0
AS
1470This file contains any messages produced by compilers while
1471running configure, to aid debugging if configure makes a mistake.
1472
5d374ce1 1473It was created by emacs $as_me 23.0.60, which was
f053c89f 1474generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1475
1476 $ $0 $@
1477
c0d27fcc 1478_ACEOF
ca81d7a0 1479exec 5>>config.log
503d2be0
AS
1480{
1481cat <<_ASUNAME
c0d27fcc
MR
1482## --------- ##
1483## Platform. ##
1484## --------- ##
503d2be0
AS
1485
1486hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1487uname -m = `(uname -m) 2>/dev/null || echo unknown`
1488uname -r = `(uname -r) 2>/dev/null || echo unknown`
1489uname -s = `(uname -s) 2>/dev/null || echo unknown`
1490uname -v = `(uname -v) 2>/dev/null || echo unknown`
1491
1492/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1493/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1494
1495/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1496/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1497/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1498/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1499/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1500/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1501/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1502
925c2f3f 1503_ASUNAME
c0d27fcc
MR
1504
1505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1506for as_dir in $PATH
1507do
1508 IFS=$as_save_IFS
1509 test -z "$as_dir" && as_dir=.
1510 echo "PATH: $as_dir"
1511done
ca81d7a0 1512IFS=$as_save_IFS
c0d27fcc 1513
503d2be0
AS
1514} >&5
1515
c0d27fcc
MR
1516cat >&5 <<_ACEOF
1517
1518
1519## ----------- ##
1520## Core tests. ##
1521## ----------- ##
1522
1523_ACEOF
503d2be0 1524
503d2be0
AS
1525
1526# Keep a trace of the command line.
1527# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1528# Strip out --silent because we don't want to record it for future runs.
503d2be0 1529# Also quote any args containing shell meta-characters.
19650fd6 1530# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1531ac_configure_args=
19650fd6
AS
1532ac_configure_args0=
1533ac_configure_args1=
19650fd6
AS
1534ac_must_keep_next=false
1535for ac_pass in 1 2
503d2be0 1536do
19650fd6
AS
1537 for ac_arg
1538 do
1539 case $ac_arg in
1540 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1541 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1542 | -silent | --silent | --silen | --sile | --sil)
1543 continue ;;
ca81d7a0 1544 *\'*)
19650fd6
AS
1545 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1546 esac
1547 case $ac_pass in
1548 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1549 2)
1550 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1551 if test $ac_must_keep_next = true; then
edfaf76d 1552 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1553 else
edfaf76d
LK
1554 case $ac_arg in
1555 *=* | --config-cache | -C | -disable-* | --disable-* \
1556 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1557 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1558 | -with-* | --with-* | -without-* | --without-* | --x)
1559 case "$ac_configure_args0 " in
1560 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1561 esac
1562 ;;
1563 -* ) ac_must_keep_next=true ;;
1564 esac
19650fd6 1565 fi
ca81d7a0 1566 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1567 ;;
1568 esac
1569 done
503d2be0 1570done
19650fd6
AS
1571$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1572$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1573
1574# When interrupted or exit'd, cleanup temporary files, and complete
1575# config.log. We remove comments because anyway the quotes in there
1576# would cause problems or look ugly.
ca81d7a0
JD
1577# WARNING: Use '\'' to represent an apostrophe within the trap.
1578# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1579trap 'exit_status=$?
1580 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1581 {
1582 echo
6bae0ccf 1583
c0d27fcc
MR
1584 cat <<\_ASBOX
1585## ---------------- ##
1586## Cache variables. ##
1587## ---------------- ##
1588_ASBOX
1589 echo
1590 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1591(
1592 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1593 eval ac_val=\$$ac_var
1594 case $ac_val in #(
1595 *${as_nl}*)
1596 case $ac_var in #(
1597 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1598echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1599 esac
1600 case $ac_var in #(
1601 _ | IFS | as_nl) ;; #(
1602 *) $as_unset $ac_var ;;
1603 esac ;;
1604 esac
1605 done
503d2be0 1606 (set) 2>&1 |
ca81d7a0
JD
1607 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1608 *${as_nl}ac_space=\ *)
503d2be0 1609 sed -n \
ca81d7a0
JD
1610 "s/'\''/'\''\\\\'\'''\''/g;
1611 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1612 ;; #(
503d2be0 1613 *)
ca81d7a0 1614 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1615 ;;
ca81d7a0
JD
1616 esac |
1617 sort
1618)
c0d27fcc 1619 echo
6bae0ccf
DL
1620
1621 cat <<\_ASBOX
1622## ----------------- ##
1623## Output variables. ##
1624## ----------------- ##
1625_ASBOX
1626 echo
1627 for ac_var in $ac_subst_vars
1628 do
ca81d7a0
JD
1629 eval ac_val=\$$ac_var
1630 case $ac_val in
1631 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1632 esac
1633 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1634 done | sort
1635 echo
1636
1637 if test -n "$ac_subst_files"; then
1638 cat <<\_ASBOX
ca81d7a0
JD
1639## ------------------- ##
1640## File substitutions. ##
1641## ------------------- ##
6bae0ccf
DL
1642_ASBOX
1643 echo
1644 for ac_var in $ac_subst_files
1645 do
ca81d7a0
JD
1646 eval ac_val=\$$ac_var
1647 case $ac_val in
1648 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1649 esac
1650 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1651 done | sort
1652 echo
1653 fi
1654
c0d27fcc
MR
1655 if test -s confdefs.h; then
1656 cat <<\_ASBOX
1657## ----------- ##
1658## confdefs.h. ##
1659## ----------- ##
1660_ASBOX
1661 echo
ca81d7a0 1662 cat confdefs.h
c0d27fcc
MR
1663 echo
1664 fi
1665 test "$ac_signal" != 0 &&
1666 echo "$as_me: caught signal $ac_signal"
1667 echo "$as_me: exit $exit_status"
1668 } >&5
ca81d7a0
JD
1669 rm -f core *.core core.conftest.* &&
1670 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1671 exit $exit_status
ca81d7a0 1672' 0
503d2be0
AS
1673for ac_signal in 1 2 13 15; do
1674 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1675done
1676ac_signal=0
1677
1678# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1679rm -f -r conftest* confdefs.h
ba4481b5 1680
c0d27fcc
MR
1681# Predefined preprocessor variables.
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_NAME "$PACKAGE_NAME"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1690_ACEOF
1691
1692
1693cat >>confdefs.h <<_ACEOF
1694#define PACKAGE_VERSION "$PACKAGE_VERSION"
1695_ACEOF
1696
1697
1698cat >>confdefs.h <<_ACEOF
1699#define PACKAGE_STRING "$PACKAGE_STRING"
1700_ACEOF
1701
1702
1703cat >>confdefs.h <<_ACEOF
1704#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1705_ACEOF
1706
1707
503d2be0 1708# Let the site file select an alternate cache file if it wants to.
ba4481b5 1709# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1710if test -n "$CONFIG_SITE"; then
1711 set x "$CONFIG_SITE"
1712elif test "x$prefix" != xNONE; then
1713 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1714else
1715 set x "$ac_default_prefix/share/config.site" \
1716 "$ac_default_prefix/etc/config.site"
ba4481b5 1717fi
ca81d7a0
JD
1718shift
1719for ac_site_file
1720do
ba4481b5 1721 if test -r "$ac_site_file"; then
c0d27fcc 1722 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1723echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1724 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1725 . "$ac_site_file"
1726 fi
1727done
1728
1729if test -r "$cache_file"; then
503d2be0
AS
1730 # Some versions of bash will fail to source /dev/null (special
1731 # files actually), so we avoid doing that.
1732 if test -f "$cache_file"; then
c0d27fcc 1733 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1734echo "$as_me: loading cache $cache_file" >&6;}
1735 case $cache_file in
ca81d7a0
JD
1736 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1737 *) . "./$cache_file";;
503d2be0
AS
1738 esac
1739 fi
ba4481b5 1740else
c0d27fcc 1741 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1742echo "$as_me: creating cache $cache_file" >&6;}
1743 >$cache_file
1744fi
1745
f053c89f
CY
1746ac_header_list="$ac_header_list sys/time.h"
1747ac_header_list="$ac_header_list unistd.h"
1748ac_func_list="$ac_func_list alarm"
503d2be0
AS
1749# Check that the precious variables saved in the cache have kept the same
1750# value.
1751ac_cache_corrupted=false
ca81d7a0 1752for ac_var in $ac_precious_vars; do
503d2be0
AS
1753 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1754 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1755 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1756 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1757 case $ac_old_set,$ac_new_set in
1758 set,)
c0d27fcc 1759 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1760echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1761 ac_cache_corrupted=: ;;
1762 ,set)
c0d27fcc 1763 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1764echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1765 ac_cache_corrupted=: ;;
1766 ,);;
1767 *)
1768 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1769 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1770echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1771 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1772echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1773 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1774echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1775 ac_cache_corrupted=:
503d2be0
AS
1776 fi;;
1777 esac
c0d27fcc 1778 # Pass precious variables to config.status.
503d2be0
AS
1779 if test "$ac_new_set" = set; then
1780 case $ac_new_val in
ca81d7a0 1781 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1782 *) ac_arg=$ac_var=$ac_new_val ;;
1783 esac
1784 case " $ac_configure_args " in
1785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1786 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1787 esac
1788 fi
1789done
1790if $ac_cache_corrupted; then
c0d27fcc 1791 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1792echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1793 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1794echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1795 { (exit 1); exit 1; }; }
ba4481b5
DL
1796fi
1797
c0d27fcc
MR
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
9cf8f393
JD
1809
1810
1811
1812
1813
1814
1815
1816
c0d27fcc
MR
1817
1818
1819
1820
1821
ca81d7a0
JD
1822ac_ext=c
1823ac_cpp='$CPP $CPPFLAGS'
1824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1826ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1827
6bae0ccf 1828
ca81d7a0 1829ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1830
c0d27fcc 1831
9fb1ba80 1832
ba5da88a 1833test "$program_prefix" != NONE &&
ca81d7a0 1834 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1835# Use a double $ so make ignores it.
1836test "$program_suffix" != NONE &&
ca81d7a0 1837 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1838# Double any \ or $. echo might interpret backslashes.
1839# By default was `s,x,x', remove it if useless.
1840cat <<\_ACEOF >conftest.sed
1841s/[\\$]/&&/g;s/;s,x,x,$//
1842_ACEOF
1843program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1844rm -f conftest.sed
ba5da88a 1845
c0d27fcc 1846
ba4481b5
DL
1847lispdir='${datadir}/emacs/${version}/lisp'
1848locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1849'${datadir}/emacs/site-lisp'
1850lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1851etcdir='${datadir}/emacs/${version}/etc'
1852archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1853docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1854gamedir='${localstatedir}/games/emacs'
98418dba
CW
1855
1856gameuser=games
1857
c0d27fcc 1858
49adb60f 1859
00b9c927 1860
ca81d7a0 1861# Check whether --with-pop was given.
ba4481b5 1862if test "${with_pop+set}" = set; then
00b9c927 1863 withval=$with_pop;
3d9fec71 1864else
00b9c927
MO
1865 with_pop=yes
1866fi
1867
1868if test "$with_pop" = yes; then
1869 cat >>confdefs.h <<\_ACEOF
3d9fec71 1870#define MAIL_USE_POP 1
c0d27fcc 1871_ACEOF
3d9fec71 1872
ca81d7a0 1873fi
ba4481b5 1874
c0d27fcc 1875
c0d27fcc 1876
ca81d7a0 1877# Check whether --with-kerberos was given.
a21616bd 1878if test "${with_kerberos+set}" = set; then
00b9c927
MO
1879 withval=$with_kerberos;
1880else
1881 with_kerberos=no
1882fi
1883
ff1095d1 1884if test "$with_kerberos" != no; then
54e6585f 1885 cat >>confdefs.h <<\_ACEOF
a21616bd 1886#define KERBEROS 1
c0d27fcc 1887_ACEOF
a21616bd 1888
ca81d7a0 1889fi
c0d27fcc 1890
c0d27fcc 1891
49adb60f 1892
ca81d7a0 1893# Check whether --with-kerberos5 was given.
a21616bd 1894if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1895 withval=$with_kerberos5;
1896else
1897 with_kerberos5=no
1898fi
1899
ff1095d1
AR
1900if test "${with_kerberos5}" != no; then
1901 if test "${with_kerberos}" = no; then
a21616bd 1902 with_kerberos=yes
c0d27fcc 1903 cat >>confdefs.h <<\_ACEOF
a21616bd 1904#define KERBEROS 1
c0d27fcc 1905_ACEOF
a21616bd
KR
1906
1907 fi
b936fae4 1908
c0d27fcc 1909cat >>confdefs.h <<\_ACEOF
a21616bd 1910#define KERBEROS5 1
c0d27fcc 1911_ACEOF
a21616bd 1912
ca81d7a0 1913fi
b936fae4 1914
49adb60f 1915
ca81d7a0
JD
1916# Check whether --with-hesiod was given.
1917if test "${with_hesiod+set}" = set; then
00b9c927
MO
1918 withval=$with_hesiod;
1919else
1920 with_hesiod=no
1921fi
1922
ff1095d1 1923if test "$with_hesiod" != no; then
54e6585f 1924
c0d27fcc 1925cat >>confdefs.h <<\_ACEOF
ba4481b5 1926#define HESIOD 1
c0d27fcc 1927_ACEOF
ba4481b5 1928
ca81d7a0 1929fi
c0d27fcc 1930
c0d27fcc 1931
ca81d7a0 1932# Check whether --with-sound was given.
2c9dccc9 1933if test "${with_sound+set}" = set; then
ca81d7a0 1934 withval=$with_sound;
00b9c927
MO
1935else
1936 with_sound=yes
ca81d7a0 1937fi
2c9dccc9 1938
2c9dccc9 1939
c0d27fcc 1940
a51f4969
SM
1941# Check whether --with-sync-input was given.
1942if test "${with_sync_input+set}" = set; then
1943 withval=$with_sync_input;
1944else
1945 with_sync_input=yes
1946fi
1947
1948if test "$with_sync_input" = yes; then
1949
1950cat >>confdefs.h <<\_ACEOF
1951#define SYNC_INPUT 1
1952_ACEOF
1953
1954fi
1955
1956
ca81d7a0 1957# Check whether --with-x-toolkit was given.
ba4481b5 1958if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1959 withval=$with_x_toolkit; case "${withval}" in
089a966d 1960 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1961 n | no ) val=no ;;
1962 l | lu | luc | luci | lucid ) val=lucid ;;
1963 a | at | ath | athe | athen | athena ) val=athena ;;
1964 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1965 g | gt | gtk ) val=gtk ;;
ba4481b5 1966 * )
29d69661 1967{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1968this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1969\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1970echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1971this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1972\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1973 { (exit 1); exit 1; }; }
ba4481b5
DL
1974 ;;
1975 esac
1976 with_x_toolkit=$val
1977
ca81d7a0 1978fi
8eeae1c9 1979
ba4481b5 1980
49adb60f 1981
ca81d7a0 1982# Check whether --with-xpm was given.
ba4481b5 1983if test "${with_xpm+set}" = set; then
ca81d7a0 1984 withval=$with_xpm;
00b9c927 1985else
c8467c40 1986 with_xpm=yes
ca81d7a0 1987fi
503d2be0 1988
ba4481b5 1989
ca81d7a0 1990# Check whether --with-jpeg was given.
ba4481b5 1991if test "${with_jpeg+set}" = set; then
ca81d7a0 1992 withval=$with_jpeg;
00b9c927 1993else
c8467c40 1994 with_jpeg=yes
ca81d7a0 1995fi
503d2be0 1996
ba4481b5 1997
ca81d7a0 1998# Check whether --with-tiff was given.
ba4481b5 1999if test "${with_tiff+set}" = set; then
ca81d7a0 2000 withval=$with_tiff;
00b9c927 2001else
c8467c40 2002 with_tiff=yes
ca81d7a0 2003fi
503d2be0 2004
ba4481b5 2005
ca81d7a0 2006# Check whether --with-gif was given.
ba4481b5 2007if test "${with_gif+set}" = set; then
ca81d7a0 2008 withval=$with_gif;
00b9c927 2009else
c8467c40 2010 with_gif=yes
ca81d7a0 2011fi
503d2be0 2012
ba4481b5 2013
ca81d7a0 2014# Check whether --with-png was given.
ba4481b5 2015if test "${with_png+set}" = set; then
ca81d7a0 2016 withval=$with_png;
00b9c927 2017else
c8467c40 2018 with_png=yes
ca81d7a0 2019fi
503d2be0 2020
ba4481b5 2021
0cfc0546
GM
2022# Check whether --with-rsvg was given.
2023if test "${with_rsvg+set}" = set; then
2024 withval=$with_rsvg;
00b9c927 2025else
c8467c40 2026 with_rsvg=yes
0cfc0546
GM
2027fi
2028
2029
c8467c40 2030
c24fa7dc 2031# Check whether --with-freetype was given.
45a4b03e 2032if test "${with_freetype+set}" = set; then
c24fa7dc 2033 withval=$with_freetype;
d235ca2f 2034else
4efcc8d1 2035 with_freetype=yes
c24fa7dc 2036fi
45a4b03e 2037
45a4b03e 2038
c24fa7dc 2039# Check whether --with-xft was given.
45a4b03e 2040if test "${with_xft+set}" = set; then
c24fa7dc 2041 withval=$with_xft;
d235ca2f 2042else
4efcc8d1 2043 with_xft=yes
c24fa7dc 2044fi
45a4b03e 2045
45a4b03e 2046
d235ca2f
MB
2047# Check whether --with-libotf was given.
2048if test "${with_libotf+set}" = set; then
2049 withval=$with_libotf;
2050else
2051 with_libotf=yes
79011b82
NR
2052fi
2053
2054
d235ca2f
MB
2055# Check whether --with-m17n-flt was given.
2056if test "${with_m17n_flt+set}" = set; then
2057 withval=$with_m17n_flt;
2058else
2059 with_m17n_flt=yes
0cfc0546
GM
2060fi
2061
2062
d235ca2f 2063
ca81d7a0 2064# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2065if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2066 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2067else
2068 with_toolkit_scroll_bars=yes
ca81d7a0 2069fi
503d2be0 2070
ba4481b5 2071
e35a28cd
TTN
2072# Check whether --with-xaw3d was given.
2073if test "${with_xaw3d+set}" = set; then
2074 withval=$with_xaw3d;
00b9c927
MO
2075else
2076 with_xaw3d=yes
c982cf7d
JD
2077fi
2078
2079
ca81d7a0 2080# Check whether --with-xim was given.
1d36487c 2081if test "${with_xim+set}" = set; then
ca81d7a0 2082 withval=$with_xim;
00b9c927
MO
2083else
2084 with_xim=yes
ca81d7a0 2085fi
1d36487c 2086
ba4481b5 2087
ca81d7a0 2088# Check whether --with-carbon was given.
e0f712ba 2089if test "${with_carbon+set}" = set; then
ca81d7a0 2090 withval=$with_carbon;
00b9c927 2091else
c8467c40
GM
2092 with_carbon=no
2093fi
2094
2095
edfda783
AR
2096# Check whether --with-ns was given.
2097if test "${with_ns+set}" = set; then
2098 withval=$with_ns;
2099else
2100 with_ns=no
2101fi
2102
2103
c8467c40
GM
2104
2105# Check whether --with-gpm was given.
2106if test "${with_gpm+set}" = set; then
2107 withval=$with_gpm;
2108else
2109 with_gpm=yes
ca81d7a0 2110fi
e0f712ba 2111
49adb60f 2112
131e4133
MA
2113# Check whether --with-dbus was given.
2114if test "${with_dbus+set}" = set; then
2115 withval=$with_dbus;
00b9c927 2116else
b5a922de 2117 with_dbus=yes
131e4133
MA
2118fi
2119
2120
921fbdf0
GM
2121## For the times when you want to build Emacs but don't have
2122## a suitable makeinfo, and can live without the manuals.
2123
2124# Check whether --with-makeinfo was given.
2125if test "${with_makeinfo+set}" = set; then
2126 withval=$with_makeinfo;
2127else
2128 with_makeinfo=yes
2129fi
2130
2131
e70b2110 2132
9d2818d6
DN
2133# Check whether --with-gtk was given.
2134if test "${with_gtk+set}" = set; then
2135 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2136specify a toolkit." >&5
2137echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2138specify a toolkit." >&2;}
2139 { (exit 1); exit 1; }; }
2140fi
2141
2142
2143
2144# Check whether --with-gcc was given.
2145if test "${with_gcc+set}" = set; then
2146 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2147 variable to specify a compiler." >&5
2148echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2149 variable to specify a compiler." >&2;}
2150 { (exit 1); exit 1; }; }
2151fi
2152
2153
2154
00b9c927
MO
2155# Check whether --with-pkg-config-prog was given.
2156if test "${with_pkg_config_prog+set}" = set; then
2157 withval=$with_pkg_config_prog;
e70b2110
KH
2158fi
2159
00b9c927
MO
2160if test "X${with_pkg_config_prog}" != X; then
2161 if test "${with_pkg_config_prog}" != yes; then
2162 PKG_CONFIG="${with_pkg_config_prog}"
2163 fi
2164fi
e70b2110 2165
ca81d7a0 2166# Check whether --enable-carbon-app was given.
6a3a24fa 2167if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2168 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2169fi
2170
e0f712ba 2171
edfda783
AR
2172# Check whether --enable-ns-app was given.
2173if test "${enable_ns_app+set}" = set; then
2174 enableval=$enable_ns_app; ns_appdir_x=${enableval}
2175fi
2176
2177
2178# Check whether --enable-cocoa-experimental-ctrl-g was given.
2179if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
2180 enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=yes
2181else
2182 EN_COCOA_EXPERIMENTAL_CTRL_G=no
2183fi
2184
2185
c24fa7dc 2186# Check whether --enable-asserts was given.
d0098f13 2187if test "${enable_asserts+set}" = set; then
ca81d7a0 2188 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2189else
2190 USE_XASSERTS=no
ca81d7a0 2191fi
8eeae1c9 2192
d0098f13 2193
ca81d7a0 2194# Check whether --enable-maintainer-mode was given.
19650fd6 2195if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2196 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2197else
2198 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2199fi
2200
19650fd6
AS
2201if test $USE_MAINTAINER_MODE = yes; then
2202 MAINT=
2203else
2204 MAINT=#
2205fi
2206
2207
ca81d7a0 2208# Check whether --enable-locallisppath was given.
9adfabc2 2209if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2210 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2211 locallisppath=
2212elif test "${enableval}" != "yes"; then
2213 locallisppath=${enableval}
2214fi
ca81d7a0
JD
2215fi
2216
9adfabc2 2217
ba4481b5 2218#### Make srcdir absolute, if it isn't already. It's important to
17494071 2219#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2220#### give you automounter prefixes, which can go away. We do all this
2221#### so Emacs can find its files when run uninstalled.
17494071
GM
2222## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2223unset CDPATH
ba4481b5
DL
2224case "${srcdir}" in
2225 /* ) ;;
2226 . )
2227 ## We may be able to use the $PWD environment variable to make this
2228 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2229 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2230 ## but that tested only for a well-formed and valid PWD,
2231 ## it did not object when PWD was well-formed and valid but just wrong.
2232 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2233 then
2234 srcdir="$PWD"
2235 else
2236 srcdir="`(cd ${srcdir}; pwd)`"
2237 fi
2238 ;;
2239 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2240esac
2241
2242#### Check if the source directory already has a configured system in it.
2243if test `pwd` != `(cd ${srcdir} && pwd)` \
2244 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2245 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2246 as a build directory right now; it has been configured in its own
2247 right. To configure in another directory as well, you MUST
2248 use GNU make. If you do not have GNU make, then you must
2249 now do \`make distclean' in ${srcdir},
2250 and then run $0 again." >&5
2251echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2252 as a build directory right now; it has been configured in its own
2253 right. To configure in another directory as well, you MUST
2254 use GNU make. If you do not have GNU make, then you must
2255 now do \`make distclean' in ${srcdir},
503d2be0 2256 and then run $0 again." >&2;}
ba4481b5
DL
2257fi
2258
2259#### Given the configuration name, set machfile and opsysfile to the
2260#### names of the m/*.h and s/*.h files we should use.
2261
2262### Canonicalize the configuration name.
2263
2264ac_aux_dir=
ca81d7a0
JD
2265for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2266 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2267 ac_aux_dir=$ac_dir
2268 ac_install_sh="$ac_aux_dir/install-sh -c"
2269 break
ca81d7a0 2270 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2271 ac_aux_dir=$ac_dir
2272 ac_install_sh="$ac_aux_dir/install.sh -c"
2273 break
ca81d7a0 2274 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2275 ac_aux_dir=$ac_dir
2276 ac_install_sh="$ac_aux_dir/shtool install -c"
2277 break
ba4481b5
DL
2278 fi
2279done
2280if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2281 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2282echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2283 { (exit 1); exit 1; }; }
ba4481b5 2284fi
ca81d7a0
JD
2285
2286# These three variables are undocumented and unsupported,
2287# and are intended to be withdrawn in a future Autoconf release.
2288# They can cause serious problems if a builder's source tree is in a directory
2289# whose full name contains unusual characters.
2290ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2291ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2292ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2293
ba4481b5
DL
2294
2295# Make sure we can run config.sub.
ca81d7a0
JD
2296$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2297 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2298echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2299 { (exit 1); exit 1; }; }
2300
ca81d7a0
JD
2301{ echo "$as_me:$LINENO: checking build system type" >&5
2302echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2303if test "${ac_cv_build+set}" = set; then
2304 echo $ECHO_N "(cached) $ECHO_C" >&6
2305else
ca81d7a0
JD
2306 ac_build_alias=$build_alias
2307test "x$ac_build_alias" = x &&
2308 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2309test "x$ac_build_alias" = x &&
c0d27fcc 2310 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2311echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2312 { (exit 1); exit 1; }; }
ca81d7a0
JD
2313ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2314 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2315echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2316 { (exit 1); exit 1; }; }
2317
2318fi
ca81d7a0
JD
2319{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2320echo "${ECHO_T}$ac_cv_build" >&6; }
2321case $ac_cv_build in
2322*-*-*) ;;
2323*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2324echo "$as_me: error: invalid value of canonical build" >&2;}
2325 { (exit 1); exit 1; }; };;
2326esac
503d2be0 2327build=$ac_cv_build
ca81d7a0
JD
2328ac_save_IFS=$IFS; IFS='-'
2329set x $ac_cv_build
2330shift
2331build_cpu=$1
2332build_vendor=$2
2333shift; shift
2334# Remember, the first character of IFS is used to create $*,
2335# except with old shells:
2336build_os=$*
2337IFS=$ac_save_IFS
2338case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2339
2340
2341{ echo "$as_me:$LINENO: checking host system type" >&5
2342echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2343if test "${ac_cv_host+set}" = set; then
2344 echo $ECHO_N "(cached) $ECHO_C" >&6
2345else
ca81d7a0
JD
2346 if test "x$host_alias" = x; then
2347 ac_cv_host=$ac_cv_build
2348else
2349 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2350 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2351echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2352 { (exit 1); exit 1; }; }
ca81d7a0 2353fi
503d2be0
AS
2354
2355fi
ca81d7a0
JD
2356{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2357echo "${ECHO_T}$ac_cv_host" >&6; }
2358case $ac_cv_host in
2359*-*-*) ;;
2360*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2361echo "$as_me: error: invalid value of canonical host" >&2;}
2362 { (exit 1); exit 1; }; };;
2363esac
503d2be0 2364host=$ac_cv_host
ca81d7a0
JD
2365ac_save_IFS=$IFS; IFS='-'
2366set x $ac_cv_host
2367shift
2368host_cpu=$1
2369host_vendor=$2
2370shift; shift
2371# Remember, the first character of IFS is used to create $*,
2372# except with old shells:
2373host_os=$*
2374IFS=$ac_save_IFS
2375case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2376
c0d27fcc 2377
ba4481b5 2378canonical=$host
1770dcdc 2379configuration=${host_alias-${build_alias-$host}}
ba4481b5 2380
c0d27fcc 2381
22044edf 2382
ba4481b5
DL
2383### If you add support for a new configuration, add code to this
2384### switch statement to recognize your configuration name and select
2385### the appropriate operating system and machine description files.
2386
2387### You would hope that you could choose an m/*.h file pretty much
2388### based on the machine portion of the configuration name, and an s-
2389### file based on the operating system portion. However, it turns out
2390### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2391### example mips.h is MIPS
2392### So we basically have to have a special case for each
ba4481b5
DL
2393### configuration name.
2394###
2395### As far as handling version numbers on operating systems is
2396### concerned, make sure things will fail in a fixable way. If
2397### /etc/MACHINES doesn't say anything about version numbers, be
2398### prepared to handle anything reasonably. If version numbers
2399### matter, be sure /etc/MACHINES says something about it.
2400###
2401### Eric Raymond says we should accept strings like "sysvr4" to mean
2402### "System V Release 4"; he writes, "The old convention encouraged
2403### confusion between `system' and `release' levels'."
2404
2405machine='' opsys='' unported=no
2406case "${canonical}" in
2407
1096bcc0 2408 ## FreeBSD ports
6b0273cd 2409 *-*-freebsd* )
1096bcc0
GM
2410 opsys=freebsd
2411 case "${canonical}" in
2412 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2413 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2414 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2415 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2416 sparc64-*-freebsd*) machine=sparc ;;
2417 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2418 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2419 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2420 esac
2421 ;;
2422
1b275743
GM
2423 ## FreeBSD kernel + glibc based userland
2424 *-*-kfreebsd*gnu* )
2425 opsys=gnu-kfreebsd
2426 case "${canonical}" in
2427 alpha*-*-kfreebsd*) machine=alpha ;;
2428 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2429 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2430 sparc64-*-kfreebsd*) machine=sparc ;;
2431 powerpc-*-kfreebsd*) machine=macppc ;;
2432 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2433 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2434 esac
2435 ;;
2436
ba4481b5
DL
2437 ## NetBSD ports
2438 *-*-netbsd* )
2439 opsys=netbsd
dd038e26 2440 if test -f /usr/lib/crti.o; then
f57bd967
DL
2441
2442cat >>confdefs.h <<\_ACEOF
2443#define HAVE_CRTIN
dd038e26
AS
2444_ACEOF
2445
2446 fi
2447
ba4481b5
DL
2448 case "${canonical}" in
2449 alpha*-*-netbsd*) machine=alpha ;;
2450 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2451 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2452 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2453 vax-*-netbsd*) machine=vax ;;
2df636f4 2454 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2455 x86_64-*-netbsd*) machine=amdx86-64 ;;
2456 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2457 esac
2458 ;;
2459
2460 ## OpenBSD ports
2461 *-*-openbsd* )
2462 opsys=openbsd
2463 case "${canonical}" in
2464 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2465 arm-*-openbsd*) machine=arm ;;
85410b02 2466 i386-*-openbsd*) machine=intel386 ;;
85410b02 2467 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2468 sparc*-*-openbsd*) machine=sparc ;;
2469 vax-*-openbsd*) machine=vax ;;
2470 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2471 esac
2472 ;;
2473
10a3b1a1
EZ
2474 ## LynxOS ports
2475 *-*-lynxos* )
2476 opsys=lynxos
2477 case "${canonical}" in
2478 i[3456]86-*-lynxos*) machine=intel386 ;;
2479 powerpc-*-lynxos*) machine=powerpc ;;
2480 esac
2481 ;;
2482
ba4481b5
DL
2483 alpha*-*-linux-gnu* )
2484 machine=alpha opsys=gnu-linux
2485 ;;
2486
c4bb2108
DL
2487 arm*-*-linux-gnu* )
2488 machine=arm opsys=gnu-linux
2489 ;;
2490
040c474e
CY
2491 ## Apple Darwin / Mac OS X
2492 *-apple-darwin* )
2493 case "${canonical}" in
2494 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2495 powerpc-* ) machine=macppc ;;
040c474e
CY
2496 * ) unported=yes ;;
2497 esac
2498 opsys=darwin
2499 # Define CPP as follows to make autoconf work correctly.
2500 CPP="${CC-cc} -E -no-cpp-precomp"
2501 # Use fink packages if available.
2502 if test -d /sw/include && test -d /sw/lib; then
2503 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2504 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2505 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2506 fi
2507 ;;
2508
6fbb6db1 2509 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2510 hppa*-hp-hpux10.2* )
2511 machine=hp800 opsys=hpux10-20
2512 ;;
6fbb6db1
GM
2513 hppa*-hp-hpux1[1-9]* )
2514 machine=hp800 opsys=hpux11
2515 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2516 ;;
2517
409d9577
GM
2518 hppa*-*-linux-gnu* )
2519 machine=hp800 opsys=gnu-linux
2520 ;;
2521
ba4481b5 2522 ## IBM machines
55597d70 2523 s390-*-linux-gnu* )
138f0859
GM
2524 machine=ibms390 opsys=gnu-linux
2525 ;;
bcdb1378
EZ
2526 s390x-*-linux-gnu* )
2527 machine=ibms390x opsys=gnu-linux
2528 ;;
ba4481b5
DL
2529 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2530 machine=ibmrs6000 opsys=aix4-2
2531 ;;
67bf991b
CY
2532 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2533 machine=ibmrs6000 opsys=aix4-2
2534 ;;
55597d70 2535 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2536 machine=ibmrs6000 opsys=aix4-2
2537 ;;
26a42dac
DN
2538 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2539 machine=ibmrs6000 opsys=aix4-2
2540 ;;
ba4481b5 2541
c76e04a8
GM
2542 ## Macintosh PowerPC
2543 powerpc*-*-linux-gnu* )
2544 machine=macppc opsys=gnu-linux
2545 ;;
2546
ba4481b5 2547 ## Silicon Graphics machines
ba4481b5 2548 ## Iris 4D
ba4481b5
DL
2549 mips-sgi-irix6.5 )
2550 machine=iris4d opsys=irix6-5
946173ad
DL
2551 # Without defining _LANGUAGE_C, things get masked out in the headers
2552 # so that, for instance, grepping for `free' in stdlib.h fails and
2553 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2554 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2555 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2556 ;;
ba4481b5 2557
ba4481b5
DL
2558 ## Suns
2559 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2560 machine=sparc opsys=gnu-linux
2561 ;;
2562
176fe5fc 2563 *-sun-solaris* \
ba4481b5
DL
2564 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2565 | rs6000-*-solaris2*)
2566 case "${canonical}" in
ba4481b5 2567 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2568 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2569 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2570 sparc* ) machine=sparc ;;
2571 * ) unported=yes ;;
2572 esac
2573 case "${canonical}" in
ba4481b5
DL
2574 *-sunos5.3* | *-solaris2.3* )
2575 opsys=sol2-3
2576 NON_GNU_CPP=/usr/ccs/lib/cpp
2577 ;;
2578 *-sunos5.4* | *-solaris2.4* )
2579 opsys=sol2-4
2580 NON_GNU_CPP=/usr/ccs/lib/cpp
2581 RANLIB="ar -ts"
2582 ;;
2583 *-sunos5.5* | *-solaris2.5* )
2584 opsys=sol2-5
2585 NON_GNU_CPP=/usr/ccs/lib/cpp
2586 RANLIB="ar -ts"
2587 ;;
8e967cf7
MR
2588 *-sunos5.6* | *-solaris2.6* )
2589 opsys=sol2-6
2590 NON_GNU_CPP=/usr/ccs/lib/cpp
2591 RANLIB="ar -ts"
2592 ;;
ba4481b5 2593 *-sunos5* | *-solaris* )
9e71690e 2594 opsys=sol2-6
089a966d
GM
2595 emacs_check_sunpro_c=yes
2596 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2597 ;;
ba4481b5
DL
2598 esac
2599 ## Watch out for a compiler that we know will not work.
2600 case "${canonical}" in
2601 *-solaris* | *-sunos5* )
2602 if [ "x$CC" = x/usr/ucb/cc ]; then
2603 ## /usr/ucb/cc doesn't work;
2604 ## we should find some other compiler that does work.
2605 unset CC
2606 fi
2607 ;;
2608 *) ;;
2609 esac
2610 ;;
ba4481b5 2611
ba4481b5
DL
2612 ## Vaxen.
2613 vax-dec-* )
2614 machine=vax
2615 case "${canonical}" in
ba4481b5
DL
2616 *-vms* ) opsys=vms ;;
2617 * ) unported=yes
2618 esac
2619 ;;
2620
f4988be7
GM
2621 ## IA-64
2622 ia64*-*-linux* )
2623 machine=ia64 opsys=gnu-linux
2624 ;;
2625
ba4481b5
DL
2626 ## Intel 386 machines where we don't care about the manufacturer
2627 i[3456]86-*-* )
2628 machine=intel386
2629 case "${canonical}" in
c60ee5e7 2630 *-cygwin ) opsys=cygwin ;;
eae54018 2631 *-darwin* ) opsys=darwin
23fd4483
ST
2632 CPP="${CC-cc} -E -no-cpp-precomp"
2633 ;;
ba4481b5 2634 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2635 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2636 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2637 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2638 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2639 esac
2640 ;;
2641
2642 ## m68k Linux-based GNU system
2643 m68k-*-linux-gnu* )
2644 machine=m68k opsys=gnu-linux
2645 ;;
2646
2647 ## Mips Linux-based GNU system
cd958eb3 2648 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2649 machine=mips opsys=gnu-linux
2650 ;;
2651
598a2813
AS
2652 ## AMD x86-64 Linux-based GNU system
2653 x86_64-*-linux-gnu* )
24b01ec4 2654 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2655 ;;
2656
94218e27 2657 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2658 xtensa*-*-linux-gnu* )
94218e27
DN
2659 machine=xtensa opsys=gnu-linux
2660 ;;
2661
ba4481b5
DL
2662 * )
2663 unported=yes
2664 ;;
2665esac
2666
2667### If the code above didn't choose an operating system, just choose
2668### an operating system based on the configuration name. You really
2669### only want to use this when you have no idea what the right
2670### operating system is; if you know what operating systems a machine
2671### runs, it's cleaner to make it explicit in the case statement
2672### above.
2673if test x"${opsys}" = x; then
2674 case "${canonical}" in
2675 *-gnu* ) opsys=gnu ;;
ba4481b5 2676 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2677 *-sysv5uw* ) opsys=unixware ;;
2678 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2679 *-sysv4.1* | *-sysvr4.1* )
2680 NON_GNU_CPP=/usr/lib/cpp
2681 opsys=usg5-4 ;;
2682 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2683 if [ x$NON_GNU_CPP = x ]; then
2684 if [ -f /usr/ccs/lib/cpp ]; then
2685 NON_GNU_CPP=/usr/ccs/lib/cpp
2686 else
2687 NON_GNU_CPP=/lib/cpp
2688 fi
2689 fi
2690 opsys=usg5-4-2 ;;
2691 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2692 * )
2693 unported=yes
2694 ;;
2695 esac
2696fi
2697
c0d27fcc 2698
22044edf 2699
ba4481b5 2700if test $unported = yes; then
c0d27fcc 2701 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2702Check \`etc/MACHINES' for recognized configuration names." >&5
2703echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2704Check \`etc/MACHINES' for recognized configuration names." >&2;}
2705 { (exit 1); exit 1; }; }
ba4481b5
DL
2706fi
2707
2708machfile="m/${machine}.h"
2709opsysfile="s/${opsys}.h"
2710
c0d27fcc 2711
ba4481b5
DL
2712#### Choose a compiler.
2713test -n "$CC" && cc_specified=yes
2714
2715# Save the value of CFLAGS that the user specified.
2716SPECIFIED_CFLAGS="$CFLAGS"
2717
503d2be0
AS
2718ac_ext=c
2719ac_cpp='$CPP $CPPFLAGS'
2720ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2721ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2722ac_compiler_gnu=$ac_cv_c_compiler_gnu
2723if test -n "$ac_tool_prefix"; then
2724 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2725set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2726{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2727echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2728if test "${ac_cv_prog_CC+set}" = set; then
2729 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2730else
2731 if test -n "$CC"; then
2732 ac_cv_prog_CC="$CC" # Let the user override the test.
2733else
c0d27fcc
MR
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2741 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
503d2be0 2746done
ca81d7a0 2747IFS=$as_save_IFS
503d2be0 2748
ba4481b5
DL
2749fi
2750fi
503d2be0 2751CC=$ac_cv_prog_CC
ba4481b5 2752if test -n "$CC"; then
ca81d7a0
JD
2753 { echo "$as_me:$LINENO: result: $CC" >&5
2754echo "${ECHO_T}$CC" >&6; }
503d2be0 2755else
ca81d7a0
JD
2756 { echo "$as_me:$LINENO: result: no" >&5
2757echo "${ECHO_T}no" >&6; }
503d2be0
AS
2758fi
2759
ca81d7a0 2760
503d2be0
AS
2761fi
2762if test -z "$ac_cv_prog_CC"; then
2763 ac_ct_CC=$CC
2764 # Extract the first word of "gcc", so it can be a program name with args.
2765set dummy gcc; ac_word=$2
ca81d7a0
JD
2766{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2767echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2768if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2769 echo $ECHO_N "(cached) $ECHO_C" >&6
2770else
2771 if test -n "$ac_ct_CC"; then
2772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2773else
c0d27fcc
MR
2774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2775for as_dir in $PATH
2776do
2777 IFS=$as_save_IFS
2778 test -z "$as_dir" && as_dir=.
2779 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2780 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2781 ac_cv_prog_ac_ct_CC="gcc"
2782 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2783 break 2
2784 fi
2785done
503d2be0 2786done
ca81d7a0 2787IFS=$as_save_IFS
503d2be0
AS
2788
2789fi
2790fi
2791ac_ct_CC=$ac_cv_prog_ac_ct_CC
2792if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2793 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2794echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2795else
ca81d7a0
JD
2796 { echo "$as_me:$LINENO: result: no" >&5
2797echo "${ECHO_T}no" >&6; }
503d2be0
AS
2798fi
2799
ca81d7a0
JD
2800 if test "x$ac_ct_CC" = x; then
2801 CC=""
2802 else
2803 case $cross_compiling:$ac_tool_warned in
2804yes:)
2805{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2806whose name does not start with the host triplet. If you think this
2807configuration is useful to you, please write to autoconf@gnu.org." >&5
2808echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2809whose name does not start with the host triplet. If you think this
2810configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2811ac_tool_warned=yes ;;
2812esac
2813 CC=$ac_ct_CC
2814 fi
503d2be0
AS
2815else
2816 CC="$ac_cv_prog_CC"
ba4481b5
DL
2817fi
2818
2819if test -z "$CC"; then
ca81d7a0
JD
2820 if test -n "$ac_tool_prefix"; then
2821 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2822set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2823{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2824echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2825if test "${ac_cv_prog_CC+set}" = set; then
2826 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2827else
2828 if test -n "$CC"; then
2829 ac_cv_prog_CC="$CC" # Let the user override the test.
2830else
c0d27fcc
MR
2831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2832for as_dir in $PATH
2833do
2834 IFS=$as_save_IFS
2835 test -z "$as_dir" && as_dir=.
2836 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2837 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2838 ac_cv_prog_CC="${ac_tool_prefix}cc"
2839 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2840 break 2
2841 fi
2842done
503d2be0 2843done
ca81d7a0 2844IFS=$as_save_IFS
503d2be0
AS
2845
2846fi
2847fi
2848CC=$ac_cv_prog_CC
2849if test -n "$CC"; then
ca81d7a0
JD
2850 { echo "$as_me:$LINENO: result: $CC" >&5
2851echo "${ECHO_T}$CC" >&6; }
503d2be0 2852else
ca81d7a0
JD
2853 { echo "$as_me:$LINENO: result: no" >&5
2854echo "${ECHO_T}no" >&6; }
503d2be0
AS
2855fi
2856
503d2be0 2857
ca81d7a0 2858 fi
503d2be0
AS
2859fi
2860if test -z "$CC"; then
2861 # Extract the first word of "cc", so it can be a program name with args.
2862set dummy cc; ac_word=$2
ca81d7a0
JD
2863{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2865if test "${ac_cv_prog_CC+set}" = set; then
2866 echo $ECHO_N "(cached) $ECHO_C" >&6
2867else
2868 if test -n "$CC"; then
2869 ac_cv_prog_CC="$CC" # Let the user override the test.
2870else
2871 ac_prog_rejected=no
c0d27fcc
MR
2872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2873for as_dir in $PATH
2874do
2875 IFS=$as_save_IFS
2876 test -z "$as_dir" && as_dir=.
2877 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2878 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2879 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2880 ac_prog_rejected=yes
2881 continue
2882 fi
2883 ac_cv_prog_CC="cc"
2884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2885 break 2
2886 fi
2887done
503d2be0 2888done
ca81d7a0 2889IFS=$as_save_IFS
503d2be0 2890
ba4481b5
DL
2891if test $ac_prog_rejected = yes; then
2892 # We found a bogon in the path, so make sure we never use it.
2893 set dummy $ac_cv_prog_CC
2894 shift
503d2be0 2895 if test $# != 0; then
ba4481b5
DL
2896 # We chose a different compiler from the bogus one.
2897 # However, it has the same basename, so the bogon will be chosen
2898 # first if we set CC to just the basename; use the full file name.
2899 shift
6bae0ccf 2900 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2901 fi
2902fi
2903fi
2904fi
503d2be0 2905CC=$ac_cv_prog_CC
ba4481b5 2906if test -n "$CC"; then
ca81d7a0
JD
2907 { echo "$as_me:$LINENO: result: $CC" >&5
2908echo "${ECHO_T}$CC" >&6; }
ba4481b5 2909else
ca81d7a0
JD
2910 { echo "$as_me:$LINENO: result: no" >&5
2911echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2912fi
2913
ca81d7a0 2914
503d2be0
AS
2915fi
2916if test -z "$CC"; then
2917 if test -n "$ac_tool_prefix"; then
ca81d7a0 2918 for ac_prog in cl.exe
503d2be0
AS
2919 do
2920 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2921set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2922{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2923echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2924if test "${ac_cv_prog_CC+set}" = set; then
2925 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2926else
2927 if test -n "$CC"; then
2928 ac_cv_prog_CC="$CC" # Let the user override the test.
2929else
c0d27fcc
MR
2930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2931for as_dir in $PATH
2932do
2933 IFS=$as_save_IFS
2934 test -z "$as_dir" && as_dir=.
2935 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2936 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2937 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2938 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2939 break 2
2940 fi
2941done
503d2be0 2942done
ca81d7a0 2943IFS=$as_save_IFS
503d2be0 2944
c4bb2108
DL
2945fi
2946fi
503d2be0 2947CC=$ac_cv_prog_CC
c4bb2108 2948if test -n "$CC"; then
ca81d7a0
JD
2949 { echo "$as_me:$LINENO: result: $CC" >&5
2950echo "${ECHO_T}$CC" >&6; }
c4bb2108 2951else
ca81d7a0
JD
2952 { echo "$as_me:$LINENO: result: no" >&5
2953echo "${ECHO_T}no" >&6; }
503d2be0
AS
2954fi
2955
ca81d7a0 2956
503d2be0
AS
2957 test -n "$CC" && break
2958 done
2959fi
2960if test -z "$CC"; then
2961 ac_ct_CC=$CC
ca81d7a0 2962 for ac_prog in cl.exe
503d2be0
AS
2963do
2964 # Extract the first word of "$ac_prog", so it can be a program name with args.
2965set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2966{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2967echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2968if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2969 echo $ECHO_N "(cached) $ECHO_C" >&6
2970else
2971 if test -n "$ac_ct_CC"; then
2972 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2973else
c0d27fcc
MR
2974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2975for as_dir in $PATH
2976do
2977 IFS=$as_save_IFS
2978 test -z "$as_dir" && as_dir=.
2979 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2981 ac_cv_prog_ac_ct_CC="$ac_prog"
2982 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2983 break 2
2984 fi
2985done
503d2be0 2986done
ca81d7a0 2987IFS=$as_save_IFS
503d2be0 2988
c4bb2108 2989fi
503d2be0
AS
2990fi
2991ac_ct_CC=$ac_cv_prog_ac_ct_CC
2992if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2993 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2994echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2995else
ca81d7a0
JD
2996 { echo "$as_me:$LINENO: result: no" >&5
2997echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2998fi
2999
ca81d7a0 3000
503d2be0
AS
3001 test -n "$ac_ct_CC" && break
3002done
ba4481b5 3003
ca81d7a0
JD
3004 if test "x$ac_ct_CC" = x; then
3005 CC=""
3006 else
3007 case $cross_compiling:$ac_tool_warned in
3008yes:)
3009{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3010whose name does not start with the host triplet. If you think this
3011configuration is useful to you, please write to autoconf@gnu.org." >&5
3012echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3013whose name does not start with the host triplet. If you think this
3014configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3015ac_tool_warned=yes ;;
3016esac
3017 CC=$ac_ct_CC
3018 fi
503d2be0
AS
3019fi
3020
3021fi
ba4481b5 3022
c0d27fcc 3023
19650fd6
AS
3024test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3025See \`config.log' for more details." >&5
3026echo "$as_me: error: no acceptable C compiler found in \$PATH
3027See \`config.log' for more details." >&2;}
503d2be0 3028 { (exit 1); exit 1; }; }
c4bb2108 3029
503d2be0 3030# Provide some information about the compiler.
ca81d7a0 3031echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3032ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3033{ (ac_try="$ac_compiler --version >&5"
3034case "(($ac_try" in
3035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036 *) ac_try_echo=$ac_try;;
3037esac
3038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3039 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3040 ac_status=$?
c0d27fcc 3041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3042 (exit $ac_status); }
ca81d7a0
JD
3043{ (ac_try="$ac_compiler -v >&5"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
3048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3049 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3050 ac_status=$?
c0d27fcc 3051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3052 (exit $ac_status); }
ca81d7a0
JD
3053{ (ac_try="$ac_compiler -V >&5"
3054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
3058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3059 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3060 ac_status=$?
c0d27fcc 3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3062 (exit $ac_status); }
3063
3064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3065/* confdefs.h. */
3066_ACEOF
3067cat confdefs.h >>conftest.$ac_ext
3068cat >>conftest.$ac_ext <<_ACEOF
3069/* end confdefs.h. */
c4bb2108 3070
503d2be0
AS
3071int
3072main ()
3073{
3074
3075 ;
3076 return 0;
3077}
3078_ACEOF
3079ac_clean_files_save=$ac_clean_files
19650fd6 3080ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3081# Try to create an executable without -o first, disregard a.out.
3082# It will help us diagnose broken compilers, and finding out an intuition
3083# of exeext.
ca81d7a0
JD
3084{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3085echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3086ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3087#
3088# List of possible output files, starting from the most likely.
3089# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3090# only as a last resort. b.out is created by i960 compilers.
3091ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3092#
3093# The IRIX 6 linker writes into existing files which may not be
3094# executable, retaining their permissions. Remove them first so a
3095# subsequent execution test works.
3096ac_rmfiles=
3097for ac_file in $ac_files
3098do
3099 case $ac_file in
3100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3101 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3102 esac
3103done
3104rm -f $ac_rmfiles
3105
3106if { (ac_try="$ac_link_default"
3107case "(($ac_try" in
3108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3109 *) ac_try_echo=$ac_try;;
3110esac
3111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3112 (eval "$ac_link_default") 2>&5
503d2be0 3113 ac_status=$?
c0d27fcc 3114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3115 (exit $ac_status); }; then
ca81d7a0
JD
3116 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3117# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3118# in a Makefile. We should not override ac_cv_exeext if it was cached,
3119# so that the user can short-circuit this test for compilers unknown to
3120# Autoconf.
f053c89f 3121for ac_file in $ac_files ''
19650fd6 3122do
6bae0ccf 3123 test -f "$ac_file" || continue
503d2be0 3124 case $ac_file in
ca81d7a0 3125 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3126 ;;
19650fd6 3127 [ab].out )
edfaf76d
LK
3128 # We found the default executable, but exeext='' is most
3129 # certainly right.
3130 break;;
19650fd6 3131 *.* )
ca81d7a0
JD
3132 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3133 then :; else
3134 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3135 fi
3136 # We set ac_cv_exeext here because the later test for it is not
3137 # safe: cross compilers may not add the suffix if given an `-o'
3138 # argument, so we may need to know it at that point already.
3139 # Even if this section looks crufty: it has the advantage of
3140 # actually working.
edfaf76d 3141 break;;
19650fd6 3142 * )
edfaf76d 3143 break;;
503d2be0
AS
3144 esac
3145done
ca81d7a0
JD
3146test "$ac_cv_exeext" = no && ac_cv_exeext=
3147
503d2be0 3148else
f053c89f
CY
3149 ac_file=''
3150fi
3151
3152{ echo "$as_me:$LINENO: result: $ac_file" >&5
3153echo "${ECHO_T}$ac_file" >&6; }
3154if test -z "$ac_file"; then
503d2be0 3155 echo "$as_me: failed program was:" >&5
19650fd6
AS
3156sed 's/^/| /' conftest.$ac_ext >&5
3157
6bae0ccf 3158{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3159See \`config.log' for more details." >&5
6bae0ccf 3160echo "$as_me: error: C compiler cannot create executables
19650fd6 3161See \`config.log' for more details." >&2;}
503d2be0
AS
3162 { (exit 77); exit 77; }; }
3163fi
3164
3165ac_exeext=$ac_cv_exeext
503d2be0 3166
ca81d7a0 3167# Check that the compiler produces executables we can run. If not, either
503d2be0 3168# the compiler is broken, or we cross compile.
ca81d7a0
JD
3169{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3170echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3171# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3172# If not cross compiling, check that we can run a simple program.
3173if test "$cross_compiling" != yes; then
3174 if { ac_try='./$ac_file'
ca81d7a0
JD
3175 { (case "(($ac_try" in
3176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3177 *) ac_try_echo=$ac_try;;
3178esac
3179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3180 (eval "$ac_try") 2>&5
503d2be0 3181 ac_status=$?
c0d27fcc 3182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3183 (exit $ac_status); }; }; then
3184 cross_compiling=no
ba4481b5 3185 else
503d2be0
AS
3186 if test "$cross_compiling" = maybe; then
3187 cross_compiling=yes
3188 else
c0d27fcc 3189 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3190If you meant to cross compile, use \`--host'.
3191See \`config.log' for more details." >&5
503d2be0 3192echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3193If you meant to cross compile, use \`--host'.
3194See \`config.log' for more details." >&2;}
503d2be0
AS
3195 { (exit 1); exit 1; }; }
3196 fi
ba4481b5 3197 fi
503d2be0 3198fi
ca81d7a0
JD
3199{ echo "$as_me:$LINENO: result: yes" >&5
3200echo "${ECHO_T}yes" >&6; }
503d2be0 3201
19650fd6 3202rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3203ac_clean_files=$ac_clean_files_save
ca81d7a0 3204# Check that the compiler produces executables we can run. If not, either
503d2be0 3205# the compiler is broken, or we cross compile.
ca81d7a0
JD
3206{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3207echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3208{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3209echo "${ECHO_T}$cross_compiling" >&6; }
3210
3211{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3212echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3213if { (ac_try="$ac_link"
3214case "(($ac_try" in
3215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3216 *) ac_try_echo=$ac_try;;
3217esac
3218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3219 (eval "$ac_link") 2>&5
503d2be0 3220 ac_status=$?
c0d27fcc 3221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3222 (exit $ac_status); }; then
3223 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3224# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3225# work properly (i.e., refer to `conftest.exe'), while it won't with
3226# `rm'.
6bae0ccf
DL
3227for ac_file in conftest.exe conftest conftest.*; do
3228 test -f "$ac_file" || continue
503d2be0 3229 case $ac_file in
ca81d7a0 3230 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3231 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3232 break;;
503d2be0
AS
3233 * ) break;;
3234 esac
3235done
ba4481b5 3236else
19650fd6
AS
3237 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3238See \`config.log' for more details." >&5
3239echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3240See \`config.log' for more details." >&2;}
503d2be0 3241 { (exit 1); exit 1; }; }
ba4481b5 3242fi
ba4481b5 3243
503d2be0 3244rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3245{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3246echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3247
503d2be0
AS
3248rm -f conftest.$ac_ext
3249EXEEXT=$ac_cv_exeext
3250ac_exeext=$EXEEXT
ca81d7a0
JD
3251{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3252echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3253if test "${ac_cv_objext+set}" = set; then
3254 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3255else
503d2be0 3256 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3257/* confdefs.h. */
3258_ACEOF
3259cat confdefs.h >>conftest.$ac_ext
3260cat >>conftest.$ac_ext <<_ACEOF
3261/* end confdefs.h. */
ba4481b5 3262
503d2be0
AS
3263int
3264main ()
3265{
ba4481b5 3266
503d2be0
AS
3267 ;
3268 return 0;
3269}
3270_ACEOF
3271rm -f conftest.o conftest.obj
ca81d7a0
JD
3272if { (ac_try="$ac_compile"
3273case "(($ac_try" in
3274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3275 *) ac_try_echo=$ac_try;;
3276esac
3277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3278 (eval "$ac_compile") 2>&5
503d2be0 3279 ac_status=$?
c0d27fcc 3280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3281 (exit $ac_status); }; then
ca81d7a0
JD
3282 for ac_file in conftest.o conftest.obj conftest.*; do
3283 test -f "$ac_file" || continue;
503d2be0 3284 case $ac_file in
ca81d7a0 3285 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3286 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3287 break;;
3288 esac
3289done
c4bb2108 3290else
503d2be0 3291 echo "$as_me: failed program was:" >&5
19650fd6
AS
3292sed 's/^/| /' conftest.$ac_ext >&5
3293
3294{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3295See \`config.log' for more details." >&5
3296echo "$as_me: error: cannot compute suffix of object files: cannot compile
3297See \`config.log' for more details." >&2;}
503d2be0 3298 { (exit 1); exit 1; }; }
c4bb2108
DL
3299fi
3300
503d2be0
AS
3301rm -f conftest.$ac_cv_objext conftest.$ac_ext
3302fi
ca81d7a0
JD
3303{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3304echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3305OBJEXT=$ac_cv_objext
3306ac_objext=$OBJEXT
ca81d7a0
JD
3307{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3308echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3309if test "${ac_cv_c_compiler_gnu+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3311else
503d2be0 3312 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3313/* confdefs.h. */
3314_ACEOF
3315cat confdefs.h >>conftest.$ac_ext
3316cat >>conftest.$ac_ext <<_ACEOF
3317/* end confdefs.h. */
503d2be0
AS
3318
3319int
3320main ()
3321{
3322#ifndef __GNUC__
3323 choke me
3324#endif
3325
3326 ;
3327 return 0;
3328}
3329_ACEOF
3330rm -f conftest.$ac_objext
ca81d7a0
JD
3331if { (ac_try="$ac_compile"
3332case "(($ac_try" in
3333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3334 *) ac_try_echo=$ac_try;;
3335esac
3336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3337 (eval "$ac_compile") 2>conftest.er1
503d2be0 3338 ac_status=$?
edfaf76d
LK
3339 grep -v '^ *+' conftest.er1 >conftest.err
3340 rm -f conftest.er1
3341 cat conftest.err >&5
c0d27fcc 3342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3343 (exit $ac_status); } && {
3344 test -z "$ac_c_werror_flag" ||
3345 test ! -s conftest.err
3346 } && test -s conftest.$ac_objext; then
503d2be0
AS
3347 ac_compiler_gnu=yes
3348else
3349 echo "$as_me: failed program was:" >&5
19650fd6
AS
3350sed 's/^/| /' conftest.$ac_ext >&5
3351
ca81d7a0 3352 ac_compiler_gnu=no
503d2be0 3353fi
ca81d7a0
JD
3354
3355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3356ac_cv_c_compiler_gnu=$ac_compiler_gnu
3357
3358fi
ca81d7a0
JD
3359{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3360echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3361GCC=`test $ac_compiler_gnu = yes && echo yes`
3362ac_test_CFLAGS=${CFLAGS+set}
3363ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3364{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3365echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3366if test "${ac_cv_prog_cc_g+set}" = set; then
3367 echo $ECHO_N "(cached) $ECHO_C" >&6
3368else
ca81d7a0
JD
3369 ac_save_c_werror_flag=$ac_c_werror_flag
3370 ac_c_werror_flag=yes
3371 ac_cv_prog_cc_g=no
3372 CFLAGS="-g"
3373 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3374/* confdefs.h. */
3375_ACEOF
3376cat confdefs.h >>conftest.$ac_ext
3377cat >>conftest.$ac_ext <<_ACEOF
3378/* end confdefs.h. */
503d2be0
AS
3379
3380int
3381main ()
3382{
3383
3384 ;
3385 return 0;
3386}
3387_ACEOF
3388rm -f conftest.$ac_objext
ca81d7a0
JD
3389if { (ac_try="$ac_compile"
3390case "(($ac_try" in
3391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392 *) ac_try_echo=$ac_try;;
3393esac
3394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3395 (eval "$ac_compile") 2>conftest.er1
503d2be0 3396 ac_status=$?
edfaf76d
LK
3397 grep -v '^ *+' conftest.er1 >conftest.err
3398 rm -f conftest.er1
3399 cat conftest.err >&5
c0d27fcc 3400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3401 (exit $ac_status); } && {
3402 test -z "$ac_c_werror_flag" ||
3403 test ! -s conftest.err
3404 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3405 ac_cv_prog_cc_g=yes
3406else
503d2be0 3407 echo "$as_me: failed program was:" >&5
19650fd6
AS
3408sed 's/^/| /' conftest.$ac_ext >&5
3409
ca81d7a0
JD
3410 CFLAGS=""
3411 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3412/* confdefs.h. */
3413_ACEOF
3414cat confdefs.h >>conftest.$ac_ext
3415cat >>conftest.$ac_ext <<_ACEOF
3416/* end confdefs.h. */
edfaf76d 3417
6bae0ccf
DL
3418int
3419main ()
3420{
ca81d7a0 3421
6bae0ccf
DL
3422 ;
3423 return 0;
3424}
3425_ACEOF
ca81d7a0
JD
3426rm -f conftest.$ac_objext
3427if { (ac_try="$ac_compile"
3428case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431esac
3432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3433 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3434 ac_status=$?
edfaf76d
LK
3435 grep -v '^ *+' conftest.er1 >conftest.err
3436 rm -f conftest.er1
3437 cat conftest.err >&5
edfaf76d 3438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3439 (exit $ac_status); } && {
3440 test -z "$ac_c_werror_flag" ||
3441 test ! -s conftest.err
3442 } && test -s conftest.$ac_objext; then
ca81d7a0 3443 :
6bae0ccf
DL
3444else
3445 echo "$as_me: failed program was:" >&5
19650fd6
AS
3446sed 's/^/| /' conftest.$ac_ext >&5
3447
ca81d7a0
JD
3448 ac_c_werror_flag=$ac_save_c_werror_flag
3449 CFLAGS="-g"
3450 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3451/* confdefs.h. */
19650fd6
AS
3452_ACEOF
3453cat confdefs.h >>conftest.$ac_ext
3454cat >>conftest.$ac_ext <<_ACEOF
3455/* end confdefs.h. */
ca81d7a0 3456
503d2be0
AS
3457int
3458main ()
3459{
ca81d7a0 3460
503d2be0
AS
3461 ;
3462 return 0;
3463}
3464_ACEOF
3465rm -f conftest.$ac_objext
ca81d7a0
JD
3466if { (ac_try="$ac_compile"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
3471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3472 (eval "$ac_compile") 2>conftest.er1
503d2be0 3473 ac_status=$?
edfaf76d
LK
3474 grep -v '^ *+' conftest.er1 >conftest.err
3475 rm -f conftest.er1
3476 cat conftest.err >&5
c0d27fcc 3477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3478 (exit $ac_status); } && {
3479 test -z "$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3482 ac_cv_prog_cc_g=yes
3483else
503d2be0 3484 echo "$as_me: failed program was:" >&5
19650fd6
AS
3485sed 's/^/| /' conftest.$ac_ext >&5
3486
ca81d7a0 3487
ba4481b5 3488fi
ca81d7a0
JD
3489
3490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3491fi
3492
3493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3494fi
3495
3496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3497 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3498fi
ca81d7a0
JD
3499{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3500echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3501if test "$ac_test_CFLAGS" = set; then
503d2be0 3502 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3503elif test $ac_cv_prog_cc_g = yes; then
3504 if test "$GCC" = yes; then
ba4481b5
DL
3505 CFLAGS="-g -O2"
3506 else
c4bb2108 3507 CFLAGS="-g"
ba4481b5 3508 fi
22afa6e8 3509else
c4bb2108
DL
3510 if test "$GCC" = yes; then
3511 CFLAGS="-O2"
3512 else
3513 CFLAGS=
3514 fi
ba4481b5 3515fi
ca81d7a0
JD
3516{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3517echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3518if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3519 echo $ECHO_N "(cached) $ECHO_C" >&6
3520else
ca81d7a0 3521 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3522ac_save_CC=$CC
3523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3524/* confdefs.h. */
3525_ACEOF
3526cat confdefs.h >>conftest.$ac_ext
3527cat >>conftest.$ac_ext <<_ACEOF
3528/* end confdefs.h. */
6bae0ccf
DL
3529#include <stdarg.h>
3530#include <stdio.h>
3531#include <sys/types.h>
3532#include <sys/stat.h>
3533/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3534struct buf { int x; };
3535FILE * (*rcsopen) (struct buf *, struct stat *, int);
3536static char *e (p, i)
3537 char **p;
3538 int i;
3539{
3540 return p[i];
3541}
3542static char *f (char * (*g) (char **, int), char **p, ...)
3543{
3544 char *s;
3545 va_list v;
3546 va_start (v,p);
3547 s = g (p, va_arg (v,int));
3548 va_end (v);
3549 return s;
3550}
edfaf76d
LK
3551
3552/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3553 function prototypes and stuff, but not '\xHH' hex character constants.
3554 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3555 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3556 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3557 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3558 that's true only with -std. */
edfaf76d
LK
3559int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3560
ca81d7a0
JD
3561/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3562 inside strings and character constants. */
3563#define FOO(x) 'x'
3564int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3565
6bae0ccf
DL
3566int test (int i, double x);
3567struct s1 {int (*f) (int a);};
3568struct s2 {int (*f) (double a);};
3569int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3570int argc;
3571char **argv;
3572int
3573main ()
3574{
3575return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3576 ;
3577 return 0;
3578}
3579_ACEOF
ca81d7a0
JD
3580for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3581 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3582do
3583 CC="$ac_save_CC $ac_arg"
3584 rm -f conftest.$ac_objext
ca81d7a0
JD
3585if { (ac_try="$ac_compile"
3586case "(($ac_try" in
3587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3588 *) ac_try_echo=$ac_try;;
3589esac
3590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3591 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3592 ac_status=$?
edfaf76d
LK
3593 grep -v '^ *+' conftest.er1 >conftest.err
3594 rm -f conftest.er1
3595 cat conftest.err >&5
6bae0ccf 3596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3597 (exit $ac_status); } && {
3598 test -z "$ac_c_werror_flag" ||
3599 test ! -s conftest.err
3600 } && test -s conftest.$ac_objext; then
ca81d7a0 3601 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3602else
3603 echo "$as_me: failed program was:" >&5
19650fd6
AS
3604sed 's/^/| /' conftest.$ac_ext >&5
3605
ca81d7a0 3606
6bae0ccf 3607fi
ca81d7a0
JD
3608
3609rm -f core conftest.err conftest.$ac_objext
3610 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3611done
ca81d7a0 3612rm -f conftest.$ac_ext
6bae0ccf
DL
3613CC=$ac_save_CC
3614
3615fi
ca81d7a0
JD
3616# AC_CACHE_VAL
3617case "x$ac_cv_prog_cc_c89" in
3618 x)
3619 { echo "$as_me:$LINENO: result: none needed" >&5
3620echo "${ECHO_T}none needed" >&6; } ;;
3621 xno)
3622 { echo "$as_me:$LINENO: result: unsupported" >&5
3623echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3624 *)
ca81d7a0
JD
3625 CC="$CC $ac_cv_prog_cc_c89"
3626 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3627echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3628esac
3629
19650fd6 3630
503d2be0
AS
3631ac_ext=c
3632ac_cpp='$CPP $CPPFLAGS'
3633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3636
c0d27fcc 3637
ba4481b5
DL
3638# On Suns, sometimes $CPP names a directory.
3639if test -n "$CPP" && test -d "$CPP"; then
3640 CPP=
3641fi
3642
089a966d
GM
3643## If not using gcc, and on Solaris, and no CPP specified, see if
3644## using a Sun compiler, which needs -Xs to prevent whitespace.
3645if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3646 test x"$CPP" = x; then
3647 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3648echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3649
3650if test "${emacs_cv_sunpro_c+set}" = set; then
3651 echo $ECHO_N "(cached) $ECHO_C" >&6
3652else
3653 cat >conftest.$ac_ext <<_ACEOF
3654/* confdefs.h. */
3655_ACEOF
3656cat confdefs.h >>conftest.$ac_ext
3657cat >>conftest.$ac_ext <<_ACEOF
3658/* end confdefs.h. */
3659
3660int
3661main ()
3662{
3663#ifndef __SUNPRO_C
3664fail;
3665#endif
3666
3667 ;
3668 return 0;
3669}
3670_ACEOF
3671rm -f conftest.$ac_objext conftest$ac_exeext
3672if { (ac_try="$ac_link"
3673case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
3677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3678 (eval "$ac_link") 2>conftest.er1
3679 ac_status=$?
3680 grep -v '^ *+' conftest.er1 >conftest.err
3681 rm -f conftest.er1
3682 cat conftest.err >&5
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); } && {
3685 test -z "$ac_c_werror_flag" ||
3686 test ! -s conftest.err
3687 } && test -s conftest$ac_exeext &&
3688 $as_test_x conftest$ac_exeext; then
3689 emacs_cv_sunpro_c=yes
3690else
3691 echo "$as_me: failed program was:" >&5
3692sed 's/^/| /' conftest.$ac_ext >&5
3693
3694 emacs_cv_sunpro_c=no
3695fi
3696
3697rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3698 conftest$ac_exeext conftest.$ac_ext
3699fi
3700
3701 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3702echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3703
3704 if test x"$emacs_cv_sunpro_c" = xyes; then
3705 NON_GNU_CPP="$CC -E -Xs"
3706 fi
3707fi
3708
ba4481b5
DL
3709#### Some systems specify a CPP to use unless we are using GCC.
3710#### Now that we know whether we are using GCC, we can decide whether
3711#### to use that one.
3712if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3713then
3714 CPP="$NON_GNU_CPP"
3715fi
3716
3717#### Some systems specify a CC to use unless we are using GCC.
3718#### Now that we know whether we are using GCC, we can decide whether
3719#### to use that one.
3720if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3721 test x$cc_specified != xyes
3722then
3723 CC="$NON_GNU_CC"
3724fi
3725
3726if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3727then
3728 CC="$CC $GCC_TEST_OPTIONS"
3729fi
3730
3731if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3732then
3733 CC="$CC $NON_GCC_TEST_OPTIONS"
3734fi
3735
a51f4969
SM
3736
3737cat >>confdefs.h <<\_ACEOF
3738#define _GNU_SOURCE 1
3739_ACEOF
3740
3741
e143ad11
AS
3742ac_ext=c
3743ac_cpp='$CPP $CPPFLAGS'
3744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3746ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3747{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3748echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3749# On Suns, sometimes $CPP names a directory.
3750if test -n "$CPP" && test -d "$CPP"; then
3751 CPP=
3752fi
3753if test -z "$CPP"; then
3754 if test "${ac_cv_prog_CPP+set}" = set; then
3755 echo $ECHO_N "(cached) $ECHO_C" >&6
3756else
3757 # Double quotes because CPP needs to be expanded
3758 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3759 do
3760 ac_preproc_ok=false
3761for ac_c_preproc_warn_flag in '' yes
3762do
3763 # Use a header file that comes with gcc, so configuring glibc
3764 # with a fresh cross-compiler works.
3765 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3766 # <limits.h> exists even on freestanding compilers.
3767 # On the NeXT, cc -E runs the code through the compiler's parser,
3768 # not just through cpp. "Syntax error" is here to catch this case.
3769 cat >conftest.$ac_ext <<_ACEOF
3770/* confdefs.h. */
3771_ACEOF
3772cat confdefs.h >>conftest.$ac_ext
3773cat >>conftest.$ac_ext <<_ACEOF
3774/* end confdefs.h. */
3775#ifdef __STDC__
3776# include <limits.h>
3777#else
3778# include <assert.h>
3779#endif
3780 Syntax error
3781_ACEOF
ca81d7a0
JD
3782if { (ac_try="$ac_cpp conftest.$ac_ext"
3783case "(($ac_try" in
3784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3785 *) ac_try_echo=$ac_try;;
3786esac
3787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3788 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3789 ac_status=$?
3790 grep -v '^ *+' conftest.er1 >conftest.err
3791 rm -f conftest.er1
3792 cat conftest.err >&5
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3794 (exit $ac_status); } >/dev/null && {
3795 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3796 test ! -s conftest.err
3797 }; then
e143ad11
AS
3798 :
3799else
3800 echo "$as_me: failed program was:" >&5
3801sed 's/^/| /' conftest.$ac_ext >&5
3802
3803 # Broken: fails on valid input.
3804continue
3805fi
ca81d7a0 3806
e143ad11
AS
3807rm -f conftest.err conftest.$ac_ext
3808
ca81d7a0 3809 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3810 # can be detected and how.
3811 cat >conftest.$ac_ext <<_ACEOF
3812/* confdefs.h. */
3813_ACEOF
3814cat confdefs.h >>conftest.$ac_ext
3815cat >>conftest.$ac_ext <<_ACEOF
3816/* end confdefs.h. */
3817#include <ac_nonexistent.h>
3818_ACEOF
ca81d7a0
JD
3819if { (ac_try="$ac_cpp conftest.$ac_ext"
3820case "(($ac_try" in
3821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822 *) ac_try_echo=$ac_try;;
3823esac
3824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3826 ac_status=$?
3827 grep -v '^ *+' conftest.er1 >conftest.err
3828 rm -f conftest.er1
3829 cat conftest.err >&5
3830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3831 (exit $ac_status); } >/dev/null && {
3832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3833 test ! -s conftest.err
3834 }; then
e143ad11
AS
3835 # Broken: success on invalid input.
3836continue
3837else
3838 echo "$as_me: failed program was:" >&5
3839sed 's/^/| /' conftest.$ac_ext >&5
3840
3841 # Passes both tests.
3842ac_preproc_ok=:
3843break
3844fi
ca81d7a0 3845
e143ad11
AS
3846rm -f conftest.err conftest.$ac_ext
3847
3848done
3849# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3850rm -f conftest.err conftest.$ac_ext
3851if $ac_preproc_ok; then
3852 break
3853fi
3854
3855 done
3856 ac_cv_prog_CPP=$CPP
3857
3858fi
3859 CPP=$ac_cv_prog_CPP
3860else
3861 ac_cv_prog_CPP=$CPP
3862fi
ca81d7a0
JD
3863{ echo "$as_me:$LINENO: result: $CPP" >&5
3864echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3865ac_preproc_ok=false
3866for ac_c_preproc_warn_flag in '' yes
3867do
3868 # Use a header file that comes with gcc, so configuring glibc
3869 # with a fresh cross-compiler works.
3870 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3871 # <limits.h> exists even on freestanding compilers.
3872 # On the NeXT, cc -E runs the code through the compiler's parser,
3873 # not just through cpp. "Syntax error" is here to catch this case.
3874 cat >conftest.$ac_ext <<_ACEOF
3875/* confdefs.h. */
3876_ACEOF
3877cat confdefs.h >>conftest.$ac_ext
3878cat >>conftest.$ac_ext <<_ACEOF
3879/* end confdefs.h. */
3880#ifdef __STDC__
3881# include <limits.h>
3882#else
3883# include <assert.h>
3884#endif
3885 Syntax error
3886_ACEOF
ca81d7a0
JD
3887if { (ac_try="$ac_cpp conftest.$ac_ext"
3888case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
3892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3894 ac_status=$?
3895 grep -v '^ *+' conftest.er1 >conftest.err
3896 rm -f conftest.er1
3897 cat conftest.err >&5
3898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3899 (exit $ac_status); } >/dev/null && {
3900 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3901 test ! -s conftest.err
3902 }; then
e143ad11
AS
3903 :
3904else
3905 echo "$as_me: failed program was:" >&5
3906sed 's/^/| /' conftest.$ac_ext >&5
3907
3908 # Broken: fails on valid input.
3909continue
3910fi
ca81d7a0 3911
e143ad11
AS
3912rm -f conftest.err conftest.$ac_ext
3913
ca81d7a0 3914 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3915 # can be detected and how.
3916 cat >conftest.$ac_ext <<_ACEOF
3917/* confdefs.h. */
3918_ACEOF
3919cat confdefs.h >>conftest.$ac_ext
3920cat >>conftest.$ac_ext <<_ACEOF
3921/* end confdefs.h. */
3922#include <ac_nonexistent.h>
3923_ACEOF
ca81d7a0
JD
3924if { (ac_try="$ac_cpp conftest.$ac_ext"
3925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
3929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3931 ac_status=$?
3932 grep -v '^ *+' conftest.er1 >conftest.err
3933 rm -f conftest.er1
3934 cat conftest.err >&5
3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3936 (exit $ac_status); } >/dev/null && {
3937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3938 test ! -s conftest.err
3939 }; then
e143ad11
AS
3940 # Broken: success on invalid input.
3941continue
3942else
3943 echo "$as_me: failed program was:" >&5
3944sed 's/^/| /' conftest.$ac_ext >&5
3945
3946 # Passes both tests.
3947ac_preproc_ok=:
3948break
3949fi
ca81d7a0 3950
e143ad11
AS
3951rm -f conftest.err conftest.$ac_ext
3952
3953done
3954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3955rm -f conftest.err conftest.$ac_ext
3956if $ac_preproc_ok; then
3957 :
3958else
3959 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3960See \`config.log' for more details." >&5
3961echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3962See \`config.log' for more details." >&2;}
3963 { (exit 1); exit 1; }; }
3964fi
3965
3966ac_ext=c
3967ac_cpp='$CPP $CPPFLAGS'
3968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3970ac_compiler_gnu=$ac_cv_c_compiler_gnu
3971
3972
ca81d7a0
JD
3973{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3974echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3975if test "${ac_cv_path_GREP+set}" = set; then
3976 echo $ECHO_N "(cached) $ECHO_C" >&6
3977else
3978 # Extract the first word of "grep ggrep" to use in msg output
3979if test -z "$GREP"; then
3980set dummy grep ggrep; ac_prog_name=$2
3981if test "${ac_cv_path_GREP+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3983else
3984 ac_path_GREP_found=false
3985# Loop through the user's path and test for each of PROGNAME-LIST
3986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3988do
3989 IFS=$as_save_IFS
3990 test -z "$as_dir" && as_dir=.
3991 for ac_prog in grep ggrep; do
3992 for ac_exec_ext in '' $ac_executable_extensions; do
3993 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 3994 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
3995 # Check for GNU ac_path_GREP and select it if it is found.
3996 # Check for GNU $ac_path_GREP
3997case `"$ac_path_GREP" --version 2>&1` in
3998*GNU*)
3999 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4000*)
4001 ac_count=0
4002 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4003 while :
4004 do
4005 cat "conftest.in" "conftest.in" >"conftest.tmp"
4006 mv "conftest.tmp" "conftest.in"
4007 cp "conftest.in" "conftest.nl"
4008 echo 'GREP' >> "conftest.nl"
4009 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4010 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4011 ac_count=`expr $ac_count + 1`
4012 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4013 # Best one so far, save it but keep looking for a better one
4014 ac_cv_path_GREP="$ac_path_GREP"
4015 ac_path_GREP_max=$ac_count
4016 fi
4017 # 10*(2^10) chars as input seems more than enough
4018 test $ac_count -gt 10 && break
4019 done
4020 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4021esac
4022
4023
4024 $ac_path_GREP_found && break 3
4025 done
4026done
4027
4028done
4029IFS=$as_save_IFS
4030
4031
4032fi
4033
4034GREP="$ac_cv_path_GREP"
4035if test -z "$GREP"; then
4036 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4037echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4038 { (exit 1); exit 1; }; }
4039fi
4040
4041else
4042 ac_cv_path_GREP=$GREP
4043fi
4044
4045
4046fi
4047{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4048echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4049 GREP="$ac_cv_path_GREP"
4050
4051
4052{ echo "$as_me:$LINENO: checking for egrep" >&5
4053echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4054if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4055 echo $ECHO_N "(cached) $ECHO_C" >&6
4056else
ca81d7a0
JD
4057 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4058 then ac_cv_path_EGREP="$GREP -E"
4059 else
4060 # Extract the first word of "egrep" to use in msg output
4061if test -z "$EGREP"; then
4062set dummy egrep; ac_prog_name=$2
4063if test "${ac_cv_path_EGREP+set}" = set; then
4064 echo $ECHO_N "(cached) $ECHO_C" >&6
4065else
4066 ac_path_EGREP_found=false
4067# Loop through the user's path and test for each of PROGNAME-LIST
4068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
4073 for ac_prog in egrep; do
4074 for ac_exec_ext in '' $ac_executable_extensions; do
4075 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4076 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4077 # Check for GNU ac_path_EGREP and select it if it is found.
4078 # Check for GNU $ac_path_EGREP
4079case `"$ac_path_EGREP" --version 2>&1` in
4080*GNU*)
4081 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4082*)
4083 ac_count=0
4084 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4085 while :
4086 do
4087 cat "conftest.in" "conftest.in" >"conftest.tmp"
4088 mv "conftest.tmp" "conftest.in"
4089 cp "conftest.in" "conftest.nl"
4090 echo 'EGREP' >> "conftest.nl"
4091 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4092 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4093 ac_count=`expr $ac_count + 1`
4094 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4095 # Best one so far, save it but keep looking for a better one
4096 ac_cv_path_EGREP="$ac_path_EGREP"
4097 ac_path_EGREP_max=$ac_count
e143ad11 4098 fi
ca81d7a0
JD
4099 # 10*(2^10) chars as input seems more than enough
4100 test $ac_count -gt 10 && break
4101 done
4102 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4103esac
4104
4105
4106 $ac_path_EGREP_found && break 3
4107 done
4108done
4109
4110done
4111IFS=$as_save_IFS
4112
4113
e143ad11 4114fi
e143ad11 4115
ca81d7a0
JD
4116EGREP="$ac_cv_path_EGREP"
4117if test -z "$EGREP"; then
4118 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4119echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4120 { (exit 1); exit 1; }; }
4121fi
e143ad11 4122
ca81d7a0
JD
4123else
4124 ac_cv_path_EGREP=$EGREP
4125fi
e143ad11 4126
ca81d7a0
JD
4127
4128 fi
8eeae1c9 4129fi
ca81d7a0
JD
4130{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4131echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4132 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4133
4134
4135
ca81d7a0
JD
4136{ echo "$as_me:$LINENO: checking for AIX" >&5
4137echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4138cat >conftest.$ac_ext <<_ACEOF
4139/* confdefs.h. */
4140_ACEOF
4141cat confdefs.h >>conftest.$ac_ext
4142cat >>conftest.$ac_ext <<_ACEOF
4143/* end confdefs.h. */
4144#ifdef _AIX
4145 yes
4146#endif
4147
4148_ACEOF
4149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4150 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4151 { echo "$as_me:$LINENO: result: yes" >&5
4152echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4153cat >>confdefs.h <<\_ACEOF
4154#define _ALL_SOURCE 1
4155_ACEOF
4156
4157else
ca81d7a0
JD
4158 { echo "$as_me:$LINENO: result: no" >&5
4159echo "${ECHO_T}no" >&6; }
e143ad11 4160fi
a51f4969
SM
4161rm -f conftest*
4162
4163
4164{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4165echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4166if test "${ac_cv_header_stdc+set}" = set; then
4167 echo $ECHO_N "(cached) $ECHO_C" >&6
4168else
4169 cat >conftest.$ac_ext <<_ACEOF
4170/* confdefs.h. */
4171_ACEOF
4172cat confdefs.h >>conftest.$ac_ext
4173cat >>conftest.$ac_ext <<_ACEOF
4174/* end confdefs.h. */
4175#include <stdlib.h>
4176#include <stdarg.h>
4177#include <string.h>
4178#include <float.h>
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
4188rm -f conftest.$ac_objext
4189if { (ac_try="$ac_compile"
4190case "(($ac_try" in
4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192 *) ac_try_echo=$ac_try;;
4193esac
4194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4195 (eval "$ac_compile") 2>conftest.er1
4196 ac_status=$?
4197 grep -v '^ *+' conftest.er1 >conftest.err
4198 rm -f conftest.er1
4199 cat conftest.err >&5
4200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201 (exit $ac_status); } && {
4202 test -z "$ac_c_werror_flag" ||
4203 test ! -s conftest.err
4204 } && test -s conftest.$ac_objext; then
4205 ac_cv_header_stdc=yes
4206else
4207 echo "$as_me: failed program was:" >&5
4208sed 's/^/| /' conftest.$ac_ext >&5
4209
4210 ac_cv_header_stdc=no
4211fi
4212
4213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4214
4215if test $ac_cv_header_stdc = yes; then
4216 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4217 cat >conftest.$ac_ext <<_ACEOF
4218/* confdefs.h. */
4219_ACEOF
4220cat confdefs.h >>conftest.$ac_ext
4221cat >>conftest.$ac_ext <<_ACEOF
4222/* end confdefs.h. */
4223#include <string.h>
4224
4225_ACEOF
4226if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4227 $EGREP "memchr" >/dev/null 2>&1; then
4228 :
4229else
4230 ac_cv_header_stdc=no
4231fi
4232rm -f conftest*
4233
4234fi
4235
4236if test $ac_cv_header_stdc = yes; then
4237 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4238 cat >conftest.$ac_ext <<_ACEOF
4239/* confdefs.h. */
4240_ACEOF
4241cat confdefs.h >>conftest.$ac_ext
4242cat >>conftest.$ac_ext <<_ACEOF
4243/* end confdefs.h. */
4244#include <stdlib.h>
4245
4246_ACEOF
4247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4248 $EGREP "free" >/dev/null 2>&1; then
4249 :
4250else
4251 ac_cv_header_stdc=no
4252fi
4253rm -f conftest*
4254
4255fi
4256
4257if test $ac_cv_header_stdc = yes; then
4258 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4259 if test "$cross_compiling" = yes; then
4260 :
4261else
4262 cat >conftest.$ac_ext <<_ACEOF
4263/* confdefs.h. */
4264_ACEOF
4265cat confdefs.h >>conftest.$ac_ext
4266cat >>conftest.$ac_ext <<_ACEOF
4267/* end confdefs.h. */
4268#include <ctype.h>
4269#include <stdlib.h>
4270#if ((' ' & 0x0FF) == 0x020)
4271# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4272# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4273#else
4274# define ISLOWER(c) \
4275 (('a' <= (c) && (c) <= 'i') \
4276 || ('j' <= (c) && (c) <= 'r') \
4277 || ('s' <= (c) && (c) <= 'z'))
4278# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4279#endif
4280
4281#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4282int
4283main ()
4284{
4285 int i;
4286 for (i = 0; i < 256; i++)
4287 if (XOR (islower (i), ISLOWER (i))
4288 || toupper (i) != TOUPPER (i))
4289 return 2;
4290 return 0;
4291}
4292_ACEOF
4293rm -f conftest$ac_exeext
4294if { (ac_try="$ac_link"
4295case "(($ac_try" in
4296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4297 *) ac_try_echo=$ac_try;;
4298esac
4299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4300 (eval "$ac_link") 2>&5
4301 ac_status=$?
4302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4304 { (case "(($ac_try" in
4305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4306 *) ac_try_echo=$ac_try;;
4307esac
4308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4309 (eval "$ac_try") 2>&5
4310 ac_status=$?
4311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4312 (exit $ac_status); }; }; then
4313 :
4314else
4315 echo "$as_me: program exited with status $ac_status" >&5
4316echo "$as_me: failed program was:" >&5
4317sed 's/^/| /' conftest.$ac_ext >&5
4318
4319( exit $ac_status )
4320ac_cv_header_stdc=no
4321fi
4322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4323fi
4324
4325
4326fi
4327fi
4328{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4329echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4330if test $ac_cv_header_stdc = yes; then
4331
4332cat >>confdefs.h <<\_ACEOF
4333#define STDC_HEADERS 1
4334_ACEOF
4335
4336fi
4337
4338# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4349 inttypes.h stdint.h unistd.h
4350do
4351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4352{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4353echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4354if { as_var=$as_ac_Header; eval "test \"\${$as_var+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$ac_includes_default
4364
4365#include <$ac_header>
4366_ACEOF
4367rm -f conftest.$ac_objext
4368if { (ac_try="$ac_compile"
4369case "(($ac_try" in
4370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4371 *) ac_try_echo=$ac_try;;
4372esac
4373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4374 (eval "$ac_compile") 2>conftest.er1
4375 ac_status=$?
4376 grep -v '^ *+' conftest.er1 >conftest.err
4377 rm -f conftest.er1
4378 cat conftest.err >&5
4379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4380 (exit $ac_status); } && {
4381 test -z "$ac_c_werror_flag" ||
4382 test ! -s conftest.err
4383 } && test -s conftest.$ac_objext; then
4384 eval "$as_ac_Header=yes"
4385else
4386 echo "$as_me: failed program was:" >&5
4387sed 's/^/| /' conftest.$ac_ext >&5
4388
4389 eval "$as_ac_Header=no"
4390fi
4391
4392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4393fi
4394ac_res=`eval echo '${'$as_ac_Header'}'`
4395 { echo "$as_me:$LINENO: result: $ac_res" >&5
4396echo "${ECHO_T}$ac_res" >&6; }
4397if test `eval echo '${'$as_ac_Header'}'` = yes; then
4398 cat >>confdefs.h <<_ACEOF
4399#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4400_ACEOF
4401
4402fi
4403
4404done
4405
4406
4407if test "${ac_cv_header_minix_config_h+set}" = set; then
4408 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4409echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4410if test "${ac_cv_header_minix_config_h+set}" = set; then
4411 echo $ECHO_N "(cached) $ECHO_C" >&6
4412fi
4413{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4414echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4415else
4416 # Is the header compilable?
4417{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4418echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4419cat >conftest.$ac_ext <<_ACEOF
4420/* confdefs.h. */
4421_ACEOF
4422cat confdefs.h >>conftest.$ac_ext
4423cat >>conftest.$ac_ext <<_ACEOF
4424/* end confdefs.h. */
4425$ac_includes_default
4426#include <minix/config.h>
4427_ACEOF
4428rm -f conftest.$ac_objext
4429if { (ac_try="$ac_compile"
4430case "(($ac_try" in
4431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4432 *) ac_try_echo=$ac_try;;
4433esac
4434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4435 (eval "$ac_compile") 2>conftest.er1
4436 ac_status=$?
4437 grep -v '^ *+' conftest.er1 >conftest.err
4438 rm -f conftest.er1
4439 cat conftest.err >&5
4440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4441 (exit $ac_status); } && {
4442 test -z "$ac_c_werror_flag" ||
4443 test ! -s conftest.err
4444 } && test -s conftest.$ac_objext; then
4445 ac_header_compiler=yes
4446else
4447 echo "$as_me: failed program was:" >&5
4448sed 's/^/| /' conftest.$ac_ext >&5
4449
4450 ac_header_compiler=no
4451fi
4452
4453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4455echo "${ECHO_T}$ac_header_compiler" >&6; }
4456
4457# Is the header present?
4458{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4459echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4460cat >conftest.$ac_ext <<_ACEOF
4461/* confdefs.h. */
4462_ACEOF
4463cat confdefs.h >>conftest.$ac_ext
4464cat >>conftest.$ac_ext <<_ACEOF
4465/* end confdefs.h. */
4466#include <minix/config.h>
4467_ACEOF
4468if { (ac_try="$ac_cpp conftest.$ac_ext"
4469case "(($ac_try" in
4470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4471 *) ac_try_echo=$ac_try;;
4472esac
4473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4475 ac_status=$?
4476 grep -v '^ *+' conftest.er1 >conftest.err
4477 rm -f conftest.er1
4478 cat conftest.err >&5
4479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480 (exit $ac_status); } >/dev/null && {
4481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4482 test ! -s conftest.err
4483 }; then
4484 ac_header_preproc=yes
4485else
4486 echo "$as_me: failed program was:" >&5
4487sed 's/^/| /' conftest.$ac_ext >&5
4488
4489 ac_header_preproc=no
4490fi
4491
4492rm -f conftest.err conftest.$ac_ext
4493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4494echo "${ECHO_T}$ac_header_preproc" >&6; }
4495
4496# So? What about this header?
4497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4498 yes:no: )
4499 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4500echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4501 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4502echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4503 ac_header_preproc=yes
4504 ;;
4505 no:yes:* )
4506 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4507echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4508 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4509echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4510 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4511echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4512 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4513echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4514 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4515echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4516 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4517echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4518
4519 ;;
4520esac
4521{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4522echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4523if test "${ac_cv_header_minix_config_h+set}" = set; then
4524 echo $ECHO_N "(cached) $ECHO_C" >&6
4525else
4526 ac_cv_header_minix_config_h=$ac_header_preproc
4527fi
4528{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4529echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4530
4531fi
4532if test $ac_cv_header_minix_config_h = yes; then
4533 MINIX=yes
4534else
4535 MINIX=
4536fi
4537
4538
4539if test "$MINIX" = yes; then
4540
4541cat >>confdefs.h <<\_ACEOF
4542#define _POSIX_SOURCE 1
4543_ACEOF
4544
4545
4546cat >>confdefs.h <<\_ACEOF
4547#define _POSIX_1_SOURCE 2
4548_ACEOF
4549
4550
4551cat >>confdefs.h <<\_ACEOF
4552#define _MINIX 1
4553_ACEOF
4554
4555fi
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4568echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4569if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4570 echo $ECHO_N "(cached) $ECHO_C" >&6
4571else
4572 cat >conftest.$ac_ext <<_ACEOF
4573/* confdefs.h. */
4574_ACEOF
4575cat confdefs.h >>conftest.$ac_ext
4576cat >>conftest.$ac_ext <<_ACEOF
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589rm -f conftest.$ac_objext
4590if { (ac_try="$ac_compile"
4591case "(($ac_try" in
4592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4593 *) ac_try_echo=$ac_try;;
4594esac
4595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4596 (eval "$ac_compile") 2>conftest.er1
4597 ac_status=$?
4598 grep -v '^ *+' conftest.er1 >conftest.err
4599 rm -f conftest.er1
4600 cat conftest.err >&5
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); } && {
4603 test -z "$ac_c_werror_flag" ||
4604 test ! -s conftest.err
4605 } && test -s conftest.$ac_objext; then
4606 ac_cv_safe_to_define___extensions__=yes
4607else
4608 echo "$as_me: failed program was:" >&5
4609sed 's/^/| /' conftest.$ac_ext >&5
4610
4611 ac_cv_safe_to_define___extensions__=no
4612fi
e143ad11 4613
a51f4969
SM
4614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4615fi
4616{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4617echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4618 test $ac_cv_safe_to_define___extensions__ = yes &&
4619 cat >>confdefs.h <<\_ACEOF
4620#define __EXTENSIONS__ 1
4621_ACEOF
e143ad11 4622
a51f4969
SM
4623 cat >>confdefs.h <<\_ACEOF
4624#define _POSIX_PTHREAD_SEMANTICS 1
4625_ACEOF
e143ad11 4626
a51f4969
SM
4627 cat >>confdefs.h <<\_ACEOF
4628#define _TANDEM_SOURCE 1
e143ad11
AS
4629_ACEOF
4630
4631
4632
01abe918 4633### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4634{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4635echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4636SAVE_CFLAGS="$CFLAGS"
4637CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4638cat >conftest.$ac_ext <<_ACEOF
4639/* confdefs.h. */
4640_ACEOF
4641cat confdefs.h >>conftest.$ac_ext
4642cat >>conftest.$ac_ext <<_ACEOF
4643/* end confdefs.h. */
4644
4645int
4646main ()
4647{
4648
4649 ;
4650 return 0;
4651}
4652_ACEOF
4653rm -f conftest.$ac_objext
ca81d7a0
JD
4654if { (ac_try="$ac_compile"
4655case "(($ac_try" in
4656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4657 *) ac_try_echo=$ac_try;;
4658esac
4659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4660 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4661 ac_status=$?
4662 grep -v '^ *+' conftest.er1 >conftest.err
4663 rm -f conftest.er1
4664 cat conftest.err >&5
4665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4666 (exit $ac_status); } && {
4667 test -z "$ac_c_werror_flag" ||
4668 test ! -s conftest.err
4669 } && test -s conftest.$ac_objext; then
01abe918
CY
4670 has_option=yes
4671else
4672 echo "$as_me: failed program was:" >&5
4673sed 's/^/| /' conftest.$ac_ext >&5
4674
ca81d7a0 4675 has_option=no
01abe918 4676fi
ca81d7a0
JD
4677
4678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4679if test $has_option = yes; then
4680 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4681fi
ca81d7a0
JD
4682{ echo "$as_me:$LINENO: result: $has_option" >&5
4683echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4684CFLAGS="$SAVE_CFLAGS"
4685unset has_option
4686unset SAVE_CFLAGS
4687
6a3a24fa 4688#### Some other nice autoconf tests.
ba4481b5 4689
ca81d7a0
JD
4690{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4691echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4692LN_S=$as_ln_s
4693if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4694 { echo "$as_me:$LINENO: result: yes" >&5
4695echo "${ECHO_T}yes" >&6; }
ba4481b5 4696else
ca81d7a0
JD
4697 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4698echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4699fi
4700
503d2be0
AS
4701ac_ext=c
4702ac_cpp='$CPP $CPPFLAGS'
4703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4705ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4706{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4707echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4708# On Suns, sometimes $CPP names a directory.
4709if test -n "$CPP" && test -d "$CPP"; then
4710 CPP=
4711fi
4712if test -z "$CPP"; then
503d2be0
AS
4713 if test "${ac_cv_prog_CPP+set}" = set; then
4714 echo $ECHO_N "(cached) $ECHO_C" >&6
4715else
4716 # Double quotes because CPP needs to be expanded
4717 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4718 do
4719 ac_preproc_ok=false
4720for ac_c_preproc_warn_flag in '' yes
4721do
4722 # Use a header file that comes with gcc, so configuring glibc
4723 # with a fresh cross-compiler works.
19650fd6
AS
4724 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4725 # <limits.h> exists even on freestanding compilers.
ba4481b5 4726 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4727 # not just through cpp. "Syntax error" is here to catch this case.
4728 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4729/* confdefs.h. */
4730_ACEOF
4731cat confdefs.h >>conftest.$ac_ext
4732cat >>conftest.$ac_ext <<_ACEOF
4733/* end confdefs.h. */
4734#ifdef __STDC__
4735# include <limits.h>
4736#else
4737# include <assert.h>
4738#endif
edfaf76d 4739 Syntax error
503d2be0 4740_ACEOF
ca81d7a0
JD
4741if { (ac_try="$ac_cpp conftest.$ac_ext"
4742case "(($ac_try" in
4743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4744 *) ac_try_echo=$ac_try;;
4745esac
4746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4747 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4748 ac_status=$?
6bae0ccf 4749 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4750 rm -f conftest.er1
4751 cat conftest.err >&5
c0d27fcc 4752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4753 (exit $ac_status); } >/dev/null && {
4754 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4755 test ! -s conftest.err
4756 }; then
ba4481b5
DL
4757 :
4758else
503d2be0 4759 echo "$as_me: failed program was:" >&5
19650fd6
AS
4760sed 's/^/| /' conftest.$ac_ext >&5
4761
503d2be0
AS
4762 # Broken: fails on valid input.
4763continue
4764fi
ca81d7a0 4765
503d2be0
AS
4766rm -f conftest.err conftest.$ac_ext
4767
ca81d7a0 4768 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4769 # can be detected and how.
4770 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4771/* confdefs.h. */
4772_ACEOF
4773cat confdefs.h >>conftest.$ac_ext
4774cat >>conftest.$ac_ext <<_ACEOF
4775/* end confdefs.h. */
503d2be0
AS
4776#include <ac_nonexistent.h>
4777_ACEOF
ca81d7a0
JD
4778if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4785 ac_status=$?
6bae0ccf 4786 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4787 rm -f conftest.er1
4788 cat conftest.err >&5
c0d27fcc 4789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4790 (exit $ac_status); } >/dev/null && {
4791 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4792 test ! -s conftest.err
4793 }; then
503d2be0
AS
4794 # Broken: success on invalid input.
4795continue
c4bb2108 4796else
503d2be0 4797 echo "$as_me: failed program was:" >&5
19650fd6
AS
4798sed 's/^/| /' conftest.$ac_ext >&5
4799
503d2be0
AS
4800 # Passes both tests.
4801ac_preproc_ok=:
4802break
4803fi
ca81d7a0 4804
503d2be0
AS
4805rm -f conftest.err conftest.$ac_ext
4806
4807done
4808# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4809rm -f conftest.err conftest.$ac_ext
4810if $ac_preproc_ok; then
4811 break
4812fi
4813
4814 done
4815 ac_cv_prog_CPP=$CPP
4816
4817fi
4818 CPP=$ac_cv_prog_CPP
4819else
4820 ac_cv_prog_CPP=$CPP
4821fi
ca81d7a0
JD
4822{ echo "$as_me:$LINENO: result: $CPP" >&5
4823echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4824ac_preproc_ok=false
4825for ac_c_preproc_warn_flag in '' yes
4826do
4827 # Use a header file that comes with gcc, so configuring glibc
4828 # with a fresh cross-compiler works.
19650fd6
AS
4829 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4830 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4831 # On the NeXT, cc -E runs the code through the compiler's parser,
4832 # not just through cpp. "Syntax error" is here to catch this case.
4833 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4834/* confdefs.h. */
4835_ACEOF
4836cat confdefs.h >>conftest.$ac_ext
4837cat >>conftest.$ac_ext <<_ACEOF
4838/* end confdefs.h. */
4839#ifdef __STDC__
4840# include <limits.h>
4841#else
4842# include <assert.h>
4843#endif
edfaf76d 4844 Syntax error
503d2be0 4845_ACEOF
ca81d7a0
JD
4846if { (ac_try="$ac_cpp conftest.$ac_ext"
4847case "(($ac_try" in
4848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4849 *) ac_try_echo=$ac_try;;
4850esac
4851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4852 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4853 ac_status=$?
6bae0ccf 4854 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4855 rm -f conftest.er1
4856 cat conftest.err >&5
c0d27fcc 4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4858 (exit $ac_status); } >/dev/null && {
4859 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4860 test ! -s conftest.err
4861 }; then
ba4481b5
DL
4862 :
4863else
503d2be0 4864 echo "$as_me: failed program was:" >&5
19650fd6
AS
4865sed 's/^/| /' conftest.$ac_ext >&5
4866
503d2be0
AS
4867 # Broken: fails on valid input.
4868continue
4869fi
ca81d7a0 4870
503d2be0
AS
4871rm -f conftest.err conftest.$ac_ext
4872
ca81d7a0 4873 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4874 # can be detected and how.
4875 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4876/* confdefs.h. */
4877_ACEOF
4878cat confdefs.h >>conftest.$ac_ext
4879cat >>conftest.$ac_ext <<_ACEOF
4880/* end confdefs.h. */
503d2be0
AS
4881#include <ac_nonexistent.h>
4882_ACEOF
ca81d7a0
JD
4883if { (ac_try="$ac_cpp conftest.$ac_ext"
4884case "(($ac_try" in
4885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4886 *) ac_try_echo=$ac_try;;
4887esac
4888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4889 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4890 ac_status=$?
6bae0ccf 4891 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4892 rm -f conftest.er1
4893 cat conftest.err >&5
c0d27fcc 4894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4895 (exit $ac_status); } >/dev/null && {
4896 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4897 test ! -s conftest.err
4898 }; then
503d2be0
AS
4899 # Broken: success on invalid input.
4900continue
4901else
4902 echo "$as_me: failed program was:" >&5
19650fd6
AS
4903sed 's/^/| /' conftest.$ac_ext >&5
4904
503d2be0
AS
4905 # Passes both tests.
4906ac_preproc_ok=:
4907break
ba4481b5 4908fi
ca81d7a0 4909
503d2be0
AS
4910rm -f conftest.err conftest.$ac_ext
4911
4912done
4913# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4914rm -f conftest.err conftest.$ac_ext
4915if $ac_preproc_ok; then
4916 :
ba4481b5 4917else
19650fd6
AS
4918 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4919See \`config.log' for more details." >&5
4920echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4921See \`config.log' for more details." >&2;}
503d2be0 4922 { (exit 1); exit 1; }; }
ba4481b5 4923fi
503d2be0
AS
4924
4925ac_ext=c
4926ac_cpp='$CPP $CPPFLAGS'
4927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4929ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4930
4931# Find a good install program. We prefer a C program (faster),
4932# so one script is as good as another. But avoid the broken or
4933# incompatible versions:
4934# SysV /etc/install, /usr/sbin/install
4935# SunOS /usr/etc/install
4936# IRIX /sbin/install
4937# AIX /bin/install
503d2be0 4938# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4939# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4940# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4941# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4942# OS/2's system install, which has a completely different semantic
ba4481b5 4943# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4944{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4945echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4946if test -z "$INSTALL"; then
503d2be0
AS
4947if test "${ac_cv_path_install+set}" = set; then
4948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4949else
c0d27fcc
MR
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in $PATH
4952do
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 # Account for people who put trailing slashes in PATH elements.
4956case $as_dir/ in
4957 ./ | .// | /cC/* | \
4958 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4959 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4960 /usr/ucb/* ) ;;
4961 *)
4962 # OSF1 and SCO ODT 3.0 have their own names for install.
4963 # Don't use installbsd from OSF since it installs stuff as root
4964 # by default.
4965 for ac_prog in ginstall scoinst install; do
4966 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4967 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4968 if test $ac_prog = install &&
4969 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4970 # AIX install. It has an incompatible calling convention.
4971 :
4972 elif test $ac_prog = install &&
4973 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4974 # program-specific install script used by HP pwplus--don't use.
4975 :
4976 else
4977 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4978 break 3
4979 fi
4980 fi
ba4481b5 4981 done
c0d27fcc
MR
4982 done
4983 ;;
4984esac
4985done
ca81d7a0 4986IFS=$as_save_IFS
c0d27fcc 4987
ba4481b5
DL
4988
4989fi
4990 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4991 INSTALL=$ac_cv_path_install
ba4481b5 4992 else
ca81d7a0
JD
4993 # As a last resort, use the slow shell script. Don't cache a
4994 # value for INSTALL within a source directory, because that will
ba4481b5 4995 # break other packages using the cache if that directory is
ca81d7a0 4996 # removed, or if the value is a relative name.
503d2be0 4997 INSTALL=$ac_install_sh
ba4481b5
DL
4998 fi
4999fi
ca81d7a0
JD
5000{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5001echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5002
5003# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5004# It thinks the first close brace ends the variable substitution.
5005test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5006
503d2be0 5007test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5008
ba4481b5
DL
5009test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5010
c0d27fcc
MR
5011if test "x$RANLIB" = x; then
5012 if test -n "$ac_tool_prefix"; then
5013 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5014set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5015{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5017if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5018 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5019else
5020 if test -n "$RANLIB"; then
5021 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5022else
c0d27fcc
MR
5023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
5028 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5030 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5031 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5032 break 2
5033 fi
5034done
503d2be0 5035done
ca81d7a0 5036IFS=$as_save_IFS
503d2be0 5037
7397acc4
DL
5038fi
5039fi
503d2be0 5040RANLIB=$ac_cv_prog_RANLIB
7397acc4 5041if test -n "$RANLIB"; then
ca81d7a0
JD
5042 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5043echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5044else
ca81d7a0
JD
5045 { echo "$as_me:$LINENO: result: no" >&5
5046echo "${ECHO_T}no" >&6; }
503d2be0
AS
5047fi
5048
ca81d7a0 5049
503d2be0
AS
5050fi
5051if test -z "$ac_cv_prog_RANLIB"; then
5052 ac_ct_RANLIB=$RANLIB
5053 # Extract the first word of "ranlib", so it can be a program name with args.
5054set dummy ranlib; ac_word=$2
ca81d7a0
JD
5055{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5056echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5057if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5058 echo $ECHO_N "(cached) $ECHO_C" >&6
5059else
5060 if test -n "$ac_ct_RANLIB"; then
5061 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5062else
c0d27fcc
MR
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
5068 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5070 ac_cv_prog_ac_ct_RANLIB="ranlib"
5071 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5072 break 2
5073 fi
5074done
503d2be0 5075done
ca81d7a0 5076IFS=$as_save_IFS
503d2be0 5077
503d2be0
AS
5078fi
5079fi
5080ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5081if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5082 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5083echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5084else
ca81d7a0
JD
5085 { echo "$as_me:$LINENO: result: no" >&5
5086echo "${ECHO_T}no" >&6; }
503d2be0
AS
5087fi
5088
ca81d7a0
JD
5089 if test "x$ac_ct_RANLIB" = x; then
5090 RANLIB=":"
5091 else
5092 case $cross_compiling:$ac_tool_warned in
5093yes:)
5094{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5095whose name does not start with the host triplet. If you think this
5096configuration is useful to you, please write to autoconf@gnu.org." >&5
5097echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5098whose name does not start with the host triplet. If you think this
5099configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5100ac_tool_warned=yes ;;
5101esac
5102 RANLIB=$ac_ct_RANLIB
5103 fi
7397acc4 5104else
503d2be0 5105 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5106fi
5107
5108fi
9e71690e
DK
5109# Extract the first word of "install-info", so it can be a program name with args.
5110set dummy install-info; ac_word=$2
ca81d7a0
JD
5111{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5112echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5113if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5114 echo $ECHO_N "(cached) $ECHO_C" >&6
5115else
5116 case $INSTALL_INFO in
5117 [\\/]* | ?:[\\/]*)
5118 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5119 ;;
5120 *)
5121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5122for as_dir in $PATH
5123do
5124 IFS=$as_save_IFS
5125 test -z "$as_dir" && as_dir=.
5126 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5127 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5128 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5129 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5130 break 2
5131 fi
5132done
5133done
ca81d7a0 5134IFS=$as_save_IFS
9e71690e
DK
5135
5136 ;;
5137esac
5138fi
5139INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5140if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5141 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5142echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5143else
ca81d7a0
JD
5144 { echo "$as_me:$LINENO: result: no" >&5
5145echo "${ECHO_T}no" >&6; }
9e71690e
DK
5146fi
5147
ca81d7a0 5148
9e71690e
DK
5149# Extract the first word of "install-info", so it can be a program name with args.
5150set dummy install-info; ac_word=$2
ca81d7a0
JD
5151{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5152echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5153if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5154 echo $ECHO_N "(cached) $ECHO_C" >&6
5155else
5156 case $INSTALL_INFO in
5157 [\\/]* | ?:[\\/]*)
5158 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5159 ;;
5160 *)
5161 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162for as_dir in /usr/sbin
5163do
5164 IFS=$as_save_IFS
5165 test -z "$as_dir" && as_dir=.
5166 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5167 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5168 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5169 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5170 break 2
5171 fi
5172done
5173done
ca81d7a0 5174IFS=$as_save_IFS
9e71690e
DK
5175
5176 ;;
5177esac
5178fi
5179INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5180if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5181 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5182echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5183else
ca81d7a0
JD
5184 { echo "$as_me:$LINENO: result: no" >&5
5185echo "${ECHO_T}no" >&6; }
9e71690e
DK
5186fi
5187
ca81d7a0 5188
9e71690e
DK
5189# Extract the first word of "install-info", so it can be a program name with args.
5190set dummy install-info; ac_word=$2
ca81d7a0
JD
5191{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5192echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5193if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5194 echo $ECHO_N "(cached) $ECHO_C" >&6
5195else
5196 case $INSTALL_INFO in
5197 [\\/]* | ?:[\\/]*)
5198 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5199 ;;
5200 *)
5201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5202for as_dir in /sbin
5203do
5204 IFS=$as_save_IFS
5205 test -z "$as_dir" && as_dir=.
5206 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5207 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5208 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5209 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5210 break 2
5211 fi
5212done
5213done
ca81d7a0 5214IFS=$as_save_IFS
9e71690e
DK
5215
5216 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5217 ;;
5218esac
5219fi
5220INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5221if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5222 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5223echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5224else
ca81d7a0
JD
5225 { echo "$as_me:$LINENO: result: no" >&5
5226echo "${ECHO_T}no" >&6; }
9e71690e
DK
5227fi
5228
ca81d7a0 5229
8ae52ca6
RF
5230# Extract the first word of "gzip", so it can be a program name with args.
5231set dummy gzip; ac_word=$2
ca81d7a0
JD
5232{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5234if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5235 echo $ECHO_N "(cached) $ECHO_C" >&6
5236else
46e35e9f 5237 case $GZIP_PROG in
8ae52ca6 5238 [\\/]* | ?:[\\/]*)
46e35e9f 5239 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5240 ;;
5241 *)
5242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5243for as_dir in $PATH
5244do
5245 IFS=$as_save_IFS
5246 test -z "$as_dir" && as_dir=.
5247 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5248 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5249 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5250 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5251 break 2
5252 fi
5253done
5254done
ca81d7a0 5255IFS=$as_save_IFS
8ae52ca6
RF
5256
5257 ;;
5258esac
5259fi
46e35e9f 5260GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5261if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5262 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5263echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5264else
ca81d7a0
JD
5265 { echo "$as_me:$LINENO: result: no" >&5
5266echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5267fi
5268
ba4481b5 5269
c0d27fcc 5270
ca81d7a0 5271
1bb9a689
MB
5272## Need makeinfo >= 4.6 (?) to build the manuals.
5273# Extract the first word of "makeinfo", so it can be a program name with args.
5274set dummy makeinfo; ac_word=$2
5275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5277if test "${ac_cv_path_MAKEINFO+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5279else
5280 case $MAKEINFO in
5281 [\\/]* | ?:[\\/]*)
5282 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5283 ;;
5284 *)
5285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5286for as_dir in $PATH
5287do
5288 IFS=$as_save_IFS
5289 test -z "$as_dir" && as_dir=.
5290 for ac_exec_ext in '' $ac_executable_extensions; do
5291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5292 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5293 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5294 break 2
5295 fi
5296done
5297done
5298IFS=$as_save_IFS
5299
5300 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5301 ;;
5302esac
5303fi
5304MAKEINFO=$ac_cv_path_MAKEINFO
5305if test -n "$MAKEINFO"; then
5306 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5307echo "${ECHO_T}$MAKEINFO" >&6; }
5308else
5309 { echo "$as_me:$LINENO: result: no" >&5
5310echo "${ECHO_T}no" >&6; }
5311fi
5312
5313
5314if test "$MAKEINFO" != "no" && \
d4840f44 5315 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
5316 MAKEINFO=no
5317fi
5318
e1b89931
GM
5319## Makeinfo is unusual. For a released Emacs, the manuals are
5320## pre-built, and not deleted by the normal clean rules. makeinfo is
5321## therefore in the category of "special tools" not normally required, which
5322## configure does not have to check for (eg autoconf itself).
5323## In a CVS checkout on the other hand, the manuals are not included.
5324## So makeinfo is a requirement to build from CVS, and configure
5325## should test for it as it does for any other build requirement.
5326## We use the presence of $srcdir/info/emacs to distinguish a release,
5327## with pre-built manuals, from a CVS checkout.
5328if test "$MAKEINFO" = "no"; then
5329 if test "x${with_makeinfo}" = "xno"; then
5330 MAKEINFO=off
5331 elif ! test -e $srcdir/info/emacs; then
5332 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5333source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5334Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5335with the \`--without-makeinfo' option to build without the manuals. " >&5
5336echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5337source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5338Either install a suitable version of makeinfo, or re-run configure
e1b89931 5339with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5340 { (exit 1); exit 1; }; }
e1b89931 5341 fi
921fbdf0 5342fi
1bb9a689
MB
5343
5344
8e967cf7
MR
5345if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5346then
5347 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5348fi
5349
5350if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5351then
5352 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5353fi
5354
c0d27fcc 5355
fe239f0f 5356late_LDFLAGS=$LDFLAGS
4af002d6 5357if test "$GCC" = yes; then
fe239f0f
AS
5358 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5359else
5360 LDFLAGS="$LDFLAGS -znocombreloc"
5361fi
5362
ca81d7a0
JD
5363{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5364echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5365cat >conftest.$ac_ext <<_ACEOF
5366main(){return 0;}
5367_ACEOF
5368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5369if { (ac_try="$ac_link"
5370case "(($ac_try" in
5371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5372 *) ac_try_echo=$ac_try;;
5373esac
5374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5375 (eval "$ac_link") 2>conftest.er1
fe239f0f 5376 ac_status=$?
edfaf76d
LK
5377 grep -v '^ *+' conftest.er1 >conftest.err
5378 rm -f conftest.er1
5379 cat conftest.err >&5
fe239f0f 5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5381 (exit $ac_status); } && {
5382 test -z "$ac_c_werror_flag" ||
5383 test ! -s conftest.err
5384 } && test -s conftest$ac_exeext &&
5385 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5386 { echo "$as_me:$LINENO: result: yes" >&5
5387echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5388else
5389 echo "$as_me: failed program was:" >&5
5390sed 's/^/| /' conftest.$ac_ext >&5
5391
ca81d7a0
JD
5392 LDFLAGS=$late_LDFLAGS
5393 { echo "$as_me:$LINENO: result: no" >&5
5394echo "${ECHO_T}no" >&6; }
fe239f0f 5395fi
ca81d7a0 5396
f053c89f 5397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5398 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5399
3b33a005
DL
5400#### Extract some information from the operating system and machine files.
5401
c0d27fcc 5402{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5403 - which libraries the lib-src programs will want, and
503d2be0
AS
5404 - whether the GNU malloc routines are usable..." >&5
5405echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5406 - which libraries the lib-src programs will want, and
503d2be0 5407 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5408
5409### First figure out CFLAGS (which we use for running the compiler here)
5410### and REAL_CFLAGS (which we use for real compilation).
5411### The two are the same except on a few systems, where they are made
5412### different to work around various lossages. For example,
5413### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5414### as implying static linking.
5415
5416### If the CFLAGS env var is specified, we use that value
5417### instead of the default.
5418
5419### It's not important that this name contain the PID; you can't run
5420### two configures in the same directory and have anything work
5421### anyway.
5422tempcname="conftest.c"
5423
5424echo '
5425#include "'${srcdir}'/src/'${opsysfile}'"
5426#include "'${srcdir}'/src/'${machfile}'"
5427#ifndef LIBS_MACHINE
5428#define LIBS_MACHINE
5429#endif
5430#ifndef LIBS_SYSTEM
5431#define LIBS_SYSTEM
5432#endif
5433#ifndef C_SWITCH_SYSTEM
5434#define C_SWITCH_SYSTEM
5435#endif
5436#ifndef C_SWITCH_MACHINE
5437#define C_SWITCH_MACHINE
5438#endif
5439configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5440configure___ c_switch_system=C_SWITCH_SYSTEM
5441configure___ c_switch_machine=C_SWITCH_MACHINE
5442
5443#ifndef LIB_X11_LIB
5444#define LIB_X11_LIB -lX11
5445#endif
5446
3b33a005
DL
5447#ifndef LIBX11_SYSTEM
5448#define LIBX11_SYSTEM
5449#endif
9d2818d6 5450configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5451
5452#ifdef UNEXEC
5453configure___ unexec=UNEXEC
5454#else
5455configure___ unexec=unexec.o
5456#endif
5457
5458#ifdef SYSTEM_MALLOC
5459configure___ system_malloc=yes
5460#else
5461configure___ system_malloc=no
5462#endif
5463
ef9e4345
GM
5464#ifdef USE_MMAP_FOR_BUFFERS
5465configure___ use_mmap_for_buffers=yes
73b77ee5 5466#else
ef9e4345 5467configure___ use_mmap_for_buffers=no
73b77ee5
GM
5468#endif
5469
3b33a005
DL
5470#ifndef C_DEBUG_SWITCH
5471#define C_DEBUG_SWITCH -g
5472#endif
5473
5474#ifndef C_OPTIMIZE_SWITCH
5475#ifdef __GNUC__
5476#define C_OPTIMIZE_SWITCH -O2
5477#else
5478#define C_OPTIMIZE_SWITCH -O
5479#endif
5480#endif
5481
01abe918
CY
5482#ifndef C_WARNINGS_SWITCH
5483#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5484#endif
5485
3b33a005
DL
5486#ifndef LD_SWITCH_MACHINE
5487#define LD_SWITCH_MACHINE
5488#endif
5489
5490#ifndef LD_SWITCH_SYSTEM
5491#define LD_SWITCH_SYSTEM
5492#endif
5493
5494#ifndef LD_SWITCH_X_SITE_AUX
5495#define LD_SWITCH_X_SITE_AUX
503d2be0 5496#endif
3b33a005
DL
5497
5498configure___ ld_switch_system=LD_SWITCH_SYSTEM
5499configure___ ld_switch_machine=LD_SWITCH_MACHINE
5500
5501#ifdef THIS_IS_CONFIGURE
5502
5503/* Get the CFLAGS for tests in configure. */
5504#ifdef __GNUC__
5505configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5506#else
5507configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5508#endif
5509
5510#else /* not THIS_IS_CONFIGURE */
5511
5512/* Get the CFLAGS for real compilation. */
5513#ifdef __GNUC__
01abe918 5514configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5515#else
5516configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5517#endif
5518
5519#endif /* not THIS_IS_CONFIGURE */
5520' > ${tempcname}
5521
5522# The value of CPP is a quoted variable reference, so we need to do this
5523# to get its actual value...
5524CPP=`eval "echo $CPP"`
5525eval `${CPP} -Isrc ${tempcname} \
5526 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5527if test "x$SPECIFIED_CFLAGS" = x; then
5528 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5529 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5530else
5531 REAL_CFLAGS="$CFLAGS"
5532fi
5533rm ${tempcname}
5534
5535ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5536
5537### Make sure subsequent tests use flags consistent with the build flags.
5538
5539if test x"${OVERRIDE_CPPFLAGS}" != x; then
5540 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5541else
5542 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5543fi
5544
6bae0ccf
DL
5545
5546
ca81d7a0 5547# Check whether --enable-largefile was given.
f4988be7 5548if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5549 enableval=$enable_largefile;
5550fi
f4988be7 5551
503d2be0 5552if test "$enable_largefile" != no; then
f4988be7 5553
ca81d7a0
JD
5554 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5555echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5556if test "${ac_cv_sys_largefile_CC+set}" = set; then
5557 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5558else
f4988be7 5559 ac_cv_sys_largefile_CC=no
503d2be0
AS
5560 if test "$GCC" != yes; then
5561 ac_save_CC=$CC
5562 while :; do
ca81d7a0
JD
5563 # IRIX 6.2 and later do not support large files by default,
5564 # so use the C compiler's -n32 option if that helps.
edfaf76d 5565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5566/* confdefs.h. */
5567_ACEOF
5568cat confdefs.h >>conftest.$ac_ext
5569cat >>conftest.$ac_ext <<_ACEOF
5570/* end confdefs.h. */
f4988be7 5571#include <sys/types.h>
503d2be0
AS
5572 /* Check that off_t can represent 2**63 - 1 correctly.
5573 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5574 since some C++ compilers masquerading as C compilers
5575 incorrectly reject 9223372036854775807. */
5576#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5577 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5578 && LARGE_OFF_T % 2147483647 == 1)
5579 ? 1 : -1];
5580int
5581main ()
5582{
f4988be7 5583
503d2be0
AS
5584 ;
5585 return 0;
5586}
5587_ACEOF
ca81d7a0
JD
5588 rm -f conftest.$ac_objext
5589if { (ac_try="$ac_compile"
5590case "(($ac_try" in
5591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592 *) ac_try_echo=$ac_try;;
5593esac
5594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5595 (eval "$ac_compile") 2>conftest.er1
503d2be0 5596 ac_status=$?
edfaf76d
LK
5597 grep -v '^ *+' conftest.er1 >conftest.err
5598 rm -f conftest.er1
5599 cat conftest.err >&5
c0d27fcc 5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5601 (exit $ac_status); } && {
5602 test -z "$ac_c_werror_flag" ||
5603 test ! -s conftest.err
5604 } && test -s conftest.$ac_objext; then
503d2be0 5605 break
b192d653 5606else
503d2be0 5607 echo "$as_me: failed program was:" >&5
19650fd6
AS
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
ca81d7a0 5610
503d2be0 5611fi
ca81d7a0
JD
5612
5613rm -f core conftest.err conftest.$ac_objext
5614 CC="$CC -n32"
5615 rm -f conftest.$ac_objext
5616if { (ac_try="$ac_compile"
5617case "(($ac_try" in
5618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5619 *) ac_try_echo=$ac_try;;
5620esac
5621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5622 (eval "$ac_compile") 2>conftest.er1
503d2be0 5623 ac_status=$?
edfaf76d
LK
5624 grep -v '^ *+' conftest.er1 >conftest.err
5625 rm -f conftest.er1
5626 cat conftest.err >&5
c0d27fcc 5627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5628 (exit $ac_status); } && {
5629 test -z "$ac_c_werror_flag" ||
5630 test ! -s conftest.err
5631 } && test -s conftest.$ac_objext; then
503d2be0
AS
5632 ac_cv_sys_largefile_CC=' -n32'; break
5633else
5634 echo "$as_me: failed program was:" >&5
19650fd6
AS
5635sed 's/^/| /' conftest.$ac_ext >&5
5636
ca81d7a0 5637
503d2be0 5638fi
ca81d7a0
JD
5639
5640rm -f core conftest.err conftest.$ac_objext
edfaf76d 5641 break
503d2be0
AS
5642 done
5643 CC=$ac_save_CC
5644 rm -f conftest.$ac_ext
5645 fi
b192d653 5646fi
ca81d7a0
JD
5647{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5648echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5649 if test "$ac_cv_sys_largefile_CC" != no; then
5650 CC=$CC$ac_cv_sys_largefile_CC
5651 fi
b192d653 5652
ca81d7a0
JD
5653 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5654echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5655if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5656 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5657else
503d2be0 5658 while :; do
503d2be0 5659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5660/* confdefs.h. */
5661_ACEOF
5662cat confdefs.h >>conftest.$ac_ext
5663cat >>conftest.$ac_ext <<_ACEOF
5664/* end confdefs.h. */
f4988be7 5665#include <sys/types.h>
503d2be0
AS
5666 /* Check that off_t can represent 2**63 - 1 correctly.
5667 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5668 since some C++ compilers masquerading as C compilers
5669 incorrectly reject 9223372036854775807. */
5670#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5671 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5672 && LARGE_OFF_T % 2147483647 == 1)
5673 ? 1 : -1];
5674int
5675main ()
5676{
f4988be7 5677
503d2be0
AS
5678 ;
5679 return 0;
5680}
5681_ACEOF
5682rm -f conftest.$ac_objext
ca81d7a0
JD
5683if { (ac_try="$ac_compile"
5684case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
5688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5689 (eval "$ac_compile") 2>conftest.er1
503d2be0 5690 ac_status=$?
edfaf76d
LK
5691 grep -v '^ *+' conftest.er1 >conftest.err
5692 rm -f conftest.er1
5693 cat conftest.err >&5
c0d27fcc 5694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5695 (exit $ac_status); } && {
5696 test -z "$ac_c_werror_flag" ||
5697 test ! -s conftest.err
5698 } && test -s conftest.$ac_objext; then
5699 ac_cv_sys_file_offset_bits=no; break
f4988be7 5700else
503d2be0 5701 echo "$as_me: failed program was:" >&5
19650fd6
AS
5702sed 's/^/| /' conftest.$ac_ext >&5
5703
ca81d7a0 5704
503d2be0 5705fi
ca81d7a0
JD
5706
5707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
f4988be7
GM
5714#define _FILE_OFFSET_BITS 64
5715#include <sys/types.h>
503d2be0
AS
5716 /* Check that off_t can represent 2**63 - 1 correctly.
5717 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5718 since some C++ compilers masquerading as C compilers
5719 incorrectly reject 9223372036854775807. */
5720#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5721 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5722 && LARGE_OFF_T % 2147483647 == 1)
5723 ? 1 : -1];
5724int
5725main ()
5726{
5727
5728 ;
5729 return 0;
5730}
5731_ACEOF
5732rm -f conftest.$ac_objext
ca81d7a0
JD
5733if { (ac_try="$ac_compile"
5734case "(($ac_try" in
5735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5736 *) ac_try_echo=$ac_try;;
5737esac
5738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5739 (eval "$ac_compile") 2>conftest.er1
503d2be0 5740 ac_status=$?
edfaf76d
LK
5741 grep -v '^ *+' conftest.er1 >conftest.err
5742 rm -f conftest.er1
5743 cat conftest.err >&5
c0d27fcc 5744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5745 (exit $ac_status); } && {
5746 test -z "$ac_c_werror_flag" ||
5747 test ! -s conftest.err
5748 } && test -s conftest.$ac_objext; then
503d2be0
AS
5749 ac_cv_sys_file_offset_bits=64; break
5750else
5751 echo "$as_me: failed program was:" >&5
19650fd6
AS
5752sed 's/^/| /' conftest.$ac_ext >&5
5753
ca81d7a0 5754
503d2be0 5755fi
ca81d7a0
JD
5756
5757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5758 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5759 break
5760done
ba4481b5 5761fi
ca81d7a0
JD
5762{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5763echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5764case $ac_cv_sys_file_offset_bits in #(
5765 no | unknown) ;;
5766 *)
c0d27fcc 5767cat >>confdefs.h <<_ACEOF
f4988be7 5768#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5769_ACEOF
f053c89f
CY
5770;;
5771esac
503d2be0 5772rm -f conftest*
f053c89f
CY
5773 if test $ac_cv_sys_file_offset_bits = unknown; then
5774 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5775echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5776if test "${ac_cv_sys_large_files+set}" = set; then
5777 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5778else
503d2be0 5779 while :; do
503d2be0 5780 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5781/* confdefs.h. */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h. */
503d2be0
AS
5786#include <sys/types.h>
5787 /* Check that off_t can represent 2**63 - 1 correctly.
5788 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5789 since some C++ compilers masquerading as C compilers
5790 incorrectly reject 9223372036854775807. */
5791#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5792 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5793 && LARGE_OFF_T % 2147483647 == 1)
5794 ? 1 : -1];
5795int
5796main ()
5797{
ba4481b5 5798
503d2be0
AS
5799 ;
5800 return 0;
5801}
5802_ACEOF
5803rm -f conftest.$ac_objext
ca81d7a0
JD
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
5820 ac_cv_sys_large_files=no; break
ba4481b5 5821else
503d2be0 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 conftest.$ac_ext
503d2be0 5829 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5830/* confdefs.h. */
5831_ACEOF
5832cat confdefs.h >>conftest.$ac_ext
5833cat >>conftest.$ac_ext <<_ACEOF
5834/* end confdefs.h. */
f4988be7 5835#define _LARGE_FILES 1
503d2be0
AS
5836#include <sys/types.h>
5837 /* Check that off_t can represent 2**63 - 1 correctly.
5838 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5839 since some C++ compilers masquerading as C compilers
5840 incorrectly reject 9223372036854775807. */
5841#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5842 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5843 && LARGE_OFF_T % 2147483647 == 1)
5844 ? 1 : -1];
5845int
5846main ()
5847{
f4988be7 5848
503d2be0
AS
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
ca81d7a0
JD
5854if { (ac_try="$ac_compile"
5855case "(($ac_try" in
5856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5857 *) ac_try_echo=$ac_try;;
5858esac
5859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5860 (eval "$ac_compile") 2>conftest.er1
503d2be0 5861 ac_status=$?
edfaf76d
LK
5862 grep -v '^ *+' conftest.er1 >conftest.err
5863 rm -f conftest.er1
5864 cat conftest.err >&5
c0d27fcc 5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5866 (exit $ac_status); } && {
5867 test -z "$ac_c_werror_flag" ||
5868 test ! -s conftest.err
5869 } && test -s conftest.$ac_objext; then
503d2be0
AS
5870 ac_cv_sys_large_files=1; break
5871else
5872 echo "$as_me: failed program was:" >&5
19650fd6
AS
5873sed 's/^/| /' conftest.$ac_ext >&5
5874
ca81d7a0 5875
503d2be0 5876fi
ca81d7a0
JD
5877
5878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5879 ac_cv_sys_large_files=unknown
503d2be0
AS
5880 break
5881done
ba4481b5 5882fi
ca81d7a0
JD
5883{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5884echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5885case $ac_cv_sys_large_files in #(
5886 no | unknown) ;;
5887 *)
c0d27fcc 5888cat >>confdefs.h <<_ACEOF
f4988be7 5889#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5890_ACEOF
f053c89f
CY
5891;;
5892esac
503d2be0 5893rm -f conftest*
f053c89f 5894 fi
503d2be0 5895fi
ba4481b5 5896
c0d27fcc 5897
439f58ee 5898
55e6d9b2 5899### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5900### be located in either /usr/lib64 or /usr/lib.
5901case "${canonical}" in
55e6d9b2 5902 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5903 if test -d /usr/lib64; then
5904
5905cat >>confdefs.h <<\_ACEOF
55e6d9b2 5906#define HAVE_LIB64_DIR 1
bc5d9888
CY
5907_ACEOF
5908
5909fi
5910esac
5911
439f58ee
JD
5912
5913
5914
2c9dccc9
PJ
5915if test "${with_sound}" != "no"; then
5916 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5917
5918
5919
5920for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5921do
5922as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5923if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5924 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5925echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5926if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5927 echo $ECHO_N "(cached) $ECHO_C" >&6
5928fi
ca81d7a0
JD
5929ac_res=`eval echo '${'$as_ac_Header'}'`
5930 { echo "$as_me:$LINENO: result: $ac_res" >&5
5931echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5932else
5933 # Is the header compilable?
ca81d7a0
JD
5934{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5935echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5936cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5937/* confdefs.h. */
5938_ACEOF
5939cat confdefs.h >>conftest.$ac_ext
5940cat >>conftest.$ac_ext <<_ACEOF
5941/* end confdefs.h. */
c0d27fcc 5942$ac_includes_default
98418dba 5943#include <$ac_header>
503d2be0 5944_ACEOF
c0d27fcc 5945rm -f conftest.$ac_objext
ca81d7a0
JD
5946if { (ac_try="$ac_compile"
5947case "(($ac_try" in
5948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5949 *) ac_try_echo=$ac_try;;
5950esac
5951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5952 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5953 ac_status=$?
edfaf76d
LK
5954 grep -v '^ *+' conftest.er1 >conftest.err
5955 rm -f conftest.er1
5956 cat conftest.err >&5
c0d27fcc 5957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5958 (exit $ac_status); } && {
5959 test -z "$ac_c_werror_flag" ||
5960 test ! -s conftest.err
5961 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5962 ac_header_compiler=yes
5963else
5964 echo "$as_me: failed program was:" >&5
19650fd6
AS
5965sed 's/^/| /' conftest.$ac_ext >&5
5966
ca81d7a0 5967 ac_header_compiler=no
c0d27fcc 5968fi
ca81d7a0
JD
5969
5970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5971{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5972echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5973
5974# Is the header present?
ca81d7a0
JD
5975{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5976echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5978/* confdefs.h. */
5979_ACEOF
5980cat confdefs.h >>conftest.$ac_ext
5981cat >>conftest.$ac_ext <<_ACEOF
5982/* end confdefs.h. */
c0d27fcc
MR
5983#include <$ac_header>
5984_ACEOF
ca81d7a0
JD
5985if { (ac_try="$ac_cpp conftest.$ac_ext"
5986case "(($ac_try" in
5987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5988 *) ac_try_echo=$ac_try;;
5989esac
5990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5991 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5992 ac_status=$?
6bae0ccf 5993 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5994 rm -f conftest.er1
5995 cat conftest.err >&5
c0d27fcc 5996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5997 (exit $ac_status); } >/dev/null && {
5998 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5999 test ! -s conftest.err
6000 }; then
c0d27fcc 6001 ac_header_preproc=yes
f4988be7 6002else
503d2be0 6003 echo "$as_me: failed program was:" >&5
19650fd6
AS
6004sed 's/^/| /' conftest.$ac_ext >&5
6005
c0d27fcc 6006 ac_header_preproc=no
f4988be7 6007fi
ca81d7a0 6008
98418dba 6009rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6010{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6011echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6012
6013# So? What about this header?
edfaf76d
LK
6014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6015 yes:no: )
c0d27fcc
MR
6016 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6017echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6018 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6019echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6020 ac_header_preproc=yes
19650fd6 6021 ;;
edfaf76d 6022 no:yes:* )
c0d27fcc
MR
6023 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6024echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6025 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6026echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6027 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6028echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6029 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6030echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6031 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6032echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6033 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6034echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6035
19650fd6 6036 ;;
c0d27fcc 6037esac
ca81d7a0
JD
6038{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6040if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6041 echo $ECHO_N "(cached) $ECHO_C" >&6
6042else
edfaf76d 6043 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6044fi
ca81d7a0
JD
6045ac_res=`eval echo '${'$as_ac_Header'}'`
6046 { echo "$as_me:$LINENO: result: $ac_res" >&5
6047echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6048
6049fi
98418dba 6050if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6051 cat >>confdefs.h <<_ACEOF
98418dba 6052#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6053_ACEOF
f4988be7
GM
6054
6055fi
c0d27fcc 6056
98418dba
CW
6057done
6058
6059 # Emulation library used on NetBSD.
ca81d7a0
JD
6060 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6061echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6062if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6063 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6064else
98418dba
CW
6065 ac_check_lib_save_LIBS=$LIBS
6066LIBS="-lossaudio $LIBS"
6067cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6068/* confdefs.h. */
6069_ACEOF
6070cat confdefs.h >>conftest.$ac_ext
6071cat >>conftest.$ac_ext <<_ACEOF
6072/* end confdefs.h. */
98418dba 6073
ca81d7a0
JD
6074/* Override any GCC internal prototype to avoid an error.
6075 Use char because int might match the return type of a GCC
6076 builtin and then its argument prototype would still apply. */
98418dba
CW
6077#ifdef __cplusplus
6078extern "C"
f4988be7 6079#endif
98418dba 6080char _oss_ioctl ();
503d2be0
AS
6081int
6082main ()
6083{
ca81d7a0 6084return _oss_ioctl ();
503d2be0
AS
6085 ;
6086 return 0;
6087}
6088_ACEOF
98418dba 6089rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6090if { (ac_try="$ac_link"
6091case "(($ac_try" in
6092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6093 *) ac_try_echo=$ac_try;;
6094esac
6095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6096 (eval "$ac_link") 2>conftest.er1
503d2be0 6097 ac_status=$?
edfaf76d
LK
6098 grep -v '^ *+' conftest.er1 >conftest.err
6099 rm -f conftest.er1
6100 cat conftest.err >&5
c0d27fcc 6101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6102 (exit $ac_status); } && {
6103 test -z "$ac_c_werror_flag" ||
6104 test ! -s conftest.err
6105 } && test -s conftest$ac_exeext &&
6106 $as_test_x conftest$ac_exeext; then
98418dba 6107 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6108else
503d2be0 6109 echo "$as_me: failed program was:" >&5
19650fd6
AS
6110sed 's/^/| /' conftest.$ac_ext >&5
6111
ca81d7a0 6112 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6113fi
ca81d7a0 6114
f053c89f 6115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6116 conftest$ac_exeext conftest.$ac_ext
98418dba 6117LIBS=$ac_check_lib_save_LIBS
f4988be7 6118fi
ca81d7a0
JD
6119{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6120echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6121if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6122 LIBSOUND=-lossaudio
6123else
6124 LIBSOUND=
6125fi
6126
c0d27fcc 6127
439f58ee
JD
6128
6129 ALSA_REQUIRED=1.0.0
6130 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6131
6132 succeeded=no
6133
00b9c927 6134 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6135set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6136{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6137echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6138if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6139 echo $ECHO_N "(cached) $ECHO_C" >&6
6140else
6141 case $PKG_CONFIG in
6142 [\\/]* | ?:[\\/]*)
6143 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6144 ;;
6145 *)
6146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149 IFS=$as_save_IFS
6150 test -z "$as_dir" && as_dir=.
6151 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6152 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6153 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6154 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6155 break 2
6156 fi
6157done
6158done
ca81d7a0 6159IFS=$as_save_IFS
439f58ee
JD
6160
6161 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6162 ;;
6163esac
6164fi
6165PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6166if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6167 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6168echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6169else
ca81d7a0
JD
6170 { echo "$as_me:$LINENO: result: no" >&5
6171echo "${ECHO_T}no" >&6; }
439f58ee
JD
6172fi
6173
ca81d7a0 6174
439f58ee
JD
6175
6176 if test "$PKG_CONFIG" = "no" ; then
6177 HAVE_ALSA=no
6178 else
6179 PKG_CONFIG_MIN_VERSION=0.9.0
6180 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6181 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6182echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6183
67db6aa2 6184 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6185 { echo "$as_me:$LINENO: result: yes" >&5
6186echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6187 succeeded=yes
6188
ca81d7a0
JD
6189 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6190echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6191 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6192 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6193echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6194
ca81d7a0
JD
6195 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6196echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6197 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6198 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6199echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6200 else
ca81d7a0
JD
6201 { echo "$as_me:$LINENO: result: no" >&5
6202echo "${ECHO_T}no" >&6; }
439f58ee
JD
6203 ALSA_CFLAGS=""
6204 ALSA_LIBS=""
6205 ## If we have a custom action on failure, don't print errors, but
6206 ## do set a variable so people can do so.
6207 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6208
6209 fi
6210
6211
6212
6213 else
6214 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6215 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6216 fi
6217 fi
6218
6219 if test $succeeded = yes; then
6220 HAVE_ALSA=yes
6221 else
6222 HAVE_ALSA=no
6223 fi
6224
6225 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6226 SAVE_CFLAGS="$CFLAGS"
6227 SAVE_LDFLAGS="$LDFLAGS"
6228 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6229 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6230 cat >conftest.$ac_ext <<_ACEOF
6231/* confdefs.h. */
6232_ACEOF
6233cat confdefs.h >>conftest.$ac_ext
6234cat >>conftest.$ac_ext <<_ACEOF
6235/* end confdefs.h. */
6236#include <asoundlib.h>
6237int
6238main ()
6239{
6240snd_lib_error_set_handler (0);
6241 ;
6242 return 0;
6243}
6244_ACEOF
6245rm -f conftest.$ac_objext
6246if { (ac_try="$ac_compile"
6247case "(($ac_try" in
6248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6249 *) ac_try_echo=$ac_try;;
6250esac
6251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6252 (eval "$ac_compile") 2>conftest.er1
6253 ac_status=$?
6254 grep -v '^ *+' conftest.er1 >conftest.err
6255 rm -f conftest.er1
6256 cat conftest.err >&5
6257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6258 (exit $ac_status); } && {
6259 test -z "$ac_c_werror_flag" ||
6260 test ! -s conftest.err
6261 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6262 emacs_alsa_normal=yes
6263else
6264 echo "$as_me: failed program was:" >&5
6265sed 's/^/| /' conftest.$ac_ext >&5
6266
6267 emacs_alsa_normal=no
6268fi
6269
6270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6271 if test "$emacs_alsa_normal" != yes; then
6272 cat >conftest.$ac_ext <<_ACEOF
6273/* confdefs.h. */
6274_ACEOF
6275cat confdefs.h >>conftest.$ac_ext
6276cat >>conftest.$ac_ext <<_ACEOF
6277/* end confdefs.h. */
6278#include <alsa/asoundlib.h>
6279int
6280main ()
6281{
6282snd_lib_error_set_handler (0);
6283 ;
6284 return 0;
6285}
6286_ACEOF
6287rm -f conftest.$ac_objext
6288if { (ac_try="$ac_compile"
6289case "(($ac_try" in
6290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6291 *) ac_try_echo=$ac_try;;
6292esac
6293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6294 (eval "$ac_compile") 2>conftest.er1
6295 ac_status=$?
6296 grep -v '^ *+' conftest.er1 >conftest.err
6297 rm -f conftest.er1
6298 cat conftest.err >&5
6299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6300 (exit $ac_status); } && {
6301 test -z "$ac_c_werror_flag" ||
6302 test ! -s conftest.err
6303 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6304 emacs_alsa_subdir=yes
6305else
6306 echo "$as_me: failed program was:" >&5
6307sed 's/^/| /' conftest.$ac_ext >&5
6308
6309 emacs_alsa_subdir=no
6310fi
6311
6312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6313 if test "$emacs_alsa_subdir" != yes; then
6314 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6315echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6316 { (exit 1); exit 1; }; }
6317 fi
6318 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6319 fi
6320
6321 CFLAGS="$SAVE_CFLAGS"
6322 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6323 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6324 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6325
6326cat >>confdefs.h <<\_ACEOF
6327#define HAVE_ALSA 1
6328_ACEOF
6329
6330 fi
6331
f4988be7 6332fi
c0d27fcc
MR
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
22044edf
DL
6351
6352
973a76b1 6353
cffcede7 6354
551ffc27 6355
226e2359 6356
c0d27fcc 6357
f4988be7 6358
98418dba
CW
6359for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6360 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6361 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6362 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6363 sys/utsname.h pwd.h
98418dba
CW
6364do
6365as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6366if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6367 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6368echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6369if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6370 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6371fi
ca81d7a0
JD
6372ac_res=`eval echo '${'$as_ac_Header'}'`
6373 { echo "$as_me:$LINENO: result: $ac_res" >&5
6374echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6375else
c0d27fcc 6376 # Is the header compilable?
ca81d7a0
JD
6377{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6378echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6379cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6380/* confdefs.h. */
6381_ACEOF
6382cat confdefs.h >>conftest.$ac_ext
6383cat >>conftest.$ac_ext <<_ACEOF
6384/* end confdefs.h. */
c0d27fcc
MR
6385$ac_includes_default
6386#include <$ac_header>
6387_ACEOF
6388rm -f conftest.$ac_objext
ca81d7a0
JD
6389if { (ac_try="$ac_compile"
6390case "(($ac_try" in
6391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6392 *) ac_try_echo=$ac_try;;
6393esac
6394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6395 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6396 ac_status=$?
edfaf76d
LK
6397 grep -v '^ *+' conftest.er1 >conftest.err
6398 rm -f conftest.er1
6399 cat conftest.err >&5
c0d27fcc 6400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6401 (exit $ac_status); } && {
6402 test -z "$ac_c_werror_flag" ||
6403 test ! -s conftest.err
6404 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6405 ac_header_compiler=yes
6406else
6407 echo "$as_me: failed program was:" >&5
19650fd6
AS
6408sed 's/^/| /' conftest.$ac_ext >&5
6409
ca81d7a0 6410 ac_header_compiler=no
c0d27fcc 6411fi
ca81d7a0
JD
6412
6413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6414{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6415echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6416
6417# Is the header present?
ca81d7a0
JD
6418{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6419echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6420cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6421/* confdefs.h. */
6422_ACEOF
6423cat confdefs.h >>conftest.$ac_ext
6424cat >>conftest.$ac_ext <<_ACEOF
6425/* end confdefs.h. */
98418dba 6426#include <$ac_header>
503d2be0 6427_ACEOF
ca81d7a0
JD
6428if { (ac_try="$ac_cpp conftest.$ac_ext"
6429case "(($ac_try" in
6430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6431 *) ac_try_echo=$ac_try;;
6432esac
6433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6434 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6435 ac_status=$?
6bae0ccf 6436 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6437 rm -f conftest.er1
6438 cat conftest.err >&5
c0d27fcc 6439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6440 (exit $ac_status); } >/dev/null && {
6441 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6442 test ! -s conftest.err
6443 }; then
c0d27fcc 6444 ac_header_preproc=yes
34ec9ebe 6445else
503d2be0 6446 echo "$as_me: failed program was:" >&5
19650fd6
AS
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
c0d27fcc 6449 ac_header_preproc=no
34ec9ebe 6450fi
ca81d7a0 6451
98418dba 6452rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6453{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6454echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6455
6456# So? What about this header?
edfaf76d
LK
6457case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6458 yes:no: )
c0d27fcc
MR
6459 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6460echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6461 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6462echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6463 ac_header_preproc=yes
19650fd6 6464 ;;
edfaf76d 6465 no:yes:* )
c0d27fcc
MR
6466 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6467echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6468 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6469echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6470 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6471echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6472 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6473echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6474 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6475echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6476 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6477echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6478
19650fd6 6479 ;;
c0d27fcc 6480esac
ca81d7a0
JD
6481{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6482echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6483if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6484 echo $ECHO_N "(cached) $ECHO_C" >&6
6485else
edfaf76d 6486 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6487fi
ca81d7a0
JD
6488ac_res=`eval echo '${'$as_ac_Header'}'`
6489 { echo "$as_me:$LINENO: result: $ac_res" >&5
6490echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6491
6492fi
98418dba 6493if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6494 cat >>confdefs.h <<_ACEOF
98418dba 6495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6496_ACEOF
34ec9ebe 6497
98418dba 6498fi
c0d27fcc 6499
98418dba
CW
6500done
6501
22044edf 6502
ca81d7a0
JD
6503{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6504echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6505cat >conftest.$ac_ext <<_ACEOF
6506/* confdefs.h. */
6507_ACEOF
6508cat confdefs.h >>conftest.$ac_ext
6509cat >>conftest.$ac_ext <<_ACEOF
6510/* end confdefs.h. */
6511#include <sys/personality.h>
6512int
6513main ()
6514{
6515personality (PER_LINUX32)
6516 ;
6517 return 0;
6518}
6519_ACEOF
6520rm -f conftest.$ac_objext
ca81d7a0
JD
6521if { (ac_try="$ac_compile"
6522case "(($ac_try" in
6523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6524 *) ac_try_echo=$ac_try;;
6525esac
6526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6527 (eval "$ac_compile") 2>conftest.er1
f17e308a 6528 ac_status=$?
edfaf76d
LK
6529 grep -v '^ *+' conftest.er1 >conftest.err
6530 rm -f conftest.er1
6531 cat conftest.err >&5
f17e308a 6532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6533 (exit $ac_status); } && {
6534 test -z "$ac_c_werror_flag" ||
6535 test ! -s conftest.err
6536 } && test -s conftest.$ac_objext; then
f17e308a
JD
6537 emacs_cv_personality_linux32=yes
6538else
6539 echo "$as_me: failed program was:" >&5
6540sed 's/^/| /' conftest.$ac_ext >&5
6541
ca81d7a0 6542 emacs_cv_personality_linux32=no
f17e308a 6543fi
ca81d7a0
JD
6544
6545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6546{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6547echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6548
6549if test $emacs_cv_personality_linux32 = yes; then
6550
6551cat >>confdefs.h <<\_ACEOF
6552#define HAVE_PERSONALITY_LINUX32 1
6553_ACEOF
6554
6555fi
6556
6557
22044edf
DL
6558for ac_header in term.h
6559do
6560as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6561{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6562echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6563if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6564 echo $ECHO_N "(cached) $ECHO_C" >&6
6565else
6566 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6567/* confdefs.h. */
6568_ACEOF
6569cat confdefs.h >>conftest.$ac_ext
6570cat >>conftest.$ac_ext <<_ACEOF
6571/* end confdefs.h. */
22044edf
DL
6572#include <$ac_header>
6573_ACEOF
ca81d7a0
JD
6574if { (ac_try="$ac_cpp conftest.$ac_ext"
6575case "(($ac_try" in
6576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6577 *) ac_try_echo=$ac_try;;
6578esac
6579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6580 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6581 ac_status=$?
6582 grep -v '^ *+' conftest.er1 >conftest.err
6583 rm -f conftest.er1
6584 cat conftest.err >&5
6585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6586 (exit $ac_status); } >/dev/null && {
6587 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6588 test ! -s conftest.err
6589 }; then
22044edf
DL
6590 eval "$as_ac_Header=yes"
6591else
6592 echo "$as_me: failed program was:" >&5
19650fd6
AS
6593sed 's/^/| /' conftest.$ac_ext >&5
6594
22044edf
DL
6595 eval "$as_ac_Header=no"
6596fi
ca81d7a0 6597
22044edf
DL
6598rm -f conftest.err conftest.$ac_ext
6599fi
ca81d7a0
JD
6600ac_res=`eval echo '${'$as_ac_Header'}'`
6601 { echo "$as_me:$LINENO: result: $ac_res" >&5
6602echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6603if test `eval echo '${'$as_ac_Header'}'` = yes; then
6604 cat >>confdefs.h <<_ACEOF
6605#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6606_ACEOF
6607
6608fi
6609
6610done
6611
ca81d7a0
JD
6612{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6613echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6614if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6615 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6616else
503d2be0 6617 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6618/* confdefs.h. */
6619_ACEOF
6620cat confdefs.h >>conftest.$ac_ext
6621cat >>conftest.$ac_ext <<_ACEOF
6622/* end confdefs.h. */
98418dba
CW
6623#include <stdlib.h>
6624#include <stdarg.h>
6625#include <string.h>
6626#include <float.h>
6627
19650fd6
AS
6628int
6629main ()
6630{
6631
6632 ;
6633 return 0;
6634}
98418dba 6635_ACEOF
19650fd6 6636rm -f conftest.$ac_objext
ca81d7a0
JD
6637if { (ac_try="$ac_compile"
6638case "(($ac_try" in
6639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6640 *) ac_try_echo=$ac_try;;
6641esac
6642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6643 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6644 ac_status=$?
edfaf76d
LK
6645 grep -v '^ *+' conftest.er1 >conftest.err
6646 rm -f conftest.er1
6647 cat conftest.err >&5
cd958eb3 6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6649 (exit $ac_status); } && {
6650 test -z "$ac_c_werror_flag" ||
6651 test ! -s conftest.err
6652 } && test -s conftest.$ac_objext; then
98418dba 6653 ac_cv_header_stdc=yes
ba4481b5 6654else
503d2be0 6655 echo "$as_me: failed program was:" >&5
19650fd6
AS
6656sed 's/^/| /' conftest.$ac_ext >&5
6657
ca81d7a0 6658 ac_cv_header_stdc=no
ba4481b5 6659fi
ca81d7a0
JD
6660
6661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6662
6663if test $ac_cv_header_stdc = yes; then
6664 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6666/* confdefs.h. */
6667_ACEOF
6668cat confdefs.h >>conftest.$ac_ext
6669cat >>conftest.$ac_ext <<_ACEOF
6670/* end confdefs.h. */
98418dba
CW
6671#include <string.h>
6672
6673_ACEOF
6674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6675 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6676 :
6677else
6678 ac_cv_header_stdc=no
ba4481b5 6679fi
98418dba 6680rm -f conftest*
ba4481b5
DL
6681
6682fi
6683
98418dba
CW
6684if test $ac_cv_header_stdc = yes; then
6685 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
98418dba
CW
6692#include <stdlib.h>
6693
6694_ACEOF
6695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6696 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6697 :
6698else
6699 ac_cv_header_stdc=no
6700fi
6701rm -f conftest*
6702
6703fi
6704
6705if test $ac_cv_header_stdc = yes; then
6706 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6707 if test "$cross_compiling" = yes; then
6708 :
d42122a3 6709else
503d2be0 6710 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6711/* confdefs.h. */
6712_ACEOF
6713cat confdefs.h >>conftest.$ac_ext
6714cat >>conftest.$ac_ext <<_ACEOF
6715/* end confdefs.h. */
98418dba 6716#include <ctype.h>
ca81d7a0 6717#include <stdlib.h>
98418dba
CW
6718#if ((' ' & 0x0FF) == 0x020)
6719# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6720# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6721#else
19650fd6 6722# define ISLOWER(c) \
edfaf76d
LK
6723 (('a' <= (c) && (c) <= 'i') \
6724 || ('j' <= (c) && (c) <= 'r') \
6725 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6726# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6727#endif
6728
6729#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6730int
6731main ()
6732{
98418dba
CW
6733 int i;
6734 for (i = 0; i < 256; i++)
6735 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6736 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6737 return 2;
6738 return 0;
503d2be0
AS
6739}
6740_ACEOF
98418dba 6741rm -f conftest$ac_exeext
ca81d7a0
JD
6742if { (ac_try="$ac_link"
6743case "(($ac_try" in
6744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 *) ac_try_echo=$ac_try;;
6746esac
6747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6748 (eval "$ac_link") 2>&5
503d2be0 6749 ac_status=$?
c0d27fcc 6750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6751 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6752 { (case "(($ac_try" in
6753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6754 *) ac_try_echo=$ac_try;;
6755esac
6756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6757 (eval "$ac_try") 2>&5
503d2be0 6758 ac_status=$?
c0d27fcc 6759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6760 (exit $ac_status); }; }; then
98418dba 6761 :
d42122a3 6762else
98418dba
CW
6763 echo "$as_me: program exited with status $ac_status" >&5
6764echo "$as_me: failed program was:" >&5
19650fd6
AS
6765sed 's/^/| /' conftest.$ac_ext >&5
6766
c0d27fcc 6767( exit $ac_status )
98418dba 6768ac_cv_header_stdc=no
d42122a3 6769fi
ca81d7a0 6770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6771fi
ca81d7a0
JD
6772
6773
98418dba
CW
6774fi
6775fi
ca81d7a0
JD
6776{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6777echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6778if test $ac_cv_header_stdc = yes; then
6779
c0d27fcc 6780cat >>confdefs.h <<\_ACEOF
98418dba 6781#define STDC_HEADERS 1
c0d27fcc 6782_ACEOF
d42122a3
DL
6783
6784fi
6785
ca81d7a0
JD
6786{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6787echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6788if test "${ac_cv_header_time+set}" = set; then
503d2be0 6789 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6790else
503d2be0 6791 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
ba4481b5 6797#include <sys/types.h>
98418dba 6798#include <sys/time.h>
ba4481b5 6799#include <time.h>
503d2be0
AS
6800
6801int
6802main ()
6803{
98418dba
CW
6804if ((struct tm *) 0)
6805return 0;
503d2be0
AS
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
ca81d7a0
JD
6811if { (ac_try="$ac_compile"
6812case "(($ac_try" in
6813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6814 *) ac_try_echo=$ac_try;;
6815esac
6816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6817 (eval "$ac_compile") 2>conftest.er1
503d2be0 6818 ac_status=$?
edfaf76d
LK
6819 grep -v '^ *+' conftest.er1 >conftest.err
6820 rm -f conftest.er1
6821 cat conftest.err >&5
c0d27fcc 6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6823 (exit $ac_status); } && {
6824 test -z "$ac_c_werror_flag" ||
6825 test ! -s conftest.err
6826 } && test -s conftest.$ac_objext; then
98418dba 6827 ac_cv_header_time=yes
ba4481b5 6828else
503d2be0 6829 echo "$as_me: failed program was:" >&5
19650fd6
AS
6830sed 's/^/| /' conftest.$ac_ext >&5
6831
ca81d7a0 6832 ac_cv_header_time=no
ba4481b5 6833fi
ca81d7a0
JD
6834
6835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6836fi
ca81d7a0
JD
6837{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6838echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6839if test $ac_cv_header_time = yes; then
503d2be0 6840
c0d27fcc 6841cat >>confdefs.h <<\_ACEOF
98418dba 6842#define TIME_WITH_SYS_TIME 1
c0d27fcc 6843_ACEOF
ba4481b5
DL
6844
6845fi
6846
ca81d7a0
JD
6847{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6848echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6849if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6850 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6851else
503d2be0 6852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
cd958eb3
MB
6858$ac_includes_default
6859int
6860main ()
6861{
6862#ifndef sys_siglist
f053c89f 6863 (void) sys_siglist;
98418dba 6864#endif
503d2be0 6865
cd958eb3
MB
6866 ;
6867 return 0;
6868}
6869_ACEOF
6870rm -f conftest.$ac_objext
ca81d7a0
JD
6871if { (ac_try="$ac_compile"
6872case "(($ac_try" in
6873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6874 *) ac_try_echo=$ac_try;;
6875esac
6876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6877 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6878 ac_status=$?
edfaf76d
LK
6879 grep -v '^ *+' conftest.er1 >conftest.err
6880 rm -f conftest.er1
6881 cat conftest.err >&5
cd958eb3 6882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6883 (exit $ac_status); } && {
6884 test -z "$ac_c_werror_flag" ||
6885 test ! -s conftest.err
6886 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6887 ac_cv_have_decl_sys_siglist=yes
6888else
6889 echo "$as_me: failed program was:" >&5
19650fd6
AS
6890sed 's/^/| /' conftest.$ac_ext >&5
6891
ca81d7a0 6892 ac_cv_have_decl_sys_siglist=no
cd958eb3 6893fi
ca81d7a0
JD
6894
6895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6896fi
ca81d7a0
JD
6897{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6898echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6899if test $ac_cv_have_decl_sys_siglist = yes; then
6900
6901cat >>confdefs.h <<_ACEOF
6902#define HAVE_DECL_SYS_SIGLIST 1
6903_ACEOF
6904
6905
6906else
6907 cat >>confdefs.h <<_ACEOF
6908#define HAVE_DECL_SYS_SIGLIST 0
6909_ACEOF
6910
6911
6912fi
6913
6914
6915if test $ac_cv_have_decl_sys_siglist != yes; then
6916 # For Tru64, at least:
ca81d7a0
JD
6917 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6918echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6919if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6920 echo $ECHO_N "(cached) $ECHO_C" >&6
6921else
6922 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6923/* confdefs.h. */
6924_ACEOF
6925cat confdefs.h >>conftest.$ac_ext
6926cat >>conftest.$ac_ext <<_ACEOF
6927/* end confdefs.h. */
cd958eb3 6928$ac_includes_default
503d2be0
AS
6929int
6930main ()
6931{
cd958eb3 6932#ifndef __sys_siglist
f053c89f 6933 (void) __sys_siglist;
cd958eb3
MB
6934#endif
6935
503d2be0
AS
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
ca81d7a0
JD
6941if { (ac_try="$ac_compile"
6942case "(($ac_try" in
6943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6944 *) ac_try_echo=$ac_try;;
6945esac
6946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6947 (eval "$ac_compile") 2>conftest.er1
503d2be0 6948 ac_status=$?
edfaf76d
LK
6949 grep -v '^ *+' conftest.er1 >conftest.err
6950 rm -f conftest.er1
6951 cat conftest.err >&5
c0d27fcc 6952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6953 (exit $ac_status); } && {
6954 test -z "$ac_c_werror_flag" ||
6955 test ! -s conftest.err
6956 } && test -s conftest.$ac_objext; then
cd958eb3 6957 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6958else
503d2be0 6959 echo "$as_me: failed program was:" >&5
19650fd6
AS
6960sed 's/^/| /' conftest.$ac_ext >&5
6961
ca81d7a0 6962 ac_cv_have_decl___sys_siglist=no
ba4481b5 6963fi
ca81d7a0
JD
6964
6965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6966fi
ca81d7a0
JD
6967{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6968echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6969if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6970
cd958eb3
MB
6971cat >>confdefs.h <<_ACEOF
6972#define HAVE_DECL___SYS_SIGLIST 1
6973_ACEOF
6974
6975
6976else
6977 cat >>confdefs.h <<_ACEOF
6978#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6979_ACEOF
503d2be0 6980
cd958eb3 6981
ba4481b5
DL
6982fi
6983
cd958eb3
MB
6984
6985 if test $ac_cv_have_decl___sys_siglist = yes; then
6986
6987cat >>confdefs.h <<\_ACEOF
6988#define sys_siglist __sys_siglist
6989_ACEOF
6990
6991 fi
6992fi
ca81d7a0
JD
6993{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6994echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6995if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6996 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6997else
503d2be0 6998 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6999/* confdefs.h. */
7000_ACEOF
7001cat confdefs.h >>conftest.$ac_ext
7002cat >>conftest.$ac_ext <<_ACEOF
7003/* end confdefs.h. */
98418dba
CW
7004#include <sys/types.h>
7005#include <sys/wait.h>
7006#ifndef WEXITSTATUS
ca81d7a0 7007# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7008#endif
7009#ifndef WIFEXITED
7010# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7011#endif
503d2be0
AS
7012
7013int
7014main ()
7015{
98418dba
CW
7016 int s;
7017 wait (&s);
7018 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7019 ;
7020 return 0;
7021}
7022_ACEOF
98418dba 7023rm -f conftest.$ac_objext
ca81d7a0
JD
7024if { (ac_try="$ac_compile"
7025case "(($ac_try" in
7026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7027 *) ac_try_echo=$ac_try;;
7028esac
7029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7030 (eval "$ac_compile") 2>conftest.er1
503d2be0 7031 ac_status=$?
edfaf76d
LK
7032 grep -v '^ *+' conftest.er1 >conftest.err
7033 rm -f conftest.er1
7034 cat conftest.err >&5
c0d27fcc 7035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7036 (exit $ac_status); } && {
7037 test -z "$ac_c_werror_flag" ||
7038 test ! -s conftest.err
7039 } && test -s conftest.$ac_objext; then
98418dba 7040 ac_cv_header_sys_wait_h=yes
ba4481b5 7041else
503d2be0 7042 echo "$as_me: failed program was:" >&5
19650fd6
AS
7043sed 's/^/| /' conftest.$ac_ext >&5
7044
ca81d7a0 7045 ac_cv_header_sys_wait_h=no
ba4481b5 7046fi
ca81d7a0
JD
7047
7048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7049fi
ca81d7a0
JD
7050{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7051echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7052if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7053
c0d27fcc 7054cat >>confdefs.h <<\_ACEOF
98418dba 7055#define HAVE_SYS_WAIT_H 1
c0d27fcc 7056_ACEOF
ba4481b5 7057
ba4481b5
DL
7058fi
7059
c0d27fcc 7060
ca81d7a0
JD
7061{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7062echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7063if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7064 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7065else
503d2be0 7066 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7067/* confdefs.h. */
7068_ACEOF
7069cat confdefs.h >>conftest.$ac_ext
7070cat >>conftest.$ac_ext <<_ACEOF
7071/* end confdefs.h. */
98418dba
CW
7072#ifdef TIME_WITH_SYS_TIME
7073#include <sys/time.h>
7074#include <time.h>
7075#else
7076#ifdef HAVE_SYS_TIME_H
7077#include <sys/time.h>
7078#else
1113b624 7079#include <time.h>
98418dba
CW
7080#endif
7081#endif
7082#ifdef HAVE_UTIME_H
7083#include <utime.h>
7084#endif
503d2be0
AS
7085int
7086main ()
7087{
98418dba 7088static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7089 ;
7090 return 0;
7091}
7092_ACEOF
98418dba 7093rm -f conftest.$ac_objext
ca81d7a0
JD
7094if { (ac_try="$ac_compile"
7095case "(($ac_try" in
7096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097 *) ac_try_echo=$ac_try;;
7098esac
7099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7100 (eval "$ac_compile") 2>conftest.er1
503d2be0 7101 ac_status=$?
edfaf76d
LK
7102 grep -v '^ *+' conftest.er1 >conftest.err
7103 rm -f conftest.er1
7104 cat conftest.err >&5
c0d27fcc 7105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7106 (exit $ac_status); } && {
7107 test -z "$ac_c_werror_flag" ||
7108 test ! -s conftest.err
7109 } && test -s conftest.$ac_objext; then
98418dba 7110 emacs_cv_struct_utimbuf=yes
1113b624 7111else
503d2be0 7112 echo "$as_me: failed program was:" >&5
19650fd6
AS
7113sed 's/^/| /' conftest.$ac_ext >&5
7114
ca81d7a0 7115 emacs_cv_struct_utimbuf=no
1113b624 7116fi
ca81d7a0
JD
7117
7118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7119fi
ca81d7a0
JD
7120{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7121echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7122if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7123
c0d27fcc 7124cat >>confdefs.h <<\_ACEOF
98418dba 7125#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7126_ACEOF
1113b624
PE
7127
7128fi
ba4481b5 7129
ca81d7a0
JD
7130{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7131echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7132if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7133 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7134else
98418dba 7135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7136/* confdefs.h. */
7137_ACEOF
7138cat confdefs.h >>conftest.$ac_ext
7139cat >>conftest.$ac_ext <<_ACEOF
7140/* end confdefs.h. */
7397acc4 7141#include <sys/types.h>
98418dba 7142#include <signal.h>
98418dba 7143
503d2be0
AS
7144int
7145main ()
7146{
ca81d7a0 7147return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7148 ;
7149 return 0;
7150}
7151_ACEOF
98418dba 7152rm -f conftest.$ac_objext
ca81d7a0
JD
7153if { (ac_try="$ac_compile"
7154case "(($ac_try" in
7155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7156 *) ac_try_echo=$ac_try;;
7157esac
7158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7159 (eval "$ac_compile") 2>conftest.er1
503d2be0 7160 ac_status=$?
edfaf76d
LK
7161 grep -v '^ *+' conftest.er1 >conftest.err
7162 rm -f conftest.er1
7163 cat conftest.err >&5
c0d27fcc 7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7165 (exit $ac_status); } && {
7166 test -z "$ac_c_werror_flag" ||
7167 test ! -s conftest.err
7168 } && test -s conftest.$ac_objext; then
ca81d7a0 7169 ac_cv_type_signal=int
503d2be0
AS
7170else
7171 echo "$as_me: failed program was:" >&5
19650fd6
AS
7172sed 's/^/| /' conftest.$ac_ext >&5
7173
ca81d7a0 7174 ac_cv_type_signal=void
503d2be0 7175fi
ca81d7a0
JD
7176
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7178fi
ca81d7a0
JD
7179{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7180echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7181
c0d27fcc 7182cat >>confdefs.h <<_ACEOF
98418dba 7183#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7184_ACEOF
7185
503d2be0 7186
c0d27fcc 7187
ca81d7a0
JD
7188{ echo "$as_me:$LINENO: checking for speed_t" >&5
7189echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7190if test "${emacs_cv_speed_t+set}" = set; then
7191 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7192else
98418dba 7193 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7194/* confdefs.h. */
7195_ACEOF
7196cat confdefs.h >>conftest.$ac_ext
7197cat >>conftest.$ac_ext <<_ACEOF
7198/* end confdefs.h. */
98418dba 7199#include <termios.h>
98418dba
CW
7200int
7201main ()
7202{
7203speed_t x = 1;
7204 ;
7205 return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext
ca81d7a0
JD
7209if { (ac_try="$ac_compile"
7210case "(($ac_try" in
7211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7212 *) ac_try_echo=$ac_try;;
7213esac
7214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7215 (eval "$ac_compile") 2>conftest.er1
98418dba 7216 ac_status=$?
edfaf76d
LK
7217 grep -v '^ *+' conftest.er1 >conftest.err
7218 rm -f conftest.er1
7219 cat conftest.err >&5
c0d27fcc 7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7221 (exit $ac_status); } && {
7222 test -z "$ac_c_werror_flag" ||
7223 test ! -s conftest.err
7224 } && test -s conftest.$ac_objext; then
98418dba
CW
7225 emacs_cv_speed_t=yes
7226else
7227 echo "$as_me: failed program was:" >&5
19650fd6
AS
7228sed 's/^/| /' conftest.$ac_ext >&5
7229
ca81d7a0 7230 emacs_cv_speed_t=no
98418dba 7231fi
ca81d7a0
JD
7232
7233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7234fi
ca81d7a0
JD
7235{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7236echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7237if test $emacs_cv_speed_t = yes; then
b936fae4 7238
c0d27fcc 7239cat >>confdefs.h <<\_ACEOF
98418dba 7240#define HAVE_SPEED_T 1
c0d27fcc 7241_ACEOF
98418dba 7242
7397acc4
DL
7243fi
7244
ca81d7a0
JD
7245{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7246echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7247if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7248 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7249else
503d2be0 7250 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7251/* confdefs.h. */
7252_ACEOF
7253cat confdefs.h >>conftest.$ac_ext
7254cat >>conftest.$ac_ext <<_ACEOF
7255/* end confdefs.h. */
98418dba
CW
7256#ifdef TIME_WITH_SYS_TIME
7257#include <sys/time.h>
7258#include <time.h>
7259#else
7260#ifdef HAVE_SYS_TIME_H
7261#include <sys/time.h>
7262#else
7263#include <time.h>
7264#endif
7265#endif
503d2be0
AS
7266int
7267main ()
7268{
98418dba 7269static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext
ca81d7a0
JD
7275if { (ac_try="$ac_compile"
7276case "(($ac_try" in
7277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7278 *) ac_try_echo=$ac_try;;
7279esac
7280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7281 (eval "$ac_compile") 2>conftest.er1
503d2be0 7282 ac_status=$?
edfaf76d
LK
7283 grep -v '^ *+' conftest.er1 >conftest.err
7284 rm -f conftest.er1
7285 cat conftest.err >&5
c0d27fcc 7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7287 (exit $ac_status); } && {
7288 test -z "$ac_c_werror_flag" ||
7289 test ! -s conftest.err
7290 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7291 emacs_cv_struct_timeval=yes
7292else
503d2be0 7293 echo "$as_me: failed program was:" >&5
19650fd6
AS
7294sed 's/^/| /' conftest.$ac_ext >&5
7295
ca81d7a0 7296 emacs_cv_struct_timeval=no
7397acc4 7297fi
ca81d7a0
JD
7298
7299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7300fi
ca81d7a0
JD
7301{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7302echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7303HAVE_TIMEVAL=$emacs_cv_struct_timeval
7304if test $emacs_cv_struct_timeval = yes; then
b936fae4 7305
c0d27fcc 7306cat >>confdefs.h <<\_ACEOF
98418dba 7307#define HAVE_TIMEVAL 1
c0d27fcc 7308_ACEOF
7397acc4
DL
7309
7310fi
7311
ca81d7a0
JD
7312{ echo "$as_me:$LINENO: checking for struct exception" >&5
7313echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7314if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7315 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7316else
503d2be0 7317 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7318/* confdefs.h. */
7319_ACEOF
7320cat confdefs.h >>conftest.$ac_ext
7321cat >>conftest.$ac_ext <<_ACEOF
7322/* end confdefs.h. */
98418dba 7323#include <math.h>
503d2be0
AS
7324int
7325main ()
7326{
98418dba 7327static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7328 ;
7329 return 0;
ba4481b5 7330}
503d2be0
AS
7331_ACEOF
7332rm -f conftest.$ac_objext
ca81d7a0
JD
7333if { (ac_try="$ac_compile"
7334case "(($ac_try" in
7335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7336 *) ac_try_echo=$ac_try;;
7337esac
7338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7339 (eval "$ac_compile") 2>conftest.er1
503d2be0 7340 ac_status=$?
edfaf76d
LK
7341 grep -v '^ *+' conftest.er1 >conftest.err
7342 rm -f conftest.er1
7343 cat conftest.err >&5
c0d27fcc 7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7345 (exit $ac_status); } && {
7346 test -z "$ac_c_werror_flag" ||
7347 test ! -s conftest.err
7348 } && test -s conftest.$ac_objext; then
98418dba 7349 emacs_cv_struct_exception=yes
ba4481b5 7350else
503d2be0 7351 echo "$as_me: failed program was:" >&5
19650fd6
AS
7352sed 's/^/| /' conftest.$ac_ext >&5
7353
ca81d7a0 7354 emacs_cv_struct_exception=no
ba4481b5 7355fi
ca81d7a0
JD
7356
7357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7358fi
ca81d7a0
JD
7359{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7360echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7361HAVE_EXCEPTION=$emacs_cv_struct_exception
7362if test $emacs_cv_struct_exception != yes; then
b936fae4 7363
c0d27fcc 7364cat >>confdefs.h <<\_ACEOF
98418dba 7365#define NO_MATHERR 1
c0d27fcc 7366_ACEOF
ba4481b5
DL
7367
7368fi
7369
7862d3a8
AS
7370
7371for ac_header in sys/socket.h
7372do
7373as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7374if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7375 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7376echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7377if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7378 echo $ECHO_N "(cached) $ECHO_C" >&6
7379fi
ca81d7a0
JD
7380ac_res=`eval echo '${'$as_ac_Header'}'`
7381 { echo "$as_me:$LINENO: result: $ac_res" >&5
7382echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7383else
7384 # Is the header compilable?
ca81d7a0
JD
7385{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7386echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7387cat >conftest.$ac_ext <<_ACEOF
7388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
7393$ac_includes_default
7394#include <$ac_header>
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
7862d3a8 7404 ac_status=$?
edfaf76d
LK
7405 grep -v '^ *+' conftest.er1 >conftest.err
7406 rm -f conftest.er1
7407 cat conftest.err >&5
7862d3a8 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
7862d3a8
AS
7413 ac_header_compiler=yes
7414else
7415 echo "$as_me: failed program was:" >&5
7416sed 's/^/| /' conftest.$ac_ext >&5
7417
ca81d7a0 7418 ac_header_compiler=no
7862d3a8 7419fi
ca81d7a0
JD
7420
7421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7422{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7423echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7424
7425# Is the header present?
ca81d7a0
JD
7426{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7427echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7428cat >conftest.$ac_ext <<_ACEOF
7429/* confdefs.h. */
7430_ACEOF
7431cat confdefs.h >>conftest.$ac_ext
7432cat >>conftest.$ac_ext <<_ACEOF
7433/* end confdefs.h. */
7434#include <$ac_header>
7435_ACEOF
ca81d7a0
JD
7436if { (ac_try="$ac_cpp conftest.$ac_ext"
7437case "(($ac_try" in
7438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7439 *) ac_try_echo=$ac_try;;
7440esac
7441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7442 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7443 ac_status=$?
7444 grep -v '^ *+' conftest.er1 >conftest.err
7445 rm -f conftest.er1
7446 cat conftest.err >&5
7447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7448 (exit $ac_status); } >/dev/null && {
7449 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7450 test ! -s conftest.err
7451 }; then
7862d3a8
AS
7452 ac_header_preproc=yes
7453else
7454 echo "$as_me: failed program was:" >&5
7455sed 's/^/| /' conftest.$ac_ext >&5
7456
7457 ac_header_preproc=no
7458fi
ca81d7a0 7459
7862d3a8 7460rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7461{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7462echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7463
7464# So? What about this header?
edfaf76d
LK
7465case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7466 yes:no: )
7862d3a8
AS
7467 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7468echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7469 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7470echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7471 ac_header_preproc=yes
7862d3a8 7472 ;;
edfaf76d 7473 no:yes:* )
7862d3a8
AS
7474 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7475echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7476 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7477echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7478 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7479echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7480 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7481echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7482 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7483echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7484 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7485echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7486
7862d3a8
AS
7487 ;;
7488esac
ca81d7a0
JD
7489{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7490echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7491if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7492 echo $ECHO_N "(cached) $ECHO_C" >&6
7493else
edfaf76d 7494 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7495fi
ca81d7a0
JD
7496ac_res=`eval echo '${'$as_ac_Header'}'`
7497 { echo "$as_me:$LINENO: result: $ac_res" >&5
7498echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7499
7500fi
7501if test `eval echo '${'$as_ac_Header'}'` = yes; then
7502 cat >>confdefs.h <<_ACEOF
7503#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7504_ACEOF
7505
7506fi
7507
7508done
7509
7510
7511for ac_header in net/if.h
7512do
7513as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7514{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7515echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7516if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7517 echo $ECHO_N "(cached) $ECHO_C" >&6
7518else
7519 cat >conftest.$ac_ext <<_ACEOF
7520/* confdefs.h. */
7521_ACEOF
7522cat confdefs.h >>conftest.$ac_ext
7523cat >>conftest.$ac_ext <<_ACEOF
7524/* end confdefs.h. */
7525$ac_includes_default
7526#if HAVE_SYS_SOCKET_H
7527#include <sys/socket.h>
7528#endif
7529
7530#include <$ac_header>
7531_ACEOF
7532rm -f conftest.$ac_objext
ca81d7a0
JD
7533if { (ac_try="$ac_compile"
7534case "(($ac_try" in
7535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7536 *) ac_try_echo=$ac_try;;
7537esac
7538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7539 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7540 ac_status=$?
edfaf76d
LK
7541 grep -v '^ *+' conftest.er1 >conftest.err
7542 rm -f conftest.er1
7543 cat conftest.err >&5
7862d3a8 7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7545 (exit $ac_status); } && {
7546 test -z "$ac_c_werror_flag" ||
7547 test ! -s conftest.err
7548 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7549 eval "$as_ac_Header=yes"
7550else
7551 echo "$as_me: failed program was:" >&5
7552sed 's/^/| /' conftest.$ac_ext >&5
7553
ca81d7a0 7554 eval "$as_ac_Header=no"
7862d3a8 7555fi
ca81d7a0
JD
7556
7557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7558fi
ca81d7a0
JD
7559ac_res=`eval echo '${'$as_ac_Header'}'`
7560 { echo "$as_me:$LINENO: result: $ac_res" >&5
7561echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7562if test `eval echo '${'$as_ac_Header'}'` = yes; then
7563 cat >>confdefs.h <<_ACEOF
7564#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7565_ACEOF
7566
7567fi
7568
7569done
7570
7571
ca81d7a0
JD
7572{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7573echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7574if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7575 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7576else
503d2be0 7577 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7578/* confdefs.h. */
7579_ACEOF
7580cat confdefs.h >>conftest.$ac_ext
7581cat >>conftest.$ac_ext <<_ACEOF
7582/* end confdefs.h. */
98418dba
CW
7583#include <sys/types.h>
7584#include <time.h>
7397acc4 7585
503d2be0
AS
7586int
7587main ()
7588{
f053c89f
CY
7589struct tm tm;
7590 int *p = &tm.tm_sec;
7591 return !p;
503d2be0
AS
7592 ;
7593 return 0;
7594}
7595_ACEOF
7596rm -f conftest.$ac_objext
ca81d7a0
JD
7597if { (ac_try="$ac_compile"
7598case "(($ac_try" in
7599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7600 *) ac_try_echo=$ac_try;;
7601esac
7602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7603 (eval "$ac_compile") 2>conftest.er1
503d2be0 7604 ac_status=$?
edfaf76d
LK
7605 grep -v '^ *+' conftest.er1 >conftest.err
7606 rm -f conftest.er1
7607 cat conftest.err >&5
c0d27fcc 7608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7609 (exit $ac_status); } && {
7610 test -z "$ac_c_werror_flag" ||
7611 test ! -s conftest.err
7612 } && test -s conftest.$ac_objext; then
35996d22
AS
7613 ac_cv_struct_tm=time.h
7614else
503d2be0 7615 echo "$as_me: failed program was:" >&5
19650fd6
AS
7616sed 's/^/| /' conftest.$ac_ext >&5
7617
ca81d7a0 7618 ac_cv_struct_tm=sys/time.h
7397acc4 7619fi
ca81d7a0
JD
7620
7621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7622fi
ca81d7a0
JD
7623{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7624echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7625if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7626
c0d27fcc 7627cat >>confdefs.h <<\_ACEOF
98418dba 7628#define TM_IN_SYS_TIME 1
c0d27fcc 7629_ACEOF
7397acc4
DL
7630
7631fi
ba4481b5 7632
ca81d7a0
JD
7633{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7634echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7635if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7636 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7637else
98418dba 7638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
98418dba
CW
7644#include <sys/types.h>
7645#include <$ac_cv_struct_tm>
ba4481b5 7646
c0d27fcc 7647
98418dba
CW
7648int
7649main ()
7650{
7651static struct tm ac_aggr;
7652if (ac_aggr.tm_zone)
7653return 0;
7654 ;
7655 return 0;
7656}
7657_ACEOF
7658rm -f conftest.$ac_objext
ca81d7a0
JD
7659if { (ac_try="$ac_compile"
7660case "(($ac_try" in
7661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7662 *) ac_try_echo=$ac_try;;
7663esac
7664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7665 (eval "$ac_compile") 2>conftest.er1
98418dba 7666 ac_status=$?
edfaf76d
LK
7667 grep -v '^ *+' conftest.er1 >conftest.err
7668 rm -f conftest.er1
7669 cat conftest.err >&5
c0d27fcc 7670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7671 (exit $ac_status); } && {
7672 test -z "$ac_c_werror_flag" ||
7673 test ! -s conftest.err
7674 } && test -s conftest.$ac_objext; then
98418dba 7675 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7676else
98418dba 7677 echo "$as_me: failed program was:" >&5
19650fd6
AS
7678sed 's/^/| /' conftest.$ac_ext >&5
7679
ca81d7a0 7680 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
6bae0ccf
DL
7686#include <sys/types.h>
7687#include <$ac_cv_struct_tm>
7688
7689
7690int
7691main ()
7692{
7693static struct tm ac_aggr;
7694if (sizeof ac_aggr.tm_zone)
7695return 0;
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
ca81d7a0
JD
7701if { (ac_try="$ac_compile"
7702case "(($ac_try" in
7703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7704 *) ac_try_echo=$ac_try;;
7705esac
7706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7707 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7708 ac_status=$?
edfaf76d
LK
7709 grep -v '^ *+' conftest.er1 >conftest.err
7710 rm -f conftest.er1
7711 cat conftest.err >&5
6bae0ccf 7712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7713 (exit $ac_status); } && {
7714 test -z "$ac_c_werror_flag" ||
7715 test ! -s conftest.err
7716 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7717 ac_cv_member_struct_tm_tm_zone=yes
7718else
7719 echo "$as_me: failed program was:" >&5
19650fd6
AS
7720sed 's/^/| /' conftest.$ac_ext >&5
7721
ca81d7a0 7722 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7723fi
ca81d7a0
JD
7724
7725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7726fi
ca81d7a0
JD
7727
7728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7729fi
ca81d7a0
JD
7730{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7731echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7732if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7733
c0d27fcc 7734cat >>confdefs.h <<_ACEOF
98418dba 7735#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7736_ACEOF
7737
ba4481b5 7738
98418dba 7739fi
ba4481b5 7740
98418dba 7741if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7742
c0d27fcc 7743cat >>confdefs.h <<\_ACEOF
98418dba 7744#define HAVE_TM_ZONE 1
c0d27fcc 7745_ACEOF
ba4481b5 7746
ba4481b5 7747else
ca81d7a0
JD
7748 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7749echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7750if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7751 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7752else
98418dba 7753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7754/* confdefs.h. */
7755_ACEOF
7756cat confdefs.h >>conftest.$ac_ext
7757cat >>conftest.$ac_ext <<_ACEOF
7758/* end confdefs.h. */
98418dba 7759#include <time.h>
98418dba 7760
98418dba
CW
7761int
7762main ()
7763{
ca81d7a0 7764#ifndef tzname
f053c89f 7765 (void) tzname;
ca81d7a0
JD
7766#endif
7767
6bae0ccf
DL
7768 ;
7769 return 0;
7770}
7771_ACEOF
7772rm -f conftest.$ac_objext
ca81d7a0
JD
7773if { (ac_try="$ac_compile"
7774case "(($ac_try" in
7775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7776 *) ac_try_echo=$ac_try;;
7777esac
7778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7779 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7780 ac_status=$?
edfaf76d
LK
7781 grep -v '^ *+' conftest.er1 >conftest.err
7782 rm -f conftest.er1
7783 cat conftest.err >&5
6bae0ccf 7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7785 (exit $ac_status); } && {
7786 test -z "$ac_c_werror_flag" ||
7787 test ! -s conftest.err
7788 } && test -s conftest.$ac_objext; then
ca81d7a0 7789 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7790else
7791 echo "$as_me: failed program was:" >&5
19650fd6
AS
7792sed 's/^/| /' conftest.$ac_ext >&5
7793
ca81d7a0 7794 ac_cv_have_decl_tzname=no
ba4481b5 7795fi
ca81d7a0
JD
7796
7797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7798fi
ca81d7a0
JD
7799{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7800echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7801if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7802
c0d27fcc 7803cat >>confdefs.h <<_ACEOF
ca81d7a0 7804#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7805_ACEOF
7806
ba4481b5 7807
ca81d7a0
JD
7808else
7809 cat >>confdefs.h <<_ACEOF
7810#define HAVE_DECL_TZNAME 0
7811_ACEOF
ba4481b5 7812
ba4481b5 7813
98418dba 7814fi
ba4481b5 7815
ca81d7a0
JD
7816
7817 { echo "$as_me:$LINENO: checking for tzname" >&5
7818echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7819if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7820 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7821else
98418dba 7822 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7823/* confdefs.h. */
7824_ACEOF
7825cat confdefs.h >>conftest.$ac_ext
7826cat >>conftest.$ac_ext <<_ACEOF
7827/* end confdefs.h. */
98418dba 7828#include <time.h>
ca81d7a0
JD
7829#if !HAVE_DECL_TZNAME
7830extern char *tzname[];
98418dba
CW
7831#endif
7832
98418dba
CW
7833int
7834main ()
7835{
ca81d7a0 7836return tzname[0][0];
98418dba
CW
7837 ;
7838 return 0;
7839}
7840_ACEOF
7841rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7842if { (ac_try="$ac_link"
7843case "(($ac_try" in
7844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7845 *) ac_try_echo=$ac_try;;
7846esac
7847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7848 (eval "$ac_link") 2>conftest.er1
98418dba 7849 ac_status=$?
edfaf76d
LK
7850 grep -v '^ *+' conftest.er1 >conftest.err
7851 rm -f conftest.er1
7852 cat conftest.err >&5
c0d27fcc 7853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7854 (exit $ac_status); } && {
7855 test -z "$ac_c_werror_flag" ||
7856 test ! -s conftest.err
7857 } && test -s conftest$ac_exeext &&
7858 $as_test_x conftest$ac_exeext; then
98418dba
CW
7859 ac_cv_var_tzname=yes
7860else
7861 echo "$as_me: failed program was:" >&5
19650fd6
AS
7862sed 's/^/| /' conftest.$ac_ext >&5
7863
ca81d7a0 7864 ac_cv_var_tzname=no
ba4481b5 7865fi
6bae0ccf 7866
f053c89f 7867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7868 conftest$ac_exeext conftest.$ac_ext
98418dba 7869fi
ca81d7a0
JD
7870{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7871echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7872 if test $ac_cv_var_tzname = yes; then
ba4481b5 7873
c0d27fcc 7874cat >>confdefs.h <<\_ACEOF
98418dba 7875#define HAVE_TZNAME 1
c0d27fcc 7876_ACEOF
503d2be0 7877
98418dba
CW
7878 fi
7879fi
503d2be0 7880
ca81d7a0
JD
7881{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7882echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7883if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7884 echo $ECHO_N "(cached) $ECHO_C" >&6
7885else
7886 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7887/* confdefs.h. */
7888_ACEOF
7889cat confdefs.h >>conftest.$ac_ext
7890cat >>conftest.$ac_ext <<_ACEOF
7891/* end confdefs.h. */
98418dba 7892#include <time.h>
b936fae4 7893
98418dba
CW
7894int
7895main ()
7896{
b936fae4
AS
7897static struct tm ac_aggr;
7898if (ac_aggr.tm_gmtoff)
7899return 0;
98418dba
CW
7900 ;
7901 return 0;
7902}
7903_ACEOF
b936fae4 7904rm -f conftest.$ac_objext
ca81d7a0
JD
7905if { (ac_try="$ac_compile"
7906case "(($ac_try" in
7907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7908 *) ac_try_echo=$ac_try;;
7909esac
7910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7911 (eval "$ac_compile") 2>conftest.er1
98418dba 7912 ac_status=$?
edfaf76d
LK
7913 grep -v '^ *+' conftest.er1 >conftest.err
7914 rm -f conftest.er1
7915 cat conftest.err >&5
c0d27fcc 7916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7917 (exit $ac_status); } && {
7918 test -z "$ac_c_werror_flag" ||
7919 test ! -s conftest.err
7920 } && test -s conftest.$ac_objext; then
b936fae4 7921 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7922else
7923 echo "$as_me: failed program was:" >&5
19650fd6
AS
7924sed 's/^/| /' conftest.$ac_ext >&5
7925
ca81d7a0 7926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
6bae0ccf
DL
7932#include <time.h>
7933
8799b3e4
CW
7934int
7935main ()
7936{
6bae0ccf
DL
7937static struct tm ac_aggr;
7938if (sizeof ac_aggr.tm_gmtoff)
7939return 0;
8799b3e4
CW
7940 ;
7941 return 0;
7942}
7943_ACEOF
6bae0ccf 7944rm -f conftest.$ac_objext
ca81d7a0
JD
7945if { (ac_try="$ac_compile"
7946case "(($ac_try" in
7947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7948 *) ac_try_echo=$ac_try;;
7949esac
7950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7951 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7952 ac_status=$?
edfaf76d
LK
7953 grep -v '^ *+' conftest.er1 >conftest.err
7954 rm -f conftest.er1
7955 cat conftest.err >&5
c0d27fcc 7956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7957 (exit $ac_status); } && {
7958 test -z "$ac_c_werror_flag" ||
7959 test ! -s conftest.err
7960 } && test -s conftest.$ac_objext; then
6bae0ccf 7961 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7962else
7963 echo "$as_me: failed program was:" >&5
19650fd6
AS
7964sed 's/^/| /' conftest.$ac_ext >&5
7965
ca81d7a0 7966 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7967fi
ca81d7a0
JD
7968
7969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7970fi
ca81d7a0
JD
7971
7972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7973fi
ca81d7a0
JD
7974{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7975echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7976if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7977
7978cat >>confdefs.h <<\_ACEOF
7979#define HAVE_TM_GMTOFF 1
7980_ACEOF
7981
7982fi
7983
ca81d7a0
JD
7984{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7985echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7986if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7987 echo $ECHO_N "(cached) $ECHO_C" >&6
7988else
7989 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7990/* confdefs.h. */
7991_ACEOF
7992cat confdefs.h >>conftest.$ac_ext
7993cat >>conftest.$ac_ext <<_ACEOF
7994/* end confdefs.h. */
7862d3a8
AS
7995$ac_includes_default
7996#if HAVE_SYS_SOCKET_H
7997#include <sys/socket.h>
7998#endif
7999#if HAVE_NET_IF_H
96f3a036 8000#include <net/if.h>
7862d3a8 8001#endif
96f3a036
DL
8002
8003int
8004main ()
8005{
8006static struct ifreq ac_aggr;
8007if (ac_aggr.ifr_flags)
8008return 0;
8009 ;
8010 return 0;
8011}
8012_ACEOF
8013rm -f conftest.$ac_objext
ca81d7a0
JD
8014if { (ac_try="$ac_compile"
8015case "(($ac_try" in
8016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8017 *) ac_try_echo=$ac_try;;
8018esac
8019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8020 (eval "$ac_compile") 2>conftest.er1
96f3a036 8021 ac_status=$?
edfaf76d
LK
8022 grep -v '^ *+' conftest.er1 >conftest.err
8023 rm -f conftest.er1
8024 cat conftest.err >&5
96f3a036 8025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8026 (exit $ac_status); } && {
8027 test -z "$ac_c_werror_flag" ||
8028 test ! -s conftest.err
8029 } && test -s conftest.$ac_objext; then
96f3a036
DL
8030 ac_cv_member_struct_ifreq_ifr_flags=yes
8031else
8032 echo "$as_me: failed program was:" >&5
8033sed 's/^/| /' conftest.$ac_ext >&5
8034
ca81d7a0 8035 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8036/* confdefs.h. */
8037_ACEOF
8038cat confdefs.h >>conftest.$ac_ext
8039cat >>conftest.$ac_ext <<_ACEOF
8040/* end confdefs.h. */
7862d3a8
AS
8041$ac_includes_default
8042#if HAVE_SYS_SOCKET_H
8043#include <sys/socket.h>
8044#endif
8045#if HAVE_NET_IF_H
96f3a036 8046#include <net/if.h>
7862d3a8 8047#endif
96f3a036
DL
8048
8049int
8050main ()
8051{
8052static struct ifreq ac_aggr;
8053if (sizeof ac_aggr.ifr_flags)
8054return 0;
8055 ;
8056 return 0;
8057}
8058_ACEOF
8059rm -f conftest.$ac_objext
ca81d7a0
JD
8060if { (ac_try="$ac_compile"
8061case "(($ac_try" in
8062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8063 *) ac_try_echo=$ac_try;;
8064esac
8065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8066 (eval "$ac_compile") 2>conftest.er1
96f3a036 8067 ac_status=$?
edfaf76d
LK
8068 grep -v '^ *+' conftest.er1 >conftest.err
8069 rm -f conftest.er1
8070 cat conftest.err >&5
96f3a036 8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8072 (exit $ac_status); } && {
8073 test -z "$ac_c_werror_flag" ||
8074 test ! -s conftest.err
8075 } && test -s conftest.$ac_objext; then
96f3a036
DL
8076 ac_cv_member_struct_ifreq_ifr_flags=yes
8077else
8078 echo "$as_me: failed program was:" >&5
8079sed 's/^/| /' conftest.$ac_ext >&5
8080
ca81d7a0 8081 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8082fi
ca81d7a0
JD
8083
8084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8085fi
ca81d7a0
JD
8086
8087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8088fi
ca81d7a0
JD
8089{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8090echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8091if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8092
8093cat >>confdefs.h <<_ACEOF
8094#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8095_ACEOF
8096
8097
8098fi
ca81d7a0
JD
8099{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8100echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8101if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8102 echo $ECHO_N "(cached) $ECHO_C" >&6
8103else
8104 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8105/* confdefs.h. */
8106_ACEOF
8107cat confdefs.h >>conftest.$ac_ext
8108cat >>conftest.$ac_ext <<_ACEOF
8109/* end confdefs.h. */
7862d3a8
AS
8110$ac_includes_default
8111#if HAVE_SYS_SOCKET_H
8112#include <sys/socket.h>
8113#endif
8114#if HAVE_NET_IF_H
96f3a036 8115#include <net/if.h>
7862d3a8 8116#endif
96f3a036
DL
8117
8118int
8119main ()
8120{
8121static struct ifreq ac_aggr;
8122if (ac_aggr.ifr_hwaddr)
8123return 0;
8124 ;
8125 return 0;
8126}
8127_ACEOF
8128rm -f conftest.$ac_objext
ca81d7a0
JD
8129if { (ac_try="$ac_compile"
8130case "(($ac_try" in
8131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8132 *) ac_try_echo=$ac_try;;
8133esac
8134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8135 (eval "$ac_compile") 2>conftest.er1
96f3a036 8136 ac_status=$?
edfaf76d
LK
8137 grep -v '^ *+' conftest.er1 >conftest.err
8138 rm -f conftest.er1
8139 cat conftest.err >&5
96f3a036 8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8141 (exit $ac_status); } && {
8142 test -z "$ac_c_werror_flag" ||
8143 test ! -s conftest.err
8144 } && test -s conftest.$ac_objext; then
96f3a036
DL
8145 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8146else
8147 echo "$as_me: failed program was:" >&5
8148sed 's/^/| /' conftest.$ac_ext >&5
8149
ca81d7a0 8150 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8151/* confdefs.h. */
8152_ACEOF
8153cat confdefs.h >>conftest.$ac_ext
8154cat >>conftest.$ac_ext <<_ACEOF
8155/* end confdefs.h. */
7862d3a8
AS
8156$ac_includes_default
8157#if HAVE_SYS_SOCKET_H
8158#include <sys/socket.h>
8159#endif
8160#if HAVE_NET_IF_H
96f3a036 8161#include <net/if.h>
7862d3a8 8162#endif
96f3a036
DL
8163
8164int
8165main ()
8166{
8167static struct ifreq ac_aggr;
8168if (sizeof ac_aggr.ifr_hwaddr)
8169return 0;
8170 ;
8171 return 0;
8172}
8173_ACEOF
8174rm -f conftest.$ac_objext
ca81d7a0
JD
8175if { (ac_try="$ac_compile"
8176case "(($ac_try" in
8177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8178 *) ac_try_echo=$ac_try;;
8179esac
8180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8181 (eval "$ac_compile") 2>conftest.er1
96f3a036 8182 ac_status=$?
edfaf76d
LK
8183 grep -v '^ *+' conftest.er1 >conftest.err
8184 rm -f conftest.er1
8185 cat conftest.err >&5
96f3a036 8186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8187 (exit $ac_status); } && {
8188 test -z "$ac_c_werror_flag" ||
8189 test ! -s conftest.err
8190 } && test -s conftest.$ac_objext; then
96f3a036
DL
8191 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8192else
8193 echo "$as_me: failed program was:" >&5
8194sed 's/^/| /' conftest.$ac_ext >&5
8195
ca81d7a0 8196 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8197fi
ca81d7a0
JD
8198
8199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8200fi
ca81d7a0
JD
8201
8202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8203fi
ca81d7a0
JD
8204{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8205echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8206if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8207
8208cat >>confdefs.h <<_ACEOF
8209#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8210_ACEOF
8211
8212
8213fi
ca81d7a0
JD
8214{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8215echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8216if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8217 echo $ECHO_N "(cached) $ECHO_C" >&6
8218else
8219 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8220/* confdefs.h. */
8221_ACEOF
8222cat confdefs.h >>conftest.$ac_ext
8223cat >>conftest.$ac_ext <<_ACEOF
8224/* end confdefs.h. */
7862d3a8
AS
8225$ac_includes_default
8226#if HAVE_SYS_SOCKET_H
8227#include <sys/socket.h>
8228#endif
8229#if HAVE_NET_IF_H
96f3a036 8230#include <net/if.h>
7862d3a8 8231#endif
96f3a036
DL
8232
8233int
8234main ()
8235{
8236static struct ifreq ac_aggr;
8237if (ac_aggr.ifr_netmask)
8238return 0;
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243rm -f conftest.$ac_objext
ca81d7a0
JD
8244if { (ac_try="$ac_compile"
8245case "(($ac_try" in
8246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8247 *) ac_try_echo=$ac_try;;
8248esac
8249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8250 (eval "$ac_compile") 2>conftest.er1
96f3a036 8251 ac_status=$?
edfaf76d
LK
8252 grep -v '^ *+' conftest.er1 >conftest.err
8253 rm -f conftest.er1
8254 cat conftest.err >&5
96f3a036 8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8256 (exit $ac_status); } && {
8257 test -z "$ac_c_werror_flag" ||
8258 test ! -s conftest.err
8259 } && test -s conftest.$ac_objext; then
96f3a036
DL
8260 ac_cv_member_struct_ifreq_ifr_netmask=yes
8261else
8262 echo "$as_me: failed program was:" >&5
8263sed 's/^/| /' conftest.$ac_ext >&5
8264
ca81d7a0 8265 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
7862d3a8
AS
8271$ac_includes_default
8272#if HAVE_SYS_SOCKET_H
8273#include <sys/socket.h>
8274#endif
8275#if HAVE_NET_IF_H
96f3a036 8276#include <net/if.h>
7862d3a8 8277#endif
96f3a036
DL
8278
8279int
8280main ()
8281{
8282static struct ifreq ac_aggr;
8283if (sizeof ac_aggr.ifr_netmask)
8284return 0;
8285 ;
8286 return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext
ca81d7a0
JD
8290if { (ac_try="$ac_compile"
8291case "(($ac_try" in
8292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8293 *) ac_try_echo=$ac_try;;
8294esac
8295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8296 (eval "$ac_compile") 2>conftest.er1
96f3a036 8297 ac_status=$?
edfaf76d
LK
8298 grep -v '^ *+' conftest.er1 >conftest.err
8299 rm -f conftest.er1
8300 cat conftest.err >&5
96f3a036 8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8302 (exit $ac_status); } && {
8303 test -z "$ac_c_werror_flag" ||
8304 test ! -s conftest.err
8305 } && test -s conftest.$ac_objext; then
96f3a036
DL
8306 ac_cv_member_struct_ifreq_ifr_netmask=yes
8307else
8308 echo "$as_me: failed program was:" >&5
8309sed 's/^/| /' conftest.$ac_ext >&5
8310
ca81d7a0 8311 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8312fi
ca81d7a0
JD
8313
8314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8315fi
ca81d7a0
JD
8316
8317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8318fi
ca81d7a0
JD
8319{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8320echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8321if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8322
8323cat >>confdefs.h <<_ACEOF
8324#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8325_ACEOF
8326
8327
8328fi
ca81d7a0
JD
8329{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8330echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8331if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8332 echo $ECHO_N "(cached) $ECHO_C" >&6
8333else
8334 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8335/* confdefs.h. */
8336_ACEOF
8337cat confdefs.h >>conftest.$ac_ext
8338cat >>conftest.$ac_ext <<_ACEOF
8339/* end confdefs.h. */
7862d3a8
AS
8340$ac_includes_default
8341#if HAVE_SYS_SOCKET_H
8342#include <sys/socket.h>
8343#endif
8344#if HAVE_NET_IF_H
96f3a036 8345#include <net/if.h>
7862d3a8 8346#endif
96f3a036
DL
8347
8348int
8349main ()
8350{
8351static struct ifreq ac_aggr;
8352if (ac_aggr.ifr_broadaddr)
8353return 0;
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
ca81d7a0
JD
8359if { (ac_try="$ac_compile"
8360case "(($ac_try" in
8361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8362 *) ac_try_echo=$ac_try;;
8363esac
8364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8365 (eval "$ac_compile") 2>conftest.er1
96f3a036 8366 ac_status=$?
edfaf76d
LK
8367 grep -v '^ *+' conftest.er1 >conftest.err
8368 rm -f conftest.er1
8369 cat conftest.err >&5
96f3a036 8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8371 (exit $ac_status); } && {
8372 test -z "$ac_c_werror_flag" ||
8373 test ! -s conftest.err
8374 } && test -s conftest.$ac_objext; then
96f3a036
DL
8375 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8376else
8377 echo "$as_me: failed program was:" >&5
8378sed 's/^/| /' conftest.$ac_ext >&5
8379
ca81d7a0 8380 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8381/* confdefs.h. */
8382_ACEOF
8383cat confdefs.h >>conftest.$ac_ext
8384cat >>conftest.$ac_ext <<_ACEOF
8385/* end confdefs.h. */
7862d3a8
AS
8386$ac_includes_default
8387#if HAVE_SYS_SOCKET_H
8388#include <sys/socket.h>
8389#endif
8390#if HAVE_NET_IF_H
96f3a036 8391#include <net/if.h>
7862d3a8 8392#endif
96f3a036
DL
8393
8394int
8395main ()
8396{
8397static struct ifreq ac_aggr;
8398if (sizeof ac_aggr.ifr_broadaddr)
8399return 0;
8400 ;
8401 return 0;
8402}
8403_ACEOF
8404rm -f conftest.$ac_objext
ca81d7a0
JD
8405if { (ac_try="$ac_compile"
8406case "(($ac_try" in
8407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8408 *) ac_try_echo=$ac_try;;
8409esac
8410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8411 (eval "$ac_compile") 2>conftest.er1
96f3a036 8412 ac_status=$?
edfaf76d
LK
8413 grep -v '^ *+' conftest.er1 >conftest.err
8414 rm -f conftest.er1
8415 cat conftest.err >&5
96f3a036 8416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8417 (exit $ac_status); } && {
8418 test -z "$ac_c_werror_flag" ||
8419 test ! -s conftest.err
8420 } && test -s conftest.$ac_objext; then
96f3a036
DL
8421 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8422else
8423 echo "$as_me: failed program was:" >&5
8424sed 's/^/| /' conftest.$ac_ext >&5
8425
ca81d7a0 8426 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8427fi
ca81d7a0
JD
8428
8429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8430fi
ca81d7a0
JD
8431
8432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8433fi
ca81d7a0
JD
8434{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8435echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8436if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8437
8438cat >>confdefs.h <<_ACEOF
8439#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8440_ACEOF
8441
8442
8443fi
ca81d7a0
JD
8444{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8445echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8446if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
8448else
8449 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
7862d3a8
AS
8455$ac_includes_default
8456#if HAVE_SYS_SOCKET_H
8457#include <sys/socket.h>
8458#endif
8459#if HAVE_NET_IF_H
96f3a036 8460#include <net/if.h>
7862d3a8 8461#endif
96f3a036
DL
8462
8463int
8464main ()
8465{
8466static struct ifreq ac_aggr;
8467if (ac_aggr.ifr_addr)
8468return 0;
8469 ;
8470 return 0;
8471}
8472_ACEOF
8473rm -f conftest.$ac_objext
ca81d7a0
JD
8474if { (ac_try="$ac_compile"
8475case "(($ac_try" in
8476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8477 *) ac_try_echo=$ac_try;;
8478esac
8479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8480 (eval "$ac_compile") 2>conftest.er1
96f3a036 8481 ac_status=$?
edfaf76d
LK
8482 grep -v '^ *+' conftest.er1 >conftest.err
8483 rm -f conftest.er1
8484 cat conftest.err >&5
96f3a036 8485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8486 (exit $ac_status); } && {
8487 test -z "$ac_c_werror_flag" ||
8488 test ! -s conftest.err
8489 } && test -s conftest.$ac_objext; then
96f3a036
DL
8490 ac_cv_member_struct_ifreq_ifr_addr=yes
8491else
8492 echo "$as_me: failed program was:" >&5
8493sed 's/^/| /' conftest.$ac_ext >&5
8494
ca81d7a0 8495 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8496/* confdefs.h. */
8497_ACEOF
8498cat confdefs.h >>conftest.$ac_ext
8499cat >>conftest.$ac_ext <<_ACEOF
8500/* end confdefs.h. */
7862d3a8
AS
8501$ac_includes_default
8502#if HAVE_SYS_SOCKET_H
8503#include <sys/socket.h>
8504#endif
8505#if HAVE_NET_IF_H
96f3a036 8506#include <net/if.h>
7862d3a8 8507#endif
96f3a036
DL
8508
8509int
8510main ()
8511{
8512static struct ifreq ac_aggr;
8513if (sizeof ac_aggr.ifr_addr)
8514return 0;
8515 ;
8516 return 0;
8517}
8518_ACEOF
8519rm -f conftest.$ac_objext
ca81d7a0
JD
8520if { (ac_try="$ac_compile"
8521case "(($ac_try" in
8522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8523 *) ac_try_echo=$ac_try;;
8524esac
8525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8526 (eval "$ac_compile") 2>conftest.er1
96f3a036 8527 ac_status=$?
edfaf76d
LK
8528 grep -v '^ *+' conftest.er1 >conftest.err
8529 rm -f conftest.er1
8530 cat conftest.err >&5
96f3a036 8531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8532 (exit $ac_status); } && {
8533 test -z "$ac_c_werror_flag" ||
8534 test ! -s conftest.err
8535 } && test -s conftest.$ac_objext; then
96f3a036
DL
8536 ac_cv_member_struct_ifreq_ifr_addr=yes
8537else
8538 echo "$as_me: failed program was:" >&5
8539sed 's/^/| /' conftest.$ac_ext >&5
8540
ca81d7a0 8541 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8542fi
ca81d7a0
JD
8543
8544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8545fi
ca81d7a0
JD
8546
8547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8548fi
ca81d7a0
JD
8549{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8550echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8551if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8552
8553cat >>confdefs.h <<_ACEOF
8554#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8555_ACEOF
8556
8557
8558fi
8559
8799b3e4 8560
8799b3e4 8561
ca81d7a0
JD
8562{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8563echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8564if test "$ac_cv_prog_cc_c89" != no; then
8565 { echo "$as_me:$LINENO: result: yes" >&5
8566echo "${ECHO_T}yes" >&6; }
98418dba 8567
c0d27fcc 8568cat >>confdefs.h <<\_ACEOF
98418dba 8569#define PROTOTYPES 1
c0d27fcc
MR
8570_ACEOF
8571
8572
8573cat >>confdefs.h <<\_ACEOF
8574#define __PROTOTYPES 1
8575_ACEOF
98418dba
CW
8576
8577else
ca81d7a0
JD
8578 { echo "$as_me:$LINENO: result: no" >&5
8579echo "${ECHO_T}no" >&6; }
98418dba
CW
8580fi
8581
ca81d7a0
JD
8582{ echo "$as_me:$LINENO: checking for working volatile" >&5
8583echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8584if test "${ac_cv_c_volatile+set}" = set; then
8585 echo $ECHO_N "(cached) $ECHO_C" >&6
8586else
8587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8588/* confdefs.h. */
8589_ACEOF
8590cat confdefs.h >>conftest.$ac_ext
8591cat >>conftest.$ac_ext <<_ACEOF
8592/* end confdefs.h. */
98418dba 8593
98418dba
CW
8594int
8595main ()
8596{
8597
8598volatile int x;
ca81d7a0
JD
8599int * volatile y = (int *) 0;
8600return !x && !y;
98418dba
CW
8601 ;
8602 return 0;
8603}
8604_ACEOF
8605rm -f conftest.$ac_objext
ca81d7a0
JD
8606if { (ac_try="$ac_compile"
8607case "(($ac_try" in
8608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8609 *) ac_try_echo=$ac_try;;
8610esac
8611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8612 (eval "$ac_compile") 2>conftest.er1
98418dba 8613 ac_status=$?
edfaf76d
LK
8614 grep -v '^ *+' conftest.er1 >conftest.err
8615 rm -f conftest.er1
8616 cat conftest.err >&5
c0d27fcc 8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8618 (exit $ac_status); } && {
8619 test -z "$ac_c_werror_flag" ||
8620 test ! -s conftest.err
8621 } && test -s conftest.$ac_objext; then
98418dba
CW
8622 ac_cv_c_volatile=yes
8623else
8624 echo "$as_me: failed program was:" >&5
19650fd6
AS
8625sed 's/^/| /' conftest.$ac_ext >&5
8626
ca81d7a0 8627 ac_cv_c_volatile=no
98418dba 8628fi
ca81d7a0
JD
8629
8630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8631fi
ca81d7a0
JD
8632{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8633echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8634if test $ac_cv_c_volatile = no; then
8635
c0d27fcc 8636cat >>confdefs.h <<\_ACEOF
98418dba 8637#define volatile
c0d27fcc 8638_ACEOF
98418dba
CW
8639
8640fi
8641
ca81d7a0
JD
8642{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8643echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8644if test "${ac_cv_c_const+set}" = set; then
8645 echo $ECHO_N "(cached) $ECHO_C" >&6
8646else
8647 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
98418dba 8653
98418dba
CW
8654int
8655main ()
8656{
8657/* FIXME: Include the comments suggested by Paul. */
8658#ifndef __cplusplus
8659 /* Ultrix mips cc rejects this. */
8660 typedef int charset[2];
f053c89f 8661 const charset cs;
98418dba 8662 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8663 char const *const *pcpcc;
8664 char **ppc;
98418dba
CW
8665 /* NEC SVR4.0.2 mips cc rejects this. */
8666 struct point {int x, y;};
8667 static struct point const zero = {0,0};
8668 /* AIX XL C 1.02.0.0 rejects this.
8669 It does not let you subtract one const X* pointer from another in
8670 an arm of an if-expression whose if-part is not a constant
8671 expression */
8672 const char *g = "string";
f053c89f 8673 pcpcc = &g + (g ? g-g : 0);
98418dba 8674 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8675 ++pcpcc;
8676 ppc = (char**) pcpcc;
8677 pcpcc = (char const *const *) ppc;
98418dba
CW
8678 { /* SCO 3.2v4 cc rejects this. */
8679 char *t;
8680 char const *s = 0 ? (char *) 0 : (char const *) 0;
8681
8682 *t++ = 0;
ca81d7a0 8683 if (s) return 0;
98418dba
CW
8684 }
8685 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8686 int x[] = {25, 17};
8687 const int *foo = &x[0];
8688 ++foo;
8689 }
8690 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8691 typedef const int *iptr;
8692 iptr p = 0;
8693 ++p;
8694 }
8695 { /* AIX XL C 1.02.0.0 rejects this saying
8696 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8697 struct s { int j; const int *ap[3]; };
8698 struct s *b; b->j = 5;
8699 }
8700 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8701 const int foo = 10;
ca81d7a0 8702 if (!foo) return 0;
98418dba 8703 }
f053c89f 8704 return !cs[0] && !zero.x;
98418dba
CW
8705#endif
8706
8707 ;
8708 return 0;
8709}
8710_ACEOF
8711rm -f conftest.$ac_objext
ca81d7a0
JD
8712if { (ac_try="$ac_compile"
8713case "(($ac_try" in
8714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8715 *) ac_try_echo=$ac_try;;
8716esac
8717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8718 (eval "$ac_compile") 2>conftest.er1
98418dba 8719 ac_status=$?
edfaf76d
LK
8720 grep -v '^ *+' conftest.er1 >conftest.err
8721 rm -f conftest.er1
8722 cat conftest.err >&5
c0d27fcc 8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8724 (exit $ac_status); } && {
8725 test -z "$ac_c_werror_flag" ||
8726 test ! -s conftest.err
8727 } && test -s conftest.$ac_objext; then
98418dba
CW
8728 ac_cv_c_const=yes
8729else
8730 echo "$as_me: failed program was:" >&5
19650fd6
AS
8731sed 's/^/| /' conftest.$ac_ext >&5
8732
ca81d7a0 8733 ac_cv_c_const=no
98418dba 8734fi
ca81d7a0
JD
8735
8736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8737fi
ca81d7a0
JD
8738{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8739echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8740if test $ac_cv_c_const = no; then
8741
c0d27fcc 8742cat >>confdefs.h <<\_ACEOF
98418dba 8743#define const
c0d27fcc 8744_ACEOF
98418dba
CW
8745
8746fi
8747
ca81d7a0
JD
8748{ echo "$as_me:$LINENO: checking for void * support" >&5
8749echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8750if test "${emacs_cv_void_star+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
98418dba 8759
98418dba
CW
8760int
8761main ()
8762{
8763void * foo;
8764 ;
8765 return 0;
8766}
8767_ACEOF
8768rm -f conftest.$ac_objext
ca81d7a0
JD
8769if { (ac_try="$ac_compile"
8770case "(($ac_try" in
8771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8772 *) ac_try_echo=$ac_try;;
8773esac
8774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8775 (eval "$ac_compile") 2>conftest.er1
98418dba 8776 ac_status=$?
edfaf76d
LK
8777 grep -v '^ *+' conftest.er1 >conftest.err
8778 rm -f conftest.er1
8779 cat conftest.err >&5
c0d27fcc 8780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8781 (exit $ac_status); } && {
8782 test -z "$ac_c_werror_flag" ||
8783 test ! -s conftest.err
8784 } && test -s conftest.$ac_objext; then
98418dba
CW
8785 emacs_cv_void_star=yes
8786else
8787 echo "$as_me: failed program was:" >&5
19650fd6
AS
8788sed 's/^/| /' conftest.$ac_ext >&5
8789
ca81d7a0 8790 emacs_cv_void_star=no
98418dba 8791fi
ca81d7a0
JD
8792
8793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8794fi
ca81d7a0
JD
8795{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8796echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8797if test $emacs_cv_void_star = yes; then
c0d27fcc 8798 cat >>confdefs.h <<\_ACEOF
98418dba 8799#define POINTER_TYPE void
c0d27fcc 8800_ACEOF
98418dba
CW
8801
8802else
c0d27fcc 8803 cat >>confdefs.h <<\_ACEOF
98418dba 8804#define POINTER_TYPE char
c0d27fcc 8805_ACEOF
98418dba
CW
8806
8807fi
8808
c0d27fcc 8809
4494a266
JD
8810
8811
cd958eb3 8812
ca81d7a0
JD
8813{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8814echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8815set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8816if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8817 echo $ECHO_N "(cached) $ECHO_C" >&6
8818else
c0d27fcc 8819 cat >conftest.make <<\_ACEOF
ca81d7a0 8820SHELL = /bin/sh
98418dba 8821all:
ca81d7a0 8822 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8823_ACEOF
98418dba 8824# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8825case `${MAKE-make} -f conftest.make 2>/dev/null` in
8826 *@@@%%%=?*=@@@%%%*)
8827 eval ac_cv_prog_make_${ac_make}_set=yes;;
8828 *)
8829 eval ac_cv_prog_make_${ac_make}_set=no;;
8830esac
98418dba
CW
8831rm -f conftest.make
8832fi
ca81d7a0
JD
8833if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8834 { echo "$as_me:$LINENO: result: yes" >&5
8835echo "${ECHO_T}yes" >&6; }
98418dba
CW
8836 SET_MAKE=
8837else
ca81d7a0
JD
8838 { echo "$as_me:$LINENO: result: no" >&5
8839echo "${ECHO_T}no" >&6; }
98418dba
CW
8840 SET_MAKE="MAKE=${MAKE-make}"
8841fi
8842
c0d27fcc 8843
ca81d7a0
JD
8844{ echo "$as_me:$LINENO: checking for long file names" >&5
8845echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8846if test "${ac_cv_sys_long_file_names+set}" = set; then
8847 echo $ECHO_N "(cached) $ECHO_C" >&6
8848else
8849 ac_cv_sys_long_file_names=yes
8850# Test for long file names in all the places we know might matter:
8851# . the current directory, where building will happen
8852# $prefix/lib where we will be installing things
8853# $exec_prefix/lib likewise
98418dba 8854# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8855# /tmp where it might want to write temporary files
8856# /var/tmp likewise
8857# /usr/tmp likewise
ca81d7a0
JD
8858for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8859 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8860 # in the usual case where exec_prefix is '${prefix}'.
8861 case $ac_dir in #(
8862 . | /* | ?:[\\/]*) ;; #(
8863 *) continue;;
8864 esac
8865 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8866 ac_xdir=$ac_dir/cf$$
ca81d7a0 8867 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8868 ac_tf1=$ac_xdir/conftest9012345
8869 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8870 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8871 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8872 rm -f -r "$ac_xdir" 2>/dev/null
8873 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8874done
8875fi
ca81d7a0
JD
8876{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8877echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8878if test $ac_cv_sys_long_file_names = yes; then
8879
c0d27fcc 8880cat >>confdefs.h <<\_ACEOF
98418dba 8881#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8882_ACEOF
98418dba
CW
8883
8884fi
8885
c0d27fcc 8886
98418dba
CW
8887#### Choose a window system.
8888
ca81d7a0
JD
8889{ echo "$as_me:$LINENO: checking for X" >&5
8890echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8891
c0d27fcc 8892
ca81d7a0 8893# Check whether --with-x was given.
98418dba 8894if test "${with_x+set}" = set; then
ca81d7a0
JD
8895 withval=$with_x;
8896fi
98418dba 8897
98418dba
CW
8898# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8899if test "x$with_x" = xno; then
8900 # The user explicitly disabled X.
8901 have_x=disabled
8902else
ca81d7a0
JD
8903 case $x_includes,$x_libraries in #(
8904 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8905echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8906 { (exit 1); exit 1; }; };; #(
8907 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8908 echo $ECHO_N "(cached) $ECHO_C" >&6
8909else
8910 # One or both of the vars are not set, and there is no cached value.
8911ac_x_includes=no ac_x_libraries=no
ca81d7a0 8912rm -f -r conftest.dir
98418dba
CW
8913if mkdir conftest.dir; then
8914 cd conftest.dir
c0d27fcc 8915 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8916incroot:
8917 @echo incroot='${INCROOT}'
8918usrlibdir:
8919 @echo usrlibdir='${USRLIBDIR}'
8920libdir:
8921 @echo libdir='${LIBDIR}'
8922_ACEOF
8923 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8924 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8925 for ac_var in incroot usrlibdir libdir; do
8926 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8927 done
98418dba
CW
8928 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8929 for ac_extension in a so sl; do
ca81d7a0
JD
8930 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8931 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8932 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8933 fi
8934 done
8935 # Screen out bogus values from the imake configuration. They are
8936 # bogus both because they are the default anyway, and because
8937 # using them would break gcc on systems where it needs fixed includes.
8938 case $ac_im_incroot in
ca81d7a0 8939 /usr/include) ac_x_includes= ;;
98418dba
CW
8940 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8941 esac
8942 case $ac_im_usrlibdir in
8943 /usr/lib | /lib) ;;
8944 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8945 esac
8946 fi
8947 cd ..
ca81d7a0 8948 rm -f -r conftest.dir
98418dba
CW
8949fi
8950
8951# Standard set of common directories for X headers.
8952# Check X11 before X11Rn because it is often a symlink to the current release.
8953ac_x_header_dirs='
8954/usr/X11/include
8955/usr/X11R6/include
8956/usr/X11R5/include
8957/usr/X11R4/include
8958
8959/usr/include/X11
8960/usr/include/X11R6
8961/usr/include/X11R5
8962/usr/include/X11R4
8963
8964/usr/local/X11/include
8965/usr/local/X11R6/include
8966/usr/local/X11R5/include
8967/usr/local/X11R4/include
8968
8969/usr/local/include/X11
8970/usr/local/include/X11R6
8971/usr/local/include/X11R5
8972/usr/local/include/X11R4
8973
8974/usr/X386/include
8975/usr/x386/include
8976/usr/XFree86/include/X11
8977
8978/usr/include
8979/usr/local/include
8980/usr/unsupported/include
8981/usr/athena/include
8982/usr/local/x11r5/include
8983/usr/lpp/Xamples/include
8984
8985/usr/openwin/include
8986/usr/openwin/share/include'
8987
8988if test "$ac_x_includes" = no; then
ca81d7a0 8989 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8990 # First, try using that file with no special directory specified.
8991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8992/* confdefs.h. */
8993_ACEOF
8994cat confdefs.h >>conftest.$ac_ext
8995cat >>conftest.$ac_ext <<_ACEOF
8996/* end confdefs.h. */
ca81d7a0 8997#include <X11/Xlib.h>
98418dba 8998_ACEOF
ca81d7a0
JD
8999if { (ac_try="$ac_cpp conftest.$ac_ext"
9000case "(($ac_try" in
9001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9002 *) ac_try_echo=$ac_try;;
9003esac
9004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9005 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9006 ac_status=$?
6bae0ccf 9007 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9008 rm -f conftest.er1
9009 cat conftest.err >&5
c0d27fcc 9010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9011 (exit $ac_status); } >/dev/null && {
9012 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9013 test ! -s conftest.err
9014 }; then
98418dba
CW
9015 # We can compile using X headers with no special include directory.
9016ac_x_includes=
9017else
9018 echo "$as_me: failed program was:" >&5
19650fd6
AS
9019sed 's/^/| /' conftest.$ac_ext >&5
9020
98418dba 9021 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9022 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9023 ac_x_includes=$ac_dir
9024 break
9025 fi
9026done
9027fi
ca81d7a0 9028
98418dba
CW
9029rm -f conftest.err conftest.$ac_ext
9030fi # $ac_x_includes = no
9031
9032if test "$ac_x_libraries" = no; then
9033 # Check for the libraries.
9034 # See if we find them without any special options.
9035 # Don't add to $LIBS permanently.
9036 ac_save_LIBS=$LIBS
f053c89f 9037 LIBS="-lX11 $LIBS"
98418dba 9038 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9039/* confdefs.h. */
9040_ACEOF
9041cat confdefs.h >>conftest.$ac_ext
9042cat >>conftest.$ac_ext <<_ACEOF
9043/* end confdefs.h. */
ca81d7a0 9044#include <X11/Xlib.h>
98418dba
CW
9045int
9046main ()
9047{
ca81d7a0 9048XrmInitialize ()
98418dba
CW
9049 ;
9050 return 0;
9051}
9052_ACEOF
9053rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9054if { (ac_try="$ac_link"
9055case "(($ac_try" in
9056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9057 *) ac_try_echo=$ac_try;;
9058esac
9059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9060 (eval "$ac_link") 2>conftest.er1
98418dba 9061 ac_status=$?
edfaf76d
LK
9062 grep -v '^ *+' conftest.er1 >conftest.err
9063 rm -f conftest.er1
9064 cat conftest.err >&5
c0d27fcc 9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9066 (exit $ac_status); } && {
9067 test -z "$ac_c_werror_flag" ||
9068 test ! -s conftest.err
9069 } && test -s conftest$ac_exeext &&
9070 $as_test_x conftest$ac_exeext; then
98418dba
CW
9071 LIBS=$ac_save_LIBS
9072# We can link X programs with no special library path.
9073ac_x_libraries=
9074else
9075 echo "$as_me: failed program was:" >&5
19650fd6
AS
9076sed 's/^/| /' conftest.$ac_ext >&5
9077
ca81d7a0 9078 LIBS=$ac_save_LIBS
98418dba
CW
9079for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9080do
9081 # Don't even attempt the hair of trying to link an X program!
9082 for ac_extension in a so sl; do
f053c89f 9083 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9084 ac_x_libraries=$ac_dir
9085 break 2
9086 fi
9087 done
9088done
9089fi
ca81d7a0 9090
f053c89f 9091rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9092 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9093fi # $ac_x_libraries = no
9094
ca81d7a0
JD
9095case $ac_x_includes,$ac_x_libraries in #(
9096 no,* | *,no | *\'*)
9097 # Didn't find X, or a directory has "'" in its name.
9098 ac_cv_have_x="have_x=no";; #(
9099 *)
9100 # Record where we found X for the cache.
9101 ac_cv_have_x="have_x=yes\
9102 ac_x_includes='$ac_x_includes'\
9103 ac_x_libraries='$ac_x_libraries'"
9104esac
98418dba 9105fi
ca81d7a0
JD
9106;; #(
9107 *) have_x=yes;;
9108 esac
98418dba
CW
9109 eval "$ac_cv_have_x"
9110fi # $with_x != no
9111
9112if test "$have_x" != yes; then
ca81d7a0
JD
9113 { echo "$as_me:$LINENO: result: $have_x" >&5
9114echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9115 no_x=yes
9116else
9117 # If each of the values was on the command line, it overrides each guess.
9118 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9119 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9120 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9121 ac_cv_have_x="have_x=yes\
9122 ac_x_includes='$x_includes'\
9123 ac_x_libraries='$x_libraries'"
9124 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9125echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9126fi
9127
9128if test "$no_x" = yes; then
9129 window_system=none
9130else
9131 window_system=x11
9132fi
9133
a8cd2496
GM
9134## Workaround for bug in autoconf <= 2.62.
9135## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9136## No need to do anything special for these standard directories.
921fbdf0 9137## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9138if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9139
9140 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9141
9142fi
9143
92d1ccf4
AS
9144if test "${x_libraries}" != NONE; then
9145 if test -n "${x_libraries}"; then
9146 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9147 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9148 fi
98418dba 9149 x_default_search_path=""
92d1ccf4
AS
9150 x_search_path=${x_libraries}
9151 if test -z "${x_search_path}"; then
9152 x_search_path=/usr/lib
9153 fi
9154 for x_library in `echo ${x_search_path}: | \
9155 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9156 x_search_path="\
9157${x_library}/X11/%L/%T/%N%C%S:\
9158${x_library}/X11/%l/%T/%N%C%S:\
9159${x_library}/X11/%T/%N%C%S:\
9160${x_library}/X11/%L/%T/%N%S:\
9161${x_library}/X11/%l/%T/%N%S:\
9162${x_library}/X11/%T/%N%S"
9163 if test x"${x_default_search_path}" = x; then
9164 x_default_search_path=${x_search_path}
9165 else
9166 x_default_search_path="${x_search_path}:${x_default_search_path}"
9167 fi
9168 done
9169fi
9170if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9171 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9172fi
9173
9174if test x"${x_includes}" = x; then
9175 bitmapdir=/usr/include/X11/bitmaps
9176else
9177 # accumulate include directories that have X11 bitmap subdirectories
9178 bmd_acc="dummyval"
9179 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9180 if test -d "${bmd}/X11/bitmaps"; then
9181 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9182 fi
9183 if test -d "${bmd}/bitmaps"; then
9184 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9185 fi
9186 done
9187 if test ${bmd_acc} != "dummyval"; then
9188 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9189 fi
9190fi
9191
5d6da11e 9192HAVE_CARBON=no
1d4d5604
YM
9193if test "${with_carbon}" != no; then
9194 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9195 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9196echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9197if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9198 echo $ECHO_N "(cached) $ECHO_C" >&6
9199fi
ca81d7a0
JD
9200{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9201echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9202else
9203 # Is the header compilable?
ca81d7a0
JD
9204{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9205echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9206cat >conftest.$ac_ext <<_ACEOF
9207/* confdefs.h. */
9208_ACEOF
9209cat confdefs.h >>conftest.$ac_ext
9210cat >>conftest.$ac_ext <<_ACEOF
9211/* end confdefs.h. */
9212$ac_includes_default
9213#include <Carbon/Carbon.h>
9214_ACEOF
9215rm -f conftest.$ac_objext
ca81d7a0
JD
9216if { (ac_try="$ac_compile"
9217case "(($ac_try" in
9218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9219 *) ac_try_echo=$ac_try;;
9220esac
9221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9222 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9223 ac_status=$?
edfaf76d
LK
9224 grep -v '^ *+' conftest.er1 >conftest.err
9225 rm -f conftest.er1
9226 cat conftest.err >&5
5d6da11e 9227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9228 (exit $ac_status); } && {
9229 test -z "$ac_c_werror_flag" ||
9230 test ! -s conftest.err
9231 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9232 ac_header_compiler=yes
9233else
9234 echo "$as_me: failed program was:" >&5
9235sed 's/^/| /' conftest.$ac_ext >&5
9236
ca81d7a0 9237 ac_header_compiler=no
5d6da11e 9238fi
ca81d7a0
JD
9239
9240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9241{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9242echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9243
9244# Is the header present?
ca81d7a0
JD
9245{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9246echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9247cat >conftest.$ac_ext <<_ACEOF
9248/* confdefs.h. */
9249_ACEOF
9250cat confdefs.h >>conftest.$ac_ext
9251cat >>conftest.$ac_ext <<_ACEOF
9252/* end confdefs.h. */
9253#include <Carbon/Carbon.h>
9254_ACEOF
ca81d7a0
JD
9255if { (ac_try="$ac_cpp conftest.$ac_ext"
9256case "(($ac_try" in
9257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9258 *) ac_try_echo=$ac_try;;
9259esac
9260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9261 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9262 ac_status=$?
9263 grep -v '^ *+' conftest.er1 >conftest.err
9264 rm -f conftest.er1
9265 cat conftest.err >&5
9266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9267 (exit $ac_status); } >/dev/null && {
9268 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9269 test ! -s conftest.err
9270 }; then
5d6da11e
YM
9271 ac_header_preproc=yes
9272else
9273 echo "$as_me: failed program was:" >&5
9274sed 's/^/| /' conftest.$ac_ext >&5
9275
9276 ac_header_preproc=no
9277fi
ca81d7a0 9278
5d6da11e 9279rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9280{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9281echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9282
9283# So? What about this header?
edfaf76d
LK
9284case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9285 yes:no: )
5d6da11e
YM
9286 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9287echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9288 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9289echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9290 ac_header_preproc=yes
5d6da11e 9291 ;;
edfaf76d 9292 no:yes:* )
5d6da11e
YM
9293 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9294echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9295 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9296echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9297 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9298echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9299 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9300echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9301 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9302echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9303 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9304echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9305
5d6da11e
YM
9306 ;;
9307esac
ca81d7a0
JD
9308{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9309echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9310if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9311 echo $ECHO_N "(cached) $ECHO_C" >&6
9312else
9313 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9314fi
ca81d7a0
JD
9315{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9316echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9317
9318fi
9319if test $ac_cv_header_Carbon_Carbon_h = yes; then
9320 HAVE_CARBON=yes
9321fi
9322
9323
ff1095d1 9324 test "${HAVE_CARBON}" = yes && window_system=mac
1d4d5604
YM
9325fi
9326
edfda783 9327HAVE_NS=no
ff1095d1
AR
9328NS_IMPL_COCOA=no
9329NS_IMPL_GNUSTEP=no
edfda783
AR
9330tmp_CPPFLAGS="$CPPFLAGS"
9331tmp_CFLAGS="$CFLAGS"
9332CPPFLAGS="$CPPFLAGS -x objective-c"
9333CFLAGS="$CFLAGS -x objective-c"
9334if test "${with_ns}" != no; then
9335 if test "${opsys}" = darwin; then
ff1095d1 9336 NS_IMPL_COCOA=yes
edfda783 9337 elif test -f /etc/GNUstep/GNUstep.conf; then
ff1095d1 9338 NS_IMPL_GNUSTEP=yes
edfda783
AR
9339 GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
9340 GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
facfbbbd 9341 GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
edfda783
AR
9342 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9343 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9344 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9345 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9346 fi
9347 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9348 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9349echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9350if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9351 echo $ECHO_N "(cached) $ECHO_C" >&6
9352fi
9353{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9354echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9355else
9356 # Is the header compilable?
9357{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9358echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
9359cat >conftest.$ac_ext <<_ACEOF
9360/* confdefs.h. */
9361_ACEOF
9362cat confdefs.h >>conftest.$ac_ext
9363cat >>conftest.$ac_ext <<_ACEOF
9364/* end confdefs.h. */
9365$ac_includes_default
9366#include <AppKit/AppKit.h>
9367_ACEOF
9368rm -f conftest.$ac_objext
9369if { (ac_try="$ac_compile"
9370case "(($ac_try" in
9371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9372 *) ac_try_echo=$ac_try;;
9373esac
9374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9375 (eval "$ac_compile") 2>conftest.er1
9376 ac_status=$?
9377 grep -v '^ *+' conftest.er1 >conftest.err
9378 rm -f conftest.er1
9379 cat conftest.err >&5
9380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9381 (exit $ac_status); } && {
9382 test -z "$ac_c_werror_flag" ||
9383 test ! -s conftest.err
9384 } && test -s conftest.$ac_objext; then
9385 ac_header_compiler=yes
9386else
9387 echo "$as_me: failed program was:" >&5
9388sed 's/^/| /' conftest.$ac_ext >&5
9389
9390 ac_header_compiler=no
9391fi
9392
9393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9394{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9395echo "${ECHO_T}$ac_header_compiler" >&6; }
9396
9397# Is the header present?
9398{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9399echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9400cat >conftest.$ac_ext <<_ACEOF
9401/* confdefs.h. */
9402_ACEOF
9403cat confdefs.h >>conftest.$ac_ext
9404cat >>conftest.$ac_ext <<_ACEOF
9405/* end confdefs.h. */
9406#include <AppKit/AppKit.h>
9407_ACEOF
9408if { (ac_try="$ac_cpp conftest.$ac_ext"
9409case "(($ac_try" in
9410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9411 *) ac_try_echo=$ac_try;;
9412esac
9413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9414 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9415 ac_status=$?
9416 grep -v '^ *+' conftest.er1 >conftest.err
9417 rm -f conftest.er1
9418 cat conftest.err >&5
9419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9420 (exit $ac_status); } >/dev/null && {
9421 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9422 test ! -s conftest.err
9423 }; then
9424 ac_header_preproc=yes
9425else
9426 echo "$as_me: failed program was:" >&5
9427sed 's/^/| /' conftest.$ac_ext >&5
9428
9429 ac_header_preproc=no
9430fi
9431
9432rm -f conftest.err conftest.$ac_ext
9433{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9434echo "${ECHO_T}$ac_header_preproc" >&6; }
9435
9436# So? What about this header?
9437case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9438 yes:no: )
9439 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9440echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9441 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9442echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9443 ac_header_preproc=yes
9444 ;;
9445 no:yes:* )
9446 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9447echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9448 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9449echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9450 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9451echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9452 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9453echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9454 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9455echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9456 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9457echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9458
9459 ;;
9460esac
9461{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9462echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9463if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9464 echo $ECHO_N "(cached) $ECHO_C" >&6
9465else
9466 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9467fi
9468{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9469echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9470
9471fi
9472if test $ac_cv_header_AppKit_AppKit_h = yes; then
9473 HAVE_NS=yes
9474fi
9475
9476
edfda783
AR
9477fi
9478if test "${HAVE_NS}" = yes; then
ff1095d1 9479 test "${window_system}" = mac && HAVE_CARBON=no
edfda783
AR
9480 window_system=nextstep
9481 with_xft=no
9482 with_freetype=no
9483fi
9484CFLAGS="$tmp_CFLAGS"
9485CPPFLAGS="$tmp_CPPFLAGS"
9486
1d4d5604
YM
9487case "${window_system}" in
9488 x11 )
9489 HAVE_X_WINDOWS=yes
9490 HAVE_X11=yes
9491 case "${with_x_toolkit}" in
9492 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9493 motif ) USE_X_TOOLKIT=MOTIF ;;
9494 gtk ) with_gtk=yes
9495 USE_X_TOOLKIT=none ;;
9496 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9497 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9498 esac
9499 ;;
edfda783 9500 nextstep | mac | none )
1d4d5604
YM
9501 HAVE_X_WINDOWS=no
9502 HAVE_X11=no
9503 USE_X_TOOLKIT=none
9504 ;;
9505esac
9506
cfe440b8
JD
9507if test "$window_system" = none && test "X$with_x" != "Xno"; then
9508 # Extract the first word of "X", so it can be a program name with args.
9509set dummy X; ac_word=$2
9510{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9512if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9513 echo $ECHO_N "(cached) $ECHO_C" >&6
9514else
9515 if test -n "$HAVE_XSERVER"; then
9516 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9517else
9518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521 IFS=$as_save_IFS
9522 test -z "$as_dir" && as_dir=.
9523 for ac_exec_ext in '' $ac_executable_extensions; do
9524 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9525 ac_cv_prog_HAVE_XSERVER="true"
9526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9527 break 2
9528 fi
9529done
9530done
9531IFS=$as_save_IFS
9532
9533 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9534fi
9535fi
9536HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9537if test -n "$HAVE_XSERVER"; then
9538 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9539echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9540else
9541 { echo "$as_me:$LINENO: result: no" >&5
9542echo "${ECHO_T}no" >&6; }
9543fi
9544
9545
9546 if test "$HAVE_XSERVER" = true ||
9547 test -n "$DISPLAY" ||
9548 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9549 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9550were found. You should install the relevant development files for X
9551and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9552sure you have development files for image handling, i.e.
9553tiff, gif, jpeg, png and xpm.
9554If you are sure you want Emacs compiled without X window support, pass
9555 --without-x
9556to configure." >&5
9557echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9558were found. You should install the relevant development files for X
9559and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9560sure you have development files for image handling, i.e.
9561tiff, gif, jpeg, png and xpm.
9562If you are sure you want Emacs compiled without X window support, pass
9563 --without-x
9564to configure." >&2;}
9565 { (exit 1); exit 1; }; }
9566 fi
9567fi
9568
1d4d5604
YM
9569### If we're using X11, we should use the X menu package.
9570HAVE_MENUS=no
9571case ${HAVE_X11} in
9572 yes ) HAVE_MENUS=yes ;;
9573esac
9574
98418dba
CW
9575# Do the opsystem or machine files prohibit the use of the GNU malloc?
9576# Assume not, until told otherwise.
9577GNU_MALLOC=yes
9578doug_lea_malloc=yes
ca81d7a0
JD
9579{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9580echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9581if test "${ac_cv_func_malloc_get_state+set}" = set; then
9582 echo $ECHO_N "(cached) $ECHO_C" >&6
9583else
9584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9585/* confdefs.h. */
9586_ACEOF
9587cat confdefs.h >>conftest.$ac_ext
9588cat >>conftest.$ac_ext <<_ACEOF
9589/* end confdefs.h. */
edfaf76d
LK
9590/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9591 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9592#define malloc_get_state innocuous_malloc_get_state
9593
98418dba 9594/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9595 which can conflict with char malloc_get_state (); below.
9596 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9597 <limits.h> exists even on freestanding compilers. */
edfaf76d 9598
19650fd6
AS
9599#ifdef __STDC__
9600# include <limits.h>
9601#else
9602# include <assert.h>
9603#endif
edfaf76d
LK
9604
9605#undef malloc_get_state
9606
ca81d7a0
JD
9607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
98418dba
CW
9610#ifdef __cplusplus
9611extern "C"
9612#endif
98418dba 9613char malloc_get_state ();
98418dba
CW
9614/* The GNU C library defines this for functions which it implements
9615 to always fail with ENOSYS. Some functions are actually named
9616 something starting with __ and the normal name is an alias. */
ca81d7a0 9617#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9618choke me
98418dba
CW
9619#endif
9620
19650fd6
AS
9621int
9622main ()
9623{
ca81d7a0 9624return malloc_get_state ();
98418dba
CW
9625 ;
9626 return 0;
9627}
9628_ACEOF
9629rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9630if { (ac_try="$ac_link"
9631case "(($ac_try" in
9632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9633 *) ac_try_echo=$ac_try;;
9634esac
9635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9636 (eval "$ac_link") 2>conftest.er1
98418dba 9637 ac_status=$?
edfaf76d
LK
9638 grep -v '^ *+' conftest.er1 >conftest.err
9639 rm -f conftest.er1
9640 cat conftest.err >&5
c0d27fcc 9641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9642 (exit $ac_status); } && {
9643 test -z "$ac_c_werror_flag" ||
9644 test ! -s conftest.err
9645 } && test -s conftest$ac_exeext &&
9646 $as_test_x conftest$ac_exeext; then
98418dba
CW
9647 ac_cv_func_malloc_get_state=yes
9648else
9649 echo "$as_me: failed program was:" >&5
19650fd6
AS
9650sed 's/^/| /' conftest.$ac_ext >&5
9651
ca81d7a0 9652 ac_cv_func_malloc_get_state=no
98418dba 9653fi
ca81d7a0 9654
f053c89f 9655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9656 conftest$ac_exeext conftest.$ac_ext
98418dba 9657fi
ca81d7a0
JD
9658{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9659echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9660if test $ac_cv_func_malloc_get_state = yes; then
9661 :
9662else
9663 doug_lea_malloc=no
9664fi
9665
ca81d7a0
JD
9666{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9667echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9668if test "${ac_cv_func_malloc_set_state+set}" = set; then
9669 echo $ECHO_N "(cached) $ECHO_C" >&6
9670else
9671 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
edfaf76d
LK
9677/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9678 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9679#define malloc_set_state innocuous_malloc_set_state
9680
98418dba 9681/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9682 which can conflict with char malloc_set_state (); below.
9683 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9684 <limits.h> exists even on freestanding compilers. */
edfaf76d 9685
19650fd6
AS
9686#ifdef __STDC__
9687# include <limits.h>
9688#else
9689# include <assert.h>
9690#endif
edfaf76d
LK
9691
9692#undef malloc_set_state
9693
ca81d7a0
JD
9694/* Override any GCC internal prototype to avoid an error.
9695 Use char because int might match the return type of a GCC
9696 builtin and then its argument prototype would still apply. */
98418dba
CW
9697#ifdef __cplusplus
9698extern "C"
9699#endif
98418dba 9700char malloc_set_state ();
98418dba
CW
9701/* The GNU C library defines this for functions which it implements
9702 to always fail with ENOSYS. Some functions are actually named
9703 something starting with __ and the normal name is an alias. */
ca81d7a0 9704#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9705choke me
98418dba
CW
9706#endif
9707
19650fd6
AS
9708int
9709main ()
9710{
ca81d7a0 9711return malloc_set_state ();
98418dba
CW
9712 ;
9713 return 0;
9714}
9715_ACEOF
9716rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9717if { (ac_try="$ac_link"
9718case "(($ac_try" in
9719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9720 *) ac_try_echo=$ac_try;;
9721esac
9722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9723 (eval "$ac_link") 2>conftest.er1
98418dba 9724 ac_status=$?
edfaf76d
LK
9725 grep -v '^ *+' conftest.er1 >conftest.err
9726 rm -f conftest.er1
9727 cat conftest.err >&5
c0d27fcc 9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9729 (exit $ac_status); } && {
9730 test -z "$ac_c_werror_flag" ||
9731 test ! -s conftest.err
9732 } && test -s conftest$ac_exeext &&
9733 $as_test_x conftest$ac_exeext; then
98418dba
CW
9734 ac_cv_func_malloc_set_state=yes
9735else
9736 echo "$as_me: failed program was:" >&5
19650fd6
AS
9737sed 's/^/| /' conftest.$ac_ext >&5
9738
ca81d7a0 9739 ac_cv_func_malloc_set_state=no
98418dba 9740fi
ca81d7a0 9741
f053c89f 9742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9743 conftest$ac_exeext conftest.$ac_ext
98418dba 9744fi
ca81d7a0
JD
9745{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9746echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9747if test $ac_cv_func_malloc_set_state = yes; then
9748 :
9749else
9750 doug_lea_malloc=no
9751fi
9752
ca81d7a0
JD
9753{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9754echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9755if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9756 echo $ECHO_N "(cached) $ECHO_C" >&6
9757else
9758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9759/* confdefs.h. */
9760_ACEOF
9761cat confdefs.h >>conftest.$ac_ext
9762cat >>conftest.$ac_ext <<_ACEOF
9763/* end confdefs.h. */
98418dba 9764extern void (* __after_morecore_hook)();
98418dba
CW
9765int
9766main ()
9767{
9768__after_morecore_hook = 0
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9774if { (ac_try="$ac_link"
9775case "(($ac_try" in
9776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9777 *) ac_try_echo=$ac_try;;
9778esac
9779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9780 (eval "$ac_link") 2>conftest.er1
98418dba 9781 ac_status=$?
edfaf76d
LK
9782 grep -v '^ *+' conftest.er1 >conftest.err
9783 rm -f conftest.er1
9784 cat conftest.err >&5
c0d27fcc 9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9786 (exit $ac_status); } && {
9787 test -z "$ac_c_werror_flag" ||
9788 test ! -s conftest.err
9789 } && test -s conftest$ac_exeext &&
9790 $as_test_x conftest$ac_exeext; then
98418dba
CW
9791 emacs_cv_var___after_morecore_hook=yes
9792else
9793 echo "$as_me: failed program was:" >&5
19650fd6
AS
9794sed 's/^/| /' conftest.$ac_ext >&5
9795
ca81d7a0 9796 emacs_cv_var___after_morecore_hook=no
98418dba 9797fi
ca81d7a0 9798
f053c89f 9799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9800 conftest$ac_exeext conftest.$ac_ext
98418dba 9801fi
ca81d7a0
JD
9802{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9803echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9804if test $emacs_cv_var___after_morecore_hook = no; then
9805 doug_lea_malloc=no
9806fi
9807if test "${system_malloc}" = "yes"; then
9808 GNU_MALLOC=no
9809 GNU_MALLOC_reason="
9810 (The GNU allocators don't work with this system configuration.)"
9811fi
9812if test "$doug_lea_malloc" = "yes" ; then
9813 if test "$GNU_MALLOC" = yes ; then
9814 GNU_MALLOC_reason="
9815 (Using Doug Lea's new malloc from the GNU C Library.)"
9816 fi
b936fae4 9817
c0d27fcc 9818cat >>confdefs.h <<\_ACEOF
98418dba 9819#define DOUG_LEA_MALLOC 1
c0d27fcc 9820_ACEOF
98418dba
CW
9821
9822fi
9823
9824if test x"${REL_ALLOC}" = x; then
9825 REL_ALLOC=${GNU_MALLOC}
9826fi
9827
9828
c0d27fcc
MR
9829
9830
9831for ac_header in stdlib.h unistd.h
98418dba
CW
9832do
9833as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9834if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9835 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9837if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9838 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9839fi
ca81d7a0
JD
9840ac_res=`eval echo '${'$as_ac_Header'}'`
9841 { echo "$as_me:$LINENO: result: $ac_res" >&5
9842echo "${ECHO_T}$ac_res" >&6; }
98418dba 9843else
c0d27fcc 9844 # Is the header compilable?
ca81d7a0
JD
9845{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9846echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9847cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9848/* confdefs.h. */
9849_ACEOF
9850cat confdefs.h >>conftest.$ac_ext
9851cat >>conftest.$ac_ext <<_ACEOF
9852/* end confdefs.h. */
98418dba
CW
9853$ac_includes_default
9854#include <$ac_header>
9855_ACEOF
9856rm -f conftest.$ac_objext
ca81d7a0
JD
9857if { (ac_try="$ac_compile"
9858case "(($ac_try" in
9859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9860 *) ac_try_echo=$ac_try;;
9861esac
9862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9863 (eval "$ac_compile") 2>conftest.er1
98418dba 9864 ac_status=$?
edfaf76d
LK
9865 grep -v '^ *+' conftest.er1 >conftest.err
9866 rm -f conftest.er1
9867 cat conftest.err >&5
c0d27fcc 9868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9869 (exit $ac_status); } && {
9870 test -z "$ac_c_werror_flag" ||
9871 test ! -s conftest.err
9872 } && test -s conftest.$ac_objext; then
c0d27fcc 9873 ac_header_compiler=yes
98418dba
CW
9874else
9875 echo "$as_me: failed program was:" >&5
19650fd6
AS
9876sed 's/^/| /' conftest.$ac_ext >&5
9877
ca81d7a0 9878 ac_header_compiler=no
98418dba 9879fi
ca81d7a0
JD
9880
9881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9882{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9883echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9884
c0d27fcc 9885# Is the header present?
ca81d7a0
JD
9886{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9887echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9888cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
98418dba
CW
9894#include <$ac_header>
9895_ACEOF
ca81d7a0
JD
9896if { (ac_try="$ac_cpp conftest.$ac_ext"
9897case "(($ac_try" in
9898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9899 *) ac_try_echo=$ac_try;;
9900esac
9901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9902 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9903 ac_status=$?
6bae0ccf 9904 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9905 rm -f conftest.er1
9906 cat conftest.err >&5
c0d27fcc 9907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9908 (exit $ac_status); } >/dev/null && {
9909 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9910 test ! -s conftest.err
9911 }; then
c0d27fcc 9912 ac_header_preproc=yes
98418dba
CW
9913else
9914 echo "$as_me: failed program was:" >&5
19650fd6
AS
9915sed 's/^/| /' conftest.$ac_ext >&5
9916
c0d27fcc 9917 ac_header_preproc=no
98418dba 9918fi
ca81d7a0 9919
98418dba 9920rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9921{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9922echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9923
9924# So? What about this header?
edfaf76d
LK
9925case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9926 yes:no: )
c0d27fcc
MR
9927 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9928echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9929 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9930echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9931 ac_header_preproc=yes
9932 ;;
9933 no:yes:* )
9934 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9935echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9936 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9937echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9938 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9939echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9940 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9941echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9942 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9943echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9944 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9945echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9946
19650fd6 9947 ;;
c0d27fcc 9948esac
ca81d7a0
JD
9949{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9950echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9951if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9952 echo $ECHO_N "(cached) $ECHO_C" >&6
9953else
edfaf76d 9954 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9955fi
ca81d7a0
JD
9956ac_res=`eval echo '${'$as_ac_Header'}'`
9957 { echo "$as_me:$LINENO: result: $ac_res" >&5
9958echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9959
9960fi
98418dba 9961if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9962 cat >>confdefs.h <<_ACEOF
98418dba 9963#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9964_ACEOF
98418dba
CW
9965
9966fi
c0d27fcc 9967
98418dba
CW
9968done
9969
c0d27fcc 9970
98418dba
CW
9971for ac_func in getpagesize
9972do
9973as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9974{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9975echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9976if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9977 echo $ECHO_N "(cached) $ECHO_C" >&6
9978else
9979 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9980/* confdefs.h. */
9981_ACEOF
9982cat confdefs.h >>conftest.$ac_ext
9983cat >>conftest.$ac_ext <<_ACEOF
9984/* end confdefs.h. */
edfaf76d
LK
9985/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9986 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9987#define $ac_func innocuous_$ac_func
9988
98418dba 9989/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9990 which can conflict with char $ac_func (); below.
9991 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9992 <limits.h> exists even on freestanding compilers. */
edfaf76d 9993
19650fd6
AS
9994#ifdef __STDC__
9995# include <limits.h>
9996#else
9997# include <assert.h>
9998#endif
edfaf76d
LK
9999
10000#undef $ac_func
10001
ca81d7a0
JD
10002/* Override any GCC internal prototype to avoid an error.
10003 Use char because int might match the return type of a GCC
10004 builtin and then its argument prototype would still apply. */
98418dba
CW
10005#ifdef __cplusplus
10006extern "C"
10007#endif
98418dba 10008char $ac_func ();
98418dba
CW
10009/* The GNU C library defines this for functions which it implements
10010 to always fail with ENOSYS. Some functions are actually named
10011 something starting with __ and the normal name is an alias. */
ca81d7a0 10012#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10013choke me
98418dba
CW
10014#endif
10015
19650fd6
AS
10016int
10017main ()
10018{
ca81d7a0 10019return $ac_func ();
98418dba
CW
10020 ;
10021 return 0;
10022}
10023_ACEOF
10024rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10025if { (ac_try="$ac_link"
10026case "(($ac_try" in
10027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10028 *) ac_try_echo=$ac_try;;
10029esac
10030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10031 (eval "$ac_link") 2>conftest.er1
98418dba 10032 ac_status=$?
edfaf76d
LK
10033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
c0d27fcc 10036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10037 (exit $ac_status); } && {
10038 test -z "$ac_c_werror_flag" ||
10039 test ! -s conftest.err
10040 } && test -s conftest$ac_exeext &&
10041 $as_test_x conftest$ac_exeext; then
98418dba
CW
10042 eval "$as_ac_var=yes"
10043else
10044 echo "$as_me: failed program was:" >&5
19650fd6
AS
10045sed 's/^/| /' conftest.$ac_ext >&5
10046
ca81d7a0 10047 eval "$as_ac_var=no"
98418dba 10048fi
ca81d7a0 10049
f053c89f 10050rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10051 conftest$ac_exeext conftest.$ac_ext
98418dba 10052fi
ca81d7a0
JD
10053ac_res=`eval echo '${'$as_ac_var'}'`
10054 { echo "$as_me:$LINENO: result: $ac_res" >&5
10055echo "${ECHO_T}$ac_res" >&6; }
98418dba 10056if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10057 cat >>confdefs.h <<_ACEOF
98418dba 10058#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10059_ACEOF
98418dba
CW
10060
10061fi
10062done
10063
ca81d7a0
JD
10064{ echo "$as_me:$LINENO: checking for working mmap" >&5
10065echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10066if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10067 echo $ECHO_N "(cached) $ECHO_C" >&6
10068else
10069 if test "$cross_compiling" = yes; then
10070 ac_cv_func_mmap_fixed_mapped=no
10071else
10072 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10073/* confdefs.h. */
10074_ACEOF
10075cat confdefs.h >>conftest.$ac_ext
10076cat >>conftest.$ac_ext <<_ACEOF
10077/* end confdefs.h. */
98418dba 10078$ac_includes_default
c0d27fcc
MR
10079/* malloc might have been renamed as rpl_malloc. */
10080#undef malloc
10081
98418dba
CW
10082/* Thanks to Mike Haertel and Jim Avera for this test.
10083 Here is a matrix of mmap possibilities:
10084 mmap private not fixed
10085 mmap private fixed at somewhere currently unmapped
10086 mmap private fixed at somewhere already mapped
10087 mmap shared not fixed
10088 mmap shared fixed at somewhere currently unmapped
10089 mmap shared fixed at somewhere already mapped
10090 For private mappings, we should verify that changes cannot be read()
10091 back from the file, nor mmap's back from the file at a different
10092 address. (There have been systems where private was not correctly
10093 implemented like the infamous i386 svr4.0, and systems where the
10094 VM page cache was not coherent with the file system buffer cache
10095 like early versions of FreeBSD and possibly contemporary NetBSD.)
10096 For shared mappings, we should conversely verify that changes get
c0d27fcc 10097 propagated back to all the places they're supposed to be.
98418dba
CW
10098
10099 Grep wants private fixed already mapped.
10100 The main things grep needs to know about mmap are:
10101 * does it exist and is it safe to write into the mmap'd area
10102 * how to use it (BSD variants) */
10103
10104#include <fcntl.h>
10105#include <sys/mman.h>
10106
f053c89f 10107#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10108char *malloc ();
10109#endif
10110
10111/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10112#ifndef HAVE_GETPAGESIZE
98418dba 10113/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10114# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10115# define HAVE_SYS_PARAM_H 1
10116# endif
10117
10118# ifdef _SC_PAGESIZE
10119# define getpagesize() sysconf(_SC_PAGESIZE)
10120# else /* no _SC_PAGESIZE */
f053c89f 10121# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10122# include <sys/param.h>
10123# ifdef EXEC_PAGESIZE
10124# define getpagesize() EXEC_PAGESIZE
10125# else /* no EXEC_PAGESIZE */
10126# ifdef NBPG
10127# define getpagesize() NBPG * CLSIZE
10128# ifndef CLSIZE
10129# define CLSIZE 1
10130# endif /* no CLSIZE */
10131# else /* no NBPG */
10132# ifdef NBPC
10133# define getpagesize() NBPC
10134# else /* no NBPC */
10135# ifdef PAGESIZE
10136# define getpagesize() PAGESIZE
10137# endif /* PAGESIZE */
10138# endif /* no NBPC */
10139# endif /* no NBPG */
10140# endif /* no EXEC_PAGESIZE */
10141# else /* no HAVE_SYS_PARAM_H */
10142# define getpagesize() 8192 /* punt totally */
10143# endif /* no HAVE_SYS_PARAM_H */
10144# endif /* no _SC_PAGESIZE */
10145
10146#endif /* no HAVE_GETPAGESIZE */
10147
10148int
10149main ()
10150{
10151 char *data, *data2, *data3;
10152 int i, pagesize;
10153 int fd;
10154
10155 pagesize = getpagesize ();
10156
10157 /* First, make a file with some known garbage in it. */
10158 data = (char *) malloc (pagesize);
10159 if (!data)
ca81d7a0 10160 return 1;
98418dba
CW
10161 for (i = 0; i < pagesize; ++i)
10162 *(data + i) = rand ();
10163 umask (0);
10164 fd = creat ("conftest.mmap", 0600);
10165 if (fd < 0)
ca81d7a0 10166 return 1;
98418dba 10167 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10168 return 1;
98418dba
CW
10169 close (fd);
10170
10171 /* Next, try to mmap the file at a fixed address which already has
10172 something else allocated at it. If we can, also make sure that
10173 we see the same garbage. */
10174 fd = open ("conftest.mmap", O_RDWR);
10175 if (fd < 0)
ca81d7a0 10176 return 1;
98418dba
CW
10177 data2 = (char *) malloc (2 * pagesize);
10178 if (!data2)
ca81d7a0
JD
10179 return 1;
10180 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10181 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10182 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10183 return 1;
98418dba
CW
10184 for (i = 0; i < pagesize; ++i)
10185 if (*(data + i) != *(data2 + i))
ca81d7a0 10186 return 1;
98418dba
CW
10187
10188 /* Finally, make sure that changes to the mapped area do not
10189 percolate back to the file as seen by read(). (This is a bug on
10190 some variants of i386 svr4.0.) */
10191 for (i = 0; i < pagesize; ++i)
10192 *(data2 + i) = *(data2 + i) + 1;
10193 data3 = (char *) malloc (pagesize);
10194 if (!data3)
ca81d7a0 10195 return 1;
98418dba 10196 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10197 return 1;
98418dba
CW
10198 for (i = 0; i < pagesize; ++i)
10199 if (*(data + i) != *(data3 + i))
ca81d7a0 10200 return 1;
98418dba 10201 close (fd);
ca81d7a0 10202 return 0;
98418dba
CW
10203}
10204_ACEOF
10205rm -f conftest$ac_exeext
ca81d7a0
JD
10206if { (ac_try="$ac_link"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
10211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10212 (eval "$ac_link") 2>&5
98418dba 10213 ac_status=$?
c0d27fcc 10214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10216 { (case "(($ac_try" in
10217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10218 *) ac_try_echo=$ac_try;;
10219esac
10220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10221 (eval "$ac_try") 2>&5
98418dba 10222 ac_status=$?
c0d27fcc 10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10224 (exit $ac_status); }; }; then
10225 ac_cv_func_mmap_fixed_mapped=yes
10226else
10227 echo "$as_me: program exited with status $ac_status" >&5
10228echo "$as_me: failed program was:" >&5
19650fd6
AS
10229sed 's/^/| /' conftest.$ac_ext >&5
10230
c0d27fcc 10231( exit $ac_status )
98418dba
CW
10232ac_cv_func_mmap_fixed_mapped=no
10233fi
ca81d7a0 10234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10235fi
ca81d7a0
JD
10236
10237
98418dba 10238fi
ca81d7a0
JD
10239{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10240echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10241if test $ac_cv_func_mmap_fixed_mapped = yes; then
10242
c0d27fcc 10243cat >>confdefs.h <<\_ACEOF
98418dba 10244#define HAVE_MMAP 1
c0d27fcc 10245_ACEOF
98418dba
CW
10246
10247fi
10248rm -f conftest.mmap
10249
10250if test $use_mmap_for_buffers = yes; then
10251 REL_ALLOC=no
10252fi
10253
10254LIBS="$libsrc_libs $LIBS"
10255
c0d27fcc 10256
ca81d7a0
JD
10257{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10258echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10259if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10261else
10262 ac_check_lib_save_LIBS=$LIBS
10263LIBS="-ldnet $LIBS"
10264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10265/* confdefs.h. */
10266_ACEOF
10267cat confdefs.h >>conftest.$ac_ext
10268cat >>conftest.$ac_ext <<_ACEOF
10269/* end confdefs.h. */
98418dba 10270
ca81d7a0
JD
10271/* Override any GCC internal prototype to avoid an error.
10272 Use char because int might match the return type of a GCC
10273 builtin and then its argument prototype would still apply. */
98418dba
CW
10274#ifdef __cplusplus
10275extern "C"
10276#endif
98418dba 10277char dnet_ntoa ();
98418dba
CW
10278int
10279main ()
10280{
ca81d7a0 10281return dnet_ntoa ();
98418dba
CW
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10287if { (ac_try="$ac_link"
10288case "(($ac_try" in
10289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10290 *) ac_try_echo=$ac_try;;
10291esac
10292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10293 (eval "$ac_link") 2>conftest.er1
98418dba 10294 ac_status=$?
edfaf76d
LK
10295 grep -v '^ *+' conftest.er1 >conftest.err
10296 rm -f conftest.er1
10297 cat conftest.err >&5
c0d27fcc 10298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10299 (exit $ac_status); } && {
10300 test -z "$ac_c_werror_flag" ||
10301 test ! -s conftest.err
10302 } && test -s conftest$ac_exeext &&
10303 $as_test_x conftest$ac_exeext; then
98418dba
CW
10304 ac_cv_lib_dnet_dnet_ntoa=yes
10305else
10306 echo "$as_me: failed program was:" >&5
19650fd6
AS
10307sed 's/^/| /' conftest.$ac_ext >&5
10308
ca81d7a0 10309 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10310fi
ca81d7a0 10311
f053c89f 10312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10313 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10314LIBS=$ac_check_lib_save_LIBS
10315fi
ca81d7a0
JD
10316{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10317echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10318if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10319 cat >>confdefs.h <<_ACEOF
98418dba 10320#define HAVE_LIBDNET 1
c0d27fcc 10321_ACEOF
98418dba
CW
10322
10323 LIBS="-ldnet $LIBS"
10324
10325fi
10326
c0d27fcc 10327
ca81d7a0
JD
10328{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10329echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10330if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10331 echo $ECHO_N "(cached) $ECHO_C" >&6
10332else
10333 ac_check_lib_save_LIBS=$LIBS
10334LIBS="-lXbsd $LIBS"
10335cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10336/* confdefs.h. */
10337_ACEOF
10338cat confdefs.h >>conftest.$ac_ext
10339cat >>conftest.$ac_ext <<_ACEOF
10340/* end confdefs.h. */
98418dba 10341
c0d27fcc 10342
98418dba
CW
10343int
10344main ()
10345{
ca81d7a0 10346return main ();
98418dba
CW
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10352if { (ac_try="$ac_link"
10353case "(($ac_try" in
10354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10355 *) ac_try_echo=$ac_try;;
10356esac
10357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10358 (eval "$ac_link") 2>conftest.er1
98418dba 10359 ac_status=$?
edfaf76d
LK
10360 grep -v '^ *+' conftest.er1 >conftest.err
10361 rm -f conftest.er1
10362 cat conftest.err >&5
c0d27fcc 10363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10364 (exit $ac_status); } && {
10365 test -z "$ac_c_werror_flag" ||
10366 test ! -s conftest.err
10367 } && test -s conftest$ac_exeext &&
10368 $as_test_x conftest$ac_exeext; then
98418dba
CW
10369 ac_cv_lib_Xbsd_main=yes
10370else
10371 echo "$as_me: failed program was:" >&5
19650fd6
AS
10372sed 's/^/| /' conftest.$ac_ext >&5
10373
ca81d7a0 10374 ac_cv_lib_Xbsd_main=no
98418dba 10375fi
ca81d7a0 10376
f053c89f 10377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10378 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10379LIBS=$ac_check_lib_save_LIBS
10380fi
ca81d7a0
JD
10381{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10382echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10383if test $ac_cv_lib_Xbsd_main = yes; then
10384 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10385fi
10386
c0d27fcc
MR
10387
10388
ca81d7a0
JD
10389{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10390echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10391if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10393else
10394 ac_check_lib_save_LIBS=$LIBS
10395LIBS="-lpthreads $LIBS"
10396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10397/* confdefs.h. */
10398_ACEOF
10399cat confdefs.h >>conftest.$ac_ext
10400cat >>conftest.$ac_ext <<_ACEOF
10401/* end confdefs.h. */
98418dba 10402
ca81d7a0
JD
10403/* Override any GCC internal prototype to avoid an error.
10404 Use char because int might match the return type of a GCC
10405 builtin and then its argument prototype would still apply. */
98418dba
CW
10406#ifdef __cplusplus
10407extern "C"
10408#endif
98418dba 10409char cma_open ();
98418dba
CW
10410int
10411main ()
10412{
ca81d7a0 10413return cma_open ();
98418dba
CW
10414 ;
10415 return 0;
10416}
10417_ACEOF
10418rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10419if { (ac_try="$ac_link"
10420case "(($ac_try" in
10421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10422 *) ac_try_echo=$ac_try;;
10423esac
10424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10425 (eval "$ac_link") 2>conftest.er1
98418dba 10426 ac_status=$?
edfaf76d
LK
10427 grep -v '^ *+' conftest.er1 >conftest.err
10428 rm -f conftest.er1
10429 cat conftest.err >&5
c0d27fcc 10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10431 (exit $ac_status); } && {
10432 test -z "$ac_c_werror_flag" ||
10433 test ! -s conftest.err
10434 } && test -s conftest$ac_exeext &&
10435 $as_test_x conftest$ac_exeext; then
98418dba
CW
10436 ac_cv_lib_pthreads_cma_open=yes
10437else
10438 echo "$as_me: failed program was:" >&5
19650fd6
AS
10439sed 's/^/| /' conftest.$ac_ext >&5
10440
ca81d7a0 10441 ac_cv_lib_pthreads_cma_open=no
98418dba 10442fi
ca81d7a0 10443
f053c89f 10444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10445 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10446LIBS=$ac_check_lib_save_LIBS
10447fi
ca81d7a0
JD
10448{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10449echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10450if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10451 cat >>confdefs.h <<_ACEOF
98418dba 10452#define HAVE_LIBPTHREADS 1
c0d27fcc 10453_ACEOF
98418dba
CW
10454
10455 LIBS="-lpthreads $LIBS"
10456
10457fi
10458
c0d27fcc 10459
55597d70
DL
10460
10461case ${host_os} in
10462aix*)
ca81d7a0
JD
10463 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10464echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10465if test "${gdb_cv_bigtoc+set}" = set; then
10466 echo $ECHO_N "(cached) $ECHO_C" >&6
10467else
10468
10469 case $GCC in
10470 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10471 *) gdb_cv_bigtoc=-bbigtoc ;;
10472 esac
10473
10474 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10475 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10476/* confdefs.h. */
10477_ACEOF
10478cat confdefs.h >>conftest.$ac_ext
10479cat >>conftest.$ac_ext <<_ACEOF
10480/* end confdefs.h. */
55597d70
DL
10481
10482int
10483main ()
10484{
10485int i;
10486 ;
10487 return 0;
10488}
10489_ACEOF
10490rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10491if { (ac_try="$ac_link"
10492case "(($ac_try" in
10493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10494 *) ac_try_echo=$ac_try;;
10495esac
10496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10497 (eval "$ac_link") 2>conftest.er1
55597d70 10498 ac_status=$?
edfaf76d
LK
10499 grep -v '^ *+' conftest.er1 >conftest.err
10500 rm -f conftest.er1
10501 cat conftest.err >&5
55597d70 10502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10503 (exit $ac_status); } && {
10504 test -z "$ac_c_werror_flag" ||
10505 test ! -s conftest.err
10506 } && test -s conftest$ac_exeext &&
10507 $as_test_x conftest$ac_exeext; then
55597d70
DL
10508 :
10509else
10510 echo "$as_me: failed program was:" >&5
19650fd6
AS
10511sed 's/^/| /' conftest.$ac_ext >&5
10512
ca81d7a0 10513 gdb_cv_bigtoc=
55597d70 10514fi
ca81d7a0 10515
f053c89f 10516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10517 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10518
10519fi
ca81d7a0
JD
10520{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10521echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10522 ;;
10523esac
10524
ae1a998c
RS
10525# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10526# used for the tests that follow. We set them back to REAL_CFLAGS and
10527# REAL_CPPFLAGS later on.
98418dba
CW
10528
10529REAL_CPPFLAGS="$CPPFLAGS"
10530
10531if test "${HAVE_X11}" = "yes"; then
10532 DEFS="$C_SWITCH_X_SITE $DEFS"
10533 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10534 LIBS="$LIBX $LIBS"
10535 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10536 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10537
10538 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10539 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10540 # but it's more convenient here to set LD_RUN_PATH
10541 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10542 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10543 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10544 export LD_RUN_PATH
10545 fi
10546
10547 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10548 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10549echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
98418dba 10556
98418dba
CW
10557int
10558main ()
10559{
10560XOpenDisplay ("foo");
10561 ;
10562 return 0;
10563}
10564_ACEOF
10565rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10566if { (ac_try="$ac_link"
10567case "(($ac_try" in
10568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10569 *) ac_try_echo=$ac_try;;
10570esac
10571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10572 (eval "$ac_link") 2>conftest.er1
98418dba 10573 ac_status=$?
edfaf76d
LK
10574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
c0d27fcc 10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest$ac_exeext &&
10582 $as_test_x conftest$ac_exeext; then
35996d22 10583 xlinux_first_failure=no
98418dba
CW
10584else
10585 echo "$as_me: failed program was:" >&5
19650fd6
AS
10586sed 's/^/| /' conftest.$ac_ext >&5
10587
ca81d7a0 10588 xlinux_first_failure=yes
98418dba 10589fi
ca81d7a0 10590
f053c89f 10591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10592 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10593 if test "${xlinux_first_failure}" = "yes"; then
10594 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10595 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10596 OLD_CPPFLAGS="$CPPFLAGS"
10597 OLD_LIBS="$LIBS"
10598 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10599 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10600 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10601 LIBS="$LIBS -b i486-linuxaout"
10602 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10603/* confdefs.h. */
10604_ACEOF
10605cat confdefs.h >>conftest.$ac_ext
10606cat >>conftest.$ac_ext <<_ACEOF
10607/* end confdefs.h. */
98418dba 10608
98418dba
CW
10609int
10610main ()
10611{
10612XOpenDisplay ("foo");
10613 ;
10614 return 0;
10615}
10616_ACEOF
10617rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10618if { (ac_try="$ac_link"
10619case "(($ac_try" in
10620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10621 *) ac_try_echo=$ac_try;;
10622esac
10623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10624 (eval "$ac_link") 2>conftest.er1
98418dba 10625 ac_status=$?
edfaf76d
LK
10626 grep -v '^ *+' conftest.er1 >conftest.err
10627 rm -f conftest.er1
10628 cat conftest.err >&5
c0d27fcc 10629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10630 (exit $ac_status); } && {
10631 test -z "$ac_c_werror_flag" ||
10632 test ! -s conftest.err
10633 } && test -s conftest$ac_exeext &&
10634 $as_test_x conftest$ac_exeext; then
98418dba
CW
10635 xlinux_second_failure=no
10636else
10637 echo "$as_me: failed program was:" >&5
19650fd6
AS
10638sed 's/^/| /' conftest.$ac_ext >&5
10639
ca81d7a0 10640 xlinux_second_failure=yes
98418dba 10641fi
ca81d7a0 10642
f053c89f 10643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10644 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10645 if test "${xlinux_second_failure}" = "yes"; then
10646 # If we get the same failure with -b, there is no use adding -b.
10647 # So take it out. This plays safe.
10648 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10649 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10650 CPPFLAGS="$OLD_CPPFLAGS"
10651 LIBS="$OLD_LIBS"
ca81d7a0
JD
10652 { echo "$as_me:$LINENO: result: no" >&5
10653echo "${ECHO_T}no" >&6; }
98418dba 10654 else
ca81d7a0
JD
10655 { echo "$as_me:$LINENO: result: yes" >&5
10656echo "${ECHO_T}yes" >&6; }
98418dba
CW
10657 fi
10658 else
ca81d7a0
JD
10659 { echo "$as_me:$LINENO: result: no" >&5
10660echo "${ECHO_T}no" >&6; }
98418dba
CW
10661 fi
10662 fi
10663
10664 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10665 # header files included from there.
ca81d7a0
JD
10666 { echo "$as_me:$LINENO: checking for Xkb" >&5
10667echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10668 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10669/* confdefs.h. */
10670_ACEOF
10671cat confdefs.h >>conftest.$ac_ext
10672cat >>conftest.$ac_ext <<_ACEOF
10673/* end confdefs.h. */
98418dba
CW
10674#include <X11/Xlib.h>
10675#include <X11/XKBlib.h>
98418dba
CW
10676int
10677main ()
10678{
10679XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10680 ;
10681 return 0;
10682}
10683_ACEOF
10684rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10685if { (ac_try="$ac_link"
10686case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
10690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10691 (eval "$ac_link") 2>conftest.er1
98418dba 10692 ac_status=$?
edfaf76d
LK
10693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
c0d27fcc 10696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10697 (exit $ac_status); } && {
10698 test -z "$ac_c_werror_flag" ||
10699 test ! -s conftest.err
10700 } && test -s conftest$ac_exeext &&
10701 $as_test_x conftest$ac_exeext; then
98418dba
CW
10702 emacs_xkb=yes
10703else
10704 echo "$as_me: failed program was:" >&5
19650fd6
AS
10705sed 's/^/| /' conftest.$ac_ext >&5
10706
ca81d7a0 10707 emacs_xkb=no
98418dba 10708fi
ca81d7a0 10709
f053c89f 10710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10711 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10712 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10713echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10714 if test $emacs_xkb = yes; then
b936fae4 10715
c0d27fcc 10716cat >>confdefs.h <<\_ACEOF
98418dba 10717#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10718_ACEOF
98418dba
CW
10719
10720 fi
10721
c0d27fcc
MR
10722
10723
10724
10725
98418dba
CW
10726for ac_func in XrmSetDatabase XScreenResourceString \
10727XScreenNumberOfScreen XSetWMProtocols
10728do
10729as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10730{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10731echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10732if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
10734else
10735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10736/* confdefs.h. */
10737_ACEOF
10738cat confdefs.h >>conftest.$ac_ext
10739cat >>conftest.$ac_ext <<_ACEOF
10740/* end confdefs.h. */
edfaf76d
LK
10741/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10742 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10743#define $ac_func innocuous_$ac_func
10744
98418dba 10745/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10746 which can conflict with char $ac_func (); below.
10747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10748 <limits.h> exists even on freestanding compilers. */
edfaf76d 10749
19650fd6
AS
10750#ifdef __STDC__
10751# include <limits.h>
10752#else
10753# include <assert.h>
10754#endif
edfaf76d
LK
10755
10756#undef $ac_func
10757
ca81d7a0
JD
10758/* Override any GCC internal prototype to avoid an error.
10759 Use char because int might match the return type of a GCC
10760 builtin and then its argument prototype would still apply. */
98418dba
CW
10761#ifdef __cplusplus
10762extern "C"
10763#endif
98418dba 10764char $ac_func ();
98418dba
CW
10765/* The GNU C library defines this for functions which it implements
10766 to always fail with ENOSYS. Some functions are actually named
10767 something starting with __ and the normal name is an alias. */
ca81d7a0 10768#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10769choke me
98418dba
CW
10770#endif
10771
19650fd6
AS
10772int
10773main ()
10774{
ca81d7a0 10775return $ac_func ();
98418dba
CW
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10781if { (ac_try="$ac_link"
10782case "(($ac_try" in
10783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10784 *) ac_try_echo=$ac_try;;
10785esac
10786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10787 (eval "$ac_link") 2>conftest.er1
98418dba 10788 ac_status=$?
edfaf76d
LK
10789 grep -v '^ *+' conftest.er1 >conftest.err
10790 rm -f conftest.er1
10791 cat conftest.err >&5
c0d27fcc 10792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10793 (exit $ac_status); } && {
10794 test -z "$ac_c_werror_flag" ||
10795 test ! -s conftest.err
10796 } && test -s conftest$ac_exeext &&
10797 $as_test_x conftest$ac_exeext; then
98418dba
CW
10798 eval "$as_ac_var=yes"
10799else
10800 echo "$as_me: failed program was:" >&5
19650fd6
AS
10801sed 's/^/| /' conftest.$ac_ext >&5
10802
ca81d7a0 10803 eval "$as_ac_var=no"
98418dba 10804fi
ca81d7a0 10805
f053c89f 10806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10807 conftest$ac_exeext conftest.$ac_ext
98418dba 10808fi
ca81d7a0
JD
10809ac_res=`eval echo '${'$as_ac_var'}'`
10810 { echo "$as_me:$LINENO: result: $ac_res" >&5
10811echo "${ECHO_T}$ac_res" >&6; }
98418dba 10812if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10813 cat >>confdefs.h <<_ACEOF
98418dba 10814#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10815_ACEOF
98418dba
CW
10816
10817fi
10818done
10819
10820fi
10821
10822if test "${window_system}" = "x11"; then
ca81d7a0
JD
10823 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10824echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10825 if test "${emacs_cv_x11_version_6+set}" = set; then
10826 echo $ECHO_N "(cached) $ECHO_C" >&6
10827else
10828 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10829/* confdefs.h. */
10830_ACEOF
10831cat confdefs.h >>conftest.$ac_ext
10832cat >>conftest.$ac_ext <<_ACEOF
10833/* end confdefs.h. */
98418dba 10834#include <X11/Xlib.h>
98418dba
CW
10835int
10836main ()
10837{
10838#if XlibSpecificationRelease < 6
10839fail;
10840#endif
10841
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10847if { (ac_try="$ac_link"
10848case "(($ac_try" in
10849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10850 *) ac_try_echo=$ac_try;;
10851esac
10852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10853 (eval "$ac_link") 2>conftest.er1
98418dba 10854 ac_status=$?
edfaf76d
LK
10855 grep -v '^ *+' conftest.er1 >conftest.err
10856 rm -f conftest.er1
10857 cat conftest.err >&5
c0d27fcc 10858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10859 (exit $ac_status); } && {
10860 test -z "$ac_c_werror_flag" ||
10861 test ! -s conftest.err
10862 } && test -s conftest$ac_exeext &&
10863 $as_test_x conftest$ac_exeext; then
98418dba
CW
10864 emacs_cv_x11_version_6=yes
10865else
10866 echo "$as_me: failed program was:" >&5
19650fd6
AS
10867sed 's/^/| /' conftest.$ac_ext >&5
10868
ca81d7a0 10869 emacs_cv_x11_version_6=no
98418dba 10870fi
ca81d7a0 10871
f053c89f 10872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10873 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10874fi
10875
10876 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10877 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10878echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10879
c0d27fcc 10880cat >>confdefs.h <<\_ACEOF
98418dba 10881#define HAVE_X11R6 1
c0d27fcc 10882_ACEOF
98418dba
CW
10883
10884 else
ca81d7a0
JD
10885 { echo "$as_me:$LINENO: result: before 6" >&5
10886echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10887 fi
10888fi
10889
98418dba 10890
0cfc0546
GM
10891### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10892HAVE_RSVG=no
ae0476ed 10893if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546 10894 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10895 RSVG_REQUIRED=2.0.0
10896 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10897
10898
10899 succeeded=no
10900
00b9c927 10901 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10902set dummy pkg-config; ac_word=$2
10903{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10905if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10906 echo $ECHO_N "(cached) $ECHO_C" >&6
10907else
10908 case $PKG_CONFIG in
10909 [\\/]* | ?:[\\/]*)
10910 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10911 ;;
10912 *)
10913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10914for as_dir in $PATH
10915do
10916 IFS=$as_save_IFS
10917 test -z "$as_dir" && as_dir=.
10918 for ac_exec_ext in '' $ac_executable_extensions; do
10919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10920 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10922 break 2
10923 fi
10924done
10925done
10926IFS=$as_save_IFS
10927
10928 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10929 ;;
10930esac
10931fi
10932PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10933if test -n "$PKG_CONFIG"; then
10934 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10935echo "${ECHO_T}$PKG_CONFIG" >&6; }
10936else
10937 { echo "$as_me:$LINENO: result: no" >&5
10938echo "${ECHO_T}no" >&6; }
10939fi
10940
10941
0cfc0546
GM
10942
10943 if test "$PKG_CONFIG" = "no" ; then
10944 :
10945 else
10946 PKG_CONFIG_MIN_VERSION=0.9.0
10947 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10948 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10949echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10950
10951 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10952 { echo "$as_me:$LINENO: result: yes" >&5
10953echo "${ECHO_T}yes" >&6; }
10954 succeeded=yes
10955
10956 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10957echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10958 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10959 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10960echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10961
10962 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10963echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10964 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10965 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10966echo "${ECHO_T}$RSVG_LIBS" >&6; }
10967 else
10968 { echo "$as_me:$LINENO: result: no" >&5
10969echo "${ECHO_T}no" >&6; }
10970 RSVG_CFLAGS=""
10971 RSVG_LIBS=""
10972 ## If we have a custom action on failure, don't print errors, but
10973 ## do set a variable so people can do so.
10974 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10975
10976 fi
10977
10978
10979
10980 else
10981 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10982 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10983 fi
10984 fi
10985
10986 if test $succeeded = yes; then
10987 :
10988 else
10989 :
10990 fi
10991
10992
10993
10994
10995 if test ".${RSVG_CFLAGS}" != "."; then
10996 HAVE_RSVG=yes
10997
10998cat >>confdefs.h <<\_ACEOF
10999#define HAVE_RSVG 1
11000_ACEOF
11001
11002 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11003 LIBS="$RSVG_LIBS $LIBS"
11004 fi
11005 fi
11006fi
11007
11008
488dd4c4 11009HAVE_GTK=no
9d2818d6 11010if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
11011 GLIB_REQUIRED=2.6
11012 GTK_REQUIRED=2.6
488dd4c4
JD
11013 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11014
488dd4c4
JD
11015
11016 succeeded=no
11017
00b9c927 11018 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 11019set dummy pkg-config; ac_word=$2
ca81d7a0
JD
11020{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11022if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11023 echo $ECHO_N "(cached) $ECHO_C" >&6
11024else
11025 case $PKG_CONFIG in
11026 [\\/]* | ?:[\\/]*)
11027 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11028 ;;
11029 *)
11030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033 IFS=$as_save_IFS
11034 test -z "$as_dir" && as_dir=.
11035 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11036 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11037 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11038 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11039 break 2
11040 fi
11041done
11042done
ca81d7a0 11043IFS=$as_save_IFS
488dd4c4
JD
11044
11045 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11046 ;;
11047esac
11048fi
11049PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11050if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11051 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11052echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11053else
ca81d7a0
JD
11054 { echo "$as_me:$LINENO: result: no" >&5
11055echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11056fi
11057
ca81d7a0 11058
488dd4c4
JD
11059
11060 if test "$PKG_CONFIG" = "no" ; then
089a966d 11061 pkg_check_gtk=no
488dd4c4
JD
11062 else
11063 PKG_CONFIG_MIN_VERSION=0.9.0
11064 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11065 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11066echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11067
67db6aa2 11068 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11069 { echo "$as_me:$LINENO: result: yes" >&5
11070echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11071 succeeded=yes
11072
ca81d7a0
JD
11073 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11074echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11075 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11076 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11077echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11078
ca81d7a0
JD
11079 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11080echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11081 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11082 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11083echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11084 else
ca81d7a0
JD
11085 { echo "$as_me:$LINENO: result: no" >&5
11086echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11087 GTK_CFLAGS=""
11088 GTK_LIBS=""
11089 ## If we have a custom action on failure, don't print errors, but
11090 ## do set a variable so people can do so.
11091 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11092
488dd4c4
JD
11093 fi
11094
11095
11096
11097 else
11098 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11099 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11100 fi
11101 fi
11102
11103 if test $succeeded = yes; then
089a966d 11104 pkg_check_gtk=yes
488dd4c4 11105 else
089a966d
GM
11106 pkg_check_gtk=no
11107 fi
11108
11109 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11110 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11111echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11112 { (exit 1); exit 1; }; }
11113 fi
089a966d
GM
11114fi
11115
11116
11117if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11118
11119
11120
11121 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11122 CFLAGS="$CFLAGS $GTK_CFLAGS"
11123 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11124 GTK_COMPILES=no
57669b57 11125
8eeae1c9 11126for ac_func in gtk_main
57669b57
JD
11127do
11128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11129{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11131if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11132 echo $ECHO_N "(cached) $ECHO_C" >&6
11133else
11134 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11135/* confdefs.h. */
11136_ACEOF
11137cat confdefs.h >>conftest.$ac_ext
11138cat >>conftest.$ac_ext <<_ACEOF
11139/* end confdefs.h. */
edfaf76d
LK
11140/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11141 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11142#define $ac_func innocuous_$ac_func
11143
57669b57
JD
11144/* System header to define __stub macros and hopefully few prototypes,
11145 which can conflict with char $ac_func (); below.
11146 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11147 <limits.h> exists even on freestanding compilers. */
edfaf76d 11148
57669b57
JD
11149#ifdef __STDC__
11150# include <limits.h>
11151#else
11152# include <assert.h>
11153#endif
edfaf76d
LK
11154
11155#undef $ac_func
11156
ca81d7a0
JD
11157/* Override any GCC internal prototype to avoid an error.
11158 Use char because int might match the return type of a GCC
11159 builtin and then its argument prototype would still apply. */
57669b57
JD
11160#ifdef __cplusplus
11161extern "C"
57669b57 11162#endif
57669b57
JD
11163char $ac_func ();
11164/* The GNU C library defines this for functions which it implements
11165 to always fail with ENOSYS. Some functions are actually named
11166 something starting with __ and the normal name is an alias. */
ca81d7a0 11167#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11168choke me
57669b57
JD
11169#endif
11170
11171int
11172main ()
11173{
ca81d7a0 11174return $ac_func ();
57669b57
JD
11175 ;
11176 return 0;
11177}
11178_ACEOF
11179rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11180if { (ac_try="$ac_link"
11181case "(($ac_try" in
11182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11183 *) ac_try_echo=$ac_try;;
11184esac
11185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11186 (eval "$ac_link") 2>conftest.er1
57669b57 11187 ac_status=$?
edfaf76d
LK
11188 grep -v '^ *+' conftest.er1 >conftest.err
11189 rm -f conftest.er1
11190 cat conftest.err >&5
57669b57 11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11192 (exit $ac_status); } && {
11193 test -z "$ac_c_werror_flag" ||
11194 test ! -s conftest.err
11195 } && test -s conftest$ac_exeext &&
11196 $as_test_x conftest$ac_exeext; then
57669b57
JD
11197 eval "$as_ac_var=yes"
11198else
11199 echo "$as_me: failed program was:" >&5
11200sed 's/^/| /' conftest.$ac_ext >&5
11201
ca81d7a0 11202 eval "$as_ac_var=no"
57669b57 11203fi
ca81d7a0 11204
f053c89f 11205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11206 conftest$ac_exeext conftest.$ac_ext
57669b57 11207fi
ca81d7a0
JD
11208ac_res=`eval echo '${'$as_ac_var'}'`
11209 { echo "$as_me:$LINENO: result: $ac_res" >&5
11210echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11211if test `eval echo '${'$as_ac_var'}'` = yes; then
11212 cat >>confdefs.h <<_ACEOF
11213#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11214_ACEOF
8eeae1c9 11215 GTK_COMPILES=yes
57669b57
JD
11216fi
11217done
11218
8eeae1c9 11219 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11220 if test "$USE_X_TOOLKIT" != "maybe"; then
11221 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11222echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11223 { (exit 1); exit 1; }; };
089a966d
GM
11224 fi
11225 else
11226 HAVE_GTK=yes
488dd4c4
JD
11227
11228cat >>confdefs.h <<\_ACEOF
a51f4969 11229#define USE_GTK 1
488dd4c4
JD
11230_ACEOF
11231
089a966d 11232 USE_X_TOOLKIT=none
f60c93db
JD
11233 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11234 :
11235 else
11236 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11237 closing open displays. This is no problem if you just use
11238 one display, but if you use more than one and close one of them
11239 Emacs may crash." >&5
11240echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11241 closing open displays. This is no problem if you just use
11242 one display, but if you use more than one and close one of them
11243 Emacs may crash." >&2;}
11244 sleep 3
11245 fi
089a966d
GM
11246 fi
11247
11248fi
11249
11250
11251if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11252
d0a80c21
JD
11253 if test "$with_toolkit_scroll_bars" != no; then
11254 with_toolkit_scroll_bars=yes
11255 fi
57669b57
JD
11256
11257 HAVE_GTK_MULTIDISPLAY=no
11258
11259for ac_func in gdk_display_open
11260do
11261as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11262{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11263echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11264if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
11266else
11267 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11268/* confdefs.h. */
11269_ACEOF
11270cat confdefs.h >>conftest.$ac_ext
11271cat >>conftest.$ac_ext <<_ACEOF
11272/* end confdefs.h. */
edfaf76d
LK
11273/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11274 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11275#define $ac_func innocuous_$ac_func
11276
57669b57
JD
11277/* System header to define __stub macros and hopefully few prototypes,
11278 which can conflict with char $ac_func (); below.
11279 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11280 <limits.h> exists even on freestanding compilers. */
edfaf76d 11281
57669b57
JD
11282#ifdef __STDC__
11283# include <limits.h>
11284#else
11285# include <assert.h>
11286#endif
edfaf76d
LK
11287
11288#undef $ac_func
11289
ca81d7a0
JD
11290/* Override any GCC internal prototype to avoid an error.
11291 Use char because int might match the return type of a GCC
11292 builtin and then its argument prototype would still apply. */
57669b57
JD
11293#ifdef __cplusplus
11294extern "C"
57669b57 11295#endif
57669b57
JD
11296char $ac_func ();
11297/* The GNU C library defines this for functions which it implements
11298 to always fail with ENOSYS. Some functions are actually named
11299 something starting with __ and the normal name is an alias. */
ca81d7a0 11300#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11301choke me
57669b57
JD
11302#endif
11303
11304int
11305main ()
11306{
ca81d7a0 11307return $ac_func ();
57669b57
JD
11308 ;
11309 return 0;
11310}
11311_ACEOF
11312rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11313if { (ac_try="$ac_link"
11314case "(($ac_try" in
11315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11316 *) ac_try_echo=$ac_try;;
11317esac
11318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11319 (eval "$ac_link") 2>conftest.er1
57669b57 11320 ac_status=$?
edfaf76d
LK
11321 grep -v '^ *+' conftest.er1 >conftest.err
11322 rm -f conftest.er1
11323 cat conftest.err >&5
57669b57 11324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11325 (exit $ac_status); } && {
11326 test -z "$ac_c_werror_flag" ||
11327 test ! -s conftest.err
11328 } && test -s conftest$ac_exeext &&
11329 $as_test_x conftest$ac_exeext; then
57669b57
JD
11330 eval "$as_ac_var=yes"
11331else
11332 echo "$as_me: failed program was:" >&5
11333sed 's/^/| /' conftest.$ac_ext >&5
11334
ca81d7a0 11335 eval "$as_ac_var=no"
57669b57 11336fi
ca81d7a0 11337
f053c89f 11338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11339 conftest$ac_exeext conftest.$ac_ext
57669b57 11340fi
ca81d7a0
JD
11341ac_res=`eval echo '${'$as_ac_var'}'`
11342 { echo "$as_me:$LINENO: result: $ac_res" >&5
11343echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11344if test `eval echo '${'$as_ac_var'}'` = yes; then
11345 cat >>confdefs.h <<_ACEOF
11346#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11347_ACEOF
11348 HAVE_GTK_MULTIDISPLAY=yes
11349fi
11350done
11351
11352 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11353
11354cat >>confdefs.h <<\_ACEOF
11355#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11356_ACEOF
11357
11358 fi
57669b57 11359
572a3cc2
JD
11360 HAVE_GTK_FILE_SELECTION=no
11361
11362for ac_func in gtk_file_selection_new
11363do
11364as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11365{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11366echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11367if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11368 echo $ECHO_N "(cached) $ECHO_C" >&6
11369else
11370 cat >conftest.$ac_ext <<_ACEOF
11371/* confdefs.h. */
11372_ACEOF
11373cat confdefs.h >>conftest.$ac_ext
11374cat >>conftest.$ac_ext <<_ACEOF
11375/* end confdefs.h. */
edfaf76d
LK
11376/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11377 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11378#define $ac_func innocuous_$ac_func
11379
572a3cc2
JD
11380/* System header to define __stub macros and hopefully few prototypes,
11381 which can conflict with char $ac_func (); below.
11382 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11383 <limits.h> exists even on freestanding compilers. */
edfaf76d 11384
572a3cc2
JD
11385#ifdef __STDC__
11386# include <limits.h>
11387#else
11388# include <assert.h>
11389#endif
edfaf76d
LK
11390
11391#undef $ac_func
11392
ca81d7a0
JD
11393/* Override any GCC internal prototype to avoid an error.
11394 Use char because int might match the return type of a GCC
11395 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11396#ifdef __cplusplus
11397extern "C"
572a3cc2 11398#endif
572a3cc2
JD
11399char $ac_func ();
11400/* The GNU C library defines this for functions which it implements
11401 to always fail with ENOSYS. Some functions are actually named
11402 something starting with __ and the normal name is an alias. */
ca81d7a0 11403#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11404choke me
572a3cc2
JD
11405#endif
11406
11407int
11408main ()
11409{
ca81d7a0 11410return $ac_func ();
572a3cc2
JD
11411 ;
11412 return 0;
11413}
11414_ACEOF
11415rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11416if { (ac_try="$ac_link"
11417case "(($ac_try" in
11418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11419 *) ac_try_echo=$ac_try;;
11420esac
11421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11422 (eval "$ac_link") 2>conftest.er1
572a3cc2 11423 ac_status=$?
edfaf76d
LK
11424 grep -v '^ *+' conftest.er1 >conftest.err
11425 rm -f conftest.er1
11426 cat conftest.err >&5
572a3cc2 11427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11428 (exit $ac_status); } && {
11429 test -z "$ac_c_werror_flag" ||
11430 test ! -s conftest.err
11431 } && test -s conftest$ac_exeext &&
11432 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11433 eval "$as_ac_var=yes"
11434else
11435 echo "$as_me: failed program was:" >&5
11436sed 's/^/| /' conftest.$ac_ext >&5
11437
ca81d7a0 11438 eval "$as_ac_var=no"
572a3cc2 11439fi
ca81d7a0 11440
f053c89f 11441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11442 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11443fi
ca81d7a0
JD
11444ac_res=`eval echo '${'$as_ac_var'}'`
11445 { echo "$as_me:$LINENO: result: $ac_res" >&5
11446echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11447if test `eval echo '${'$as_ac_var'}'` = yes; then
11448 cat >>confdefs.h <<_ACEOF
11449#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11450_ACEOF
11451 HAVE_GTK_FILE_SELECTION=yes
11452fi
11453done
11454
11455
11456 HAVE_GTK_FILE_CHOOSER=no
11457
11458for ac_func in gtk_file_chooser_dialog_new
11459do
11460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11461{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11463if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11464 echo $ECHO_N "(cached) $ECHO_C" >&6
11465else
11466 cat >conftest.$ac_ext <<_ACEOF
11467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
edfaf76d
LK
11472/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11473 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11474#define $ac_func innocuous_$ac_func
11475
572a3cc2
JD
11476/* System header to define __stub macros and hopefully few prototypes,
11477 which can conflict with char $ac_func (); below.
11478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11479 <limits.h> exists even on freestanding compilers. */
edfaf76d 11480
572a3cc2
JD
11481#ifdef __STDC__
11482# include <limits.h>
11483#else
11484# include <assert.h>
11485#endif
edfaf76d
LK
11486
11487#undef $ac_func
11488
ca81d7a0
JD
11489/* Override any GCC internal prototype to avoid an error.
11490 Use char because int might match the return type of a GCC
11491 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11492#ifdef __cplusplus
11493extern "C"
572a3cc2 11494#endif
572a3cc2
JD
11495char $ac_func ();
11496/* The GNU C library defines this for functions which it implements
11497 to always fail with ENOSYS. Some functions are actually named
11498 something starting with __ and the normal name is an alias. */
ca81d7a0 11499#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11500choke me
572a3cc2
JD
11501#endif
11502
11503int
11504main ()
11505{
ca81d7a0 11506return $ac_func ();
572a3cc2
JD
11507 ;
11508 return 0;
11509}
11510_ACEOF
11511rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11512if { (ac_try="$ac_link"
11513case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
11517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11518 (eval "$ac_link") 2>conftest.er1
572a3cc2 11519 ac_status=$?
edfaf76d
LK
11520 grep -v '^ *+' conftest.er1 >conftest.err
11521 rm -f conftest.er1
11522 cat conftest.err >&5
572a3cc2 11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11524 (exit $ac_status); } && {
11525 test -z "$ac_c_werror_flag" ||
11526 test ! -s conftest.err
11527 } && test -s conftest$ac_exeext &&
11528 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11529 eval "$as_ac_var=yes"
11530else
11531 echo "$as_me: failed program was:" >&5
11532sed 's/^/| /' conftest.$ac_ext >&5
11533
ca81d7a0 11534 eval "$as_ac_var=no"
572a3cc2 11535fi
ca81d7a0 11536
f053c89f 11537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11538 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11539fi
ca81d7a0
JD
11540ac_res=`eval echo '${'$as_ac_var'}'`
11541 { echo "$as_me:$LINENO: result: $ac_res" >&5
11542echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11543if test `eval echo '${'$as_ac_var'}'` = yes; then
11544 cat >>confdefs.h <<_ACEOF
11545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11546_ACEOF
11547 HAVE_GTK_FILE_CHOOSER=yes
11548fi
11549done
11550
11551
11552 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11553 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11554
11555cat >>confdefs.h <<\_ACEOF
11556#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11557_ACEOF
11558
b8bdffbe
JD
11559 fi
11560
11561 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11562 HAVE_GTK_AND_PTHREAD=no
11563
11564for ac_header in pthread.h
11565do
11566as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11568 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11570if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11571 echo $ECHO_N "(cached) $ECHO_C" >&6
11572fi
ca81d7a0
JD
11573ac_res=`eval echo '${'$as_ac_Header'}'`
11574 { echo "$as_me:$LINENO: result: $ac_res" >&5
11575echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11576else
11577 # Is the header compilable?
ca81d7a0
JD
11578{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11579echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11580cat >conftest.$ac_ext <<_ACEOF
11581/* confdefs.h. */
11582_ACEOF
11583cat confdefs.h >>conftest.$ac_ext
11584cat >>conftest.$ac_ext <<_ACEOF
11585/* end confdefs.h. */
11586$ac_includes_default
11587#include <$ac_header>
11588_ACEOF
11589rm -f conftest.$ac_objext
ca81d7a0
JD
11590if { (ac_try="$ac_compile"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
11595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11596 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11597 ac_status=$?
edfaf76d
LK
11598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
b8bdffbe 11601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11606 ac_header_compiler=yes
11607else
11608 echo "$as_me: failed program was:" >&5
11609sed 's/^/| /' conftest.$ac_ext >&5
11610
ca81d7a0 11611 ac_header_compiler=no
b8bdffbe 11612fi
ca81d7a0
JD
11613
11614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11615{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11616echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11617
11618# Is the header present?
ca81d7a0
JD
11619{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11620echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11621cat >conftest.$ac_ext <<_ACEOF
11622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
11627#include <$ac_header>
11628_ACEOF
ca81d7a0
JD
11629if { (ac_try="$ac_cpp conftest.$ac_ext"
11630case "(($ac_try" in
11631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11632 *) ac_try_echo=$ac_try;;
11633esac
11634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11635 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11636 ac_status=$?
11637 grep -v '^ *+' conftest.er1 >conftest.err
11638 rm -f conftest.er1
11639 cat conftest.err >&5
11640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11641 (exit $ac_status); } >/dev/null && {
11642 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11643 test ! -s conftest.err
11644 }; then
b8bdffbe
JD
11645 ac_header_preproc=yes
11646else
11647 echo "$as_me: failed program was:" >&5
11648sed 's/^/| /' conftest.$ac_ext >&5
11649
11650 ac_header_preproc=no
11651fi
ca81d7a0 11652
b8bdffbe 11653rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11654{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11655echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11656
11657# So? What about this header?
edfaf76d
LK
11658case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11659 yes:no: )
b8bdffbe
JD
11660 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11661echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11662 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11663echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11664 ac_header_preproc=yes
b8bdffbe 11665 ;;
edfaf76d 11666 no:yes:* )
b8bdffbe
JD
11667 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11668echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11669 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11670echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11671 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11672echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11673 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11674echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11675 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11676echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11677 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11678echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11679
b8bdffbe
JD
11680 ;;
11681esac
ca81d7a0
JD
11682{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11683echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11684if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11685 echo $ECHO_N "(cached) $ECHO_C" >&6
11686else
edfaf76d 11687 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11688fi
ca81d7a0
JD
11689ac_res=`eval echo '${'$as_ac_Header'}'`
11690 { echo "$as_me:$LINENO: result: $ac_res" >&5
11691echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11692
11693fi
11694if test `eval echo '${'$as_ac_Header'}'` = yes; then
11695 cat >>confdefs.h <<_ACEOF
11696#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11697_ACEOF
11698
11699fi
11700
11701done
11702
11703 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11704 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11705echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11706if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11707 echo $ECHO_N "(cached) $ECHO_C" >&6
11708else
11709 ac_check_lib_save_LIBS=$LIBS
11710LIBS="-lpthread $LIBS"
11711cat >conftest.$ac_ext <<_ACEOF
11712/* confdefs.h. */
11713_ACEOF
11714cat confdefs.h >>conftest.$ac_ext
11715cat >>conftest.$ac_ext <<_ACEOF
11716/* end confdefs.h. */
11717
ca81d7a0
JD
11718/* Override any GCC internal prototype to avoid an error.
11719 Use char because int might match the return type of a GCC
11720 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11721#ifdef __cplusplus
11722extern "C"
11723#endif
b8bdffbe
JD
11724char pthread_self ();
11725int
11726main ()
11727{
ca81d7a0 11728return pthread_self ();
b8bdffbe
JD
11729 ;
11730 return 0;
11731}
11732_ACEOF
11733rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11734if { (ac_try="$ac_link"
11735case "(($ac_try" in
11736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11737 *) ac_try_echo=$ac_try;;
11738esac
11739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11740 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11741 ac_status=$?
edfaf76d
LK
11742 grep -v '^ *+' conftest.er1 >conftest.err
11743 rm -f conftest.er1
11744 cat conftest.err >&5
b8bdffbe 11745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11746 (exit $ac_status); } && {
11747 test -z "$ac_c_werror_flag" ||
11748 test ! -s conftest.err
11749 } && test -s conftest$ac_exeext &&
11750 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11751 ac_cv_lib_pthread_pthread_self=yes
11752else
11753 echo "$as_me: failed program was:" >&5
11754sed 's/^/| /' conftest.$ac_ext >&5
11755
ca81d7a0 11756 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11757fi
ca81d7a0 11758
f053c89f 11759rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11760 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11761LIBS=$ac_check_lib_save_LIBS
11762fi
ca81d7a0
JD
11763{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11764echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11765if test $ac_cv_lib_pthread_pthread_self = yes; then
11766 HAVE_GTK_AND_PTHREAD=yes
11767fi
11768
11769 fi
11770 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11771 case "${canonical}" in
11772 *-hpux*) ;;
11773 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11774 esac
b8bdffbe
JD
11775
11776cat >>confdefs.h <<\_ACEOF
11777#define HAVE_GTK_AND_PTHREAD 1
11778_ACEOF
11779
11780 fi
57669b57 11781 fi
488dd4c4
JD
11782fi
11783
131e4133
MA
11784HAVE_DBUS=no
11785if test "${with_dbus}" = "yes"; then
cffe4909
MH
11786
11787 succeeded=no
11788
00b9c927 11789 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11790set dummy pkg-config; ac_word=$2
11791{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11793if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11794 echo $ECHO_N "(cached) $ECHO_C" >&6
11795else
cffe4909
MH
11796 case $PKG_CONFIG in
11797 [\\/]* | ?:[\\/]*)
11798 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11799 ;;
11800 *)
11801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11802for as_dir in $PATH
11803do
11804 IFS=$as_save_IFS
11805 test -z "$as_dir" && as_dir=.
11806 for ac_exec_ext in '' $ac_executable_extensions; do
11807 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11808 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11809 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11810 break 2
11811 fi
11812done
11813done
11814IFS=$as_save_IFS
131e4133 11815
cffe4909
MH
11816 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11817 ;;
131e4133 11818esac
cffe4909
MH
11819fi
11820PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11821if test -n "$PKG_CONFIG"; then
11822 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11823echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11824else
cffe4909
MH
11825 { echo "$as_me:$LINENO: result: no" >&5
11826echo "${ECHO_T}no" >&6; }
131e4133
MA
11827fi
11828
cffe4909 11829
cffe4909
MH
11830
11831 if test "$PKG_CONFIG" = "no" ; then
11832 HAVE_DBUS=no
11833 else
11834 PKG_CONFIG_MIN_VERSION=0.9.0
11835 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11836 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11837echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11838
11839 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11840 { echo "$as_me:$LINENO: result: yes" >&5
11841echo "${ECHO_T}yes" >&6; }
11842 succeeded=yes
11843
11844 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11845echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11846 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11847 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11848echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11849
11850 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11851echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11852 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11853 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11854echo "${ECHO_T}$DBUS_LIBS" >&6; }
11855 else
11856 { echo "$as_me:$LINENO: result: no" >&5
11857echo "${ECHO_T}no" >&6; }
11858 DBUS_CFLAGS=""
11859 DBUS_LIBS=""
11860 ## If we have a custom action on failure, don't print errors, but
11861 ## do set a variable so people can do so.
11862 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11863
11864 fi
11865
11866
11867
11868 else
11869 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11870 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11871 fi
11872 fi
11873
11874 if test $succeeded = yes; then
11875 HAVE_DBUS=yes
11876 else
11877 HAVE_DBUS=no
11878 fi
131e4133
MA
11879
11880 if test "$HAVE_DBUS" = yes; then
11881
11882cat >>confdefs.h <<\_ACEOF
11883#define HAVE_DBUS 1
11884_ACEOF
11885
131e4133
MA
11886 fi
11887fi
11888
b3615392 11889HAVE_XAW3D=no
991a7602 11890if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11891 if test "$with_xaw3d" != no; then
11892 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11893echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11894 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11895 echo $ECHO_N "(cached) $ECHO_C" >&6
11896else
11897 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11898/* confdefs.h. */
11899_ACEOF
11900cat confdefs.h >>conftest.$ac_ext
11901cat >>conftest.$ac_ext <<_ACEOF
11902/* end confdefs.h. */
98418dba
CW
11903
11904#include <X11/Intrinsic.h>
b3615392 11905#include <X11/Xaw3d/Simple.h>
98418dba
CW
11906int
11907main ()
11908{
11909
11910 ;
11911 return 0;
11912}
11913_ACEOF
11914rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11915if { (ac_try="$ac_link"
11916case "(($ac_try" in
11917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11918 *) ac_try_echo=$ac_try;;
11919esac
11920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11921 (eval "$ac_link") 2>conftest.er1
98418dba 11922 ac_status=$?
edfaf76d
LK
11923 grep -v '^ *+' conftest.er1 >conftest.err
11924 rm -f conftest.er1
11925 cat conftest.err >&5
c0d27fcc 11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11927 (exit $ac_status); } && {
11928 test -z "$ac_c_werror_flag" ||
11929 test ! -s conftest.err
11930 } && test -s conftest$ac_exeext &&
11931 $as_test_x conftest$ac_exeext; then
b3615392 11932 emacs_cv_xaw3d=yes
98418dba
CW
11933else
11934 echo "$as_me: failed program was:" >&5
19650fd6
AS
11935sed 's/^/| /' conftest.$ac_ext >&5
11936
b3615392 11937 emacs_cv_xaw3d=no
98418dba 11938fi
ca81d7a0 11939
f053c89f 11940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11941 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11942fi
11943
9d89ffd0 11944 else
f23d76bd 11945 emacs_cv_xaw3d=no
9d89ffd0 11946 fi
f23d76bd
MB
11947 if test $emacs_cv_xaw3d = yes; then
11948 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11949echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11950 USE_X_TOOLKIT=LUCID
11951 HAVE_XAW3D=yes
9d89ffd0 11952
b3615392
MB
11953cat >>confdefs.h <<\_ACEOF
11954#define HAVE_XAW3D 1
11955_ACEOF
9d89ffd0 11956
f23d76bd
MB
11957 else
11958 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11959echo "${ECHO_T}no" >&6; }
f23d76bd 11960 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11961echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11962 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11963 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11964else
b3615392 11965 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11966/* confdefs.h. */
11967_ACEOF
11968cat confdefs.h >>conftest.$ac_ext
11969cat >>conftest.$ac_ext <<_ACEOF
11970/* end confdefs.h. */
b3615392
MB
11971
11972#include <X11/Intrinsic.h>
11973#include <X11/Xaw/Simple.h>
11974int
11975main ()
11976{
11977
11978 ;
11979 return 0;
11980}
9d89ffd0 11981_ACEOF
b3615392
MB
11982rm -f conftest.$ac_objext conftest$ac_exeext
11983if { (ac_try="$ac_link"
9d89ffd0
JD
11984case "(($ac_try" in
11985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11986 *) ac_try_echo=$ac_try;;
11987esac
11988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11989 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11990 ac_status=$?
11991 grep -v '^ *+' conftest.er1 >conftest.err
11992 rm -f conftest.er1
11993 cat conftest.err >&5
11994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995 (exit $ac_status); } && {
11996 test -z "$ac_c_werror_flag" ||
11997 test ! -s conftest.err
b3615392
MB
11998 } && test -s conftest$ac_exeext &&
11999 $as_test_x conftest$ac_exeext; then
12000 emacs_cv_xaw=yes
9d89ffd0
JD
12001else
12002 echo "$as_me: failed program was:" >&5
12003sed 's/^/| /' conftest.$ac_ext >&5
12004
b3615392 12005 emacs_cv_xaw=no
9d89ffd0
JD
12006fi
12007
b3615392
MB
12008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12009 conftest$ac_exeext conftest.$ac_ext
12010fi
9d89ffd0 12011
f23d76bd
MB
12012 if test $emacs_cv_xaw = yes; then
12013 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 12014echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
12015 USE_X_TOOLKIT=LUCID
12016 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12017 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
12018echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12019 { (exit 1); exit 1; }; }
f23d76bd
MB
12020 else
12021 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 12022echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 12023 USE_X_TOOLKIT=none
98418dba 12024 fi
98418dba
CW
12025 fi
12026fi
12027
12028X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12029
12030if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12031 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12032echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12033 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12034 echo $ECHO_N "(cached) $ECHO_C" >&6
12035else
12036 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
98418dba 12042#include <X11/Intrinsic.h>
98418dba
CW
12043int
12044main ()
12045{
12046#if XtSpecificationRelease < 6
12047fail;
12048#endif
12049
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12055if { (ac_try="$ac_link"
12056case "(($ac_try" in
12057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12058 *) ac_try_echo=$ac_try;;
12059esac
12060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12061 (eval "$ac_link") 2>conftest.er1
98418dba 12062 ac_status=$?
edfaf76d
LK
12063 grep -v '^ *+' conftest.er1 >conftest.err
12064 rm -f conftest.er1
12065 cat conftest.err >&5
c0d27fcc 12066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12067 (exit $ac_status); } && {
12068 test -z "$ac_c_werror_flag" ||
12069 test ! -s conftest.err
12070 } && test -s conftest$ac_exeext &&
12071 $as_test_x conftest$ac_exeext; then
98418dba
CW
12072 emacs_cv_x11_toolkit_version_6=yes
12073else
12074 echo "$as_me: failed program was:" >&5
19650fd6
AS
12075sed 's/^/| /' conftest.$ac_ext >&5
12076
ca81d7a0 12077 emacs_cv_x11_toolkit_version_6=no
98418dba 12078fi
ca81d7a0 12079
f053c89f 12080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12081 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12082fi
12083
12084 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12085 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12086 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12087echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12088
c0d27fcc 12089cat >>confdefs.h <<\_ACEOF
98418dba 12090#define HAVE_X11XTR6 1
c0d27fcc 12091_ACEOF
98418dba
CW
12092
12093 else
ca81d7a0
JD
12094 { echo "$as_me:$LINENO: result: before 6" >&5
12095echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12096 fi
12097
12098 OLDLIBS="$LIBS"
12099 if test x$HAVE_X11XTR6 = xyes; then
12100 LIBS="-lXt -lSM -lICE $LIBS"
12101 else
12102 LIBS="-lXt $LIBS"
12103 fi
12104
ca81d7a0
JD
12105{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12106echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12107if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12108 echo $ECHO_N "(cached) $ECHO_C" >&6
12109else
12110 ac_check_lib_save_LIBS=$LIBS
12111LIBS="-lXmu $LIBS"
12112cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12113/* confdefs.h. */
12114_ACEOF
12115cat confdefs.h >>conftest.$ac_ext
12116cat >>conftest.$ac_ext <<_ACEOF
12117/* end confdefs.h. */
98418dba 12118
ca81d7a0
JD
12119/* Override any GCC internal prototype to avoid an error.
12120 Use char because int might match the return type of a GCC
12121 builtin and then its argument prototype would still apply. */
98418dba
CW
12122#ifdef __cplusplus
12123extern "C"
12124#endif
98418dba 12125char XmuConvertStandardSelection ();
98418dba
CW
12126int
12127main ()
12128{
ca81d7a0 12129return XmuConvertStandardSelection ();
98418dba
CW
12130 ;
12131 return 0;
12132}
12133_ACEOF
12134rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12135if { (ac_try="$ac_link"
12136case "(($ac_try" in
12137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12138 *) ac_try_echo=$ac_try;;
12139esac
12140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12141 (eval "$ac_link") 2>conftest.er1
98418dba 12142 ac_status=$?
edfaf76d
LK
12143 grep -v '^ *+' conftest.er1 >conftest.err
12144 rm -f conftest.er1
12145 cat conftest.err >&5
c0d27fcc 12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12147 (exit $ac_status); } && {
12148 test -z "$ac_c_werror_flag" ||
12149 test ! -s conftest.err
12150 } && test -s conftest$ac_exeext &&
12151 $as_test_x conftest$ac_exeext; then
98418dba
CW
12152 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12153else
12154 echo "$as_me: failed program was:" >&5
19650fd6
AS
12155sed 's/^/| /' conftest.$ac_ext >&5
12156
ca81d7a0 12157 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12158fi
ca81d7a0 12159
f053c89f 12160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12161 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12162LIBS=$ac_check_lib_save_LIBS
12163fi
ca81d7a0
JD
12164{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12165echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12166if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12167 cat >>confdefs.h <<_ACEOF
98418dba 12168#define HAVE_LIBXMU 1
c0d27fcc 12169_ACEOF
98418dba
CW
12170
12171 LIBS="-lXmu $LIBS"
12172
12173fi
12174
12175 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12176fi
12177
12178# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12179if test "${HAVE_X11}" = "yes"; then
12180 if test "${USE_X_TOOLKIT}" != "none"; then
12181
ca81d7a0
JD
12182{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12183echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12184if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12185 echo $ECHO_N "(cached) $ECHO_C" >&6
12186else
12187 ac_check_lib_save_LIBS=$LIBS
12188LIBS="-lXext $LIBS"
12189cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12190/* confdefs.h. */
12191_ACEOF
12192cat confdefs.h >>conftest.$ac_ext
12193cat >>conftest.$ac_ext <<_ACEOF
12194/* end confdefs.h. */
98418dba 12195
ca81d7a0
JD
12196/* Override any GCC internal prototype to avoid an error.
12197 Use char because int might match the return type of a GCC
12198 builtin and then its argument prototype would still apply. */
98418dba
CW
12199#ifdef __cplusplus
12200extern "C"
12201#endif
98418dba 12202char XShapeQueryExtension ();
98418dba
CW
12203int
12204main ()
12205{
ca81d7a0 12206return XShapeQueryExtension ();
98418dba
CW
12207 ;
12208 return 0;
12209}
12210_ACEOF
12211rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12212if { (ac_try="$ac_link"
12213case "(($ac_try" in
12214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12215 *) ac_try_echo=$ac_try;;
12216esac
12217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12218 (eval "$ac_link") 2>conftest.er1
98418dba 12219 ac_status=$?
edfaf76d
LK
12220 grep -v '^ *+' conftest.er1 >conftest.err
12221 rm -f conftest.er1
12222 cat conftest.err >&5
c0d27fcc 12223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12224 (exit $ac_status); } && {
12225 test -z "$ac_c_werror_flag" ||
12226 test ! -s conftest.err
12227 } && test -s conftest$ac_exeext &&
12228 $as_test_x conftest$ac_exeext; then
98418dba
CW
12229 ac_cv_lib_Xext_XShapeQueryExtension=yes
12230else
12231 echo "$as_me: failed program was:" >&5
19650fd6
AS
12232sed 's/^/| /' conftest.$ac_ext >&5
12233
ca81d7a0 12234 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12235fi
ca81d7a0 12236
f053c89f 12237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12238 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12239LIBS=$ac_check_lib_save_LIBS
12240fi
ca81d7a0
JD
12241{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12242echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12243if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12244 cat >>confdefs.h <<_ACEOF
98418dba 12245#define HAVE_LIBXEXT 1
c0d27fcc 12246_ACEOF
98418dba
CW
12247
12248 LIBS="-lXext $LIBS"
12249
12250fi
12251
12252 fi
12253fi
12254
12255if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12256 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12257echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12258if test "${emacs_cv_motif_version_2_1+set}" = set; then
12259 echo $ECHO_N "(cached) $ECHO_C" >&6
12260else
12261 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12262/* confdefs.h. */
12263_ACEOF
12264cat confdefs.h >>conftest.$ac_ext
12265cat >>conftest.$ac_ext <<_ACEOF
12266/* end confdefs.h. */
98418dba 12267#include <Xm/Xm.h>
98418dba
CW
12268int
12269main ()
12270{
12271#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12272int x = 5;
12273#else
12274Motif version prior to 2.1.
12275#endif
12276 ;
12277 return 0;
12278}
12279_ACEOF
12280rm -f conftest.$ac_objext
ca81d7a0
JD
12281if { (ac_try="$ac_compile"
12282case "(($ac_try" in
12283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12284 *) ac_try_echo=$ac_try;;
12285esac
12286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12287 (eval "$ac_compile") 2>conftest.er1
98418dba 12288 ac_status=$?
edfaf76d
LK
12289 grep -v '^ *+' conftest.er1 >conftest.err
12290 rm -f conftest.er1
12291 cat conftest.err >&5
c0d27fcc 12292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12293 (exit $ac_status); } && {
12294 test -z "$ac_c_werror_flag" ||
12295 test ! -s conftest.err
12296 } && test -s conftest.$ac_objext; then
98418dba
CW
12297 emacs_cv_motif_version_2_1=yes
12298else
12299 echo "$as_me: failed program was:" >&5
19650fd6
AS
12300sed 's/^/| /' conftest.$ac_ext >&5
12301
ca81d7a0 12302 emacs_cv_motif_version_2_1=no
98418dba 12303fi
ca81d7a0
JD
12304
12305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12306fi
ca81d7a0
JD
12307{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12308echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12309 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12310 if test $emacs_cv_motif_version_2_1 = yes; then
12311 HAVE_LIBXP=no
b936fae4 12312
c0d27fcc 12313cat >>confdefs.h <<\_ACEOF
98418dba 12314#define HAVE_MOTIF_2_1 1
c0d27fcc 12315_ACEOF
98418dba 12316
ca81d7a0
JD
12317 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12318echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12319if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12320 echo $ECHO_N "(cached) $ECHO_C" >&6
12321else
12322 ac_check_lib_save_LIBS=$LIBS
12323LIBS="-lXp $LIBS"
12324cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12325/* confdefs.h. */
12326_ACEOF
12327cat confdefs.h >>conftest.$ac_ext
12328cat >>conftest.$ac_ext <<_ACEOF
12329/* end confdefs.h. */
98418dba 12330
ca81d7a0
JD
12331/* Override any GCC internal prototype to avoid an error.
12332 Use char because int might match the return type of a GCC
12333 builtin and then its argument prototype would still apply. */
98418dba
CW
12334#ifdef __cplusplus
12335extern "C"
12336#endif
98418dba 12337char XpCreateContext ();
98418dba
CW
12338int
12339main ()
12340{
ca81d7a0 12341return XpCreateContext ();
98418dba
CW
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12347if { (ac_try="$ac_link"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
12352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12353 (eval "$ac_link") 2>conftest.er1
98418dba 12354 ac_status=$?
edfaf76d
LK
12355 grep -v '^ *+' conftest.er1 >conftest.err
12356 rm -f conftest.er1
12357 cat conftest.err >&5
c0d27fcc 12358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12359 (exit $ac_status); } && {
12360 test -z "$ac_c_werror_flag" ||
12361 test ! -s conftest.err
12362 } && test -s conftest$ac_exeext &&
12363 $as_test_x conftest$ac_exeext; then
98418dba
CW
12364 ac_cv_lib_Xp_XpCreateContext=yes
12365else
12366 echo "$as_me: failed program was:" >&5
19650fd6
AS
12367sed 's/^/| /' conftest.$ac_ext >&5
12368
ca81d7a0 12369 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12370fi
ca81d7a0 12371
f053c89f 12372rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12373 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12374LIBS=$ac_check_lib_save_LIBS
12375fi
ca81d7a0
JD
12376{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12377echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12378if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12379 HAVE_LIBXP=yes
12380fi
503d2be0 12381
98418dba 12382 if test ${HAVE_LIBXP} = yes; then
b936fae4 12383
c0d27fcc 12384cat >>confdefs.h <<\_ACEOF
98418dba 12385#define HAVE_LIBXP 1
c0d27fcc 12386_ACEOF
503d2be0 12387
98418dba 12388 fi
4693dbc9 12389 else
ca81d7a0
JD
12390 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12391echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12392if test "${emacs_cv_lesstif+set}" = set; then
12393 echo $ECHO_N "(cached) $ECHO_C" >&6
12394else
12395 # We put this in CFLAGS temporarily to precede other -I options
12396 # that might be in CFLAGS temporarily.
12397 # We put this in CPPFLAGS where it precedes the other -I options.
12398 OLD_CPPFLAGS=$CPPFLAGS
12399 OLD_CFLAGS=$CFLAGS
12400 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12401 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12402 cat >conftest.$ac_ext <<_ACEOF
12403/* confdefs.h. */
12404_ACEOF
12405cat confdefs.h >>conftest.$ac_ext
12406cat >>conftest.$ac_ext <<_ACEOF
12407/* end confdefs.h. */
12408#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12409int
12410main ()
12411{
12412int x = 5;
12413 ;
12414 return 0;
12415}
12416_ACEOF
12417rm -f conftest.$ac_objext
ca81d7a0
JD
12418if { (ac_try="$ac_compile"
12419case "(($ac_try" in
12420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12421 *) ac_try_echo=$ac_try;;
12422esac
12423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12424 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12425 ac_status=$?
edfaf76d
LK
12426 grep -v '^ *+' conftest.er1 >conftest.err
12427 rm -f conftest.er1
12428 cat conftest.err >&5
4693dbc9 12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12430 (exit $ac_status); } && {
12431 test -z "$ac_c_werror_flag" ||
12432 test ! -s conftest.err
12433 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12434 emacs_cv_lesstif=yes
12435else
12436 echo "$as_me: failed program was:" >&5
12437sed 's/^/| /' conftest.$ac_ext >&5
12438
ca81d7a0 12439 emacs_cv_lesstif=no
4693dbc9 12440fi
ca81d7a0
JD
12441
12442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12443fi
ca81d7a0
JD
12444{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12445echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12446 if test $emacs_cv_lesstif = yes; then
12447 # Make sure this -I option remains in CPPFLAGS after it is set
12448 # back to REAL_CPPFLAGS.
12449 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12450 # have those other -I options anyway. Ultimately, having this
12451 # directory ultimately in CPPFLAGS will be enough.
12452 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12453 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12454 else
12455 CFLAGS=$OLD_CFLAGS
12456 CPPFLAGS=$OLD_CPPFLAGS
12457 fi
98418dba
CW
12458 fi
12459fi
12460
c0d27fcc
MR
12461
12462
98418dba
CW
12463USE_TOOLKIT_SCROLL_BARS=no
12464if test "${with_toolkit_scroll_bars}" != "no"; then
12465 if test "${USE_X_TOOLKIT}" != "none"; then
12466 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12467 cat >>confdefs.h <<\_ACEOF
98418dba 12468#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12469_ACEOF
98418dba
CW
12470
12471 HAVE_XAW3D=no
12472 USE_TOOLKIT_SCROLL_BARS=yes
12473 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12474 cat >>confdefs.h <<\_ACEOF
98418dba 12475#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12476_ACEOF
98418dba
CW
12477
12478 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12479 fi
488dd4c4
JD
12480 elif test "${HAVE_GTK}" = "yes"; then
12481 cat >>confdefs.h <<\_ACEOF
12482#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12483_ACEOF
12484
12485 USE_TOOLKIT_SCROLL_BARS=yes
12486 elif test "${HAVE_CARBON}" = "yes"; then
12487 cat >>confdefs.h <<\_ACEOF
12488#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12489_ACEOF
12490
12491 USE_TOOLKIT_SCROLL_BARS=yes
12492 elif test "${HAVE_NS}" = "yes"; then
12493 cat >>confdefs.h <<\_ACEOF
12494#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12495_ACEOF
12496
12497 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12498 fi
12499fi
12500
abd39b57 12501cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12502/* confdefs.h. */
12503_ACEOF
12504cat confdefs.h >>conftest.$ac_ext
12505cat >>conftest.$ac_ext <<_ACEOF
12506/* end confdefs.h. */
12507
12508 #include <X11/Xlib.h>
12509 #include <X11/Xresource.h>
12510int
12511main ()
12512{
12513XIMProc callback;
12514 ;
12515 return 0;
12516}
12517_ACEOF
12518rm -f conftest.$ac_objext
ca81d7a0
JD
12519if { (ac_try="$ac_compile"
12520case "(($ac_try" in
12521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12522 *) ac_try_echo=$ac_try;;
12523esac
12524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12525 (eval "$ac_compile") 2>conftest.er1
abd39b57 12526 ac_status=$?
edfaf76d
LK
12527 grep -v '^ *+' conftest.er1 >conftest.err
12528 rm -f conftest.er1
12529 cat conftest.err >&5
abd39b57 12530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12531 (exit $ac_status); } && {
12532 test -z "$ac_c_werror_flag" ||
12533 test ! -s conftest.err
12534 } && test -s conftest.$ac_objext; then
abd39b57
AC
12535 HAVE_XIM=yes
12536
12537cat >>confdefs.h <<\_ACEOF
12538#define HAVE_XIM 1
12539_ACEOF
12540
12541else
12542 echo "$as_me: failed program was:" >&5
12543sed 's/^/| /' conftest.$ac_ext >&5
12544
ca81d7a0 12545 HAVE_XIM=no
abd39b57 12546fi
ca81d7a0
JD
12547
12548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12549
c0d27fcc 12550
98418dba 12551if test "${with_xim}" != "no"; then
b936fae4 12552
c0d27fcc 12553cat >>confdefs.h <<\_ACEOF
98418dba 12554#define USE_XIM 1
c0d27fcc 12555_ACEOF
98418dba 12556
793fa0d7 12557fi
abd39b57
AC
12558
12559
12560if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12561 late_CFLAGS=$CFLAGS
12562 if test "$GCC" = yes; then
12563 CFLAGS="$CFLAGS --pedantic-errors"
12564 fi
cffcede7 12565 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12566/* confdefs.h. */
12567_ACEOF
12568cat confdefs.h >>conftest.$ac_ext
12569cat >>conftest.$ac_ext <<_ACEOF
12570/* end confdefs.h. */
cffcede7
JD
12571
12572#include <X11/Xlib.h>
12573#include <X11/Xresource.h>
12574int
12575main ()
12576{
12577Display *display;
12578XrmDatabase db;
12579char *res_name;
12580char *res_class;
12581XIMProc callback;
12582XPointer *client_data;
849d80cf
DL
12583#ifndef __GNUC__
12584/* If we're not using GCC, it's probably not XFree86, and this is
12585 probably right, but we can't use something like --pedantic-errors. */
12586extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12587 char*, XIMProc, XPointer*);
12588#endif
cffcede7
JD
12589(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12590 client_data);
12591 ;
12592 return 0;
12593}
12594_ACEOF
12595rm -f conftest.$ac_objext
ca81d7a0
JD
12596if { (ac_try="$ac_compile"
12597case "(($ac_try" in
12598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12599 *) ac_try_echo=$ac_try;;
12600esac
12601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12602 (eval "$ac_compile") 2>conftest.er1
cffcede7 12603 ac_status=$?
edfaf76d
LK
12604 grep -v '^ *+' conftest.er1 >conftest.err
12605 rm -f conftest.er1
12606 cat conftest.err >&5
cffcede7 12607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12608 (exit $ac_status); } && {
12609 test -z "$ac_c_werror_flag" ||
12610 test ! -s conftest.err
12611 } && test -s conftest.$ac_objext; then
cffcede7
JD
12612 emacs_cv_arg6_star=yes
12613else
12614 echo "$as_me: failed program was:" >&5
19650fd6
AS
12615sed 's/^/| /' conftest.$ac_ext >&5
12616
ca81d7a0 12617
cffcede7 12618fi
ca81d7a0
JD
12619
12620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12621
12622 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12623 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12624#define XRegisterIMInstantiateCallback_arg6 XPointer*
12625_ACEOF
12626
12627 else
f57bd967 12628 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12629#define XRegisterIMInstantiateCallback_arg6 XPointer
12630_ACEOF
12631
12632 fi
849d80cf 12633 CFLAGS=$late_CFLAGS
45a4b03e
KH
12634fi
12635
77dfeef5 12636### Start of font-backend section.
45a4b03e 12637
b8bdd8c9
KH
12638## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12639HAVE_XFT=maybe
12640if test "x${with_freetype}" = "xno"; then
12641 with_xft="no";
12642fi
12643if test "x${with_xft}" != "xno"; then
45a4b03e 12644
45a4b03e
KH
12645
12646 succeeded=no
12647
d235ca2f 12648 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12649set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12650{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12651echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12652if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
12654else
12655 case $PKG_CONFIG in
12656 [\\/]* | ?:[\\/]*)
12657 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12658 ;;
12659 *)
12660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12661for as_dir in $PATH
12662do
12663 IFS=$as_save_IFS
12664 test -z "$as_dir" && as_dir=.
12665 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12667 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12669 break 2
12670 fi
12671done
12672done
c24fa7dc 12673IFS=$as_save_IFS
45a4b03e
KH
12674
12675 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12676 ;;
12677esac
12678fi
12679PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12680if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12681 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12682echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12683else
c24fa7dc
MB
12684 { echo "$as_me:$LINENO: result: no" >&5
12685echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12686fi
12687
c24fa7dc 12688
45a4b03e
KH
12689
12690 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12691 HAVE_XFT=no
45a4b03e
KH
12692 else
12693 PKG_CONFIG_MIN_VERSION=0.9.0
12694 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12695 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12696echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12697
c24fa7dc
MB
12698 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12699 { echo "$as_me:$LINENO: result: yes" >&5
12700echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12701 succeeded=yes
12702
c24fa7dc
MB
12703 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12704echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12705 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12706 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12707echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12708
c24fa7dc
MB
12709 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12710echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12711 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12712 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12713echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12714 else
c24fa7dc
MB
12715 { echo "$as_me:$LINENO: result: no" >&5
12716echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12717 XFT_CFLAGS=""
12718 XFT_LIBS=""
12719 ## If we have a custom action on failure, don't print errors, but
12720 ## do set a variable so people can do so.
12721 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12722
12723 fi
12724
12725
12726
12727 else
12728 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12729 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12730 fi
12731 fi
12732
12733 if test $succeeded = yes; then
12734 :
12735 else
12736 HAVE_XFT=no
12737 fi
12738
b8bdd8c9
KH
12739 if test "$HAVE_XFT" != no; then
12740 OLD_CPPFLAGS="$CPPFLAGS"
12741 OLD_CFLAGS="$CFLAGS"
12742 OLD_LIBS="$LIBS"
12743 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12744 CFLAGS="$CFLAGS $XFT_CFLAGS"
12745 LIBS="$XFT_LIBS $LIBS"
12746 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12747 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12748echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12749if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12750 echo $ECHO_N "(cached) $ECHO_C" >&6
12751fi
c24fa7dc
MB
12752{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12753echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12754else
12755 # Is the header compilable?
c24fa7dc
MB
12756{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12757echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12758cat >conftest.$ac_ext <<_ACEOF
12759/* confdefs.h. */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h. */
12764$ac_includes_default
12765#include <X11/Xft/Xft.h>
12766_ACEOF
12767rm -f conftest.$ac_objext
c24fa7dc
MB
12768if { (ac_try="$ac_compile"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
12773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12774 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12775 ac_status=$?
12776 grep -v '^ *+' conftest.er1 >conftest.err
12777 rm -f conftest.er1
12778 cat conftest.err >&5
12779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12780 (exit $ac_status); } && {
12781 test -z "$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12784 ac_header_compiler=yes
12785else
12786 echo "$as_me: failed program was:" >&5
12787sed 's/^/| /' conftest.$ac_ext >&5
12788
c24fa7dc 12789 ac_header_compiler=no
45a4b03e 12790fi
c24fa7dc
MB
12791
12792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12793{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12794echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12795
12796# Is the header present?
c24fa7dc
MB
12797{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12798echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12799cat >conftest.$ac_ext <<_ACEOF
12800/* confdefs.h. */
12801_ACEOF
12802cat confdefs.h >>conftest.$ac_ext
12803cat >>conftest.$ac_ext <<_ACEOF
12804/* end confdefs.h. */
12805#include <X11/Xft/Xft.h>
12806_ACEOF
c24fa7dc
MB
12807if { (ac_try="$ac_cpp conftest.$ac_ext"
12808case "(($ac_try" in
12809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12810 *) ac_try_echo=$ac_try;;
12811esac
12812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12813 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12814 ac_status=$?
12815 grep -v '^ *+' conftest.er1 >conftest.err
12816 rm -f conftest.er1
12817 cat conftest.err >&5
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12819 (exit $ac_status); } >/dev/null && {
12820 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12821 test ! -s conftest.err
12822 }; then
45a4b03e
KH
12823 ac_header_preproc=yes
12824else
12825 echo "$as_me: failed program was:" >&5
12826sed 's/^/| /' conftest.$ac_ext >&5
12827
12828 ac_header_preproc=no
12829fi
c24fa7dc 12830
45a4b03e 12831rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12832{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12833echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12834
12835# So? What about this header?
12836case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12837 yes:no: )
12838 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12839echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12840 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12841echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12842 ac_header_preproc=yes
12843 ;;
12844 no:yes:* )
12845 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12846echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12847 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12848echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12849 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12850echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12851 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12852echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12853 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12854echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12855 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12856echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12857
45a4b03e
KH
12858 ;;
12859esac
c24fa7dc
MB
12860{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12861echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12862if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12863 echo $ECHO_N "(cached) $ECHO_C" >&6
12864else
12865 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12866fi
c24fa7dc
MB
12867{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12868echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12869
12870fi
12871if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12872 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12873echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12874if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12875 echo $ECHO_N "(cached) $ECHO_C" >&6
12876else
12877 ac_check_lib_save_LIBS=$LIBS
12878LIBS="-lXft $XFT_LIBS $LIBS"
12879cat >conftest.$ac_ext <<_ACEOF
12880/* confdefs.h. */
12881_ACEOF
12882cat confdefs.h >>conftest.$ac_ext
12883cat >>conftest.$ac_ext <<_ACEOF
12884/* end confdefs.h. */
12885
c24fa7dc
MB
12886/* Override any GCC internal prototype to avoid an error.
12887 Use char because int might match the return type of a GCC
12888 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12889#ifdef __cplusplus
12890extern "C"
12891#endif
45a4b03e
KH
12892char XftFontOpen ();
12893int
12894main ()
12895{
c24fa7dc 12896return XftFontOpen ();
45a4b03e
KH
12897 ;
12898 return 0;
12899}
12900_ACEOF
12901rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12902if { (ac_try="$ac_link"
12903case "(($ac_try" in
12904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12905 *) ac_try_echo=$ac_try;;
12906esac
12907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12908 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12909 ac_status=$?
12910 grep -v '^ *+' conftest.er1 >conftest.err
12911 rm -f conftest.er1
12912 cat conftest.err >&5
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12914 (exit $ac_status); } && {
12915 test -z "$ac_c_werror_flag" ||
12916 test ! -s conftest.err
12917 } && test -s conftest$ac_exeext &&
12918 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12919 ac_cv_lib_Xft_XftFontOpen=yes
12920else
12921 echo "$as_me: failed program was:" >&5
12922sed 's/^/| /' conftest.$ac_ext >&5
12923
c24fa7dc 12924 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12925fi
c24fa7dc
MB
12926
12927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12928 conftest$ac_exeext conftest.$ac_ext
12929LIBS=$ac_check_lib_save_LIBS
12930fi
c24fa7dc
MB
12931{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12932echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12933if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12934 HAVE_XFT=yes
12935fi
12936
12937fi
12938
12939
12940
b8bdd8c9 12941 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12942
12943cat >>confdefs.h <<\_ACEOF
12944#define HAVE_XFT 1
12945_ACEOF
12946
12947
b8bdd8c9
KH
12948 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12949 else
12950 CPPFLAGS="$OLD_CPPFLAGS"
12951 CFLAGS="$OLD_CFLAGS"
12952 LIBS="$OLD_LIBS"
12953 fi # "${HAVE_XFT}" = "yes"
12954 fi # "$HAVE_XFT" != no
12955fi # "x${with_xft}" != "xno"
2ee27f27 12956
b8bdd8c9
KH
12957if test "$HAVE_XFT" != "yes"; then
12958 HAVE_XFT=no
12959fi
45a4b03e 12960
b8bdd8c9
KH
12961
12962HAVE_FREETYPE=no
12963### Use -lfreetype if available, unless `--with-freetype=no'.
12964if test "${HAVE_XFT}" = "yes"; then
12965 HAVE_FREETYPE=yes
12966elif test "x${with_freetype}" != "xno"; then
45a4b03e 12967
d235ca2f 12968
45a4b03e
KH
12969 succeeded=no
12970
d235ca2f 12971 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12972set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12973{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12974echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12975if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12976 echo $ECHO_N "(cached) $ECHO_C" >&6
12977else
12978 case $PKG_CONFIG in
12979 [\\/]* | ?:[\\/]*)
12980 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12981 ;;
12982 *)
12983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12984for as_dir in $PATH
12985do
12986 IFS=$as_save_IFS
12987 test -z "$as_dir" && as_dir=.
12988 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12990 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12991 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12992 break 2
12993 fi
12994done
12995done
c24fa7dc 12996IFS=$as_save_IFS
45a4b03e
KH
12997
12998 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12999 ;;
13000esac
13001fi
13002PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13003if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13004 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13005echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13006else
c24fa7dc
MB
13007 { echo "$as_me:$LINENO: result: no" >&5
13008echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13009fi
13010
c24fa7dc 13011
45a4b03e
KH
13012
13013 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13014 HAVE_FREETYPE=no
45a4b03e
KH
13015 else
13016 PKG_CONFIG_MIN_VERSION=0.9.0
13017 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13018 { echo "$as_me:$LINENO: checking for freetype2" >&5
13019echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13020
c24fa7dc
MB
13021 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13022 { echo "$as_me:$LINENO: result: yes" >&5
13023echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13024 succeeded=yes
13025
c24fa7dc
MB
13026 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13027echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13028 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13029 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13030echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13031
c24fa7dc
MB
13032 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13033echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13034 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13035 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13036echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13037 else
c24fa7dc
MB
13038 { echo "$as_me:$LINENO: result: no" >&5
13039echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13040 FREETYPE_CFLAGS=""
13041 FREETYPE_LIBS=""
13042 ## If we have a custom action on failure, don't print errors, but
13043 ## do set a variable so people can do so.
13044 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13045
13046 fi
13047
13048
13049
13050 else
13051 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13052 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13053 fi
13054 fi
13055
13056 if test $succeeded = yes; then
13057 HAVE_FREETYPE=yes
13058 else
13059 HAVE_FREETYPE=no
13060 fi
13061
b8bdd8c9 13062 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13063
13064 succeeded=no
13065
d235ca2f 13066 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13067set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13068{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13069echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13070if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13071 echo $ECHO_N "(cached) $ECHO_C" >&6
13072else
13073 case $PKG_CONFIG in
13074 [\\/]* | ?:[\\/]*)
13075 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13076 ;;
13077 *)
13078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13079for as_dir in $PATH
13080do
13081 IFS=$as_save_IFS
13082 test -z "$as_dir" && as_dir=.
13083 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13085 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13087 break 2
13088 fi
13089done
13090done
c24fa7dc 13091IFS=$as_save_IFS
45a4b03e
KH
13092
13093 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13094 ;;
13095esac
13096fi
13097PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13098if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13099 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13100echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13101else
c24fa7dc
MB
13102 { echo "$as_me:$LINENO: result: no" >&5
13103echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13104fi
13105
c24fa7dc 13106
45a4b03e
KH
13107
13108 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13109 HAVE_FC=no
45a4b03e
KH
13110 else
13111 PKG_CONFIG_MIN_VERSION=0.9.0
13112 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13113 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13114echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13115
c24fa7dc
MB
13116 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13117 { echo "$as_me:$LINENO: result: yes" >&5
13118echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13119 succeeded=yes
13120
c24fa7dc
MB
13121 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13122echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13123 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13124 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13125echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13126
c24fa7dc
MB
13127 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13128echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13129 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13130 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13131echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13132 else
c24fa7dc
MB
13133 { echo "$as_me:$LINENO: result: no" >&5
13134echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13135 FONTCONFIG_CFLAGS=""
13136 FONTCONFIG_LIBS=""
13137 ## If we have a custom action on failure, don't print errors, but
13138 ## do set a variable so people can do so.
13139 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13140
13141 fi
13142
13143
13144
13145 else
13146 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13147 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13148 fi
13149 fi
13150
13151 if test $succeeded = yes; then
13152 HAVE_FC=yes
13153 else
13154 HAVE_FC=no
13155 fi
13156
b8bdd8c9
KH
13157 if test "${HAVE_FC}" = "no"; then
13158 HAVE_FREETYPE=no
45a4b03e
KH
13159 fi
13160 fi
b8bdd8c9 13161fi
e70b2110 13162
b8bdd8c9
KH
13163HAVE_LIBOTF=no
13164if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13165
13166cat >>confdefs.h <<\_ACEOF
13167#define HAVE_FREETYPE 1
13168_ACEOF
13169
b8bdd8c9 13170 if test "${with_libotf}" != "no"; then
e70b2110
KH
13171
13172 succeeded=no
13173
d235ca2f 13174 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13175set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13176{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13177echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13178if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13179 echo $ECHO_N "(cached) $ECHO_C" >&6
13180else
e70b2110
KH
13181 case $PKG_CONFIG in
13182 [\\/]* | ?:[\\/]*)
13183 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13184 ;;
13185 *)
13186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13187for as_dir in $PATH
13188do
13189 IFS=$as_save_IFS
13190 test -z "$as_dir" && as_dir=.
13191 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13192 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13193 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13194 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13195 break 2
13196 fi
13197done
13198done
c24fa7dc 13199IFS=$as_save_IFS
45a4b03e 13200
e70b2110
KH
13201 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13202 ;;
13203esac
45a4b03e 13204fi
e70b2110
KH
13205PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13206if test -n "$PKG_CONFIG"; then
13207 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13208echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13209else
c24fa7dc
MB
13210 { echo "$as_me:$LINENO: result: no" >&5
13211echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13212fi
13213
c24fa7dc 13214
45a4b03e 13215
e70b2110 13216 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13217 HAVE_LIBOTF=no
e70b2110
KH
13218 else
13219 PKG_CONFIG_MIN_VERSION=0.9.0
13220 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13221 { echo "$as_me:$LINENO: checking for libotf" >&5
13222echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13223
e70b2110
KH
13224 if $PKG_CONFIG --exists "libotf" 2>&5; then
13225 { echo "$as_me:$LINENO: result: yes" >&5
13226echo "${ECHO_T}yes" >&6; }
13227 succeeded=yes
6ed29d7b 13228
e70b2110
KH
13229 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13230echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13231 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13232 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13233echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13234
13235 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13236echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13237 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13238 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13239echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13240 else
13241 { echo "$as_me:$LINENO: result: no" >&5
13242echo "${ECHO_T}no" >&6; }
13243 LIBOTF_CFLAGS=""
13244 LIBOTF_LIBS=""
13245 ## If we have a custom action on failure, don't print errors, but
13246 ## do set a variable so people can do so.
13247 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13248
e70b2110 13249 fi
6ed29d7b 13250
6ed29d7b 13251
6ed29d7b 13252
e70b2110
KH
13253 else
13254 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13255 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13256 fi
13257 fi
13258
13259 if test $succeeded = yes; then
435f8bc5 13260 HAVE_LIBOTF=yes
e70b2110 13261 else
435f8bc5 13262 HAVE_LIBOTF=no
e70b2110
KH
13263 fi
13264
b8bdd8c9 13265 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13266
45a4b03e
KH
13267cat >>confdefs.h <<\_ACEOF
13268#define HAVE_LIBOTF 1
13269_ACEOF
13270
6ed29d7b 13271 fi
45a4b03e 13272 fi
b8bdd8c9 13273fi
45a4b03e 13274
b8bdd8c9
KH
13275HAVE_M17N_FLT=no
13276if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13277
13278 succeeded=no
13279
d235ca2f 13280 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13281set dummy pkg-config; ac_word=$2
13282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13284if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13285 echo $ECHO_N "(cached) $ECHO_C" >&6
13286else
13287 case $PKG_CONFIG in
13288 [\\/]* | ?:[\\/]*)
13289 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13290 ;;
13291 *)
13292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13293for as_dir in $PATH
13294do
13295 IFS=$as_save_IFS
13296 test -z "$as_dir" && as_dir=.
13297 for ac_exec_ext in '' $ac_executable_extensions; do
13298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13299 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13301 break 2
13302 fi
13303done
13304done
13305IFS=$as_save_IFS
13306
13307 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13308 ;;
13309esac
13310fi
13311PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13312if test -n "$PKG_CONFIG"; then
13313 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13314echo "${ECHO_T}$PKG_CONFIG" >&6; }
13315else
13316 { echo "$as_me:$LINENO: result: no" >&5
13317echo "${ECHO_T}no" >&6; }
13318fi
13319
13320
7f0942ba
KH
13321
13322 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13323 HAVE_M17N_FLT=no
7f0942ba
KH
13324 else
13325 PKG_CONFIG_MIN_VERSION=0.9.0
13326 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13327 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13328echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13329
13330 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13331 { echo "$as_me:$LINENO: result: yes" >&5
13332echo "${ECHO_T}yes" >&6; }
13333 succeeded=yes
13334
13335 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13336echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13337 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13338 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13339echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13340
13341 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13342echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13343 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13344 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13345echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13346 else
13347 { echo "$as_me:$LINENO: result: no" >&5
13348echo "${ECHO_T}no" >&6; }
13349 M17N_FLT_CFLAGS=""
13350 M17N_FLT_LIBS=""
13351 ## If we have a custom action on failure, don't print errors, but
13352 ## do set a variable so people can do so.
13353 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13354
13355 fi
13356
13357
13358
13359 else
13360 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13361 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13362 fi
13363 fi
13364
13365 if test $succeeded = yes; then
435f8bc5 13366 HAVE_M17N_FLT=yes
7f0942ba 13367 else
435f8bc5 13368 HAVE_M17N_FLT=no
7f0942ba
KH
13369 fi
13370
b8bdd8c9 13371 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13372
13373cat >>confdefs.h <<\_ACEOF
13374#define HAVE_M17N_FLT 1
13375_ACEOF
13376
e70b2110 13377 fi
b8bdd8c9 13378fi
e70b2110
KH
13379
13380
13381
13382
13383
13384
13385
7f0942ba
KH
13386
13387
7f0942ba 13388
77dfeef5 13389### End of font-backend section.
98418dba
CW
13390
13391### Use -lXpm if available, unless `--with-xpm=no'.
13392HAVE_XPM=no
13393if test "${HAVE_X11}" = "yes"; then
13394 if test "${with_xpm}" != "no"; then
c0d27fcc 13395 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13396 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13397echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13398if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13399 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13400fi
4c34eeee
MB
13401{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13402echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13403else
c0d27fcc 13404 # Is the header compilable?
4c34eeee
MB
13405{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13406echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13408/* confdefs.h. */
13409_ACEOF
13410cat confdefs.h >>conftest.$ac_ext
13411cat >>conftest.$ac_ext <<_ACEOF
13412/* end confdefs.h. */
c0d27fcc
MR
13413$ac_includes_default
13414#include <X11/xpm.h>
13415_ACEOF
13416rm -f conftest.$ac_objext
4c34eeee
MB
13417if { (ac_try="$ac_compile"
13418case "(($ac_try" in
13419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13420 *) ac_try_echo=$ac_try;;
13421esac
13422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13423 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13424 ac_status=$?
edfaf76d
LK
13425 grep -v '^ *+' conftest.er1 >conftest.err
13426 rm -f conftest.er1
13427 cat conftest.err >&5
c0d27fcc 13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13429 (exit $ac_status); } && {
13430 test -z "$ac_c_werror_flag" ||
13431 test ! -s conftest.err
13432 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13433 ac_header_compiler=yes
13434else
13435 echo "$as_me: failed program was:" >&5
19650fd6
AS
13436sed 's/^/| /' conftest.$ac_ext >&5
13437
4c34eeee 13438 ac_header_compiler=no
c0d27fcc 13439fi
4c34eeee
MB
13440
13441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13442{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13443echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13444
13445# Is the header present?
4c34eeee
MB
13446{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13447echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13448cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13449/* confdefs.h. */
13450_ACEOF
13451cat confdefs.h >>conftest.$ac_ext
13452cat >>conftest.$ac_ext <<_ACEOF
13453/* end confdefs.h. */
98418dba
CW
13454#include <X11/xpm.h>
13455_ACEOF
4c34eeee
MB
13456if { (ac_try="$ac_cpp conftest.$ac_ext"
13457case "(($ac_try" in
13458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13459 *) ac_try_echo=$ac_try;;
13460esac
13461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13462 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13463 ac_status=$?
6bae0ccf 13464 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13465 rm -f conftest.er1
13466 cat conftest.err >&5
c0d27fcc 13467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13468 (exit $ac_status); } >/dev/null && {
13469 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13470 test ! -s conftest.err
13471 }; then
c0d27fcc 13472 ac_header_preproc=yes
98418dba
CW
13473else
13474 echo "$as_me: failed program was:" >&5
19650fd6
AS
13475sed 's/^/| /' conftest.$ac_ext >&5
13476
c0d27fcc 13477 ac_header_preproc=no
98418dba 13478fi
4c34eeee 13479
98418dba 13480rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13481{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13482echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13483
13484# So? What about this header?
edfaf76d
LK
13485case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13486 yes:no: )
c0d27fcc
MR
13487 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13488echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13489 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13490echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13491 ac_header_preproc=yes
13492 ;;
13493 no:yes:* )
13494 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13495echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13496 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13497echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13498 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13499echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13500 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13501echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13502 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13503echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13504 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13505echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13506
19650fd6 13507 ;;
c0d27fcc 13508esac
4c34eeee
MB
13509{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13510echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13511if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13512 echo $ECHO_N "(cached) $ECHO_C" >&6
13513else
13514 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13515fi
4c34eeee
MB
13516{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13517echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13518
13519fi
98418dba 13520if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13521 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13522echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13523if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13524 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13525else
98418dba
CW
13526 ac_check_lib_save_LIBS=$LIBS
13527LIBS="-lXpm -lX11 $LIBS"
13528cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
98418dba 13534
4c34eeee
MB
13535/* Override any GCC internal prototype to avoid an error.
13536 Use char because int might match the return type of a GCC
13537 builtin and then its argument prototype would still apply. */
503d2be0
AS
13538#ifdef __cplusplus
13539extern "C"
13540#endif
98418dba 13541char XpmReadFileToPixmap ();
503d2be0
AS
13542int
13543main ()
13544{
4c34eeee 13545return XpmReadFileToPixmap ();
503d2be0
AS
13546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13551if { (ac_try="$ac_link"
13552case "(($ac_try" in
13553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13554 *) ac_try_echo=$ac_try;;
13555esac
13556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13557 (eval "$ac_link") 2>conftest.er1
503d2be0 13558 ac_status=$?
edfaf76d
LK
13559 grep -v '^ *+' conftest.er1 >conftest.err
13560 rm -f conftest.er1
13561 cat conftest.err >&5
c0d27fcc 13562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13563 (exit $ac_status); } && {
13564 test -z "$ac_c_werror_flag" ||
13565 test ! -s conftest.err
13566 } && test -s conftest$ac_exeext &&
13567 $as_test_x conftest$ac_exeext; then
98418dba 13568 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13569else
13570 echo "$as_me: failed program was:" >&5
19650fd6
AS
13571sed 's/^/| /' conftest.$ac_ext >&5
13572
4c34eeee 13573 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13574fi
4c34eeee
MB
13575
13576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13577 conftest$ac_exeext conftest.$ac_ext
98418dba 13578LIBS=$ac_check_lib_save_LIBS
503d2be0 13579fi
4c34eeee
MB
13580{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13581echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13582if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13583 HAVE_XPM=yes
ba4481b5
DL
13584fi
13585
98418dba
CW
13586fi
13587
c0d27fcc 13588
98418dba 13589 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13590 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13591echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13592 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13593/* confdefs.h. */
13594_ACEOF
13595cat confdefs.h >>conftest.$ac_ext
13596cat >>conftest.$ac_ext <<_ACEOF
13597/* end confdefs.h. */
98418dba
CW
13598#include "X11/xpm.h"
13599#ifndef XpmReturnAllocPixels
13600no_return_alloc_pixels
503d2be0 13601#endif
ba4481b5 13602
98418dba
CW
13603_ACEOF
13604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13605 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13606 HAVE_XPM=no
13607else
13608 HAVE_XPM=yes
13609fi
13610rm -f conftest*
ba4481b5 13611
c0d27fcc 13612
98418dba 13613 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13614 { echo "$as_me:$LINENO: result: yes" >&5
13615echo "${ECHO_T}yes" >&6; }
98418dba 13616 else
4c34eeee
MB
13617 { echo "$as_me:$LINENO: result: no" >&5
13618echo "${ECHO_T}no" >&6; }
98418dba
CW
13619 fi
13620 fi
13621 fi
13622
13623 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13624
c0d27fcc 13625cat >>confdefs.h <<\_ACEOF
98418dba 13626#define HAVE_XPM 1
c0d27fcc 13627_ACEOF
98418dba
CW
13628
13629 fi
13630fi
13631
13632### Use -ljpeg if available, unless `--with-jpeg=no'.
13633HAVE_JPEG=no
13634if test "${HAVE_X11}" = "yes"; then
13635 if test "${with_jpeg}" != "no"; then
c0d27fcc 13636 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13637 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13638echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13639if test "${ac_cv_header_jerror_h+set}" = set; then
13640 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13641fi
ca81d7a0
JD
13642{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13643echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13644else
c0d27fcc 13645 # Is the header compilable?
ca81d7a0
JD
13646{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13647echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13648cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13649/* confdefs.h. */
13650_ACEOF
13651cat confdefs.h >>conftest.$ac_ext
13652cat >>conftest.$ac_ext <<_ACEOF
13653/* end confdefs.h. */
c0d27fcc
MR
13654$ac_includes_default
13655#include <jerror.h>
13656_ACEOF
13657rm -f conftest.$ac_objext
ca81d7a0
JD
13658if { (ac_try="$ac_compile"
13659case "(($ac_try" in
13660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13661 *) ac_try_echo=$ac_try;;
13662esac
13663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13664 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13665 ac_status=$?
edfaf76d
LK
13666 grep -v '^ *+' conftest.er1 >conftest.err
13667 rm -f conftest.er1
13668 cat conftest.err >&5
c0d27fcc 13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13670 (exit $ac_status); } && {
13671 test -z "$ac_c_werror_flag" ||
13672 test ! -s conftest.err
13673 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13674 ac_header_compiler=yes
13675else
13676 echo "$as_me: failed program was:" >&5
19650fd6
AS
13677sed 's/^/| /' conftest.$ac_ext >&5
13678
ca81d7a0 13679 ac_header_compiler=no
c0d27fcc 13680fi
ca81d7a0
JD
13681
13682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13683{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13684echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13685
13686# Is the header present?
ca81d7a0
JD
13687{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13688echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13689cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13690/* confdefs.h. */
13691_ACEOF
13692cat confdefs.h >>conftest.$ac_ext
13693cat >>conftest.$ac_ext <<_ACEOF
13694/* end confdefs.h. */
98418dba
CW
13695#include <jerror.h>
13696_ACEOF
ca81d7a0
JD
13697if { (ac_try="$ac_cpp conftest.$ac_ext"
13698case "(($ac_try" in
13699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13700 *) ac_try_echo=$ac_try;;
13701esac
13702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13703 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13704 ac_status=$?
6bae0ccf 13705 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13706 rm -f conftest.er1
13707 cat conftest.err >&5
c0d27fcc 13708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13709 (exit $ac_status); } >/dev/null && {
13710 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13711 test ! -s conftest.err
13712 }; then
c0d27fcc 13713 ac_header_preproc=yes
ba4481b5 13714else
98418dba 13715 echo "$as_me: failed program was:" >&5
19650fd6
AS
13716sed 's/^/| /' conftest.$ac_ext >&5
13717
c0d27fcc 13718 ac_header_preproc=no
98418dba 13719fi
ca81d7a0 13720
98418dba 13721rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13722{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13723echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13724
13725# So? What about this header?
edfaf76d
LK
13726case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13727 yes:no: )
c0d27fcc
MR
13728 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13729echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13730 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13731echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13732 ac_header_preproc=yes
19650fd6 13733 ;;
edfaf76d 13734 no:yes:* )
c0d27fcc
MR
13735 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13736echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13737 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13738echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13739 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13740echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13741 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13742echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13743 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13744echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13745 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13746echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13747
19650fd6 13748 ;;
c0d27fcc 13749esac
ca81d7a0
JD
13750{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13751echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13752if test "${ac_cv_header_jerror_h+set}" = set; then
13753 echo $ECHO_N "(cached) $ECHO_C" >&6
13754else
13755 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13756fi
ca81d7a0
JD
13757{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13758echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13759
13760fi
98418dba 13761if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13762 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13763echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13764if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13765 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13766else
98418dba
CW
13767 ac_check_lib_save_LIBS=$LIBS
13768LIBS="-ljpeg $LIBS"
13769cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13770/* confdefs.h. */
13771_ACEOF
13772cat confdefs.h >>conftest.$ac_ext
13773cat >>conftest.$ac_ext <<_ACEOF
13774/* end confdefs.h. */
98418dba 13775
ca81d7a0
JD
13776/* Override any GCC internal prototype to avoid an error.
13777 Use char because int might match the return type of a GCC
13778 builtin and then its argument prototype would still apply. */
98418dba
CW
13779#ifdef __cplusplus
13780extern "C"
13781#endif
98418dba 13782char jpeg_destroy_compress ();
503d2be0
AS
13783int
13784main ()
13785{
ca81d7a0 13786return jpeg_destroy_compress ();
503d2be0
AS
13787 ;
13788 return 0;
13789}
13790_ACEOF
13791rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13792if { (ac_try="$ac_link"
13793case "(($ac_try" in
13794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13795 *) ac_try_echo=$ac_try;;
13796esac
13797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13798 (eval "$ac_link") 2>conftest.er1
503d2be0 13799 ac_status=$?
edfaf76d
LK
13800 grep -v '^ *+' conftest.er1 >conftest.err
13801 rm -f conftest.er1
13802 cat conftest.err >&5
c0d27fcc 13803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13804 (exit $ac_status); } && {
13805 test -z "$ac_c_werror_flag" ||
13806 test ! -s conftest.err
13807 } && test -s conftest$ac_exeext &&
13808 $as_test_x conftest$ac_exeext; then
98418dba 13809 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13810else
503d2be0 13811 echo "$as_me: failed program was:" >&5
19650fd6
AS
13812sed 's/^/| /' conftest.$ac_ext >&5
13813
ca81d7a0 13814 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13815fi
ca81d7a0 13816
f053c89f 13817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13818 conftest$ac_exeext conftest.$ac_ext
98418dba 13819LIBS=$ac_check_lib_save_LIBS
ba4481b5 13820fi
ca81d7a0
JD
13821{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13822echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13823if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13824 HAVE_JPEG=yes
ba4481b5 13825fi
98418dba 13826
ba4481b5 13827fi
98418dba 13828
c0d27fcc 13829
ba4481b5 13830 fi
ba4481b5 13831
c0d27fcc 13832
98418dba 13833 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13834 cat >>confdefs.h <<\_ACEOF
98418dba 13835#define HAVE_JPEG 1
c0d27fcc 13836_ACEOF
98418dba
CW
13837
13838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13839/* confdefs.h. */
13840_ACEOF
13841cat confdefs.h >>conftest.$ac_ext
13842cat >>conftest.$ac_ext <<_ACEOF
13843/* end confdefs.h. */
22044edf 13844#include <jpeglib.h>
98418dba
CW
13845 version=JPEG_LIB_VERSION
13846
13847_ACEOF
13848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13849 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13850 cat >>confdefs.h <<\_ACEOF
98418dba 13851#define HAVE_JPEG 1
c0d27fcc 13852_ACEOF
ba4481b5 13853
98418dba 13854else
c0d27fcc 13855 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13856echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13857 HAVE_JPEG=no
ba4481b5 13858fi
98418dba 13859rm -f conftest*
ba4481b5 13860
98418dba
CW
13861 fi
13862fi
503d2be0 13863
98418dba
CW
13864### Use -lpng if available, unless `--with-png=no'.
13865HAVE_PNG=no
13866if test "${HAVE_X11}" = "yes"; then
13867 if test "${with_png}" != "no"; then
f57bd967
DL
13868 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13869 # in /usr/include/libpng.
13870
13871
13872for ac_header in png.h libpng/png.h
13873do
13874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13875if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13876 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13877echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13878if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13879 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13880fi
ca81d7a0
JD
13881ac_res=`eval echo '${'$as_ac_Header'}'`
13882 { echo "$as_me:$LINENO: result: $ac_res" >&5
13883echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13884else
c0d27fcc 13885 # Is the header compilable?
ca81d7a0
JD
13886{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13887echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13888cat >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. */
c0d27fcc 13894$ac_includes_default
f57bd967 13895#include <$ac_header>
c0d27fcc
MR
13896_ACEOF
13897rm -f conftest.$ac_objext
ca81d7a0
JD
13898if { (ac_try="$ac_compile"
13899case "(($ac_try" in
13900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13901 *) ac_try_echo=$ac_try;;
13902esac
13903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13904 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13905 ac_status=$?
edfaf76d
LK
13906 grep -v '^ *+' conftest.er1 >conftest.err
13907 rm -f conftest.er1
13908 cat conftest.err >&5
c0d27fcc 13909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13910 (exit $ac_status); } && {
13911 test -z "$ac_c_werror_flag" ||
13912 test ! -s conftest.err
13913 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13914 ac_header_compiler=yes
13915else
13916 echo "$as_me: failed program was:" >&5
19650fd6
AS
13917sed 's/^/| /' conftest.$ac_ext >&5
13918
ca81d7a0 13919 ac_header_compiler=no
c0d27fcc 13920fi
ca81d7a0
JD
13921
13922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13923{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13924echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13925
13926# Is the header present?
ca81d7a0
JD
13927{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13928echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13929cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13930/* confdefs.h. */
13931_ACEOF
13932cat confdefs.h >>conftest.$ac_ext
13933cat >>conftest.$ac_ext <<_ACEOF
13934/* end confdefs.h. */
f57bd967 13935#include <$ac_header>
503d2be0 13936_ACEOF
ca81d7a0
JD
13937if { (ac_try="$ac_cpp conftest.$ac_ext"
13938case "(($ac_try" in
13939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13940 *) ac_try_echo=$ac_try;;
13941esac
13942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13943 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13944 ac_status=$?
6bae0ccf 13945 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13946 rm -f conftest.er1
13947 cat conftest.err >&5
c0d27fcc 13948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13949 (exit $ac_status); } >/dev/null && {
13950 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13951 test ! -s conftest.err
13952 }; then
c0d27fcc 13953 ac_header_preproc=yes
503d2be0
AS
13954else
13955 echo "$as_me: failed program was:" >&5
19650fd6
AS
13956sed 's/^/| /' conftest.$ac_ext >&5
13957
c0d27fcc 13958 ac_header_preproc=no
ba4481b5 13959fi
ca81d7a0 13960
503d2be0 13961rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13962{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13963echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13964
13965# So? What about this header?
edfaf76d
LK
13966case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13967 yes:no: )
f57bd967
DL
13968 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13969echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13970 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13971echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13972 ac_header_preproc=yes
19650fd6 13973 ;;
edfaf76d 13974 no:yes:* )
f57bd967
DL
13975 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13976echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13977 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13978echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13979 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13980echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13981 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13982echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13983 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13984echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13985 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13986echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13987
19650fd6 13988 ;;
c0d27fcc 13989esac
ca81d7a0
JD
13990{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13991echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13992if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13993 echo $ECHO_N "(cached) $ECHO_C" >&6
13994else
edfaf76d 13995 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13996fi
ca81d7a0
JD
13997ac_res=`eval echo '${'$as_ac_Header'}'`
13998 { echo "$as_me:$LINENO: result: $ac_res" >&5
13999echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14000
ba4481b5 14001fi
f57bd967
DL
14002if test `eval echo '${'$as_ac_Header'}'` = yes; then
14003 cat >>confdefs.h <<_ACEOF
14004#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14005_ACEOF
c0d27fcc
MR
14006
14007fi
f57bd967
DL
14008
14009done
14010
14011 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
14012 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14013echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14014if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 14015 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14016else
98418dba
CW
14017 ac_check_lib_save_LIBS=$LIBS
14018LIBS="-lpng -lz -lm $LIBS"
14019cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14020/* confdefs.h. */
14021_ACEOF
14022cat confdefs.h >>conftest.$ac_ext
14023cat >>conftest.$ac_ext <<_ACEOF
14024/* end confdefs.h. */
98418dba 14025
ca81d7a0
JD
14026/* Override any GCC internal prototype to avoid an error.
14027 Use char because int might match the return type of a GCC
14028 builtin and then its argument prototype would still apply. */
503d2be0
AS
14029#ifdef __cplusplus
14030extern "C"
14031#endif
98418dba 14032char png_get_channels ();
503d2be0
AS
14033int
14034main ()
14035{
ca81d7a0 14036return png_get_channels ();
503d2be0
AS
14037 ;
14038 return 0;
14039}
14040_ACEOF
14041rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14042if { (ac_try="$ac_link"
14043case "(($ac_try" in
14044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14045 *) ac_try_echo=$ac_try;;
14046esac
14047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14048 (eval "$ac_link") 2>conftest.er1
503d2be0 14049 ac_status=$?
edfaf76d
LK
14050 grep -v '^ *+' conftest.er1 >conftest.err
14051 rm -f conftest.er1
14052 cat conftest.err >&5
c0d27fcc 14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14054 (exit $ac_status); } && {
14055 test -z "$ac_c_werror_flag" ||
14056 test ! -s conftest.err
14057 } && test -s conftest$ac_exeext &&
14058 $as_test_x conftest$ac_exeext; then
98418dba 14059 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14060else
98418dba 14061 echo "$as_me: failed program was:" >&5
19650fd6
AS
14062sed 's/^/| /' conftest.$ac_ext >&5
14063
ca81d7a0 14064 ac_cv_lib_png_png_get_channels=no
73b77ee5 14065fi
ca81d7a0 14066
f053c89f 14067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14068 conftest$ac_exeext conftest.$ac_ext
98418dba 14069LIBS=$ac_check_lib_save_LIBS
73b77ee5 14070fi
ca81d7a0
JD
14071{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14072echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14073if test $ac_cv_lib_png_png_get_channels = yes; then
14074 HAVE_PNG=yes
73b77ee5 14075fi
503d2be0 14076
f57bd967 14077 fi
98418dba
CW
14078 fi
14079
14080 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14081
c0d27fcc 14082cat >>confdefs.h <<\_ACEOF
98418dba 14083#define HAVE_PNG 1
c0d27fcc 14084_ACEOF
73b77ee5 14085
98418dba 14086 fi
73b77ee5
GM
14087fi
14088
98418dba
CW
14089### Use -ltiff if available, unless `--with-tiff=no'.
14090HAVE_TIFF=no
14091if test "${HAVE_X11}" = "yes"; then
14092 if test "${with_tiff}" != "no"; then
c0d27fcc 14093 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14094 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14095echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14096if test "${ac_cv_header_tiffio_h+set}" = set; then
14097 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14098fi
ca81d7a0
JD
14099{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14100echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14101else
c0d27fcc 14102 # Is the header compilable?
ca81d7a0
JD
14103{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14104echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14105cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14106/* confdefs.h. */
14107_ACEOF
14108cat confdefs.h >>conftest.$ac_ext
14109cat >>conftest.$ac_ext <<_ACEOF
14110/* end confdefs.h. */
c0d27fcc
MR
14111$ac_includes_default
14112#include <tiffio.h>
14113_ACEOF
14114rm -f conftest.$ac_objext
ca81d7a0
JD
14115if { (ac_try="$ac_compile"
14116case "(($ac_try" in
14117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14118 *) ac_try_echo=$ac_try;;
14119esac
14120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14121 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14122 ac_status=$?
edfaf76d
LK
14123 grep -v '^ *+' conftest.er1 >conftest.err
14124 rm -f conftest.er1
14125 cat conftest.err >&5
c0d27fcc 14126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14127 (exit $ac_status); } && {
14128 test -z "$ac_c_werror_flag" ||
14129 test ! -s conftest.err
14130 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14131 ac_header_compiler=yes
14132else
14133 echo "$as_me: failed program was:" >&5
19650fd6
AS
14134sed 's/^/| /' conftest.$ac_ext >&5
14135
ca81d7a0 14136 ac_header_compiler=no
c0d27fcc 14137fi
ca81d7a0
JD
14138
14139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14140{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14141echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14142
14143# Is the header present?
ca81d7a0
JD
14144{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14145echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14146cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14147/* confdefs.h. */
14148_ACEOF
14149cat confdefs.h >>conftest.$ac_ext
14150cat >>conftest.$ac_ext <<_ACEOF
14151/* end confdefs.h. */
98418dba
CW
14152#include <tiffio.h>
14153_ACEOF
ca81d7a0
JD
14154if { (ac_try="$ac_cpp conftest.$ac_ext"
14155case "(($ac_try" in
14156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14157 *) ac_try_echo=$ac_try;;
14158esac
14159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14160 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14161 ac_status=$?
6bae0ccf 14162 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14163 rm -f conftest.er1
14164 cat conftest.err >&5
c0d27fcc 14165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14166 (exit $ac_status); } >/dev/null && {
14167 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14168 test ! -s conftest.err
14169 }; then
c0d27fcc 14170 ac_header_preproc=yes
98418dba
CW
14171else
14172 echo "$as_me: failed program was:" >&5
19650fd6
AS
14173sed 's/^/| /' conftest.$ac_ext >&5
14174
c0d27fcc 14175 ac_header_preproc=no
98418dba 14176fi
ca81d7a0 14177
98418dba 14178rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14179{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14180echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14181
14182# So? What about this header?
edfaf76d
LK
14183case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14184 yes:no: )
c0d27fcc
MR
14185 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14186echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14187 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14188echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14189 ac_header_preproc=yes
19650fd6 14190 ;;
edfaf76d 14191 no:yes:* )
c0d27fcc
MR
14192 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14193echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14194 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14195echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14196 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14197echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14198 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14199echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14200 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14201echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14202 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14203echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14204
19650fd6 14205 ;;
c0d27fcc 14206esac
ca81d7a0
JD
14207{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14208echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14209if test "${ac_cv_header_tiffio_h+set}" = set; then
14210 echo $ECHO_N "(cached) $ECHO_C" >&6
14211else
14212 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14213fi
ca81d7a0
JD
14214{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14215echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14216
14217fi
98418dba
CW
14218if test $ac_cv_header_tiffio_h = yes; then
14219 tifflibs="-lz -lm"
14220 # At least one tiff package requires the jpeg library.
14221 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14222 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14223echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14224if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14225 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14226else
503d2be0 14227 ac_check_lib_save_LIBS=$LIBS
98418dba 14228LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14229cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14230/* confdefs.h. */
14231_ACEOF
14232cat confdefs.h >>conftest.$ac_ext
14233cat >>conftest.$ac_ext <<_ACEOF
14234/* end confdefs.h. */
503d2be0 14235
ca81d7a0
JD
14236/* Override any GCC internal prototype to avoid an error.
14237 Use char because int might match the return type of a GCC
14238 builtin and then its argument prototype would still apply. */
503d2be0
AS
14239#ifdef __cplusplus
14240extern "C"
14241#endif
98418dba 14242char TIFFGetVersion ();
503d2be0
AS
14243int
14244main ()
14245{
ca81d7a0 14246return TIFFGetVersion ();
503d2be0
AS
14247 ;
14248 return 0;
14249}
14250_ACEOF
14251rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14252if { (ac_try="$ac_link"
14253case "(($ac_try" in
14254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14255 *) ac_try_echo=$ac_try;;
14256esac
14257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14258 (eval "$ac_link") 2>conftest.er1
503d2be0 14259 ac_status=$?
edfaf76d
LK
14260 grep -v '^ *+' conftest.er1 >conftest.err
14261 rm -f conftest.er1
14262 cat conftest.err >&5
c0d27fcc 14263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14264 (exit $ac_status); } && {
14265 test -z "$ac_c_werror_flag" ||
14266 test ! -s conftest.err
14267 } && test -s conftest$ac_exeext &&
14268 $as_test_x conftest$ac_exeext; then
98418dba 14269 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14270else
14271 echo "$as_me: failed program was:" >&5
19650fd6
AS
14272sed 's/^/| /' conftest.$ac_ext >&5
14273
ca81d7a0 14274 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14275fi
ca81d7a0 14276
f053c89f 14277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14278 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14279LIBS=$ac_check_lib_save_LIBS
14280fi
ca81d7a0
JD
14281{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14282echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14283if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14284 HAVE_TIFF=yes
14285fi
14286
14287fi
73b77ee5 14288
c0d27fcc 14289
98418dba
CW
14290 fi
14291
14292 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14293
c0d27fcc 14294cat >>confdefs.h <<\_ACEOF
98418dba 14295#define HAVE_TIFF 1
c0d27fcc 14296_ACEOF
98418dba
CW
14297
14298 fi
73b77ee5
GM
14299fi
14300
9aeb8aaa 14301### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14302HAVE_GIF=no
9aeb8aaa
GM
14303if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14304 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14305 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14306echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14307if test "${ac_cv_header_gif_lib_h+set}" = set; then
14308 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14309fi
ca81d7a0
JD
14310{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14311echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14312else
c0d27fcc 14313 # Is the header compilable?
ca81d7a0
JD
14314{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14315echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14316cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14317/* confdefs.h. */
14318_ACEOF
14319cat confdefs.h >>conftest.$ac_ext
14320cat >>conftest.$ac_ext <<_ACEOF
14321/* end confdefs.h. */
c0d27fcc
MR
14322$ac_includes_default
14323#include <gif_lib.h>
14324_ACEOF
14325rm -f conftest.$ac_objext
ca81d7a0
JD
14326if { (ac_try="$ac_compile"
14327case "(($ac_try" in
14328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14329 *) ac_try_echo=$ac_try;;
14330esac
14331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14332 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14333 ac_status=$?
edfaf76d
LK
14334 grep -v '^ *+' conftest.er1 >conftest.err
14335 rm -f conftest.er1
14336 cat conftest.err >&5
c0d27fcc 14337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14338 (exit $ac_status); } && {
14339 test -z "$ac_c_werror_flag" ||
14340 test ! -s conftest.err
14341 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14342 ac_header_compiler=yes
14343else
14344 echo "$as_me: failed program was:" >&5
19650fd6
AS
14345sed 's/^/| /' conftest.$ac_ext >&5
14346
ca81d7a0 14347 ac_header_compiler=no
c0d27fcc 14348fi
ca81d7a0
JD
14349
14350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14351{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14352echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14353
14354# Is the header present?
ca81d7a0
JD
14355{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14356echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14357cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14358/* confdefs.h. */
14359_ACEOF
14360cat confdefs.h >>conftest.$ac_ext
14361cat >>conftest.$ac_ext <<_ACEOF
14362/* end confdefs.h. */
98418dba
CW
14363#include <gif_lib.h>
14364_ACEOF
ca81d7a0
JD
14365if { (ac_try="$ac_cpp conftest.$ac_ext"
14366case "(($ac_try" in
14367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14368 *) ac_try_echo=$ac_try;;
14369esac
14370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14371 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14372 ac_status=$?
6bae0ccf 14373 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14374 rm -f conftest.er1
14375 cat conftest.err >&5
c0d27fcc 14376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14377 (exit $ac_status); } >/dev/null && {
14378 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14379 test ! -s conftest.err
14380 }; then
c0d27fcc 14381 ac_header_preproc=yes
98418dba
CW
14382else
14383 echo "$as_me: failed program was:" >&5
19650fd6
AS
14384sed 's/^/| /' conftest.$ac_ext >&5
14385
c0d27fcc 14386 ac_header_preproc=no
98418dba 14387fi
ca81d7a0 14388
98418dba 14389rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14390{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14391echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14392
14393# So? What about this header?
edfaf76d
LK
14394case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14395 yes:no: )
c0d27fcc
MR
14396 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14397echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14398 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14399echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14400 ac_header_preproc=yes
19650fd6 14401 ;;
edfaf76d 14402 no:yes:* )
c0d27fcc
MR
14403 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14404echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14405 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14406echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14407 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14408echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14409 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14410echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14411 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14412echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14413 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14414echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14415
19650fd6 14416 ;;
c0d27fcc 14417esac
ca81d7a0
JD
14418{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14419echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14420if test "${ac_cv_header_gif_lib_h+set}" = set; then
14421 echo $ECHO_N "(cached) $ECHO_C" >&6
14422else
14423 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14424fi
ca81d7a0
JD
14425{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14426echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14427
14428fi
98418dba
CW
14429if test $ac_cv_header_gif_lib_h = yes; then
14430 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14431# Earlier versions can crash Emacs.
63175cd2
GM
14432 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14433echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14434if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14435 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14436else
503d2be0 14437 ac_check_lib_save_LIBS=$LIBS
63175cd2 14438LIBS="-lgif $LIBS"
503d2be0 14439cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14440/* confdefs.h. */
14441_ACEOF
14442cat confdefs.h >>conftest.$ac_ext
14443cat >>conftest.$ac_ext <<_ACEOF
14444/* end confdefs.h. */
73b77ee5 14445
ca81d7a0
JD
14446/* Override any GCC internal prototype to avoid an error.
14447 Use char because int might match the return type of a GCC
14448 builtin and then its argument prototype would still apply. */
98418dba
CW
14449#ifdef __cplusplus
14450extern "C"
14451#endif
98418dba 14452char EGifPutExtensionLast ();
503d2be0
AS
14453int
14454main ()
14455{
ca81d7a0 14456return EGifPutExtensionLast ();
503d2be0
AS
14457 ;
14458 return 0;
14459}
14460_ACEOF
14461rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14462if { (ac_try="$ac_link"
14463case "(($ac_try" in
14464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14465 *) ac_try_echo=$ac_try;;
14466esac
14467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14468 (eval "$ac_link") 2>conftest.er1
503d2be0 14469 ac_status=$?
edfaf76d
LK
14470 grep -v '^ *+' conftest.er1 >conftest.err
14471 rm -f conftest.er1
14472 cat conftest.err >&5
c0d27fcc 14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14474 (exit $ac_status); } && {
14475 test -z "$ac_c_werror_flag" ||
14476 test ! -s conftest.err
14477 } && test -s conftest$ac_exeext &&
14478 $as_test_x conftest$ac_exeext; then
63175cd2 14479 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14480else
98418dba 14481 echo "$as_me: failed program was:" >&5
19650fd6
AS
14482sed 's/^/| /' conftest.$ac_ext >&5
14483
63175cd2 14484 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14485fi
ca81d7a0 14486
f053c89f 14487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14488 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14489LIBS=$ac_check_lib_save_LIBS
14490fi
63175cd2
GM
14491{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14492echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14493if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14494 HAVE_GIF=yes
9aeb8aaa 14495else
63175cd2 14496 try_libungif=yes
98418dba
CW
14497fi
14498
14499fi
14500
c0d27fcc 14501
9aeb8aaa
GM
14502
14503 if test "$HAVE_GIF" = yes; then
63175cd2 14504 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14505 fi
14506
63175cd2
GM
14507# If gif_lib.h but no libgif, try libungif.
14508 if test x"$try_libungif" = xyes; then
14509 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14510echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14511if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14512 echo $ECHO_N "(cached) $ECHO_C" >&6
14513else
14514 ac_check_lib_save_LIBS=$LIBS
63175cd2 14515LIBS="-lungif $LIBS"
9aeb8aaa
GM
14516cat >conftest.$ac_ext <<_ACEOF
14517/* confdefs.h. */
14518_ACEOF
14519cat confdefs.h >>conftest.$ac_ext
14520cat >>conftest.$ac_ext <<_ACEOF
14521/* end confdefs.h. */
14522
14523/* Override any GCC internal prototype to avoid an error.
14524 Use char because int might match the return type of a GCC
14525 builtin and then its argument prototype would still apply. */
14526#ifdef __cplusplus
14527extern "C"
14528#endif
14529char EGifPutExtensionLast ();
14530int
14531main ()
14532{
14533return EGifPutExtensionLast ();
14534 ;
14535 return 0;
14536}
14537_ACEOF
14538rm -f conftest.$ac_objext conftest$ac_exeext
14539if { (ac_try="$ac_link"
14540case "(($ac_try" in
14541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14542 *) ac_try_echo=$ac_try;;
14543esac
14544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14545 (eval "$ac_link") 2>conftest.er1
14546 ac_status=$?
14547 grep -v '^ *+' conftest.er1 >conftest.err
14548 rm -f conftest.er1
14549 cat conftest.err >&5
14550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14551 (exit $ac_status); } && {
14552 test -z "$ac_c_werror_flag" ||
14553 test ! -s conftest.err
14554 } && test -s conftest$ac_exeext &&
14555 $as_test_x conftest$ac_exeext; then
63175cd2 14556 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14557else
14558 echo "$as_me: failed program was:" >&5
14559sed 's/^/| /' conftest.$ac_ext >&5
14560
63175cd2 14561 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14562fi
14563
9aeb8aaa
GM
14564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14565 conftest$ac_exeext conftest.$ac_ext
14566LIBS=$ac_check_lib_save_LIBS
14567fi
63175cd2
GM
14568{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14569echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14570if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14571 HAVE_GIF=yes
98418dba
CW
14572fi
14573
c0d27fcc 14574
9aeb8aaa
GM
14575 if test "$HAVE_GIF" = yes; then
14576
14577cat >>confdefs.h <<\_ACEOF
63175cd2 14578#define LIBGIF -lungif
9aeb8aaa
GM
14579_ACEOF
14580
63175cd2 14581 ac_gif_lib_name="-lungif"
9aeb8aaa 14582 fi
98418dba
CW
14583 fi
14584
14585 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14586
c0d27fcc 14587cat >>confdefs.h <<\_ACEOF
98418dba 14588#define HAVE_GIF 1
c0d27fcc 14589_ACEOF
98418dba
CW
14590
14591 fi
14592fi
14593
5afbeb22
JD
14594if test "${HAVE_X11}" = "yes"; then
14595 MISSING=""
14596 WITH_NO=""
14597 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14598 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14599 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14600 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14601 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14602 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14603 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14604 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14605 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14606 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14607
14608 if test "X${MISSING}" != X; then
1bb9a689 14609 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14610 $MISSING
86e73516 14611Maybe some development libraries/packages are missing?
5afbeb22
JD
14612If you don't want to link with them give
14613 $WITH_NO
14614as options to configure" >&5
1bb9a689 14615echo "$as_me: error: The following required libraries were not found:
5afbeb22 14616 $MISSING
86e73516 14617Maybe some development libraries/packages are missing?
5afbeb22
JD
14618If you don't want to link with them give
14619 $WITH_NO
14620as options to configure" >&2;}
86e73516 14621 { (exit 1); exit 1; }; }
98418dba
CW
14622 fi
14623fi
14624
79011b82
NR
14625### Use -lgpm if available, unless `--with-gpm=no'.
14626HAVE_GPM=no
14627if test "${with_gpm}" != "no"; then
14628 if test "${ac_cv_header_gpm_h+set}" = set; then
14629 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14630echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14631if test "${ac_cv_header_gpm_h+set}" = set; then
14632 echo $ECHO_N "(cached) $ECHO_C" >&6
14633fi
14634{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14635echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14636else
14637 # Is the header compilable?
14638{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14639echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14640cat >conftest.$ac_ext <<_ACEOF
14641/* confdefs.h. */
14642_ACEOF
14643cat confdefs.h >>conftest.$ac_ext
14644cat >>conftest.$ac_ext <<_ACEOF
14645/* end confdefs.h. */
14646$ac_includes_default
14647#include <gpm.h>
14648_ACEOF
14649rm -f conftest.$ac_objext
14650if { (ac_try="$ac_compile"
14651case "(($ac_try" in
14652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14653 *) ac_try_echo=$ac_try;;
14654esac
14655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14656 (eval "$ac_compile") 2>conftest.er1
14657 ac_status=$?
14658 grep -v '^ *+' conftest.er1 >conftest.err
14659 rm -f conftest.er1
14660 cat conftest.err >&5
14661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); } && {
14663 test -z "$ac_c_werror_flag" ||
14664 test ! -s conftest.err
14665 } && test -s conftest.$ac_objext; then
14666 ac_header_compiler=yes
14667else
14668 echo "$as_me: failed program was:" >&5
14669sed 's/^/| /' conftest.$ac_ext >&5
14670
14671 ac_header_compiler=no
14672fi
14673
14674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14675{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14676echo "${ECHO_T}$ac_header_compiler" >&6; }
14677
14678# Is the header present?
14679{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14680echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14681cat >conftest.$ac_ext <<_ACEOF
14682/* confdefs.h. */
14683_ACEOF
14684cat confdefs.h >>conftest.$ac_ext
14685cat >>conftest.$ac_ext <<_ACEOF
14686/* end confdefs.h. */
14687#include <gpm.h>
14688_ACEOF
14689if { (ac_try="$ac_cpp conftest.$ac_ext"
14690case "(($ac_try" in
14691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14692 *) ac_try_echo=$ac_try;;
14693esac
14694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14696 ac_status=$?
14697 grep -v '^ *+' conftest.er1 >conftest.err
14698 rm -f conftest.er1
14699 cat conftest.err >&5
14700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14701 (exit $ac_status); } >/dev/null && {
14702 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14703 test ! -s conftest.err
14704 }; then
14705 ac_header_preproc=yes
14706else
14707 echo "$as_me: failed program was:" >&5
14708sed 's/^/| /' conftest.$ac_ext >&5
14709
14710 ac_header_preproc=no
14711fi
14712
14713rm -f conftest.err conftest.$ac_ext
14714{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14715echo "${ECHO_T}$ac_header_preproc" >&6; }
14716
14717# So? What about this header?
14718case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14719 yes:no: )
14720 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14721echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14722 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14723echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14724 ac_header_preproc=yes
14725 ;;
14726 no:yes:* )
14727 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14728echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14729 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14730echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14731 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14732echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14733 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14734echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14735 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14736echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14737 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14738echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14739
14740 ;;
14741esac
14742{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14743echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14744if test "${ac_cv_header_gpm_h+set}" = set; then
14745 echo $ECHO_N "(cached) $ECHO_C" >&6
14746else
14747 ac_cv_header_gpm_h=$ac_header_preproc
14748fi
14749{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14750echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14751
14752fi
14753if test $ac_cv_header_gpm_h = yes; then
14754 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14755echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14756if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14757 echo $ECHO_N "(cached) $ECHO_C" >&6
14758else
14759 ac_check_lib_save_LIBS=$LIBS
14760LIBS="-lgpm $LIBS"
14761cat >conftest.$ac_ext <<_ACEOF
14762/* confdefs.h. */
14763_ACEOF
14764cat confdefs.h >>conftest.$ac_ext
14765cat >>conftest.$ac_ext <<_ACEOF
14766/* end confdefs.h. */
14767
14768/* Override any GCC internal prototype to avoid an error.
14769 Use char because int might match the return type of a GCC
14770 builtin and then its argument prototype would still apply. */
14771#ifdef __cplusplus
14772extern "C"
14773#endif
14774char Gpm_Open ();
14775int
14776main ()
14777{
14778return Gpm_Open ();
14779 ;
14780 return 0;
14781}
14782_ACEOF
14783rm -f conftest.$ac_objext conftest$ac_exeext
14784if { (ac_try="$ac_link"
14785case "(($ac_try" in
14786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14787 *) ac_try_echo=$ac_try;;
14788esac
14789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14790 (eval "$ac_link") 2>conftest.er1
14791 ac_status=$?
14792 grep -v '^ *+' conftest.er1 >conftest.err
14793 rm -f conftest.er1
14794 cat conftest.err >&5
14795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796 (exit $ac_status); } && {
14797 test -z "$ac_c_werror_flag" ||
14798 test ! -s conftest.err
14799 } && test -s conftest$ac_exeext &&
14800 $as_test_x conftest$ac_exeext; then
14801 ac_cv_lib_gpm_Gpm_Open=yes
14802else
14803 echo "$as_me: failed program was:" >&5
14804sed 's/^/| /' conftest.$ac_ext >&5
14805
14806 ac_cv_lib_gpm_Gpm_Open=no
14807fi
14808
14809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14810 conftest$ac_exeext conftest.$ac_ext
14811LIBS=$ac_check_lib_save_LIBS
14812fi
14813{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14814echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14815if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14816 HAVE_GPM=yes
14817fi
14818
14819fi
14820
14821
14822fi
14823
14824if test "${HAVE_GPM}" = "yes"; then
14825
14826cat >>confdefs.h <<\_ACEOF
14827#define HAVE_GPM 1
14828_ACEOF
14829
14830fi
14831
cef11da2 14832if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14833 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14834echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14835if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14836 echo $ECHO_N "(cached) $ECHO_C" >&6
14837fi
ca81d7a0
JD
14838{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14839echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14840else
14841 # Is the header compilable?
ca81d7a0
JD
14842{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14843echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14844cat >conftest.$ac_ext <<_ACEOF
14845/* confdefs.h. */
14846_ACEOF
14847cat confdefs.h >>conftest.$ac_ext
14848cat >>conftest.$ac_ext <<_ACEOF
14849/* end confdefs.h. */
14850$ac_includes_default
14851#include <malloc/malloc.h>
14852_ACEOF
14853rm -f conftest.$ac_objext
ca81d7a0
JD
14854if { (ac_try="$ac_compile"
14855case "(($ac_try" in
14856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14857 *) ac_try_echo=$ac_try;;
14858esac
14859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14860 (eval "$ac_compile") 2>conftest.er1
cef11da2 14861 ac_status=$?
edfaf76d
LK
14862 grep -v '^ *+' conftest.er1 >conftest.err
14863 rm -f conftest.er1
14864 cat conftest.err >&5
cef11da2 14865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14866 (exit $ac_status); } && {
14867 test -z "$ac_c_werror_flag" ||
14868 test ! -s conftest.err
14869 } && test -s conftest.$ac_objext; then
cef11da2
ST
14870 ac_header_compiler=yes
14871else
14872 echo "$as_me: failed program was:" >&5
14873sed 's/^/| /' conftest.$ac_ext >&5
14874
ca81d7a0 14875 ac_header_compiler=no
cef11da2 14876fi
ca81d7a0
JD
14877
14878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14879{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14880echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14881
14882# Is the header present?
ca81d7a0
JD
14883{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14884echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14885cat >conftest.$ac_ext <<_ACEOF
14886/* confdefs.h. */
14887_ACEOF
14888cat confdefs.h >>conftest.$ac_ext
14889cat >>conftest.$ac_ext <<_ACEOF
14890/* end confdefs.h. */
14891#include <malloc/malloc.h>
14892_ACEOF
ca81d7a0
JD
14893if { (ac_try="$ac_cpp conftest.$ac_ext"
14894case "(($ac_try" in
14895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14896 *) ac_try_echo=$ac_try;;
14897esac
14898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14899 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14900 ac_status=$?
14901 grep -v '^ *+' conftest.er1 >conftest.err
14902 rm -f conftest.er1
14903 cat conftest.err >&5
14904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14905 (exit $ac_status); } >/dev/null && {
14906 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14907 test ! -s conftest.err
14908 }; then
cef11da2
ST
14909 ac_header_preproc=yes
14910else
14911 echo "$as_me: failed program was:" >&5
14912sed 's/^/| /' conftest.$ac_ext >&5
14913
14914 ac_header_preproc=no
14915fi
ca81d7a0 14916
cef11da2 14917rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14918{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14919echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14920
14921# So? What about this header?
edfaf76d
LK
14922case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14923 yes:no: )
cef11da2
ST
14924 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14925echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14926 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14927echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14928 ac_header_preproc=yes
cef11da2 14929 ;;
edfaf76d 14930 no:yes:* )
cef11da2
ST
14931 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14932echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14933 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14934echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14935 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14936echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14937 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14938echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14939 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14940echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14941 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14942echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14943
cef11da2
ST
14944 ;;
14945esac
ca81d7a0
JD
14946{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14947echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14948if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14949 echo $ECHO_N "(cached) $ECHO_C" >&6
14950else
14951 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14952fi
ca81d7a0
JD
14953{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14954echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14955
7c9e5167 14956fi
cef11da2
ST
14957if test $ac_cv_header_malloc_malloc_h = yes; then
14958
14959cat >>confdefs.h <<\_ACEOF
14960#define HAVE_MALLOC_MALLOC_H 1
14961_ACEOF
14962
7c9e5167
JD
14963fi
14964
cef11da2
ST
14965
14966
5d6da11e 14967### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14968if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
14969
14970cat >>confdefs.h <<\_ACEOF
e0f712ba 14971#define HAVE_CARBON 1
7c9e5167
JD
14972_ACEOF
14973
dbdbca09
YM
14974
14975for ac_header in AvailabilityMacros.h
14976do
14977as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14978if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14979 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14980echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14981if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14982 echo $ECHO_N "(cached) $ECHO_C" >&6
14983fi
14984ac_res=`eval echo '${'$as_ac_Header'}'`
14985 { echo "$as_me:$LINENO: result: $ac_res" >&5
14986echo "${ECHO_T}$ac_res" >&6; }
14987else
14988 # Is the header compilable?
14989{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14990echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
14991cat >conftest.$ac_ext <<_ACEOF
14992/* confdefs.h. */
14993_ACEOF
14994cat confdefs.h >>conftest.$ac_ext
14995cat >>conftest.$ac_ext <<_ACEOF
14996/* end confdefs.h. */
14997$ac_includes_default
14998#include <$ac_header>
14999_ACEOF
15000rm -f conftest.$ac_objext
15001if { (ac_try="$ac_compile"
15002case "(($ac_try" in
15003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15004 *) ac_try_echo=$ac_try;;
15005esac
15006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15007 (eval "$ac_compile") 2>conftest.er1
15008 ac_status=$?
15009 grep -v '^ *+' conftest.er1 >conftest.err
15010 rm -f conftest.er1
15011 cat conftest.err >&5
15012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15013 (exit $ac_status); } && {
15014 test -z "$ac_c_werror_flag" ||
15015 test ! -s conftest.err
15016 } && test -s conftest.$ac_objext; then
15017 ac_header_compiler=yes
15018else
15019 echo "$as_me: failed program was:" >&5
15020sed 's/^/| /' conftest.$ac_ext >&5
15021
15022 ac_header_compiler=no
15023fi
15024
15025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15026{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15027echo "${ECHO_T}$ac_header_compiler" >&6; }
15028
15029# Is the header present?
15030{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15031echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
15032cat >conftest.$ac_ext <<_ACEOF
15033/* confdefs.h. */
15034_ACEOF
15035cat confdefs.h >>conftest.$ac_ext
15036cat >>conftest.$ac_ext <<_ACEOF
15037/* end confdefs.h. */
15038#include <$ac_header>
15039_ACEOF
15040if { (ac_try="$ac_cpp conftest.$ac_ext"
15041case "(($ac_try" in
15042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15043 *) ac_try_echo=$ac_try;;
15044esac
15045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15046 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
15047 ac_status=$?
15048 grep -v '^ *+' conftest.er1 >conftest.err
15049 rm -f conftest.er1
15050 cat conftest.err >&5
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); } >/dev/null && {
15053 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15054 test ! -s conftest.err
15055 }; then
15056 ac_header_preproc=yes
15057else
15058 echo "$as_me: failed program was:" >&5
15059sed 's/^/| /' conftest.$ac_ext >&5
15060
15061 ac_header_preproc=no
15062fi
15063
15064rm -f conftest.err conftest.$ac_ext
15065{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15066echo "${ECHO_T}$ac_header_preproc" >&6; }
15067
15068# So? What about this header?
15069case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15070 yes:no: )
15071 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15072echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15073 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15074echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15075 ac_header_preproc=yes
15076 ;;
15077 no:yes:* )
15078 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15079echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15080 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15081echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15082 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15083echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15084 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15085echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15086 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15087echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15088 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15089echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15090
15091 ;;
15092esac
15093{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15094echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15095if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15096 echo $ECHO_N "(cached) $ECHO_C" >&6
15097else
15098 eval "$as_ac_Header=\$ac_header_preproc"
15099fi
15100ac_res=`eval echo '${'$as_ac_Header'}'`
15101 { echo "$as_me:$LINENO: result: $ac_res" >&5
15102echo "${ECHO_T}$ac_res" >&6; }
15103
15104fi
15105if test `eval echo '${'$as_ac_Header'}'` = yes; then
15106 cat >>confdefs.h <<_ACEOF
15107#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15108_ACEOF
15109
15110fi
15111
15112done
15113
6a3a24fa
JD
15114 ## Specify the install directory
15115 carbon_appdir=
15116 if test "${carbon_appdir_x}" != ""; then
15117 case ${carbon_appdir_x} in
15118 y | ye | yes) carbon_appdir=/Applications ;;
15119 * ) carbon_appdir=${carbon_appdir_x} ;;
15120 esac
7c9e5167 15121 fi
8f417b3b
AS
15122 # We also have mouse menus.
15123 HAVE_MENUS=yes
e0f712ba 15124fi
edfda783
AR
15125### Use NeXTstep API to implement GUI.
15126if test "${HAVE_NS}" = "yes"; then
15127
15128cat >>confdefs.h <<\_ACEOF
15129#define HAVE_NS 1
15130_ACEOF
15131
15132 ## Specify the install directory
15133 ns_appdir=
15134 if test "${ns_appdir_x}" != ""; then
15135 case ${ns_appdir_x} in
15136 y | ye | yes) ns_appdir=/Applications ;;
15137 * ) ns_appdir=${ns_appdir_x} ;;
15138 esac
15139 fi
ff1095d1 15140 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
15141
15142cat >>confdefs.h <<\_ACEOF
15143#define NS_IMPL_COCOA 1
15144_ACEOF
15145
15146 fi
15147 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
15148
15149cat >>confdefs.h <<\_ACEOF
15150#define COCOA_EXPERIMENTAL_CTRL_G 1
15151_ACEOF
15152
15153 fi
ff1095d1 15154 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
15155
15156cat >>confdefs.h <<\_ACEOF
15157#define NS_IMPL_GNUSTEP 1
15158_ACEOF
15159
15160 fi
15161 # We also have mouse menus.
15162 HAVE_MENUS=yes
15163fi
15164
e0f712ba 15165
98418dba
CW
15166### Use session management (-lSM -lICE) if available
15167HAVE_X_SM=no
15168if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15169 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15170 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15171echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15172if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15173 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15174fi
ca81d7a0
JD
15175{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15176echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15177else
c0d27fcc 15178 # Is the header compilable?
ca81d7a0
JD
15179{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15180echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15181cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15182/* confdefs.h. */
15183_ACEOF
15184cat confdefs.h >>conftest.$ac_ext
15185cat >>conftest.$ac_ext <<_ACEOF
15186/* end confdefs.h. */
c0d27fcc
MR
15187$ac_includes_default
15188#include <X11/SM/SMlib.h>
15189_ACEOF
15190rm -f conftest.$ac_objext
ca81d7a0
JD
15191if { (ac_try="$ac_compile"
15192case "(($ac_try" in
15193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15194 *) ac_try_echo=$ac_try;;
15195esac
15196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15197 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15198 ac_status=$?
edfaf76d
LK
15199 grep -v '^ *+' conftest.er1 >conftest.err
15200 rm -f conftest.er1
15201 cat conftest.err >&5
c0d27fcc 15202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15203 (exit $ac_status); } && {
15204 test -z "$ac_c_werror_flag" ||
15205 test ! -s conftest.err
15206 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15207 ac_header_compiler=yes
15208else
15209 echo "$as_me: failed program was:" >&5
19650fd6
AS
15210sed 's/^/| /' conftest.$ac_ext >&5
15211
ca81d7a0 15212 ac_header_compiler=no
c0d27fcc 15213fi
ca81d7a0
JD
15214
15215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15216{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15217echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15218
15219# Is the header present?
ca81d7a0
JD
15220{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15221echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15223/* confdefs.h. */
15224_ACEOF
15225cat confdefs.h >>conftest.$ac_ext
15226cat >>conftest.$ac_ext <<_ACEOF
15227/* end confdefs.h. */
98418dba
CW
15228#include <X11/SM/SMlib.h>
15229_ACEOF
ca81d7a0
JD
15230if { (ac_try="$ac_cpp conftest.$ac_ext"
15231case "(($ac_try" in
15232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15233 *) ac_try_echo=$ac_try;;
15234esac
15235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15236 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15237 ac_status=$?
6bae0ccf 15238 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15239 rm -f conftest.er1
15240 cat conftest.err >&5
c0d27fcc 15241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15242 (exit $ac_status); } >/dev/null && {
15243 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15244 test ! -s conftest.err
15245 }; then
c0d27fcc 15246 ac_header_preproc=yes
98418dba
CW
15247else
15248 echo "$as_me: failed program was:" >&5
19650fd6
AS
15249sed 's/^/| /' conftest.$ac_ext >&5
15250
c0d27fcc 15251 ac_header_preproc=no
98418dba 15252fi
ca81d7a0 15253
98418dba 15254rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15255{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15256echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15257
15258# So? What about this header?
edfaf76d
LK
15259case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15260 yes:no: )
c0d27fcc
MR
15261 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15262echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15263 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15264echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15265 ac_header_preproc=yes
19650fd6 15266 ;;
edfaf76d 15267 no:yes:* )
c0d27fcc
MR
15268 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15269echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15270 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15271echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15272 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15273echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15274 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15275echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15276 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15277echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15278 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15279echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15280
19650fd6 15281 ;;
c0d27fcc 15282esac
ca81d7a0
JD
15283{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15284echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15285if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15286 echo $ECHO_N "(cached) $ECHO_C" >&6
15287else
15288 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15289fi
ca81d7a0
JD
15290{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15291echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15292
15293fi
98418dba 15294if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15295 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15296echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15297if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15298 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15299else
503d2be0 15300 ac_check_lib_save_LIBS=$LIBS
1660500f 15301LIBS="-lSM -lICE $LIBS"
503d2be0 15302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15303/* confdefs.h. */
15304_ACEOF
15305cat confdefs.h >>conftest.$ac_ext
15306cat >>conftest.$ac_ext <<_ACEOF
15307/* end confdefs.h. */
503d2be0 15308
ca81d7a0
JD
15309/* Override any GCC internal prototype to avoid an error.
15310 Use char because int might match the return type of a GCC
15311 builtin and then its argument prototype would still apply. */
503d2be0
AS
15312#ifdef __cplusplus
15313extern "C"
15314#endif
98418dba 15315char SmcOpenConnection ();
503d2be0
AS
15316int
15317main ()
15318{
ca81d7a0 15319return SmcOpenConnection ();
503d2be0
AS
15320 ;
15321 return 0;
15322}
15323_ACEOF
15324rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15325if { (ac_try="$ac_link"
15326case "(($ac_try" in
15327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15328 *) ac_try_echo=$ac_try;;
15329esac
15330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15331 (eval "$ac_link") 2>conftest.er1
503d2be0 15332 ac_status=$?
edfaf76d
LK
15333 grep -v '^ *+' conftest.er1 >conftest.err
15334 rm -f conftest.er1
15335 cat conftest.err >&5
c0d27fcc 15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15337 (exit $ac_status); } && {
15338 test -z "$ac_c_werror_flag" ||
15339 test ! -s conftest.err
15340 } && test -s conftest$ac_exeext &&
15341 $as_test_x conftest$ac_exeext; then
98418dba 15342 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15343else
15344 echo "$as_me: failed program was:" >&5
19650fd6
AS
15345sed 's/^/| /' conftest.$ac_ext >&5
15346
ca81d7a0 15347 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15348fi
ca81d7a0 15349
f053c89f 15350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15351 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15352LIBS=$ac_check_lib_save_LIBS
15353fi
ca81d7a0
JD
15354{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15355echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15356if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15357 HAVE_X_SM=yes
73b77ee5
GM
15358fi
15359
73b77ee5 15360fi
73b77ee5 15361
c0d27fcc
MR
15362
15363
98418dba 15364 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15365
c0d27fcc 15366cat >>confdefs.h <<\_ACEOF
98418dba 15367#define HAVE_X_SM 1
c0d27fcc 15368_ACEOF
73b77ee5 15369
98418dba
CW
15370 case "$LIBS" in
15371 *-lSM*) ;;
15372 *) LIBS="-lSM -lICE $LIBS" ;;
15373 esac
73b77ee5 15374 fi
98418dba 15375fi
73b77ee5 15376
98418dba 15377# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15378{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15379echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15380if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15382else
15383 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15384/* confdefs.h. */
15385_ACEOF
15386cat confdefs.h >>conftest.$ac_ext
15387cat >>conftest.$ac_ext <<_ACEOF
15388/* end confdefs.h. */
98418dba 15389#include <netdb.h>
503d2be0
AS
15390int
15391main ()
15392{
98418dba 15393return h_errno;
503d2be0
AS
15394 ;
15395 return 0;
15396}
15397_ACEOF
15398rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15399if { (ac_try="$ac_link"
15400case "(($ac_try" in
15401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15402 *) ac_try_echo=$ac_try;;
15403esac
15404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15405 (eval "$ac_link") 2>conftest.er1
503d2be0 15406 ac_status=$?
edfaf76d
LK
15407 grep -v '^ *+' conftest.er1 >conftest.err
15408 rm -f conftest.er1
15409 cat conftest.err >&5
c0d27fcc 15410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15411 (exit $ac_status); } && {
15412 test -z "$ac_c_werror_flag" ||
15413 test ! -s conftest.err
15414 } && test -s conftest$ac_exeext &&
15415 $as_test_x conftest$ac_exeext; then
98418dba 15416 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15417else
503d2be0 15418 echo "$as_me: failed program was:" >&5
19650fd6
AS
15419sed 's/^/| /' conftest.$ac_ext >&5
15420
ca81d7a0 15421 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15422fi
ca81d7a0 15423
f053c89f 15424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15425 conftest$ac_exeext conftest.$ac_ext
98418dba 15426fi
ca81d7a0
JD
15427{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15428echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15429if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15430
c0d27fcc 15431cat >>confdefs.h <<\_ACEOF
98418dba 15432#define HAVE_H_ERRNO 1
c0d27fcc 15433_ACEOF
73b77ee5 15434
98418dba
CW
15435fi
15436
15437# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15438# for constant arguments. Useless!
ca81d7a0
JD
15439{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15440echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15441if test "${ac_cv_working_alloca_h+set}" = set; then
15442 echo $ECHO_N "(cached) $ECHO_C" >&6
15443else
15444 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15445/* confdefs.h. */
15446_ACEOF
15447cat confdefs.h >>conftest.$ac_ext
15448cat >>conftest.$ac_ext <<_ACEOF
15449/* end confdefs.h. */
98418dba 15450#include <alloca.h>
503d2be0
AS
15451int
15452main ()
15453{
98418dba 15454char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15455 if (p) return 0;
503d2be0
AS
15456 ;
15457 return 0;
15458}
15459_ACEOF
15460rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15461if { (ac_try="$ac_link"
15462case "(($ac_try" in
15463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15464 *) ac_try_echo=$ac_try;;
15465esac
15466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15467 (eval "$ac_link") 2>conftest.er1
503d2be0 15468 ac_status=$?
edfaf76d
LK
15469 grep -v '^ *+' conftest.er1 >conftest.err
15470 rm -f conftest.er1
15471 cat conftest.err >&5
c0d27fcc 15472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15473 (exit $ac_status); } && {
15474 test -z "$ac_c_werror_flag" ||
15475 test ! -s conftest.err
15476 } && test -s conftest$ac_exeext &&
15477 $as_test_x conftest$ac_exeext; then
98418dba 15478 ac_cv_working_alloca_h=yes
73b77ee5 15479else
503d2be0 15480 echo "$as_me: failed program was:" >&5
19650fd6
AS
15481sed 's/^/| /' conftest.$ac_ext >&5
15482
ca81d7a0 15483 ac_cv_working_alloca_h=no
73b77ee5 15484fi
ca81d7a0 15485
f053c89f 15486rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15487 conftest$ac_exeext conftest.$ac_ext
98418dba 15488fi
ca81d7a0
JD
15489{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15490echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15491if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15492
c0d27fcc 15493cat >>confdefs.h <<\_ACEOF
98418dba 15494#define HAVE_ALLOCA_H 1
c0d27fcc 15495_ACEOF
98418dba
CW
15496
15497fi
15498
ca81d7a0
JD
15499{ echo "$as_me:$LINENO: checking for alloca" >&5
15500echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15501if test "${ac_cv_func_alloca_works+set}" = set; then
15502 echo $ECHO_N "(cached) $ECHO_C" >&6
15503else
503d2be0 15504 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15505/* confdefs.h. */
15506_ACEOF
15507cat confdefs.h >>conftest.$ac_ext
15508cat >>conftest.$ac_ext <<_ACEOF
15509/* end confdefs.h. */
98418dba
CW
15510#ifdef __GNUC__
15511# define alloca __builtin_alloca
15512#else
15513# ifdef _MSC_VER
15514# include <malloc.h>
15515# define alloca _alloca
15516# else
f053c89f 15517# ifdef HAVE_ALLOCA_H
98418dba
CW
15518# include <alloca.h>
15519# else
15520# ifdef _AIX
15521 #pragma alloca
15522# else
15523# ifndef alloca /* predefined by HP cc +Olibcalls */
15524char *alloca ();
15525# endif
15526# endif
15527# endif
15528# endif
15529#endif
15530
503d2be0
AS
15531int
15532main ()
15533{
98418dba 15534char *p = (char *) alloca (1);
ca81d7a0 15535 if (p) return 0;
503d2be0
AS
15536 ;
15537 return 0;
15538}
15539_ACEOF
15540rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15541if { (ac_try="$ac_link"
15542case "(($ac_try" in
15543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15544 *) ac_try_echo=$ac_try;;
15545esac
15546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15547 (eval "$ac_link") 2>conftest.er1
503d2be0 15548 ac_status=$?
edfaf76d
LK
15549 grep -v '^ *+' conftest.er1 >conftest.err
15550 rm -f conftest.er1
15551 cat conftest.err >&5
c0d27fcc 15552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15553 (exit $ac_status); } && {
15554 test -z "$ac_c_werror_flag" ||
15555 test ! -s conftest.err
15556 } && test -s conftest$ac_exeext &&
15557 $as_test_x conftest$ac_exeext; then
98418dba 15558 ac_cv_func_alloca_works=yes
ac95a621 15559else
503d2be0 15560 echo "$as_me: failed program was:" >&5
19650fd6
AS
15561sed 's/^/| /' conftest.$ac_ext >&5
15562
ca81d7a0 15563 ac_cv_func_alloca_works=no
ac95a621 15564fi
ca81d7a0 15565
f053c89f 15566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15567 conftest$ac_exeext conftest.$ac_ext
98418dba 15568fi
ca81d7a0
JD
15569{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15570echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15571
98418dba
CW
15572if test $ac_cv_func_alloca_works = yes; then
15573
c0d27fcc 15574cat >>confdefs.h <<\_ACEOF
98418dba 15575#define HAVE_ALLOCA 1
c0d27fcc 15576_ACEOF
98418dba
CW
15577
15578else
15579 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15580# that cause trouble. Some versions do not even contain alloca or
15581# contain a buggy version. If you still want to use their alloca,
15582# use ar to extract alloca.o from them instead of compiling alloca.c.
15583
ca81d7a0 15584ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15585
c0d27fcc 15586cat >>confdefs.h <<\_ACEOF
98418dba 15587#define C_ALLOCA 1
c0d27fcc 15588_ACEOF
98418dba 15589
c0d27fcc 15590
ca81d7a0
JD
15591{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15592echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15593if test "${ac_cv_os_cray+set}" = set; then
15594 echo $ECHO_N "(cached) $ECHO_C" >&6
15595else
15596 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15597/* confdefs.h. */
15598_ACEOF
15599cat confdefs.h >>conftest.$ac_ext
15600cat >>conftest.$ac_ext <<_ACEOF
15601/* end confdefs.h. */
ca81d7a0 15602#if defined CRAY && ! defined CRAY2
98418dba
CW
15603webecray
15604#else
15605wenotbecray
15606#endif
15607
15608_ACEOF
15609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15610 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15611 ac_cv_os_cray=yes
15612else
15613 ac_cv_os_cray=no
15614fi
15615rm -f conftest*
ac95a621 15616
98418dba 15617fi
ca81d7a0
JD
15618{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15619echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15620if test $ac_cv_os_cray = yes; then
15621 for ac_func in _getb67 GETB67 getb67; do
15622 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15623{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15624echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15625if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15626 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15627else
503d2be0 15628 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15629/* confdefs.h. */
15630_ACEOF
15631cat confdefs.h >>conftest.$ac_ext
15632cat >>conftest.$ac_ext <<_ACEOF
15633/* end confdefs.h. */
edfaf76d
LK
15634/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15635 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15636#define $ac_func innocuous_$ac_func
15637
73b77ee5 15638/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15639 which can conflict with char $ac_func (); below.
15640 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15641 <limits.h> exists even on freestanding compilers. */
edfaf76d 15642
19650fd6
AS
15643#ifdef __STDC__
15644# include <limits.h>
15645#else
15646# include <assert.h>
15647#endif
edfaf76d
LK
15648
15649#undef $ac_func
15650
ca81d7a0
JD
15651/* Override any GCC internal prototype to avoid an error.
15652 Use char because int might match the return type of a GCC
15653 builtin and then its argument prototype would still apply. */
503d2be0
AS
15654#ifdef __cplusplus
15655extern "C"
15656#endif
503d2be0 15657char $ac_func ();
73b77ee5
GM
15658/* The GNU C library defines this for functions which it implements
15659 to always fail with ENOSYS. Some functions are actually named
15660 something starting with __ and the normal name is an alias. */
ca81d7a0 15661#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15662choke me
73b77ee5
GM
15663#endif
15664
19650fd6
AS
15665int
15666main ()
15667{
ca81d7a0 15668return $ac_func ();
503d2be0
AS
15669 ;
15670 return 0;
15671}
15672_ACEOF
15673rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15674if { (ac_try="$ac_link"
15675case "(($ac_try" in
15676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15677 *) ac_try_echo=$ac_try;;
15678esac
15679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15680 (eval "$ac_link") 2>conftest.er1
503d2be0 15681 ac_status=$?
edfaf76d
LK
15682 grep -v '^ *+' conftest.er1 >conftest.err
15683 rm -f conftest.er1
15684 cat conftest.err >&5
c0d27fcc 15685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15686 (exit $ac_status); } && {
15687 test -z "$ac_c_werror_flag" ||
15688 test ! -s conftest.err
15689 } && test -s conftest$ac_exeext &&
15690 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15691 eval "$as_ac_var=yes"
15692else
15693 echo "$as_me: failed program was:" >&5
19650fd6
AS
15694sed 's/^/| /' conftest.$ac_ext >&5
15695
ca81d7a0 15696 eval "$as_ac_var=no"
503d2be0 15697fi
ca81d7a0 15698
f053c89f 15699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15700 conftest$ac_exeext conftest.$ac_ext
503d2be0 15701fi
ca81d7a0
JD
15702ac_res=`eval echo '${'$as_ac_var'}'`
15703 { echo "$as_me:$LINENO: result: $ac_res" >&5
15704echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15705if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15706
c0d27fcc 15707cat >>confdefs.h <<_ACEOF
98418dba 15708#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15709_ACEOF
98418dba
CW
15710
15711 break
73b77ee5 15712fi
73b77ee5 15713
98418dba 15714 done
73b77ee5
GM
15715fi
15716
ca81d7a0
JD
15717{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15718echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15719if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15720 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15721else
15722 if test "$cross_compiling" = yes; then
15723 ac_cv_c_stack_direction=0
73b77ee5 15724else
503d2be0 15725 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15726/* confdefs.h. */
15727_ACEOF
15728cat confdefs.h >>conftest.$ac_ext
15729cat >>conftest.$ac_ext <<_ACEOF
15730/* end confdefs.h. */
ca81d7a0 15731$ac_includes_default
503d2be0 15732int
98418dba 15733find_stack_direction ()
503d2be0 15734{
98418dba
CW
15735 static char *addr = 0;
15736 auto char dummy;
15737 if (addr == 0)
15738 {
15739 addr = &dummy;
15740 return find_stack_direction ();
15741 }
73b77ee5 15742 else
98418dba
CW
15743 return (&dummy > addr) ? 1 : -1;
15744}
ba4481b5 15745
503d2be0
AS
15746int
15747main ()
15748{
ca81d7a0 15749 return find_stack_direction () < 0;
503d2be0
AS
15750}
15751_ACEOF
98418dba 15752rm -f conftest$ac_exeext
ca81d7a0
JD
15753if { (ac_try="$ac_link"
15754case "(($ac_try" in
15755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15756 *) ac_try_echo=$ac_try;;
15757esac
15758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15759 (eval "$ac_link") 2>&5
503d2be0 15760 ac_status=$?
c0d27fcc 15761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15762 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15763 { (case "(($ac_try" in
15764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765 *) ac_try_echo=$ac_try;;
15766esac
15767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15768 (eval "$ac_try") 2>&5
503d2be0 15769 ac_status=$?
c0d27fcc 15770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15771 (exit $ac_status); }; }; then
98418dba 15772 ac_cv_c_stack_direction=1
ba4481b5 15773else
98418dba
CW
15774 echo "$as_me: program exited with status $ac_status" >&5
15775echo "$as_me: failed program was:" >&5
19650fd6
AS
15776sed 's/^/| /' conftest.$ac_ext >&5
15777
c0d27fcc 15778( exit $ac_status )
98418dba 15779ac_cv_c_stack_direction=-1
ba4481b5 15780fi
ca81d7a0 15781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15782fi
ca81d7a0
JD
15783
15784
98418dba 15785fi
ca81d7a0
JD
15786{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15787echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15788
c0d27fcc 15789cat >>confdefs.h <<_ACEOF
98418dba 15790#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15791_ACEOF
15792
ba4481b5 15793
ba4481b5
DL
15794fi
15795
c0d27fcc 15796
611adb3e
GM
15797if test x"$ac_cv_func_alloca_works" != xyes; then
15798 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15799echo "$as_me: error: a system implementation of alloca is required " >&2;}
15800 { (exit 1); exit 1; }; }
15801fi
15802
98418dba
CW
15803# fmod, logb, and frexp are found in -lm on most systems.
15804# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15805
ca81d7a0
JD
15806{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15807echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15808if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15810else
98418dba
CW
15811 ac_check_lib_save_LIBS=$LIBS
15812LIBS="-lm $LIBS"
15813cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15814/* confdefs.h. */
15815_ACEOF
15816cat confdefs.h >>conftest.$ac_ext
15817cat >>conftest.$ac_ext <<_ACEOF
15818/* end confdefs.h. */
ba4481b5 15819
ca81d7a0
JD
15820/* Override any GCC internal prototype to avoid an error.
15821 Use char because int might match the return type of a GCC
15822 builtin and then its argument prototype would still apply. */
98418dba
CW
15823#ifdef __cplusplus
15824extern "C"
15825#endif
98418dba 15826char sqrt ();
503d2be0
AS
15827int
15828main ()
15829{
ca81d7a0 15830return sqrt ();
503d2be0
AS
15831 ;
15832 return 0;
15833}
15834_ACEOF
15835rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15836if { (ac_try="$ac_link"
15837case "(($ac_try" in
15838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15839 *) ac_try_echo=$ac_try;;
15840esac
15841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15842 (eval "$ac_link") 2>conftest.er1
503d2be0 15843 ac_status=$?
edfaf76d
LK
15844 grep -v '^ *+' conftest.er1 >conftest.err
15845 rm -f conftest.er1
15846 cat conftest.err >&5
c0d27fcc 15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15848 (exit $ac_status); } && {
15849 test -z "$ac_c_werror_flag" ||
15850 test ! -s conftest.err
15851 } && test -s conftest$ac_exeext &&
15852 $as_test_x conftest$ac_exeext; then
98418dba 15853 ac_cv_lib_m_sqrt=yes
ba4481b5 15854else
503d2be0 15855 echo "$as_me: failed program was:" >&5
19650fd6
AS
15856sed 's/^/| /' conftest.$ac_ext >&5
15857
ca81d7a0 15858 ac_cv_lib_m_sqrt=no
ba4481b5 15859fi
ca81d7a0 15860
f053c89f 15861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15862 conftest$ac_exeext conftest.$ac_ext
98418dba 15863LIBS=$ac_check_lib_save_LIBS
ba4481b5 15864fi
ca81d7a0
JD
15865{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15866echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15867if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15868 cat >>confdefs.h <<_ACEOF
98418dba 15869#define HAVE_LIBM 1
c0d27fcc 15870_ACEOF
98418dba
CW
15871
15872 LIBS="-lm $LIBS"
ba4481b5 15873
ba4481b5
DL
15874fi
15875
c0d27fcc 15876
55597d70
DL
15877# Check for mail-locking functions in a "mail" library. Probably this should
15878# have the same check as for liblockfile below.
98418dba 15879
ca81d7a0
JD
15880{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15881echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15882if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15883 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15884else
98418dba
CW
15885 ac_check_lib_save_LIBS=$LIBS
15886LIBS="-lmail $LIBS"
15887cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15888/* confdefs.h. */
15889_ACEOF
15890cat confdefs.h >>conftest.$ac_ext
15891cat >>conftest.$ac_ext <<_ACEOF
15892/* end confdefs.h. */
98418dba 15893
ca81d7a0
JD
15894/* Override any GCC internal prototype to avoid an error.
15895 Use char because int might match the return type of a GCC
15896 builtin and then its argument prototype would still apply. */
98418dba
CW
15897#ifdef __cplusplus
15898extern "C"
15899#endif
98418dba 15900char maillock ();
503d2be0
AS
15901int
15902main ()
15903{
ca81d7a0 15904return maillock ();
503d2be0
AS
15905 ;
15906 return 0;
15907}
15908_ACEOF
15909rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15910if { (ac_try="$ac_link"
15911case "(($ac_try" in
15912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15913 *) ac_try_echo=$ac_try;;
15914esac
15915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15916 (eval "$ac_link") 2>conftest.er1
503d2be0 15917 ac_status=$?
edfaf76d
LK
15918 grep -v '^ *+' conftest.er1 >conftest.err
15919 rm -f conftest.er1
15920 cat conftest.err >&5
c0d27fcc 15921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15922 (exit $ac_status); } && {
15923 test -z "$ac_c_werror_flag" ||
15924 test ! -s conftest.err
15925 } && test -s conftest$ac_exeext &&
15926 $as_test_x conftest$ac_exeext; then
98418dba 15927 ac_cv_lib_mail_maillock=yes
ba4481b5 15928else
503d2be0 15929 echo "$as_me: failed program was:" >&5
19650fd6
AS
15930sed 's/^/| /' conftest.$ac_ext >&5
15931
ca81d7a0 15932 ac_cv_lib_mail_maillock=no
ba4481b5 15933fi
ca81d7a0 15934
f053c89f 15935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15936 conftest$ac_exeext conftest.$ac_ext
98418dba 15937LIBS=$ac_check_lib_save_LIBS
ba4481b5 15938fi
ca81d7a0
JD
15939{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15940echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15941if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15942 cat >>confdefs.h <<_ACEOF
98418dba 15943#define HAVE_LIBMAIL 1
c0d27fcc 15944_ACEOF
ba4481b5 15945
98418dba 15946 LIBS="-lmail $LIBS"
ba4481b5 15947
98418dba 15948fi
ba4481b5 15949
c0d27fcc 15950
ca81d7a0
JD
15951{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15952echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15953if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15954 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15955else
503d2be0 15956 ac_check_lib_save_LIBS=$LIBS
98418dba 15957LIBS="-llockfile $LIBS"
503d2be0 15958cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15959/* confdefs.h. */
15960_ACEOF
15961cat confdefs.h >>conftest.$ac_ext
15962cat >>conftest.$ac_ext <<_ACEOF
15963/* end confdefs.h. */
503d2be0 15964
ca81d7a0
JD
15965/* Override any GCC internal prototype to avoid an error.
15966 Use char because int might match the return type of a GCC
15967 builtin and then its argument prototype would still apply. */
503d2be0
AS
15968#ifdef __cplusplus
15969extern "C"
15970#endif
98418dba 15971char maillock ();
503d2be0
AS
15972int
15973main ()
15974{
ca81d7a0 15975return maillock ();
503d2be0
AS
15976 ;
15977 return 0;
15978}
15979_ACEOF
15980rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15981if { (ac_try="$ac_link"
15982case "(($ac_try" in
15983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15984 *) ac_try_echo=$ac_try;;
15985esac
15986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15987 (eval "$ac_link") 2>conftest.er1
503d2be0 15988 ac_status=$?
edfaf76d
LK
15989 grep -v '^ *+' conftest.er1 >conftest.err
15990 rm -f conftest.er1
15991 cat conftest.err >&5
c0d27fcc 15992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15993 (exit $ac_status); } && {
15994 test -z "$ac_c_werror_flag" ||
15995 test ! -s conftest.err
15996 } && test -s conftest$ac_exeext &&
15997 $as_test_x conftest$ac_exeext; then
98418dba 15998 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15999else
16000 echo "$as_me: failed program was:" >&5
19650fd6
AS
16001sed 's/^/| /' conftest.$ac_ext >&5
16002
ca81d7a0 16003 ac_cv_lib_lockfile_maillock=no
98418dba 16004fi
ca81d7a0 16005
f053c89f 16006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16007 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16008LIBS=$ac_check_lib_save_LIBS
16009fi
ca81d7a0
JD
16010{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
16011echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 16012if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 16013 cat >>confdefs.h <<_ACEOF
98418dba 16014#define HAVE_LIBLOCKFILE 1
c0d27fcc 16015_ACEOF
98418dba
CW
16016
16017 LIBS="-llockfile $LIBS"
16018
16019fi
16020
16021# If we have the shared liblockfile, assume we must use it for mail
16022# locking (e.g. Debian). If we couldn't link against liblockfile
16023# (no liblockfile.a installed), ensure that we don't need to.
16024if test "$ac_cv_lib_lockfile_maillock" = no; then
16025 # Extract the first word of "liblockfile.so", so it can be a program name with args.
16026set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
16027{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
16029if test "${ac_cv_prog_liblockfile+set}" = set; then
16030 echo $ECHO_N "(cached) $ECHO_C" >&6
16031else
16032 if test -n "$liblockfile"; then
16033 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
16034else
c0d27fcc 16035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
16036as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
16037for as_dir in $as_dummy
c0d27fcc
MR
16038do
16039 IFS=$as_save_IFS
16040 test -z "$as_dir" && as_dir=.
16041 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 16042 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
16043 ac_cv_prog_liblockfile="yes"
16044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16045 break 2
16046 fi
16047done
98418dba 16048done
ca81d7a0 16049IFS=$as_save_IFS
98418dba
CW
16050
16051 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 16052fi
503d2be0 16053fi
98418dba
CW
16054liblockfile=$ac_cv_prog_liblockfile
16055if test -n "$liblockfile"; then
ca81d7a0
JD
16056 { echo "$as_me:$LINENO: result: $liblockfile" >&5
16057echo "${ECHO_T}$liblockfile" >&6; }
98418dba 16058else
ca81d7a0
JD
16059 { echo "$as_me:$LINENO: result: no" >&5
16060echo "${ECHO_T}no" >&6; }
ba4481b5
DL
16061fi
16062
ca81d7a0 16063
98418dba 16064 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 16065 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
16066This probably means that movemail could lose mail.
16067There may be a \`development' package to install containing liblockfile." >&5
16068echo "$as_me: error: Shared liblockfile found but can't link against it.
16069This probably means that movemail could lose mail.
16070There may be a \`development' package to install containing liblockfile." >&2;}
16071 { (exit 1); exit 1; }; }
98418dba 16072 else :
55597d70 16073 fi
98418dba 16074fi
503d2be0 16075
98418dba
CW
16076for ac_func in touchlock
16077do
16078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16079{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16081if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16082 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 16083else
98418dba 16084 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16085/* confdefs.h. */
16086_ACEOF
16087cat confdefs.h >>conftest.$ac_ext
16088cat >>conftest.$ac_ext <<_ACEOF
16089/* end confdefs.h. */
edfaf76d
LK
16090/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16091 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16092#define $ac_func innocuous_$ac_func
16093
98418dba 16094/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16095 which can conflict with char $ac_func (); below.
16096 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16097 <limits.h> exists even on freestanding compilers. */
edfaf76d 16098
19650fd6
AS
16099#ifdef __STDC__
16100# include <limits.h>
16101#else
16102# include <assert.h>
16103#endif
edfaf76d
LK
16104
16105#undef $ac_func
16106
ca81d7a0
JD
16107/* Override any GCC internal prototype to avoid an error.
16108 Use char because int might match the return type of a GCC
16109 builtin and then its argument prototype would still apply. */
503d2be0
AS
16110#ifdef __cplusplus
16111extern "C"
16112#endif
98418dba 16113char $ac_func ();
98418dba
CW
16114/* The GNU C library defines this for functions which it implements
16115 to always fail with ENOSYS. Some functions are actually named
16116 something starting with __ and the normal name is an alias. */
ca81d7a0 16117#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16118choke me
cd958eb3
MB
16119#endif
16120
19650fd6
AS
16121int
16122main ()
16123{
ca81d7a0 16124return $ac_func ();
503d2be0
AS
16125 ;
16126 return 0;
16127}
16128_ACEOF
16129rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16130if { (ac_try="$ac_link"
16131case "(($ac_try" in
16132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16133 *) ac_try_echo=$ac_try;;
16134esac
16135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16136 (eval "$ac_link") 2>conftest.er1
503d2be0 16137 ac_status=$?
edfaf76d
LK
16138 grep -v '^ *+' conftest.er1 >conftest.err
16139 rm -f conftest.er1
16140 cat conftest.err >&5
c0d27fcc 16141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16142 (exit $ac_status); } && {
16143 test -z "$ac_c_werror_flag" ||
16144 test ! -s conftest.err
16145 } && test -s conftest$ac_exeext &&
16146 $as_test_x conftest$ac_exeext; then
98418dba 16147 eval "$as_ac_var=yes"
503d2be0
AS
16148else
16149 echo "$as_me: failed program was:" >&5
19650fd6
AS
16150sed 's/^/| /' conftest.$ac_ext >&5
16151
ca81d7a0 16152 eval "$as_ac_var=no"
503d2be0 16153fi
ca81d7a0 16154
f053c89f 16155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16156 conftest$ac_exeext conftest.$ac_ext
503d2be0 16157fi
ca81d7a0
JD
16158ac_res=`eval echo '${'$as_ac_var'}'`
16159 { echo "$as_me:$LINENO: result: $ac_res" >&5
16160echo "${ECHO_T}$ac_res" >&6; }
98418dba 16161if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16162 cat >>confdefs.h <<_ACEOF
98418dba 16163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16164_ACEOF
457b792c 16165
457b792c 16166fi
98418dba 16167done
457b792c 16168
c0d27fcc 16169
98418dba
CW
16170for ac_header in maillock.h
16171do
16172as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16173if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16174 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16175echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16176if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16177 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16178fi
ca81d7a0
JD
16179ac_res=`eval echo '${'$as_ac_Header'}'`
16180 { echo "$as_me:$LINENO: result: $ac_res" >&5
16181echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16182else
c0d27fcc 16183 # Is the header compilable?
ca81d7a0
JD
16184{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16185echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16186cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16187/* confdefs.h. */
16188_ACEOF
16189cat confdefs.h >>conftest.$ac_ext
16190cat >>conftest.$ac_ext <<_ACEOF
16191/* end confdefs.h. */
c0d27fcc
MR
16192$ac_includes_default
16193#include <$ac_header>
16194_ACEOF
16195rm -f conftest.$ac_objext
ca81d7a0
JD
16196if { (ac_try="$ac_compile"
16197case "(($ac_try" in
16198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16199 *) ac_try_echo=$ac_try;;
16200esac
16201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16202 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16203 ac_status=$?
edfaf76d
LK
16204 grep -v '^ *+' conftest.er1 >conftest.err
16205 rm -f conftest.er1
16206 cat conftest.err >&5
c0d27fcc 16207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16208 (exit $ac_status); } && {
16209 test -z "$ac_c_werror_flag" ||
16210 test ! -s conftest.err
16211 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16212 ac_header_compiler=yes
16213else
16214 echo "$as_me: failed program was:" >&5
19650fd6
AS
16215sed 's/^/| /' conftest.$ac_ext >&5
16216
ca81d7a0 16217 ac_header_compiler=no
c0d27fcc 16218fi
ca81d7a0
JD
16219
16220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16221{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16222echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16223
16224# Is the header present?
ca81d7a0
JD
16225{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16226echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16228/* confdefs.h. */
16229_ACEOF
16230cat confdefs.h >>conftest.$ac_ext
16231cat >>conftest.$ac_ext <<_ACEOF
16232/* end confdefs.h. */
98418dba 16233#include <$ac_header>
503d2be0 16234_ACEOF
ca81d7a0
JD
16235if { (ac_try="$ac_cpp conftest.$ac_ext"
16236case "(($ac_try" in
16237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16238 *) ac_try_echo=$ac_try;;
16239esac
16240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16241 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16242 ac_status=$?
6bae0ccf 16243 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16244 rm -f conftest.er1
16245 cat conftest.err >&5
c0d27fcc 16246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16247 (exit $ac_status); } >/dev/null && {
16248 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16249 test ! -s conftest.err
16250 }; then
c0d27fcc 16251 ac_header_preproc=yes
98418dba
CW
16252else
16253 echo "$as_me: failed program was:" >&5
19650fd6
AS
16254sed 's/^/| /' conftest.$ac_ext >&5
16255
c0d27fcc 16256 ac_header_preproc=no
503d2be0 16257fi
ca81d7a0 16258
98418dba 16259rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16260{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16261echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16262
16263# So? What about this header?
edfaf76d
LK
16264case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16265 yes:no: )
c0d27fcc
MR
16266 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16267echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16268 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16269echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16270 ac_header_preproc=yes
19650fd6 16271 ;;
edfaf76d 16272 no:yes:* )
c0d27fcc
MR
16273 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16274echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16275 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16276echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16277 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16278echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16279 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16280echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16281 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16282echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16283 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16284echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16285
19650fd6 16286 ;;
c0d27fcc 16287esac
ca81d7a0
JD
16288{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16289echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16290if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16291 echo $ECHO_N "(cached) $ECHO_C" >&6
16292else
edfaf76d 16293 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16294fi
ca81d7a0
JD
16295ac_res=`eval echo '${'$as_ac_Header'}'`
16296 { echo "$as_me:$LINENO: result: $ac_res" >&5
16297echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16298
16299fi
98418dba 16300if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16301 cat >>confdefs.h <<_ACEOF
98418dba 16302#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16303_ACEOF
48d4b120 16304
ba4481b5 16305fi
c0d27fcc 16306
98418dba
CW
16307done
16308
c0d27fcc
MR
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
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
22044edf
DL
16364
16365
c0d27fcc 16366
b0e44248
RB
16367
16368
973a76b1
DL
16369
16370
16371
cd958eb3 16372
25ca0bca 16373
ea92fc9f 16374
2d3c36ae
SM
16375
16376
e2fcf543 16377
c0d27fcc
MR
16378
16379
98418dba 16380for ac_func in gethostname getdomainname dup2 \
e2fcf543 16381rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16382random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16383strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16384utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16385__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16386sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16387gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16388memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16389cfmakeraw cfsetspeed
98418dba
CW
16390do
16391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16392{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16394if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16395 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16396else
503d2be0 16397 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16398/* confdefs.h. */
16399_ACEOF
16400cat confdefs.h >>conftest.$ac_ext
16401cat >>conftest.$ac_ext <<_ACEOF
16402/* end confdefs.h. */
edfaf76d
LK
16403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16405#define $ac_func innocuous_$ac_func
16406
98418dba 16407/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16408 which can conflict with char $ac_func (); below.
16409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16410 <limits.h> exists even on freestanding compilers. */
edfaf76d 16411
19650fd6
AS
16412#ifdef __STDC__
16413# include <limits.h>
16414#else
16415# include <assert.h>
16416#endif
edfaf76d
LK
16417
16418#undef $ac_func
16419
ca81d7a0
JD
16420/* Override any GCC internal prototype to avoid an error.
16421 Use char because int might match the return type of a GCC
16422 builtin and then its argument prototype would still apply. */
503d2be0
AS
16423#ifdef __cplusplus
16424extern "C"
16425#endif
98418dba 16426char $ac_func ();
98418dba
CW
16427/* The GNU C library defines this for functions which it implements
16428 to always fail with ENOSYS. Some functions are actually named
16429 something starting with __ and the normal name is an alias. */
ca81d7a0 16430#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16431choke me
98418dba
CW
16432#endif
16433
19650fd6
AS
16434int
16435main ()
16436{
ca81d7a0 16437return $ac_func ();
503d2be0
AS
16438 ;
16439 return 0;
16440}
16441_ACEOF
16442rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16443if { (ac_try="$ac_link"
16444case "(($ac_try" in
16445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16446 *) ac_try_echo=$ac_try;;
16447esac
16448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16449 (eval "$ac_link") 2>conftest.er1
503d2be0 16450 ac_status=$?
edfaf76d
LK
16451 grep -v '^ *+' conftest.er1 >conftest.err
16452 rm -f conftest.er1
16453 cat conftest.err >&5
c0d27fcc 16454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16455 (exit $ac_status); } && {
16456 test -z "$ac_c_werror_flag" ||
16457 test ! -s conftest.err
16458 } && test -s conftest$ac_exeext &&
16459 $as_test_x conftest$ac_exeext; then
98418dba 16460 eval "$as_ac_var=yes"
503d2be0
AS
16461else
16462 echo "$as_me: failed program was:" >&5
19650fd6
AS
16463sed 's/^/| /' conftest.$ac_ext >&5
16464
ca81d7a0 16465 eval "$as_ac_var=no"
503d2be0 16466fi
ca81d7a0 16467
f053c89f 16468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16469 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16470fi
ca81d7a0
JD
16471ac_res=`eval echo '${'$as_ac_var'}'`
16472 { echo "$as_me:$LINENO: result: $ac_res" >&5
16473echo "${ECHO_T}$ac_res" >&6; }
98418dba 16474if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16475 cat >>confdefs.h <<_ACEOF
98418dba 16476#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16477_ACEOF
ba4481b5 16478
ba4481b5 16479fi
98418dba 16480done
ba4481b5 16481
c0d27fcc
MR
16482
16483
98418dba
CW
16484for ac_header in sys/un.h
16485do
16486as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16488 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16491 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16492fi
ca81d7a0
JD
16493ac_res=`eval echo '${'$as_ac_Header'}'`
16494 { echo "$as_me:$LINENO: result: $ac_res" >&5
16495echo "${ECHO_T}$ac_res" >&6; }
98418dba 16496else
c0d27fcc 16497 # Is the header compilable?
ca81d7a0
JD
16498{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16499echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16500cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16501/* confdefs.h. */
16502_ACEOF
16503cat confdefs.h >>conftest.$ac_ext
16504cat >>conftest.$ac_ext <<_ACEOF
16505/* end confdefs.h. */
c0d27fcc
MR
16506$ac_includes_default
16507#include <$ac_header>
16508_ACEOF
16509rm -f conftest.$ac_objext
ca81d7a0
JD
16510if { (ac_try="$ac_compile"
16511case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514esac
16515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16516 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16517 ac_status=$?
edfaf76d
LK
16518 grep -v '^ *+' conftest.er1 >conftest.err
16519 rm -f conftest.er1
16520 cat conftest.err >&5
c0d27fcc 16521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16522 (exit $ac_status); } && {
16523 test -z "$ac_c_werror_flag" ||
16524 test ! -s conftest.err
16525 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16526 ac_header_compiler=yes
16527else
16528 echo "$as_me: failed program was:" >&5
19650fd6
AS
16529sed 's/^/| /' conftest.$ac_ext >&5
16530
ca81d7a0 16531 ac_header_compiler=no
c0d27fcc 16532fi
ca81d7a0
JD
16533
16534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16535{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16536echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16537
16538# Is the header present?
ca81d7a0
JD
16539{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16540echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16542/* confdefs.h. */
16543_ACEOF
16544cat confdefs.h >>conftest.$ac_ext
16545cat >>conftest.$ac_ext <<_ACEOF
16546/* end confdefs.h. */
98418dba 16547#include <$ac_header>
503d2be0 16548_ACEOF
ca81d7a0
JD
16549if { (ac_try="$ac_cpp conftest.$ac_ext"
16550case "(($ac_try" in
16551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16552 *) ac_try_echo=$ac_try;;
16553esac
16554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16555 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16556 ac_status=$?
6bae0ccf 16557 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16558 rm -f conftest.er1
16559 cat conftest.err >&5
c0d27fcc 16560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16561 (exit $ac_status); } >/dev/null && {
16562 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16563 test ! -s conftest.err
16564 }; then
c0d27fcc 16565 ac_header_preproc=yes
ba4481b5 16566else
503d2be0 16567 echo "$as_me: failed program was:" >&5
19650fd6
AS
16568sed 's/^/| /' conftest.$ac_ext >&5
16569
c0d27fcc 16570 ac_header_preproc=no
ba4481b5 16571fi
ca81d7a0 16572
503d2be0 16573rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16574{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16575echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16576
16577# So? What about this header?
edfaf76d
LK
16578case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16579 yes:no: )
c0d27fcc
MR
16580 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16581echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16582 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16583echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16584 ac_header_preproc=yes
19650fd6 16585 ;;
edfaf76d 16586 no:yes:* )
c0d27fcc
MR
16587 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16588echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16589 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16590echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16591 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16592echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16593 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16594echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16595 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16596echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16597 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16598echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16599
19650fd6 16600 ;;
c0d27fcc 16601esac
ca81d7a0
JD
16602{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16605 echo $ECHO_N "(cached) $ECHO_C" >&6
16606else
edfaf76d 16607 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16608fi
ca81d7a0
JD
16609ac_res=`eval echo '${'$as_ac_Header'}'`
16610 { echo "$as_me:$LINENO: result: $ac_res" >&5
16611echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16612
16613fi
925c2f3f 16614if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16615 cat >>confdefs.h <<_ACEOF
925c2f3f 16616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16617_ACEOF
503d2be0 16618
925c2f3f 16619fi
c0d27fcc 16620
925c2f3f
EZ
16621done
16622
c0d27fcc
MR
16623
16624
16625
edfaf76d 16626
f053c89f
CY
16627
16628for ac_header in $ac_header_list
925c2f3f
EZ
16629do
16630as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16631if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16632 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16633echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16634if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16635 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16636fi
ca81d7a0
JD
16637ac_res=`eval echo '${'$as_ac_Header'}'`
16638 { echo "$as_me:$LINENO: result: $ac_res" >&5
16639echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16640else
c0d27fcc 16641 # Is the header compilable?
ca81d7a0
JD
16642{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16643echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16645/* confdefs.h. */
16646_ACEOF
16647cat confdefs.h >>conftest.$ac_ext
16648cat >>conftest.$ac_ext <<_ACEOF
16649/* end confdefs.h. */
c0d27fcc
MR
16650$ac_includes_default
16651#include <$ac_header>
16652_ACEOF
16653rm -f conftest.$ac_objext
ca81d7a0
JD
16654if { (ac_try="$ac_compile"
16655case "(($ac_try" in
16656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16657 *) ac_try_echo=$ac_try;;
16658esac
16659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16660 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16661 ac_status=$?
edfaf76d
LK
16662 grep -v '^ *+' conftest.er1 >conftest.err
16663 rm -f conftest.er1
16664 cat conftest.err >&5
c0d27fcc 16665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16666 (exit $ac_status); } && {
16667 test -z "$ac_c_werror_flag" ||
16668 test ! -s conftest.err
16669 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16670 ac_header_compiler=yes
16671else
16672 echo "$as_me: failed program was:" >&5
19650fd6
AS
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
ca81d7a0 16675 ac_header_compiler=no
c0d27fcc 16676fi
ca81d7a0
JD
16677
16678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16679{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16680echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16681
16682# Is the header present?
ca81d7a0
JD
16683{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16686/* confdefs.h. */
16687_ACEOF
16688cat confdefs.h >>conftest.$ac_ext
16689cat >>conftest.$ac_ext <<_ACEOF
16690/* end confdefs.h. */
98418dba 16691#include <$ac_header>
503d2be0 16692_ACEOF
ca81d7a0
JD
16693if { (ac_try="$ac_cpp conftest.$ac_ext"
16694case "(($ac_try" in
16695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16696 *) ac_try_echo=$ac_try;;
16697esac
16698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16700 ac_status=$?
6bae0ccf 16701 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16702 rm -f conftest.er1
16703 cat conftest.err >&5
c0d27fcc 16704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16705 (exit $ac_status); } >/dev/null && {
16706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16707 test ! -s conftest.err
16708 }; then
c0d27fcc 16709 ac_header_preproc=yes
98418dba
CW
16710else
16711 echo "$as_me: failed program was:" >&5
19650fd6
AS
16712sed 's/^/| /' conftest.$ac_ext >&5
16713
c0d27fcc 16714 ac_header_preproc=no
98418dba 16715fi
ca81d7a0 16716
98418dba 16717rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16718{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16719echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16720
16721# So? What about this header?
edfaf76d
LK
16722case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16723 yes:no: )
c0d27fcc
MR
16724 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16725echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16726 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16727echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16728 ac_header_preproc=yes
19650fd6 16729 ;;
edfaf76d 16730 no:yes:* )
c0d27fcc
MR
16731 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16732echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16733 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16734echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16735 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16736echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16737 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16738echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16739 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16740echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16741 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16742echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16743
19650fd6 16744 ;;
c0d27fcc 16745esac
ca81d7a0
JD
16746{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16747echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16748if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16749 echo $ECHO_N "(cached) $ECHO_C" >&6
16750else
edfaf76d 16751 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16752fi
ca81d7a0
JD
16753ac_res=`eval echo '${'$as_ac_Header'}'`
16754 { echo "$as_me:$LINENO: result: $ac_res" >&5
16755echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16756
16757fi
98418dba 16758if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16759 cat >>confdefs.h <<_ACEOF
98418dba 16760#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16761_ACEOF
98418dba
CW
16762
16763fi
c0d27fcc 16764
98418dba
CW
16765done
16766
c0d27fcc 16767
f053c89f
CY
16768
16769
16770
16771
16772
16773
16774
16775for ac_func in $ac_func_list
98418dba
CW
16776do
16777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16778{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16780if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16781 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16782else
98418dba 16783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16784/* confdefs.h. */
16785_ACEOF
16786cat confdefs.h >>conftest.$ac_ext
16787cat >>conftest.$ac_ext <<_ACEOF
16788/* end confdefs.h. */
edfaf76d
LK
16789/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16791#define $ac_func innocuous_$ac_func
16792
98418dba 16793/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16794 which can conflict with char $ac_func (); below.
16795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16796 <limits.h> exists even on freestanding compilers. */
edfaf76d 16797
19650fd6
AS
16798#ifdef __STDC__
16799# include <limits.h>
16800#else
16801# include <assert.h>
16802#endif
edfaf76d
LK
16803
16804#undef $ac_func
16805
ca81d7a0
JD
16806/* Override any GCC internal prototype to avoid an error.
16807 Use char because int might match the return type of a GCC
16808 builtin and then its argument prototype would still apply. */
503d2be0
AS
16809#ifdef __cplusplus
16810extern "C"
16811#endif
98418dba 16812char $ac_func ();
98418dba
CW
16813/* The GNU C library defines this for functions which it implements
16814 to always fail with ENOSYS. Some functions are actually named
16815 something starting with __ and the normal name is an alias. */
ca81d7a0 16816#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16817choke me
98418dba
CW
16818#endif
16819
19650fd6
AS
16820int
16821main ()
16822{
ca81d7a0 16823return $ac_func ();
503d2be0
AS
16824 ;
16825 return 0;
16826}
16827_ACEOF
16828rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16829if { (ac_try="$ac_link"
16830case "(($ac_try" in
16831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16832 *) ac_try_echo=$ac_try;;
16833esac
16834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16835 (eval "$ac_link") 2>conftest.er1
503d2be0 16836 ac_status=$?
edfaf76d
LK
16837 grep -v '^ *+' conftest.er1 >conftest.err
16838 rm -f conftest.er1
16839 cat conftest.err >&5
c0d27fcc 16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16841 (exit $ac_status); } && {
16842 test -z "$ac_c_werror_flag" ||
16843 test ! -s conftest.err
16844 } && test -s conftest$ac_exeext &&
16845 $as_test_x conftest$ac_exeext; then
98418dba 16846 eval "$as_ac_var=yes"
503d2be0
AS
16847else
16848 echo "$as_me: failed program was:" >&5
19650fd6
AS
16849sed 's/^/| /' conftest.$ac_ext >&5
16850
ca81d7a0 16851 eval "$as_ac_var=no"
503d2be0 16852fi
ca81d7a0 16853
f053c89f 16854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16855 conftest$ac_exeext conftest.$ac_ext
ffe36136 16856fi
ca81d7a0
JD
16857ac_res=`eval echo '${'$as_ac_var'}'`
16858 { echo "$as_me:$LINENO: result: $ac_res" >&5
16859echo "${ECHO_T}$ac_res" >&6; }
98418dba 16860if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16861 cat >>confdefs.h <<_ACEOF
98418dba 16862#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16863_ACEOF
ffe36136 16864
ba4481b5 16865fi
98418dba 16866done
ba4481b5 16867
f053c89f
CY
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
ca81d7a0
JD
16884{ echo "$as_me:$LINENO: checking for working mktime" >&5
16885echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16886if test "${ac_cv_func_working_mktime+set}" = set; then
16887 echo $ECHO_N "(cached) $ECHO_C" >&6
16888else
16889 if test "$cross_compiling" = yes; then
16890 ac_cv_func_working_mktime=no
16891else
16892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16893/* confdefs.h. */
16894_ACEOF
16895cat confdefs.h >>conftest.$ac_ext
16896cat >>conftest.$ac_ext <<_ACEOF
16897/* end confdefs.h. */
98418dba 16898/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16899#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16900# include <sys/time.h>
16901# include <time.h>
16902#else
f053c89f 16903# ifdef HAVE_SYS_TIME_H
98418dba
CW
16904# include <sys/time.h>
16905# else
16906# include <time.h>
16907# endif
16908#endif
ba4481b5 16909
facfbbbd 16910#include <limits.h>
f053c89f 16911#include <stdlib.h>
edfaf76d 16912
f053c89f 16913#ifdef HAVE_UNISTD_H
98418dba
CW
16914# include <unistd.h>
16915#endif
ba4481b5 16916
f053c89f 16917#ifndef HAVE_ALARM
98418dba
CW
16918# define alarm(X) /* empty */
16919#endif
df645f7c 16920
98418dba
CW
16921/* Work around redefinition to rpl_putenv by other config tests. */
16922#undef putenv
df645f7c 16923
98418dba 16924static time_t time_t_max;
edfaf76d 16925static time_t time_t_min;
df645f7c 16926
98418dba 16927/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16928static char *tz_strings[] = {
16929 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16930 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16931};
16932#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16933
ca81d7a0 16934/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16935 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16936static int
98418dba
CW
16937spring_forward_gap ()
16938{
16939 /* glibc (up to about 1998-10-07) failed this test. */
16940 struct tm tm;
16941
16942 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16943 instead of "TZ=America/Vancouver" in order to detect the bug even
16944 on systems that don't support the Olson extension, or don't have the
16945 full zoneinfo tables installed. */
16946 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16947
16948 tm.tm_year = 98;
16949 tm.tm_mon = 3;
16950 tm.tm_mday = 5;
16951 tm.tm_hour = 2;
16952 tm.tm_min = 0;
16953 tm.tm_sec = 0;
16954 tm.tm_isdst = -1;
ca81d7a0 16955 return mktime (&tm) != (time_t) -1;
98418dba
CW
16956}
16957
ca81d7a0 16958static int
edfaf76d 16959mktime_test1 (now)
98418dba
CW
16960 time_t now;
16961{
16962 struct tm *lt;
ca81d7a0 16963 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16964}
16965
ca81d7a0 16966static int
edfaf76d
LK
16967mktime_test (now)
16968 time_t now;
16969{
ca81d7a0
JD
16970 return (mktime_test1 (now)
16971 && mktime_test1 ((time_t) (time_t_max - now))
16972 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16973}
16974
ca81d7a0 16975static int
98418dba
CW
16976irix_6_4_bug ()
16977{
16978 /* Based on code from Ariel Faigon. */
16979 struct tm tm;
16980 tm.tm_year = 96;
16981 tm.tm_mon = 3;
16982 tm.tm_mday = 0;
16983 tm.tm_hour = 0;
16984 tm.tm_min = 0;
16985 tm.tm_sec = 0;
16986 tm.tm_isdst = -1;
16987 mktime (&tm);
ca81d7a0 16988 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16989}
16990
ca81d7a0 16991static int
98418dba
CW
16992bigtime_test (j)
16993 int j;
16994{
16995 struct tm tm;
16996 time_t now;
16997 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16998 now = mktime (&tm);
16999 if (now != (time_t) -1)
17000 {
17001 struct tm *lt = localtime (&now);
17002 if (! (lt
17003 && lt->tm_year == tm.tm_year
17004 && lt->tm_mon == tm.tm_mon
17005 && lt->tm_mday == tm.tm_mday
17006 && lt->tm_hour == tm.tm_hour
17007 && lt->tm_min == tm.tm_min
17008 && lt->tm_sec == tm.tm_sec
17009 && lt->tm_yday == tm.tm_yday
17010 && lt->tm_wday == tm.tm_wday
17011 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
17012 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 17013 return 0;
98418dba 17014 }
ca81d7a0 17015 return 1;
98418dba
CW
17016}
17017
f053c89f
CY
17018static int
17019year_2050_test ()
17020{
17021 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
17022 ignoring leap seconds. */
17023 unsigned long int answer = 2527315200UL;
17024
17025 struct tm tm;
17026 time_t t;
17027 tm.tm_year = 2050 - 1900;
17028 tm.tm_mon = 2 - 1;
17029 tm.tm_mday = 1;
17030 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
17031 tm.tm_isdst = -1;
17032
17033 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
17034 instead of "TZ=America/Vancouver" in order to detect the bug even
17035 on systems that don't support the Olson extension, or don't have the
17036 full zoneinfo tables installed. */
17037 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
17038
17039 t = mktime (&tm);
17040
17041 /* Check that the result is either a failure, or close enough
17042 to the correct answer that we can assume the discrepancy is
17043 due to leap seconds. */
17044 return (t == (time_t) -1
17045 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
17046}
17047
17048int
17049main ()
17050{
17051 time_t t, delta;
17052 int i, j;
17053
17054 /* This test makes some buggy mktime implementations loop.
17055 Give up after 60 seconds; a mktime slower than that
17056 isn't worth using anyway. */
17057 alarm (60);
17058
facfbbbd
SM
17059 for (;;)
17060 {
17061 t = (time_t_max << 1) + 1;
17062 if (t <= time_t_max)
17063 break;
17064 time_t_max = t;
17065 }
17066 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
17067
98418dba
CW
17068 delta = time_t_max / 997; /* a suitable prime number */
17069 for (i = 0; i < N_STRINGS; i++)
17070 {
17071 if (tz_strings[i])
17072 putenv (tz_strings[i]);
503d2be0 17073
98418dba 17074 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
17075 if (! mktime_test (t))
17076 return 1;
17077 if (! (mktime_test ((time_t) 1)
17078 && mktime_test ((time_t) (60 * 60))
17079 && mktime_test ((time_t) (60 * 60 * 24))))
17080 return 1;
98418dba 17081
facfbbbd 17082 for (j = 1; ; j <<= 1)
ca81d7a0
JD
17083 if (! bigtime_test (j))
17084 return 1;
facfbbbd
SM
17085 else if (INT_MAX / 2 < j)
17086 break;
17087 if (! bigtime_test (INT_MAX))
ca81d7a0 17088 return 1;
98418dba 17089 }
f053c89f 17090 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
17091}
17092_ACEOF
98418dba 17093rm -f conftest$ac_exeext
ca81d7a0
JD
17094if { (ac_try="$ac_link"
17095case "(($ac_try" in
17096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17097 *) ac_try_echo=$ac_try;;
17098esac
17099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17100 (eval "$ac_link") 2>&5
503d2be0 17101 ac_status=$?
c0d27fcc 17102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
17104 { (case "(($ac_try" in
17105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17106 *) ac_try_echo=$ac_try;;
17107esac
17108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17109 (eval "$ac_try") 2>&5
503d2be0 17110 ac_status=$?
c0d27fcc 17111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17112 (exit $ac_status); }; }; then
98418dba 17113 ac_cv_func_working_mktime=yes
503d2be0 17114else
98418dba
CW
17115 echo "$as_me: program exited with status $ac_status" >&5
17116echo "$as_me: failed program was:" >&5
19650fd6
AS
17117sed 's/^/| /' conftest.$ac_ext >&5
17118
c0d27fcc 17119( exit $ac_status )
98418dba 17120ac_cv_func_working_mktime=no
503d2be0 17121fi
ca81d7a0 17122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17123fi
ca81d7a0
JD
17124
17125
ba4481b5 17126fi
ca81d7a0
JD
17127{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17128echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17129if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17130 case " $LIBOBJS " in
edfaf76d 17131 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17132 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17133 ;;
edfaf76d
LK
17134esac
17135
ba4481b5
DL
17136fi
17137
98418dba 17138if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17139
c0d27fcc 17140cat >>confdefs.h <<\_ACEOF
98418dba 17141#define BROKEN_MKTIME 1
c0d27fcc 17142_ACEOF
ba4481b5 17143
ba4481b5 17144fi
503d2be0 17145
98418dba
CW
17146ac_have_func=no # yes means we've found a way to get the load average.
17147
6bae0ccf
DL
17148# Make sure getloadavg.c is where it belongs, at configure-time.
17149test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17150 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17151echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17152 { (exit 1); exit 1; }; }
17153
98418dba
CW
17154ac_save_LIBS=$LIBS
17155
17156# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17157({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17158echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17159if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17160 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17161else
503d2be0 17162 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17163/* confdefs.h. */
17164_ACEOF
17165cat confdefs.h >>conftest.$ac_ext
17166cat >>conftest.$ac_ext <<_ACEOF
17167/* end confdefs.h. */
edfaf76d
LK
17168/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17169 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17170#define getloadavg innocuous_getloadavg
17171
98418dba 17172/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17173 which can conflict with char getloadavg (); below.
17174 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17175 <limits.h> exists even on freestanding compilers. */
edfaf76d 17176
19650fd6
AS
17177#ifdef __STDC__
17178# include <limits.h>
17179#else
17180# include <assert.h>
17181#endif
edfaf76d
LK
17182
17183#undef getloadavg
17184
ca81d7a0
JD
17185/* Override any GCC internal prototype to avoid an error.
17186 Use char because int might match the return type of a GCC
17187 builtin and then its argument prototype would still apply. */
503d2be0
AS
17188#ifdef __cplusplus
17189extern "C"
17190#endif
98418dba 17191char getloadavg ();
98418dba
CW
17192/* The GNU C library defines this for functions which it implements
17193 to always fail with ENOSYS. Some functions are actually named
17194 something starting with __ and the normal name is an alias. */
ca81d7a0 17195#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17196choke me
cd958eb3
MB
17197#endif
17198
19650fd6
AS
17199int
17200main ()
17201{
ca81d7a0 17202return getloadavg ();
503d2be0
AS
17203 ;
17204 return 0;
17205}
17206_ACEOF
17207rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17208if { (ac_try="$ac_link"
17209case "(($ac_try" in
17210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17211 *) ac_try_echo=$ac_try;;
17212esac
17213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17214 (eval "$ac_link") 2>conftest.er1
503d2be0 17215 ac_status=$?
edfaf76d
LK
17216 grep -v '^ *+' conftest.er1 >conftest.err
17217 rm -f conftest.er1
17218 cat conftest.err >&5
c0d27fcc 17219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17220 (exit $ac_status); } && {
17221 test -z "$ac_c_werror_flag" ||
17222 test ! -s conftest.err
17223 } && test -s conftest$ac_exeext &&
17224 $as_test_x conftest$ac_exeext; then
98418dba 17225 ac_cv_func_getloadavg=yes
503d2be0
AS
17226else
17227 echo "$as_me: failed program was:" >&5
19650fd6
AS
17228sed 's/^/| /' conftest.$ac_ext >&5
17229
ca81d7a0 17230 ac_cv_func_getloadavg=no
503d2be0 17231fi
ca81d7a0 17232
f053c89f 17233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17234 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17235fi
ca81d7a0
JD
17236{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17237echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17238if test $ac_cv_func_getloadavg = yes; then
17239 exit 0
17240else
17241 exit 1
ba4481b5 17242fi
98418dba 17243) && ac_have_func=yes
ba4481b5 17244
98418dba 17245# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17246
98418dba
CW
17247for ac_func in pstat_getdynamic
17248do
17249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17250{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17252if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17253 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17254else
503d2be0 17255 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17256/* confdefs.h. */
17257_ACEOF
17258cat confdefs.h >>conftest.$ac_ext
17259cat >>conftest.$ac_ext <<_ACEOF
17260/* end confdefs.h. */
edfaf76d
LK
17261/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17263#define $ac_func innocuous_$ac_func
17264
98418dba 17265/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17266 which can conflict with char $ac_func (); below.
17267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17268 <limits.h> exists even on freestanding compilers. */
edfaf76d 17269
19650fd6
AS
17270#ifdef __STDC__
17271# include <limits.h>
17272#else
17273# include <assert.h>
17274#endif
edfaf76d
LK
17275
17276#undef $ac_func
17277
ca81d7a0
JD
17278/* Override any GCC internal prototype to avoid an error.
17279 Use char because int might match the return type of a GCC
17280 builtin and then its argument prototype would still apply. */
503d2be0
AS
17281#ifdef __cplusplus
17282extern "C"
17283#endif
98418dba 17284char $ac_func ();
98418dba
CW
17285/* The GNU C library defines this for functions which it implements
17286 to always fail with ENOSYS. Some functions are actually named
17287 something starting with __ and the normal name is an alias. */
ca81d7a0 17288#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17289choke me
98418dba
CW
17290#endif
17291
19650fd6
AS
17292int
17293main ()
17294{
ca81d7a0 17295return $ac_func ();
98418dba
CW
17296 ;
17297 return 0;
17298}
f21fadcc 17299_ACEOF
98418dba 17300rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17301if { (ac_try="$ac_link"
17302case "(($ac_try" in
17303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17304 *) ac_try_echo=$ac_try;;
17305esac
17306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17307 (eval "$ac_link") 2>conftest.er1
f21fadcc 17308 ac_status=$?
edfaf76d
LK
17309 grep -v '^ *+' conftest.er1 >conftest.err
17310 rm -f conftest.er1
17311 cat conftest.err >&5
c0d27fcc 17312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17313 (exit $ac_status); } && {
17314 test -z "$ac_c_werror_flag" ||
17315 test ! -s conftest.err
17316 } && test -s conftest$ac_exeext &&
17317 $as_test_x conftest$ac_exeext; then
98418dba 17318 eval "$as_ac_var=yes"
f21fadcc
JD
17319else
17320 echo "$as_me: failed program was:" >&5
19650fd6
AS
17321sed 's/^/| /' conftest.$ac_ext >&5
17322
ca81d7a0 17323 eval "$as_ac_var=no"
f21fadcc 17324fi
ca81d7a0 17325
f053c89f 17326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17327 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17328fi
ca81d7a0
JD
17329ac_res=`eval echo '${'$as_ac_var'}'`
17330 { echo "$as_me:$LINENO: result: $ac_res" >&5
17331echo "${ECHO_T}$ac_res" >&6; }
98418dba 17332if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17333 cat >>confdefs.h <<_ACEOF
98418dba 17334#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17335_ACEOF
98418dba
CW
17336
17337fi
17338done
17339
c0d27fcc 17340
98418dba
CW
17341# Solaris has libkstat which does not require root.
17342
ca81d7a0
JD
17343{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17344echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17345if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17346 echo $ECHO_N "(cached) $ECHO_C" >&6
17347else
17348 ac_check_lib_save_LIBS=$LIBS
98418dba 17349LIBS="-lkstat $LIBS"
f21fadcc 17350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17351/* confdefs.h. */
17352_ACEOF
17353cat confdefs.h >>conftest.$ac_ext
17354cat >>conftest.$ac_ext <<_ACEOF
17355/* end confdefs.h. */
f21fadcc 17356
ca81d7a0
JD
17357/* Override any GCC internal prototype to avoid an error.
17358 Use char because int might match the return type of a GCC
17359 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17360#ifdef __cplusplus
17361extern "C"
17362#endif
98418dba 17363char kstat_open ();
f21fadcc
JD
17364int
17365main ()
17366{
ca81d7a0 17367return kstat_open ();
f21fadcc
JD
17368 ;
17369 return 0;
17370}
17371_ACEOF
17372rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17373if { (ac_try="$ac_link"
17374case "(($ac_try" in
17375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17376 *) ac_try_echo=$ac_try;;
17377esac
17378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17379 (eval "$ac_link") 2>conftest.er1
f21fadcc 17380 ac_status=$?
edfaf76d
LK
17381 grep -v '^ *+' conftest.er1 >conftest.err
17382 rm -f conftest.er1
17383 cat conftest.err >&5
c0d27fcc 17384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17385 (exit $ac_status); } && {
17386 test -z "$ac_c_werror_flag" ||
17387 test ! -s conftest.err
17388 } && test -s conftest$ac_exeext &&
17389 $as_test_x conftest$ac_exeext; then
98418dba 17390 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17391else
17392 echo "$as_me: failed program was:" >&5
19650fd6
AS
17393sed 's/^/| /' conftest.$ac_ext >&5
17394
ca81d7a0 17395 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17396fi
ca81d7a0 17397
f053c89f 17398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17399 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17400LIBS=$ac_check_lib_save_LIBS
17401fi
ca81d7a0
JD
17402{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17403echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17404if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17405 cat >>confdefs.h <<_ACEOF
98418dba 17406#define HAVE_LIBKSTAT 1
c0d27fcc 17407_ACEOF
f21fadcc 17408
98418dba 17409 LIBS="-lkstat $LIBS"
f21fadcc 17410
f21fadcc
JD
17411fi
17412
98418dba
CW
17413test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17414
17415# Some systems with -lutil have (and need) -lkvm as well, some do not.
17416# On Solaris, -lkvm requires nlist from -lelf, so check that first
17417# to get the right answer into the cache.
17418# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17419if test $ac_have_func = no; then
ca81d7a0
JD
17420 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17421echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17422if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17423 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17424else
98418dba
CW
17425 ac_check_lib_save_LIBS=$LIBS
17426LIBS="-lelf $LIBS"
17427cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17428/* confdefs.h. */
17429_ACEOF
17430cat confdefs.h >>conftest.$ac_ext
17431cat >>conftest.$ac_ext <<_ACEOF
17432/* end confdefs.h. */
98418dba 17433
ca81d7a0
JD
17434/* Override any GCC internal prototype to avoid an error.
17435 Use char because int might match the return type of a GCC
17436 builtin and then its argument prototype would still apply. */
98418dba
CW
17437#ifdef __cplusplus
17438extern "C"
17439#endif
98418dba 17440char elf_begin ();
503d2be0
AS
17441int
17442main ()
17443{
ca81d7a0 17444return elf_begin ();
503d2be0
AS
17445 ;
17446 return 0;
17447}
17448_ACEOF
17449rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17450if { (ac_try="$ac_link"
17451case "(($ac_try" in
17452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17453 *) ac_try_echo=$ac_try;;
17454esac
17455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17456 (eval "$ac_link") 2>conftest.er1
503d2be0 17457 ac_status=$?
edfaf76d
LK
17458 grep -v '^ *+' conftest.er1 >conftest.err
17459 rm -f conftest.er1
17460 cat conftest.err >&5
c0d27fcc 17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17462 (exit $ac_status); } && {
17463 test -z "$ac_c_werror_flag" ||
17464 test ! -s conftest.err
17465 } && test -s conftest$ac_exeext &&
17466 $as_test_x conftest$ac_exeext; then
98418dba 17467 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17468else
503d2be0 17469 echo "$as_me: failed program was:" >&5
19650fd6
AS
17470sed 's/^/| /' conftest.$ac_ext >&5
17471
ca81d7a0 17472 ac_cv_lib_elf_elf_begin=no
ba4481b5 17473fi
ca81d7a0 17474
f053c89f 17475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17476 conftest$ac_exeext conftest.$ac_ext
98418dba 17477LIBS=$ac_check_lib_save_LIBS
ba4481b5 17478fi
ca81d7a0
JD
17479{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17480echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17481if test $ac_cv_lib_elf_elf_begin = yes; then
17482 LIBS="-lelf $LIBS"
ba4481b5
DL
17483fi
17484
98418dba
CW
17485fi
17486if test $ac_have_func = no; then
ca81d7a0
JD
17487 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17488echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17489if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17490 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17491else
98418dba
CW
17492 ac_check_lib_save_LIBS=$LIBS
17493LIBS="-lkvm $LIBS"
17494cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
98418dba 17500
ca81d7a0
JD
17501/* Override any GCC internal prototype to avoid an error.
17502 Use char because int might match the return type of a GCC
17503 builtin and then its argument prototype would still apply. */
98418dba
CW
17504#ifdef __cplusplus
17505extern "C"
17506#endif
98418dba 17507char kvm_open ();
503d2be0
AS
17508int
17509main ()
17510{
ca81d7a0 17511return kvm_open ();
503d2be0
AS
17512 ;
17513 return 0;
17514}
17515_ACEOF
17516rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17517if { (ac_try="$ac_link"
17518case "(($ac_try" in
17519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17520 *) ac_try_echo=$ac_try;;
17521esac
17522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17523 (eval "$ac_link") 2>conftest.er1
503d2be0 17524 ac_status=$?
edfaf76d
LK
17525 grep -v '^ *+' conftest.er1 >conftest.err
17526 rm -f conftest.er1
17527 cat conftest.err >&5
c0d27fcc 17528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17529 (exit $ac_status); } && {
17530 test -z "$ac_c_werror_flag" ||
17531 test ! -s conftest.err
17532 } && test -s conftest$ac_exeext &&
17533 $as_test_x conftest$ac_exeext; then
98418dba 17534 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17535else
17536 echo "$as_me: failed program was:" >&5
19650fd6
AS
17537sed 's/^/| /' conftest.$ac_ext >&5
17538
ca81d7a0 17539 ac_cv_lib_kvm_kvm_open=no
503d2be0 17540fi
ca81d7a0 17541
f053c89f 17542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17543 conftest$ac_exeext conftest.$ac_ext
98418dba 17544LIBS=$ac_check_lib_save_LIBS
503d2be0 17545fi
ca81d7a0
JD
17546{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17547echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17548if test $ac_cv_lib_kvm_kvm_open = yes; then
17549 LIBS="-lkvm $LIBS"
ba4481b5
DL
17550fi
17551
98418dba 17552 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17553 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17554echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17555if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17556 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17557else
98418dba
CW
17558 ac_check_lib_save_LIBS=$LIBS
17559LIBS="-lutil $LIBS"
17560cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17561/* confdefs.h. */
17562_ACEOF
17563cat confdefs.h >>conftest.$ac_ext
17564cat >>conftest.$ac_ext <<_ACEOF
17565/* end confdefs.h. */
98418dba 17566
ca81d7a0
JD
17567/* Override any GCC internal prototype to avoid an error.
17568 Use char because int might match the return type of a GCC
17569 builtin and then its argument prototype would still apply. */
98418dba
CW
17570#ifdef __cplusplus
17571extern "C"
17572#endif
98418dba 17573char getloadavg ();
503d2be0
AS
17574int
17575main ()
17576{
ca81d7a0 17577return getloadavg ();
503d2be0
AS
17578 ;
17579 return 0;
17580}
17581_ACEOF
17582rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17583if { (ac_try="$ac_link"
17584case "(($ac_try" in
17585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17586 *) ac_try_echo=$ac_try;;
17587esac
17588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17589 (eval "$ac_link") 2>conftest.er1
503d2be0 17590 ac_status=$?
edfaf76d
LK
17591 grep -v '^ *+' conftest.er1 >conftest.err
17592 rm -f conftest.er1
17593 cat conftest.err >&5
c0d27fcc 17594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17595 (exit $ac_status); } && {
17596 test -z "$ac_c_werror_flag" ||
17597 test ! -s conftest.err
17598 } && test -s conftest$ac_exeext &&
17599 $as_test_x conftest$ac_exeext; then
35996d22
AS
17600 ac_cv_lib_util_getloadavg=yes
17601else
503d2be0 17602 echo "$as_me: failed program was:" >&5
19650fd6
AS
17603sed 's/^/| /' conftest.$ac_ext >&5
17604
ca81d7a0 17605 ac_cv_lib_util_getloadavg=no
ba4481b5 17606fi
ca81d7a0 17607
f053c89f 17608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17609 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17610LIBS=$ac_check_lib_save_LIBS
17611fi
ca81d7a0
JD
17612{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17613echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17614if test $ac_cv_lib_util_getloadavg = yes; then
17615 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17616fi
503d2be0 17617
98418dba 17618fi
ba4481b5 17619
98418dba
CW
17620if test $ac_have_func = no; then
17621 # There is a commonly available library for RS/6000 AIX.
17622 # Since it is not a standard part of AIX, it might be installed locally.
17623 ac_getloadavg_LIBS=$LIBS
17624 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17625 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17626echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17627if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17628 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17629else
98418dba
CW
17630 ac_check_lib_save_LIBS=$LIBS
17631LIBS="-lgetloadavg $LIBS"
17632cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17633/* confdefs.h. */
17634_ACEOF
17635cat confdefs.h >>conftest.$ac_ext
17636cat >>conftest.$ac_ext <<_ACEOF
17637/* end confdefs.h. */
ba4481b5 17638
ca81d7a0
JD
17639/* Override any GCC internal prototype to avoid an error.
17640 Use char because int might match the return type of a GCC
17641 builtin and then its argument prototype would still apply. */
98418dba
CW
17642#ifdef __cplusplus
17643extern "C"
17644#endif
98418dba 17645char getloadavg ();
98418dba
CW
17646int
17647main ()
17648{
ca81d7a0 17649return getloadavg ();
98418dba
CW
17650 ;
17651 return 0;
17652}
503d2be0 17653_ACEOF
98418dba 17654rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17655if { (ac_try="$ac_link"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
17660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17661 (eval "$ac_link") 2>conftest.er1
98418dba 17662 ac_status=$?
edfaf76d
LK
17663 grep -v '^ *+' conftest.er1 >conftest.err
17664 rm -f conftest.er1
17665 cat conftest.err >&5
c0d27fcc 17666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17667 (exit $ac_status); } && {
17668 test -z "$ac_c_werror_flag" ||
17669 test ! -s conftest.err
17670 } && test -s conftest$ac_exeext &&
17671 $as_test_x conftest$ac_exeext; then
98418dba 17672 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17673else
98418dba 17674 echo "$as_me: failed program was:" >&5
19650fd6
AS
17675sed 's/^/| /' conftest.$ac_ext >&5
17676
ca81d7a0 17677 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17678fi
ca81d7a0 17679
f053c89f 17680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17681 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17682LIBS=$ac_check_lib_save_LIBS
17683fi
ca81d7a0
JD
17684{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17685echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17686if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17687 LIBS="-lgetloadavg $LIBS"
17688else
17689 LIBS=$ac_getloadavg_LIBS
ba4481b5 17690fi
ba4481b5
DL
17691
17692fi
98418dba
CW
17693
17694# Make sure it is really in the library, if we think we found it,
17695# otherwise set up the replacement function.
17696
17697for ac_func in getloadavg
17698do
17699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17700{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17702if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17703 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17704else
503d2be0 17705 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17706/* confdefs.h. */
17707_ACEOF
17708cat confdefs.h >>conftest.$ac_ext
17709cat >>conftest.$ac_ext <<_ACEOF
17710/* end confdefs.h. */
edfaf76d
LK
17711/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17713#define $ac_func innocuous_$ac_func
17714
ba4481b5 17715/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17716 which can conflict with char $ac_func (); below.
17717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17718 <limits.h> exists even on freestanding compilers. */
edfaf76d 17719
19650fd6
AS
17720#ifdef __STDC__
17721# include <limits.h>
17722#else
17723# include <assert.h>
17724#endif
edfaf76d
LK
17725
17726#undef $ac_func
17727
ca81d7a0
JD
17728/* Override any GCC internal prototype to avoid an error.
17729 Use char because int might match the return type of a GCC
17730 builtin and then its argument prototype would still apply. */
503d2be0
AS
17731#ifdef __cplusplus
17732extern "C"
17733#endif
503d2be0 17734char $ac_func ();
ba4481b5
DL
17735/* The GNU C library defines this for functions which it implements
17736 to always fail with ENOSYS. Some functions are actually named
17737 something starting with __ and the normal name is an alias. */
ca81d7a0 17738#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17739choke me
cd958eb3
MB
17740#endif
17741
19650fd6
AS
17742int
17743main ()
17744{
ca81d7a0 17745return $ac_func ();
503d2be0
AS
17746 ;
17747 return 0;
17748}
17749_ACEOF
17750rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17751if { (ac_try="$ac_link"
17752case "(($ac_try" in
17753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17754 *) ac_try_echo=$ac_try;;
17755esac
17756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17757 (eval "$ac_link") 2>conftest.er1
503d2be0 17758 ac_status=$?
edfaf76d
LK
17759 grep -v '^ *+' conftest.er1 >conftest.err
17760 rm -f conftest.er1
17761 cat conftest.err >&5
c0d27fcc 17762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17763 (exit $ac_status); } && {
17764 test -z "$ac_c_werror_flag" ||
17765 test ! -s conftest.err
17766 } && test -s conftest$ac_exeext &&
17767 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17768 eval "$as_ac_var=yes"
17769else
17770 echo "$as_me: failed program was:" >&5
19650fd6
AS
17771sed 's/^/| /' conftest.$ac_ext >&5
17772
ca81d7a0 17773 eval "$as_ac_var=no"
503d2be0 17774fi
ca81d7a0 17775
f053c89f 17776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17777 conftest$ac_exeext conftest.$ac_ext
503d2be0 17778fi
ca81d7a0
JD
17779ac_res=`eval echo '${'$as_ac_var'}'`
17780 { echo "$as_me:$LINENO: result: $ac_res" >&5
17781echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17782if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17783 cat >>confdefs.h <<_ACEOF
98418dba 17784#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17785_ACEOF
503d2be0 17786
98418dba 17787else
ca81d7a0 17788 case " $LIBOBJS " in
edfaf76d 17789 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17790 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17791 ;;
edfaf76d
LK
17792esac
17793
ba4481b5 17794
c0d27fcc 17795cat >>confdefs.h <<\_ACEOF
98418dba 17796#define C_GETLOADAVG 1
c0d27fcc 17797_ACEOF
ba4481b5 17798
98418dba
CW
17799# Figure out what our getloadavg.c needs.
17800ac_have_func=no
c0d27fcc 17801if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17802 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17803echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17804if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17805 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17806fi
ca81d7a0
JD
17807{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17808echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17809else
c0d27fcc 17810 # Is the header compilable?
ca81d7a0
JD
17811{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17812echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17813cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17814/* confdefs.h. */
17815_ACEOF
17816cat confdefs.h >>conftest.$ac_ext
17817cat >>conftest.$ac_ext <<_ACEOF
17818/* end confdefs.h. */
c0d27fcc
MR
17819$ac_includes_default
17820#include <sys/dg_sys_info.h>
17821_ACEOF
17822rm -f conftest.$ac_objext
ca81d7a0
JD
17823if { (ac_try="$ac_compile"
17824case "(($ac_try" in
17825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17826 *) ac_try_echo=$ac_try;;
17827esac
17828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17829 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17830 ac_status=$?
edfaf76d
LK
17831 grep -v '^ *+' conftest.er1 >conftest.err
17832 rm -f conftest.er1
17833 cat conftest.err >&5
c0d27fcc 17834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17835 (exit $ac_status); } && {
17836 test -z "$ac_c_werror_flag" ||
17837 test ! -s conftest.err
17838 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17839 ac_header_compiler=yes
17840else
17841 echo "$as_me: failed program was:" >&5
19650fd6
AS
17842sed 's/^/| /' conftest.$ac_ext >&5
17843
ca81d7a0 17844 ac_header_compiler=no
c0d27fcc 17845fi
ca81d7a0
JD
17846
17847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17848{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17849echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17850
17851# Is the header present?
ca81d7a0
JD
17852{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17853echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17854cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17855/* confdefs.h. */
17856_ACEOF
17857cat confdefs.h >>conftest.$ac_ext
17858cat >>conftest.$ac_ext <<_ACEOF
17859/* end confdefs.h. */
98418dba
CW
17860#include <sys/dg_sys_info.h>
17861_ACEOF
ca81d7a0
JD
17862if { (ac_try="$ac_cpp conftest.$ac_ext"
17863case "(($ac_try" in
17864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17865 *) ac_try_echo=$ac_try;;
17866esac
17867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17868 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17869 ac_status=$?
6bae0ccf 17870 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17871 rm -f conftest.er1
17872 cat conftest.err >&5
c0d27fcc 17873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17874 (exit $ac_status); } >/dev/null && {
17875 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17876 test ! -s conftest.err
17877 }; then
c0d27fcc 17878 ac_header_preproc=yes
98418dba
CW
17879else
17880 echo "$as_me: failed program was:" >&5
19650fd6
AS
17881sed 's/^/| /' conftest.$ac_ext >&5
17882
c0d27fcc 17883 ac_header_preproc=no
ba4481b5 17884fi
ca81d7a0 17885
98418dba 17886rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17887{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17888echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17889
17890# So? What about this header?
edfaf76d
LK
17891case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17892 yes:no: )
c0d27fcc
MR
17893 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17894echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17895 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17896echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17897 ac_header_preproc=yes
19650fd6 17898 ;;
edfaf76d 17899 no:yes:* )
c0d27fcc
MR
17900 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17901echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17902 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17903echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17904 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17905echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17906 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17907echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17908 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17909echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17910 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17911echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17912
19650fd6 17913 ;;
c0d27fcc 17914esac
ca81d7a0
JD
17915{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17916echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17917if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17918 echo $ECHO_N "(cached) $ECHO_C" >&6
17919else
17920 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17921fi
ca81d7a0
JD
17922{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17923echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17924
17925fi
98418dba
CW
17926if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17927 ac_have_func=yes
ba4481b5 17928
c0d27fcc 17929cat >>confdefs.h <<\_ACEOF
98418dba 17930#define DGUX 1
c0d27fcc
MR
17931_ACEOF
17932
503d2be0 17933
ca81d7a0
JD
17934{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17935echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17936if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17937 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17938else
503d2be0 17939 ac_check_lib_save_LIBS=$LIBS
98418dba 17940LIBS="-ldgc $LIBS"
503d2be0 17941cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
503d2be0 17947
ca81d7a0
JD
17948/* Override any GCC internal prototype to avoid an error.
17949 Use char because int might match the return type of a GCC
17950 builtin and then its argument prototype would still apply. */
503d2be0
AS
17951#ifdef __cplusplus
17952extern "C"
17953#endif
98418dba 17954char dg_sys_info ();
503d2be0
AS
17955int
17956main ()
17957{
ca81d7a0 17958return dg_sys_info ();
503d2be0
AS
17959 ;
17960 return 0;
17961}
17962_ACEOF
17963rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17964if { (ac_try="$ac_link"
17965case "(($ac_try" in
17966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17967 *) ac_try_echo=$ac_try;;
17968esac
17969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17970 (eval "$ac_link") 2>conftest.er1
503d2be0 17971 ac_status=$?
edfaf76d
LK
17972 grep -v '^ *+' conftest.er1 >conftest.err
17973 rm -f conftest.er1
17974 cat conftest.err >&5
c0d27fcc 17975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17976 (exit $ac_status); } && {
17977 test -z "$ac_c_werror_flag" ||
17978 test ! -s conftest.err
17979 } && test -s conftest$ac_exeext &&
17980 $as_test_x conftest$ac_exeext; then
98418dba 17981 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17982else
17983 echo "$as_me: failed program was:" >&5
19650fd6
AS
17984sed 's/^/| /' conftest.$ac_ext >&5
17985
ca81d7a0 17986 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17987fi
ca81d7a0 17988
f053c89f 17989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17990 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17991LIBS=$ac_check_lib_save_LIBS
17992fi
ca81d7a0
JD
17993{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17994echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17995if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17996 cat >>confdefs.h <<_ACEOF
98418dba 17997#define HAVE_LIBDGC 1
c0d27fcc 17998_ACEOF
ba4481b5 17999
98418dba 18000 LIBS="-ldgc $LIBS"
ba4481b5 18001
ba4481b5
DL
18002fi
18003
98418dba 18004fi
503d2be0 18005
c0d27fcc
MR
18006
18007
18008if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
18009 { echo "$as_me:$LINENO: checking for locale.h" >&5
18010echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 18011if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 18012 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18013fi
ca81d7a0
JD
18014{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18015echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 18016else
c0d27fcc 18017 # Is the header compilable?
ca81d7a0
JD
18018{ echo "$as_me:$LINENO: checking locale.h usability" >&5
18019echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 18020cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18021/* confdefs.h. */
18022_ACEOF
18023cat confdefs.h >>conftest.$ac_ext
18024cat >>conftest.$ac_ext <<_ACEOF
18025/* end confdefs.h. */
c0d27fcc
MR
18026$ac_includes_default
18027#include <locale.h>
18028_ACEOF
18029rm -f conftest.$ac_objext
ca81d7a0
JD
18030if { (ac_try="$ac_compile"
18031case "(($ac_try" in
18032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18033 *) ac_try_echo=$ac_try;;
18034esac
18035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18036 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18037 ac_status=$?
edfaf76d
LK
18038 grep -v '^ *+' conftest.er1 >conftest.err
18039 rm -f conftest.er1
18040 cat conftest.err >&5
c0d27fcc 18041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18042 (exit $ac_status); } && {
18043 test -z "$ac_c_werror_flag" ||
18044 test ! -s conftest.err
18045 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18046 ac_header_compiler=yes
18047else
18048 echo "$as_me: failed program was:" >&5
19650fd6
AS
18049sed 's/^/| /' conftest.$ac_ext >&5
18050
ca81d7a0 18051 ac_header_compiler=no
c0d27fcc 18052fi
ca81d7a0
JD
18053
18054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18055{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18056echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18057
18058# Is the header present?
ca81d7a0
JD
18059{ echo "$as_me:$LINENO: checking locale.h presence" >&5
18060echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 18061cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18062/* confdefs.h. */
18063_ACEOF
18064cat confdefs.h >>conftest.$ac_ext
18065cat >>conftest.$ac_ext <<_ACEOF
18066/* end confdefs.h. */
98418dba 18067#include <locale.h>
503d2be0 18068_ACEOF
ca81d7a0
JD
18069if { (ac_try="$ac_cpp conftest.$ac_ext"
18070case "(($ac_try" in
18071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072 *) ac_try_echo=$ac_try;;
18073esac
18074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18075 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18076 ac_status=$?
6bae0ccf 18077 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18078 rm -f conftest.er1
18079 cat conftest.err >&5
c0d27fcc 18080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18081 (exit $ac_status); } >/dev/null && {
18082 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18083 test ! -s conftest.err
18084 }; then
c0d27fcc 18085 ac_header_preproc=yes
98418dba
CW
18086else
18087 echo "$as_me: failed program was:" >&5
19650fd6
AS
18088sed 's/^/| /' conftest.$ac_ext >&5
18089
c0d27fcc 18090 ac_header_preproc=no
ba4481b5 18091fi
ca81d7a0 18092
98418dba 18093rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18094{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18095echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18096
18097# So? What about this header?
edfaf76d
LK
18098case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18099 yes:no: )
c0d27fcc
MR
18100 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
18101echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18102 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
18103echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
18104 ac_header_preproc=yes
19650fd6 18105 ;;
edfaf76d 18106 no:yes:* )
c0d27fcc
MR
18107 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
18108echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18109 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
18110echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
18111 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
18112echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
18113 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
18114echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18115 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 18116echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18117 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
18118echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18119
19650fd6 18120 ;;
c0d27fcc 18121esac
ca81d7a0
JD
18122{ echo "$as_me:$LINENO: checking for locale.h" >&5
18123echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
18124if test "${ac_cv_header_locale_h+set}" = set; then
18125 echo $ECHO_N "(cached) $ECHO_C" >&6
18126else
18127 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18128fi
ca81d7a0
JD
18129{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18130echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18131
c0d27fcc
MR
18132fi
18133
18134
18135
98418dba 18136for ac_func in setlocale
ba4481b5 18137do
503d2be0 18138as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18139{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18140echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18141if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18142 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18143else
503d2be0 18144 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18145/* confdefs.h. */
18146_ACEOF
18147cat confdefs.h >>conftest.$ac_ext
18148cat >>conftest.$ac_ext <<_ACEOF
18149/* end confdefs.h. */
edfaf76d
LK
18150/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18152#define $ac_func innocuous_$ac_func
18153
ba4481b5 18154/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18155 which can conflict with char $ac_func (); below.
18156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18157 <limits.h> exists even on freestanding compilers. */
edfaf76d 18158
19650fd6
AS
18159#ifdef __STDC__
18160# include <limits.h>
18161#else
18162# include <assert.h>
18163#endif
edfaf76d
LK
18164
18165#undef $ac_func
18166
ca81d7a0
JD
18167/* Override any GCC internal prototype to avoid an error.
18168 Use char because int might match the return type of a GCC
18169 builtin and then its argument prototype would still apply. */
503d2be0
AS
18170#ifdef __cplusplus
18171extern "C"
18172#endif
503d2be0 18173char $ac_func ();
ba4481b5
DL
18174/* The GNU C library defines this for functions which it implements
18175 to always fail with ENOSYS. Some functions are actually named
18176 something starting with __ and the normal name is an alias. */
ca81d7a0 18177#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18178choke me
ba4481b5
DL
18179#endif
18180
19650fd6
AS
18181int
18182main ()
18183{
ca81d7a0 18184return $ac_func ();
503d2be0
AS
18185 ;
18186 return 0;
18187}
18188_ACEOF
18189rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18190if { (ac_try="$ac_link"
18191case "(($ac_try" in
18192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18193 *) ac_try_echo=$ac_try;;
18194esac
18195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18196 (eval "$ac_link") 2>conftest.er1
503d2be0 18197 ac_status=$?
edfaf76d
LK
18198 grep -v '^ *+' conftest.er1 >conftest.err
18199 rm -f conftest.er1
18200 cat conftest.err >&5
c0d27fcc 18201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18202 (exit $ac_status); } && {
18203 test -z "$ac_c_werror_flag" ||
18204 test ! -s conftest.err
18205 } && test -s conftest$ac_exeext &&
18206 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18207 eval "$as_ac_var=yes"
18208else
18209 echo "$as_me: failed program was:" >&5
19650fd6
AS
18210sed 's/^/| /' conftest.$ac_ext >&5
18211
ca81d7a0 18212 eval "$as_ac_var=no"
503d2be0 18213fi
ca81d7a0 18214
f053c89f 18215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18216 conftest$ac_exeext conftest.$ac_ext
503d2be0 18217fi
ca81d7a0
JD
18218ac_res=`eval echo '${'$as_ac_var'}'`
18219 { echo "$as_me:$LINENO: result: $ac_res" >&5
18220echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18221if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18222 cat >>confdefs.h <<_ACEOF
503d2be0 18223#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18224_ACEOF
ba4481b5 18225
ba4481b5
DL
18226fi
18227done
18228
c0d27fcc 18229
98418dba
CW
18230# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18231# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18232# Irix 4.0.5F has the header but not the library.
18233if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18234 ac_have_func=yes
18235
c0d27fcc 18236cat >>confdefs.h <<\_ACEOF
98418dba 18237#define SVR4 1
c0d27fcc 18238_ACEOF
98418dba
CW
18239
18240fi
18241
18242if test $ac_have_func = no; then
c0d27fcc 18243 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18244 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18245echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18246if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18247 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18248fi
ca81d7a0
JD
18249{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18250echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18251else
c0d27fcc 18252 # Is the header compilable?
ca81d7a0
JD
18253{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18254echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18255cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18256/* confdefs.h. */
18257_ACEOF
18258cat confdefs.h >>conftest.$ac_ext
18259cat >>conftest.$ac_ext <<_ACEOF
18260/* end confdefs.h. */
c0d27fcc
MR
18261$ac_includes_default
18262#include <inq_stats/cpustats.h>
18263_ACEOF
18264rm -f conftest.$ac_objext
ca81d7a0
JD
18265if { (ac_try="$ac_compile"
18266case "(($ac_try" in
18267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18268 *) ac_try_echo=$ac_try;;
18269esac
18270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18271 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18272 ac_status=$?
edfaf76d
LK
18273 grep -v '^ *+' conftest.er1 >conftest.err
18274 rm -f conftest.er1
18275 cat conftest.err >&5
c0d27fcc 18276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18277 (exit $ac_status); } && {
18278 test -z "$ac_c_werror_flag" ||
18279 test ! -s conftest.err
18280 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18281 ac_header_compiler=yes
18282else
18283 echo "$as_me: failed program was:" >&5
19650fd6
AS
18284sed 's/^/| /' conftest.$ac_ext >&5
18285
ca81d7a0 18286 ac_header_compiler=no
c0d27fcc 18287fi
ca81d7a0
JD
18288
18289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18290{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18291echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18292
18293# Is the header present?
ca81d7a0
JD
18294{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18295echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18296cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
98418dba 18302#include <inq_stats/cpustats.h>
503d2be0 18303_ACEOF
ca81d7a0
JD
18304if { (ac_try="$ac_cpp conftest.$ac_ext"
18305case "(($ac_try" in
18306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18307 *) ac_try_echo=$ac_try;;
18308esac
18309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18310 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18311 ac_status=$?
6bae0ccf 18312 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18313 rm -f conftest.er1
18314 cat conftest.err >&5
c0d27fcc 18315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18316 (exit $ac_status); } >/dev/null && {
18317 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18318 test ! -s conftest.err
18319 }; then
c0d27fcc 18320 ac_header_preproc=yes
503d2be0
AS
18321else
18322 echo "$as_me: failed program was:" >&5
19650fd6
AS
18323sed 's/^/| /' conftest.$ac_ext >&5
18324
c0d27fcc 18325 ac_header_preproc=no
ba4481b5 18326fi
ca81d7a0 18327
503d2be0 18328rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18329{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18330echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18331
18332# So? What about this header?
edfaf76d
LK
18333case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18334 yes:no: )
c0d27fcc
MR
18335 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18336echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18337 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18338echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18339 ac_header_preproc=yes
19650fd6 18340 ;;
edfaf76d 18341 no:yes:* )
c0d27fcc
MR
18342 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18343echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18344 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18345echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18346 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18347echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18348 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18349echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18350 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18351echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18352 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18353echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18354
19650fd6 18355 ;;
c0d27fcc 18356esac
ca81d7a0
JD
18357{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18358echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18359if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18360 echo $ECHO_N "(cached) $ECHO_C" >&6
18361else
18362 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18363fi
ca81d7a0
JD
18364{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18365echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18366
18367fi
98418dba
CW
18368if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18369 ac_have_func=yes
ba4481b5 18370
c0d27fcc 18371cat >>confdefs.h <<\_ACEOF
98418dba 18372#define UMAX 1
c0d27fcc 18373_ACEOF
98418dba 18374
c0d27fcc
MR
18375
18376cat >>confdefs.h <<\_ACEOF
98418dba 18377#define UMAX4_3 1
c0d27fcc 18378_ACEOF
98418dba
CW
18379
18380fi
18381
c0d27fcc 18382
98418dba
CW
18383fi
18384
18385if test $ac_have_func = no; then
c0d27fcc 18386 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18387 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18388echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18389if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18390 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18391fi
ca81d7a0
JD
18392{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18393echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18394else
c0d27fcc 18395 # Is the header compilable?
ca81d7a0
JD
18396{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18397echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18398cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18399/* confdefs.h. */
18400_ACEOF
18401cat confdefs.h >>conftest.$ac_ext
18402cat >>conftest.$ac_ext <<_ACEOF
18403/* end confdefs.h. */
c0d27fcc
MR
18404$ac_includes_default
18405#include <sys/cpustats.h>
18406_ACEOF
18407rm -f conftest.$ac_objext
ca81d7a0
JD
18408if { (ac_try="$ac_compile"
18409case "(($ac_try" in
18410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18411 *) ac_try_echo=$ac_try;;
18412esac
18413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18414 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18415 ac_status=$?
edfaf76d
LK
18416 grep -v '^ *+' conftest.er1 >conftest.err
18417 rm -f conftest.er1
18418 cat conftest.err >&5
c0d27fcc 18419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18420 (exit $ac_status); } && {
18421 test -z "$ac_c_werror_flag" ||
18422 test ! -s conftest.err
18423 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18424 ac_header_compiler=yes
18425else
18426 echo "$as_me: failed program was:" >&5
19650fd6
AS
18427sed 's/^/| /' conftest.$ac_ext >&5
18428
ca81d7a0 18429 ac_header_compiler=no
c0d27fcc 18430fi
ca81d7a0
JD
18431
18432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18433{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18434echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18435
18436# Is the header present?
ca81d7a0
JD
18437{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18438echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18439cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18440/* confdefs.h. */
18441_ACEOF
18442cat confdefs.h >>conftest.$ac_ext
18443cat >>conftest.$ac_ext <<_ACEOF
18444/* end confdefs.h. */
98418dba
CW
18445#include <sys/cpustats.h>
18446_ACEOF
ca81d7a0
JD
18447if { (ac_try="$ac_cpp conftest.$ac_ext"
18448case "(($ac_try" in
18449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18450 *) ac_try_echo=$ac_try;;
18451esac
18452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18453 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18454 ac_status=$?
6bae0ccf 18455 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18456 rm -f conftest.er1
18457 cat conftest.err >&5
c0d27fcc 18458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18459 (exit $ac_status); } >/dev/null && {
18460 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18461 test ! -s conftest.err
18462 }; then
c0d27fcc 18463 ac_header_preproc=yes
98418dba
CW
18464else
18465 echo "$as_me: failed program was:" >&5
19650fd6
AS
18466sed 's/^/| /' conftest.$ac_ext >&5
18467
c0d27fcc 18468 ac_header_preproc=no
98418dba 18469fi
ca81d7a0 18470
98418dba 18471rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18472{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18473echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18474
18475# So? What about this header?
edfaf76d
LK
18476case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18477 yes:no: )
c0d27fcc
MR
18478 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18479echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18480 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18481echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18482 ac_header_preproc=yes
19650fd6 18483 ;;
edfaf76d 18484 no:yes:* )
c0d27fcc
MR
18485 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18486echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18487 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18488echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18489 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18490echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18491 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18492echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18493 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18494echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18495 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18496echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18497
19650fd6 18498 ;;
c0d27fcc 18499esac
ca81d7a0
JD
18500{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18501echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18502if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18503 echo $ECHO_N "(cached) $ECHO_C" >&6
18504else
18505 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18506fi
ca81d7a0
JD
18507{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18508echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18509
18510fi
98418dba 18511if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18512 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18513#define UMAX 1
c0d27fcc 18514_ACEOF
ba4481b5 18515
98418dba
CW
18516fi
18517
c0d27fcc 18518
98418dba
CW
18519fi
18520
18521if test $ac_have_func = no; then
18522
18523for ac_header in mach/mach.h
2c9dccc9
PJ
18524do
18525as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18526if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18527 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18528echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18529if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18530 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18531fi
ca81d7a0
JD
18532ac_res=`eval echo '${'$as_ac_Header'}'`
18533 { echo "$as_me:$LINENO: result: $ac_res" >&5
18534echo "${ECHO_T}$ac_res" >&6; }
98418dba 18535else
c0d27fcc 18536 # Is the header compilable?
ca81d7a0
JD
18537{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18538echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18539cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18540/* confdefs.h. */
18541_ACEOF
18542cat confdefs.h >>conftest.$ac_ext
18543cat >>conftest.$ac_ext <<_ACEOF
18544/* end confdefs.h. */
c0d27fcc
MR
18545$ac_includes_default
18546#include <$ac_header>
18547_ACEOF
18548rm -f conftest.$ac_objext
ca81d7a0
JD
18549if { (ac_try="$ac_compile"
18550case "(($ac_try" in
18551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18552 *) ac_try_echo=$ac_try;;
18553esac
18554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18555 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18556 ac_status=$?
edfaf76d
LK
18557 grep -v '^ *+' conftest.er1 >conftest.err
18558 rm -f conftest.er1
18559 cat conftest.err >&5
c0d27fcc 18560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18561 (exit $ac_status); } && {
18562 test -z "$ac_c_werror_flag" ||
18563 test ! -s conftest.err
18564 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18565 ac_header_compiler=yes
18566else
18567 echo "$as_me: failed program was:" >&5
19650fd6
AS
18568sed 's/^/| /' conftest.$ac_ext >&5
18569
ca81d7a0 18570 ac_header_compiler=no
c0d27fcc 18571fi
ca81d7a0
JD
18572
18573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18574{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18575echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18576
18577# Is the header present?
ca81d7a0
JD
18578{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18579echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18580cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18581/* confdefs.h. */
18582_ACEOF
18583cat confdefs.h >>conftest.$ac_ext
18584cat >>conftest.$ac_ext <<_ACEOF
18585/* end confdefs.h. */
2c9dccc9
PJ
18586#include <$ac_header>
18587_ACEOF
ca81d7a0
JD
18588if { (ac_try="$ac_cpp conftest.$ac_ext"
18589case "(($ac_try" in
18590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18591 *) ac_try_echo=$ac_try;;
18592esac
18593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18595 ac_status=$?
6bae0ccf 18596 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18597 rm -f conftest.er1
18598 cat conftest.err >&5
c0d27fcc 18599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18600 (exit $ac_status); } >/dev/null && {
18601 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18602 test ! -s conftest.err
18603 }; then
c0d27fcc
MR
18604 ac_header_preproc=yes
18605else
18606 echo "$as_me: failed program was:" >&5
19650fd6
AS
18607sed 's/^/| /' conftest.$ac_ext >&5
18608
c0d27fcc
MR
18609 ac_header_preproc=no
18610fi
ca81d7a0 18611
c0d27fcc 18612rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18613{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18614echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18615
18616# So? What about this header?
edfaf76d
LK
18617case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18618 yes:no: )
c0d27fcc
MR
18619 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18620echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18621 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18622echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18623 ac_header_preproc=yes
19650fd6 18624 ;;
edfaf76d 18625 no:yes:* )
c0d27fcc
MR
18626 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18627echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18628 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18629echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18630 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18631echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18632 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18633echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18634 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18635echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18636 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18637echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18638
19650fd6 18639 ;;
c0d27fcc 18640esac
ca81d7a0
JD
18641{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18642echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18643if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18644 echo $ECHO_N "(cached) $ECHO_C" >&6
18645else
edfaf76d 18646 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18647fi
ca81d7a0
JD
18648ac_res=`eval echo '${'$as_ac_Header'}'`
18649 { echo "$as_me:$LINENO: result: $ac_res" >&5
18650echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18651
18652fi
18653if test `eval echo '${'$as_ac_Header'}'` = yes; then
18654 cat >>confdefs.h <<_ACEOF
18655#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18656_ACEOF
18657
18658fi
18659
18660done
18661
18662fi
18663
18664
18665for ac_header in nlist.h
18666do
18667as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18669 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18671if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18672 echo $ECHO_N "(cached) $ECHO_C" >&6
18673fi
ca81d7a0
JD
18674ac_res=`eval echo '${'$as_ac_Header'}'`
18675 { echo "$as_me:$LINENO: result: $ac_res" >&5
18676echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18677else
18678 # Is the header compilable?
ca81d7a0
JD
18679{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18680echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18681cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18682/* confdefs.h. */
18683_ACEOF
18684cat confdefs.h >>conftest.$ac_ext
18685cat >>conftest.$ac_ext <<_ACEOF
18686/* end confdefs.h. */
c0d27fcc
MR
18687$ac_includes_default
18688#include <$ac_header>
18689_ACEOF
18690rm -f conftest.$ac_objext
ca81d7a0
JD
18691if { (ac_try="$ac_compile"
18692case "(($ac_try" in
18693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18694 *) ac_try_echo=$ac_try;;
18695esac
18696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18697 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18698 ac_status=$?
edfaf76d
LK
18699 grep -v '^ *+' conftest.er1 >conftest.err
18700 rm -f conftest.er1
18701 cat conftest.err >&5
c0d27fcc 18702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18703 (exit $ac_status); } && {
18704 test -z "$ac_c_werror_flag" ||
18705 test ! -s conftest.err
18706 } && test -s conftest.$ac_objext; then
c0d27fcc 18707 ac_header_compiler=yes
2c9dccc9
PJ
18708else
18709 echo "$as_me: failed program was:" >&5
19650fd6
AS
18710sed 's/^/| /' conftest.$ac_ext >&5
18711
ca81d7a0 18712 ac_header_compiler=no
98418dba 18713fi
ca81d7a0
JD
18714
18715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18717echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18718
c0d27fcc 18719# Is the header present?
ca81d7a0
JD
18720{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18721echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18722cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18723/* confdefs.h. */
18724_ACEOF
18725cat confdefs.h >>conftest.$ac_ext
18726cat >>conftest.$ac_ext <<_ACEOF
18727/* end confdefs.h. */
503d2be0
AS
18728#include <$ac_header>
18729_ACEOF
ca81d7a0
JD
18730if { (ac_try="$ac_cpp conftest.$ac_ext"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18737 ac_status=$?
6bae0ccf 18738 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18739 rm -f conftest.er1
18740 cat conftest.err >&5
c0d27fcc 18741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18742 (exit $ac_status); } >/dev/null && {
18743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18744 test ! -s conftest.err
18745 }; then
c0d27fcc 18746 ac_header_preproc=yes
503d2be0
AS
18747else
18748 echo "$as_me: failed program was:" >&5
19650fd6
AS
18749sed 's/^/| /' conftest.$ac_ext >&5
18750
c0d27fcc 18751 ac_header_preproc=no
b5de8dc0 18752fi
ca81d7a0 18753
503d2be0 18754rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18755{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18756echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18757
18758# So? What about this header?
edfaf76d
LK
18759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18760 yes:no: )
c0d27fcc
MR
18761 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18762echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18763 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18764echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18765 ac_header_preproc=yes
19650fd6 18766 ;;
edfaf76d 18767 no:yes:* )
c0d27fcc
MR
18768 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18769echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18770 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18771echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18772 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18773echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18774 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18775echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18776 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18777echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18778 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18779echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18780
19650fd6 18781 ;;
c0d27fcc 18782esac
ca81d7a0
JD
18783{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18784echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18785if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18787else
edfaf76d 18788 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18789fi
ca81d7a0
JD
18790ac_res=`eval echo '${'$as_ac_Header'}'`
18791 { echo "$as_me:$LINENO: result: $ac_res" >&5
18792echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18793
18794fi
98418dba 18795if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18796 cat >>confdefs.h <<_ACEOF
98418dba 18797#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18798_ACEOF
ca81d7a0
JD
18799 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18800echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18801if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18802 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18803else
503d2be0 18804 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18805/* confdefs.h. */
18806_ACEOF
18807cat confdefs.h >>conftest.$ac_ext
18808cat >>conftest.$ac_ext <<_ACEOF
18809/* end confdefs.h. */
98418dba 18810#include <nlist.h>
b5de8dc0 18811
503d2be0
AS
18812int
18813main ()
18814{
98418dba
CW
18815static struct nlist ac_aggr;
18816if (ac_aggr.n_un.n_name)
18817return 0;
503d2be0
AS
18818 ;
18819 return 0;
18820}
18821_ACEOF
98418dba 18822rm -f conftest.$ac_objext
ca81d7a0
JD
18823if { (ac_try="$ac_compile"
18824case "(($ac_try" in
18825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18826 *) ac_try_echo=$ac_try;;
18827esac
18828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18829 (eval "$ac_compile") 2>conftest.er1
503d2be0 18830 ac_status=$?
edfaf76d
LK
18831 grep -v '^ *+' conftest.er1 >conftest.err
18832 rm -f conftest.er1
18833 cat conftest.err >&5
c0d27fcc 18834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18835 (exit $ac_status); } && {
18836 test -z "$ac_c_werror_flag" ||
18837 test ! -s conftest.err
18838 } && test -s conftest.$ac_objext; then
edfaf76d 18839 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18840else
18841 echo "$as_me: failed program was:" >&5
19650fd6
AS
18842sed 's/^/| /' conftest.$ac_ext >&5
18843
ca81d7a0 18844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
6bae0ccf
DL
18850#include <nlist.h>
18851
18852int
18853main ()
18854{
18855static struct nlist ac_aggr;
18856if (sizeof ac_aggr.n_un.n_name)
18857return 0;
18858 ;
18859 return 0;
18860}
18861_ACEOF
18862rm -f conftest.$ac_objext
ca81d7a0
JD
18863if { (ac_try="$ac_compile"
18864case "(($ac_try" in
18865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18866 *) ac_try_echo=$ac_try;;
18867esac
18868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18869 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18870 ac_status=$?
edfaf76d
LK
18871 grep -v '^ *+' conftest.er1 >conftest.err
18872 rm -f conftest.er1
18873 cat conftest.err >&5
6bae0ccf 18874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18875 (exit $ac_status); } && {
18876 test -z "$ac_c_werror_flag" ||
18877 test ! -s conftest.err
18878 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18879 ac_cv_member_struct_nlist_n_un_n_name=yes
18880else
18881 echo "$as_me: failed program was:" >&5
19650fd6
AS
18882sed 's/^/| /' conftest.$ac_ext >&5
18883
ca81d7a0 18884 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18885fi
ca81d7a0
JD
18886
18887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18888fi
ca81d7a0
JD
18889
18890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18891fi
ca81d7a0
JD
18892{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18893echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18894if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18895
c0d27fcc 18896cat >>confdefs.h <<_ACEOF
98418dba 18897#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18898_ACEOF
b5de8dc0 18899
c0d27fcc
MR
18900
18901cat >>confdefs.h <<\_ACEOF
98418dba 18902#define NLIST_NAME_UNION 1
c0d27fcc 18903_ACEOF
b5de8dc0 18904
98418dba 18905fi
b5de8dc0 18906
c0d27fcc 18907
98418dba 18908fi
c0d27fcc 18909
98418dba 18910done
b5de8dc0 18911
98418dba
CW
18912fi
18913done
b5de8dc0 18914
c0d27fcc 18915
98418dba 18916# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18917{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18918echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18919if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18920 echo $ECHO_N "(cached) $ECHO_C" >&6
18921else
18922 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18923/* confdefs.h. */
18924_ACEOF
18925cat confdefs.h >>conftest.$ac_ext
18926cat >>conftest.$ac_ext <<_ACEOF
18927/* end confdefs.h. */
6bae0ccf 18928#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18929#ifdef LDAV_PRIVILEGED
18930Yowza Am I SETGID yet
18931#endif
18932_ACEOF
18933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18934 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18935 ac_cv_func_getloadavg_setgid=yes
18936else
18937 ac_cv_func_getloadavg_setgid=no
18938fi
18939rm -f conftest*
b5de8dc0 18940
98418dba 18941fi
ca81d7a0
JD
18942{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18943echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18944if test $ac_cv_func_getloadavg_setgid = yes; then
18945 NEED_SETGID=true
b5de8dc0 18946
c0d27fcc 18947cat >>confdefs.h <<\_ACEOF
98418dba 18948#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18949_ACEOF
98418dba 18950
b5de8dc0 18951else
98418dba 18952 NEED_SETGID=false
b5de8dc0 18953fi
98418dba
CW
18954
18955if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18956 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18957echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18958if test "${ac_cv_group_kmem+set}" = set; then
18959 echo $ECHO_N "(cached) $ECHO_C" >&6
18960else
18961 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18962 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18963 # If we got an error (system does not support symlinks), try without -L.
18964 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18965 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18966 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18967 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18968 / /s/.* //;p;'`
18969
b5de8dc0 18970fi
ca81d7a0
JD
18971{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18972echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18973 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18974fi
98418dba
CW
18975if test "x$ac_save_LIBS" = x; then
18976 GETLOADAVG_LIBS=$LIBS
18977else
18978 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18979fi
98418dba 18980LIBS=$ac_save_LIBS
b5de8dc0 18981
c0d27fcc
MR
18982
18983
ca81d7a0
JD
18984{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18985echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18986if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18987 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18988else
b936fae4 18989 while :; do
503d2be0 18990 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18991/* confdefs.h. */
18992_ACEOF
18993cat confdefs.h >>conftest.$ac_ext
18994cat >>conftest.$ac_ext <<_ACEOF
18995/* end confdefs.h. */
facfbbbd
SM
18996#include <sys/types.h> /* for off_t */
18997 #include <stdio.h>
503d2be0
AS
18998int
18999main ()
19000{
facfbbbd
SM
19001int (*fp) (FILE *, off_t, int) = fseeko;
19002 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
19003 ;
19004 return 0;
19005}
19006_ACEOF
f053c89f
CY
19007rm -f conftest.$ac_objext conftest$ac_exeext
19008if { (ac_try="$ac_link"
ca81d7a0
JD
19009case "(($ac_try" in
19010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19011 *) ac_try_echo=$ac_try;;
19012esac
19013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19014 (eval "$ac_link") 2>conftest.er1
b936fae4 19015 ac_status=$?
edfaf76d
LK
19016 grep -v '^ *+' conftest.er1 >conftest.err
19017 rm -f conftest.er1
19018 cat conftest.err >&5
c0d27fcc 19019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19020 (exit $ac_status); } && {
19021 test -z "$ac_c_werror_flag" ||
19022 test ! -s conftest.err
19023 } && test -s conftest$ac_exeext &&
19024 $as_test_x conftest$ac_exeext; then
19025 ac_cv_sys_largefile_source=no; break
b936fae4
AS
19026else
19027 echo "$as_me: failed program was:" >&5
19650fd6
AS
19028sed 's/^/| /' conftest.$ac_ext >&5
19029
ca81d7a0 19030
b936fae4 19031fi
ca81d7a0 19032
f053c89f
CY
19033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19034 conftest$ac_exeext conftest.$ac_ext
b936fae4 19035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19036/* confdefs.h. */
19037_ACEOF
19038cat confdefs.h >>conftest.$ac_ext
19039cat >>conftest.$ac_ext <<_ACEOF
19040/* end confdefs.h. */
b936fae4 19041#define _LARGEFILE_SOURCE 1
facfbbbd
SM
19042#include <sys/types.h> /* for off_t */
19043 #include <stdio.h>
b936fae4
AS
19044int
19045main ()
19046{
facfbbbd
SM
19047int (*fp) (FILE *, off_t, int) = fseeko;
19048 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
19049 ;
19050 return 0;
19051}
19052_ACEOF
f053c89f
CY
19053rm -f conftest.$ac_objext conftest$ac_exeext
19054if { (ac_try="$ac_link"
ca81d7a0
JD
19055case "(($ac_try" in
19056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19057 *) ac_try_echo=$ac_try;;
19058esac
19059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19060 (eval "$ac_link") 2>conftest.er1
b936fae4 19061 ac_status=$?
edfaf76d
LK
19062 grep -v '^ *+' conftest.er1 >conftest.err
19063 rm -f conftest.er1
19064 cat conftest.err >&5
c0d27fcc 19065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19066 (exit $ac_status); } && {
19067 test -z "$ac_c_werror_flag" ||
19068 test ! -s conftest.err
19069 } && test -s conftest$ac_exeext &&
19070 $as_test_x conftest$ac_exeext; then
b936fae4
AS
19071 ac_cv_sys_largefile_source=1; break
19072else
19073 echo "$as_me: failed program was:" >&5
19650fd6
AS
19074sed 's/^/| /' conftest.$ac_ext >&5
19075
ca81d7a0 19076
b936fae4 19077fi
ca81d7a0 19078
f053c89f
CY
19079rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19080 conftest$ac_exeext conftest.$ac_ext
19081 ac_cv_sys_largefile_source=unknown
b936fae4
AS
19082 break
19083done
19084fi
ca81d7a0
JD
19085{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19086echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
19087case $ac_cv_sys_largefile_source in #(
19088 no | unknown) ;;
19089 *)
c0d27fcc 19090cat >>confdefs.h <<_ACEOF
b936fae4 19091#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 19092_ACEOF
f053c89f
CY
19093;;
19094esac
b936fae4 19095rm -f conftest*
4c343001 19096
b936fae4
AS
19097# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19098# in glibc 2.1.3, but that breaks too many other things.
19099# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 19100if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 19101
c0d27fcc 19102cat >>confdefs.h <<\_ACEOF
b936fae4 19103#define HAVE_FSEEKO 1
c0d27fcc 19104_ACEOF
b936fae4 19105
4c343001
DL
19106fi
19107
c0d27fcc 19108
52dbaac8
PE
19109# Configure getopt.
19110# getopt.m4 serial 10
19111
19112# The getopt module assume you want GNU getopt, with getopt_long etc,
19113# rather than vanilla POSIX getopt. This means your your code should
19114# always include <getopt.h> for the getopt prototypes.
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126# Prerequisites of lib/getopt*.
19127
19128
19129
10a3b1a1 19130
52dbaac8
PE
19131 GETOPT_H=
19132
19133for ac_header in getopt.h
19134do
19135as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19137 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19138echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19139if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19140 echo $ECHO_N "(cached) $ECHO_C" >&6
19141fi
ca81d7a0
JD
19142ac_res=`eval echo '${'$as_ac_Header'}'`
19143 { echo "$as_me:$LINENO: result: $ac_res" >&5
19144echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19145else
19146 # Is the header compilable?
ca81d7a0
JD
19147{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19148echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19149cat >conftest.$ac_ext <<_ACEOF
19150/* confdefs.h. */
19151_ACEOF
19152cat confdefs.h >>conftest.$ac_ext
19153cat >>conftest.$ac_ext <<_ACEOF
19154/* end confdefs.h. */
19155$ac_includes_default
19156#include <$ac_header>
19157_ACEOF
19158rm -f conftest.$ac_objext
ca81d7a0
JD
19159if { (ac_try="$ac_compile"
19160case "(($ac_try" in
19161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19162 *) ac_try_echo=$ac_try;;
19163esac
19164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19165 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19166 ac_status=$?
19167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
19170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19171 (exit $ac_status); } && {
19172 test -z "$ac_c_werror_flag" ||
19173 test ! -s conftest.err
19174 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19175 ac_header_compiler=yes
19176else
19177 echo "$as_me: failed program was:" >&5
19178sed 's/^/| /' conftest.$ac_ext >&5
19179
ca81d7a0 19180 ac_header_compiler=no
52dbaac8 19181fi
ca81d7a0
JD
19182
19183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19184{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19185echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19186
19187# Is the header present?
ca81d7a0
JD
19188{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19189echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19190cat >conftest.$ac_ext <<_ACEOF
19191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
19196#include <$ac_header>
19197_ACEOF
ca81d7a0
JD
19198if { (ac_try="$ac_cpp conftest.$ac_ext"
19199case "(($ac_try" in
19200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19201 *) ac_try_echo=$ac_try;;
19202esac
19203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19204 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19205 ac_status=$?
19206 grep -v '^ *+' conftest.er1 >conftest.err
19207 rm -f conftest.er1
19208 cat conftest.err >&5
19209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19210 (exit $ac_status); } >/dev/null && {
19211 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19212 test ! -s conftest.err
19213 }; then
52dbaac8
PE
19214 ac_header_preproc=yes
19215else
19216 echo "$as_me: failed program was:" >&5
19217sed 's/^/| /' conftest.$ac_ext >&5
19218
19219 ac_header_preproc=no
19220fi
ca81d7a0 19221
52dbaac8 19222rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19223{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19224echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19225
19226# So? What about this header?
19227case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19228 yes:no: )
19229 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19230echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19231 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19232echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19233 ac_header_preproc=yes
19234 ;;
19235 no:yes:* )
19236 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19237echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19238 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19239echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19240 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19241echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19242 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19243echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19244 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19245echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19246 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19247echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19248
52dbaac8
PE
19249 ;;
19250esac
ca81d7a0
JD
19251{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19252echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19253if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19254 echo $ECHO_N "(cached) $ECHO_C" >&6
19255else
19256 eval "$as_ac_Header=\$ac_header_preproc"
19257fi
ca81d7a0
JD
19258ac_res=`eval echo '${'$as_ac_Header'}'`
19259 { echo "$as_me:$LINENO: result: $ac_res" >&5
19260echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19261
19262fi
19263if test `eval echo '${'$as_ac_Header'}'` = yes; then
19264 cat >>confdefs.h <<_ACEOF
19265#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19266_ACEOF
19267
19268else
19269 GETOPT_H=getopt.h
19270fi
19271
19272done
19273
19274 if test -z "$GETOPT_H"; then
19275
19276for ac_func in getopt_long_only
19277do
19278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19282 echo $ECHO_N "(cached) $ECHO_C" >&6
19283else
19284 cat >conftest.$ac_ext <<_ACEOF
19285/* confdefs.h. */
19286_ACEOF
19287cat confdefs.h >>conftest.$ac_ext
19288cat >>conftest.$ac_ext <<_ACEOF
19289/* end confdefs.h. */
19290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19292#define $ac_func innocuous_$ac_func
19293
19294/* System header to define __stub macros and hopefully few prototypes,
19295 which can conflict with char $ac_func (); below.
19296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19297 <limits.h> exists even on freestanding compilers. */
19298
19299#ifdef __STDC__
19300# include <limits.h>
19301#else
19302# include <assert.h>
19303#endif
19304
19305#undef $ac_func
19306
ca81d7a0
JD
19307/* Override any GCC internal prototype to avoid an error.
19308 Use char because int might match the return type of a GCC
19309 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19310#ifdef __cplusplus
19311extern "C"
52dbaac8 19312#endif
52dbaac8
PE
19313char $ac_func ();
19314/* The GNU C library defines this for functions which it implements
19315 to always fail with ENOSYS. Some functions are actually named
19316 something starting with __ and the normal name is an alias. */
ca81d7a0 19317#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19318choke me
52dbaac8
PE
19319#endif
19320
19321int
19322main ()
19323{
ca81d7a0 19324return $ac_func ();
52dbaac8
PE
19325 ;
19326 return 0;
19327}
19328_ACEOF
19329rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19330if { (ac_try="$ac_link"
19331case "(($ac_try" in
19332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19333 *) ac_try_echo=$ac_try;;
19334esac
19335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19336 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19337 ac_status=$?
19338 grep -v '^ *+' conftest.er1 >conftest.err
19339 rm -f conftest.er1
19340 cat conftest.err >&5
19341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19342 (exit $ac_status); } && {
19343 test -z "$ac_c_werror_flag" ||
19344 test ! -s conftest.err
19345 } && test -s conftest$ac_exeext &&
19346 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19347 eval "$as_ac_var=yes"
19348else
19349 echo "$as_me: failed program was:" >&5
19350sed 's/^/| /' conftest.$ac_ext >&5
19351
ca81d7a0 19352 eval "$as_ac_var=no"
52dbaac8 19353fi
ca81d7a0 19354
f053c89f 19355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19356 conftest$ac_exeext conftest.$ac_ext
19357fi
ca81d7a0
JD
19358ac_res=`eval echo '${'$as_ac_var'}'`
19359 { echo "$as_me:$LINENO: result: $ac_res" >&5
19360echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19361if test `eval echo '${'$as_ac_var'}'` = yes; then
19362 cat >>confdefs.h <<_ACEOF
19363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19364_ACEOF
19365
19366else
19367 GETOPT_H=getopt.h
19368fi
19369done
19370
19371 fi
19372
19373 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19374 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19375echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19376if test "${ac_cv_have_decl_optreset+set}" = set; then
19377 echo $ECHO_N "(cached) $ECHO_C" >&6
19378else
19379 cat >conftest.$ac_ext <<_ACEOF
19380/* confdefs.h. */
19381_ACEOF
19382cat confdefs.h >>conftest.$ac_ext
19383cat >>conftest.$ac_ext <<_ACEOF
19384/* end confdefs.h. */
19385#include <getopt.h>
19386
19387int
19388main ()
19389{
19390#ifndef optreset
f053c89f 19391 (void) optreset;
52dbaac8
PE
19392#endif
19393
19394 ;
19395 return 0;
19396}
19397_ACEOF
19398rm -f conftest.$ac_objext
ca81d7a0
JD
19399if { (ac_try="$ac_compile"
19400case "(($ac_try" in
19401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19402 *) ac_try_echo=$ac_try;;
19403esac
19404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19405 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19406 ac_status=$?
19407 grep -v '^ *+' conftest.er1 >conftest.err
19408 rm -f conftest.er1
19409 cat conftest.err >&5
19410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19411 (exit $ac_status); } && {
19412 test -z "$ac_c_werror_flag" ||
19413 test ! -s conftest.err
19414 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19415 ac_cv_have_decl_optreset=yes
19416else
19417 echo "$as_me: failed program was:" >&5
19418sed 's/^/| /' conftest.$ac_ext >&5
19419
ca81d7a0 19420 ac_cv_have_decl_optreset=no
52dbaac8 19421fi
ca81d7a0
JD
19422
19423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19424fi
ca81d7a0
JD
19425{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19426echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19427if test $ac_cv_have_decl_optreset = yes; then
19428 GETOPT_H=getopt.h
19429fi
19430
19431 fi
19432
19433 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19434 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19435echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19436if test "${gl_cv_func_gnu_getopt+set}" = set; then
19437 echo $ECHO_N "(cached) $ECHO_C" >&6
19438else
19439 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19440 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19441echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19442if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19443 echo $ECHO_N "(cached) $ECHO_C" >&6
19444else
19445 cat >conftest.$ac_ext <<_ACEOF
19446/* confdefs.h. */
19447_ACEOF
19448cat confdefs.h >>conftest.$ac_ext
19449cat >>conftest.$ac_ext <<_ACEOF
19450/* end confdefs.h. */
19451#include <getopt.h>
19452
19453int
19454main ()
19455{
19456#ifndef getopt_clip
f053c89f 19457 (void) getopt_clip;
52dbaac8
PE
19458#endif
19459
19460 ;
19461 return 0;
19462}
19463_ACEOF
19464rm -f conftest.$ac_objext
ca81d7a0
JD
19465if { (ac_try="$ac_compile"
19466case "(($ac_try" in
19467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19468 *) ac_try_echo=$ac_try;;
19469esac
19470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19471 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19472 ac_status=$?
19473 grep -v '^ *+' conftest.er1 >conftest.err
19474 rm -f conftest.er1
19475 cat conftest.err >&5
19476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19477 (exit $ac_status); } && {
19478 test -z "$ac_c_werror_flag" ||
19479 test ! -s conftest.err
19480 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19481 ac_cv_have_decl_getopt_clip=yes
19482else
19483 echo "$as_me: failed program was:" >&5
19484sed 's/^/| /' conftest.$ac_ext >&5
19485
ca81d7a0 19486 ac_cv_have_decl_getopt_clip=no
52dbaac8 19487fi
ca81d7a0
JD
19488
19489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19490fi
ca81d7a0
JD
19491{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19492echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19493if test $ac_cv_have_decl_getopt_clip = yes; then
19494 gl_cv_func_gnu_getopt=no
19495else
19496 gl_cv_func_gnu_getopt=yes
19497fi
19498
19499else
19500 cat >conftest.$ac_ext <<_ACEOF
19501/* confdefs.h. */
19502_ACEOF
19503cat confdefs.h >>conftest.$ac_ext
19504cat >>conftest.$ac_ext <<_ACEOF
19505/* end confdefs.h. */
19506#include <getopt.h>
19507int
19508main ()
19509{
19510
19511 char *myargv[3];
19512 myargv[0] = "conftest";
19513 myargv[1] = "-+";
19514 myargv[2] = 0;
19515 return getopt (2, myargv, "+a") != '?';
19516
19517 ;
19518 return 0;
19519}
19520_ACEOF
19521rm -f conftest$ac_exeext
ca81d7a0
JD
19522if { (ac_try="$ac_link"
19523case "(($ac_try" in
19524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19525 *) ac_try_echo=$ac_try;;
19526esac
19527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19528 (eval "$ac_link") 2>&5
52dbaac8
PE
19529 ac_status=$?
19530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19532 { (case "(($ac_try" in
19533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19534 *) ac_try_echo=$ac_try;;
19535esac
19536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19537 (eval "$ac_try") 2>&5
52dbaac8
PE
19538 ac_status=$?
19539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19540 (exit $ac_status); }; }; then
19541 gl_cv_func_gnu_getopt=yes
19542else
19543 echo "$as_me: program exited with status $ac_status" >&5
19544echo "$as_me: failed program was:" >&5
19545sed 's/^/| /' conftest.$ac_ext >&5
19546
19547( exit $ac_status )
19548gl_cv_func_gnu_getopt=no
19549fi
ca81d7a0 19550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19551fi
ca81d7a0
JD
19552
19553
52dbaac8 19554fi
ca81d7a0
JD
19555{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19556echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19557 if test "$gl_cv_func_gnu_getopt" = "no"; then
19558 GETOPT_H=getopt.h
19559 fi
19560 fi
19561
19562
19563
19564 if test -n "$GETOPT_H"; then
19565
19566
19567 GETOPT_H=getopt.h
19568
19569cat >>confdefs.h <<\_ACEOF
19570#define __GETOPT_PREFIX rpl_
19571_ACEOF
19572
19573
19574
19575 :
19576 GETOPTOBJS='getopt.o getopt1.o'
19577
19578fi
19579
19580
19581
19582
ca81d7a0
JD
19583{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19584echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19585if test "${ac_cv_func_getpgrp_void+set}" = set; then
19586 echo $ECHO_N "(cached) $ECHO_C" >&6
19587else
19588 # Use it with a single arg.
19589cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
cd958eb3
MB
19595$ac_includes_default
19596int
19597main ()
19598{
19599getpgrp (0);
19600 ;
19601 return 0;
19602}
19603_ACEOF
19604rm -f conftest.$ac_objext
ca81d7a0
JD
19605if { (ac_try="$ac_compile"
19606case "(($ac_try" in
19607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19608 *) ac_try_echo=$ac_try;;
19609esac
19610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19611 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19612 ac_status=$?
edfaf76d
LK
19613 grep -v '^ *+' conftest.er1 >conftest.err
19614 rm -f conftest.er1
19615 cat conftest.err >&5
cd958eb3 19616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19617 (exit $ac_status); } && {
19618 test -z "$ac_c_werror_flag" ||
19619 test ! -s conftest.err
19620 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19621 ac_cv_func_getpgrp_void=no
19622else
19623 echo "$as_me: failed program was:" >&5
19650fd6
AS
19624sed 's/^/| /' conftest.$ac_ext >&5
19625
ca81d7a0 19626 ac_cv_func_getpgrp_void=yes
cd958eb3 19627fi
ca81d7a0
JD
19628
19629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19630
19631fi
ca81d7a0
JD
19632{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19633echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19634if test $ac_cv_func_getpgrp_void = yes; then
19635
19636cat >>confdefs.h <<\_ACEOF
19637#define GETPGRP_VOID 1
19638_ACEOF
19639
19640fi
19641
19642
973a76b1
DL
19643
19644for ac_func in strftime
19645do
19646as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19647{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19648echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19649if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19650 echo $ECHO_N "(cached) $ECHO_C" >&6
19651else
19652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19653/* confdefs.h. */
19654_ACEOF
19655cat confdefs.h >>conftest.$ac_ext
19656cat >>conftest.$ac_ext <<_ACEOF
19657/* end confdefs.h. */
edfaf76d
LK
19658/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19659 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19660#define $ac_func innocuous_$ac_func
19661
973a76b1 19662/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19663 which can conflict with char $ac_func (); below.
19664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19665 <limits.h> exists even on freestanding compilers. */
edfaf76d 19666
19650fd6
AS
19667#ifdef __STDC__
19668# include <limits.h>
19669#else
19670# include <assert.h>
19671#endif
edfaf76d
LK
19672
19673#undef $ac_func
19674
ca81d7a0
JD
19675/* Override any GCC internal prototype to avoid an error.
19676 Use char because int might match the return type of a GCC
19677 builtin and then its argument prototype would still apply. */
973a76b1
DL
19678#ifdef __cplusplus
19679extern "C"
973a76b1 19680#endif
973a76b1
DL
19681char $ac_func ();
19682/* The GNU C library defines this for functions which it implements
19683 to always fail with ENOSYS. Some functions are actually named
19684 something starting with __ and the normal name is an alias. */
ca81d7a0 19685#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19686choke me
973a76b1
DL
19687#endif
19688
19650fd6
AS
19689int
19690main ()
19691{
ca81d7a0 19692return $ac_func ();
973a76b1
DL
19693 ;
19694 return 0;
19695}
19696_ACEOF
19697rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19698if { (ac_try="$ac_link"
19699case "(($ac_try" in
19700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19701 *) ac_try_echo=$ac_try;;
19702esac
19703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19704 (eval "$ac_link") 2>conftest.er1
973a76b1 19705 ac_status=$?
edfaf76d
LK
19706 grep -v '^ *+' conftest.er1 >conftest.err
19707 rm -f conftest.er1
19708 cat conftest.err >&5
973a76b1 19709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19710 (exit $ac_status); } && {
19711 test -z "$ac_c_werror_flag" ||
19712 test ! -s conftest.err
19713 } && test -s conftest$ac_exeext &&
19714 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19715 eval "$as_ac_var=yes"
19716else
19717 echo "$as_me: failed program was:" >&5
19650fd6
AS
19718sed 's/^/| /' conftest.$ac_ext >&5
19719
ca81d7a0 19720 eval "$as_ac_var=no"
973a76b1 19721fi
ca81d7a0 19722
f053c89f 19723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19724 conftest$ac_exeext conftest.$ac_ext
973a76b1 19725fi
ca81d7a0
JD
19726ac_res=`eval echo '${'$as_ac_var'}'`
19727 { echo "$as_me:$LINENO: result: $ac_res" >&5
19728echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19729if test `eval echo '${'$as_ac_var'}'` = yes; then
19730 cat >>confdefs.h <<_ACEOF
19731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19732_ACEOF
19733
19734else
19735 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19736{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19737echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19738if test "${ac_cv_lib_intl_strftime+set}" = set; then
19739 echo $ECHO_N "(cached) $ECHO_C" >&6
19740else
19741 ac_check_lib_save_LIBS=$LIBS
19742LIBS="-lintl $LIBS"
19743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19744/* confdefs.h. */
19745_ACEOF
19746cat confdefs.h >>conftest.$ac_ext
19747cat >>conftest.$ac_ext <<_ACEOF
19748/* end confdefs.h. */
973a76b1 19749
ca81d7a0
JD
19750/* Override any GCC internal prototype to avoid an error.
19751 Use char because int might match the return type of a GCC
19752 builtin and then its argument prototype would still apply. */
973a76b1
DL
19753#ifdef __cplusplus
19754extern "C"
19755#endif
973a76b1
DL
19756char strftime ();
19757int
19758main ()
19759{
ca81d7a0 19760return strftime ();
973a76b1
DL
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19766if { (ac_try="$ac_link"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
19771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19772 (eval "$ac_link") 2>conftest.er1
973a76b1 19773 ac_status=$?
edfaf76d
LK
19774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
973a76b1 19777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
19781 } && test -s conftest$ac_exeext &&
19782 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19783 ac_cv_lib_intl_strftime=yes
19784else
19785 echo "$as_me: failed program was:" >&5
19650fd6
AS
19786sed 's/^/| /' conftest.$ac_ext >&5
19787
ca81d7a0 19788 ac_cv_lib_intl_strftime=no
973a76b1 19789fi
ca81d7a0 19790
f053c89f 19791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19792 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19793LIBS=$ac_check_lib_save_LIBS
19794fi
ca81d7a0
JD
19795{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19796echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19797if test $ac_cv_lib_intl_strftime = yes; then
19798 cat >>confdefs.h <<\_ACEOF
19799#define HAVE_STRFTIME 1
19800_ACEOF
19801
19802LIBS="-lintl $LIBS"
19803fi
19804
19805fi
19806done
19807
19808
b936fae4
AS
19809# UNIX98 PTYs.
19810
19811for ac_func in grantpt
503d2be0
AS
19812do
19813as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19814{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19815echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19816if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19817 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19818else
503d2be0 19819 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19820/* confdefs.h. */
19821_ACEOF
19822cat confdefs.h >>conftest.$ac_ext
19823cat >>conftest.$ac_ext <<_ACEOF
19824/* end confdefs.h. */
edfaf76d
LK
19825/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19826 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19827#define $ac_func innocuous_$ac_func
19828
503d2be0 19829/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19830 which can conflict with char $ac_func (); below.
19831 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19832 <limits.h> exists even on freestanding compilers. */
edfaf76d 19833
19650fd6
AS
19834#ifdef __STDC__
19835# include <limits.h>
19836#else
19837# include <assert.h>
19838#endif
edfaf76d
LK
19839
19840#undef $ac_func
19841
ca81d7a0
JD
19842/* Override any GCC internal prototype to avoid an error.
19843 Use char because int might match the return type of a GCC
19844 builtin and then its argument prototype would still apply. */
503d2be0
AS
19845#ifdef __cplusplus
19846extern "C"
19847#endif
503d2be0 19848char $ac_func ();
503d2be0
AS
19849/* The GNU C library defines this for functions which it implements
19850 to always fail with ENOSYS. Some functions are actually named
19851 something starting with __ and the normal name is an alias. */
ca81d7a0 19852#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19853choke me
503d2be0 19854#endif
4c343001 19855
19650fd6
AS
19856int
19857main ()
19858{
ca81d7a0 19859return $ac_func ();
503d2be0
AS
19860 ;
19861 return 0;
19862}
19863_ACEOF
19864rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19865if { (ac_try="$ac_link"
19866case "(($ac_try" in
19867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19868 *) ac_try_echo=$ac_try;;
19869esac
19870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19871 (eval "$ac_link") 2>conftest.er1
503d2be0 19872 ac_status=$?
edfaf76d
LK
19873 grep -v '^ *+' conftest.er1 >conftest.err
19874 rm -f conftest.er1
19875 cat conftest.err >&5
c0d27fcc 19876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19877 (exit $ac_status); } && {
19878 test -z "$ac_c_werror_flag" ||
19879 test ! -s conftest.err
19880 } && test -s conftest$ac_exeext &&
19881 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19882 eval "$as_ac_var=yes"
19883else
19884 echo "$as_me: failed program was:" >&5
19650fd6
AS
19885sed 's/^/| /' conftest.$ac_ext >&5
19886
ca81d7a0 19887 eval "$as_ac_var=no"
503d2be0 19888fi
ca81d7a0 19889
f053c89f 19890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19891 conftest$ac_exeext conftest.$ac_ext
503d2be0 19892fi
ca81d7a0
JD
19893ac_res=`eval echo '${'$as_ac_var'}'`
19894 { echo "$as_me:$LINENO: result: $ac_res" >&5
19895echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19896if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19897 cat >>confdefs.h <<_ACEOF
503d2be0 19898#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19899_ACEOF
4c343001
DL
19900
19901fi
503d2be0
AS
19902done
19903
c0d27fcc 19904
b936fae4 19905# PTY-related GNU extensions.
4c343001 19906
b936fae4
AS
19907for ac_func in getpt
19908do
19909as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19910{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19911echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19912if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19913 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19914else
b936fae4 19915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19916/* confdefs.h. */
19917_ACEOF
19918cat confdefs.h >>conftest.$ac_ext
19919cat >>conftest.$ac_ext <<_ACEOF
19920/* end confdefs.h. */
edfaf76d
LK
19921/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19923#define $ac_func innocuous_$ac_func
19924
087121cc 19925/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19926 which can conflict with char $ac_func (); below.
19927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19928 <limits.h> exists even on freestanding compilers. */
edfaf76d 19929
19650fd6
AS
19930#ifdef __STDC__
19931# include <limits.h>
19932#else
19933# include <assert.h>
19934#endif
edfaf76d
LK
19935
19936#undef $ac_func
19937
ca81d7a0
JD
19938/* Override any GCC internal prototype to avoid an error.
19939 Use char because int might match the return type of a GCC
19940 builtin and then its argument prototype would still apply. */
503d2be0
AS
19941#ifdef __cplusplus
19942extern "C"
19943#endif
503d2be0 19944char $ac_func ();
087121cc
GM
19945/* The GNU C library defines this for functions which it implements
19946 to always fail with ENOSYS. Some functions are actually named
19947 something starting with __ and the normal name is an alias. */
ca81d7a0 19948#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19949choke me
087121cc
GM
19950#endif
19951
19650fd6
AS
19952int
19953main ()
19954{
ca81d7a0 19955return $ac_func ();
503d2be0
AS
19956 ;
19957 return 0;
19958}
19959_ACEOF
19960rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19961if { (ac_try="$ac_link"
19962case "(($ac_try" in
19963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964 *) ac_try_echo=$ac_try;;
19965esac
19966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19967 (eval "$ac_link") 2>conftest.er1
503d2be0 19968 ac_status=$?
edfaf76d
LK
19969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
c0d27fcc 19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19973 (exit $ac_status); } && {
19974 test -z "$ac_c_werror_flag" ||
19975 test ! -s conftest.err
19976 } && test -s conftest$ac_exeext &&
19977 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19978 eval "$as_ac_var=yes"
19979else
19980 echo "$as_me: failed program was:" >&5
19650fd6
AS
19981sed 's/^/| /' conftest.$ac_ext >&5
19982
ca81d7a0 19983 eval "$as_ac_var=no"
503d2be0 19984fi
ca81d7a0 19985
f053c89f 19986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19987 conftest$ac_exeext conftest.$ac_ext
503d2be0 19988fi
ca81d7a0
JD
19989ac_res=`eval echo '${'$as_ac_var'}'`
19990 { echo "$as_me:$LINENO: result: $ac_res" >&5
19991echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19992if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19993 cat >>confdefs.h <<_ACEOF
503d2be0 19994#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19995_ACEOF
087121cc 19996
087121cc
GM
19997fi
19998done
19999
c0d27fcc 20000
ba4481b5
DL
20001# Check this now, so that we will NOT find the above functions in ncurses.
20002# That is because we have not set up to link ncurses in lib-src.
20003# It's better to believe a function is not available
20004# than to expect to find it in ncurses.
503d2be0 20005
ca81d7a0
JD
20006{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
20007echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
20008if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
20009 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20010else
503d2be0 20011 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20012LIBS="-lncurses $LIBS"
503d2be0 20013cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20014/* confdefs.h. */
20015_ACEOF
20016cat confdefs.h >>conftest.$ac_ext
20017cat >>conftest.$ac_ext <<_ACEOF
20018/* end confdefs.h. */
503d2be0 20019
ca81d7a0
JD
20020/* Override any GCC internal prototype to avoid an error.
20021 Use char because int might match the return type of a GCC
20022 builtin and then its argument prototype would still apply. */
503d2be0
AS
20023#ifdef __cplusplus
20024extern "C"
20025#endif
503d2be0
AS
20026char tparm ();
20027int
20028main ()
20029{
ca81d7a0 20030return tparm ();
503d2be0
AS
20031 ;
20032 return 0;
20033}
20034_ACEOF
20035rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20036if { (ac_try="$ac_link"
20037case "(($ac_try" in
20038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20039 *) ac_try_echo=$ac_try;;
20040esac
20041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20042 (eval "$ac_link") 2>conftest.er1
503d2be0 20043 ac_status=$?
edfaf76d
LK
20044 grep -v '^ *+' conftest.er1 >conftest.err
20045 rm -f conftest.er1
20046 cat conftest.err >&5
c0d27fcc 20047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20048 (exit $ac_status); } && {
20049 test -z "$ac_c_werror_flag" ||
20050 test ! -s conftest.err
20051 } && test -s conftest$ac_exeext &&
20052 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20053 ac_cv_lib_ncurses_tparm=yes
20054else
20055 echo "$as_me: failed program was:" >&5
19650fd6
AS
20056sed 's/^/| /' conftest.$ac_ext >&5
20057
ca81d7a0 20058 ac_cv_lib_ncurses_tparm=no
503d2be0 20059fi
ca81d7a0 20060
f053c89f 20061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20062 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20063LIBS=$ac_check_lib_save_LIBS
20064fi
ca81d7a0
JD
20065{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
20066echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 20067if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 20068 cat >>confdefs.h <<_ACEOF
503d2be0 20069#define HAVE_LIBNCURSES 1
c0d27fcc 20070_ACEOF
ba4481b5
DL
20071
20072 LIBS="-lncurses $LIBS"
20073
ba4481b5
DL
20074fi
20075
c0d27fcc 20076
bc3512d0
CY
20077# Do we have res_init, for detecting changes in /etc/resolv.conf?
20078
20079resolv=no
074767f2 20080cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
20081/* confdefs.h. */
20082_ACEOF
20083cat confdefs.h >>conftest.$ac_ext
20084cat >>conftest.$ac_ext <<_ACEOF
20085/* end confdefs.h. */
074767f2
AS
20086#include <netinet/in.h>
20087#include <arpa/nameser.h>
20088#include <resolv.h>
bc3512d0
CY
20089int
20090main ()
20091{
074767f2 20092return res_init();
bc3512d0
CY
20093 ;
20094 return 0;
20095}
20096_ACEOF
20097rm -f conftest.$ac_objext conftest$ac_exeext
20098if { (ac_try="$ac_link"
20099case "(($ac_try" in
20100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20101 *) ac_try_echo=$ac_try;;
20102esac
20103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20104 (eval "$ac_link") 2>conftest.er1
20105 ac_status=$?
20106 grep -v '^ *+' conftest.er1 >conftest.err
20107 rm -f conftest.er1
20108 cat conftest.err >&5
20109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20110 (exit $ac_status); } && {
20111 test -z "$ac_c_werror_flag" ||
20112 test ! -s conftest.err
20113 } && test -s conftest$ac_exeext &&
20114 $as_test_x conftest$ac_exeext; then
074767f2 20115 have_res_init=yes
bc3512d0
CY
20116else
20117 echo "$as_me: failed program was:" >&5
20118sed 's/^/| /' conftest.$ac_ext >&5
20119
074767f2 20120 have_res_init=no
bc3512d0
CY
20121fi
20122
20123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20124 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
20125if test "$have_res_init" = no; then
20126 OLIBS="$LIBS"
20127 LIBS="$LIBS -lresolv"
20128 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
20129echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
20130 cat >conftest.$ac_ext <<_ACEOF
20131/* confdefs.h. */
20132_ACEOF
20133cat confdefs.h >>conftest.$ac_ext
20134cat >>conftest.$ac_ext <<_ACEOF
20135/* end confdefs.h. */
20136#include <netinet/in.h>
20137#include <arpa/nameser.h>
20138#include <resolv.h>
20139int
20140main ()
20141{
074767f2 20142return res_init();
bc3512d0
CY
20143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext conftest$ac_exeext
20148if { (ac_try="$ac_link"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
20153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20154 (eval "$ac_link") 2>conftest.er1
20155 ac_status=$?
20156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
20159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
20163 } && test -s conftest$ac_exeext &&
20164 $as_test_x conftest$ac_exeext; then
20165 have_res_init=yes
20166else
20167 echo "$as_me: failed program was:" >&5
20168sed 's/^/| /' conftest.$ac_ext >&5
20169
20170 have_res_init=no
20171fi
20172
20173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20174 conftest$ac_exeext conftest.$ac_ext
20175 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20176echo "${ECHO_T}$have_res_init" >&6; }
20177 if test "$have_res_init" = yes ; then
20178 resolv=yes
20179 fi
20180 LIBS="$OLIBS"
20181fi
20182
20183if test "$have_res_init" = yes; then
20184
20185cat >>confdefs.h <<\_ACEOF
20186#define HAVE_RES_INIT 1
20187_ACEOF
20188
20189fi
20190
84e70f78 20191# Do we need the Hesiod library to provide the support routines?
ff1095d1 20192if test "$with_hesiod" != no ; then
84e70f78 20193 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
20194 { echo "$as_me:$LINENO: checking for res_send" >&5
20195echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
20196if test "${ac_cv_func_res_send+set}" = set; then
20197 echo $ECHO_N "(cached) $ECHO_C" >&6
20198else
20199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20200/* confdefs.h. */
20201_ACEOF
20202cat confdefs.h >>conftest.$ac_ext
20203cat >>conftest.$ac_ext <<_ACEOF
20204/* end confdefs.h. */
edfaf76d
LK
20205/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20207#define res_send innocuous_res_send
20208
84e70f78 20209/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20210 which can conflict with char res_send (); below.
20211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20212 <limits.h> exists even on freestanding compilers. */
edfaf76d 20213
19650fd6
AS
20214#ifdef __STDC__
20215# include <limits.h>
20216#else
20217# include <assert.h>
20218#endif
edfaf76d
LK
20219
20220#undef res_send
20221
ca81d7a0
JD
20222/* Override any GCC internal prototype to avoid an error.
20223 Use char because int might match the return type of a GCC
20224 builtin and then its argument prototype would still apply. */
84e70f78
KR
20225#ifdef __cplusplus
20226extern "C"
20227#endif
84e70f78 20228char res_send ();
84e70f78
KR
20229/* The GNU C library defines this for functions which it implements
20230 to always fail with ENOSYS. Some functions are actually named
20231 something starting with __ and the normal name is an alias. */
ca81d7a0 20232#if defined __stub_res_send || defined __stub___res_send
84e70f78 20233choke me
cd958eb3
MB
20234#endif
20235
19650fd6
AS
20236int
20237main ()
20238{
ca81d7a0 20239return res_send ();
84e70f78
KR
20240 ;
20241 return 0;
20242}
20243_ACEOF
20244rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20245if { (ac_try="$ac_link"
20246case "(($ac_try" in
20247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20248 *) ac_try_echo=$ac_try;;
20249esac
20250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20251 (eval "$ac_link") 2>conftest.er1
84e70f78 20252 ac_status=$?
edfaf76d
LK
20253 grep -v '^ *+' conftest.er1 >conftest.err
20254 rm -f conftest.er1
20255 cat conftest.err >&5
c0d27fcc 20256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20257 (exit $ac_status); } && {
20258 test -z "$ac_c_werror_flag" ||
20259 test ! -s conftest.err
20260 } && test -s conftest$ac_exeext &&
20261 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20262 ac_cv_func_res_send=yes
20263else
20264 echo "$as_me: failed program was:" >&5
19650fd6
AS
20265sed 's/^/| /' conftest.$ac_ext >&5
20266
ca81d7a0 20267 ac_cv_func_res_send=no
84e70f78 20268fi
ca81d7a0 20269
f053c89f 20270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20271 conftest$ac_exeext conftest.$ac_ext
84e70f78 20272fi
ca81d7a0
JD
20273{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20274echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20275if test $ac_cv_func_res_send = yes; then
20276 :
20277else
ca81d7a0
JD
20278 { echo "$as_me:$LINENO: checking for __res_send" >&5
20279echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20280if test "${ac_cv_func___res_send+set}" = set; then
20281 echo $ECHO_N "(cached) $ECHO_C" >&6
20282else
20283 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20284/* confdefs.h. */
20285_ACEOF
20286cat confdefs.h >>conftest.$ac_ext
20287cat >>conftest.$ac_ext <<_ACEOF
20288/* end confdefs.h. */
edfaf76d
LK
20289/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20291#define __res_send innocuous___res_send
20292
84e70f78 20293/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20294 which can conflict with char __res_send (); below.
20295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20296 <limits.h> exists even on freestanding compilers. */
edfaf76d 20297
19650fd6
AS
20298#ifdef __STDC__
20299# include <limits.h>
20300#else
20301# include <assert.h>
20302#endif
edfaf76d
LK
20303
20304#undef __res_send
20305
ca81d7a0
JD
20306/* Override any GCC internal prototype to avoid an error.
20307 Use char because int might match the return type of a GCC
20308 builtin and then its argument prototype would still apply. */
84e70f78
KR
20309#ifdef __cplusplus
20310extern "C"
20311#endif
84e70f78 20312char __res_send ();
84e70f78
KR
20313/* The GNU C library defines this for functions which it implements
20314 to always fail with ENOSYS. Some functions are actually named
20315 something starting with __ and the normal name is an alias. */
ca81d7a0 20316#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20317choke me
84e70f78
KR
20318#endif
20319
19650fd6
AS
20320int
20321main ()
20322{
ca81d7a0 20323return __res_send ();
84e70f78
KR
20324 ;
20325 return 0;
20326}
20327_ACEOF
20328rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20329if { (ac_try="$ac_link"
20330case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
20334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20335 (eval "$ac_link") 2>conftest.er1
84e70f78 20336 ac_status=$?
edfaf76d
LK
20337 grep -v '^ *+' conftest.er1 >conftest.err
20338 rm -f conftest.er1
20339 cat conftest.err >&5
c0d27fcc 20340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20341 (exit $ac_status); } && {
20342 test -z "$ac_c_werror_flag" ||
20343 test ! -s conftest.err
20344 } && test -s conftest$ac_exeext &&
20345 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20346 ac_cv_func___res_send=yes
20347else
20348 echo "$as_me: failed program was:" >&5
19650fd6
AS
20349sed 's/^/| /' conftest.$ac_ext >&5
20350
ca81d7a0 20351 ac_cv_func___res_send=no
84e70f78 20352fi
ca81d7a0 20353
f053c89f 20354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20355 conftest$ac_exeext conftest.$ac_ext
84e70f78 20356fi
ca81d7a0
JD
20357{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20358echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20359if test $ac_cv_func___res_send = yes; then
20360 :
20361else
ca81d7a0
JD
20362 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20363echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20364if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20365 echo $ECHO_N "(cached) $ECHO_C" >&6
20366else
20367 ac_check_lib_save_LIBS=$LIBS
20368LIBS="-lresolv $LIBS"
20369cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20370/* confdefs.h. */
20371_ACEOF
20372cat confdefs.h >>conftest.$ac_ext
20373cat >>conftest.$ac_ext <<_ACEOF
20374/* end confdefs.h. */
84e70f78 20375
ca81d7a0
JD
20376/* Override any GCC internal prototype to avoid an error.
20377 Use char because int might match the return type of a GCC
20378 builtin and then its argument prototype would still apply. */
84e70f78
KR
20379#ifdef __cplusplus
20380extern "C"
20381#endif
84e70f78
KR
20382char res_send ();
20383int
20384main ()
20385{
ca81d7a0 20386return res_send ();
84e70f78
KR
20387 ;
20388 return 0;
20389}
20390_ACEOF
20391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20392if { (ac_try="$ac_link"
20393case "(($ac_try" in
20394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395 *) ac_try_echo=$ac_try;;
20396esac
20397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20398 (eval "$ac_link") 2>conftest.er1
84e70f78 20399 ac_status=$?
edfaf76d
LK
20400 grep -v '^ *+' conftest.er1 >conftest.err
20401 rm -f conftest.er1
20402 cat conftest.err >&5
c0d27fcc 20403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20404 (exit $ac_status); } && {
20405 test -z "$ac_c_werror_flag" ||
20406 test ! -s conftest.err
20407 } && test -s conftest$ac_exeext &&
20408 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20409 ac_cv_lib_resolv_res_send=yes
20410else
20411 echo "$as_me: failed program was:" >&5
19650fd6
AS
20412sed 's/^/| /' conftest.$ac_ext >&5
20413
ca81d7a0 20414 ac_cv_lib_resolv_res_send=no
84e70f78 20415fi
ca81d7a0 20416
f053c89f 20417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20418 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20419LIBS=$ac_check_lib_save_LIBS
20420fi
ca81d7a0
JD
20421{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20422echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20423if test $ac_cv_lib_resolv_res_send = yes; then
20424 resolv=yes
20425else
ca81d7a0
JD
20426 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20427echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20428if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20429 echo $ECHO_N "(cached) $ECHO_C" >&6
20430else
20431 ac_check_lib_save_LIBS=$LIBS
20432LIBS="-lresolv $LIBS"
20433cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20434/* confdefs.h. */
20435_ACEOF
20436cat confdefs.h >>conftest.$ac_ext
20437cat >>conftest.$ac_ext <<_ACEOF
20438/* end confdefs.h. */
84e70f78 20439
ca81d7a0
JD
20440/* Override any GCC internal prototype to avoid an error.
20441 Use char because int might match the return type of a GCC
20442 builtin and then its argument prototype would still apply. */
84e70f78
KR
20443#ifdef __cplusplus
20444extern "C"
20445#endif
84e70f78
KR
20446char __res_send ();
20447int
20448main ()
20449{
ca81d7a0 20450return __res_send ();
84e70f78
KR
20451 ;
20452 return 0;
20453}
20454_ACEOF
20455rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20456if { (ac_try="$ac_link"
20457case "(($ac_try" in
20458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20459 *) ac_try_echo=$ac_try;;
20460esac
20461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20462 (eval "$ac_link") 2>conftest.er1
84e70f78 20463 ac_status=$?
edfaf76d
LK
20464 grep -v '^ *+' conftest.er1 >conftest.err
20465 rm -f conftest.er1
20466 cat conftest.err >&5
c0d27fcc 20467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20468 (exit $ac_status); } && {
20469 test -z "$ac_c_werror_flag" ||
20470 test ! -s conftest.err
20471 } && test -s conftest$ac_exeext &&
20472 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20473 ac_cv_lib_resolv___res_send=yes
20474else
20475 echo "$as_me: failed program was:" >&5
19650fd6
AS
20476sed 's/^/| /' conftest.$ac_ext >&5
20477
ca81d7a0 20478 ac_cv_lib_resolv___res_send=no
84e70f78 20479fi
ca81d7a0 20480
f053c89f 20481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20482 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20483LIBS=$ac_check_lib_save_LIBS
20484fi
ca81d7a0
JD
20485{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20486echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20487if test $ac_cv_lib_resolv___res_send = yes; then
20488 resolv=yes
20489fi
20490
20491fi
20492
20493fi
20494
20495fi
20496
20497 if test "$resolv" = yes ; then
20498 RESOLVLIB=-lresolv
84e70f78
KR
20499 else
20500 RESOLVLIB=
20501 fi
ca81d7a0
JD
20502 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20503echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20504if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20505 echo $ECHO_N "(cached) $ECHO_C" >&6
20506else
20507 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
edfaf76d
LK
20513/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20515#define hes_getmailhost innocuous_hes_getmailhost
20516
84e70f78 20517/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20518 which can conflict with char hes_getmailhost (); below.
20519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20520 <limits.h> exists even on freestanding compilers. */
edfaf76d 20521
19650fd6
AS
20522#ifdef __STDC__
20523# include <limits.h>
20524#else
20525# include <assert.h>
20526#endif
edfaf76d
LK
20527
20528#undef hes_getmailhost
20529
ca81d7a0
JD
20530/* Override any GCC internal prototype to avoid an error.
20531 Use char because int might match the return type of a GCC
20532 builtin and then its argument prototype would still apply. */
84e70f78
KR
20533#ifdef __cplusplus
20534extern "C"
20535#endif
84e70f78 20536char hes_getmailhost ();
84e70f78
KR
20537/* The GNU C library defines this for functions which it implements
20538 to always fail with ENOSYS. Some functions are actually named
20539 something starting with __ and the normal name is an alias. */
ca81d7a0 20540#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20541choke me
cd958eb3
MB
20542#endif
20543
19650fd6
AS
20544int
20545main ()
20546{
ca81d7a0 20547return hes_getmailhost ();
84e70f78
KR
20548 ;
20549 return 0;
20550}
20551_ACEOF
20552rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20553if { (ac_try="$ac_link"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
20558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20559 (eval "$ac_link") 2>conftest.er1
84e70f78 20560 ac_status=$?
edfaf76d
LK
20561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
c0d27fcc 20564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
20568 } && test -s conftest$ac_exeext &&
20569 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20570 ac_cv_func_hes_getmailhost=yes
20571else
20572 echo "$as_me: failed program was:" >&5
19650fd6
AS
20573sed 's/^/| /' conftest.$ac_ext >&5
20574
ca81d7a0 20575 ac_cv_func_hes_getmailhost=no
84e70f78 20576fi
ca81d7a0 20577
f053c89f 20578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20579 conftest$ac_exeext conftest.$ac_ext
84e70f78 20580fi
ca81d7a0
JD
20581{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20582echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20583if test $ac_cv_func_hes_getmailhost = yes; then
20584 :
20585else
ca81d7a0
JD
20586 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20587echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20588if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20589 echo $ECHO_N "(cached) $ECHO_C" >&6
20590else
20591 ac_check_lib_save_LIBS=$LIBS
20592LIBS="-lhesiod $RESOLVLIB $LIBS"
20593cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
84e70f78 20599
ca81d7a0
JD
20600/* Override any GCC internal prototype to avoid an error.
20601 Use char because int might match the return type of a GCC
20602 builtin and then its argument prototype would still apply. */
84e70f78
KR
20603#ifdef __cplusplus
20604extern "C"
20605#endif
84e70f78
KR
20606char hes_getmailhost ();
20607int
20608main ()
20609{
ca81d7a0 20610return hes_getmailhost ();
84e70f78
KR
20611 ;
20612 return 0;
20613}
20614_ACEOF
20615rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20616if { (ac_try="$ac_link"
20617case "(($ac_try" in
20618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20619 *) ac_try_echo=$ac_try;;
20620esac
20621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20622 (eval "$ac_link") 2>conftest.er1
84e70f78 20623 ac_status=$?
edfaf76d
LK
20624 grep -v '^ *+' conftest.er1 >conftest.err
20625 rm -f conftest.er1
20626 cat conftest.err >&5
c0d27fcc 20627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20628 (exit $ac_status); } && {
20629 test -z "$ac_c_werror_flag" ||
20630 test ! -s conftest.err
20631 } && test -s conftest$ac_exeext &&
20632 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20633 ac_cv_lib_hesiod_hes_getmailhost=yes
20634else
20635 echo "$as_me: failed program was:" >&5
19650fd6
AS
20636sed 's/^/| /' conftest.$ac_ext >&5
20637
ca81d7a0 20638 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20639fi
ca81d7a0 20640
f053c89f 20641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20642 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20643LIBS=$ac_check_lib_save_LIBS
20644fi
ca81d7a0
JD
20645{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20646echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20647if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20648
c0d27fcc 20649cat >>confdefs.h <<\_ACEOF
84e70f78 20650#define HAVE_LIBHESIOD 1
c0d27fcc 20651_ACEOF
84e70f78
KR
20652
20653else
20654 :
20655fi
20656
20657fi
20658
20659fi
20660
bc3512d0
CY
20661# Do we need libresolv (due to res_init or Hesiod)?
20662if test "$resolv" = yes ; then
20663
20664cat >>confdefs.h <<\_ACEOF
20665#define HAVE_LIBRESOLV 1
20666_ACEOF
20667
20668fi
20669
a21616bd 20670# These tell us which Kerberos-related libraries to use.
ff1095d1 20671if test "${with_kerberos}" != no; then
503d2be0 20672
ca81d7a0
JD
20673{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20674echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20675if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20676 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20677else
503d2be0 20678 ac_check_lib_save_LIBS=$LIBS
a21616bd 20679LIBS="-lcom_err $LIBS"
503d2be0 20680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20681/* confdefs.h. */
20682_ACEOF
20683cat confdefs.h >>conftest.$ac_ext
20684cat >>conftest.$ac_ext <<_ACEOF
20685/* end confdefs.h. */
503d2be0 20686
ca81d7a0
JD
20687/* Override any GCC internal prototype to avoid an error.
20688 Use char because int might match the return type of a GCC
20689 builtin and then its argument prototype would still apply. */
503d2be0
AS
20690#ifdef __cplusplus
20691extern "C"
20692#endif
503d2be0
AS
20693char com_err ();
20694int
20695main ()
20696{
ca81d7a0 20697return com_err ();
503d2be0
AS
20698 ;
20699 return 0;
20700}
20701_ACEOF
20702rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20703if { (ac_try="$ac_link"
20704case "(($ac_try" in
20705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20706 *) ac_try_echo=$ac_try;;
20707esac
20708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20709 (eval "$ac_link") 2>conftest.er1
503d2be0 20710 ac_status=$?
edfaf76d
LK
20711 grep -v '^ *+' conftest.er1 >conftest.err
20712 rm -f conftest.er1
20713 cat conftest.err >&5
c0d27fcc 20714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20715 (exit $ac_status); } && {
20716 test -z "$ac_c_werror_flag" ||
20717 test ! -s conftest.err
20718 } && test -s conftest$ac_exeext &&
20719 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20720 ac_cv_lib_com_err_com_err=yes
20721else
20722 echo "$as_me: failed program was:" >&5
19650fd6
AS
20723sed 's/^/| /' conftest.$ac_ext >&5
20724
ca81d7a0 20725 ac_cv_lib_com_err_com_err=no
503d2be0 20726fi
ca81d7a0 20727
f053c89f 20728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20729 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20730LIBS=$ac_check_lib_save_LIBS
20731fi
ca81d7a0
JD
20732{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20733echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20734if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20735 cat >>confdefs.h <<_ACEOF
503d2be0 20736#define HAVE_LIBCOM_ERR 1
c0d27fcc 20737_ACEOF
a21616bd
KR
20738
20739 LIBS="-lcom_err $LIBS"
20740
a21616bd
KR
20741fi
20742
c0d27fcc 20743
ca81d7a0
JD
20744{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20745echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20746if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20747 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20748else
503d2be0 20749 ac_check_lib_save_LIBS=$LIBS
a21616bd 20750LIBS="-lk5crypto $LIBS"
503d2be0 20751cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20752/* confdefs.h. */
20753_ACEOF
20754cat confdefs.h >>conftest.$ac_ext
20755cat >>conftest.$ac_ext <<_ACEOF
20756/* end confdefs.h. */
503d2be0 20757
ca81d7a0
JD
20758/* Override any GCC internal prototype to avoid an error.
20759 Use char because int might match the return type of a GCC
20760 builtin and then its argument prototype would still apply. */
503d2be0
AS
20761#ifdef __cplusplus
20762extern "C"
20763#endif
503d2be0
AS
20764char mit_des_cbc_encrypt ();
20765int
20766main ()
20767{
ca81d7a0 20768return mit_des_cbc_encrypt ();
503d2be0
AS
20769 ;
20770 return 0;
20771}
20772_ACEOF
20773rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20774if { (ac_try="$ac_link"
20775case "(($ac_try" in
20776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20777 *) ac_try_echo=$ac_try;;
20778esac
20779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20780 (eval "$ac_link") 2>conftest.er1
503d2be0 20781 ac_status=$?
edfaf76d
LK
20782 grep -v '^ *+' conftest.er1 >conftest.err
20783 rm -f conftest.er1
20784 cat conftest.err >&5
c0d27fcc 20785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20786 (exit $ac_status); } && {
20787 test -z "$ac_c_werror_flag" ||
20788 test ! -s conftest.err
20789 } && test -s conftest$ac_exeext &&
20790 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20791 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20792else
20793 echo "$as_me: failed program was:" >&5
19650fd6
AS
20794sed 's/^/| /' conftest.$ac_ext >&5
20795
ca81d7a0 20796 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20797fi
ca81d7a0 20798
f053c89f 20799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20800 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20801LIBS=$ac_check_lib_save_LIBS
20802fi
ca81d7a0
JD
20803{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20804echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20805if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20806 cat >>confdefs.h <<_ACEOF
503d2be0 20807#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20808_ACEOF
a21616bd
KR
20809
20810 LIBS="-lk5crypto $LIBS"
20811
a21616bd
KR
20812fi
20813
c0d27fcc 20814
ca81d7a0
JD
20815{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20816echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20817if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20818 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20819else
503d2be0 20820 ac_check_lib_save_LIBS=$LIBS
a21616bd 20821LIBS="-lcrypto $LIBS"
503d2be0 20822cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20823/* confdefs.h. */
20824_ACEOF
20825cat confdefs.h >>conftest.$ac_ext
20826cat >>conftest.$ac_ext <<_ACEOF
20827/* end confdefs.h. */
503d2be0 20828
ca81d7a0
JD
20829/* Override any GCC internal prototype to avoid an error.
20830 Use char because int might match the return type of a GCC
20831 builtin and then its argument prototype would still apply. */
503d2be0
AS
20832#ifdef __cplusplus
20833extern "C"
20834#endif
503d2be0
AS
20835char mit_des_cbc_encrypt ();
20836int
20837main ()
20838{
ca81d7a0 20839return mit_des_cbc_encrypt ();
503d2be0
AS
20840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20845if { (ac_try="$ac_link"
20846case "(($ac_try" in
20847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20848 *) ac_try_echo=$ac_try;;
20849esac
20850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20851 (eval "$ac_link") 2>conftest.er1
503d2be0 20852 ac_status=$?
edfaf76d
LK
20853 grep -v '^ *+' conftest.er1 >conftest.err
20854 rm -f conftest.er1
20855 cat conftest.err >&5
c0d27fcc 20856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20857 (exit $ac_status); } && {
20858 test -z "$ac_c_werror_flag" ||
20859 test ! -s conftest.err
20860 } && test -s conftest$ac_exeext &&
20861 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20862 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20863else
20864 echo "$as_me: failed program was:" >&5
19650fd6
AS
20865sed 's/^/| /' conftest.$ac_ext >&5
20866
ca81d7a0 20867 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20868fi
ca81d7a0 20869
f053c89f 20870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20871 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20872LIBS=$ac_check_lib_save_LIBS
20873fi
ca81d7a0
JD
20874{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20875echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20876if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20877 cat >>confdefs.h <<_ACEOF
503d2be0 20878#define HAVE_LIBCRYPTO 1
c0d27fcc 20879_ACEOF
a21616bd
KR
20880
20881 LIBS="-lcrypto $LIBS"
20882
a21616bd
KR
20883fi
20884
c0d27fcc 20885
ca81d7a0
JD
20886{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20887echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20888if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20889 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20890else
503d2be0 20891 ac_check_lib_save_LIBS=$LIBS
a21616bd 20892LIBS="-lkrb5 $LIBS"
503d2be0 20893cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20894/* confdefs.h. */
20895_ACEOF
20896cat confdefs.h >>conftest.$ac_ext
20897cat >>conftest.$ac_ext <<_ACEOF
20898/* end confdefs.h. */
a21616bd 20899
ca81d7a0
JD
20900/* Override any GCC internal prototype to avoid an error.
20901 Use char because int might match the return type of a GCC
20902 builtin and then its argument prototype would still apply. */
503d2be0
AS
20903#ifdef __cplusplus
20904extern "C"
20905#endif
503d2be0
AS
20906char krb5_init_context ();
20907int
20908main ()
20909{
ca81d7a0 20910return krb5_init_context ();
503d2be0
AS
20911 ;
20912 return 0;
20913}
20914_ACEOF
20915rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20916if { (ac_try="$ac_link"
20917case "(($ac_try" in
20918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20919 *) ac_try_echo=$ac_try;;
20920esac
20921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20922 (eval "$ac_link") 2>conftest.er1
503d2be0 20923 ac_status=$?
edfaf76d
LK
20924 grep -v '^ *+' conftest.er1 >conftest.err
20925 rm -f conftest.er1
20926 cat conftest.err >&5
c0d27fcc 20927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20928 (exit $ac_status); } && {
20929 test -z "$ac_c_werror_flag" ||
20930 test ! -s conftest.err
20931 } && test -s conftest$ac_exeext &&
20932 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20933 ac_cv_lib_krb5_krb5_init_context=yes
20934else
20935 echo "$as_me: failed program was:" >&5
19650fd6
AS
20936sed 's/^/| /' conftest.$ac_ext >&5
20937
ca81d7a0 20938 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20939fi
ca81d7a0 20940
f053c89f 20941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20942 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20943LIBS=$ac_check_lib_save_LIBS
20944fi
ca81d7a0
JD
20945{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20946echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20947if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20948 cat >>confdefs.h <<_ACEOF
503d2be0 20949#define HAVE_LIBKRB5 1
c0d27fcc 20950_ACEOF
a21616bd
KR
20951
20952 LIBS="-lkrb5 $LIBS"
20953
a21616bd
KR
20954fi
20955
ff1095d1 20956 if test "${with_kerberos5}" = no; then
503d2be0 20957
ca81d7a0
JD
20958{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20959echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20960if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20961 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20962else
503d2be0 20963 ac_check_lib_save_LIBS=$LIBS
a21616bd 20964LIBS="-ldes425 $LIBS"
503d2be0 20965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20966/* confdefs.h. */
20967_ACEOF
20968cat confdefs.h >>conftest.$ac_ext
20969cat >>conftest.$ac_ext <<_ACEOF
20970/* end confdefs.h. */
503d2be0 20971
ca81d7a0
JD
20972/* Override any GCC internal prototype to avoid an error.
20973 Use char because int might match the return type of a GCC
20974 builtin and then its argument prototype would still apply. */
503d2be0
AS
20975#ifdef __cplusplus
20976extern "C"
20977#endif
503d2be0
AS
20978char des_cbc_encrypt ();
20979int
20980main ()
20981{
ca81d7a0 20982return des_cbc_encrypt ();
503d2be0
AS
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20988if { (ac_try="$ac_link"
20989case "(($ac_try" in
20990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991 *) ac_try_echo=$ac_try;;
20992esac
20993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20994 (eval "$ac_link") 2>conftest.er1
503d2be0 20995 ac_status=$?
edfaf76d
LK
20996 grep -v '^ *+' conftest.er1 >conftest.err
20997 rm -f conftest.er1
20998 cat conftest.err >&5
c0d27fcc 20999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21000 (exit $ac_status); } && {
21001 test -z "$ac_c_werror_flag" ||
21002 test ! -s conftest.err
21003 } && test -s conftest$ac_exeext &&
21004 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21005 ac_cv_lib_des425_des_cbc_encrypt=yes
21006else
21007 echo "$as_me: failed program was:" >&5
19650fd6
AS
21008sed 's/^/| /' conftest.$ac_ext >&5
21009
ca81d7a0 21010 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 21011fi
ca81d7a0 21012
f053c89f 21013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21014 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21015LIBS=$ac_check_lib_save_LIBS
21016fi
ca81d7a0
JD
21017{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
21018echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 21019if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 21020 cat >>confdefs.h <<_ACEOF
503d2be0 21021#define HAVE_LIBDES425 1
c0d27fcc 21022_ACEOF
a21616bd
KR
21023
21024 LIBS="-ldes425 $LIBS"
21025
21026else
503d2be0 21027
ca81d7a0
JD
21028{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
21029echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
21030if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
21031 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21032else
503d2be0 21033 ac_check_lib_save_LIBS=$LIBS
a21616bd 21034LIBS="-ldes $LIBS"
503d2be0 21035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21036/* confdefs.h. */
21037_ACEOF
21038cat confdefs.h >>conftest.$ac_ext
21039cat >>conftest.$ac_ext <<_ACEOF
21040/* end confdefs.h. */
503d2be0 21041
ca81d7a0
JD
21042/* Override any GCC internal prototype to avoid an error.
21043 Use char because int might match the return type of a GCC
21044 builtin and then its argument prototype would still apply. */
503d2be0
AS
21045#ifdef __cplusplus
21046extern "C"
21047#endif
503d2be0
AS
21048char des_cbc_encrypt ();
21049int
21050main ()
21051{
ca81d7a0 21052return des_cbc_encrypt ();
503d2be0
AS
21053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21058if { (ac_try="$ac_link"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
21063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21064 (eval "$ac_link") 2>conftest.er1
503d2be0 21065 ac_status=$?
edfaf76d
LK
21066 grep -v '^ *+' conftest.er1 >conftest.err
21067 rm -f conftest.er1
21068 cat conftest.err >&5
c0d27fcc 21069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21070 (exit $ac_status); } && {
21071 test -z "$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 } && test -s conftest$ac_exeext &&
21074 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21075 ac_cv_lib_des_des_cbc_encrypt=yes
21076else
21077 echo "$as_me: failed program was:" >&5
19650fd6
AS
21078sed 's/^/| /' conftest.$ac_ext >&5
21079
ca81d7a0 21080 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 21081fi
ca81d7a0 21082
f053c89f 21083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21084 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21085LIBS=$ac_check_lib_save_LIBS
21086fi
ca81d7a0
JD
21087{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
21088echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 21089if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 21090 cat >>confdefs.h <<_ACEOF
503d2be0 21091#define HAVE_LIBDES 1
c0d27fcc 21092_ACEOF
a21616bd
KR
21093
21094 LIBS="-ldes $LIBS"
21095
a21616bd
KR
21096fi
21097
21098fi
21099
c0d27fcc 21100
ca81d7a0
JD
21101{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
21102echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
21103if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
21104 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21105else
503d2be0 21106 ac_check_lib_save_LIBS=$LIBS
a21616bd 21107LIBS="-lkrb4 $LIBS"
503d2be0 21108cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21109/* confdefs.h. */
21110_ACEOF
21111cat confdefs.h >>conftest.$ac_ext
21112cat >>conftest.$ac_ext <<_ACEOF
21113/* end confdefs.h. */
503d2be0 21114
ca81d7a0
JD
21115/* Override any GCC internal prototype to avoid an error.
21116 Use char because int might match the return type of a GCC
21117 builtin and then its argument prototype would still apply. */
503d2be0
AS
21118#ifdef __cplusplus
21119extern "C"
21120#endif
503d2be0
AS
21121char krb_get_cred ();
21122int
21123main ()
21124{
f053c89f 21125return krb_get_cred ();
503d2be0
AS
21126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
21131if { (ac_try="$ac_link"
21132case "(($ac_try" in
ca81d7a0
JD
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
21136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21137 (eval "$ac_link") 2>conftest.er1
503d2be0 21138 ac_status=$?
edfaf76d
LK
21139 grep -v '^ *+' conftest.er1 >conftest.err
21140 rm -f conftest.er1
21141 cat conftest.err >&5
c0d27fcc 21142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21143 (exit $ac_status); } && {
21144 test -z "$ac_c_werror_flag" ||
21145 test ! -s conftest.err
21146 } && test -s conftest$ac_exeext &&
21147 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21148 ac_cv_lib_krb4_krb_get_cred=yes
21149else
21150 echo "$as_me: failed program was:" >&5
19650fd6
AS
21151sed 's/^/| /' conftest.$ac_ext >&5
21152
ca81d7a0 21153 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21154fi
ca81d7a0 21155
f053c89f 21156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21157 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21158LIBS=$ac_check_lib_save_LIBS
21159fi
ca81d7a0
JD
21160{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21161echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 21162if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21163 cat >>confdefs.h <<_ACEOF
503d2be0 21164#define HAVE_LIBKRB4 1
c0d27fcc 21165_ACEOF
a21616bd
KR
21166
21167 LIBS="-lkrb4 $LIBS"
21168
21169else
503d2be0 21170
ca81d7a0
JD
21171{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21172echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
21173if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
21174 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21175else
503d2be0 21176 ac_check_lib_save_LIBS=$LIBS
a21616bd 21177LIBS="-lkrb $LIBS"
503d2be0 21178cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21179/* confdefs.h. */
21180_ACEOF
21181cat confdefs.h >>conftest.$ac_ext
21182cat >>conftest.$ac_ext <<_ACEOF
21183/* end confdefs.h. */
503d2be0 21184
ca81d7a0
JD
21185/* Override any GCC internal prototype to avoid an error.
21186 Use char because int might match the return type of a GCC
21187 builtin and then its argument prototype would still apply. */
503d2be0
AS
21188#ifdef __cplusplus
21189extern "C"
21190#endif
503d2be0
AS
21191char krb_get_cred ();
21192int
21193main ()
21194{
ca81d7a0 21195return krb_get_cred ();
503d2be0
AS
21196 ;
21197 return 0;
21198}
21199_ACEOF
21200rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21201if { (ac_try="$ac_link"
21202case "(($ac_try" in
21203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21204 *) ac_try_echo=$ac_try;;
21205esac
21206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21207 (eval "$ac_link") 2>conftest.er1
503d2be0 21208 ac_status=$?
edfaf76d
LK
21209 grep -v '^ *+' conftest.er1 >conftest.err
21210 rm -f conftest.er1
21211 cat conftest.err >&5
c0d27fcc 21212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21213 (exit $ac_status); } && {
21214 test -z "$ac_c_werror_flag" ||
21215 test ! -s conftest.err
21216 } && test -s conftest$ac_exeext &&
21217 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21218 ac_cv_lib_krb_krb_get_cred=yes
21219else
21220 echo "$as_me: failed program was:" >&5
19650fd6
AS
21221sed 's/^/| /' conftest.$ac_ext >&5
21222
ca81d7a0 21223 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21224fi
ca81d7a0 21225
f053c89f 21226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21227 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21228LIBS=$ac_check_lib_save_LIBS
21229fi
ca81d7a0
JD
21230{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21231echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21232if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21233 cat >>confdefs.h <<_ACEOF
503d2be0 21234#define HAVE_LIBKRB 1
c0d27fcc 21235_ACEOF
a21616bd
KR
21236
21237 LIBS="-lkrb $LIBS"
21238
a21616bd
KR
21239fi
21240
21241fi
21242
21243 fi
21244
ff1095d1 21245 if test "${with_kerberos5}" != no; then
503d2be0
AS
21246
21247for ac_header in krb5.h
a21616bd 21248do
503d2be0 21249as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21251 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21252echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21253if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21254 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21255fi
ca81d7a0
JD
21256ac_res=`eval echo '${'$as_ac_Header'}'`
21257 { echo "$as_me:$LINENO: result: $ac_res" >&5
21258echo "${ECHO_T}$ac_res" >&6; }
98418dba 21259else
c0d27fcc 21260 # Is the header compilable?
ca81d7a0
JD
21261{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21262echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21263cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
c0d27fcc
MR
21269$ac_includes_default
21270#include <$ac_header>
21271_ACEOF
21272rm -f conftest.$ac_objext
ca81d7a0
JD
21273if { (ac_try="$ac_compile"
21274case "(($ac_try" in
21275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21276 *) ac_try_echo=$ac_try;;
21277esac
21278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21279 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21280 ac_status=$?
edfaf76d
LK
21281 grep -v '^ *+' conftest.er1 >conftest.err
21282 rm -f conftest.er1
21283 cat conftest.err >&5
c0d27fcc 21284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21285 (exit $ac_status); } && {
21286 test -z "$ac_c_werror_flag" ||
21287 test ! -s conftest.err
21288 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21289 ac_header_compiler=yes
21290else
21291 echo "$as_me: failed program was:" >&5
19650fd6
AS
21292sed 's/^/| /' conftest.$ac_ext >&5
21293
ca81d7a0 21294 ac_header_compiler=no
c0d27fcc 21295fi
ca81d7a0
JD
21296
21297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21298{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21299echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21300
21301# Is the header present?
ca81d7a0
JD
21302{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21303echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21305/* confdefs.h. */
21306_ACEOF
21307cat confdefs.h >>conftest.$ac_ext
21308cat >>conftest.$ac_ext <<_ACEOF
21309/* end confdefs.h. */
503d2be0
AS
21310#include <$ac_header>
21311_ACEOF
ca81d7a0
JD
21312if { (ac_try="$ac_cpp conftest.$ac_ext"
21313case "(($ac_try" in
21314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21315 *) ac_try_echo=$ac_try;;
21316esac
21317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21318 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21319 ac_status=$?
6bae0ccf 21320 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21321 rm -f conftest.er1
21322 cat conftest.err >&5
c0d27fcc 21323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21324 (exit $ac_status); } >/dev/null && {
21325 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21326 test ! -s conftest.err
21327 }; then
c0d27fcc 21328 ac_header_preproc=yes
503d2be0
AS
21329else
21330 echo "$as_me: failed program was:" >&5
19650fd6
AS
21331sed 's/^/| /' conftest.$ac_ext >&5
21332
c0d27fcc 21333 ac_header_preproc=no
a21616bd 21334fi
ca81d7a0 21335
503d2be0 21336rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21337{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21338echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21339
21340# So? What about this header?
edfaf76d
LK
21341case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21342 yes:no: )
c0d27fcc
MR
21343 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21344echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21345 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21346echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21347 ac_header_preproc=yes
19650fd6 21348 ;;
edfaf76d 21349 no:yes:* )
c0d27fcc
MR
21350 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21351echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21352 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21353echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21354 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21355echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21356 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21357echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21358 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21359echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21360 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21361echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21362
19650fd6 21363 ;;
c0d27fcc 21364esac
ca81d7a0
JD
21365{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
21369else
edfaf76d 21370 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21371fi
ca81d7a0
JD
21372ac_res=`eval echo '${'$as_ac_Header'}'`
21373 { echo "$as_me:$LINENO: result: $ac_res" >&5
21374echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21375
21376fi
503d2be0 21377if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21378 cat >>confdefs.h <<_ACEOF
503d2be0 21379#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21380_ACEOF
503d2be0 21381
a21616bd 21382fi
c0d27fcc 21383
a21616bd
KR
21384done
21385
21386 else
503d2be0
AS
21387
21388for ac_header in des.h
a21616bd 21389do
503d2be0 21390as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21392 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21393echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21394if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21395 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21396fi
ca81d7a0
JD
21397ac_res=`eval echo '${'$as_ac_Header'}'`
21398 { echo "$as_me:$LINENO: result: $ac_res" >&5
21399echo "${ECHO_T}$ac_res" >&6; }
98418dba 21400else
c0d27fcc 21401 # Is the header compilable?
ca81d7a0
JD
21402{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21403echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21405/* confdefs.h. */
21406_ACEOF
21407cat confdefs.h >>conftest.$ac_ext
21408cat >>conftest.$ac_ext <<_ACEOF
21409/* end confdefs.h. */
c0d27fcc
MR
21410$ac_includes_default
21411#include <$ac_header>
21412_ACEOF
21413rm -f conftest.$ac_objext
ca81d7a0
JD
21414if { (ac_try="$ac_compile"
21415case "(($ac_try" in
21416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21417 *) ac_try_echo=$ac_try;;
21418esac
21419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21420 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21421 ac_status=$?
edfaf76d
LK
21422 grep -v '^ *+' conftest.er1 >conftest.err
21423 rm -f conftest.er1
21424 cat conftest.err >&5
c0d27fcc 21425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21426 (exit $ac_status); } && {
21427 test -z "$ac_c_werror_flag" ||
21428 test ! -s conftest.err
21429 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21430 ac_header_compiler=yes
21431else
21432 echo "$as_me: failed program was:" >&5
19650fd6
AS
21433sed 's/^/| /' conftest.$ac_ext >&5
21434
ca81d7a0 21435 ac_header_compiler=no
c0d27fcc 21436fi
ca81d7a0
JD
21437
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21439{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21440echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21441
21442# Is the header present?
ca81d7a0
JD
21443{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21444echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21446/* confdefs.h. */
21447_ACEOF
21448cat confdefs.h >>conftest.$ac_ext
21449cat >>conftest.$ac_ext <<_ACEOF
21450/* end confdefs.h. */
503d2be0
AS
21451#include <$ac_header>
21452_ACEOF
ca81d7a0
JD
21453if { (ac_try="$ac_cpp conftest.$ac_ext"
21454case "(($ac_try" in
21455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21456 *) ac_try_echo=$ac_try;;
21457esac
21458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21460 ac_status=$?
6bae0ccf 21461 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21462 rm -f conftest.er1
21463 cat conftest.err >&5
c0d27fcc 21464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21465 (exit $ac_status); } >/dev/null && {
21466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21467 test ! -s conftest.err
21468 }; then
c0d27fcc 21469 ac_header_preproc=yes
503d2be0
AS
21470else
21471 echo "$as_me: failed program was:" >&5
19650fd6
AS
21472sed 's/^/| /' conftest.$ac_ext >&5
21473
c0d27fcc 21474 ac_header_preproc=no
a21616bd 21475fi
ca81d7a0 21476
503d2be0 21477rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21478{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21479echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21480
21481# So? What about this header?
edfaf76d
LK
21482case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21483 yes:no: )
c0d27fcc
MR
21484 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21485echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21486 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21487echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21488 ac_header_preproc=yes
19650fd6 21489 ;;
edfaf76d 21490 no:yes:* )
c0d27fcc
MR
21491 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21492echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21493 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21494echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21495 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21496echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21497 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21498echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21499 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21500echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21501 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21502echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21503
19650fd6 21504 ;;
c0d27fcc 21505esac
ca81d7a0
JD
21506{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21508if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21509 echo $ECHO_N "(cached) $ECHO_C" >&6
21510else
edfaf76d 21511 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21512fi
ca81d7a0
JD
21513ac_res=`eval echo '${'$as_ac_Header'}'`
21514 { echo "$as_me:$LINENO: result: $ac_res" >&5
21515echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21516
21517fi
503d2be0 21518if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21519 cat >>confdefs.h <<_ACEOF
503d2be0 21520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21521_ACEOF
503d2be0 21522
a21616bd 21523else
503d2be0
AS
21524
21525for ac_header in kerberosIV/des.h
a21616bd 21526do
503d2be0 21527as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21528if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21529 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21532 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21533fi
ca81d7a0
JD
21534ac_res=`eval echo '${'$as_ac_Header'}'`
21535 { echo "$as_me:$LINENO: result: $ac_res" >&5
21536echo "${ECHO_T}$ac_res" >&6; }
98418dba 21537else
c0d27fcc 21538 # Is the header compilable?
ca81d7a0
JD
21539{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21540echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21542/* confdefs.h. */
21543_ACEOF
21544cat confdefs.h >>conftest.$ac_ext
21545cat >>conftest.$ac_ext <<_ACEOF
21546/* end confdefs.h. */
c0d27fcc
MR
21547$ac_includes_default
21548#include <$ac_header>
21549_ACEOF
21550rm -f conftest.$ac_objext
ca81d7a0
JD
21551if { (ac_try="$ac_compile"
21552case "(($ac_try" in
21553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21554 *) ac_try_echo=$ac_try;;
21555esac
21556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21557 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21558 ac_status=$?
edfaf76d
LK
21559 grep -v '^ *+' conftest.er1 >conftest.err
21560 rm -f conftest.er1
21561 cat conftest.err >&5
c0d27fcc 21562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21563 (exit $ac_status); } && {
21564 test -z "$ac_c_werror_flag" ||
21565 test ! -s conftest.err
21566 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21567 ac_header_compiler=yes
21568else
21569 echo "$as_me: failed program was:" >&5
19650fd6
AS
21570sed 's/^/| /' conftest.$ac_ext >&5
21571
ca81d7a0 21572 ac_header_compiler=no
c0d27fcc 21573fi
ca81d7a0
JD
21574
21575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21576{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21577echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21578
21579# Is the header present?
ca81d7a0
JD
21580{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21581echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21582cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
503d2be0
AS
21588#include <$ac_header>
21589_ACEOF
ca81d7a0
JD
21590if { (ac_try="$ac_cpp conftest.$ac_ext"
21591case "(($ac_try" in
21592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21593 *) ac_try_echo=$ac_try;;
21594esac
21595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21596 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21597 ac_status=$?
6bae0ccf 21598 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21599 rm -f conftest.er1
21600 cat conftest.err >&5
c0d27fcc 21601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21602 (exit $ac_status); } >/dev/null && {
21603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21604 test ! -s conftest.err
21605 }; then
c0d27fcc 21606 ac_header_preproc=yes
503d2be0
AS
21607else
21608 echo "$as_me: failed program was:" >&5
19650fd6
AS
21609sed 's/^/| /' conftest.$ac_ext >&5
21610
c0d27fcc 21611 ac_header_preproc=no
a21616bd 21612fi
ca81d7a0 21613
503d2be0 21614rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21615{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21616echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21617
21618# So? What about this header?
edfaf76d
LK
21619case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21620 yes:no: )
c0d27fcc
MR
21621 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21622echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21623 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21624echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21625 ac_header_preproc=yes
19650fd6 21626 ;;
edfaf76d 21627 no:yes:* )
c0d27fcc
MR
21628 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21629echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21630 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21631echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21632 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21633echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21634 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21635echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21636 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21637echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21638 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21639echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21640
19650fd6 21641 ;;
c0d27fcc 21642esac
ca81d7a0
JD
21643{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21645if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21646 echo $ECHO_N "(cached) $ECHO_C" >&6
21647else
edfaf76d 21648 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21649fi
ca81d7a0
JD
21650ac_res=`eval echo '${'$as_ac_Header'}'`
21651 { echo "$as_me:$LINENO: result: $ac_res" >&5
21652echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21653
21654fi
503d2be0 21655if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21656 cat >>confdefs.h <<_ACEOF
503d2be0 21657#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21658_ACEOF
503d2be0 21659
a21616bd 21660else
503d2be0
AS
21661
21662for ac_header in kerberos/des.h
a21616bd 21663do
503d2be0 21664as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21665if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21666 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21669 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21670fi
ca81d7a0
JD
21671ac_res=`eval echo '${'$as_ac_Header'}'`
21672 { echo "$as_me:$LINENO: result: $ac_res" >&5
21673echo "${ECHO_T}$ac_res" >&6; }
98418dba 21674else
c0d27fcc 21675 # Is the header compilable?
ca81d7a0
JD
21676{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21677echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21678cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21679/* confdefs.h. */
21680_ACEOF
21681cat confdefs.h >>conftest.$ac_ext
21682cat >>conftest.$ac_ext <<_ACEOF
21683/* end confdefs.h. */
c0d27fcc
MR
21684$ac_includes_default
21685#include <$ac_header>
21686_ACEOF
21687rm -f conftest.$ac_objext
ca81d7a0
JD
21688if { (ac_try="$ac_compile"
21689case "(($ac_try" in
21690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21691 *) ac_try_echo=$ac_try;;
21692esac
21693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21694 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21695 ac_status=$?
edfaf76d
LK
21696 grep -v '^ *+' conftest.er1 >conftest.err
21697 rm -f conftest.er1
21698 cat conftest.err >&5
c0d27fcc 21699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21700 (exit $ac_status); } && {
21701 test -z "$ac_c_werror_flag" ||
21702 test ! -s conftest.err
21703 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21704 ac_header_compiler=yes
21705else
21706 echo "$as_me: failed program was:" >&5
19650fd6
AS
21707sed 's/^/| /' conftest.$ac_ext >&5
21708
ca81d7a0 21709 ac_header_compiler=no
c0d27fcc 21710fi
ca81d7a0
JD
21711
21712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21713{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21714echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21715
21716# Is the header present?
ca81d7a0
JD
21717{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21718echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21720/* confdefs.h. */
21721_ACEOF
21722cat confdefs.h >>conftest.$ac_ext
21723cat >>conftest.$ac_ext <<_ACEOF
21724/* end confdefs.h. */
503d2be0
AS
21725#include <$ac_header>
21726_ACEOF
ca81d7a0
JD
21727if { (ac_try="$ac_cpp conftest.$ac_ext"
21728case "(($ac_try" in
21729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21730 *) ac_try_echo=$ac_try;;
21731esac
21732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21734 ac_status=$?
6bae0ccf 21735 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21736 rm -f conftest.er1
21737 cat conftest.err >&5
c0d27fcc 21738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21739 (exit $ac_status); } >/dev/null && {
21740 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21741 test ! -s conftest.err
21742 }; then
c0d27fcc 21743 ac_header_preproc=yes
503d2be0
AS
21744else
21745 echo "$as_me: failed program was:" >&5
19650fd6
AS
21746sed 's/^/| /' conftest.$ac_ext >&5
21747
c0d27fcc 21748 ac_header_preproc=no
a21616bd 21749fi
ca81d7a0 21750
503d2be0 21751rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21752{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21753echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21754
21755# So? What about this header?
edfaf76d
LK
21756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21757 yes:no: )
c0d27fcc
MR
21758 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21759echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21761echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21762 ac_header_preproc=yes
19650fd6 21763 ;;
edfaf76d 21764 no:yes:* )
c0d27fcc
MR
21765 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21766echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21767 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21768echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21769 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21770echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21771 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21772echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21774echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21775 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21776echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21777
19650fd6 21778 ;;
c0d27fcc 21779esac
ca81d7a0
JD
21780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21783 echo $ECHO_N "(cached) $ECHO_C" >&6
21784else
edfaf76d 21785 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21786fi
ca81d7a0
JD
21787ac_res=`eval echo '${'$as_ac_Header'}'`
21788 { echo "$as_me:$LINENO: result: $ac_res" >&5
21789echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21790
21791fi
503d2be0 21792if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21793 cat >>confdefs.h <<_ACEOF
503d2be0 21794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21795_ACEOF
a21616bd
KR
21796
21797fi
c0d27fcc 21798
a21616bd
KR
21799done
21800
98418dba 21801fi
c0d27fcc 21802
925c2f3f
EZ
21803done
21804
98418dba 21805fi
c0d27fcc 21806
925c2f3f 21807done
98418dba 21808
c0d27fcc 21809
925c2f3f
EZ
21810for ac_header in krb.h
21811do
21812as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21814 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21816if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21817 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21818fi
ca81d7a0
JD
21819ac_res=`eval echo '${'$as_ac_Header'}'`
21820 { echo "$as_me:$LINENO: result: $ac_res" >&5
21821echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21822else
21823 # Is the header compilable?
ca81d7a0
JD
21824{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21825echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21826cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21827/* confdefs.h. */
21828_ACEOF
21829cat confdefs.h >>conftest.$ac_ext
21830cat >>conftest.$ac_ext <<_ACEOF
21831/* end confdefs.h. */
c0d27fcc
MR
21832$ac_includes_default
21833#include <$ac_header>
21834_ACEOF
21835rm -f conftest.$ac_objext
ca81d7a0
JD
21836if { (ac_try="$ac_compile"
21837case "(($ac_try" in
21838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21839 *) ac_try_echo=$ac_try;;
21840esac
21841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21842 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21843 ac_status=$?
edfaf76d
LK
21844 grep -v '^ *+' conftest.er1 >conftest.err
21845 rm -f conftest.er1
21846 cat conftest.err >&5
c0d27fcc 21847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21848 (exit $ac_status); } && {
21849 test -z "$ac_c_werror_flag" ||
21850 test ! -s conftest.err
21851 } && test -s conftest.$ac_objext; then
c0d27fcc 21852 ac_header_compiler=yes
925c2f3f 21853else
c0d27fcc 21854 echo "$as_me: failed program was:" >&5
19650fd6
AS
21855sed 's/^/| /' conftest.$ac_ext >&5
21856
ca81d7a0 21857 ac_header_compiler=no
c0d27fcc 21858fi
ca81d7a0
JD
21859
21860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21861{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21862echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21863
21864# Is the header present?
ca81d7a0
JD
21865{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21866echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21868/* confdefs.h. */
21869_ACEOF
21870cat confdefs.h >>conftest.$ac_ext
21871cat >>conftest.$ac_ext <<_ACEOF
21872/* end confdefs.h. */
503d2be0
AS
21873#include <$ac_header>
21874_ACEOF
ca81d7a0
JD
21875if { (ac_try="$ac_cpp conftest.$ac_ext"
21876case "(($ac_try" in
21877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21878 *) ac_try_echo=$ac_try;;
21879esac
21880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21882 ac_status=$?
6bae0ccf 21883 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21884 rm -f conftest.er1
21885 cat conftest.err >&5
c0d27fcc 21886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21887 (exit $ac_status); } >/dev/null && {
21888 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21889 test ! -s conftest.err
21890 }; then
c0d27fcc 21891 ac_header_preproc=yes
503d2be0
AS
21892else
21893 echo "$as_me: failed program was:" >&5
19650fd6
AS
21894sed 's/^/| /' conftest.$ac_ext >&5
21895
c0d27fcc 21896 ac_header_preproc=no
a21616bd 21897fi
ca81d7a0 21898
503d2be0 21899rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21900{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21901echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21902
21903# So? What about this header?
edfaf76d
LK
21904case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21905 yes:no: )
c0d27fcc
MR
21906 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21907echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21909echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21910 ac_header_preproc=yes
19650fd6 21911 ;;
edfaf76d 21912 no:yes:* )
c0d27fcc
MR
21913 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21914echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21915 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21916echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21917 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21918echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21919 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21920echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21921 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21922echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21923 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21924echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21925
19650fd6 21926 ;;
c0d27fcc 21927esac
ca81d7a0
JD
21928{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21930if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21931 echo $ECHO_N "(cached) $ECHO_C" >&6
21932else
edfaf76d 21933 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21934fi
ca81d7a0
JD
21935ac_res=`eval echo '${'$as_ac_Header'}'`
21936 { echo "$as_me:$LINENO: result: $ac_res" >&5
21937echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21938
21939fi
503d2be0 21940if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21941 cat >>confdefs.h <<_ACEOF
503d2be0 21942#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21943_ACEOF
503d2be0 21944
a21616bd 21945else
503d2be0
AS
21946
21947for ac_header in kerberosIV/krb.h
a21616bd 21948do
503d2be0 21949as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21950if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21951 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21952echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21953if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21954 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21955fi
ca81d7a0
JD
21956ac_res=`eval echo '${'$as_ac_Header'}'`
21957 { echo "$as_me:$LINENO: result: $ac_res" >&5
21958echo "${ECHO_T}$ac_res" >&6; }
98418dba 21959else
c0d27fcc 21960 # Is the header compilable?
ca81d7a0
JD
21961{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21962echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21963cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21964/* confdefs.h. */
21965_ACEOF
21966cat confdefs.h >>conftest.$ac_ext
21967cat >>conftest.$ac_ext <<_ACEOF
21968/* end confdefs.h. */
c0d27fcc
MR
21969$ac_includes_default
21970#include <$ac_header>
21971_ACEOF
21972rm -f conftest.$ac_objext
ca81d7a0
JD
21973if { (ac_try="$ac_compile"
21974case "(($ac_try" in
21975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21976 *) ac_try_echo=$ac_try;;
21977esac
21978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21979 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21980 ac_status=$?
edfaf76d
LK
21981 grep -v '^ *+' conftest.er1 >conftest.err
21982 rm -f conftest.er1
21983 cat conftest.err >&5
c0d27fcc 21984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21985 (exit $ac_status); } && {
21986 test -z "$ac_c_werror_flag" ||
21987 test ! -s conftest.err
21988 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21989 ac_header_compiler=yes
21990else
21991 echo "$as_me: failed program was:" >&5
19650fd6
AS
21992sed 's/^/| /' conftest.$ac_ext >&5
21993
ca81d7a0 21994 ac_header_compiler=no
c0d27fcc 21995fi
ca81d7a0
JD
21996
21997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21999echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22000
22001# Is the header present?
ca81d7a0
JD
22002{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22003echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22004cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22005/* confdefs.h. */
22006_ACEOF
22007cat confdefs.h >>conftest.$ac_ext
22008cat >>conftest.$ac_ext <<_ACEOF
22009/* end confdefs.h. */
503d2be0
AS
22010#include <$ac_header>
22011_ACEOF
ca81d7a0
JD
22012if { (ac_try="$ac_cpp conftest.$ac_ext"
22013case "(($ac_try" in
22014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22015 *) ac_try_echo=$ac_try;;
22016esac
22017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22018 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22019 ac_status=$?
6bae0ccf 22020 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22021 rm -f conftest.er1
22022 cat conftest.err >&5
c0d27fcc 22023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22024 (exit $ac_status); } >/dev/null && {
22025 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22026 test ! -s conftest.err
22027 }; then
c0d27fcc 22028 ac_header_preproc=yes
503d2be0
AS
22029else
22030 echo "$as_me: failed program was:" >&5
19650fd6
AS
22031sed 's/^/| /' conftest.$ac_ext >&5
22032
c0d27fcc 22033 ac_header_preproc=no
a21616bd 22034fi
ca81d7a0 22035
503d2be0 22036rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22038echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22039
22040# So? What about this header?
edfaf76d
LK
22041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22042 yes:no: )
c0d27fcc
MR
22043 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22044echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22045 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22046echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22047 ac_header_preproc=yes
19650fd6 22048 ;;
edfaf76d 22049 no:yes:* )
c0d27fcc
MR
22050 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22051echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22052 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22053echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22054 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22055echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22056 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22057echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22058 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22059echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22060 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22061echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22062
19650fd6 22063 ;;
c0d27fcc 22064esac
ca81d7a0
JD
22065{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22067if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22068 echo $ECHO_N "(cached) $ECHO_C" >&6
22069else
edfaf76d 22070 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22071fi
ca81d7a0
JD
22072ac_res=`eval echo '${'$as_ac_Header'}'`
22073 { echo "$as_me:$LINENO: result: $ac_res" >&5
22074echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22075
22076fi
503d2be0 22077if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22078 cat >>confdefs.h <<_ACEOF
503d2be0 22079#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22080_ACEOF
503d2be0 22081
a21616bd 22082else
503d2be0
AS
22083
22084for ac_header in kerberos/krb.h
a21616bd 22085do
503d2be0 22086as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22087if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22088 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22090if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22091 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22092fi
ca81d7a0
JD
22093ac_res=`eval echo '${'$as_ac_Header'}'`
22094 { echo "$as_me:$LINENO: result: $ac_res" >&5
22095echo "${ECHO_T}$ac_res" >&6; }
98418dba 22096else
c0d27fcc 22097 # Is the header compilable?
ca81d7a0
JD
22098{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22099echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22100cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22101/* confdefs.h. */
22102_ACEOF
22103cat confdefs.h >>conftest.$ac_ext
22104cat >>conftest.$ac_ext <<_ACEOF
22105/* end confdefs.h. */
c0d27fcc
MR
22106$ac_includes_default
22107#include <$ac_header>
22108_ACEOF
22109rm -f conftest.$ac_objext
ca81d7a0
JD
22110if { (ac_try="$ac_compile"
22111case "(($ac_try" in
22112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22113 *) ac_try_echo=$ac_try;;
22114esac
22115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22116 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22117 ac_status=$?
edfaf76d
LK
22118 grep -v '^ *+' conftest.er1 >conftest.err
22119 rm -f conftest.er1
22120 cat conftest.err >&5
c0d27fcc 22121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22122 (exit $ac_status); } && {
22123 test -z "$ac_c_werror_flag" ||
22124 test ! -s conftest.err
22125 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22126 ac_header_compiler=yes
22127else
22128 echo "$as_me: failed program was:" >&5
19650fd6
AS
22129sed 's/^/| /' conftest.$ac_ext >&5
22130
ca81d7a0 22131 ac_header_compiler=no
c0d27fcc 22132fi
ca81d7a0
JD
22133
22134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22135{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22136echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22137
22138# Is the header present?
ca81d7a0
JD
22139{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22140echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22141cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22142/* confdefs.h. */
22143_ACEOF
22144cat confdefs.h >>conftest.$ac_ext
22145cat >>conftest.$ac_ext <<_ACEOF
22146/* end confdefs.h. */
503d2be0
AS
22147#include <$ac_header>
22148_ACEOF
ca81d7a0
JD
22149if { (ac_try="$ac_cpp conftest.$ac_ext"
22150case "(($ac_try" in
22151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22152 *) ac_try_echo=$ac_try;;
22153esac
22154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22155 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22156 ac_status=$?
6bae0ccf 22157 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22158 rm -f conftest.er1
22159 cat conftest.err >&5
c0d27fcc 22160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22161 (exit $ac_status); } >/dev/null && {
22162 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22163 test ! -s conftest.err
22164 }; then
c0d27fcc 22165 ac_header_preproc=yes
503d2be0
AS
22166else
22167 echo "$as_me: failed program was:" >&5
19650fd6
AS
22168sed 's/^/| /' conftest.$ac_ext >&5
22169
c0d27fcc 22170 ac_header_preproc=no
a21616bd 22171fi
ca81d7a0 22172
503d2be0 22173rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22174{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22175echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22176
22177# So? What about this header?
edfaf76d
LK
22178case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22179 yes:no: )
35996d22
AS
22180 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22181echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22182 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22183echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22184 ac_header_preproc=yes
19650fd6 22185 ;;
edfaf76d 22186 no:yes:* )
c0d27fcc
MR
22187 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22188echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22189 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22190echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22191 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22192echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22193 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22194echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22195 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22196echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22197 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22198echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22199
19650fd6 22200 ;;
c0d27fcc 22201esac
ca81d7a0
JD
22202{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22203echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22204if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22205 echo $ECHO_N "(cached) $ECHO_C" >&6
22206else
edfaf76d 22207 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22208fi
ca81d7a0
JD
22209ac_res=`eval echo '${'$as_ac_Header'}'`
22210 { echo "$as_me:$LINENO: result: $ac_res" >&5
22211echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22212
22213fi
503d2be0 22214if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22215 cat >>confdefs.h <<_ACEOF
503d2be0 22216#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22217_ACEOF
503d2be0 22218
a21616bd 22219fi
c0d27fcc 22220
a21616bd
KR
22221done
22222
22223fi
c0d27fcc 22224
a21616bd
KR
22225done
22226
22227fi
c0d27fcc 22228
a21616bd
KR
22229done
22230
22231 fi
503d2be0
AS
22232
22233for ac_header in com_err.h
a21616bd 22234do
503d2be0 22235as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22236if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22237 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22239if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22240 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22241fi
ca81d7a0
JD
22242ac_res=`eval echo '${'$as_ac_Header'}'`
22243 { echo "$as_me:$LINENO: result: $ac_res" >&5
22244echo "${ECHO_T}$ac_res" >&6; }
98418dba 22245else
c0d27fcc 22246 # Is the header compilable?
ca81d7a0
JD
22247{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22250/* confdefs.h. */
22251_ACEOF
22252cat confdefs.h >>conftest.$ac_ext
22253cat >>conftest.$ac_ext <<_ACEOF
22254/* end confdefs.h. */
c0d27fcc
MR
22255$ac_includes_default
22256#include <$ac_header>
22257_ACEOF
22258rm -f conftest.$ac_objext
ca81d7a0
JD
22259if { (ac_try="$ac_compile"
22260case "(($ac_try" in
22261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22262 *) ac_try_echo=$ac_try;;
22263esac
22264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22265 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22266 ac_status=$?
22267 grep -v '^ *+' conftest.er1 >conftest.err
22268 rm -f conftest.er1
22269 cat conftest.err >&5
22270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22271 (exit $ac_status); } && {
22272 test -z "$ac_c_werror_flag" ||
22273 test ! -s conftest.err
22274 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22275 ac_header_compiler=yes
22276else
22277 echo "$as_me: failed program was:" >&5
19650fd6
AS
22278sed 's/^/| /' conftest.$ac_ext >&5
22279
ca81d7a0 22280 ac_header_compiler=no
c0d27fcc 22281fi
ca81d7a0
JD
22282
22283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22285echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22286
22287# Is the header present?
ca81d7a0
JD
22288{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22289echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22291/* confdefs.h. */
22292_ACEOF
22293cat confdefs.h >>conftest.$ac_ext
22294cat >>conftest.$ac_ext <<_ACEOF
22295/* end confdefs.h. */
503d2be0
AS
22296#include <$ac_header>
22297_ACEOF
ca81d7a0
JD
22298if { (ac_try="$ac_cpp conftest.$ac_ext"
22299case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
22303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22305 ac_status=$?
6bae0ccf 22306 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22307 rm -f conftest.er1
22308 cat conftest.err >&5
c0d27fcc 22309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22310 (exit $ac_status); } >/dev/null && {
22311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22312 test ! -s conftest.err
22313 }; then
c0d27fcc 22314 ac_header_preproc=yes
503d2be0
AS
22315else
22316 echo "$as_me: failed program was:" >&5
19650fd6
AS
22317sed 's/^/| /' conftest.$ac_ext >&5
22318
c0d27fcc 22319 ac_header_preproc=no
a21616bd 22320fi
ca81d7a0 22321
503d2be0 22322rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22324echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22325
22326# So? What about this header?
edfaf76d
LK
22327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22328 yes:no: )
c0d27fcc
MR
22329 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22330echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22332echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22333 ac_header_preproc=yes
19650fd6 22334 ;;
edfaf76d 22335 no:yes:* )
c0d27fcc
MR
22336 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22337echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22338 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22339echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22340 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22341echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22342 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22343echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22345echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22346 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22347echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22348
19650fd6 22349 ;;
c0d27fcc 22350esac
ca81d7a0
JD
22351{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22354 echo $ECHO_N "(cached) $ECHO_C" >&6
22355else
edfaf76d 22356 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22357fi
ca81d7a0
JD
22358ac_res=`eval echo '${'$as_ac_Header'}'`
22359 { echo "$as_me:$LINENO: result: $ac_res" >&5
22360echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22361
22362fi
503d2be0 22363if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22364 cat >>confdefs.h <<_ACEOF
503d2be0 22365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22366_ACEOF
503d2be0 22367
a21616bd 22368fi
c0d27fcc 22369
a21616bd
KR
22370done
22371
22372fi
22373
ba4481b5
DL
22374# Solaris requires -lintl if you want strerror (which calls dgettext)
22375# to return localized messages.
503d2be0 22376
ca81d7a0
JD
22377{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22378echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22379if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22380 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22381else
503d2be0 22382 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22383LIBS="-lintl $LIBS"
503d2be0 22384cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22385/* confdefs.h. */
22386_ACEOF
22387cat confdefs.h >>conftest.$ac_ext
22388cat >>conftest.$ac_ext <<_ACEOF
22389/* end confdefs.h. */
503d2be0 22390
ca81d7a0
JD
22391/* Override any GCC internal prototype to avoid an error.
22392 Use char because int might match the return type of a GCC
22393 builtin and then its argument prototype would still apply. */
503d2be0
AS
22394#ifdef __cplusplus
22395extern "C"
22396#endif
503d2be0
AS
22397char dgettext ();
22398int
22399main ()
22400{
ca81d7a0 22401return dgettext ();
503d2be0
AS
22402 ;
22403 return 0;
22404}
22405_ACEOF
22406rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22407if { (ac_try="$ac_link"
22408case "(($ac_try" in
22409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22410 *) ac_try_echo=$ac_try;;
22411esac
22412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22413 (eval "$ac_link") 2>conftest.er1
503d2be0 22414 ac_status=$?
edfaf76d
LK
22415 grep -v '^ *+' conftest.er1 >conftest.err
22416 rm -f conftest.er1
22417 cat conftest.err >&5
c0d27fcc 22418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22419 (exit $ac_status); } && {
22420 test -z "$ac_c_werror_flag" ||
22421 test ! -s conftest.err
22422 } && test -s conftest$ac_exeext &&
22423 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22424 ac_cv_lib_intl_dgettext=yes
22425else
22426 echo "$as_me: failed program was:" >&5
19650fd6
AS
22427sed 's/^/| /' conftest.$ac_ext >&5
22428
ca81d7a0 22429 ac_cv_lib_intl_dgettext=no
503d2be0 22430fi
ca81d7a0 22431
f053c89f 22432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22433 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22434LIBS=$ac_check_lib_save_LIBS
22435fi
ca81d7a0
JD
22436{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22437echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22438if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22439 cat >>confdefs.h <<_ACEOF
503d2be0 22440#define HAVE_LIBINTL 1
c0d27fcc 22441_ACEOF
ba4481b5
DL
22442
22443 LIBS="-lintl $LIBS"
22444
ba4481b5
DL
22445fi
22446
c0d27fcc 22447
ca81d7a0
JD
22448{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22449echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22450if test "${emacs_cv_localtime_cache+set}" = set; then
22451 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22452else
22453 if test x$ac_cv_func_tzset = xyes; then
22454if test "$cross_compiling" = yes; then
22455 # If we have tzset, assume the worst when cross-compiling.
22456emacs_cv_localtime_cache=yes
22457else
503d2be0 22458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22459/* confdefs.h. */
22460_ACEOF
22461cat confdefs.h >>conftest.$ac_ext
22462cat >>conftest.$ac_ext <<_ACEOF
22463/* end confdefs.h. */
ba4481b5 22464#include <time.h>
ba4481b5
DL
22465extern char **environ;
22466unset_TZ ()
22467{
22468 char **from, **to;
22469 for (to = from = environ; (*to = *from); from++)
22470 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22471 to++;
22472}
22473char TZ_GMT0[] = "TZ=GMT0";
22474char TZ_PST8[] = "TZ=PST8";
22475main()
22476{
22477 time_t now = time ((time_t *) 0);
22478 int hour_GMT0, hour_unset;
22479 if (putenv (TZ_GMT0) != 0)
22480 exit (1);
22481 hour_GMT0 = localtime (&now)->tm_hour;
22482 unset_TZ ();
22483 hour_unset = localtime (&now)->tm_hour;
22484 if (putenv (TZ_PST8) != 0)
22485 exit (1);
22486 if (localtime (&now)->tm_hour == hour_GMT0)
22487 exit (1);
22488 unset_TZ ();
22489 if (localtime (&now)->tm_hour != hour_unset)
22490 exit (1);
22491 exit (0);
22492}
503d2be0
AS
22493_ACEOF
22494rm -f conftest$ac_exeext
ca81d7a0
JD
22495if { (ac_try="$ac_link"
22496case "(($ac_try" in
22497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22498 *) ac_try_echo=$ac_try;;
22499esac
22500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22501 (eval "$ac_link") 2>&5
503d2be0 22502 ac_status=$?
c0d27fcc 22503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22505 { (case "(($ac_try" in
22506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22507 *) ac_try_echo=$ac_try;;
22508esac
22509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22510 (eval "$ac_try") 2>&5
503d2be0 22511 ac_status=$?
c0d27fcc 22512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22513 (exit $ac_status); }; }; then
ba4481b5
DL
22514 emacs_cv_localtime_cache=no
22515else
503d2be0
AS
22516 echo "$as_me: program exited with status $ac_status" >&5
22517echo "$as_me: failed program was:" >&5
19650fd6
AS
22518sed 's/^/| /' conftest.$ac_ext >&5
22519
c0d27fcc 22520( exit $ac_status )
503d2be0 22521emacs_cv_localtime_cache=yes
ba4481b5 22522fi
ca81d7a0 22523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22524fi
ca81d7a0
JD
22525
22526
ba4481b5
DL
22527else
22528 # If we lack tzset, report that localtime does not cache TZ,
22529 # since we can't invalidate the cache if we don't have tzset.
22530 emacs_cv_localtime_cache=no
22531fi
22532fi
ca81d7a0
JD
22533{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22534echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22535if test $emacs_cv_localtime_cache = yes; then
b936fae4 22536
c0d27fcc 22537cat >>confdefs.h <<\_ACEOF
ba4481b5 22538#define LOCALTIME_CACHE 1
c0d27fcc 22539_ACEOF
ba4481b5
DL
22540
22541fi
22542
22543if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22544
22545for ac_func in gettimeofday
48d4b120 22546do
503d2be0 22547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22548{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22550if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22551 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22552else
503d2be0 22553 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
edfaf76d
LK
22559/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22560 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22561#define $ac_func innocuous_$ac_func
22562
48d4b120 22563/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22564 which can conflict with char $ac_func (); below.
22565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22566 <limits.h> exists even on freestanding compilers. */
edfaf76d 22567
19650fd6
AS
22568#ifdef __STDC__
22569# include <limits.h>
22570#else
22571# include <assert.h>
22572#endif
edfaf76d
LK
22573
22574#undef $ac_func
22575
ca81d7a0
JD
22576/* Override any GCC internal prototype to avoid an error.
22577 Use char because int might match the return type of a GCC
22578 builtin and then its argument prototype would still apply. */
503d2be0
AS
22579#ifdef __cplusplus
22580extern "C"
22581#endif
503d2be0 22582char $ac_func ();
48d4b120
DL
22583/* The GNU C library defines this for functions which it implements
22584 to always fail with ENOSYS. Some functions are actually named
22585 something starting with __ and the normal name is an alias. */
ca81d7a0 22586#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22587choke me
cd958eb3
MB
22588#endif
22589
19650fd6
AS
22590int
22591main ()
22592{
ca81d7a0 22593return $ac_func ();
503d2be0
AS
22594 ;
22595 return 0;
22596}
22597_ACEOF
22598rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22599if { (ac_try="$ac_link"
22600case "(($ac_try" in
22601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22602 *) ac_try_echo=$ac_try;;
22603esac
22604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22605 (eval "$ac_link") 2>conftest.er1
503d2be0 22606 ac_status=$?
edfaf76d
LK
22607 grep -v '^ *+' conftest.er1 >conftest.err
22608 rm -f conftest.er1
22609 cat conftest.err >&5
c0d27fcc 22610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22611 (exit $ac_status); } && {
22612 test -z "$ac_c_werror_flag" ||
22613 test ! -s conftest.err
22614 } && test -s conftest$ac_exeext &&
22615 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22616 eval "$as_ac_var=yes"
22617else
22618 echo "$as_me: failed program was:" >&5
19650fd6
AS
22619sed 's/^/| /' conftest.$ac_ext >&5
22620
ca81d7a0 22621 eval "$as_ac_var=no"
503d2be0 22622fi
ca81d7a0 22623
f053c89f 22624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22625 conftest$ac_exeext conftest.$ac_ext
503d2be0 22626fi
ca81d7a0
JD
22627ac_res=`eval echo '${'$as_ac_var'}'`
22628 { echo "$as_me:$LINENO: result: $ac_res" >&5
22629echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22630if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22631 cat >>confdefs.h <<_ACEOF
503d2be0 22632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22633_ACEOF
48d4b120 22634
48d4b120
DL
22635fi
22636done
22637
b936fae4 22638 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22639 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22640echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22641if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22642 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22643else
503d2be0 22644 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22645/* confdefs.h. */
22646_ACEOF
22647cat confdefs.h >>conftest.$ac_ext
22648cat >>conftest.$ac_ext <<_ACEOF
22649/* end confdefs.h. */
ba4481b5 22650
a3f08d9e
DL
22651#ifdef TIME_WITH_SYS_TIME
22652#include <sys/time.h>
22653#include <time.h>
22654#else
22655#ifdef HAVE_SYS_TIME_H
22656#include <sys/time.h>
22657#else
22658#include <time.h>
22659#endif
22660#endif
503d2be0
AS
22661int
22662main ()
22663{
a3f08d9e 22664struct timeval time;
b936fae4 22665 gettimeofday (&time, 0);
503d2be0
AS
22666 ;
22667 return 0;
22668}
22669_ACEOF
22670rm -f conftest.$ac_objext
f053c89f
CY
22671if { (ac_try="$ac_compile"
22672case "(($ac_try" in
ca81d7a0
JD
22673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22674 *) ac_try_echo=$ac_try;;
22675esac
22676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22677 (eval "$ac_compile") 2>conftest.er1
503d2be0 22678 ac_status=$?
edfaf76d
LK
22679 grep -v '^ *+' conftest.er1 >conftest.err
22680 rm -f conftest.er1
22681 cat conftest.err >&5
c0d27fcc 22682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22683 (exit $ac_status); } && {
22684 test -z "$ac_c_werror_flag" ||
22685 test ! -s conftest.err
22686 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22687 emacs_cv_gettimeofday_two_arguments=yes
22688else
503d2be0 22689 echo "$as_me: failed program was:" >&5
19650fd6
AS
22690sed 's/^/| /' conftest.$ac_ext >&5
22691
ca81d7a0 22692 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22693fi
ca81d7a0
JD
22694
22695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22696fi
ca81d7a0
JD
22697{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22698echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22699 if test $emacs_cv_gettimeofday_two_arguments = no; then
22700
c0d27fcc 22701cat >>confdefs.h <<\_ACEOF
ba4481b5 22702#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22703_ACEOF
ba4481b5 22704
b936fae4 22705 fi
ba4481b5
DL
22706 fi
22707fi
22708
22709ok_so_far=yes
ca81d7a0
JD
22710{ echo "$as_me:$LINENO: checking for socket" >&5
22711echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22712if test "${ac_cv_func_socket+set}" = set; then
22713 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22714else
503d2be0 22715 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22716/* confdefs.h. */
22717_ACEOF
22718cat confdefs.h >>conftest.$ac_ext
22719cat >>conftest.$ac_ext <<_ACEOF
22720/* end confdefs.h. */
edfaf76d
LK
22721/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22722 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22723#define socket innocuous_socket
22724
ba4481b5 22725/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22726 which can conflict with char socket (); below.
22727 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22728 <limits.h> exists even on freestanding compilers. */
edfaf76d 22729
19650fd6
AS
22730#ifdef __STDC__
22731# include <limits.h>
22732#else
22733# include <assert.h>
22734#endif
edfaf76d
LK
22735
22736#undef socket
22737
ca81d7a0
JD
22738/* Override any GCC internal prototype to avoid an error.
22739 Use char because int might match the return type of a GCC
22740 builtin and then its argument prototype would still apply. */
503d2be0
AS
22741#ifdef __cplusplus
22742extern "C"
22743#endif
503d2be0 22744char socket ();
ba4481b5
DL
22745/* The GNU C library defines this for functions which it implements
22746 to always fail with ENOSYS. Some functions are actually named
22747 something starting with __ and the normal name is an alias. */
ca81d7a0 22748#if defined __stub_socket || defined __stub___socket
ba4481b5 22749choke me
cd958eb3
MB
22750#endif
22751
19650fd6
AS
22752int
22753main ()
22754{
ca81d7a0 22755return socket ();
503d2be0
AS
22756 ;
22757 return 0;
22758}
22759_ACEOF
22760rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22761if { (ac_try="$ac_link"
22762case "(($ac_try" in
22763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22764 *) ac_try_echo=$ac_try;;
22765esac
22766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22767 (eval "$ac_link") 2>conftest.er1
503d2be0 22768 ac_status=$?
edfaf76d
LK
22769 grep -v '^ *+' conftest.er1 >conftest.err
22770 rm -f conftest.er1
22771 cat conftest.err >&5
c0d27fcc 22772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22773 (exit $ac_status); } && {
22774 test -z "$ac_c_werror_flag" ||
22775 test ! -s conftest.err
22776 } && test -s conftest$ac_exeext &&
22777 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22778 ac_cv_func_socket=yes
22779else
22780 echo "$as_me: failed program was:" >&5
19650fd6
AS
22781sed 's/^/| /' conftest.$ac_ext >&5
22782
ca81d7a0 22783 ac_cv_func_socket=no
503d2be0 22784fi
ca81d7a0 22785
f053c89f 22786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22787 conftest$ac_exeext conftest.$ac_ext
503d2be0 22788fi
ca81d7a0
JD
22789{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22790echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22791if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22792 :
22793else
503d2be0 22794 ok_so_far=no
ba4481b5
DL
22795fi
22796
22797if test $ok_so_far = yes; then
c0d27fcc 22798 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22799 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22800echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22801if test "${ac_cv_header_netinet_in_h+set}" = set; then
22802 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22803fi
ca81d7a0
JD
22804{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22805echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22806else
c0d27fcc 22807 # Is the header compilable?
ca81d7a0
JD
22808{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22809echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22810cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22811/* confdefs.h. */
22812_ACEOF
22813cat confdefs.h >>conftest.$ac_ext
22814cat >>conftest.$ac_ext <<_ACEOF
22815/* end confdefs.h. */
c0d27fcc
MR
22816$ac_includes_default
22817#include <netinet/in.h>
22818_ACEOF
22819rm -f conftest.$ac_objext
ca81d7a0
JD
22820if { (ac_try="$ac_compile"
22821case "(($ac_try" in
22822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22823 *) ac_try_echo=$ac_try;;
22824esac
22825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22826 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22827 ac_status=$?
edfaf76d
LK
22828 grep -v '^ *+' conftest.er1 >conftest.err
22829 rm -f conftest.er1
22830 cat conftest.err >&5
c0d27fcc 22831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22832 (exit $ac_status); } && {
22833 test -z "$ac_c_werror_flag" ||
22834 test ! -s conftest.err
22835 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22836 ac_header_compiler=yes
22837else
22838 echo "$as_me: failed program was:" >&5
19650fd6
AS
22839sed 's/^/| /' conftest.$ac_ext >&5
22840
ca81d7a0 22841 ac_header_compiler=no
c0d27fcc 22842fi
ca81d7a0
JD
22843
22844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22845{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22846echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22847
22848# Is the header present?
ca81d7a0
JD
22849{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22850echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22851cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22852/* confdefs.h. */
22853_ACEOF
22854cat confdefs.h >>conftest.$ac_ext
22855cat >>conftest.$ac_ext <<_ACEOF
22856/* end confdefs.h. */
ba4481b5 22857#include <netinet/in.h>
503d2be0 22858_ACEOF
ca81d7a0
JD
22859if { (ac_try="$ac_cpp conftest.$ac_ext"
22860case "(($ac_try" in
22861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22862 *) ac_try_echo=$ac_try;;
22863esac
22864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22865 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22866 ac_status=$?
6bae0ccf 22867 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22868 rm -f conftest.er1
22869 cat conftest.err >&5
c0d27fcc 22870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22871 (exit $ac_status); } >/dev/null && {
22872 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22873 test ! -s conftest.err
22874 }; then
c0d27fcc 22875 ac_header_preproc=yes
ba4481b5 22876else
503d2be0 22877 echo "$as_me: failed program was:" >&5
19650fd6
AS
22878sed 's/^/| /' conftest.$ac_ext >&5
22879
c0d27fcc 22880 ac_header_preproc=no
ba4481b5 22881fi
ca81d7a0 22882
503d2be0 22883rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22884{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22885echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22886
22887# So? What about this header?
edfaf76d
LK
22888case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22889 yes:no: )
c0d27fcc
MR
22890 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22891echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22892 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22893echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22894 ac_header_preproc=yes
19650fd6 22895 ;;
edfaf76d 22896 no:yes:* )
c0d27fcc
MR
22897 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22898echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22899 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22900echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22901 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22902echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22903 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22904echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22905 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22906echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22907 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22908echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22909
19650fd6 22910 ;;
c0d27fcc 22911esac
ca81d7a0
JD
22912{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22913echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22914if test "${ac_cv_header_netinet_in_h+set}" = set; then
22915 echo $ECHO_N "(cached) $ECHO_C" >&6
22916else
22917 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22918fi
ca81d7a0
JD
22919{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22920echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22921
22922fi
503d2be0 22923if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22924 :
22925else
503d2be0 22926 ok_so_far=no
ba4481b5
DL
22927fi
22928
c0d27fcc 22929
ba4481b5
DL
22930fi
22931if test $ok_so_far = yes; then
c0d27fcc 22932 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22933 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22934echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22935if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22936 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22937fi
ca81d7a0
JD
22938{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22939echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22940else
c0d27fcc 22941 # Is the header compilable?
ca81d7a0
JD
22942{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22943echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22945/* confdefs.h. */
22946_ACEOF
22947cat confdefs.h >>conftest.$ac_ext
22948cat >>conftest.$ac_ext <<_ACEOF
22949/* end confdefs.h. */
c0d27fcc
MR
22950$ac_includes_default
22951#include <arpa/inet.h>
22952_ACEOF
22953rm -f conftest.$ac_objext
ca81d7a0
JD
22954if { (ac_try="$ac_compile"
22955case "(($ac_try" in
22956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22957 *) ac_try_echo=$ac_try;;
22958esac
22959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22960 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22961 ac_status=$?
edfaf76d
LK
22962 grep -v '^ *+' conftest.er1 >conftest.err
22963 rm -f conftest.er1
22964 cat conftest.err >&5
c0d27fcc 22965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22966 (exit $ac_status); } && {
22967 test -z "$ac_c_werror_flag" ||
22968 test ! -s conftest.err
22969 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22970 ac_header_compiler=yes
22971else
22972 echo "$as_me: failed program was:" >&5
19650fd6
AS
22973sed 's/^/| /' conftest.$ac_ext >&5
22974
ca81d7a0 22975 ac_header_compiler=no
c0d27fcc 22976fi
ca81d7a0
JD
22977
22978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22979{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22980echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22981
22982# Is the header present?
ca81d7a0
JD
22983{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22984echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22985cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22986/* confdefs.h. */
22987_ACEOF
22988cat confdefs.h >>conftest.$ac_ext
22989cat >>conftest.$ac_ext <<_ACEOF
22990/* end confdefs.h. */
ba4481b5 22991#include <arpa/inet.h>
503d2be0 22992_ACEOF
ca81d7a0
JD
22993if { (ac_try="$ac_cpp conftest.$ac_ext"
22994case "(($ac_try" in
22995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22996 *) ac_try_echo=$ac_try;;
22997esac
22998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22999 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23000 ac_status=$?
6bae0ccf 23001 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23002 rm -f conftest.er1
23003 cat conftest.err >&5
c0d27fcc 23004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23005 (exit $ac_status); } >/dev/null && {
23006 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23007 test ! -s conftest.err
23008 }; then
c0d27fcc 23009 ac_header_preproc=yes
ba4481b5 23010else
503d2be0 23011 echo "$as_me: failed program was:" >&5
19650fd6
AS
23012sed 's/^/| /' conftest.$ac_ext >&5
23013
c0d27fcc 23014 ac_header_preproc=no
ba4481b5 23015fi
ca81d7a0 23016
503d2be0 23017rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23018{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23019echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23020
23021# So? What about this header?
edfaf76d
LK
23022case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23023 yes:no: )
c0d27fcc
MR
23024 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23025echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23026 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23027echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
23028 ac_header_preproc=yes
19650fd6 23029 ;;
edfaf76d 23030 no:yes:* )
c0d27fcc
MR
23031 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23032echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
23033 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23034echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23035 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23036echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23037 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23038echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23039 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23040echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23041 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23042echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23043
19650fd6 23044 ;;
c0d27fcc 23045esac
ca81d7a0
JD
23046{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23047echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23048if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23049 echo $ECHO_N "(cached) $ECHO_C" >&6
23050else
23051 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23052fi
ca81d7a0
JD
23053{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23054echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23055
23056fi
503d2be0 23057if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23058 :
23059else
503d2be0 23060 ok_so_far=no
ba4481b5
DL
23061fi
23062
c0d27fcc 23063
ba4481b5
DL
23064fi
23065if test $ok_so_far = yes; then
b936fae4 23066
c0d27fcc 23067cat >>confdefs.h <<\_ACEOF
ba4481b5 23068#define HAVE_INET_SOCKETS 1
c0d27fcc 23069_ACEOF
ba4481b5
DL
23070
23071fi
23072
2d2b6695 23073
7862d3a8 23074for ac_header in sys/ioctl.h
2d2b6695
KS
23075do
23076as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23077if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23078 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23079echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23080if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23081 echo $ECHO_N "(cached) $ECHO_C" >&6
23082fi
ca81d7a0
JD
23083ac_res=`eval echo '${'$as_ac_Header'}'`
23084 { echo "$as_me:$LINENO: result: $ac_res" >&5
23085echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23086else
23087 # Is the header compilable?
ca81d7a0
JD
23088{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23089echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23090cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23091/* confdefs.h. */
23092_ACEOF
23093cat confdefs.h >>conftest.$ac_ext
23094cat >>conftest.$ac_ext <<_ACEOF
23095/* end confdefs.h. */
23096$ac_includes_default
23097#include <$ac_header>
23098_ACEOF
23099rm -f conftest.$ac_objext
ca81d7a0
JD
23100if { (ac_try="$ac_compile"
23101case "(($ac_try" in
23102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23103 *) ac_try_echo=$ac_try;;
23104esac
23105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23106 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23107 ac_status=$?
edfaf76d
LK
23108 grep -v '^ *+' conftest.er1 >conftest.err
23109 rm -f conftest.er1
23110 cat conftest.err >&5
2d2b6695 23111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23112 (exit $ac_status); } && {
23113 test -z "$ac_c_werror_flag" ||
23114 test ! -s conftest.err
23115 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23116 ac_header_compiler=yes
23117else
23118 echo "$as_me: failed program was:" >&5
23119sed 's/^/| /' conftest.$ac_ext >&5
23120
ca81d7a0 23121 ac_header_compiler=no
2d2b6695 23122fi
ca81d7a0
JD
23123
23124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23125{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23126echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23127
23128# Is the header present?
ca81d7a0
JD
23129{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23130echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23131cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23132/* confdefs.h. */
23133_ACEOF
23134cat confdefs.h >>conftest.$ac_ext
23135cat >>conftest.$ac_ext <<_ACEOF
23136/* end confdefs.h. */
23137#include <$ac_header>
23138_ACEOF
ca81d7a0
JD
23139if { (ac_try="$ac_cpp conftest.$ac_ext"
23140case "(($ac_try" in
23141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23142 *) ac_try_echo=$ac_try;;
23143esac
23144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23145 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23146 ac_status=$?
23147 grep -v '^ *+' conftest.er1 >conftest.err
23148 rm -f conftest.er1
23149 cat conftest.err >&5
23150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23151 (exit $ac_status); } >/dev/null && {
23152 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23153 test ! -s conftest.err
23154 }; then
2d2b6695
KS
23155 ac_header_preproc=yes
23156else
23157 echo "$as_me: failed program was:" >&5
23158sed 's/^/| /' conftest.$ac_ext >&5
23159
23160 ac_header_preproc=no
23161fi
ca81d7a0 23162
2d2b6695 23163rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23164{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23165echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23166
23167# So? What about this header?
edfaf76d
LK
23168case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23169 yes:no: )
2d2b6695
KS
23170 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23171echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23172 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23173echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23174 ac_header_preproc=yes
2d2b6695 23175 ;;
edfaf76d 23176 no:yes:* )
2d2b6695
KS
23177 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23178echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23179 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23180echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23181 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23182echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23183 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23184echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23185 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23186echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23187 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23188echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23189
2d2b6695
KS
23190 ;;
23191esac
ca81d7a0
JD
23192{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23193echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23194if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23195 echo $ECHO_N "(cached) $ECHO_C" >&6
23196else
edfaf76d 23197 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23198fi
ca81d7a0
JD
23199ac_res=`eval echo '${'$as_ac_Header'}'`
23200 { echo "$as_me:$LINENO: result: $ac_res" >&5
23201echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23202
23203fi
23204if test `eval echo '${'$as_ac_Header'}'` = yes; then
23205 cat >>confdefs.h <<_ACEOF
23206#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23207_ACEOF
23208
23209fi
23210
23211done
23212
23213
ba4481b5 23214if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23215
c0d27fcc 23216cat >>confdefs.h <<\_ACEOF
ba4481b5 23217#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23218_ACEOF
ba4481b5
DL
23219
23220fi
23221
ca81d7a0
JD
23222{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23223echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23224if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23225 { echo "$as_me:$LINENO: result: yes" >&5
23226echo "${ECHO_T}yes" >&6; }
b936fae4 23227
c0d27fcc 23228cat >>confdefs.h <<\_ACEOF
3d9fec71 23229#define HAVE_DEV_PTMX 1
c0d27fcc 23230_ACEOF
3d9fec71
DL
23231
23232else
ca81d7a0
JD
23233 { echo "$as_me:$LINENO: result: no" >&5
23234echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23235fi
23236
ca81d7a0
JD
23237{ echo "$as_me:$LINENO: checking for pid_t" >&5
23238echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23239if test "${ac_cv_type_pid_t+set}" = set; then
23240 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23241else
503d2be0 23242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23243/* confdefs.h. */
23244_ACEOF
23245cat confdefs.h >>conftest.$ac_ext
23246cat >>conftest.$ac_ext <<_ACEOF
23247/* end confdefs.h. */
503d2be0 23248$ac_includes_default
ca81d7a0 23249typedef pid_t ac__type_new_;
503d2be0
AS
23250int
23251main ()
23252{
ca81d7a0 23253if ((ac__type_new_ *) 0)
503d2be0 23254 return 0;
ca81d7a0 23255if (sizeof (ac__type_new_))
503d2be0
AS
23256 return 0;
23257 ;
23258 return 0;
23259}
23260_ACEOF
23261rm -f conftest.$ac_objext
ca81d7a0
JD
23262if { (ac_try="$ac_compile"
23263case "(($ac_try" in
23264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23265 *) ac_try_echo=$ac_try;;
23266esac
23267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23268 (eval "$ac_compile") 2>conftest.er1
503d2be0 23269 ac_status=$?
edfaf76d
LK
23270 grep -v '^ *+' conftest.er1 >conftest.err
23271 rm -f conftest.er1
23272 cat conftest.err >&5
c0d27fcc 23273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23274 (exit $ac_status); } && {
23275 test -z "$ac_c_werror_flag" ||
23276 test ! -s conftest.err
23277 } && test -s conftest.$ac_objext; then
647847ea
DL
23278 ac_cv_type_pid_t=yes
23279else
503d2be0 23280 echo "$as_me: failed program was:" >&5
19650fd6
AS
23281sed 's/^/| /' conftest.$ac_ext >&5
23282
ca81d7a0 23283 ac_cv_type_pid_t=no
647847ea 23284fi
ca81d7a0
JD
23285
23286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23287fi
ca81d7a0
JD
23288{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23289echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23290if test $ac_cv_type_pid_t = yes; then
23291 :
23292else
23293
c0d27fcc 23294cat >>confdefs.h <<_ACEOF
647847ea 23295#define pid_t int
c0d27fcc 23296_ACEOF
647847ea
DL
23297
23298fi
23299
c0d27fcc 23300
ca81d7a0 23301for ac_header in vfork.h
503d2be0
AS
23302do
23303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23304if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23305 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23307if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23308 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23309fi
ca81d7a0
JD
23310ac_res=`eval echo '${'$as_ac_Header'}'`
23311 { echo "$as_me:$LINENO: result: $ac_res" >&5
23312echo "${ECHO_T}$ac_res" >&6; }
98418dba 23313else
c0d27fcc 23314 # Is the header compilable?
ca81d7a0
JD
23315{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23316echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23317cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23318/* confdefs.h. */
23319_ACEOF
23320cat confdefs.h >>conftest.$ac_ext
23321cat >>conftest.$ac_ext <<_ACEOF
23322/* end confdefs.h. */
c0d27fcc
MR
23323$ac_includes_default
23324#include <$ac_header>
23325_ACEOF
23326rm -f conftest.$ac_objext
ca81d7a0
JD
23327if { (ac_try="$ac_compile"
23328case "(($ac_try" in
23329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23330 *) ac_try_echo=$ac_try;;
23331esac
23332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23333 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23334 ac_status=$?
edfaf76d
LK
23335 grep -v '^ *+' conftest.er1 >conftest.err
23336 rm -f conftest.er1
23337 cat conftest.err >&5
c0d27fcc 23338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23339 (exit $ac_status); } && {
23340 test -z "$ac_c_werror_flag" ||
23341 test ! -s conftest.err
23342 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23343 ac_header_compiler=yes
23344else
23345 echo "$as_me: failed program was:" >&5
19650fd6
AS
23346sed 's/^/| /' conftest.$ac_ext >&5
23347
ca81d7a0 23348 ac_header_compiler=no
c0d27fcc 23349fi
ca81d7a0
JD
23350
23351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23352{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23353echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23354
23355# Is the header present?
ca81d7a0
JD
23356{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23357echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23359/* confdefs.h. */
23360_ACEOF
23361cat confdefs.h >>conftest.$ac_ext
23362cat >>conftest.$ac_ext <<_ACEOF
23363/* end confdefs.h. */
503d2be0
AS
23364#include <$ac_header>
23365_ACEOF
ca81d7a0
JD
23366if { (ac_try="$ac_cpp conftest.$ac_ext"
23367case "(($ac_try" in
23368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23369 *) ac_try_echo=$ac_try;;
23370esac
23371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23372 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23373 ac_status=$?
6bae0ccf 23374 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23375 rm -f conftest.er1
23376 cat conftest.err >&5
c0d27fcc 23377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23378 (exit $ac_status); } >/dev/null && {
23379 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23380 test ! -s conftest.err
23381 }; then
c0d27fcc 23382 ac_header_preproc=yes
647847ea 23383else
503d2be0 23384 echo "$as_me: failed program was:" >&5
19650fd6
AS
23385sed 's/^/| /' conftest.$ac_ext >&5
23386
c0d27fcc 23387 ac_header_preproc=no
647847ea 23388fi
ca81d7a0 23389
503d2be0 23390rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23391{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23392echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23393
23394# So? What about this header?
edfaf76d
LK
23395case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23396 yes:no: )
c0d27fcc
MR
23397 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23398echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23399 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23400echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23401 ac_header_preproc=yes
19650fd6 23402 ;;
edfaf76d 23403 no:yes:* )
c0d27fcc
MR
23404 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23405echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23406 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23407echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23408 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23409echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23410 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23411echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23412 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23413echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23414 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23415echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23416
19650fd6 23417 ;;
c0d27fcc 23418esac
ca81d7a0
JD
23419{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23420echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23421if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23422 echo $ECHO_N "(cached) $ECHO_C" >&6
23423else
edfaf76d 23424 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23425fi
ca81d7a0
JD
23426ac_res=`eval echo '${'$as_ac_Header'}'`
23427 { echo "$as_me:$LINENO: result: $ac_res" >&5
23428echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23429
23430fi
503d2be0 23431if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23432 cat >>confdefs.h <<_ACEOF
503d2be0 23433#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23434_ACEOF
647847ea 23435
73b77ee5 23436fi
c0d27fcc 23437
503d2be0 23438done
73b77ee5 23439
c0d27fcc
MR
23440
23441
503d2be0
AS
23442for ac_func in fork vfork
23443do
23444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23448 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23449else
503d2be0 23450 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23451/* confdefs.h. */
23452_ACEOF
23453cat confdefs.h >>conftest.$ac_ext
23454cat >>conftest.$ac_ext <<_ACEOF
23455/* end confdefs.h. */
edfaf76d
LK
23456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23458#define $ac_func innocuous_$ac_func
23459
fa0b693c 23460/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23461 which can conflict with char $ac_func (); below.
23462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23463 <limits.h> exists even on freestanding compilers. */
edfaf76d 23464
19650fd6
AS
23465#ifdef __STDC__
23466# include <limits.h>
23467#else
23468# include <assert.h>
23469#endif
edfaf76d
LK
23470
23471#undef $ac_func
23472
ca81d7a0
JD
23473/* Override any GCC internal prototype to avoid an error.
23474 Use char because int might match the return type of a GCC
23475 builtin and then its argument prototype would still apply. */
503d2be0
AS
23476#ifdef __cplusplus
23477extern "C"
23478#endif
503d2be0 23479char $ac_func ();
fa0b693c
GM
23480/* The GNU C library defines this for functions which it implements
23481 to always fail with ENOSYS. Some functions are actually named
23482 something starting with __ and the normal name is an alias. */
ca81d7a0 23483#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23484choke me
fa0b693c
GM
23485#endif
23486
19650fd6
AS
23487int
23488main ()
23489{
ca81d7a0 23490return $ac_func ();
503d2be0
AS
23491 ;
23492 return 0;
23493}
23494_ACEOF
23495rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23496if { (ac_try="$ac_link"
23497case "(($ac_try" in
23498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23499 *) ac_try_echo=$ac_try;;
23500esac
23501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23502 (eval "$ac_link") 2>conftest.er1
503d2be0 23503 ac_status=$?
edfaf76d
LK
23504 grep -v '^ *+' conftest.er1 >conftest.err
23505 rm -f conftest.er1
23506 cat conftest.err >&5
c0d27fcc 23507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23508 (exit $ac_status); } && {
23509 test -z "$ac_c_werror_flag" ||
23510 test ! -s conftest.err
23511 } && test -s conftest$ac_exeext &&
23512 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23513 eval "$as_ac_var=yes"
23514else
23515 echo "$as_me: failed program was:" >&5
19650fd6
AS
23516sed 's/^/| /' conftest.$ac_ext >&5
23517
ca81d7a0 23518 eval "$as_ac_var=no"
503d2be0 23519fi
ca81d7a0 23520
f053c89f 23521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23522 conftest$ac_exeext conftest.$ac_ext
503d2be0 23523fi
ca81d7a0
JD
23524ac_res=`eval echo '${'$as_ac_var'}'`
23525 { echo "$as_me:$LINENO: result: $ac_res" >&5
23526echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23527if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23528 cat >>confdefs.h <<_ACEOF
503d2be0 23529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23530_ACEOF
503d2be0 23531
fa0b693c 23532fi
503d2be0 23533done
fa0b693c 23534
503d2be0 23535if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23536 { echo "$as_me:$LINENO: checking for working fork" >&5
23537echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23538if test "${ac_cv_func_fork_works+set}" = set; then
23539 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23540else
503d2be0
AS
23541 if test "$cross_compiling" = yes; then
23542 ac_cv_func_fork_works=cross
23543else
23544 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23545/* confdefs.h. */
23546_ACEOF
23547cat confdefs.h >>conftest.$ac_ext
23548cat >>conftest.$ac_ext <<_ACEOF
23549/* end confdefs.h. */
23550$ac_includes_default
23551int
23552main ()
23553{
23554
23555 /* By Ruediger Kuhlmann. */
23556 return fork () < 0;
23557
23558 ;
23559 return 0;
23560}
503d2be0
AS
23561_ACEOF
23562rm -f conftest$ac_exeext
ca81d7a0
JD
23563if { (ac_try="$ac_link"
23564case "(($ac_try" in
23565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23566 *) ac_try_echo=$ac_try;;
23567esac
23568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23569 (eval "$ac_link") 2>&5
503d2be0 23570 ac_status=$?
c0d27fcc 23571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23573 { (case "(($ac_try" in
23574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23575 *) ac_try_echo=$ac_try;;
23576esac
23577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23578 (eval "$ac_try") 2>&5
503d2be0 23579 ac_status=$?
c0d27fcc 23580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23581 (exit $ac_status); }; }; then
23582 ac_cv_func_fork_works=yes
23583else
23584 echo "$as_me: program exited with status $ac_status" >&5
23585echo "$as_me: failed program was:" >&5
19650fd6
AS
23586sed 's/^/| /' conftest.$ac_ext >&5
23587
c0d27fcc 23588( exit $ac_status )
503d2be0
AS
23589ac_cv_func_fork_works=no
23590fi
ca81d7a0 23591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23592fi
ca81d7a0
JD
23593
23594
503d2be0 23595fi
ca81d7a0
JD
23596{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23597echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23598
6bae0ccf
DL
23599else
23600 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23601fi
23602if test "x$ac_cv_func_fork_works" = xcross; then
23603 case $host in
23604 *-*-amigaos* | *-*-msdosdjgpp*)
23605 # Override, as these systems have only a dummy fork() stub
23606 ac_cv_func_fork_works=no
23607 ;;
23608 *)
23609 ac_cv_func_fork_works=yes
23610 ;;
23611 esac
c0d27fcc
MR
23612 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23613echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23614fi
73b77ee5 23615ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23616if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23617 { echo "$as_me:$LINENO: checking for working vfork" >&5
23618echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23619if test "${ac_cv_func_vfork_works+set}" = set; then
23620 echo $ECHO_N "(cached) $ECHO_C" >&6
23621else
23622 if test "$cross_compiling" = yes; then
23623 ac_cv_func_vfork_works=cross
fa0b693c 23624else
503d2be0 23625 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23626/* confdefs.h. */
23627_ACEOF
23628cat confdefs.h >>conftest.$ac_ext
23629cat >>conftest.$ac_ext <<_ACEOF
23630/* end confdefs.h. */
73b77ee5 23631/* Thanks to Paul Eggert for this test. */
ca81d7a0 23632$ac_includes_default
19650fd6 23633#include <sys/wait.h>
f053c89f 23634#ifdef HAVE_VFORK_H
503d2be0 23635# include <vfork.h>
73b77ee5
GM
23636#endif
23637/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23638 argument registers are propagated back to the parent. The compiler
23639 is told about this with #include <vfork.h>, but some compilers
23640 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23641 static variable whose address is put into a register that is
23642 clobbered by the vfork. */
19650fd6 23643static void
fa0b693c 23644#ifdef __cplusplus
73b77ee5 23645sparc_address_test (int arg)
503d2be0 23646# else
73b77ee5 23647sparc_address_test (arg) int arg;
fa0b693c 23648#endif
fa0b693c 23649{
73b77ee5
GM
23650 static pid_t child;
23651 if (!child) {
23652 child = vfork ();
23653 if (child < 0) {
23654 perror ("vfork");
23655 _exit(2);
23656 }
23657 if (!child) {
23658 arg = getpid();
23659 write(-1, "", 0);
23660 _exit (arg);
23661 }
23662 }
23663}
503d2be0
AS
23664
23665int
23666main ()
23667{
73b77ee5
GM
23668 pid_t parent = getpid ();
23669 pid_t child;
fa0b693c 23670
19650fd6 23671 sparc_address_test (0);
fa0b693c 23672
73b77ee5 23673 child = vfork ();
fa0b693c 23674
73b77ee5 23675 if (child == 0) {
503d2be0
AS
23676 /* Here is another test for sparc vfork register problems. This
23677 test uses lots of local variables, at least as many local
23678 variables as main has allocated so far including compiler
23679 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23680 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23681 reuse the register of parent for one of the local variables,
23682 since it will think that parent can't possibly be used any more
23683 in this routine. Assigning to the local variable will thus
23684 munge parent in the parent process. */
73b77ee5
GM
23685 pid_t
23686 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23687 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23688 /* Convince the compiler that p..p7 are live; otherwise, it might
23689 use the same hardware register for all 8 local variables. */
23690 if (p != p1 || p != p2 || p != p3 || p != p4
23691 || p != p5 || p != p6 || p != p7)
23692 _exit(1);
fa0b693c 23693
503d2be0
AS
23694 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23695 from child file descriptors. If the child closes a descriptor
23696 before it execs or exits, this munges the parent's descriptor
23697 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23698 _exit(close(fileno(stdout)) != 0);
23699 } else {
23700 int status;
23701 struct stat st;
23702
23703 while (wait(&status) != child)
23704 ;
ca81d7a0 23705 return (
73b77ee5
GM
23706 /* Was there some problem with vforking? */
23707 child < 0
23708
23709 /* Did the child fail? (This shouldn't happen.) */
23710 || status
23711
23712 /* Did the vfork/compiler bug occur? */
23713 || parent != getpid()
fa0b693c 23714
73b77ee5
GM
23715 /* Did the file descriptor bug occur? */
23716 || fstat(fileno(stdout), &st) != 0
23717 );
23718 }
23719}
503d2be0
AS
23720_ACEOF
23721rm -f conftest$ac_exeext
ca81d7a0
JD
23722if { (ac_try="$ac_link"
23723case "(($ac_try" in
23724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23725 *) ac_try_echo=$ac_try;;
23726esac
23727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23728 (eval "$ac_link") 2>&5
503d2be0 23729 ac_status=$?
c0d27fcc 23730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23732 { (case "(($ac_try" in
23733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23734 *) ac_try_echo=$ac_try;;
23735esac
23736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23737 (eval "$ac_try") 2>&5
503d2be0 23738 ac_status=$?
c0d27fcc 23739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23740 (exit $ac_status); }; }; then
73b77ee5 23741 ac_cv_func_vfork_works=yes
fa0b693c 23742else
503d2be0
AS
23743 echo "$as_me: program exited with status $ac_status" >&5
23744echo "$as_me: failed program was:" >&5
19650fd6
AS
23745sed 's/^/| /' conftest.$ac_ext >&5
23746
c0d27fcc 23747( exit $ac_status )
503d2be0
AS
23748ac_cv_func_vfork_works=no
23749fi
ca81d7a0 23750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23751fi
ca81d7a0
JD
23752
23753
fa0b693c 23754fi
ca81d7a0
JD
23755{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23756echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23757
503d2be0
AS
23758fi;
23759if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23760 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23761 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23762echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23763fi
23764
503d2be0
AS
23765if test "x$ac_cv_func_vfork_works" = xyes; then
23766
c0d27fcc 23767cat >>confdefs.h <<\_ACEOF
503d2be0 23768#define HAVE_WORKING_VFORK 1
c0d27fcc 23769_ACEOF
503d2be0
AS
23770
23771else
23772
c0d27fcc 23773cat >>confdefs.h <<\_ACEOF
73b77ee5 23774#define vfork fork
c0d27fcc 23775_ACEOF
fa0b693c
GM
23776
23777fi
503d2be0
AS
23778if test "x$ac_cv_func_fork_works" = xyes; then
23779
c0d27fcc 23780cat >>confdefs.h <<\_ACEOF
503d2be0 23781#define HAVE_WORKING_FORK 1
c0d27fcc 23782_ACEOF
fa0b693c 23783
503d2be0 23784fi
647847ea 23785
c0d27fcc 23786
ca81d7a0
JD
23787{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23788echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23789if test "${emacs_cv_langinfo_codeset+set}" = set; then
23790 echo $ECHO_N "(cached) $ECHO_C" >&6
23791else
23792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23793/* confdefs.h. */
23794_ACEOF
23795cat confdefs.h >>conftest.$ac_ext
23796cat >>conftest.$ac_ext <<_ACEOF
23797/* end confdefs.h. */
6a3a24fa
JD
23798#include <langinfo.h>
23799int
23800main ()
23801{
23802char* cs = nl_langinfo(CODESET);
23803 ;
23804 return 0;
23805}
23806_ACEOF
23807rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23808if { (ac_try="$ac_link"
23809case "(($ac_try" in
23810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23811 *) ac_try_echo=$ac_try;;
23812esac
23813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23814 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23815 ac_status=$?
edfaf76d
LK
23816 grep -v '^ *+' conftest.er1 >conftest.err
23817 rm -f conftest.er1
23818 cat conftest.err >&5
6a3a24fa 23819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23820 (exit $ac_status); } && {
23821 test -z "$ac_c_werror_flag" ||
23822 test ! -s conftest.err
23823 } && test -s conftest$ac_exeext &&
23824 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23825 emacs_cv_langinfo_codeset=yes
23826else
23827 echo "$as_me: failed program was:" >&5
19650fd6
AS
23828sed 's/^/| /' conftest.$ac_ext >&5
23829
ca81d7a0 23830 emacs_cv_langinfo_codeset=no
6a3a24fa 23831fi
ca81d7a0 23832
f053c89f 23833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23834 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23835
23836fi
ca81d7a0
JD
23837{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23838echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23839if test $emacs_cv_langinfo_codeset = yes; then
23840
23841cat >>confdefs.h <<\_ACEOF
23842#define HAVE_LANGINFO_CODESET 1
23843_ACEOF
23844
23845fi
23846
ca81d7a0
JD
23847{ echo "$as_me:$LINENO: checking for size_t" >&5
23848echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23849if test "${ac_cv_type_size_t+set}" = set; then
23850 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23851else
503d2be0 23852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23853/* confdefs.h. */
23854_ACEOF
23855cat confdefs.h >>conftest.$ac_ext
23856cat >>conftest.$ac_ext <<_ACEOF
23857/* end confdefs.h. */
503d2be0 23858$ac_includes_default
ca81d7a0 23859typedef size_t ac__type_new_;
503d2be0
AS
23860int
23861main ()
23862{
ca81d7a0 23863if ((ac__type_new_ *) 0)
503d2be0 23864 return 0;
ca81d7a0 23865if (sizeof (ac__type_new_))
503d2be0
AS
23866 return 0;
23867 ;
23868 return 0;
23869}
23870_ACEOF
23871rm -f conftest.$ac_objext
ca81d7a0
JD
23872if { (ac_try="$ac_compile"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
23877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878 (eval "$ac_compile") 2>conftest.er1
503d2be0 23879 ac_status=$?
edfaf76d
LK
23880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
c0d27fcc 23883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
8730a8da
DL
23888 ac_cv_type_size_t=yes
23889else
503d2be0 23890 echo "$as_me: failed program was:" >&5
19650fd6
AS
23891sed 's/^/| /' conftest.$ac_ext >&5
23892
ca81d7a0 23893 ac_cv_type_size_t=no
8730a8da 23894fi
ca81d7a0
JD
23895
23896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23897fi
ca81d7a0
JD
23898{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23899echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23900if test $ac_cv_type_size_t = yes; then
503d2be0 23901
c0d27fcc
MR
23902cat >>confdefs.h <<_ACEOF
23903#define HAVE_SIZE_T 1
23904_ACEOF
23905
8730a8da
DL
23906
23907fi
23908
c0d27fcc 23909
ca81d7a0
JD
23910{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23911echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23912if test "${ac_cv_type_mbstate_t+set}" = set; then
23913 echo $ECHO_N "(cached) $ECHO_C" >&6
23914else
23915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23916/* confdefs.h. */
23917_ACEOF
23918cat confdefs.h >>conftest.$ac_ext
23919cat >>conftest.$ac_ext <<_ACEOF
23920/* end confdefs.h. */
973a76b1
DL
23921$ac_includes_default
23922# include <wchar.h>
23923int
23924main ()
23925{
23926mbstate_t x; return sizeof x;
23927 ;
23928 return 0;
23929}
23930_ACEOF
23931rm -f conftest.$ac_objext
ca81d7a0
JD
23932if { (ac_try="$ac_compile"
23933case "(($ac_try" in
23934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23935 *) ac_try_echo=$ac_try;;
23936esac
23937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23938 (eval "$ac_compile") 2>conftest.er1
973a76b1 23939 ac_status=$?
edfaf76d
LK
23940 grep -v '^ *+' conftest.er1 >conftest.err
23941 rm -f conftest.er1
23942 cat conftest.err >&5
973a76b1 23943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23944 (exit $ac_status); } && {
23945 test -z "$ac_c_werror_flag" ||
23946 test ! -s conftest.err
23947 } && test -s conftest.$ac_objext; then
973a76b1
DL
23948 ac_cv_type_mbstate_t=yes
23949else
23950 echo "$as_me: failed program was:" >&5
19650fd6
AS
23951sed 's/^/| /' conftest.$ac_ext >&5
23952
ca81d7a0 23953 ac_cv_type_mbstate_t=no
973a76b1 23954fi
ca81d7a0
JD
23955
23956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23957fi
ca81d7a0
JD
23958{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23959echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23960 if test $ac_cv_type_mbstate_t = yes; then
23961
23962cat >>confdefs.h <<\_ACEOF
23963#define HAVE_MBSTATE_T 1
23964_ACEOF
23965
23966 else
23967
23968cat >>confdefs.h <<\_ACEOF
23969#define mbstate_t int
23970_ACEOF
23971
23972 fi
23973
ca81d7a0
JD
23974{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23975echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23976if test "${emacs_cv_c_restrict+set}" = set; then
23977 echo $ECHO_N "(cached) $ECHO_C" >&6
23978else
23979 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23980/* confdefs.h. */
23981_ACEOF
23982cat confdefs.h >>conftest.$ac_ext
23983cat >>conftest.$ac_ext <<_ACEOF
23984/* end confdefs.h. */
22044edf
DL
23985void fred (int *restrict x);
23986int
23987main ()
23988{
b936fae4 23989
22044edf
DL
23990 ;
23991 return 0;
23992}
c0d27fcc 23993_ACEOF
22044edf 23994rm -f conftest.$ac_objext
ca81d7a0
JD
23995if { (ac_try="$ac_compile"
23996case "(($ac_try" in
23997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23998 *) ac_try_echo=$ac_try;;
23999esac
24000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24001 (eval "$ac_compile") 2>conftest.er1
22044edf 24002 ac_status=$?
edfaf76d
LK
24003 grep -v '^ *+' conftest.er1 >conftest.err
24004 rm -f conftest.er1
24005 cat conftest.err >&5
22044edf 24006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24007 (exit $ac_status); } && {
24008 test -z "$ac_c_werror_flag" ||
24009 test ! -s conftest.err
24010 } && test -s conftest.$ac_objext; then
22044edf
DL
24011 emacs_cv_c_restrict=yes
24012else
24013 echo "$as_me: failed program was:" >&5
19650fd6
AS
24014sed 's/^/| /' conftest.$ac_ext >&5
24015
ca81d7a0 24016 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24017/* confdefs.h. */
24018_ACEOF
24019cat confdefs.h >>conftest.$ac_ext
24020cat >>conftest.$ac_ext <<_ACEOF
24021/* end confdefs.h. */
22044edf
DL
24022void fred (int *__restrict x);
24023int
24024main ()
24025{
c0d27fcc 24026
22044edf
DL
24027 ;
24028 return 0;
24029}
c0d27fcc 24030_ACEOF
22044edf 24031rm -f conftest.$ac_objext
ca81d7a0
JD
24032if { (ac_try="$ac_compile"
24033case "(($ac_try" in
24034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24035 *) ac_try_echo=$ac_try;;
24036esac
24037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24038 (eval "$ac_compile") 2>conftest.er1
22044edf 24039 ac_status=$?
edfaf76d
LK
24040 grep -v '^ *+' conftest.er1 >conftest.err
24041 rm -f conftest.er1
24042 cat conftest.err >&5
22044edf 24043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24044 (exit $ac_status); } && {
24045 test -z "$ac_c_werror_flag" ||
24046 test ! -s conftest.err
24047 } && test -s conftest.$ac_objext; then
22044edf
DL
24048 emacs_cv_c_restrict=__restrict
24049else
24050 echo "$as_me: failed program was:" >&5
19650fd6
AS
24051sed 's/^/| /' conftest.$ac_ext >&5
24052
ca81d7a0 24053 emacs_cv_c_restrict=no
ba4481b5 24054fi
ca81d7a0
JD
24055
24056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24057fi
ca81d7a0
JD
24058
24059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24060fi
ca81d7a0
JD
24061{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24062echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24063case "$emacs_cv_c_restrict" in
24064 yes) emacs_restrict=restrict;;
24065 no) emacs_restrict="";;
24066 *) emacs_restrict="$emacs_cv_c_restrict";;
24067esac
24068if test "$emacs_restrict" != __restrict; then
b936fae4 24069
22044edf
DL
24070cat >>confdefs.h <<_ACEOF
24071#define __restrict $emacs_restrict
c0d27fcc 24072_ACEOF
ba4481b5
DL
24073
24074fi
ba4481b5 24075
ca81d7a0
JD
24076{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24077echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24078if test "${emacs_cv_c_restrict_arr+set}" = set; then
24079 echo $ECHO_N "(cached) $ECHO_C" >&6
24080else
24081 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24082/* confdefs.h. */
24083_ACEOF
24084cat confdefs.h >>conftest.$ac_ext
24085cat >>conftest.$ac_ext <<_ACEOF
24086/* end confdefs.h. */
22044edf
DL
24087void fred (int x[__restrict]);
24088int
24089main ()
24090{
b936fae4 24091
22044edf
DL
24092 ;
24093 return 0;
24094}
c0d27fcc 24095_ACEOF
22044edf 24096rm -f conftest.$ac_objext
ca81d7a0
JD
24097if { (ac_try="$ac_compile"
24098case "(($ac_try" in
24099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24100 *) ac_try_echo=$ac_try;;
24101esac
24102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24103 (eval "$ac_compile") 2>conftest.er1
22044edf 24104 ac_status=$?
edfaf76d
LK
24105 grep -v '^ *+' conftest.er1 >conftest.err
24106 rm -f conftest.er1
24107 cat conftest.err >&5
22044edf 24108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24109 (exit $ac_status); } && {
24110 test -z "$ac_c_werror_flag" ||
24111 test ! -s conftest.err
24112 } && test -s conftest.$ac_objext; then
22044edf
DL
24113 emacs_cv_c_restrict_arr=yes
24114else
24115 echo "$as_me: failed program was:" >&5
19650fd6
AS
24116sed 's/^/| /' conftest.$ac_ext >&5
24117
ca81d7a0 24118 emacs_cv_c_restrict_arr=no
ba4481b5 24119fi
ca81d7a0
JD
24120
24121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24122fi
ca81d7a0
JD
24123{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24124echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24125if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24126
c0d27fcc 24127cat >>confdefs.h <<\_ACEOF
22044edf 24128#define __restrict_arr __restrict
c0d27fcc 24129_ACEOF
ba4481b5 24130
ba4481b5
DL
24131fi
24132
c0d27fcc 24133
c0d27fcc 24134
22044edf
DL
24135# Set up the CFLAGS for real compilation, so we can substitute it.
24136CFLAGS="$REAL_CFLAGS"
24137CPPFLAGS="$REAL_CPPFLAGS"
24138
24139#### Find out which version of Emacs this is.
24140version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24141 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24142if test x"${version}" = x; then
24143 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24144echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24145 { (exit 1); exit 1; }; }
24146fi
24147
24148### Specify what sort of things we'll be editing into Makefile and config.h.
24149### Use configuration here uncanonicalized to avoid exceeding size limits.
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
24179
24180
24181
6a3a24fa 24182
edfda783 24183
facfbbbd 24184
22044edf
DL
24185
24186
24187cat >>confdefs.h <<_ACEOF
24188#define EMACS_CONFIGURATION "${canonical}"
24189_ACEOF
24190
24191
24192cat >>confdefs.h <<_ACEOF
24193#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24194_ACEOF
24195
24196
24197cat >>confdefs.h <<_ACEOF
24198#define config_machfile "${machfile}"
24199_ACEOF
24200
24201
24202cat >>confdefs.h <<_ACEOF
24203#define config_opsysfile "${opsysfile}"
24204_ACEOF
24205
24206
24207cat >>confdefs.h <<_ACEOF
24208#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24209_ACEOF
24210
24211
24212cat >>confdefs.h <<_ACEOF
24213#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24214_ACEOF
24215
24216
24217cat >>confdefs.h <<_ACEOF
24218#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24219_ACEOF
24220
24221
24222cat >>confdefs.h <<_ACEOF
24223#define UNEXEC_SRC ${UNEXEC_SRC}
24224_ACEOF
24225
24226
24227if test "${HAVE_X_WINDOWS}" = "yes" ; then
24228
24229cat >>confdefs.h <<\_ACEOF
24230#define HAVE_X_WINDOWS 1
24231_ACEOF
24232
24233fi
24234if test "${USE_X_TOOLKIT}" != "none" ; then
24235
24236cat >>confdefs.h <<\_ACEOF
24237#define USE_X_TOOLKIT 1
24238_ACEOF
24239
39dd4d52 24240 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24241
24242cat >>confdefs.h <<\_ACEOF
24243#define USE_LUCID 1
24244_ACEOF
24245
39dd4d52 24246 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24247
24248cat >>confdefs.h <<\_ACEOF
24249#define USE_MOTIF 1
24250_ACEOF
24251
24252 fi
22044edf
DL
24253fi
24254if test "${HAVE_X11}" = "yes" ; then
24255
24256cat >>confdefs.h <<\_ACEOF
24257#define HAVE_X11 1
24258_ACEOF
24259
22044edf
DL
24260fi
24261if test "${HAVE_MENUS}" = "yes" ; then
24262
24263cat >>confdefs.h <<\_ACEOF
24264#define HAVE_MENUS 1
24265_ACEOF
24266
24267fi
24268if test "${GNU_MALLOC}" = "yes" ; then
24269
24270cat >>confdefs.h <<\_ACEOF
24271#define GNU_MALLOC 1
24272_ACEOF
24273
24274fi
24275if test "${REL_ALLOC}" = "yes" ; then
24276
24277cat >>confdefs.h <<\_ACEOF
24278#define REL_ALLOC 1
24279_ACEOF
24280
24281fi
24282
24283
24284
c0d27fcc
MR
24285
24286
5afbeb22 24287
ba4481b5 24288#### Report on what we decided to do.
488dd4c4
JD
24289#### Report GTK as a toolkit, even if it doesn't use Xt.
24290#### It makes printing result more understandable as using GTK sets
24291#### toolkit_scroll_bars to yes by default.
24292if test "${HAVE_GTK}" = "yes"; then
24293 USE_X_TOOLKIT=GTK
24294fi
24295
ba4481b5
DL
24296echo "
24297Configured for \`${canonical}'.
24298
24299 Where should the build process find the source code? ${srcdir}
24300 What operating system and machine description files should Emacs use?
24301 \`${opsysfile}' and \`${machfile}'
24302 What compiler should emacs be built with? ${CC} ${CFLAGS}
24303 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24304 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24305 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24306 What window system should Emacs use? ${window_system}
8e967cf7 24307 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24308
24309if test -n "${x_includes}"; then
24310echo " Where do we find X Windows header files? ${x_includes}"
24311else
24312echo " Where do we find X Windows header files? Standard dirs"
24313fi
24314if test -n "${x_libraries}"; then
24315echo " Where do we find X Windows libraries? ${x_libraries}"
24316else
24317echo " Where do we find X Windows libraries? Standard dirs"
24318fi
24319
24320echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24321echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24322echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24323echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24324echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24325echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24326echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24327echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24328echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24329
edfda783
AR
24330echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24331echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24332echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24333echo " Does Emacs use -lxft? ${HAVE_XFT}"
24334
ba4481b5
DL
24335echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24336echo
24337
d0098f13
JD
24338if test $USE_XASSERTS = yes; then
24339 echo " Compiling with asserts turned on."
d0098f13 24340 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24341fi
05cf15c6 24342
ca34d75a
JD
24343echo
24344
a2d3b5bd
JD
24345if test "$USE_X_TOOLKIT" = GTK; then
24346 case "$canonical" in
24347 *cygwin*)
24348 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24349 will probably get a crash on startup. If this happens, please use another
24350 toolkit for Emacs. See etc/PROBLEMS for more information."
24351 ;;
24352 esac
24353fi
24354
05cf15c6 24355
f0e04acc
GM
24356if test "$HAVE_CARBON" = "yes"; then
24357 echo
24358 echo "Warning: The Mac Carbon port is currently unsupported and has
24359known problems. It is not recommended for use by non-developers.
24360Read the emacs-devel archives for more information."
24361 echo
24362fi
24363
131e4133
MA
24364if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24365 echo "D-Bus integration has been tested for GNU/Linux only."
24366 echo
24367fi
24368
05cf15c6 24369
ba4481b5
DL
24370# Remove any trailing slashes in these variables.
24371test "${prefix}" != NONE &&
24372 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24373test "${exec_prefix}" != NONE &&
24374 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24375
8acdcf6f
GM
24376# Now get this: Some word that is part of the ${srcdir} directory name
24377# or the ${configuration} value might, just might, happen to be an
24378# identifier like `sun4' or `i386' or something, and be predefined by
24379# the C preprocessor to some helpful value like 1, or maybe the empty
24380# string. Needless to say consequent macro substitutions are less
24381# than conducive to the makefile finding the correct directory.
24382cpp_undefs="`echo $srcdir $configuration $canonical |
24383 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24384 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24385
d0e9bfd2
GM
24386## Check if the C preprocessor will convert `..' to `. .'. If so, set
24387## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24388## from Makefile.c can correctly provide the arg `-traditional' to the
24389## C preprocessor.
24390
503d2be0 24391cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24392/* confdefs.h. */
24393_ACEOF
24394cat confdefs.h >>conftest.$ac_ext
24395cat >>conftest.$ac_ext <<_ACEOF
24396/* end confdefs.h. */
d0e9bfd2 24397yes..yes
503d2be0 24398_ACEOF
d0e9bfd2 24399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24400 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24401 CPP_NEED_TRADITIONAL=no
24402else
d0e9bfd2
GM
24403 CPP_NEED_TRADITIONAL=yes
24404fi
24405rm -f conftest*
24406
c0d27fcc 24407
f657c21b 24408ac_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
24409
24410ac_config_commands="$ac_config_commands default"
24411
503d2be0 24412cat >confcache <<\_ACEOF
ba4481b5
DL
24413# This file is a shell script that caches the results of configure
24414# tests run on this system so they can be shared between configure
503d2be0
AS
24415# scripts and configure runs, see configure's option --config-cache.
24416# It is not useful on other systems. If it contains results you don't
24417# want to keep, you may remove or edit it.
ba4481b5 24418#
503d2be0
AS
24419# config.status only pays attention to the cache file if you give it
24420# the --recheck option to rerun configure.
ba4481b5 24421#
6bae0ccf 24422# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24423# loading this file, other *unset* `ac_cv_foo' will be assigned the
24424# following values.
24425
24426_ACEOF
24427
ba4481b5
DL
24428# The following way of writing the cache mishandles newlines in values,
24429# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24430# So, we kill variables containing newlines.
ba4481b5
DL
24431# Ultrix sh set writes to stderr and can't be redirected directly,
24432# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24433(
24434 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24435 eval ac_val=\$$ac_var
24436 case $ac_val in #(
24437 *${as_nl}*)
24438 case $ac_var in #(
24439 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24440echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24441 esac
24442 case $ac_var in #(
24443 _ | IFS | as_nl) ;; #(
24444 *) $as_unset $ac_var ;;
24445 esac ;;
24446 esac
24447 done
24448
503d2be0 24449 (set) 2>&1 |
ca81d7a0
JD
24450 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24451 *${as_nl}ac_space=\ *)
503d2be0
AS
24452 # `set' does not quote correctly, so add quotes (double-quote
24453 # substitution turns \\\\ into \\, and sed turns \\ into \).
24454 sed -n \
edfaf76d
LK
24455 "s/'/'\\\\''/g;
24456 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24457 ;; #(
503d2be0
AS
24458 *)
24459 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24460 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24461 ;;
ca81d7a0
JD
24462 esac |
24463 sort
24464) |
503d2be0 24465 sed '
ca81d7a0 24466 /^ac_cv_env_/b end
503d2be0 24467 t clear
ca81d7a0 24468 :clear
503d2be0
AS
24469 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24470 t end
ca81d7a0
JD
24471 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24472 :end' >>confcache
24473if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24474 if test -w "$cache_file"; then
24475 test "x$cache_file" != "x/dev/null" &&
24476 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24477echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24478 cat confcache >$cache_file
ba4481b5 24479 else
ca81d7a0
JD
24480 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24481echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24482 fi
24483fi
24484rm -f confcache
24485
ba4481b5
DL
24486test "x$prefix" = xNONE && prefix=$ac_default_prefix
24487# Let make expand exec_prefix.
24488test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24489
ba4481b5
DL
24490DEFS=-DHAVE_CONFIG_H
24491
6bae0ccf
DL
24492ac_libobjs=
24493ac_ltlibobjs=
24494for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24495 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24496 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24497 ac_i=`echo "$ac_i" | sed "$ac_script"`
24498 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24499 # will be set to the directory where LIBOBJS objects are built.
24500 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24501 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24502done
24503LIBOBJS=$ac_libobjs
24504
24505LTLIBOBJS=$ac_ltlibobjs
24506
24507
c0d27fcc 24508
ba4481b5 24509: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24510ac_clean_files_save=$ac_clean_files
24511ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24512{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24513echo "$as_me: creating $CONFIG_STATUS" >&6;}
24514cat >$CONFIG_STATUS <<_ACEOF
24515#! $SHELL
c0d27fcc 24516# Generated by $as_me.
ba4481b5 24517# Run this file to recreate the current configuration.
ba4481b5 24518# Compiler output produced by configure, useful for debugging
503d2be0 24519# configure, is in config.log if it exists.
ba4481b5 24520
503d2be0 24521debug=false
19650fd6
AS
24522ac_cs_recheck=false
24523ac_cs_silent=false
503d2be0 24524SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24525_ACEOF
24526
24527cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24528## --------------------- ##
24529## M4sh Initialization. ##
24530## --------------------- ##
24531
f053c89f
CY
24532# Be more Bourne compatible
24533DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24534if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24535 emulate sh
24536 NULLCMD=:
6bae0ccf
DL
24537 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24538 # is contrary to our usage. Disable this feature.
24539 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24540 setopt NO_GLOB_SUBST
24541else
f053c89f
CY
24542 case `(set -o) 2>/dev/null` in
24543 *posix*) set -o posix ;;
24544esac
24545
503d2be0 24546fi
f053c89f
CY
24547
24548
503d2be0 24549
ca81d7a0
JD
24550
24551# PATH needs CR
24552# Avoid depending upon Character Ranges.
24553as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24554as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24555as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24556as_cr_digits='0123456789'
24557as_cr_alnum=$as_cr_Letters$as_cr_digits
24558
24559# The user is always right.
24560if test "${PATH_SEPARATOR+set}" != set; then
24561 echo "#! /bin/sh" >conf$$.sh
24562 echo "exit 0" >>conf$$.sh
24563 chmod +x conf$$.sh
24564 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24565 PATH_SEPARATOR=';'
24566 else
24567 PATH_SEPARATOR=:
24568 fi
24569 rm -f conf$$.sh
503d2be0
AS
24570fi
24571
c0d27fcc 24572# Support unset when possible.
edfaf76d 24573if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24574 as_unset=unset
24575else
24576 as_unset=false
24577fi
24578
6bae0ccf 24579
ca81d7a0
JD
24580# IFS
24581# We need space, tab and new line, in precisely that order. Quoting is
24582# there to prevent editors from complaining about space-tab.
24583# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24584# splitting by setting IFS to empty value.)
24585as_nl='
24586'
24587IFS=" "" $as_nl"
24588
24589# Find who we are. Look in the path if we contain no directory separator.
24590case $0 in
24591 *[\\/]* ) as_myself=$0 ;;
24592 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24593for as_dir in $PATH
24594do
24595 IFS=$as_save_IFS
24596 test -z "$as_dir" && as_dir=.
24597 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24598done
24599IFS=$as_save_IFS
24600
24601 ;;
24602esac
24603# We did not find ourselves, most probably we were run as `sh COMMAND'
24604# in which case we are not to be found in the path.
24605if test "x$as_myself" = x; then
24606 as_myself=$0
24607fi
24608if test ! -f "$as_myself"; then
24609 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24610 { (exit 1); exit 1; }
24611fi
24612
6bae0ccf 24613# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24614for as_var in ENV MAIL MAILPATH
24615do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24616done
6bae0ccf
DL
24617PS1='$ '
24618PS2='> '
24619PS4='+ '
24620
24621# NLS nuisances.
19650fd6
AS
24622for as_var in \
24623 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24624 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24625 LC_TELEPHONE LC_TIME
6bae0ccf 24626do
edfaf76d 24627 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24628 eval $as_var=C; export $as_var
24629 else
ca81d7a0 24630 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24631 fi
24632done
24633
24634# Required to use basename.
ca81d7a0
JD
24635if expr a : '\(a\)' >/dev/null 2>&1 &&
24636 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24637 as_expr=expr
24638else
24639 as_expr=false
24640fi
24641
ca81d7a0 24642if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24643 as_basename=basename
24644else
24645 as_basename=false
24646fi
c0d27fcc
MR
24647
24648
503d2be0 24649# Name of the executable.
ca81d7a0 24650as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24651$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24652 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24653 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24654echo X/"$0" |
ca81d7a0
JD
24655 sed '/^.*\/\([^/][^/]*\)\/*$/{
24656 s//\1/
24657 q
24658 }
24659 /^X\/\(\/\/\)$/{
24660 s//\1/
24661 q
24662 }
24663 /^X\/\(\/\).*/{
24664 s//\1/
24665 q
24666 }
24667 s/.*/./; q'`
c0d27fcc 24668
ca81d7a0
JD
24669# CDPATH.
24670$as_unset CDPATH
c0d27fcc
MR
24671
24672
c0d27fcc 24673
c0d27fcc 24674 as_lineno_1=$LINENO
c0d27fcc 24675 as_lineno_2=$LINENO
c0d27fcc 24676 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24677 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24678
24679 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24680 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24681 # line-number line after each line using $LINENO; the second 'sed'
24682 # does the real work. The second script uses 'N' to pair each
24683 # line-number line with the line containing $LINENO, and appends
24684 # trailing '-' during substitution so that $LINENO is not a special
24685 # case at line end.
c0d27fcc 24686 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24687 # scripts with optimization help from Paolo Bonzini. Blame Lee
24688 # E. McMahon (1931-1989) for sed's syntax. :-)
24689 sed -n '
24690 p
24691 /[$]LINENO/=
24692 ' <$as_myself |
c0d27fcc 24693 sed '
ca81d7a0
JD
24694 s/[$]LINENO.*/&-/
24695 t lineno
24696 b
24697 :lineno
c0d27fcc 24698 N
ca81d7a0
JD
24699 :loop
24700 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24701 t loop
ca81d7a0 24702 s/-\n.*//
c0d27fcc 24703 ' >$as_me.lineno &&
ca81d7a0
JD
24704 chmod +x "$as_me.lineno" ||
24705 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24706 { (exit 1); exit 1; }; }
24707
24708 # Don't try to exec as it changes $[0], causing all sort of problems
24709 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24710 # original and so on. Autoconf is especially sensitive to this).
24711 . "./$as_me.lineno"
c0d27fcc
MR
24712 # Exit status is that of the last command.
24713 exit
24714}
24715
24716
ca81d7a0
JD
24717if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24718 as_dirname=dirname
24719else
24720 as_dirname=false
24721fi
24722
24723ECHO_C= ECHO_N= ECHO_T=
24724case `echo -n x` in
24725-n*)
24726 case `echo 'x\c'` in
24727 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24728 *) ECHO_C='\c';;
24729 esac;;
24730*)
24731 ECHO_N='-n';;
c0d27fcc 24732esac
503d2be0 24733
ca81d7a0
JD
24734if expr a : '\(a\)' >/dev/null 2>&1 &&
24735 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24736 as_expr=expr
24737else
24738 as_expr=false
24739fi
24740
24741rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24742if test -d conf$$.dir; then
24743 rm -f conf$$.dir/conf$$.file
24744else
24745 rm -f conf$$.dir
24746 mkdir conf$$.dir
24747fi
503d2be0
AS
24748echo >conf$$.file
24749if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24750 as_ln_s='ln -s'
24751 # ... but there are two gotchas:
24752 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24753 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24754 # In both cases, we have to default to `cp -p'.
24755 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24756 as_ln_s='cp -p'
503d2be0
AS
24757elif ln conf$$.file conf$$ 2>/dev/null; then
24758 as_ln_s=ln
24759else
24760 as_ln_s='cp -p'
24761fi
ca81d7a0
JD
24762rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24763rmdir conf$$.dir 2>/dev/null
503d2be0 24764
6bae0ccf
DL
24765if mkdir -p . 2>/dev/null; then
24766 as_mkdir_p=:
24767else
edfaf76d 24768 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24769 as_mkdir_p=false
24770fi
24771
f053c89f
CY
24772if test -x / >/dev/null 2>&1; then
24773 as_test_x='test -x'
ca81d7a0 24774else
f053c89f
CY
24775 if ls -dL / >/dev/null 2>&1; then
24776 as_ls_L_option=L
24777 else
24778 as_ls_L_option=
24779 fi
24780 as_test_x='
24781 eval sh -c '\''
24782 if test -d "$1"; then
24783 test -d "$1/.";
24784 else
24785 case $1 in
24786 -*)set "./$1";;
24787 esac;
24788 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24789 ???[sx]*):;;*)false;;esac;fi
24790 '\'' sh
24791 '
ca81d7a0 24792fi
f053c89f 24793as_executable_p=$as_test_x
503d2be0 24794
c0d27fcc 24795# Sed expression to map a string onto a valid CPP name.
edfaf76d 24796as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24797
24798# Sed expression to map a string onto a valid variable name.
edfaf76d 24799as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24800
503d2be0 24801
503d2be0
AS
24802exec 6>&1
24803
ca81d7a0 24804# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24805# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24806# values after options handling.
24807ac_log="
5d374ce1 24808This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24809generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24810
24811 CONFIG_FILES = $CONFIG_FILES
24812 CONFIG_HEADERS = $CONFIG_HEADERS
24813 CONFIG_LINKS = $CONFIG_LINKS
24814 CONFIG_COMMANDS = $CONFIG_COMMANDS
24815 $ $0 $@
24816
ca81d7a0
JD
24817on `(hostname || uname -n) 2>/dev/null | sed 1q`
24818"
24819
503d2be0
AS
24820_ACEOF
24821
ca81d7a0 24822cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24823# Files that config.status was made for.
ca81d7a0
JD
24824config_files="$ac_config_files"
24825config_headers="$ac_config_headers"
24826config_commands="$ac_config_commands"
503d2be0 24827
ca81d7a0 24828_ACEOF
503d2be0 24829
c0d27fcc 24830cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24831ac_cs_usage="\
24832\`$as_me' instantiates files from templates according to the
24833current configuration.
24834
24835Usage: $0 [OPTIONS] [FILE]...
24836
24837 -h, --help print this help, then exit
f053c89f 24838 -V, --version print version number and configuration settings, then exit
19650fd6 24839 -q, --quiet do not print progress messages
503d2be0
AS
24840 -d, --debug don't remove temporary files
24841 --recheck update $as_me by reconfiguring in the same conditions
24842 --file=FILE[:TEMPLATE]
edfaf76d 24843 instantiate the configuration file FILE
503d2be0 24844 --header=FILE[:TEMPLATE]
edfaf76d 24845 instantiate the configuration header FILE
503d2be0
AS
24846
24847Configuration files:
24848$config_files
24849
24850Configuration headers:
24851$config_headers
24852
24853Configuration commands:
24854$config_commands
24855
24856Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24857
ca81d7a0 24858_ACEOF
c0d27fcc 24859cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24860ac_cs_version="\\
5d374ce1 24861emacs config.status 23.0.60
f053c89f 24862configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24863 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24864
ca81d7a0 24865Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24866This config.status script is free software; the Free Software Foundation
24867gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24868
24869ac_pwd='$ac_pwd'
24870srcdir='$srcdir'
24871INSTALL='$INSTALL'
c0d27fcc 24872_ACEOF
503d2be0 24873
c0d27fcc 24874cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24875# If no file are specified by the user, then we need to provide default
24876# value. By we need to know if files were specified by the user.
24877ac_need_defaults=:
24878while test $# != 0
ba4481b5 24879do
503d2be0
AS
24880 case $1 in
24881 --*=*)
ca81d7a0
JD
24882 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24883 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24884 ac_shift=:
24885 ;;
ca81d7a0 24886 *)
6bae0ccf
DL
24887 ac_option=$1
24888 ac_optarg=$2
24889 ac_shift=shift
503d2be0 24890 ;;
503d2be0
AS
24891 esac
24892
6bae0ccf 24893 case $ac_option in
503d2be0 24894 # Handling of the options.
19650fd6
AS
24895 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24896 ac_cs_recheck=: ;;
ca81d7a0
JD
24897 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24898 echo "$ac_cs_version"; exit ;;
24899 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24900 debug=: ;;
24901 --file | --fil | --fi | --f )
6bae0ccf
DL
24902 $ac_shift
24903 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24904 ac_need_defaults=false;;
24905 --header | --heade | --head | --hea )
6bae0ccf
DL
24906 $ac_shift
24907 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24908 ac_need_defaults=false;;
ca81d7a0
JD
24909 --he | --h)
24910 # Conflict between --help and --header
24911 { echo "$as_me: error: ambiguous option: $1
24912Try \`$0 --help' for more information." >&2
24913 { (exit 1); exit 1; }; };;
24914 --help | --hel | -h )
24915 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24916 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24917 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24918 ac_cs_silent=: ;;
503d2be0
AS
24919
24920 # This is an error.
ca81d7a0
JD
24921 -*) { echo "$as_me: error: unrecognized option: $1
24922Try \`$0 --help' for more information." >&2
503d2be0
AS
24923 { (exit 1); exit 1; }; } ;;
24924
ca81d7a0
JD
24925 *) ac_config_targets="$ac_config_targets $1"
24926 ac_need_defaults=false ;;
503d2be0 24927
ba4481b5 24928 esac
503d2be0 24929 shift
ba4481b5
DL
24930done
24931
19650fd6
AS
24932ac_configure_extra_args=
24933
24934if $ac_cs_silent; then
24935 exec 6>/dev/null
24936 ac_configure_extra_args="$ac_configure_extra_args --silent"
24937fi
24938
24939_ACEOF
24940cat >>$CONFIG_STATUS <<_ACEOF
24941if \$ac_cs_recheck; then
ca81d7a0
JD
24942 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24943 CONFIG_SHELL=$SHELL
24944 export CONFIG_SHELL
24945 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24946fi
24947
503d2be0 24948_ACEOF
ca81d7a0
JD
24949cat >>$CONFIG_STATUS <<\_ACEOF
24950exec 5>>config.log
24951{
24952 echo
24953 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24954## Running $as_me. ##
24955_ASBOX
24956 echo "$ac_log"
24957} >&5
ba4481b5 24958
ca81d7a0 24959_ACEOF
c0d27fcc 24960cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24961#
ca81d7a0 24962# INIT-COMMANDS
503d2be0 24963#
8acdcf6f 24964GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 24965
c0d27fcc
MR
24966_ACEOF
24967
c0d27fcc 24968cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24969
24970# Handling of arguments.
503d2be0
AS
24971for ac_config_target in $ac_config_targets
24972do
ca81d7a0
JD
24973 case $ac_config_target in
24974 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24975 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24976 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24977 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24978 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24979 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24980 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24981 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24982 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24983 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24984 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24985 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24986 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24987
c0d27fcc 24988 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24989echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24990 { (exit 1); exit 1; }; };;
24991 esac
ba4481b5 24992done
503d2be0 24993
ca81d7a0 24994
503d2be0
AS
24995# If the user did not use the arguments to specify the items to instantiate,
24996# then the envvar interface is used. Set only those that are not.
24997# We use the long form for the default assignment because of an extremely
24998# bizarre bug on SunOS 4.1.3.
24999if $ac_need_defaults; then
25000 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25001 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25002 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25003fi
503d2be0 25004
19650fd6 25005# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25006# simply because there is no reason against having it here, and in addition,
19650fd6 25007# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25008# Hook for its removal unless debugging.
25009# Note that there is a small window in which the directory will not be cleaned:
25010# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25011$debug ||
25012{
ca81d7a0
JD
25013 tmp=
25014 trap 'exit_status=$?
25015 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25016' 0
503d2be0
AS
25017 trap '{ (exit 1); exit 1; }' 1 2 13 15
25018}
503d2be0 25019# Create a (secure) tmp directory for tmp files.
19650fd6 25020
503d2be0 25021{
ca81d7a0 25022 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25023 test -n "$tmp" && test -d "$tmp"
25024} ||
25025{
ca81d7a0
JD
25026 tmp=./conf$$-$RANDOM
25027 (umask 077 && mkdir "$tmp")
503d2be0
AS
25028} ||
25029{
19650fd6 25030 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25031 { (exit 1); exit 1; }
25032}
25033
503d2be0 25034#
ca81d7a0 25035# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
25036#
25037
25038# No need to generate the scripts if there are no CONFIG_FILES.
25039# This happens for instance when ./config.status config.h
ca81d7a0
JD
25040if test -n "$CONFIG_FILES"; then
25041
25042_ACEOF
25043
25044
25045
25046ac_delim='%!_!# '
25047for ac_last_try in false false false false false :; do
25048 cat >conf$$subs.sed <<_ACEOF
25049SHELL!$SHELL$ac_delim
25050PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25051PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25052PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25053PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25054PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25055PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25056exec_prefix!$exec_prefix$ac_delim
25057prefix!$prefix$ac_delim
25058program_transform_name!$program_transform_name$ac_delim
25059bindir!$bindir$ac_delim
25060sbindir!$sbindir$ac_delim
25061libexecdir!$libexecdir$ac_delim
25062datarootdir!$datarootdir$ac_delim
25063datadir!$datadir$ac_delim
25064sysconfdir!$sysconfdir$ac_delim
25065sharedstatedir!$sharedstatedir$ac_delim
25066localstatedir!$localstatedir$ac_delim
25067includedir!$includedir$ac_delim
25068oldincludedir!$oldincludedir$ac_delim
25069docdir!$docdir$ac_delim
25070infodir!$infodir$ac_delim
25071htmldir!$htmldir$ac_delim
25072dvidir!$dvidir$ac_delim
25073pdfdir!$pdfdir$ac_delim
25074psdir!$psdir$ac_delim
25075libdir!$libdir$ac_delim
25076localedir!$localedir$ac_delim
25077mandir!$mandir$ac_delim
25078DEFS!$DEFS$ac_delim
25079ECHO_C!$ECHO_C$ac_delim
25080ECHO_N!$ECHO_N$ac_delim
25081ECHO_T!$ECHO_T$ac_delim
25082LIBS!$LIBS$ac_delim
25083build_alias!$build_alias$ac_delim
25084host_alias!$host_alias$ac_delim
25085target_alias!$target_alias$ac_delim
25086MAINT!$MAINT$ac_delim
25087build!$build$ac_delim
25088build_cpu!$build_cpu$ac_delim
25089build_vendor!$build_vendor$ac_delim
25090build_os!$build_os$ac_delim
25091host!$host$ac_delim
25092host_cpu!$host_cpu$ac_delim
25093host_vendor!$host_vendor$ac_delim
25094host_os!$host_os$ac_delim
25095CC!$CC$ac_delim
25096CFLAGS!$CFLAGS$ac_delim
25097LDFLAGS!$LDFLAGS$ac_delim
25098CPPFLAGS!$CPPFLAGS$ac_delim
25099ac_ct_CC!$ac_ct_CC$ac_delim
25100EXEEXT!$EXEEXT$ac_delim
25101OBJEXT!$OBJEXT$ac_delim
25102CPP!$CPP$ac_delim
25103GREP!$GREP$ac_delim
25104EGREP!$EGREP$ac_delim
25105LN_S!$LN_S$ac_delim
25106INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25107INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25108INSTALL_DATA!$INSTALL_DATA$ac_delim
25109RANLIB!$RANLIB$ac_delim
25110INSTALL_INFO!$INSTALL_INFO$ac_delim
25111GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25112MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25113LIBSOUND!$LIBSOUND$ac_delim
25114PKG_CONFIG!$PKG_CONFIG$ac_delim
25115ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25116ALSA_LIBS!$ALSA_LIBS$ac_delim
25117CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25118SET_MAKE!$SET_MAKE$ac_delim
25119XMKMF!$XMKMF$ac_delim
cfe440b8 25120HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25121RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25122RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25123GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25124GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25125DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25126DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
25127XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25128XFT_LIBS!$XFT_LIBS$ac_delim
25129FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25130FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25131FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25132FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25133LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25134LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25135M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25136M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25137ALLOCA!$ALLOCA$ac_delim
25138liblockfile!$liblockfile$ac_delim
25139LIBOBJS!$LIBOBJS$ac_delim
25140NEED_SETGID!$NEED_SETGID$ac_delim
25141KMEM_GROUP!$KMEM_GROUP$ac_delim
25142GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25143GETOPT_H!$GETOPT_H$ac_delim
25144GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25145version!$version$ac_delim
ca81d7a0
JD
25146_ACEOF
25147
25148 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25149 break
25150 elif $ac_last_try; then
25151 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25152echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25153 { (exit 1); exit 1; }; }
25154 else
25155 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25156 fi
ca81d7a0
JD
25157done
25158
25159ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25160if test -n "$ac_eof"; then
25161 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25162 ac_eof=`expr $ac_eof + 1`
25163fi
503d2be0 25164
c0d27fcc 25165cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25166cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25167/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25168_ACEOF
25169sed '
25170s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25171s/^/s,@/; s/!/@,|#_!!_#|/
25172:n
25173t n
25174s/'"$ac_delim"'$/,g/; t
25175s/$/\\/; p
25176N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25177' >>$CONFIG_STATUS <conf$$subs.sed
25178rm -f conf$$subs.sed
25179cat >>$CONFIG_STATUS <<_ACEOF
25180CEOF$ac_eof
25181_ACEOF
503d2be0 25182
ca81d7a0
JD
25183
25184ac_delim='%!_!# '
25185for ac_last_try in false false false false false :; do
25186 cat >conf$$subs.sed <<_ACEOF
0bd50841 25187configuration!$configuration$ac_delim
7f0942ba
KH
25188canonical!$canonical$ac_delim
25189srcdir!$srcdir$ac_delim
1bb9a689
MB
25190lispdir!$lispdir$ac_delim
25191locallisppath!$locallisppath$ac_delim
25192lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25193x_default_search_path!$x_default_search_path$ac_delim
25194etcdir!$etcdir$ac_delim
25195archlibdir!$archlibdir$ac_delim
25196bitmapdir!$bitmapdir$ac_delim
25197gamedir!$gamedir$ac_delim
25198gameuser!$gameuser$ac_delim
25199c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25200c_switch_machine!$c_switch_machine$ac_delim
25201LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25202LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25203C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25204X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25205machfile!$machfile$ac_delim
25206opsysfile!$opsysfile$ac_delim
25207carbon_appdir!$carbon_appdir$ac_delim
edfda783 25208ns_appdir!$ns_appdir$ac_delim
facfbbbd 25209GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
ca81d7a0
JD
25210LTLIBOBJS!$LTLIBOBJS$ac_delim
25211_ACEOF
503d2be0 25212
facfbbbd 25213 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
c24fa7dc
MB
25214 break
25215 elif $ac_last_try; then
25216 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25217echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25218 { (exit 1); exit 1; }; }
25219 else
25220 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25221 fi
ca81d7a0
JD
25222done
25223
25224ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25225if test -n "$ac_eof"; then
25226 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25227 ac_eof=`expr $ac_eof + 1`
25228fi
ba4481b5 25229
ca81d7a0
JD
25230cat >>$CONFIG_STATUS <<_ACEOF
25231cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25232/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25233_ACEOF
25234sed '
25235s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25236s/^/s,@/; s/!/@,|#_!!_#|/
25237:n
25238t n
25239s/'"$ac_delim"'$/,g/; t
25240s/$/\\/; p
25241N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25242' >>$CONFIG_STATUS <conf$$subs.sed
25243rm -f conf$$subs.sed
25244cat >>$CONFIG_STATUS <<_ACEOF
25245:end
25246s/|#_!!_#|//g
25247CEOF$ac_eof
c0d27fcc 25248_ACEOF
ca81d7a0
JD
25249
25250
25251# VPATH may cause trouble with some makes, so we remove $(srcdir),
25252# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25253# trailing colons and then remove the whole line if VPATH becomes empty
25254# (actually we leave an empty line to preserve line numbers).
25255if test "x$srcdir" = x.; then
25256 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25257s/:*\$(srcdir):*/:/
25258s/:*\${srcdir}:*/:/
25259s/:*@srcdir@:*/:/
25260s/^\([^=]*=[ ]*\):*/\1/
25261s/:*$//
25262s/^[^=]*=[ ]*$//
25263}'
25264fi
25265
c0d27fcc 25266cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25267fi # test -n "$CONFIG_FILES"
25268
25269
25270for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25271do
25272 case $ac_tag in
25273 :[FHLC]) ac_mode=$ac_tag; continue;;
25274 esac
25275 case $ac_mode$ac_tag in
25276 :[FHL]*:*);;
25277 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25278echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25279 { (exit 1); exit 1; }; };;
25280 :[FH]-) ac_tag=-:-;;
25281 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25282 esac
25283 ac_save_IFS=$IFS
25284 IFS=:
25285 set x $ac_tag
25286 IFS=$ac_save_IFS
25287 shift
25288 ac_file=$1
25289 shift
25290
25291 case $ac_mode in
25292 :L) ac_source=$1;;
25293 :[FH])
25294 ac_file_inputs=
25295 for ac_f
25296 do
25297 case $ac_f in
25298 -) ac_f="$tmp/stdin";;
25299 *) # Look for the file first in the build tree, then in the source tree
25300 # (if the path is not absolute). The absolute path cannot be DOS-style,
25301 # because $ac_f cannot contain `:'.
25302 test -f "$ac_f" ||
25303 case $ac_f in
25304 [\\/$]*) false;;
25305 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25306 esac ||
25307 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25308echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25309 { (exit 1); exit 1; }; };;
25310 esac
25311 ac_file_inputs="$ac_file_inputs $ac_f"
25312 done
25313
25314 # Let's still pretend it is `configure' which instantiates (i.e., don't
25315 # use $as_me), people would be surprised to read:
25316 # /* config.h. Generated by config.status. */
25317 configure_input="Generated from "`IFS=:
25318 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25319 if test x"$ac_file" != x-; then
25320 configure_input="$ac_file. $configure_input"
25321 { echo "$as_me:$LINENO: creating $ac_file" >&5
25322echo "$as_me: creating $ac_file" >&6;}
25323 fi
25324
25325 case $ac_tag in
25326 *:-:* | *:-) cat >"$tmp/stdin";;
25327 esac
25328 ;;
ba4481b5
DL
25329 esac
25330
ca81d7a0 25331 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25332$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25333 X"$ac_file" : 'X\(//\)[^/]' \| \
25334 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25335 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25336echo X"$ac_file" |
ca81d7a0
JD
25337 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25338 s//\1/
25339 q
25340 }
25341 /^X\(\/\/\)[^/].*/{
25342 s//\1/
25343 q
25344 }
25345 /^X\(\/\/\)$/{
25346 s//\1/
25347 q
25348 }
25349 /^X\(\/\).*/{
25350 s//\1/
25351 q
25352 }
25353 s/.*/./; q'`
25354 { as_dir="$ac_dir"
25355 case $as_dir in #(
25356 -*) as_dir=./$as_dir;;
25357 esac
25358 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25359 as_dirs=
ca81d7a0
JD
25360 while :; do
25361 case $as_dir in #(
25362 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25363 *) as_qdir=$as_dir;;
25364 esac
25365 as_dirs="'$as_qdir' $as_dirs"
25366 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25367$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25368 X"$as_dir" : 'X\(//\)[^/]' \| \
25369 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25370 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25371echo X"$as_dir" |
ca81d7a0
JD
25372 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25373 s//\1/
25374 q
25375 }
25376 /^X\(\/\/\)[^/].*/{
25377 s//\1/
25378 q
25379 }
25380 /^X\(\/\/\)$/{
25381 s//\1/
25382 q
25383 }
25384 /^X\(\/\).*/{
25385 s//\1/
25386 q
25387 }
25388 s/.*/./; q'`
25389 test -d "$as_dir" && break
6bae0ccf 25390 done
ca81d7a0
JD
25391 test -z "$as_dirs" || eval "mkdir $as_dirs"
25392 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25393echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25394 { (exit 1); exit 1; }; }; }
c0d27fcc 25395 ac_builddir=.
98418dba 25396
ca81d7a0
JD
25397case "$ac_dir" in
25398.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25399*)
c0d27fcc 25400 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25401 # A ".." for each directory in $ac_dir_suffix.
25402 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25403 case $ac_top_builddir_sub in
25404 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25405 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25406 esac ;;
25407esac
25408ac_abs_top_builddir=$ac_pwd
25409ac_abs_builddir=$ac_pwd$ac_dir_suffix
25410# for backward compatibility:
25411ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25412
25413case $srcdir in
ca81d7a0 25414 .) # We are building in place.
c0d27fcc 25415 ac_srcdir=.
ca81d7a0
JD
25416 ac_top_srcdir=$ac_top_builddir_sub
25417 ac_abs_top_srcdir=$ac_pwd ;;
25418 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25419 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25420 ac_top_srcdir=$srcdir
25421 ac_abs_top_srcdir=$srcdir ;;
25422 *) # Relative name.
25423 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25424 ac_top_srcdir=$ac_top_build_prefix$srcdir
25425 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25426esac
ca81d7a0 25427ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25428
c0d27fcc 25429
ca81d7a0
JD
25430 case $ac_mode in
25431 :F)
25432 #
25433 # CONFIG_FILE
25434 #
ba4481b5 25435
503d2be0
AS
25436 case $INSTALL in
25437 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25438 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25439 esac
ca81d7a0 25440_ACEOF
ba4481b5 25441
ca81d7a0
JD
25442cat >>$CONFIG_STATUS <<\_ACEOF
25443# If the template does not know about datarootdir, expand it.
25444# FIXME: This hack should be removed a few years after 2.60.
25445ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25446
ca81d7a0
JD
25447case `sed -n '/datarootdir/ {
25448 p
25449 q
25450}
25451/@datadir@/p
25452/@docdir@/p
25453/@infodir@/p
25454/@localedir@/p
25455/@mandir@/p
25456' $ac_file_inputs` in
25457*datarootdir*) ac_datarootdir_seen=yes;;
25458*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25459 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25460echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25461_ACEOF
ca81d7a0
JD
25462cat >>$CONFIG_STATUS <<_ACEOF
25463 ac_datarootdir_hack='
25464 s&@datadir@&$datadir&g
25465 s&@docdir@&$docdir&g
25466 s&@infodir@&$infodir&g
25467 s&@localedir@&$localedir&g
25468 s&@mandir@&$mandir&g
25469 s&\\\${datarootdir}&$datarootdir&g' ;;
25470esac
c0d27fcc 25471_ACEOF
ca81d7a0
JD
25472
25473# Neutralize VPATH when `$srcdir' = `.'.
25474# Shell code in configure.ac might set extrasub.
25475# FIXME: do we really want to maintain this feature?
c0d27fcc 25476cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25477 sed "$ac_vpsub
25478$extrasub
c0d27fcc
MR
25479_ACEOF
25480cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25481:t
25482/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25483s&@configure_input@&$configure_input&;t t
25484s&@top_builddir@&$ac_top_builddir_sub&;t t
25485s&@srcdir@&$ac_srcdir&;t t
25486s&@abs_srcdir@&$ac_abs_srcdir&;t t
25487s&@top_srcdir@&$ac_top_srcdir&;t t
25488s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25489s&@builddir@&$ac_builddir&;t t
25490s&@abs_builddir@&$ac_abs_builddir&;t t
25491s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25492s&@INSTALL@&$ac_INSTALL&;t t
25493$ac_datarootdir_hack
25494" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25495
25496test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25497 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25498 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25499 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25500which seems to be undefined. Please make sure it is defined." >&5
25501echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25502which seems to be undefined. Please make sure it is defined." >&2;}
25503
25504 rm -f "$tmp/stdin"
503d2be0 25505 case $ac_file in
ca81d7a0
JD
25506 -) cat "$tmp/out"; rm -f "$tmp/out";;
25507 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25508 esac
ca81d7a0
JD
25509 ;;
25510 :H)
25511 #
25512 # CONFIG_HEADER
25513 #
25514_ACEOF
25515
25516# Transform confdefs.h into a sed script `conftest.defines', that
25517# substitutes the proper values into config.h.in to produce config.h.
25518rm -f conftest.defines conftest.tail
25519# First, append a space to every undef/define line, to ease matching.
25520echo 's/$/ /' >conftest.defines
25521# Then, protect against being on the right side of a sed subst, or in
25522# an unquoted here document, in config.status. If some macros were
25523# called several times there might be several #defines for the same
25524# symbol, which is useless. But do not sort them, since the last
25525# AC_DEFINE must be honored.
25526ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25527# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25528# NAME is the cpp macro being defined, VALUE is the value it is being given.
25529# PARAMS is the parameter list in the macro definition--in most cases, it's
25530# just an empty string.
25531ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25532ac_dB='\\)[ (].*,\\1define\\2'
25533ac_dC=' '
25534ac_dD=' ,'
25535
25536uniq confdefs.h |
25537 sed -n '
25538 t rset
25539 :rset
25540 s/^[ ]*#[ ]*define[ ][ ]*//
25541 t ok
25542 d
25543 :ok
25544 s/[\\&,]/\\&/g
25545 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25546 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25547 ' >>conftest.defines
25548
25549# Remove the space that was appended to ease matching.
25550# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25551# example, in the case of _POSIX_SOURCE, which is predefined and required
25552# on some systems where configure will not decide to define it.
ca81d7a0
JD
25553# (The regexp can be short, since the line contains either #define or #undef.)
25554echo 's/ $//
25555s,^[ #]*u.*,/* & */,' >>conftest.defines
25556
25557# Break up conftest.defines:
25558ac_max_sed_lines=50
25559
25560# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25561# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25562# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25563# et cetera.
25564ac_in='$ac_file_inputs'
25565ac_out='"$tmp/out1"'
25566ac_nxt='"$tmp/out2"'
25567
25568while :
503d2be0 25569do
ca81d7a0
JD
25570 # Write a here document:
25571 cat >>$CONFIG_STATUS <<_ACEOF
25572 # First, check the format of the line:
25573 cat >"\$tmp/defines.sed" <<\\CEOF
25574/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25575/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25576b
25577:def
25578_ACEOF
25579 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25580 echo 'CEOF
ca81d7a0
JD
25581 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25582 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25583 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25584 grep . conftest.tail >/dev/null || break
503d2be0
AS
25585 rm -f conftest.defines
25586 mv conftest.tail conftest.defines
25587done
ca81d7a0 25588rm -f conftest.defines conftest.tail
503d2be0 25589
ca81d7a0 25590echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25591cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25592 if test x"$ac_file" != x-; then
ca81d7a0
JD
25593 echo "/* $configure_input */" >"$tmp/config.h"
25594 cat "$ac_result" >>"$tmp/config.h"
25595 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25596 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25597echo "$as_me: $ac_file is unchanged" >&6;}
25598 else
503d2be0 25599 rm -f $ac_file
ca81d7a0 25600 mv "$tmp/config.h" $ac_file
ba4481b5 25601 fi
503d2be0 25602 else
ca81d7a0
JD
25603 echo "/* $configure_input */"
25604 cat "$ac_result"
ba4481b5 25605 fi
ca81d7a0
JD
25606 rm -f "$tmp/out12"
25607 ;;
edfaf76d 25608
ca81d7a0
JD
25609 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25610echo "$as_me: executing $ac_file commands" >&6;}
25611 ;;
25612 esac
ba4481b5 25613
c0d27fcc 25614
ca81d7a0
JD
25615 case $ac_file$ac_mode in
25616 "default":C)
ba4481b5
DL
25617
25618### Make the necessary directories, if they don't exist.
25619for dir in etc lisp ; do
25620 test -d ${dir} || mkdir ${dir}
25621done
25622
25623# Build src/Makefile from ${srcdir}/src/Makefile.c
25624# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25625# This must be done after src/config.h is built, since we rely on that file.
25626
ba4481b5 25627echo creating src/epaths.h
4aa6b955 25628${MAKE-make} epaths-force
ba4481b5 25629
1c203d4c
DL
25630# As of 2000-11-19, newest development versions of GNU cpp preprocess
25631# `..' to `. .' unless invoked with -traditional
25632
d0e9bfd2 25633if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25634 CPPFLAGS="$CPPFLAGS -traditional"
25635fi
25636
ba4481b5
DL
25637echo creating lib-src/Makefile
25638( cd lib-src
25639 rm -f junk.c junk1.c junk2.c
25640 sed -e '/start of cpp stuff/q' \
25641 < Makefile.c > junk1.c
25642 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25643 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25644 < Makefile.c > junk.c
8acdcf6f 25645 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25646 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25647 cat junk1.c junk2.c > Makefile.new
25648 rm -f junk.c junk1.c junk2.c
25649 chmod 444 Makefile.new
25650 mv -f Makefile.new Makefile
25651)
25652
25653echo creating src/Makefile
25654( cd src
25655 rm -f junk.c junk1.c junk2.c
25656 sed -e '/start of cpp stuff/q' \
25657 < Makefile.c > junk1.c
25658 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25659 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25660 < Makefile.c > junk.c
8acdcf6f 25661 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25662 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25663 cat junk1.c junk2.c > Makefile.new
25664 rm -f junk.c junk1.c junk2.c
25665 chmod 444 Makefile.new
25666 mv -f Makefile.new Makefile
25667)
25668
503d2be0 25669if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25670 echo creating src/.gdbinit
503d2be0 25671 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25672fi
25673
503d2be0 25674 ;;
ca81d7a0 25675
503d2be0 25676 esac
ca81d7a0 25677done # for ac_tag
503d2be0 25678
ba4481b5 25679
503d2be0 25680{ (exit 0); exit 0; }
c0d27fcc 25681_ACEOF
ba4481b5 25682chmod +x $CONFIG_STATUS
503d2be0
AS
25683ac_clean_files=$ac_clean_files_save
25684
c0d27fcc 25685
503d2be0
AS
25686# configure is writing to config.log, and then calls config.status.
25687# config.status does its own redirection, appending to config.log.
25688# Unfortunately, on DOS this fails, as config.log is still kept open
25689# by configure, so config.status won't be able to write to it; its
25690# output is simply discarded. So we exec the FD to /dev/null,
25691# effectively closing config.log, so it can be properly (re)opened and
25692# appended to by config.status. When coming back to configure, we
25693# need to make the FD available again.
25694if test "$no_create" != yes; then
25695 ac_cs_success=:
19650fd6
AS
25696 ac_config_status_args=
25697 test "$silent" = yes &&
25698 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25699 exec 5>/dev/null
19650fd6 25700 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25701 exec 5>>config.log
25702 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25703 # would make configure fail if this is the last instruction.
25704 $ac_cs_success || { (exit 1); exit 1; }
25705fi
f5f47add 25706
c0d27fcc 25707