(decode_coding_utf_8): Check byte_after_cr before breaking the loop.
[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
44e5501c
GM
697FONTCONFIG_CFLAGS
698FONTCONFIG_LIBS
c24fa7dc
MB
699XFT_CFLAGS
700XFT_LIBS
701FREETYPE_CFLAGS
702FREETYPE_LIBS
c24fa7dc
MB
703LIBOTF_CFLAGS
704LIBOTF_LIBS
7f0942ba
KH
705M17N_FLT_CFLAGS
706M17N_FLT_LIBS
c24fa7dc
MB
707ALLOCA
708liblockfile
709LIBOBJS
710NEED_SETGID
711KMEM_GROUP
712GETLOADAVG_LIBS
713GETOPT_H
714GETOPTOBJS
715version
716configuration
717canonical
718srcdir
719lispdir
720locallisppath
721lisppath
722x_default_search_path
723etcdir
724archlibdir
725bitmapdir
726gamedir
727gameuser
728c_switch_system
729c_switch_machine
730LD_SWITCH_X_SITE
731LD_SWITCH_X_SITE_AUX
732C_SWITCH_X_SITE
733X_TOOLKIT_TYPE
734machfile
735opsysfile
edfda783 736ns_appdir
06b62770
AR
737ns_appbindir
738ns_appresdir
739ns_appsrc
facfbbbd 740GNUSTEP_MAKEFILES
5e159d07
CY
741GNUSTEP_SYSTEM_HEADERS
742GNUSTEP_SYSTEM_LIBRARIES
48fad8e8
DN
743GNU_OBJC_CFLAGS
744LIB_SRC_EXTRA_INSTALLABLES
c24fa7dc 745LTLIBOBJS'
6bae0ccf 746ac_subst_files=''
ca81d7a0
JD
747 ac_precious_vars='build_alias
748host_alias
749target_alias
750CC
751CFLAGS
752LDFLAGS
f053c89f 753LIBS
ca81d7a0
JD
754CPPFLAGS
755CPP
756XMKMF'
757
c0d27fcc 758
ba4481b5 759# Initialize some variables set by options.
503d2be0
AS
760ac_init_help=
761ac_init_version=false
ba4481b5
DL
762# The variables have the same names as the options, with
763# dashes changed to underlines.
503d2be0 764cache_file=/dev/null
ba4481b5 765exec_prefix=NONE
ba4481b5 766no_create=
ba4481b5
DL
767no_recursion=
768prefix=NONE
769program_prefix=NONE
770program_suffix=NONE
771program_transform_name=s,x,x,
772silent=
773site=
774srcdir=
ba4481b5
DL
775verbose=
776x_includes=NONE
777x_libraries=NONE
503d2be0
AS
778
779# Installation directory options.
780# These are left unexpanded so users can "make install exec_prefix=/foo"
781# and all the variables that are supposed to be based on exec_prefix
782# by default will actually change.
783# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 784# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
785bindir='${exec_prefix}/bin'
786sbindir='${exec_prefix}/sbin'
787libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
788datarootdir='${prefix}/share'
789datadir='${datarootdir}'
ba4481b5
DL
790sysconfdir='${prefix}/etc'
791sharedstatedir='${prefix}/com'
792localstatedir='${prefix}/var'
ba4481b5
DL
793includedir='${prefix}/include'
794oldincludedir='/usr/include'
9cf8f393 795docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
796infodir='${datarootdir}/info'
797htmldir='${docdir}'
798dvidir='${docdir}'
799pdfdir='${docdir}'
800psdir='${docdir}'
801libdir='${exec_prefix}/lib'
802localedir='${datarootdir}/locale'
803mandir='${datarootdir}/man'
ba4481b5 804
ba4481b5 805ac_prev=
ca81d7a0 806ac_dashdash=
ba4481b5
DL
807for ac_option
808do
ba4481b5
DL
809 # If the previous option needs an argument, assign it.
810 if test -n "$ac_prev"; then
ca81d7a0 811 eval $ac_prev=\$ac_option
ba4481b5
DL
812 ac_prev=
813 continue
814 fi
815
ca81d7a0
JD
816 case $ac_option in
817 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
818 *) ac_optarg=yes ;;
819 esac
ba4481b5
DL
820
821 # Accept the important Cygnus configure options, so we can diagnose typos.
822
ca81d7a0
JD
823 case $ac_dashdash$ac_option in
824 --)
825 ac_dashdash=yes ;;
ba4481b5
DL
826
827 -bindir | --bindir | --bindi | --bind | --bin | --bi)
828 ac_prev=bindir ;;
829 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 830 bindir=$ac_optarg ;;
ba4481b5
DL
831
832 -build | --build | --buil | --bui | --bu)
503d2be0 833 ac_prev=build_alias ;;
ba4481b5 834 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 835 build_alias=$ac_optarg ;;
ba4481b5
DL
836
837 -cache-file | --cache-file | --cache-fil | --cache-fi \
838 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
839 ac_prev=cache_file ;;
840 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
841 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
842 cache_file=$ac_optarg ;;
843
844 --config-cache | -C)
845 cache_file=config.cache ;;
ba4481b5 846
ca81d7a0 847 -datadir | --datadir | --datadi | --datad)
ba4481b5 848 ac_prev=datadir ;;
ca81d7a0 849 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 850 datadir=$ac_optarg ;;
ba4481b5 851
ca81d7a0
JD
852 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
853 | --dataroo | --dataro | --datar)
854 ac_prev=datarootdir ;;
855 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
856 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
857 datarootdir=$ac_optarg ;;
858
ba4481b5 859 -disable-* | --disable-*)
503d2be0 860 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 861 # Reject names that are not valid shell variable names.
f053c89f 862 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
863 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
864 { (exit 1); exit 1; }; }
f053c89f 865 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
866 eval enable_$ac_feature=no ;;
867
868 -docdir | --docdir | --docdi | --doc | --do)
869 ac_prev=docdir ;;
870 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
871 docdir=$ac_optarg ;;
872
873 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
874 ac_prev=dvidir ;;
875 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
876 dvidir=$ac_optarg ;;
ba4481b5
DL
877
878 -enable-* | --enable-*)
503d2be0 879 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 880 # Reject names that are not valid shell variable names.
f053c89f 881 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
882 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
883 { (exit 1); exit 1; }; }
f053c89f 884 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 885 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
886
887 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
888 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
889 | --exec | --exe | --ex)
890 ac_prev=exec_prefix ;;
891 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
892 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
893 | --exec=* | --exe=* | --ex=*)
503d2be0 894 exec_prefix=$ac_optarg ;;
ba4481b5
DL
895
896 -gas | --gas | --ga | --g)
897 # Obsolete; use --with-gas.
898 with_gas=yes ;;
899
503d2be0
AS
900 -help | --help | --hel | --he | -h)
901 ac_init_help=long ;;
902 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
903 ac_init_help=recursive ;;
904 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
905 ac_init_help=short ;;
ba4481b5
DL
906
907 -host | --host | --hos | --ho)
503d2be0 908 ac_prev=host_alias ;;
ba4481b5 909 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 910 host_alias=$ac_optarg ;;
ba4481b5 911
ca81d7a0
JD
912 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
913 ac_prev=htmldir ;;
914 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
915 | --ht=*)
916 htmldir=$ac_optarg ;;
917
ba4481b5
DL
918 -includedir | --includedir | --includedi | --included | --include \
919 | --includ | --inclu | --incl | --inc)
920 ac_prev=includedir ;;
921 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
922 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 923 includedir=$ac_optarg ;;
ba4481b5
DL
924
925 -infodir | --infodir | --infodi | --infod | --info | --inf)
926 ac_prev=infodir ;;
927 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 928 infodir=$ac_optarg ;;
ba4481b5
DL
929
930 -libdir | --libdir | --libdi | --libd)
931 ac_prev=libdir ;;
932 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 933 libdir=$ac_optarg ;;
ba4481b5
DL
934
935 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
936 | --libexe | --libex | --libe)
937 ac_prev=libexecdir ;;
938 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
939 | --libexe=* | --libex=* | --libe=*)
503d2be0 940 libexecdir=$ac_optarg ;;
ba4481b5 941
ca81d7a0
JD
942 -localedir | --localedir | --localedi | --localed | --locale)
943 ac_prev=localedir ;;
944 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
945 localedir=$ac_optarg ;;
946
ba4481b5 947 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 948 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
949 ac_prev=localstatedir ;;
950 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 951 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 952 localstatedir=$ac_optarg ;;
ba4481b5
DL
953
954 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
955 ac_prev=mandir ;;
956 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 957 mandir=$ac_optarg ;;
ba4481b5
DL
958
959 -nfp | --nfp | --nf)
960 # Obsolete; use --without-fp.
961 with_fp=no ;;
962
963 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 964 | --no-cr | --no-c | -n)
ba4481b5
DL
965 no_create=yes ;;
966
967 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
968 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
969 no_recursion=yes ;;
970
971 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
972 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
973 | --oldin | --oldi | --old | --ol | --o)
974 ac_prev=oldincludedir ;;
975 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
976 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
977 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 978 oldincludedir=$ac_optarg ;;
ba4481b5
DL
979
980 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
981 ac_prev=prefix ;;
982 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 983 prefix=$ac_optarg ;;
ba4481b5
DL
984
985 -program-prefix | --program-prefix | --program-prefi | --program-pref \
986 | --program-pre | --program-pr | --program-p)
987 ac_prev=program_prefix ;;
988 -program-prefix=* | --program-prefix=* | --program-prefi=* \
989 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 990 program_prefix=$ac_optarg ;;
ba4481b5
DL
991
992 -program-suffix | --program-suffix | --program-suffi | --program-suff \
993 | --program-suf | --program-su | --program-s)
994 ac_prev=program_suffix ;;
995 -program-suffix=* | --program-suffix=* | --program-suffi=* \
996 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 997 program_suffix=$ac_optarg ;;
ba4481b5
DL
998
999 -program-transform-name | --program-transform-name \
1000 | --program-transform-nam | --program-transform-na \
1001 | --program-transform-n | --program-transform- \
1002 | --program-transform | --program-transfor \
1003 | --program-transfo | --program-transf \
1004 | --program-trans | --program-tran \
1005 | --progr-tra | --program-tr | --program-t)
1006 ac_prev=program_transform_name ;;
1007 -program-transform-name=* | --program-transform-name=* \
1008 | --program-transform-nam=* | --program-transform-na=* \
1009 | --program-transform-n=* | --program-transform-=* \
1010 | --program-transform=* | --program-transfor=* \
1011 | --program-transfo=* | --program-transf=* \
1012 | --program-trans=* | --program-tran=* \
1013 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1014 program_transform_name=$ac_optarg ;;
ba4481b5 1015
ca81d7a0
JD
1016 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1017 ac_prev=pdfdir ;;
1018 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1019 pdfdir=$ac_optarg ;;
1020
1021 -psdir | --psdir | --psdi | --psd | --ps)
1022 ac_prev=psdir ;;
1023 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1024 psdir=$ac_optarg ;;
1025
ba4481b5
DL
1026 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1027 | -silent | --silent | --silen | --sile | --sil)
1028 silent=yes ;;
1029
1030 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1031 ac_prev=sbindir ;;
1032 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1033 | --sbi=* | --sb=*)
503d2be0 1034 sbindir=$ac_optarg ;;
ba4481b5
DL
1035
1036 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1037 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1038 | --sharedst | --shareds | --shared | --share | --shar \
1039 | --sha | --sh)
1040 ac_prev=sharedstatedir ;;
1041 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1042 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1043 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1044 | --sha=* | --sh=*)
503d2be0 1045 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1046
1047 -site | --site | --sit)
1048 ac_prev=site ;;
1049 -site=* | --site=* | --sit=*)
503d2be0 1050 site=$ac_optarg ;;
ba4481b5
DL
1051
1052 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1053 ac_prev=srcdir ;;
1054 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1055 srcdir=$ac_optarg ;;
ba4481b5
DL
1056
1057 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1058 | --syscon | --sysco | --sysc | --sys | --sy)
1059 ac_prev=sysconfdir ;;
1060 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1061 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1062 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1063
1064 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1065 ac_prev=target_alias ;;
ba4481b5 1066 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1067 target_alias=$ac_optarg ;;
ba4481b5
DL
1068
1069 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1070 verbose=yes ;;
1071
503d2be0
AS
1072 -version | --version | --versio | --versi | --vers | -V)
1073 ac_init_version=: ;;
ba4481b5
DL
1074
1075 -with-* | --with-*)
503d2be0 1076 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1077 # Reject names that are not valid shell variable names.
f053c89f 1078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
f053c89f 1081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1082 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1083
1084 -without-* | --without-*)
503d2be0 1085 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1086 # Reject names that are not valid shell variable names.
f053c89f 1087 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1088 { echo "$as_me: error: invalid package name: $ac_package" >&2
1089 { (exit 1); exit 1; }; }
f053c89f 1090 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1091 eval with_$ac_package=no ;;
ba4481b5
DL
1092
1093 --x)
1094 # Obsolete; use --with-x.
1095 with_x=yes ;;
1096
1097 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1098 | --x-incl | --x-inc | --x-in | --x-i)
1099 ac_prev=x_includes ;;
1100 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1101 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1102 x_includes=$ac_optarg ;;
ba4481b5
DL
1103
1104 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1105 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1106 ac_prev=x_libraries ;;
1107 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1108 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1109 x_libraries=$ac_optarg ;;
ba4481b5 1110
503d2be0
AS
1111 -*) { echo "$as_me: error: unrecognized option: $ac_option
1112Try \`$0 --help' for more information." >&2
1113 { (exit 1); exit 1; }; }
ba4481b5
DL
1114 ;;
1115
503d2be0
AS
1116 *=*)
1117 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1118 # Reject names that are not valid shell variable names.
1119 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1120 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1121 { (exit 1); exit 1; }; }
ca81d7a0 1122 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1123 export $ac_envvar ;;
1124
ba4481b5 1125 *)
503d2be0
AS
1126 # FIXME: should be removed in autoconf 3.0.
1127 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1128 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1129 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1130 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1131 ;;
1132
1133 esac
1134done
1135
1136if test -n "$ac_prev"; then
503d2be0
AS
1137 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1138 { echo "$as_me: error: missing argument to $ac_option" >&2
1139 { (exit 1); exit 1; }; }
ba4481b5 1140fi
ba4481b5 1141
ca81d7a0
JD
1142# Be sure to have absolute directory names.
1143for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1144 datadir sysconfdir sharedstatedir localstatedir includedir \
1145 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1146 libdir localedir mandir
ba4481b5 1147do
ca81d7a0 1148 eval ac_val=\$$ac_var
503d2be0 1149 case $ac_val in
ca81d7a0
JD
1150 [\\/$]* | ?:[\\/]* ) continue;;
1151 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1152 esac
ca81d7a0
JD
1153 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1154 { (exit 1); exit 1; }; }
ba4481b5
DL
1155done
1156
503d2be0
AS
1157# There might be people who depend on the old broken behavior: `$host'
1158# used to hold the argument of --host etc.
c0d27fcc 1159# FIXME: To remove some day.
503d2be0
AS
1160build=$build_alias
1161host=$host_alias
1162target=$target_alias
1163
c0d27fcc 1164# FIXME: To remove some day.
503d2be0
AS
1165if test "x$host_alias" != x; then
1166 if test "x$build_alias" = x; then
1167 cross_compiling=maybe
1168 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1169 If a cross compiler is detected then cross compile mode will be used." >&2
1170 elif test "x$build_alias" != "x$host_alias"; then
1171 cross_compiling=yes
1172 fi
1173fi
ba4481b5 1174
503d2be0
AS
1175ac_tool_prefix=
1176test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1177
503d2be0 1178test "$silent" = yes && exec 6>/dev/null
ba4481b5 1179
c0d27fcc 1180
ca81d7a0
JD
1181ac_pwd=`pwd` && test -n "$ac_pwd" &&
1182ac_ls_di=`ls -di .` &&
1183ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1184 { echo "$as_me: error: Working directory cannot be determined" >&2
1185 { (exit 1); exit 1; }; }
1186test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1187 { echo "$as_me: error: pwd does not report name of working directory" >&2
1188 { (exit 1); exit 1; }; }
1189
1190
ba4481b5
DL
1191# Find the source files, if location was not specified.
1192if test -z "$srcdir"; then
1193 ac_srcdir_defaulted=yes
ca81d7a0
JD
1194 # Try the directory containing this script, then the parent directory.
1195 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1196$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1197 X"$0" : 'X\(//\)[^/]' \| \
1198 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1199 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1200echo X"$0" |
ca81d7a0
JD
1201 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\/\)[^/].*/{
1206 s//\1/
1207 q
1208 }
1209 /^X\(\/\/\)$/{
1210 s//\1/
1211 q
1212 }
1213 /^X\(\/\).*/{
1214 s//\1/
1215 q
1216 }
1217 s/.*/./; q'`
ba4481b5 1218 srcdir=$ac_confdir
ca81d7a0 1219 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1220 srcdir=..
1221 fi
1222else
1223 ac_srcdir_defaulted=no
1224fi
ca81d7a0
JD
1225if test ! -r "$srcdir/$ac_unique_file"; then
1226 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1227 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1228 { (exit 1); exit 1; }; }
ba4481b5 1229fi
ca81d7a0
JD
1230ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1231ac_abs_confdir=`(
1232 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1233 { (exit 1); exit 1; }; }
ca81d7a0
JD
1234 pwd)`
1235# When building in place, set srcdir=.
1236if test "$ac_abs_confdir" = "$ac_pwd"; then
1237 srcdir=.
1238fi
1239# Remove unnecessary trailing slashes from srcdir.
1240# Double slashes in file names in object file debugging info
1241# mess up M-x gdb in Emacs.
1242case $srcdir in
1243*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1244esac
1245for ac_var in $ac_precious_vars; do
1246 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1247 eval ac_env_${ac_var}_value=\$${ac_var}
1248 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1249 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1250done
503d2be0
AS
1251
1252#
1253# Report the --help message.
1254#
1255if test "$ac_init_help" = "long"; then
1256 # Omit some internal or obsolete options to make the list less imposing.
1257 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1258 cat <<_ACEOF
5d374ce1 1259\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1260
1261Usage: $0 [OPTION]... [VAR=VALUE]...
1262
1263To assign environment variables (e.g., CC, CFLAGS...), specify them as
1264VAR=VALUE. See below for descriptions of some of the useful variables.
1265
1266Defaults for the options are specified in brackets.
1267
1268Configuration:
1269 -h, --help display this help and exit
1270 --help=short display options specific to this package
1271 --help=recursive display the short help of all the included packages
1272 -V, --version display version information and exit
1273 -q, --quiet, --silent do not print \`checking...' messages
1274 --cache-file=FILE cache test results in FILE [disabled]
1275 -C, --config-cache alias for \`--cache-file=config.cache'
1276 -n, --no-create do not create output files
1277 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1278
503d2be0
AS
1279Installation directories:
1280 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1281 [$ac_default_prefix]
503d2be0 1282 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1283 [PREFIX]
503d2be0
AS
1284
1285By default, \`make install' will install all the files in
1286\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1287an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1288for instance \`--prefix=\$HOME'.
1289
1290For better control, use the options below.
1291
1292Fine tuning of the installation directories:
1293 --bindir=DIR user executables [EPREFIX/bin]
1294 --sbindir=DIR system admin executables [EPREFIX/sbin]
1295 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1296 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1297 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1298 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1299 --libdir=DIR object code libraries [EPREFIX/lib]
1300 --includedir=DIR C header files [PREFIX/include]
1301 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1302 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1303 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1304 --infodir=DIR info documentation [DATAROOTDIR/info]
1305 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1306 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1307 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1308 --htmldir=DIR html documentation [DOCDIR]
1309 --dvidir=DIR dvi documentation [DOCDIR]
1310 --pdfdir=DIR pdf documentation [DOCDIR]
1311 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1312_ACEOF
503d2be0 1313
c0d27fcc 1314 cat <<\_ACEOF
503d2be0 1315
ba5da88a
PJ
1316Program names:
1317 --program-prefix=PREFIX prepend PREFIX to installed program names
1318 --program-suffix=SUFFIX append SUFFIX to installed program names
1319 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1320
503d2be0
AS
1321X features:
1322 --x-includes=DIR X include files are in DIR
1323 --x-libraries=DIR X library files are in DIR
1324
1325System types:
1326 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1327 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1328_ACEOF
503d2be0
AS
1329fi
1330
1331if test -n "$ac_init_help"; then
9cf8f393 1332 case $ac_init_help in
5d374ce1 1333 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1334 esac
c0d27fcc 1335 cat <<\_ACEOF
503d2be0
AS
1336
1337Optional Features:
1338 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1339 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1340 --enable-cocoa-experimental-ctrl-g
1341 enable experimental improved ctrl-g recognition
1342 --disable-ns-self-contained
1343 disable self contained build under NeXTstep
d0098f13 1344 --enable-asserts compile code with asserts enabled
709e90de
AS
1345 --enable-maintainer-mode
1346 enable make rules and dependencies not useful (and
1347 sometimes confusing) to the casual installer
9adfabc2
LK
1348 --enable-locallisppath=PATH
1349 directories Emacs should search for lisp files
1350 specific to this site
503d2be0
AS
1351 --disable-largefile omit support for large files
1352
1353Optional Packages:
1354 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1355 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1356 --without-pop don't support POP mail retrieval with movemail
1357 --with-kerberos support Kerberos-authenticated POP
1358 --with-kerberos5 support Kerberos version 5 authenticated POP
1359 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1360 --without-sound don't compile with sound support
ecd43cb9 1361 --without-sync-input process async input synchronously
49adb60f
TTN
1362 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1363 motif, gtk, no)
c8467c40
GM
1364 --without-xpm don't compile with XPM image support
1365 --without-jpeg don't compile with JPEG image support
1366 --without-tiff don't compile with TIFF image support
1367 --without-gif don't compile with GIF image support
1368 --without-png don't compile with PNG image support
1369 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1370 --without-freetype don't use Freetype for local font support
1371 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1372 --without-libotf don't use libotf for OpenType font support
1373 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1374 --without-toolkit-scroll-bars
cc227489 1375 don't use Motif or Xaw3d scroll bars
c982cf7d 1376 --without-xaw3d don't use Xaw3d
cc227489 1377 --without-xim don't use X11 XIM
edfda783 1378 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1379 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1380 console
b5a922de 1381 --without-dbus don't compile with D-Bus support
921fbdf0 1382 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1383
00b9c927 1384 --with-pkg-config-prog=PATH
ecd43cb9
GM
1385 path to pkg-config for finding GTK and librsvg
1386 --with-gnustep-conf=PATH
1387 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1388 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1389 --with-x use the X Window System
1390
1391Some influential environment variables:
1392 CC C compiler command
1393 CFLAGS C compiler flags
1394 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1395 nonstandard directory <lib dir>
f053c89f 1396 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1397 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1398 you have headers in a nonstandard directory <include dir>
503d2be0 1399 CPP C preprocessor
ca81d7a0 1400 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1401
1402Use these variables to override the choices made by `configure' or to help
1403it to find libraries and programs with nonstandard names/locations.
1404
c0d27fcc 1405_ACEOF
ca81d7a0 1406ac_status=$?
503d2be0
AS
1407fi
1408
1409if test "$ac_init_help" = "recursive"; then
1410 # If there are subdirs, report their specific --help.
c0d27fcc 1411 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1412 test -d "$ac_dir" || continue
c0d27fcc
MR
1413 ac_builddir=.
1414
ca81d7a0
JD
1415case "$ac_dir" in
1416.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1417*)
c0d27fcc 1418 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1419 # A ".." for each directory in $ac_dir_suffix.
1420 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1421 case $ac_top_builddir_sub in
1422 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1423 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1424 esac ;;
1425esac
1426ac_abs_top_builddir=$ac_pwd
1427ac_abs_builddir=$ac_pwd$ac_dir_suffix
1428# for backward compatibility:
1429ac_top_builddir=$ac_top_build_prefix
503d2be0 1430
c0d27fcc 1431case $srcdir in
ca81d7a0 1432 .) # We are building in place.
c0d27fcc 1433 ac_srcdir=.
ca81d7a0
JD
1434 ac_top_srcdir=$ac_top_builddir_sub
1435 ac_abs_top_srcdir=$ac_pwd ;;
1436 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1437 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1438 ac_top_srcdir=$srcdir
1439 ac_abs_top_srcdir=$srcdir ;;
1440 *) # Relative name.
1441 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1442 ac_top_srcdir=$ac_top_build_prefix$srcdir
1443 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1444esac
ca81d7a0
JD
1445ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1446
1447 cd "$ac_dir" || { ac_status=$?; continue; }
1448 # Check for guested configure.
1449 if test -f "$ac_srcdir/configure.gnu"; then
1450 echo &&
1451 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1452 elif test -f "$ac_srcdir/configure"; then
1453 echo &&
1454 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1455 else
c0d27fcc 1456 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1457 fi || ac_status=$?
1458 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1459 done
1460fi
1461
ca81d7a0 1462test -n "$ac_init_help" && exit $ac_status
503d2be0 1463if $ac_init_version; then
c0d27fcc 1464 cat <<\_ACEOF
5d374ce1 1465emacs configure 23.0.60
f053c89f 1466generated by GNU Autoconf 2.61
503d2be0 1467
ca81d7a0
JD
1468Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14692002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1470This configure script is free software; the Free Software Foundation
1471gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1472_ACEOF
ca81d7a0 1473 exit
503d2be0 1474fi
ca81d7a0 1475cat >config.log <<_ACEOF
503d2be0
AS
1476This file contains any messages produced by compilers while
1477running configure, to aid debugging if configure makes a mistake.
1478
5d374ce1 1479It was created by emacs $as_me 23.0.60, which was
f053c89f 1480generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1481
1482 $ $0 $@
1483
c0d27fcc 1484_ACEOF
ca81d7a0 1485exec 5>>config.log
503d2be0
AS
1486{
1487cat <<_ASUNAME
c0d27fcc
MR
1488## --------- ##
1489## Platform. ##
1490## --------- ##
503d2be0
AS
1491
1492hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1493uname -m = `(uname -m) 2>/dev/null || echo unknown`
1494uname -r = `(uname -r) 2>/dev/null || echo unknown`
1495uname -s = `(uname -s) 2>/dev/null || echo unknown`
1496uname -v = `(uname -v) 2>/dev/null || echo unknown`
1497
1498/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1499/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1500
1501/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1502/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1503/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1504/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1505/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1506/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1507/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1508
925c2f3f 1509_ASUNAME
c0d27fcc
MR
1510
1511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1512for as_dir in $PATH
1513do
1514 IFS=$as_save_IFS
1515 test -z "$as_dir" && as_dir=.
1516 echo "PATH: $as_dir"
1517done
ca81d7a0 1518IFS=$as_save_IFS
c0d27fcc 1519
503d2be0
AS
1520} >&5
1521
c0d27fcc
MR
1522cat >&5 <<_ACEOF
1523
1524
1525## ----------- ##
1526## Core tests. ##
1527## ----------- ##
1528
1529_ACEOF
503d2be0 1530
503d2be0
AS
1531
1532# Keep a trace of the command line.
1533# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1534# Strip out --silent because we don't want to record it for future runs.
503d2be0 1535# Also quote any args containing shell meta-characters.
19650fd6 1536# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1537ac_configure_args=
19650fd6
AS
1538ac_configure_args0=
1539ac_configure_args1=
19650fd6
AS
1540ac_must_keep_next=false
1541for ac_pass in 1 2
503d2be0 1542do
19650fd6
AS
1543 for ac_arg
1544 do
1545 case $ac_arg in
1546 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1547 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1548 | -silent | --silent | --silen | --sile | --sil)
1549 continue ;;
ca81d7a0 1550 *\'*)
19650fd6
AS
1551 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1552 esac
1553 case $ac_pass in
1554 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1555 2)
1556 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1557 if test $ac_must_keep_next = true; then
edfaf76d 1558 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1559 else
edfaf76d
LK
1560 case $ac_arg in
1561 *=* | --config-cache | -C | -disable-* | --disable-* \
1562 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1563 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1564 | -with-* | --with-* | -without-* | --without-* | --x)
1565 case "$ac_configure_args0 " in
1566 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1567 esac
1568 ;;
1569 -* ) ac_must_keep_next=true ;;
1570 esac
19650fd6 1571 fi
ca81d7a0 1572 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1573 ;;
1574 esac
1575 done
503d2be0 1576done
19650fd6
AS
1577$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1578$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1579
1580# When interrupted or exit'd, cleanup temporary files, and complete
1581# config.log. We remove comments because anyway the quotes in there
1582# would cause problems or look ugly.
ca81d7a0
JD
1583# WARNING: Use '\'' to represent an apostrophe within the trap.
1584# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1585trap 'exit_status=$?
1586 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1587 {
1588 echo
6bae0ccf 1589
c0d27fcc
MR
1590 cat <<\_ASBOX
1591## ---------------- ##
1592## Cache variables. ##
1593## ---------------- ##
1594_ASBOX
1595 echo
1596 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1597(
1598 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1599 eval ac_val=\$$ac_var
1600 case $ac_val in #(
1601 *${as_nl}*)
1602 case $ac_var in #(
1603 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1604echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1605 esac
1606 case $ac_var in #(
1607 _ | IFS | as_nl) ;; #(
1608 *) $as_unset $ac_var ;;
1609 esac ;;
1610 esac
1611 done
503d2be0 1612 (set) 2>&1 |
ca81d7a0
JD
1613 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1614 *${as_nl}ac_space=\ *)
503d2be0 1615 sed -n \
ca81d7a0
JD
1616 "s/'\''/'\''\\\\'\'''\''/g;
1617 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1618 ;; #(
503d2be0 1619 *)
ca81d7a0 1620 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1621 ;;
ca81d7a0
JD
1622 esac |
1623 sort
1624)
c0d27fcc 1625 echo
6bae0ccf
DL
1626
1627 cat <<\_ASBOX
1628## ----------------- ##
1629## Output variables. ##
1630## ----------------- ##
1631_ASBOX
1632 echo
1633 for ac_var in $ac_subst_vars
1634 do
ca81d7a0
JD
1635 eval ac_val=\$$ac_var
1636 case $ac_val in
1637 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1638 esac
1639 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1640 done | sort
1641 echo
1642
1643 if test -n "$ac_subst_files"; then
1644 cat <<\_ASBOX
ca81d7a0
JD
1645## ------------------- ##
1646## File substitutions. ##
1647## ------------------- ##
6bae0ccf
DL
1648_ASBOX
1649 echo
1650 for ac_var in $ac_subst_files
1651 do
ca81d7a0
JD
1652 eval ac_val=\$$ac_var
1653 case $ac_val in
1654 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1655 esac
1656 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1657 done | sort
1658 echo
1659 fi
1660
c0d27fcc
MR
1661 if test -s confdefs.h; then
1662 cat <<\_ASBOX
1663## ----------- ##
1664## confdefs.h. ##
1665## ----------- ##
1666_ASBOX
1667 echo
ca81d7a0 1668 cat confdefs.h
c0d27fcc
MR
1669 echo
1670 fi
1671 test "$ac_signal" != 0 &&
1672 echo "$as_me: caught signal $ac_signal"
1673 echo "$as_me: exit $exit_status"
1674 } >&5
ca81d7a0
JD
1675 rm -f core *.core core.conftest.* &&
1676 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1677 exit $exit_status
ca81d7a0 1678' 0
503d2be0
AS
1679for ac_signal in 1 2 13 15; do
1680 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1681done
1682ac_signal=0
1683
1684# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1685rm -f -r conftest* confdefs.h
ba4481b5 1686
c0d27fcc
MR
1687# Predefined preprocessor variables.
1688
1689cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_NAME "$PACKAGE_NAME"
1691_ACEOF
1692
1693
1694cat >>confdefs.h <<_ACEOF
1695#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1696_ACEOF
1697
1698
1699cat >>confdefs.h <<_ACEOF
1700#define PACKAGE_VERSION "$PACKAGE_VERSION"
1701_ACEOF
1702
1703
1704cat >>confdefs.h <<_ACEOF
1705#define PACKAGE_STRING "$PACKAGE_STRING"
1706_ACEOF
1707
1708
1709cat >>confdefs.h <<_ACEOF
1710#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1711_ACEOF
1712
1713
503d2be0 1714# Let the site file select an alternate cache file if it wants to.
ba4481b5 1715# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1716if test -n "$CONFIG_SITE"; then
1717 set x "$CONFIG_SITE"
1718elif test "x$prefix" != xNONE; then
1719 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1720else
1721 set x "$ac_default_prefix/share/config.site" \
1722 "$ac_default_prefix/etc/config.site"
ba4481b5 1723fi
ca81d7a0
JD
1724shift
1725for ac_site_file
1726do
ba4481b5 1727 if test -r "$ac_site_file"; then
c0d27fcc 1728 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1729echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1730 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1731 . "$ac_site_file"
1732 fi
1733done
1734
1735if test -r "$cache_file"; then
503d2be0
AS
1736 # Some versions of bash will fail to source /dev/null (special
1737 # files actually), so we avoid doing that.
1738 if test -f "$cache_file"; then
c0d27fcc 1739 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1740echo "$as_me: loading cache $cache_file" >&6;}
1741 case $cache_file in
ca81d7a0
JD
1742 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1743 *) . "./$cache_file";;
503d2be0
AS
1744 esac
1745 fi
ba4481b5 1746else
c0d27fcc 1747 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1748echo "$as_me: creating cache $cache_file" >&6;}
1749 >$cache_file
1750fi
1751
f053c89f
CY
1752ac_header_list="$ac_header_list sys/time.h"
1753ac_header_list="$ac_header_list unistd.h"
1754ac_func_list="$ac_func_list alarm"
503d2be0
AS
1755# Check that the precious variables saved in the cache have kept the same
1756# value.
1757ac_cache_corrupted=false
ca81d7a0 1758for ac_var in $ac_precious_vars; do
503d2be0
AS
1759 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1760 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1761 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1762 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1763 case $ac_old_set,$ac_new_set in
1764 set,)
c0d27fcc 1765 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1766echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1767 ac_cache_corrupted=: ;;
1768 ,set)
c0d27fcc 1769 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1770echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1771 ac_cache_corrupted=: ;;
1772 ,);;
1773 *)
1774 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1775 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1776echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1777 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1778echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1779 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1780echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1781 ac_cache_corrupted=:
503d2be0
AS
1782 fi;;
1783 esac
c0d27fcc 1784 # Pass precious variables to config.status.
503d2be0
AS
1785 if test "$ac_new_set" = set; then
1786 case $ac_new_val in
ca81d7a0 1787 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1788 *) ac_arg=$ac_var=$ac_new_val ;;
1789 esac
1790 case " $ac_configure_args " in
1791 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1792 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1793 esac
1794 fi
1795done
1796if $ac_cache_corrupted; then
c0d27fcc 1797 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1798echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1799 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1800echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1801 { (exit 1); exit 1; }; }
ba4481b5
DL
1802fi
1803
c0d27fcc
MR
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
9cf8f393
JD
1815
1816
1817
1818
1819
1820
1821
1822
c0d27fcc
MR
1823
1824
1825
1826
1827
ca81d7a0
JD
1828ac_ext=c
1829ac_cpp='$CPP $CPPFLAGS'
1830ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1831ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1832ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1833
6bae0ccf 1834
ca81d7a0 1835ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1836
c0d27fcc 1837
9fb1ba80 1838
ba5da88a 1839test "$program_prefix" != NONE &&
ca81d7a0 1840 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1841# Use a double $ so make ignores it.
1842test "$program_suffix" != NONE &&
ca81d7a0 1843 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1844# Double any \ or $. echo might interpret backslashes.
1845# By default was `s,x,x', remove it if useless.
1846cat <<\_ACEOF >conftest.sed
1847s/[\\$]/&&/g;s/;s,x,x,$//
1848_ACEOF
1849program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1850rm -f conftest.sed
ba5da88a 1851
c0d27fcc 1852
ba4481b5
DL
1853lispdir='${datadir}/emacs/${version}/lisp'
1854locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1855'${datadir}/emacs/site-lisp'
1856lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1857etcdir='${datadir}/emacs/${version}/etc'
1858archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1859docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1860gamedir='${localstatedir}/games/emacs'
98418dba
CW
1861
1862gameuser=games
1863
c0d27fcc 1864
49adb60f 1865
00b9c927 1866
ca81d7a0 1867# Check whether --with-pop was given.
ba4481b5 1868if test "${with_pop+set}" = set; then
00b9c927 1869 withval=$with_pop;
3d9fec71 1870else
00b9c927
MO
1871 with_pop=yes
1872fi
1873
1874if test "$with_pop" = yes; then
1875 cat >>confdefs.h <<\_ACEOF
3d9fec71 1876#define MAIL_USE_POP 1
c0d27fcc 1877_ACEOF
3d9fec71 1878
ca81d7a0 1879fi
ba4481b5 1880
c0d27fcc 1881
c0d27fcc 1882
ca81d7a0 1883# Check whether --with-kerberos was given.
a21616bd 1884if test "${with_kerberos+set}" = set; then
00b9c927
MO
1885 withval=$with_kerberos;
1886else
1887 with_kerberos=no
1888fi
1889
ff1095d1 1890if test "$with_kerberos" != no; then
54e6585f 1891 cat >>confdefs.h <<\_ACEOF
a21616bd 1892#define KERBEROS 1
c0d27fcc 1893_ACEOF
a21616bd 1894
ca81d7a0 1895fi
c0d27fcc 1896
c0d27fcc 1897
49adb60f 1898
ca81d7a0 1899# Check whether --with-kerberos5 was given.
a21616bd 1900if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1901 withval=$with_kerberos5;
1902else
1903 with_kerberos5=no
1904fi
1905
ff1095d1
AR
1906if test "${with_kerberos5}" != no; then
1907 if test "${with_kerberos}" = no; then
a21616bd 1908 with_kerberos=yes
c0d27fcc 1909 cat >>confdefs.h <<\_ACEOF
a21616bd 1910#define KERBEROS 1
c0d27fcc 1911_ACEOF
a21616bd
KR
1912
1913 fi
b936fae4 1914
c0d27fcc 1915cat >>confdefs.h <<\_ACEOF
a21616bd 1916#define KERBEROS5 1
c0d27fcc 1917_ACEOF
a21616bd 1918
ca81d7a0 1919fi
b936fae4 1920
49adb60f 1921
ca81d7a0
JD
1922# Check whether --with-hesiod was given.
1923if test "${with_hesiod+set}" = set; then
00b9c927
MO
1924 withval=$with_hesiod;
1925else
1926 with_hesiod=no
1927fi
1928
ff1095d1 1929if test "$with_hesiod" != no; then
54e6585f 1930
c0d27fcc 1931cat >>confdefs.h <<\_ACEOF
ba4481b5 1932#define HESIOD 1
c0d27fcc 1933_ACEOF
ba4481b5 1934
ca81d7a0 1935fi
c0d27fcc 1936
c0d27fcc 1937
ca81d7a0 1938# Check whether --with-sound was given.
2c9dccc9 1939if test "${with_sound+set}" = set; then
ca81d7a0 1940 withval=$with_sound;
00b9c927
MO
1941else
1942 with_sound=yes
ca81d7a0 1943fi
2c9dccc9 1944
2c9dccc9 1945
c0d27fcc 1946
a51f4969
SM
1947# Check whether --with-sync-input was given.
1948if test "${with_sync_input+set}" = set; then
1949 withval=$with_sync_input;
1950else
1951 with_sync_input=yes
1952fi
1953
1954if test "$with_sync_input" = yes; then
1955
1956cat >>confdefs.h <<\_ACEOF
1957#define SYNC_INPUT 1
1958_ACEOF
1959
1960fi
1961
1962
ca81d7a0 1963# Check whether --with-x-toolkit was given.
ba4481b5 1964if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1965 withval=$with_x_toolkit; case "${withval}" in
089a966d 1966 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1967 n | no ) val=no ;;
1968 l | lu | luc | luci | lucid ) val=lucid ;;
1969 a | at | ath | athe | athen | athena ) val=athena ;;
1970 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1971 g | gt | gtk ) val=gtk ;;
ba4481b5 1972 * )
29d69661 1973{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1974this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1975\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1976echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1977this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1978\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1979 { (exit 1); exit 1; }; }
ba4481b5
DL
1980 ;;
1981 esac
1982 with_x_toolkit=$val
1983
ca81d7a0 1984fi
8eeae1c9 1985
ba4481b5 1986
49adb60f 1987
ca81d7a0 1988# Check whether --with-xpm was given.
ba4481b5 1989if test "${with_xpm+set}" = set; then
ca81d7a0 1990 withval=$with_xpm;
00b9c927 1991else
c8467c40 1992 with_xpm=yes
ca81d7a0 1993fi
503d2be0 1994
ba4481b5 1995
ca81d7a0 1996# Check whether --with-jpeg was given.
ba4481b5 1997if test "${with_jpeg+set}" = set; then
ca81d7a0 1998 withval=$with_jpeg;
00b9c927 1999else
c8467c40 2000 with_jpeg=yes
ca81d7a0 2001fi
503d2be0 2002
ba4481b5 2003
ca81d7a0 2004# Check whether --with-tiff was given.
ba4481b5 2005if test "${with_tiff+set}" = set; then
ca81d7a0 2006 withval=$with_tiff;
00b9c927 2007else
c8467c40 2008 with_tiff=yes
ca81d7a0 2009fi
503d2be0 2010
ba4481b5 2011
ca81d7a0 2012# Check whether --with-gif was given.
ba4481b5 2013if test "${with_gif+set}" = set; then
ca81d7a0 2014 withval=$with_gif;
00b9c927 2015else
c8467c40 2016 with_gif=yes
ca81d7a0 2017fi
503d2be0 2018
ba4481b5 2019
ca81d7a0 2020# Check whether --with-png was given.
ba4481b5 2021if test "${with_png+set}" = set; then
ca81d7a0 2022 withval=$with_png;
00b9c927 2023else
c8467c40 2024 with_png=yes
ca81d7a0 2025fi
503d2be0 2026
ba4481b5 2027
0cfc0546
GM
2028# Check whether --with-rsvg was given.
2029if test "${with_rsvg+set}" = set; then
2030 withval=$with_rsvg;
00b9c927 2031else
c8467c40 2032 with_rsvg=yes
0cfc0546
GM
2033fi
2034
2035
c8467c40 2036
c24fa7dc 2037# Check whether --with-freetype was given.
45a4b03e 2038if test "${with_freetype+set}" = set; then
c24fa7dc 2039 withval=$with_freetype;
d235ca2f 2040else
4efcc8d1 2041 with_freetype=yes
c24fa7dc 2042fi
45a4b03e 2043
45a4b03e 2044
c24fa7dc 2045# Check whether --with-xft was given.
45a4b03e 2046if test "${with_xft+set}" = set; then
c24fa7dc 2047 withval=$with_xft;
d235ca2f 2048else
4efcc8d1 2049 with_xft=yes
c24fa7dc 2050fi
45a4b03e 2051
45a4b03e 2052
d235ca2f
MB
2053# Check whether --with-libotf was given.
2054if test "${with_libotf+set}" = set; then
2055 withval=$with_libotf;
2056else
2057 with_libotf=yes
79011b82
NR
2058fi
2059
2060
d235ca2f
MB
2061# Check whether --with-m17n-flt was given.
2062if test "${with_m17n_flt+set}" = set; then
2063 withval=$with_m17n_flt;
2064else
2065 with_m17n_flt=yes
0cfc0546
GM
2066fi
2067
2068
d235ca2f 2069
ca81d7a0 2070# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2071if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2072 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2073else
2074 with_toolkit_scroll_bars=yes
ca81d7a0 2075fi
503d2be0 2076
ba4481b5 2077
e35a28cd
TTN
2078# Check whether --with-xaw3d was given.
2079if test "${with_xaw3d+set}" = set; then
2080 withval=$with_xaw3d;
00b9c927
MO
2081else
2082 with_xaw3d=yes
c982cf7d
JD
2083fi
2084
2085
ca81d7a0 2086# Check whether --with-xim was given.
1d36487c 2087if test "${with_xim+set}" = set; then
ca81d7a0 2088 withval=$with_xim;
00b9c927
MO
2089else
2090 with_xim=yes
ca81d7a0 2091fi
1d36487c 2092
ba4481b5 2093
edfda783
AR
2094# Check whether --with-ns was given.
2095if test "${with_ns+set}" = set; then
2096 withval=$with_ns;
2097else
2098 with_ns=no
2099fi
2100
2101
c8467c40
GM
2102
2103# Check whether --with-gpm was given.
2104if test "${with_gpm+set}" = set; then
2105 withval=$with_gpm;
2106else
2107 with_gpm=yes
ca81d7a0 2108fi
e0f712ba 2109
49adb60f 2110
131e4133
MA
2111# Check whether --with-dbus was given.
2112if test "${with_dbus+set}" = set; then
2113 withval=$with_dbus;
00b9c927 2114else
b5a922de 2115 with_dbus=yes
131e4133
MA
2116fi
2117
2118
921fbdf0
GM
2119## For the times when you want to build Emacs but don't have
2120## a suitable makeinfo, and can live without the manuals.
2121
2122# Check whether --with-makeinfo was given.
2123if test "${with_makeinfo+set}" = set; then
2124 withval=$with_makeinfo;
2125else
2126 with_makeinfo=yes
2127fi
2128
2129
e70b2110 2130
9d2818d6
DN
2131# Check whether --with-gtk was given.
2132if test "${with_gtk+set}" = set; then
2133 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2134specify a toolkit." >&5
2135echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2136specify a toolkit." >&2;}
2137 { (exit 1); exit 1; }; }
2138fi
2139
2140
2141
2142# Check whether --with-gcc was given.
2143if test "${with_gcc+set}" = set; then
2144 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2145variable to specify a compiler." >&5
9d2818d6 2146echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
6b8bc489 2147variable to specify a compiler." >&2;}
9d2818d6
DN
2148 { (exit 1); exit 1; }; }
2149fi
2150
2151
2152
00b9c927
MO
2153# Check whether --with-pkg-config-prog was given.
2154if test "${with_pkg_config_prog+set}" = set; then
2155 withval=$with_pkg_config_prog;
e70b2110
KH
2156fi
2157
00b9c927
MO
2158if test "X${with_pkg_config_prog}" != X; then
2159 if test "${with_pkg_config_prog}" != yes; then
2160 PKG_CONFIG="${with_pkg_config_prog}"
2161 fi
2162fi
e70b2110 2163
ecd43cb9
GM
2164
2165# Check whether --with-gnustep-conf was given.
2166if test "${with_gnustep_conf+set}" = set; then
2167 withval=$with_gnustep_conf;
2168fi
2169
2170test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2171 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2172test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2173 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
2174
edfda783
AR
2175# Check whether --enable-cocoa-experimental-ctrl-g was given.
2176if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
6b8bc489 2177 enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=$enableval
edfda783
AR
2178else
2179 EN_COCOA_EXPERIMENTAL_CTRL_G=no
2180fi
2181
2182
06b62770
AR
2183# Check whether --enable-ns-self-contained was given.
2184if test "${enable_ns_self_contained+set}" = set; then
6b8bc489 2185 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
06b62770
AR
2186else
2187 EN_NS_SELF_CONTAINED=yes
2188fi
2189
2190
c24fa7dc 2191# Check whether --enable-asserts was given.
d0098f13 2192if test "${enable_asserts+set}" = set; then
ca81d7a0 2193 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2194else
2195 USE_XASSERTS=no
ca81d7a0 2196fi
8eeae1c9 2197
d0098f13 2198
ca81d7a0 2199# Check whether --enable-maintainer-mode was given.
19650fd6 2200if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2201 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2202else
2203 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2204fi
2205
19650fd6
AS
2206if test $USE_MAINTAINER_MODE = yes; then
2207 MAINT=
2208else
2209 MAINT=#
2210fi
2211
2212
ca81d7a0 2213# Check whether --enable-locallisppath was given.
9adfabc2 2214if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2215 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2216 locallisppath=
2217elif test "${enableval}" != "yes"; then
2218 locallisppath=${enableval}
2219fi
ca81d7a0
JD
2220fi
2221
9adfabc2 2222
ba4481b5 2223#### Make srcdir absolute, if it isn't already. It's important to
17494071 2224#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2225#### give you automounter prefixes, which can go away. We do all this
2226#### so Emacs can find its files when run uninstalled.
17494071
GM
2227## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2228unset CDPATH
ba4481b5
DL
2229case "${srcdir}" in
2230 /* ) ;;
2231 . )
2232 ## We may be able to use the $PWD environment variable to make this
2233 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2234 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2235 ## but that tested only for a well-formed and valid PWD,
2236 ## it did not object when PWD was well-formed and valid but just wrong.
2237 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2238 then
2239 srcdir="$PWD"
2240 else
2241 srcdir="`(cd ${srcdir}; pwd)`"
2242 fi
2243 ;;
2244 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2245esac
2246
2247#### Check if the source directory already has a configured system in it.
2248if test `pwd` != `(cd ${srcdir} && pwd)` \
2249 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2250 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2251 as a build directory right now; it has been configured in its own
2252 right. To configure in another directory as well, you MUST
2253 use GNU make. If you do not have GNU make, then you must
2254 now do \`make distclean' in ${srcdir},
2255 and then run $0 again." >&5
2256echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2257 as a build directory right now; it has been configured in its own
2258 right. To configure in another directory as well, you MUST
2259 use GNU make. If you do not have GNU make, then you must
2260 now do \`make distclean' in ${srcdir},
503d2be0 2261 and then run $0 again." >&2;}
ba4481b5
DL
2262fi
2263
2264#### Given the configuration name, set machfile and opsysfile to the
2265#### names of the m/*.h and s/*.h files we should use.
2266
2267### Canonicalize the configuration name.
2268
2269ac_aux_dir=
ca81d7a0
JD
2270for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2271 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2272 ac_aux_dir=$ac_dir
2273 ac_install_sh="$ac_aux_dir/install-sh -c"
2274 break
ca81d7a0 2275 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2276 ac_aux_dir=$ac_dir
2277 ac_install_sh="$ac_aux_dir/install.sh -c"
2278 break
ca81d7a0 2279 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2280 ac_aux_dir=$ac_dir
2281 ac_install_sh="$ac_aux_dir/shtool install -c"
2282 break
ba4481b5
DL
2283 fi
2284done
2285if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2286 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2287echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2288 { (exit 1); exit 1; }; }
ba4481b5 2289fi
ca81d7a0
JD
2290
2291# These three variables are undocumented and unsupported,
2292# and are intended to be withdrawn in a future Autoconf release.
2293# They can cause serious problems if a builder's source tree is in a directory
2294# whose full name contains unusual characters.
2295ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2296ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2297ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2298
ba4481b5
DL
2299
2300# Make sure we can run config.sub.
ca81d7a0
JD
2301$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2302 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2303echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2304 { (exit 1); exit 1; }; }
2305
ca81d7a0
JD
2306{ echo "$as_me:$LINENO: checking build system type" >&5
2307echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2308if test "${ac_cv_build+set}" = set; then
2309 echo $ECHO_N "(cached) $ECHO_C" >&6
2310else
ca81d7a0
JD
2311 ac_build_alias=$build_alias
2312test "x$ac_build_alias" = x &&
2313 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2314test "x$ac_build_alias" = x &&
c0d27fcc 2315 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2316echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2317 { (exit 1); exit 1; }; }
ca81d7a0
JD
2318ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2319 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2320echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2321 { (exit 1); exit 1; }; }
2322
2323fi
ca81d7a0
JD
2324{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2325echo "${ECHO_T}$ac_cv_build" >&6; }
2326case $ac_cv_build in
2327*-*-*) ;;
2328*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2329echo "$as_me: error: invalid value of canonical build" >&2;}
2330 { (exit 1); exit 1; }; };;
2331esac
503d2be0 2332build=$ac_cv_build
ca81d7a0
JD
2333ac_save_IFS=$IFS; IFS='-'
2334set x $ac_cv_build
2335shift
2336build_cpu=$1
2337build_vendor=$2
2338shift; shift
2339# Remember, the first character of IFS is used to create $*,
2340# except with old shells:
2341build_os=$*
2342IFS=$ac_save_IFS
2343case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2344
2345
2346{ echo "$as_me:$LINENO: checking host system type" >&5
2347echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2348if test "${ac_cv_host+set}" = set; then
2349 echo $ECHO_N "(cached) $ECHO_C" >&6
2350else
ca81d7a0
JD
2351 if test "x$host_alias" = x; then
2352 ac_cv_host=$ac_cv_build
2353else
2354 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2355 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2356echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2357 { (exit 1); exit 1; }; }
ca81d7a0 2358fi
503d2be0
AS
2359
2360fi
ca81d7a0
JD
2361{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2362echo "${ECHO_T}$ac_cv_host" >&6; }
2363case $ac_cv_host in
2364*-*-*) ;;
2365*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2366echo "$as_me: error: invalid value of canonical host" >&2;}
2367 { (exit 1); exit 1; }; };;
2368esac
503d2be0 2369host=$ac_cv_host
ca81d7a0
JD
2370ac_save_IFS=$IFS; IFS='-'
2371set x $ac_cv_host
2372shift
2373host_cpu=$1
2374host_vendor=$2
2375shift; shift
2376# Remember, the first character of IFS is used to create $*,
2377# except with old shells:
2378host_os=$*
2379IFS=$ac_save_IFS
2380case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2381
c0d27fcc 2382
ba4481b5 2383canonical=$host
1770dcdc 2384configuration=${host_alias-${build_alias-$host}}
ba4481b5 2385
c0d27fcc 2386
22044edf 2387
ba4481b5
DL
2388### If you add support for a new configuration, add code to this
2389### switch statement to recognize your configuration name and select
2390### the appropriate operating system and machine description files.
2391
2392### You would hope that you could choose an m/*.h file pretty much
2393### based on the machine portion of the configuration name, and an s-
2394### file based on the operating system portion. However, it turns out
2395### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2396### example mips.h is MIPS
2397### So we basically have to have a special case for each
ba4481b5
DL
2398### configuration name.
2399###
2400### As far as handling version numbers on operating systems is
2401### concerned, make sure things will fail in a fixable way. If
2402### /etc/MACHINES doesn't say anything about version numbers, be
2403### prepared to handle anything reasonably. If version numbers
2404### matter, be sure /etc/MACHINES says something about it.
2405###
2406### Eric Raymond says we should accept strings like "sysvr4" to mean
2407### "System V Release 4"; he writes, "The old convention encouraged
2408### confusion between `system' and `release' levels'."
2409
2410machine='' opsys='' unported=no
2411case "${canonical}" in
2412
1096bcc0 2413 ## FreeBSD ports
6b0273cd 2414 *-*-freebsd* )
1096bcc0
GM
2415 opsys=freebsd
2416 case "${canonical}" in
2417 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2418 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2419 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2420 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2421 sparc64-*-freebsd*) machine=sparc ;;
2422 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2423 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2424 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2425 esac
2426 ;;
2427
1b275743
GM
2428 ## FreeBSD kernel + glibc based userland
2429 *-*-kfreebsd*gnu* )
2430 opsys=gnu-kfreebsd
2431 case "${canonical}" in
2432 alpha*-*-kfreebsd*) machine=alpha ;;
2433 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2434 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2435 sparc64-*-kfreebsd*) machine=sparc ;;
2436 powerpc-*-kfreebsd*) machine=macppc ;;
2437 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2438 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2439 esac
2440 ;;
2441
ba4481b5
DL
2442 ## NetBSD ports
2443 *-*-netbsd* )
2444 opsys=netbsd
dd038e26 2445 if test -f /usr/lib/crti.o; then
f57bd967
DL
2446
2447cat >>confdefs.h <<\_ACEOF
2448#define HAVE_CRTIN
dd038e26
AS
2449_ACEOF
2450
2451 fi
2452
ba4481b5
DL
2453 case "${canonical}" in
2454 alpha*-*-netbsd*) machine=alpha ;;
2455 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2456 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2457 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2458 vax-*-netbsd*) machine=vax ;;
2df636f4 2459 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2460 x86_64-*-netbsd*) machine=amdx86-64 ;;
2461 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2462 esac
2463 ;;
2464
2465 ## OpenBSD ports
2466 *-*-openbsd* )
2467 opsys=openbsd
2468 case "${canonical}" in
2469 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2470 arm-*-openbsd*) machine=arm ;;
85410b02 2471 i386-*-openbsd*) machine=intel386 ;;
85410b02 2472 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2473 sparc*-*-openbsd*) machine=sparc ;;
2474 vax-*-openbsd*) machine=vax ;;
2475 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2476 esac
2477 ;;
2478
10a3b1a1
EZ
2479 ## LynxOS ports
2480 *-*-lynxos* )
2481 opsys=lynxos
2482 case "${canonical}" in
2483 i[3456]86-*-lynxos*) machine=intel386 ;;
2484 powerpc-*-lynxos*) machine=powerpc ;;
2485 esac
2486 ;;
2487
ba4481b5
DL
2488 alpha*-*-linux-gnu* )
2489 machine=alpha opsys=gnu-linux
2490 ;;
2491
c4bb2108
DL
2492 arm*-*-linux-gnu* )
2493 machine=arm opsys=gnu-linux
2494 ;;
2495
040c474e
CY
2496 ## Apple Darwin / Mac OS X
2497 *-apple-darwin* )
2498 case "${canonical}" in
2499 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2500 powerpc-* ) machine=macppc ;;
040c474e
CY
2501 * ) unported=yes ;;
2502 esac
2503 opsys=darwin
2504 # Define CPP as follows to make autoconf work correctly.
2505 CPP="${CC-cc} -E -no-cpp-precomp"
2506 # Use fink packages if available.
2507 if test -d /sw/include && test -d /sw/lib; then
2508 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2509 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2510 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2511 fi
2512 ;;
2513
6fbb6db1 2514 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2515 hppa*-hp-hpux10.2* )
2516 machine=hp800 opsys=hpux10-20
2517 ;;
6fbb6db1
GM
2518 hppa*-hp-hpux1[1-9]* )
2519 machine=hp800 opsys=hpux11
2520 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2521 ;;
2522
409d9577
GM
2523 hppa*-*-linux-gnu* )
2524 machine=hp800 opsys=gnu-linux
2525 ;;
2526
ba4481b5 2527 ## IBM machines
55597d70 2528 s390-*-linux-gnu* )
138f0859
GM
2529 machine=ibms390 opsys=gnu-linux
2530 ;;
bcdb1378
EZ
2531 s390x-*-linux-gnu* )
2532 machine=ibms390x opsys=gnu-linux
2533 ;;
ba4481b5
DL
2534 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2535 machine=ibmrs6000 opsys=aix4-2
2536 ;;
67bf991b
CY
2537 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2538 machine=ibmrs6000 opsys=aix4-2
2539 ;;
55597d70 2540 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2541 machine=ibmrs6000 opsys=aix4-2
2542 ;;
26a42dac
DN
2543 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2544 machine=ibmrs6000 opsys=aix4-2
2545 ;;
ba4481b5 2546
c76e04a8
GM
2547 ## Macintosh PowerPC
2548 powerpc*-*-linux-gnu* )
2549 machine=macppc opsys=gnu-linux
2550 ;;
2551
ba4481b5 2552 ## Silicon Graphics machines
ba4481b5 2553 ## Iris 4D
ba4481b5
DL
2554 mips-sgi-irix6.5 )
2555 machine=iris4d opsys=irix6-5
946173ad
DL
2556 # Without defining _LANGUAGE_C, things get masked out in the headers
2557 # so that, for instance, grepping for `free' in stdlib.h fails and
2558 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2559 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2560 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2561 ;;
ba4481b5 2562
ba4481b5
DL
2563 ## Suns
2564 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2565 machine=sparc opsys=gnu-linux
2566 ;;
2567
176fe5fc 2568 *-sun-solaris* \
7c54c0a0
DN
2569 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
2570 | x86_64-*-solaris2* | x86_64-*-sunos5* \
2571 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 2572 case "${canonical}" in
ba4481b5 2573 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2574 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2575 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2576 sparc* ) machine=sparc ;;
2577 * ) unported=yes ;;
2578 esac
2579 case "${canonical}" in
ba4481b5
DL
2580 *-sunos5.3* | *-solaris2.3* )
2581 opsys=sol2-3
2582 NON_GNU_CPP=/usr/ccs/lib/cpp
2583 ;;
2584 *-sunos5.4* | *-solaris2.4* )
2585 opsys=sol2-4
2586 NON_GNU_CPP=/usr/ccs/lib/cpp
2587 RANLIB="ar -ts"
2588 ;;
2589 *-sunos5.5* | *-solaris2.5* )
2590 opsys=sol2-5
2591 NON_GNU_CPP=/usr/ccs/lib/cpp
2592 RANLIB="ar -ts"
2593 ;;
8e967cf7
MR
2594 *-sunos5.6* | *-solaris2.6* )
2595 opsys=sol2-6
2596 NON_GNU_CPP=/usr/ccs/lib/cpp
2597 RANLIB="ar -ts"
2598 ;;
2194ea1c 2599 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 2600 opsys=sol2-6
089a966d
GM
2601 emacs_check_sunpro_c=yes
2602 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 2603 ;;
9b3362b8
DN
2604 *-sunos5* | *-solaris* )
2605 opsys=sol2-10
2606 emacs_check_sunpro_c=yes
2607 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2608 ;;
ba4481b5
DL
2609 esac
2610 ## Watch out for a compiler that we know will not work.
2611 case "${canonical}" in
2612 *-solaris* | *-sunos5* )
2613 if [ "x$CC" = x/usr/ucb/cc ]; then
2614 ## /usr/ucb/cc doesn't work;
2615 ## we should find some other compiler that does work.
2616 unset CC
2617 fi
2618 ;;
2619 *) ;;
2620 esac
2621 ;;
ba4481b5 2622
ba4481b5
DL
2623 ## Vaxen.
2624 vax-dec-* )
2625 machine=vax
2626 case "${canonical}" in
ba4481b5
DL
2627 *-vms* ) opsys=vms ;;
2628 * ) unported=yes
2629 esac
2630 ;;
2631
f4988be7
GM
2632 ## IA-64
2633 ia64*-*-linux* )
2634 machine=ia64 opsys=gnu-linux
2635 ;;
2636
ba4481b5
DL
2637 ## Intel 386 machines where we don't care about the manufacturer
2638 i[3456]86-*-* )
2639 machine=intel386
2640 case "${canonical}" in
c60ee5e7 2641 *-cygwin ) opsys=cygwin ;;
eae54018 2642 *-darwin* ) opsys=darwin
23fd4483
ST
2643 CPP="${CC-cc} -E -no-cpp-precomp"
2644 ;;
ba4481b5 2645 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2646 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2647 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2648 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2649 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2650 esac
2651 ;;
2652
2653 ## m68k Linux-based GNU system
2654 m68k-*-linux-gnu* )
2655 machine=m68k opsys=gnu-linux
2656 ;;
2657
2658 ## Mips Linux-based GNU system
cd958eb3 2659 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2660 machine=mips opsys=gnu-linux
2661 ;;
2662
598a2813
AS
2663 ## AMD x86-64 Linux-based GNU system
2664 x86_64-*-linux-gnu* )
24b01ec4 2665 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2666 ;;
2667
94218e27 2668 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2669 xtensa*-*-linux-gnu* )
94218e27
DN
2670 machine=xtensa opsys=gnu-linux
2671 ;;
2672
fac5dc61
DN
2673 ## SuperH Linux-based GNU system
2674 sh[34]*-*-linux-gnu* )
2675 machine=sh3 opsys=gnu-linux
2676 ;;
2677
ba4481b5
DL
2678 * )
2679 unported=yes
2680 ;;
2681esac
2682
2683### If the code above didn't choose an operating system, just choose
2684### an operating system based on the configuration name. You really
2685### only want to use this when you have no idea what the right
2686### operating system is; if you know what operating systems a machine
2687### runs, it's cleaner to make it explicit in the case statement
2688### above.
2689if test x"${opsys}" = x; then
2690 case "${canonical}" in
2691 *-gnu* ) opsys=gnu ;;
ba4481b5 2692 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2693 *-sysv5uw* ) opsys=unixware ;;
2694 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2695 *-sysv4.1* | *-sysvr4.1* )
2696 NON_GNU_CPP=/usr/lib/cpp
2697 opsys=usg5-4 ;;
2698 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2699 if [ x$NON_GNU_CPP = x ]; then
2700 if [ -f /usr/ccs/lib/cpp ]; then
2701 NON_GNU_CPP=/usr/ccs/lib/cpp
2702 else
2703 NON_GNU_CPP=/lib/cpp
2704 fi
2705 fi
2706 opsys=usg5-4-2 ;;
2707 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2708 * )
2709 unported=yes
2710 ;;
2711 esac
2712fi
2713
c0d27fcc 2714
22044edf 2715
ba4481b5 2716if test $unported = yes; then
c0d27fcc 2717 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2718Check \`etc/MACHINES' for recognized configuration names." >&5
2719echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2720Check \`etc/MACHINES' for recognized configuration names." >&2;}
2721 { (exit 1); exit 1; }; }
ba4481b5
DL
2722fi
2723
2724machfile="m/${machine}.h"
2725opsysfile="s/${opsys}.h"
2726
c0d27fcc 2727
ba4481b5
DL
2728#### Choose a compiler.
2729test -n "$CC" && cc_specified=yes
2730
2731# Save the value of CFLAGS that the user specified.
2732SPECIFIED_CFLAGS="$CFLAGS"
2733
503d2be0
AS
2734ac_ext=c
2735ac_cpp='$CPP $CPPFLAGS'
2736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
2739if test -n "$ac_tool_prefix"; then
2740 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2741set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2742{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2743echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2744if test "${ac_cv_prog_CC+set}" = set; then
2745 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2746else
2747 if test -n "$CC"; then
2748 ac_cv_prog_CC="$CC" # Let the user override the test.
2749else
c0d27fcc
MR
2750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2751for as_dir in $PATH
2752do
2753 IFS=$as_save_IFS
2754 test -z "$as_dir" && as_dir=.
2755 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2756 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2757 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2758 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2759 break 2
2760 fi
2761done
503d2be0 2762done
ca81d7a0 2763IFS=$as_save_IFS
503d2be0 2764
ba4481b5
DL
2765fi
2766fi
503d2be0 2767CC=$ac_cv_prog_CC
ba4481b5 2768if test -n "$CC"; then
ca81d7a0
JD
2769 { echo "$as_me:$LINENO: result: $CC" >&5
2770echo "${ECHO_T}$CC" >&6; }
503d2be0 2771else
ca81d7a0
JD
2772 { echo "$as_me:$LINENO: result: no" >&5
2773echo "${ECHO_T}no" >&6; }
503d2be0
AS
2774fi
2775
ca81d7a0 2776
503d2be0
AS
2777fi
2778if test -z "$ac_cv_prog_CC"; then
2779 ac_ct_CC=$CC
2780 # Extract the first word of "gcc", so it can be a program name with args.
2781set dummy gcc; ac_word=$2
ca81d7a0
JD
2782{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2783echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2784if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2785 echo $ECHO_N "(cached) $ECHO_C" >&6
2786else
2787 if test -n "$ac_ct_CC"; then
2788 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2789else
c0d27fcc
MR
2790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2791for as_dir in $PATH
2792do
2793 IFS=$as_save_IFS
2794 test -z "$as_dir" && as_dir=.
2795 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2797 ac_cv_prog_ac_ct_CC="gcc"
2798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2799 break 2
2800 fi
2801done
503d2be0 2802done
ca81d7a0 2803IFS=$as_save_IFS
503d2be0
AS
2804
2805fi
2806fi
2807ac_ct_CC=$ac_cv_prog_ac_ct_CC
2808if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2809 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2810echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2811else
ca81d7a0
JD
2812 { echo "$as_me:$LINENO: result: no" >&5
2813echo "${ECHO_T}no" >&6; }
503d2be0
AS
2814fi
2815
ca81d7a0
JD
2816 if test "x$ac_ct_CC" = x; then
2817 CC=""
2818 else
2819 case $cross_compiling:$ac_tool_warned in
2820yes:)
2821{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2822whose name does not start with the host triplet. If you think this
2823configuration is useful to you, please write to autoconf@gnu.org." >&5
2824echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2825whose name does not start with the host triplet. If you think this
2826configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2827ac_tool_warned=yes ;;
2828esac
2829 CC=$ac_ct_CC
2830 fi
503d2be0
AS
2831else
2832 CC="$ac_cv_prog_CC"
ba4481b5
DL
2833fi
2834
2835if test -z "$CC"; then
ca81d7a0
JD
2836 if test -n "$ac_tool_prefix"; then
2837 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2838set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2839{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2841if test "${ac_cv_prog_CC+set}" = set; then
2842 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2843else
2844 if test -n "$CC"; then
2845 ac_cv_prog_CC="$CC" # Let the user override the test.
2846else
c0d27fcc
MR
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850 IFS=$as_save_IFS
2851 test -z "$as_dir" && as_dir=.
2852 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2853 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2854 ac_cv_prog_CC="${ac_tool_prefix}cc"
2855 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2856 break 2
2857 fi
2858done
503d2be0 2859done
ca81d7a0 2860IFS=$as_save_IFS
503d2be0
AS
2861
2862fi
2863fi
2864CC=$ac_cv_prog_CC
2865if test -n "$CC"; then
ca81d7a0
JD
2866 { echo "$as_me:$LINENO: result: $CC" >&5
2867echo "${ECHO_T}$CC" >&6; }
503d2be0 2868else
ca81d7a0
JD
2869 { echo "$as_me:$LINENO: result: no" >&5
2870echo "${ECHO_T}no" >&6; }
503d2be0
AS
2871fi
2872
503d2be0 2873
ca81d7a0 2874 fi
503d2be0
AS
2875fi
2876if test -z "$CC"; then
2877 # Extract the first word of "cc", so it can be a program name with args.
2878set dummy cc; ac_word=$2
ca81d7a0
JD
2879{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2880echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2881if test "${ac_cv_prog_CC+set}" = set; then
2882 echo $ECHO_N "(cached) $ECHO_C" >&6
2883else
2884 if test -n "$CC"; then
2885 ac_cv_prog_CC="$CC" # Let the user override the test.
2886else
2887 ac_prog_rejected=no
c0d27fcc
MR
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2895 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2896 ac_prog_rejected=yes
2897 continue
2898 fi
2899 ac_cv_prog_CC="cc"
2900 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2901 break 2
2902 fi
2903done
503d2be0 2904done
ca81d7a0 2905IFS=$as_save_IFS
503d2be0 2906
ba4481b5
DL
2907if test $ac_prog_rejected = yes; then
2908 # We found a bogon in the path, so make sure we never use it.
2909 set dummy $ac_cv_prog_CC
2910 shift
503d2be0 2911 if test $# != 0; then
ba4481b5
DL
2912 # We chose a different compiler from the bogus one.
2913 # However, it has the same basename, so the bogon will be chosen
2914 # first if we set CC to just the basename; use the full file name.
2915 shift
6bae0ccf 2916 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2917 fi
2918fi
2919fi
2920fi
503d2be0 2921CC=$ac_cv_prog_CC
ba4481b5 2922if test -n "$CC"; then
ca81d7a0
JD
2923 { echo "$as_me:$LINENO: result: $CC" >&5
2924echo "${ECHO_T}$CC" >&6; }
ba4481b5 2925else
ca81d7a0
JD
2926 { echo "$as_me:$LINENO: result: no" >&5
2927echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2928fi
2929
ca81d7a0 2930
503d2be0
AS
2931fi
2932if test -z "$CC"; then
2933 if test -n "$ac_tool_prefix"; then
ca81d7a0 2934 for ac_prog in cl.exe
503d2be0
AS
2935 do
2936 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2937set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2938{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2940if test "${ac_cv_prog_CC+set}" = set; then
2941 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2942else
2943 if test -n "$CC"; then
2944 ac_cv_prog_CC="$CC" # Let the user override the test.
2945else
c0d27fcc
MR
2946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2947for as_dir in $PATH
2948do
2949 IFS=$as_save_IFS
2950 test -z "$as_dir" && as_dir=.
2951 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2952 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2953 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2954 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2955 break 2
2956 fi
2957done
503d2be0 2958done
ca81d7a0 2959IFS=$as_save_IFS
503d2be0 2960
c4bb2108
DL
2961fi
2962fi
503d2be0 2963CC=$ac_cv_prog_CC
c4bb2108 2964if test -n "$CC"; then
ca81d7a0
JD
2965 { echo "$as_me:$LINENO: result: $CC" >&5
2966echo "${ECHO_T}$CC" >&6; }
c4bb2108 2967else
ca81d7a0
JD
2968 { echo "$as_me:$LINENO: result: no" >&5
2969echo "${ECHO_T}no" >&6; }
503d2be0
AS
2970fi
2971
ca81d7a0 2972
503d2be0
AS
2973 test -n "$CC" && break
2974 done
2975fi
2976if test -z "$CC"; then
2977 ac_ct_CC=$CC
ca81d7a0 2978 for ac_prog in cl.exe
503d2be0
AS
2979do
2980 # Extract the first word of "$ac_prog", so it can be a program name with args.
2981set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2982{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2983echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2984if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2985 echo $ECHO_N "(cached) $ECHO_C" >&6
2986else
2987 if test -n "$ac_ct_CC"; then
2988 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2989else
c0d27fcc
MR
2990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2991for as_dir in $PATH
2992do
2993 IFS=$as_save_IFS
2994 test -z "$as_dir" && as_dir=.
2995 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2997 ac_cv_prog_ac_ct_CC="$ac_prog"
2998 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2999 break 2
3000 fi
3001done
503d2be0 3002done
ca81d7a0 3003IFS=$as_save_IFS
503d2be0 3004
c4bb2108 3005fi
503d2be0
AS
3006fi
3007ac_ct_CC=$ac_cv_prog_ac_ct_CC
3008if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3009 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3010echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3011else
ca81d7a0
JD
3012 { echo "$as_me:$LINENO: result: no" >&5
3013echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3014fi
3015
ca81d7a0 3016
503d2be0
AS
3017 test -n "$ac_ct_CC" && break
3018done
ba4481b5 3019
ca81d7a0
JD
3020 if test "x$ac_ct_CC" = x; then
3021 CC=""
3022 else
3023 case $cross_compiling:$ac_tool_warned in
3024yes:)
3025{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3026whose name does not start with the host triplet. If you think this
3027configuration is useful to you, please write to autoconf@gnu.org." >&5
3028echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3029whose name does not start with the host triplet. If you think this
3030configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3031ac_tool_warned=yes ;;
3032esac
3033 CC=$ac_ct_CC
3034 fi
503d2be0
AS
3035fi
3036
3037fi
ba4481b5 3038
c0d27fcc 3039
19650fd6
AS
3040test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3041See \`config.log' for more details." >&5
3042echo "$as_me: error: no acceptable C compiler found in \$PATH
3043See \`config.log' for more details." >&2;}
503d2be0 3044 { (exit 1); exit 1; }; }
c4bb2108 3045
503d2be0 3046# Provide some information about the compiler.
ca81d7a0 3047echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3048ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3049{ (ac_try="$ac_compiler --version >&5"
3050case "(($ac_try" in
3051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3052 *) ac_try_echo=$ac_try;;
3053esac
3054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3055 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3056 ac_status=$?
c0d27fcc 3057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3058 (exit $ac_status); }
ca81d7a0
JD
3059{ (ac_try="$ac_compiler -v >&5"
3060case "(($ac_try" in
3061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3062 *) ac_try_echo=$ac_try;;
3063esac
3064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3065 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3066 ac_status=$?
c0d27fcc 3067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3068 (exit $ac_status); }
ca81d7a0
JD
3069{ (ac_try="$ac_compiler -V >&5"
3070case "(($ac_try" in
3071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3072 *) ac_try_echo=$ac_try;;
3073esac
3074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3075 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3076 ac_status=$?
c0d27fcc 3077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3078 (exit $ac_status); }
3079
3080cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3081/* confdefs.h. */
3082_ACEOF
3083cat confdefs.h >>conftest.$ac_ext
3084cat >>conftest.$ac_ext <<_ACEOF
3085/* end confdefs.h. */
c4bb2108 3086
503d2be0
AS
3087int
3088main ()
3089{
3090
3091 ;
3092 return 0;
3093}
3094_ACEOF
3095ac_clean_files_save=$ac_clean_files
19650fd6 3096ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3097# Try to create an executable without -o first, disregard a.out.
3098# It will help us diagnose broken compilers, and finding out an intuition
3099# of exeext.
ca81d7a0
JD
3100{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3101echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3102ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3103#
3104# List of possible output files, starting from the most likely.
3105# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3106# only as a last resort. b.out is created by i960 compilers.
3107ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3108#
3109# The IRIX 6 linker writes into existing files which may not be
3110# executable, retaining their permissions. Remove them first so a
3111# subsequent execution test works.
3112ac_rmfiles=
3113for ac_file in $ac_files
3114do
3115 case $ac_file in
3116 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3117 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3118 esac
3119done
3120rm -f $ac_rmfiles
3121
3122if { (ac_try="$ac_link_default"
3123case "(($ac_try" in
3124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3125 *) ac_try_echo=$ac_try;;
3126esac
3127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3128 (eval "$ac_link_default") 2>&5
503d2be0 3129 ac_status=$?
c0d27fcc 3130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3131 (exit $ac_status); }; then
ca81d7a0
JD
3132 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3133# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3134# in a Makefile. We should not override ac_cv_exeext if it was cached,
3135# so that the user can short-circuit this test for compilers unknown to
3136# Autoconf.
f053c89f 3137for ac_file in $ac_files ''
19650fd6 3138do
6bae0ccf 3139 test -f "$ac_file" || continue
503d2be0 3140 case $ac_file in
ca81d7a0 3141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3142 ;;
19650fd6 3143 [ab].out )
edfaf76d
LK
3144 # We found the default executable, but exeext='' is most
3145 # certainly right.
3146 break;;
19650fd6 3147 *.* )
ca81d7a0
JD
3148 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3149 then :; else
3150 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3151 fi
3152 # We set ac_cv_exeext here because the later test for it is not
3153 # safe: cross compilers may not add the suffix if given an `-o'
3154 # argument, so we may need to know it at that point already.
3155 # Even if this section looks crufty: it has the advantage of
3156 # actually working.
edfaf76d 3157 break;;
19650fd6 3158 * )
edfaf76d 3159 break;;
503d2be0
AS
3160 esac
3161done
ca81d7a0
JD
3162test "$ac_cv_exeext" = no && ac_cv_exeext=
3163
503d2be0 3164else
f053c89f
CY
3165 ac_file=''
3166fi
3167
3168{ echo "$as_me:$LINENO: result: $ac_file" >&5
3169echo "${ECHO_T}$ac_file" >&6; }
3170if test -z "$ac_file"; then
503d2be0 3171 echo "$as_me: failed program was:" >&5
19650fd6
AS
3172sed 's/^/| /' conftest.$ac_ext >&5
3173
6bae0ccf 3174{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3175See \`config.log' for more details." >&5
6bae0ccf 3176echo "$as_me: error: C compiler cannot create executables
19650fd6 3177See \`config.log' for more details." >&2;}
503d2be0
AS
3178 { (exit 77); exit 77; }; }
3179fi
3180
3181ac_exeext=$ac_cv_exeext
503d2be0 3182
ca81d7a0 3183# Check that the compiler produces executables we can run. If not, either
503d2be0 3184# the compiler is broken, or we cross compile.
ca81d7a0
JD
3185{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3186echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3187# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3188# If not cross compiling, check that we can run a simple program.
3189if test "$cross_compiling" != yes; then
3190 if { ac_try='./$ac_file'
ca81d7a0
JD
3191 { (case "(($ac_try" in
3192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3193 *) ac_try_echo=$ac_try;;
3194esac
3195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3196 (eval "$ac_try") 2>&5
503d2be0 3197 ac_status=$?
c0d27fcc 3198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3199 (exit $ac_status); }; }; then
3200 cross_compiling=no
ba4481b5 3201 else
503d2be0
AS
3202 if test "$cross_compiling" = maybe; then
3203 cross_compiling=yes
3204 else
c0d27fcc 3205 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3206If you meant to cross compile, use \`--host'.
3207See \`config.log' for more details." >&5
503d2be0 3208echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3209If you meant to cross compile, use \`--host'.
3210See \`config.log' for more details." >&2;}
503d2be0
AS
3211 { (exit 1); exit 1; }; }
3212 fi
ba4481b5 3213 fi
503d2be0 3214fi
ca81d7a0
JD
3215{ echo "$as_me:$LINENO: result: yes" >&5
3216echo "${ECHO_T}yes" >&6; }
503d2be0 3217
19650fd6 3218rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3219ac_clean_files=$ac_clean_files_save
ca81d7a0 3220# Check that the compiler produces executables we can run. If not, either
503d2be0 3221# the compiler is broken, or we cross compile.
ca81d7a0
JD
3222{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3223echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3224{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3225echo "${ECHO_T}$cross_compiling" >&6; }
3226
3227{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3228echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3229if { (ac_try="$ac_link"
3230case "(($ac_try" in
3231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3232 *) ac_try_echo=$ac_try;;
3233esac
3234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3235 (eval "$ac_link") 2>&5
503d2be0 3236 ac_status=$?
c0d27fcc 3237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3238 (exit $ac_status); }; then
3239 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3240# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3241# work properly (i.e., refer to `conftest.exe'), while it won't with
3242# `rm'.
6bae0ccf
DL
3243for ac_file in conftest.exe conftest conftest.*; do
3244 test -f "$ac_file" || continue
503d2be0 3245 case $ac_file in
ca81d7a0 3246 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3247 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3248 break;;
503d2be0
AS
3249 * ) break;;
3250 esac
3251done
ba4481b5 3252else
19650fd6
AS
3253 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3254See \`config.log' for more details." >&5
3255echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3256See \`config.log' for more details." >&2;}
503d2be0 3257 { (exit 1); exit 1; }; }
ba4481b5 3258fi
ba4481b5 3259
503d2be0 3260rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3261{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3262echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3263
503d2be0
AS
3264rm -f conftest.$ac_ext
3265EXEEXT=$ac_cv_exeext
3266ac_exeext=$EXEEXT
ca81d7a0
JD
3267{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3268echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3269if test "${ac_cv_objext+set}" = set; then
3270 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3271else
503d2be0 3272 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3273/* confdefs.h. */
3274_ACEOF
3275cat confdefs.h >>conftest.$ac_ext
3276cat >>conftest.$ac_ext <<_ACEOF
3277/* end confdefs.h. */
ba4481b5 3278
503d2be0
AS
3279int
3280main ()
3281{
ba4481b5 3282
503d2be0
AS
3283 ;
3284 return 0;
3285}
3286_ACEOF
3287rm -f conftest.o conftest.obj
ca81d7a0
JD
3288if { (ac_try="$ac_compile"
3289case "(($ac_try" in
3290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3291 *) ac_try_echo=$ac_try;;
3292esac
3293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3294 (eval "$ac_compile") 2>&5
503d2be0 3295 ac_status=$?
c0d27fcc 3296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3297 (exit $ac_status); }; then
ca81d7a0
JD
3298 for ac_file in conftest.o conftest.obj conftest.*; do
3299 test -f "$ac_file" || continue;
503d2be0 3300 case $ac_file in
ca81d7a0 3301 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3302 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3303 break;;
3304 esac
3305done
c4bb2108 3306else
503d2be0 3307 echo "$as_me: failed program was:" >&5
19650fd6
AS
3308sed 's/^/| /' conftest.$ac_ext >&5
3309
3310{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3311See \`config.log' for more details." >&5
3312echo "$as_me: error: cannot compute suffix of object files: cannot compile
3313See \`config.log' for more details." >&2;}
503d2be0 3314 { (exit 1); exit 1; }; }
c4bb2108
DL
3315fi
3316
503d2be0
AS
3317rm -f conftest.$ac_cv_objext conftest.$ac_ext
3318fi
ca81d7a0
JD
3319{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3320echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3321OBJEXT=$ac_cv_objext
3322ac_objext=$OBJEXT
ca81d7a0
JD
3323{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3324echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3325if test "${ac_cv_c_compiler_gnu+set}" = set; then
3326 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3327else
503d2be0 3328 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3329/* confdefs.h. */
3330_ACEOF
3331cat confdefs.h >>conftest.$ac_ext
3332cat >>conftest.$ac_ext <<_ACEOF
3333/* end confdefs.h. */
503d2be0
AS
3334
3335int
3336main ()
3337{
3338#ifndef __GNUC__
3339 choke me
3340#endif
3341
3342 ;
3343 return 0;
3344}
3345_ACEOF
3346rm -f conftest.$ac_objext
ca81d7a0
JD
3347if { (ac_try="$ac_compile"
3348case "(($ac_try" in
3349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3350 *) ac_try_echo=$ac_try;;
3351esac
3352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3353 (eval "$ac_compile") 2>conftest.er1
503d2be0 3354 ac_status=$?
edfaf76d
LK
3355 grep -v '^ *+' conftest.er1 >conftest.err
3356 rm -f conftest.er1
3357 cat conftest.err >&5
c0d27fcc 3358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3359 (exit $ac_status); } && {
3360 test -z "$ac_c_werror_flag" ||
3361 test ! -s conftest.err
3362 } && test -s conftest.$ac_objext; then
503d2be0
AS
3363 ac_compiler_gnu=yes
3364else
3365 echo "$as_me: failed program was:" >&5
19650fd6
AS
3366sed 's/^/| /' conftest.$ac_ext >&5
3367
ca81d7a0 3368 ac_compiler_gnu=no
503d2be0 3369fi
ca81d7a0
JD
3370
3371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3372ac_cv_c_compiler_gnu=$ac_compiler_gnu
3373
3374fi
ca81d7a0
JD
3375{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3376echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3377GCC=`test $ac_compiler_gnu = yes && echo yes`
3378ac_test_CFLAGS=${CFLAGS+set}
3379ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3380{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3381echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3382if test "${ac_cv_prog_cc_g+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3384else
ca81d7a0
JD
3385 ac_save_c_werror_flag=$ac_c_werror_flag
3386 ac_c_werror_flag=yes
3387 ac_cv_prog_cc_g=no
3388 CFLAGS="-g"
3389 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3390/* confdefs.h. */
3391_ACEOF
3392cat confdefs.h >>conftest.$ac_ext
3393cat >>conftest.$ac_ext <<_ACEOF
3394/* end confdefs.h. */
503d2be0
AS
3395
3396int
3397main ()
3398{
3399
3400 ;
3401 return 0;
3402}
3403_ACEOF
3404rm -f conftest.$ac_objext
ca81d7a0
JD
3405if { (ac_try="$ac_compile"
3406case "(($ac_try" in
3407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3408 *) ac_try_echo=$ac_try;;
3409esac
3410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3411 (eval "$ac_compile") 2>conftest.er1
503d2be0 3412 ac_status=$?
edfaf76d
LK
3413 grep -v '^ *+' conftest.er1 >conftest.err
3414 rm -f conftest.er1
3415 cat conftest.err >&5
c0d27fcc 3416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3417 (exit $ac_status); } && {
3418 test -z "$ac_c_werror_flag" ||
3419 test ! -s conftest.err
3420 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3421 ac_cv_prog_cc_g=yes
3422else
503d2be0 3423 echo "$as_me: failed program was:" >&5
19650fd6
AS
3424sed 's/^/| /' conftest.$ac_ext >&5
3425
ca81d7a0
JD
3426 CFLAGS=""
3427 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3428/* confdefs.h. */
3429_ACEOF
3430cat confdefs.h >>conftest.$ac_ext
3431cat >>conftest.$ac_ext <<_ACEOF
3432/* end confdefs.h. */
edfaf76d 3433
6bae0ccf
DL
3434int
3435main ()
3436{
ca81d7a0 3437
6bae0ccf
DL
3438 ;
3439 return 0;
3440}
3441_ACEOF
ca81d7a0
JD
3442rm -f conftest.$ac_objext
3443if { (ac_try="$ac_compile"
3444case "(($ac_try" in
3445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3446 *) ac_try_echo=$ac_try;;
3447esac
3448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3449 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3450 ac_status=$?
edfaf76d
LK
3451 grep -v '^ *+' conftest.er1 >conftest.err
3452 rm -f conftest.er1
3453 cat conftest.err >&5
edfaf76d 3454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3455 (exit $ac_status); } && {
3456 test -z "$ac_c_werror_flag" ||
3457 test ! -s conftest.err
3458 } && test -s conftest.$ac_objext; then
ca81d7a0 3459 :
6bae0ccf
DL
3460else
3461 echo "$as_me: failed program was:" >&5
19650fd6
AS
3462sed 's/^/| /' conftest.$ac_ext >&5
3463
ca81d7a0
JD
3464 ac_c_werror_flag=$ac_save_c_werror_flag
3465 CFLAGS="-g"
3466 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3467/* confdefs.h. */
19650fd6
AS
3468_ACEOF
3469cat confdefs.h >>conftest.$ac_ext
3470cat >>conftest.$ac_ext <<_ACEOF
3471/* end confdefs.h. */
ca81d7a0 3472
503d2be0
AS
3473int
3474main ()
3475{
ca81d7a0 3476
503d2be0
AS
3477 ;
3478 return 0;
3479}
3480_ACEOF
3481rm -f conftest.$ac_objext
ca81d7a0
JD
3482if { (ac_try="$ac_compile"
3483case "(($ac_try" in
3484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3485 *) ac_try_echo=$ac_try;;
3486esac
3487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3488 (eval "$ac_compile") 2>conftest.er1
503d2be0 3489 ac_status=$?
edfaf76d
LK
3490 grep -v '^ *+' conftest.er1 >conftest.err
3491 rm -f conftest.er1
3492 cat conftest.err >&5
c0d27fcc 3493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3494 (exit $ac_status); } && {
3495 test -z "$ac_c_werror_flag" ||
3496 test ! -s conftest.err
3497 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3498 ac_cv_prog_cc_g=yes
3499else
503d2be0 3500 echo "$as_me: failed program was:" >&5
19650fd6
AS
3501sed 's/^/| /' conftest.$ac_ext >&5
3502
ca81d7a0 3503
ba4481b5 3504fi
ca81d7a0
JD
3505
3506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3507fi
3508
3509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3510fi
3511
3512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3513 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3514fi
ca81d7a0
JD
3515{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3516echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3517if test "$ac_test_CFLAGS" = set; then
503d2be0 3518 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3519elif test $ac_cv_prog_cc_g = yes; then
3520 if test "$GCC" = yes; then
ba4481b5
DL
3521 CFLAGS="-g -O2"
3522 else
c4bb2108 3523 CFLAGS="-g"
ba4481b5 3524 fi
22afa6e8 3525else
c4bb2108
DL
3526 if test "$GCC" = yes; then
3527 CFLAGS="-O2"
3528 else
3529 CFLAGS=
3530 fi
ba4481b5 3531fi
ca81d7a0
JD
3532{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3533echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3534if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
3536else
ca81d7a0 3537 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3538ac_save_CC=$CC
3539cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3540/* confdefs.h. */
3541_ACEOF
3542cat confdefs.h >>conftest.$ac_ext
3543cat >>conftest.$ac_ext <<_ACEOF
3544/* end confdefs.h. */
6bae0ccf
DL
3545#include <stdarg.h>
3546#include <stdio.h>
3547#include <sys/types.h>
3548#include <sys/stat.h>
3549/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3550struct buf { int x; };
3551FILE * (*rcsopen) (struct buf *, struct stat *, int);
3552static char *e (p, i)
3553 char **p;
3554 int i;
3555{
3556 return p[i];
3557}
3558static char *f (char * (*g) (char **, int), char **p, ...)
3559{
3560 char *s;
3561 va_list v;
3562 va_start (v,p);
3563 s = g (p, va_arg (v,int));
3564 va_end (v);
3565 return s;
3566}
edfaf76d
LK
3567
3568/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3569 function prototypes and stuff, but not '\xHH' hex character constants.
3570 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3571 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3572 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3573 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3574 that's true only with -std. */
edfaf76d
LK
3575int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3576
ca81d7a0
JD
3577/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3578 inside strings and character constants. */
3579#define FOO(x) 'x'
3580int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3581
6bae0ccf
DL
3582int test (int i, double x);
3583struct s1 {int (*f) (int a);};
3584struct s2 {int (*f) (double a);};
3585int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3586int argc;
3587char **argv;
3588int
3589main ()
3590{
3591return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3592 ;
3593 return 0;
3594}
3595_ACEOF
ca81d7a0
JD
3596for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3597 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3598do
3599 CC="$ac_save_CC $ac_arg"
3600 rm -f conftest.$ac_objext
ca81d7a0
JD
3601if { (ac_try="$ac_compile"
3602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
3606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3607 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3608 ac_status=$?
edfaf76d
LK
3609 grep -v '^ *+' conftest.er1 >conftest.err
3610 rm -f conftest.er1
3611 cat conftest.err >&5
6bae0ccf 3612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3613 (exit $ac_status); } && {
3614 test -z "$ac_c_werror_flag" ||
3615 test ! -s conftest.err
3616 } && test -s conftest.$ac_objext; then
ca81d7a0 3617 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3618else
3619 echo "$as_me: failed program was:" >&5
19650fd6
AS
3620sed 's/^/| /' conftest.$ac_ext >&5
3621
ca81d7a0 3622
6bae0ccf 3623fi
ca81d7a0
JD
3624
3625rm -f core conftest.err conftest.$ac_objext
3626 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3627done
ca81d7a0 3628rm -f conftest.$ac_ext
6bae0ccf
DL
3629CC=$ac_save_CC
3630
3631fi
ca81d7a0
JD
3632# AC_CACHE_VAL
3633case "x$ac_cv_prog_cc_c89" in
3634 x)
3635 { echo "$as_me:$LINENO: result: none needed" >&5
3636echo "${ECHO_T}none needed" >&6; } ;;
3637 xno)
3638 { echo "$as_me:$LINENO: result: unsupported" >&5
3639echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3640 *)
ca81d7a0
JD
3641 CC="$CC $ac_cv_prog_cc_c89"
3642 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3643echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3644esac
3645
19650fd6 3646
503d2be0
AS
3647ac_ext=c
3648ac_cpp='$CPP $CPPFLAGS'
3649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3651ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3652
c0d27fcc 3653
ba4481b5
DL
3654# On Suns, sometimes $CPP names a directory.
3655if test -n "$CPP" && test -d "$CPP"; then
3656 CPP=
3657fi
3658
089a966d
GM
3659## If not using gcc, and on Solaris, and no CPP specified, see if
3660## using a Sun compiler, which needs -Xs to prevent whitespace.
3661if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3662 test x"$CPP" = x; then
3663 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3664echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3665
3666if test "${emacs_cv_sunpro_c+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
3669 cat >conftest.$ac_ext <<_ACEOF
3670/* confdefs.h. */
3671_ACEOF
3672cat confdefs.h >>conftest.$ac_ext
3673cat >>conftest.$ac_ext <<_ACEOF
3674/* end confdefs.h. */
3675
3676int
3677main ()
3678{
3679#ifndef __SUNPRO_C
3680fail;
3681#endif
3682
3683 ;
3684 return 0;
3685}
3686_ACEOF
3687rm -f conftest.$ac_objext conftest$ac_exeext
3688if { (ac_try="$ac_link"
3689case "(($ac_try" in
3690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3691 *) ac_try_echo=$ac_try;;
3692esac
3693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3694 (eval "$ac_link") 2>conftest.er1
3695 ac_status=$?
3696 grep -v '^ *+' conftest.er1 >conftest.err
3697 rm -f conftest.er1
3698 cat conftest.err >&5
3699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700 (exit $ac_status); } && {
3701 test -z "$ac_c_werror_flag" ||
3702 test ! -s conftest.err
3703 } && test -s conftest$ac_exeext &&
3704 $as_test_x conftest$ac_exeext; then
3705 emacs_cv_sunpro_c=yes
3706else
3707 echo "$as_me: failed program was:" >&5
3708sed 's/^/| /' conftest.$ac_ext >&5
3709
3710 emacs_cv_sunpro_c=no
3711fi
3712
3713rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3714 conftest$ac_exeext conftest.$ac_ext
3715fi
3716
3717 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3718echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3719
3720 if test x"$emacs_cv_sunpro_c" = xyes; then
3721 NON_GNU_CPP="$CC -E -Xs"
3722 fi
3723fi
3724
ba4481b5
DL
3725#### Some systems specify a CPP to use unless we are using GCC.
3726#### Now that we know whether we are using GCC, we can decide whether
3727#### to use that one.
3728if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3729then
3730 CPP="$NON_GNU_CPP"
3731fi
3732
3733#### Some systems specify a CC to use unless we are using GCC.
3734#### Now that we know whether we are using GCC, we can decide whether
3735#### to use that one.
3736if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3737 test x$cc_specified != xyes
3738then
3739 CC="$NON_GNU_CC"
3740fi
3741
3742if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3743then
3744 CC="$CC $GCC_TEST_OPTIONS"
3745fi
3746
3747if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3748then
3749 CC="$CC $NON_GCC_TEST_OPTIONS"
3750fi
3751
a51f4969
SM
3752
3753cat >>confdefs.h <<\_ACEOF
3754#define _GNU_SOURCE 1
3755_ACEOF
3756
3757
e143ad11
AS
3758ac_ext=c
3759ac_cpp='$CPP $CPPFLAGS'
3760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3762ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3763{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3764echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3765# On Suns, sometimes $CPP names a directory.
3766if test -n "$CPP" && test -d "$CPP"; then
3767 CPP=
3768fi
3769if test -z "$CPP"; then
3770 if test "${ac_cv_prog_CPP+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
3773 # Double quotes because CPP needs to be expanded
3774 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3775 do
3776 ac_preproc_ok=false
3777for ac_c_preproc_warn_flag in '' yes
3778do
3779 # Use a header file that comes with gcc, so configuring glibc
3780 # with a fresh cross-compiler works.
3781 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3782 # <limits.h> exists even on freestanding compilers.
3783 # On the NeXT, cc -E runs the code through the compiler's parser,
3784 # not just through cpp. "Syntax error" is here to catch this case.
3785 cat >conftest.$ac_ext <<_ACEOF
3786/* confdefs.h. */
3787_ACEOF
3788cat confdefs.h >>conftest.$ac_ext
3789cat >>conftest.$ac_ext <<_ACEOF
3790/* end confdefs.h. */
3791#ifdef __STDC__
3792# include <limits.h>
3793#else
3794# include <assert.h>
3795#endif
3796 Syntax error
3797_ACEOF
ca81d7a0
JD
3798if { (ac_try="$ac_cpp conftest.$ac_ext"
3799case "(($ac_try" in
3800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3801 *) ac_try_echo=$ac_try;;
3802esac
3803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3804 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3805 ac_status=$?
3806 grep -v '^ *+' conftest.er1 >conftest.err
3807 rm -f conftest.er1
3808 cat conftest.err >&5
3809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3810 (exit $ac_status); } >/dev/null && {
3811 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3812 test ! -s conftest.err
3813 }; then
e143ad11
AS
3814 :
3815else
3816 echo "$as_me: failed program was:" >&5
3817sed 's/^/| /' conftest.$ac_ext >&5
3818
3819 # Broken: fails on valid input.
3820continue
3821fi
ca81d7a0 3822
e143ad11
AS
3823rm -f conftest.err conftest.$ac_ext
3824
ca81d7a0 3825 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3826 # can be detected and how.
3827 cat >conftest.$ac_ext <<_ACEOF
3828/* confdefs.h. */
3829_ACEOF
3830cat confdefs.h >>conftest.$ac_ext
3831cat >>conftest.$ac_ext <<_ACEOF
3832/* end confdefs.h. */
3833#include <ac_nonexistent.h>
3834_ACEOF
ca81d7a0
JD
3835if { (ac_try="$ac_cpp conftest.$ac_ext"
3836case "(($ac_try" in
3837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3838 *) ac_try_echo=$ac_try;;
3839esac
3840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3842 ac_status=$?
3843 grep -v '^ *+' conftest.er1 >conftest.err
3844 rm -f conftest.er1
3845 cat conftest.err >&5
3846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3847 (exit $ac_status); } >/dev/null && {
3848 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3849 test ! -s conftest.err
3850 }; then
e143ad11
AS
3851 # Broken: success on invalid input.
3852continue
3853else
3854 echo "$as_me: failed program was:" >&5
3855sed 's/^/| /' conftest.$ac_ext >&5
3856
3857 # Passes both tests.
3858ac_preproc_ok=:
3859break
3860fi
ca81d7a0 3861
e143ad11
AS
3862rm -f conftest.err conftest.$ac_ext
3863
3864done
3865# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3866rm -f conftest.err conftest.$ac_ext
3867if $ac_preproc_ok; then
3868 break
3869fi
3870
3871 done
3872 ac_cv_prog_CPP=$CPP
3873
3874fi
3875 CPP=$ac_cv_prog_CPP
3876else
3877 ac_cv_prog_CPP=$CPP
3878fi
ca81d7a0
JD
3879{ echo "$as_me:$LINENO: result: $CPP" >&5
3880echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3881ac_preproc_ok=false
3882for ac_c_preproc_warn_flag in '' yes
3883do
3884 # Use a header file that comes with gcc, so configuring glibc
3885 # with a fresh cross-compiler works.
3886 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3887 # <limits.h> exists even on freestanding compilers.
3888 # On the NeXT, cc -E runs the code through the compiler's parser,
3889 # not just through cpp. "Syntax error" is here to catch this case.
3890 cat >conftest.$ac_ext <<_ACEOF
3891/* confdefs.h. */
3892_ACEOF
3893cat confdefs.h >>conftest.$ac_ext
3894cat >>conftest.$ac_ext <<_ACEOF
3895/* end confdefs.h. */
3896#ifdef __STDC__
3897# include <limits.h>
3898#else
3899# include <assert.h>
3900#endif
3901 Syntax error
3902_ACEOF
ca81d7a0
JD
3903if { (ac_try="$ac_cpp conftest.$ac_ext"
3904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
3908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3909 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3910 ac_status=$?
3911 grep -v '^ *+' conftest.er1 >conftest.err
3912 rm -f conftest.er1
3913 cat conftest.err >&5
3914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3915 (exit $ac_status); } >/dev/null && {
3916 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3917 test ! -s conftest.err
3918 }; then
e143ad11
AS
3919 :
3920else
3921 echo "$as_me: failed program was:" >&5
3922sed 's/^/| /' conftest.$ac_ext >&5
3923
3924 # Broken: fails on valid input.
3925continue
3926fi
ca81d7a0 3927
e143ad11
AS
3928rm -f conftest.err conftest.$ac_ext
3929
ca81d7a0 3930 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3931 # can be detected and how.
3932 cat >conftest.$ac_ext <<_ACEOF
3933/* confdefs.h. */
3934_ACEOF
3935cat confdefs.h >>conftest.$ac_ext
3936cat >>conftest.$ac_ext <<_ACEOF
3937/* end confdefs.h. */
3938#include <ac_nonexistent.h>
3939_ACEOF
ca81d7a0
JD
3940if { (ac_try="$ac_cpp conftest.$ac_ext"
3941case "(($ac_try" in
3942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3943 *) ac_try_echo=$ac_try;;
3944esac
3945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3946 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3947 ac_status=$?
3948 grep -v '^ *+' conftest.er1 >conftest.err
3949 rm -f conftest.er1
3950 cat conftest.err >&5
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3952 (exit $ac_status); } >/dev/null && {
3953 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3954 test ! -s conftest.err
3955 }; then
e143ad11
AS
3956 # Broken: success on invalid input.
3957continue
3958else
3959 echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962 # Passes both tests.
3963ac_preproc_ok=:
3964break
3965fi
ca81d7a0 3966
e143ad11
AS
3967rm -f conftest.err conftest.$ac_ext
3968
3969done
3970# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3971rm -f conftest.err conftest.$ac_ext
3972if $ac_preproc_ok; then
3973 :
3974else
3975 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3976See \`config.log' for more details." >&5
3977echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3978See \`config.log' for more details." >&2;}
3979 { (exit 1); exit 1; }; }
3980fi
3981
3982ac_ext=c
3983ac_cpp='$CPP $CPPFLAGS'
3984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3986ac_compiler_gnu=$ac_cv_c_compiler_gnu
3987
3988
ca81d7a0
JD
3989{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3990echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3991if test "${ac_cv_path_GREP+set}" = set; then
3992 echo $ECHO_N "(cached) $ECHO_C" >&6
3993else
3994 # Extract the first word of "grep ggrep" to use in msg output
3995if test -z "$GREP"; then
3996set dummy grep ggrep; ac_prog_name=$2
3997if test "${ac_cv_path_GREP+set}" = set; then
3998 echo $ECHO_N "(cached) $ECHO_C" >&6
3999else
4000 ac_path_GREP_found=false
4001# Loop through the user's path and test for each of PROGNAME-LIST
4002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4004do
4005 IFS=$as_save_IFS
4006 test -z "$as_dir" && as_dir=.
4007 for ac_prog in grep ggrep; do
4008 for ac_exec_ext in '' $ac_executable_extensions; do
4009 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4010 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4011 # Check for GNU ac_path_GREP and select it if it is found.
4012 # Check for GNU $ac_path_GREP
4013case `"$ac_path_GREP" --version 2>&1` in
4014*GNU*)
4015 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4016*)
4017 ac_count=0
4018 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4019 while :
4020 do
4021 cat "conftest.in" "conftest.in" >"conftest.tmp"
4022 mv "conftest.tmp" "conftest.in"
4023 cp "conftest.in" "conftest.nl"
4024 echo 'GREP' >> "conftest.nl"
4025 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4026 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4027 ac_count=`expr $ac_count + 1`
4028 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4029 # Best one so far, save it but keep looking for a better one
4030 ac_cv_path_GREP="$ac_path_GREP"
4031 ac_path_GREP_max=$ac_count
4032 fi
4033 # 10*(2^10) chars as input seems more than enough
4034 test $ac_count -gt 10 && break
4035 done
4036 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4037esac
4038
4039
4040 $ac_path_GREP_found && break 3
4041 done
4042done
4043
4044done
4045IFS=$as_save_IFS
4046
4047
4048fi
4049
4050GREP="$ac_cv_path_GREP"
4051if test -z "$GREP"; then
4052 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4053echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4054 { (exit 1); exit 1; }; }
4055fi
4056
4057else
4058 ac_cv_path_GREP=$GREP
4059fi
4060
4061
4062fi
4063{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4064echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4065 GREP="$ac_cv_path_GREP"
4066
4067
4068{ echo "$as_me:$LINENO: checking for egrep" >&5
4069echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4070if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4071 echo $ECHO_N "(cached) $ECHO_C" >&6
4072else
ca81d7a0
JD
4073 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4074 then ac_cv_path_EGREP="$GREP -E"
4075 else
4076 # Extract the first word of "egrep" to use in msg output
4077if test -z "$EGREP"; then
4078set dummy egrep; ac_prog_name=$2
4079if test "${ac_cv_path_EGREP+set}" = set; then
4080 echo $ECHO_N "(cached) $ECHO_C" >&6
4081else
4082 ac_path_EGREP_found=false
4083# Loop through the user's path and test for each of PROGNAME-LIST
4084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4085for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4086do
4087 IFS=$as_save_IFS
4088 test -z "$as_dir" && as_dir=.
4089 for ac_prog in egrep; do
4090 for ac_exec_ext in '' $ac_executable_extensions; do
4091 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4092 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4093 # Check for GNU ac_path_EGREP and select it if it is found.
4094 # Check for GNU $ac_path_EGREP
4095case `"$ac_path_EGREP" --version 2>&1` in
4096*GNU*)
4097 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4098*)
4099 ac_count=0
4100 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4101 while :
4102 do
4103 cat "conftest.in" "conftest.in" >"conftest.tmp"
4104 mv "conftest.tmp" "conftest.in"
4105 cp "conftest.in" "conftest.nl"
4106 echo 'EGREP' >> "conftest.nl"
4107 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4108 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4109 ac_count=`expr $ac_count + 1`
4110 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4111 # Best one so far, save it but keep looking for a better one
4112 ac_cv_path_EGREP="$ac_path_EGREP"
4113 ac_path_EGREP_max=$ac_count
e143ad11 4114 fi
ca81d7a0
JD
4115 # 10*(2^10) chars as input seems more than enough
4116 test $ac_count -gt 10 && break
4117 done
4118 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4119esac
4120
4121
4122 $ac_path_EGREP_found && break 3
4123 done
4124done
4125
4126done
4127IFS=$as_save_IFS
4128
4129
e143ad11 4130fi
e143ad11 4131
ca81d7a0
JD
4132EGREP="$ac_cv_path_EGREP"
4133if test -z "$EGREP"; then
4134 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4135echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4136 { (exit 1); exit 1; }; }
4137fi
e143ad11 4138
ca81d7a0
JD
4139else
4140 ac_cv_path_EGREP=$EGREP
4141fi
e143ad11 4142
ca81d7a0
JD
4143
4144 fi
8eeae1c9 4145fi
ca81d7a0
JD
4146{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4147echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4148 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4149
4150
4151
ca81d7a0
JD
4152{ echo "$as_me:$LINENO: checking for AIX" >&5
4153echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4154cat >conftest.$ac_ext <<_ACEOF
4155/* confdefs.h. */
4156_ACEOF
4157cat confdefs.h >>conftest.$ac_ext
4158cat >>conftest.$ac_ext <<_ACEOF
4159/* end confdefs.h. */
4160#ifdef _AIX
4161 yes
4162#endif
4163
4164_ACEOF
4165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4166 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4167 { echo "$as_me:$LINENO: result: yes" >&5
4168echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4169cat >>confdefs.h <<\_ACEOF
4170#define _ALL_SOURCE 1
4171_ACEOF
4172
4173else
ca81d7a0
JD
4174 { echo "$as_me:$LINENO: result: no" >&5
4175echo "${ECHO_T}no" >&6; }
e143ad11 4176fi
a51f4969
SM
4177rm -f conftest*
4178
4179
4180{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4181echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4182if test "${ac_cv_header_stdc+set}" = set; then
4183 echo $ECHO_N "(cached) $ECHO_C" >&6
4184else
4185 cat >conftest.$ac_ext <<_ACEOF
4186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
4191#include <stdlib.h>
4192#include <stdarg.h>
4193#include <string.h>
4194#include <float.h>
4195
4196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
4204rm -f conftest.$ac_objext
4205if { (ac_try="$ac_compile"
4206case "(($ac_try" in
4207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4208 *) ac_try_echo=$ac_try;;
4209esac
4210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4211 (eval "$ac_compile") 2>conftest.er1
4212 ac_status=$?
4213 grep -v '^ *+' conftest.er1 >conftest.err
4214 rm -f conftest.er1
4215 cat conftest.err >&5
4216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4217 (exit $ac_status); } && {
4218 test -z "$ac_c_werror_flag" ||
4219 test ! -s conftest.err
4220 } && test -s conftest.$ac_objext; then
4221 ac_cv_header_stdc=yes
4222else
4223 echo "$as_me: failed program was:" >&5
4224sed 's/^/| /' conftest.$ac_ext >&5
4225
4226 ac_cv_header_stdc=no
4227fi
4228
4229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230
4231if test $ac_cv_header_stdc = yes; then
4232 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4233 cat >conftest.$ac_ext <<_ACEOF
4234/* confdefs.h. */
4235_ACEOF
4236cat confdefs.h >>conftest.$ac_ext
4237cat >>conftest.$ac_ext <<_ACEOF
4238/* end confdefs.h. */
4239#include <string.h>
4240
4241_ACEOF
4242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4243 $EGREP "memchr" >/dev/null 2>&1; then
4244 :
4245else
4246 ac_cv_header_stdc=no
4247fi
4248rm -f conftest*
4249
4250fi
4251
4252if test $ac_cv_header_stdc = yes; then
4253 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4254 cat >conftest.$ac_ext <<_ACEOF
4255/* confdefs.h. */
4256_ACEOF
4257cat confdefs.h >>conftest.$ac_ext
4258cat >>conftest.$ac_ext <<_ACEOF
4259/* end confdefs.h. */
4260#include <stdlib.h>
4261
4262_ACEOF
4263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4264 $EGREP "free" >/dev/null 2>&1; then
4265 :
4266else
4267 ac_cv_header_stdc=no
4268fi
4269rm -f conftest*
4270
4271fi
4272
4273if test $ac_cv_header_stdc = yes; then
4274 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4275 if test "$cross_compiling" = yes; then
4276 :
4277else
4278 cat >conftest.$ac_ext <<_ACEOF
4279/* confdefs.h. */
4280_ACEOF
4281cat confdefs.h >>conftest.$ac_ext
4282cat >>conftest.$ac_ext <<_ACEOF
4283/* end confdefs.h. */
4284#include <ctype.h>
4285#include <stdlib.h>
4286#if ((' ' & 0x0FF) == 0x020)
4287# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4288# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4289#else
4290# define ISLOWER(c) \
4291 (('a' <= (c) && (c) <= 'i') \
4292 || ('j' <= (c) && (c) <= 'r') \
4293 || ('s' <= (c) && (c) <= 'z'))
4294# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4295#endif
4296
4297#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4298int
4299main ()
4300{
4301 int i;
4302 for (i = 0; i < 256; i++)
4303 if (XOR (islower (i), ISLOWER (i))
4304 || toupper (i) != TOUPPER (i))
4305 return 2;
4306 return 0;
4307}
4308_ACEOF
4309rm -f conftest$ac_exeext
4310if { (ac_try="$ac_link"
4311case "(($ac_try" in
4312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4313 *) ac_try_echo=$ac_try;;
4314esac
4315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4316 (eval "$ac_link") 2>&5
4317 ac_status=$?
4318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4319 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4320 { (case "(($ac_try" in
4321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4322 *) ac_try_echo=$ac_try;;
4323esac
4324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4325 (eval "$ac_try") 2>&5
4326 ac_status=$?
4327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4328 (exit $ac_status); }; }; then
4329 :
4330else
4331 echo "$as_me: program exited with status $ac_status" >&5
4332echo "$as_me: failed program was:" >&5
4333sed 's/^/| /' conftest.$ac_ext >&5
4334
4335( exit $ac_status )
4336ac_cv_header_stdc=no
4337fi
4338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4339fi
4340
4341
4342fi
4343fi
4344{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4345echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4346if test $ac_cv_header_stdc = yes; then
4347
4348cat >>confdefs.h <<\_ACEOF
4349#define STDC_HEADERS 1
4350_ACEOF
4351
4352fi
4353
4354# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4365 inttypes.h stdint.h unistd.h
4366do
4367as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4368{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4369echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4370if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4371 echo $ECHO_N "(cached) $ECHO_C" >&6
4372else
4373 cat >conftest.$ac_ext <<_ACEOF
4374/* confdefs.h. */
4375_ACEOF
4376cat confdefs.h >>conftest.$ac_ext
4377cat >>conftest.$ac_ext <<_ACEOF
4378/* end confdefs.h. */
4379$ac_includes_default
4380
4381#include <$ac_header>
4382_ACEOF
4383rm -f conftest.$ac_objext
4384if { (ac_try="$ac_compile"
4385case "(($ac_try" in
4386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4387 *) ac_try_echo=$ac_try;;
4388esac
4389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4390 (eval "$ac_compile") 2>conftest.er1
4391 ac_status=$?
4392 grep -v '^ *+' conftest.er1 >conftest.err
4393 rm -f conftest.er1
4394 cat conftest.err >&5
4395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396 (exit $ac_status); } && {
4397 test -z "$ac_c_werror_flag" ||
4398 test ! -s conftest.err
4399 } && test -s conftest.$ac_objext; then
4400 eval "$as_ac_Header=yes"
4401else
4402 echo "$as_me: failed program was:" >&5
4403sed 's/^/| /' conftest.$ac_ext >&5
4404
4405 eval "$as_ac_Header=no"
4406fi
4407
4408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4409fi
4410ac_res=`eval echo '${'$as_ac_Header'}'`
4411 { echo "$as_me:$LINENO: result: $ac_res" >&5
4412echo "${ECHO_T}$ac_res" >&6; }
4413if test `eval echo '${'$as_ac_Header'}'` = yes; then
4414 cat >>confdefs.h <<_ACEOF
4415#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4416_ACEOF
4417
4418fi
4419
4420done
4421
4422
4423if test "${ac_cv_header_minix_config_h+set}" = set; then
4424 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4425echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4426if test "${ac_cv_header_minix_config_h+set}" = set; then
4427 echo $ECHO_N "(cached) $ECHO_C" >&6
4428fi
4429{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4430echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4431else
4432 # Is the header compilable?
4433{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4434echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4435cat >conftest.$ac_ext <<_ACEOF
4436/* confdefs.h. */
4437_ACEOF
4438cat confdefs.h >>conftest.$ac_ext
4439cat >>conftest.$ac_ext <<_ACEOF
4440/* end confdefs.h. */
4441$ac_includes_default
4442#include <minix/config.h>
4443_ACEOF
4444rm -f conftest.$ac_objext
4445if { (ac_try="$ac_compile"
4446case "(($ac_try" in
4447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4448 *) ac_try_echo=$ac_try;;
4449esac
4450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4451 (eval "$ac_compile") 2>conftest.er1
4452 ac_status=$?
4453 grep -v '^ *+' conftest.er1 >conftest.err
4454 rm -f conftest.er1
4455 cat conftest.err >&5
4456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4457 (exit $ac_status); } && {
4458 test -z "$ac_c_werror_flag" ||
4459 test ! -s conftest.err
4460 } && test -s conftest.$ac_objext; then
4461 ac_header_compiler=yes
4462else
4463 echo "$as_me: failed program was:" >&5
4464sed 's/^/| /' conftest.$ac_ext >&5
4465
4466 ac_header_compiler=no
4467fi
4468
4469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4470{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4471echo "${ECHO_T}$ac_header_compiler" >&6; }
4472
4473# Is the header present?
4474{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4475echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4476cat >conftest.$ac_ext <<_ACEOF
4477/* confdefs.h. */
4478_ACEOF
4479cat confdefs.h >>conftest.$ac_ext
4480cat >>conftest.$ac_ext <<_ACEOF
4481/* end confdefs.h. */
4482#include <minix/config.h>
4483_ACEOF
4484if { (ac_try="$ac_cpp conftest.$ac_ext"
4485case "(($ac_try" in
4486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4487 *) ac_try_echo=$ac_try;;
4488esac
4489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4490 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4491 ac_status=$?
4492 grep -v '^ *+' conftest.er1 >conftest.err
4493 rm -f conftest.er1
4494 cat conftest.err >&5
4495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496 (exit $ac_status); } >/dev/null && {
4497 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4498 test ! -s conftest.err
4499 }; then
4500 ac_header_preproc=yes
4501else
4502 echo "$as_me: failed program was:" >&5
4503sed 's/^/| /' conftest.$ac_ext >&5
4504
4505 ac_header_preproc=no
4506fi
4507
4508rm -f conftest.err conftest.$ac_ext
4509{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4510echo "${ECHO_T}$ac_header_preproc" >&6; }
4511
4512# So? What about this header?
4513case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4514 yes:no: )
4515 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4516echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4517 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4518echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4519 ac_header_preproc=yes
4520 ;;
4521 no:yes:* )
4522 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4523echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4524 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4525echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4526 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4527echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4528 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4529echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4530 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4531echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4532 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4533echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4534
4535 ;;
4536esac
4537{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4538echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4539if test "${ac_cv_header_minix_config_h+set}" = set; then
4540 echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
4542 ac_cv_header_minix_config_h=$ac_header_preproc
4543fi
4544{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4545echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4546
4547fi
4548if test $ac_cv_header_minix_config_h = yes; then
4549 MINIX=yes
4550else
4551 MINIX=
4552fi
4553
4554
4555if test "$MINIX" = yes; then
4556
4557cat >>confdefs.h <<\_ACEOF
4558#define _POSIX_SOURCE 1
4559_ACEOF
4560
4561
4562cat >>confdefs.h <<\_ACEOF
4563#define _POSIX_1_SOURCE 2
4564_ACEOF
4565
4566
4567cat >>confdefs.h <<\_ACEOF
4568#define _MINIX 1
4569_ACEOF
4570
4571fi
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4584echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4585if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4586 echo $ECHO_N "(cached) $ECHO_C" >&6
4587else
4588 cat >conftest.$ac_ext <<_ACEOF
4589/* confdefs.h. */
4590_ACEOF
4591cat confdefs.h >>conftest.$ac_ext
4592cat >>conftest.$ac_ext <<_ACEOF
4593/* end confdefs.h. */
4594
4595# define __EXTENSIONS__ 1
4596 $ac_includes_default
4597int
4598main ()
4599{
4600
4601 ;
4602 return 0;
4603}
4604_ACEOF
4605rm -f conftest.$ac_objext
4606if { (ac_try="$ac_compile"
4607case "(($ac_try" in
4608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4609 *) ac_try_echo=$ac_try;;
4610esac
4611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4612 (eval "$ac_compile") 2>conftest.er1
4613 ac_status=$?
4614 grep -v '^ *+' conftest.er1 >conftest.err
4615 rm -f conftest.er1
4616 cat conftest.err >&5
4617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618 (exit $ac_status); } && {
4619 test -z "$ac_c_werror_flag" ||
4620 test ! -s conftest.err
4621 } && test -s conftest.$ac_objext; then
4622 ac_cv_safe_to_define___extensions__=yes
4623else
4624 echo "$as_me: failed program was:" >&5
4625sed 's/^/| /' conftest.$ac_ext >&5
4626
4627 ac_cv_safe_to_define___extensions__=no
4628fi
e143ad11 4629
a51f4969
SM
4630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4631fi
4632{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4633echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4634 test $ac_cv_safe_to_define___extensions__ = yes &&
4635 cat >>confdefs.h <<\_ACEOF
4636#define __EXTENSIONS__ 1
4637_ACEOF
e143ad11 4638
a51f4969
SM
4639 cat >>confdefs.h <<\_ACEOF
4640#define _POSIX_PTHREAD_SEMANTICS 1
4641_ACEOF
e143ad11 4642
a51f4969
SM
4643 cat >>confdefs.h <<\_ACEOF
4644#define _TANDEM_SOURCE 1
e143ad11
AS
4645_ACEOF
4646
4647
4648
01abe918 4649### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4650{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4651echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4652SAVE_CFLAGS="$CFLAGS"
4653CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4654cat >conftest.$ac_ext <<_ACEOF
4655/* confdefs.h. */
4656_ACEOF
4657cat confdefs.h >>conftest.$ac_ext
4658cat >>conftest.$ac_ext <<_ACEOF
4659/* end confdefs.h. */
4660
4661int
4662main ()
4663{
4664
4665 ;
4666 return 0;
4667}
4668_ACEOF
4669rm -f conftest.$ac_objext
ca81d7a0
JD
4670if { (ac_try="$ac_compile"
4671case "(($ac_try" in
4672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4673 *) ac_try_echo=$ac_try;;
4674esac
4675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4676 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4677 ac_status=$?
4678 grep -v '^ *+' conftest.er1 >conftest.err
4679 rm -f conftest.er1
4680 cat conftest.err >&5
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4682 (exit $ac_status); } && {
4683 test -z "$ac_c_werror_flag" ||
4684 test ! -s conftest.err
4685 } && test -s conftest.$ac_objext; then
01abe918
CY
4686 has_option=yes
4687else
4688 echo "$as_me: failed program was:" >&5
4689sed 's/^/| /' conftest.$ac_ext >&5
4690
ca81d7a0 4691 has_option=no
01abe918 4692fi
ca81d7a0
JD
4693
4694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4695if test $has_option = yes; then
4696 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4697fi
ca81d7a0
JD
4698{ echo "$as_me:$LINENO: result: $has_option" >&5
4699echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4700CFLAGS="$SAVE_CFLAGS"
4701unset has_option
4702unset SAVE_CFLAGS
4703
6a3a24fa 4704#### Some other nice autoconf tests.
ba4481b5 4705
ca81d7a0
JD
4706{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4707echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4708LN_S=$as_ln_s
4709if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4710 { echo "$as_me:$LINENO: result: yes" >&5
4711echo "${ECHO_T}yes" >&6; }
ba4481b5 4712else
ca81d7a0
JD
4713 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4714echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4715fi
4716
503d2be0
AS
4717ac_ext=c
4718ac_cpp='$CPP $CPPFLAGS'
4719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4721ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4722{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4723echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4724# On Suns, sometimes $CPP names a directory.
4725if test -n "$CPP" && test -d "$CPP"; then
4726 CPP=
4727fi
4728if test -z "$CPP"; then
503d2be0
AS
4729 if test "${ac_cv_prog_CPP+set}" = set; then
4730 echo $ECHO_N "(cached) $ECHO_C" >&6
4731else
4732 # Double quotes because CPP needs to be expanded
4733 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4734 do
4735 ac_preproc_ok=false
4736for ac_c_preproc_warn_flag in '' yes
4737do
4738 # Use a header file that comes with gcc, so configuring glibc
4739 # with a fresh cross-compiler works.
19650fd6
AS
4740 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4741 # <limits.h> exists even on freestanding compilers.
ba4481b5 4742 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4743 # not just through cpp. "Syntax error" is here to catch this case.
4744 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4745/* confdefs.h. */
4746_ACEOF
4747cat confdefs.h >>conftest.$ac_ext
4748cat >>conftest.$ac_ext <<_ACEOF
4749/* end confdefs.h. */
4750#ifdef __STDC__
4751# include <limits.h>
4752#else
4753# include <assert.h>
4754#endif
edfaf76d 4755 Syntax error
503d2be0 4756_ACEOF
ca81d7a0
JD
4757if { (ac_try="$ac_cpp conftest.$ac_ext"
4758case "(($ac_try" in
4759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760 *) ac_try_echo=$ac_try;;
4761esac
4762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4763 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4764 ac_status=$?
6bae0ccf 4765 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4766 rm -f conftest.er1
4767 cat conftest.err >&5
c0d27fcc 4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4769 (exit $ac_status); } >/dev/null && {
4770 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4771 test ! -s conftest.err
4772 }; then
ba4481b5
DL
4773 :
4774else
503d2be0 4775 echo "$as_me: failed program was:" >&5
19650fd6
AS
4776sed 's/^/| /' conftest.$ac_ext >&5
4777
503d2be0
AS
4778 # Broken: fails on valid input.
4779continue
4780fi
ca81d7a0 4781
503d2be0
AS
4782rm -f conftest.err conftest.$ac_ext
4783
ca81d7a0 4784 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4785 # can be detected and how.
4786 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4787/* confdefs.h. */
4788_ACEOF
4789cat confdefs.h >>conftest.$ac_ext
4790cat >>conftest.$ac_ext <<_ACEOF
4791/* end confdefs.h. */
503d2be0
AS
4792#include <ac_nonexistent.h>
4793_ACEOF
ca81d7a0
JD
4794if { (ac_try="$ac_cpp conftest.$ac_ext"
4795case "(($ac_try" in
4796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4797 *) ac_try_echo=$ac_try;;
4798esac
4799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4800 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4801 ac_status=$?
6bae0ccf 4802 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4803 rm -f conftest.er1
4804 cat conftest.err >&5
c0d27fcc 4805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4806 (exit $ac_status); } >/dev/null && {
4807 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4808 test ! -s conftest.err
4809 }; then
503d2be0
AS
4810 # Broken: success on invalid input.
4811continue
c4bb2108 4812else
503d2be0 4813 echo "$as_me: failed program was:" >&5
19650fd6
AS
4814sed 's/^/| /' conftest.$ac_ext >&5
4815
503d2be0
AS
4816 # Passes both tests.
4817ac_preproc_ok=:
4818break
4819fi
ca81d7a0 4820
503d2be0
AS
4821rm -f conftest.err conftest.$ac_ext
4822
4823done
4824# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4825rm -f conftest.err conftest.$ac_ext
4826if $ac_preproc_ok; then
4827 break
4828fi
4829
4830 done
4831 ac_cv_prog_CPP=$CPP
4832
4833fi
4834 CPP=$ac_cv_prog_CPP
4835else
4836 ac_cv_prog_CPP=$CPP
4837fi
ca81d7a0
JD
4838{ echo "$as_me:$LINENO: result: $CPP" >&5
4839echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4840ac_preproc_ok=false
4841for ac_c_preproc_warn_flag in '' yes
4842do
4843 # Use a header file that comes with gcc, so configuring glibc
4844 # with a fresh cross-compiler works.
19650fd6
AS
4845 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4846 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4847 # On the NeXT, cc -E runs the code through the compiler's parser,
4848 # not just through cpp. "Syntax error" is here to catch this case.
4849 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4850/* confdefs.h. */
4851_ACEOF
4852cat confdefs.h >>conftest.$ac_ext
4853cat >>conftest.$ac_ext <<_ACEOF
4854/* end confdefs.h. */
4855#ifdef __STDC__
4856# include <limits.h>
4857#else
4858# include <assert.h>
4859#endif
edfaf76d 4860 Syntax error
503d2be0 4861_ACEOF
ca81d7a0
JD
4862if { (ac_try="$ac_cpp conftest.$ac_ext"
4863case "(($ac_try" in
4864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4865 *) ac_try_echo=$ac_try;;
4866esac
4867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4868 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4869 ac_status=$?
6bae0ccf 4870 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4871 rm -f conftest.er1
4872 cat conftest.err >&5
c0d27fcc 4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4874 (exit $ac_status); } >/dev/null && {
4875 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4876 test ! -s conftest.err
4877 }; then
ba4481b5
DL
4878 :
4879else
503d2be0 4880 echo "$as_me: failed program was:" >&5
19650fd6
AS
4881sed 's/^/| /' conftest.$ac_ext >&5
4882
503d2be0
AS
4883 # Broken: fails on valid input.
4884continue
4885fi
ca81d7a0 4886
503d2be0
AS
4887rm -f conftest.err conftest.$ac_ext
4888
ca81d7a0 4889 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4890 # can be detected and how.
4891 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4892/* confdefs.h. */
4893_ACEOF
4894cat confdefs.h >>conftest.$ac_ext
4895cat >>conftest.$ac_ext <<_ACEOF
4896/* end confdefs.h. */
503d2be0
AS
4897#include <ac_nonexistent.h>
4898_ACEOF
ca81d7a0
JD
4899if { (ac_try="$ac_cpp conftest.$ac_ext"
4900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
4904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4905 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4906 ac_status=$?
6bae0ccf 4907 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4908 rm -f conftest.er1
4909 cat conftest.err >&5
c0d27fcc 4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4911 (exit $ac_status); } >/dev/null && {
4912 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 }; then
503d2be0
AS
4915 # Broken: success on invalid input.
4916continue
4917else
4918 echo "$as_me: failed program was:" >&5
19650fd6
AS
4919sed 's/^/| /' conftest.$ac_ext >&5
4920
503d2be0
AS
4921 # Passes both tests.
4922ac_preproc_ok=:
4923break
ba4481b5 4924fi
ca81d7a0 4925
503d2be0
AS
4926rm -f conftest.err conftest.$ac_ext
4927
4928done
4929# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4930rm -f conftest.err conftest.$ac_ext
4931if $ac_preproc_ok; then
4932 :
ba4481b5 4933else
19650fd6
AS
4934 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4935See \`config.log' for more details." >&5
4936echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4937See \`config.log' for more details." >&2;}
503d2be0 4938 { (exit 1); exit 1; }; }
ba4481b5 4939fi
503d2be0
AS
4940
4941ac_ext=c
4942ac_cpp='$CPP $CPPFLAGS'
4943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4945ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4946
4947# Find a good install program. We prefer a C program (faster),
4948# so one script is as good as another. But avoid the broken or
4949# incompatible versions:
4950# SysV /etc/install, /usr/sbin/install
4951# SunOS /usr/etc/install
4952# IRIX /sbin/install
4953# AIX /bin/install
503d2be0 4954# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4955# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4956# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4957# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4958# OS/2's system install, which has a completely different semantic
ba4481b5 4959# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4960{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4961echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4962if test -z "$INSTALL"; then
503d2be0
AS
4963if test "${ac_cv_path_install+set}" = set; then
4964 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4965else
c0d27fcc
MR
4966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in $PATH
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 # Account for people who put trailing slashes in PATH elements.
4972case $as_dir/ in
4973 ./ | .// | /cC/* | \
4974 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4975 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4976 /usr/ucb/* ) ;;
4977 *)
4978 # OSF1 and SCO ODT 3.0 have their own names for install.
4979 # Don't use installbsd from OSF since it installs stuff as root
4980 # by default.
4981 for ac_prog in ginstall scoinst install; do
4982 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4983 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4984 if test $ac_prog = install &&
4985 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4986 # AIX install. It has an incompatible calling convention.
4987 :
4988 elif test $ac_prog = install &&
4989 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4990 # program-specific install script used by HP pwplus--don't use.
4991 :
4992 else
4993 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4994 break 3
4995 fi
4996 fi
ba4481b5 4997 done
c0d27fcc
MR
4998 done
4999 ;;
5000esac
5001done
ca81d7a0 5002IFS=$as_save_IFS
c0d27fcc 5003
ba4481b5
DL
5004
5005fi
5006 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5007 INSTALL=$ac_cv_path_install
ba4481b5 5008 else
ca81d7a0
JD
5009 # As a last resort, use the slow shell script. Don't cache a
5010 # value for INSTALL within a source directory, because that will
ba4481b5 5011 # break other packages using the cache if that directory is
ca81d7a0 5012 # removed, or if the value is a relative name.
503d2be0 5013 INSTALL=$ac_install_sh
ba4481b5
DL
5014 fi
5015fi
ca81d7a0
JD
5016{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5017echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5018
5019# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5020# It thinks the first close brace ends the variable substitution.
5021test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5022
503d2be0 5023test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5024
ba4481b5
DL
5025test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5026
c0d27fcc
MR
5027if test "x$RANLIB" = x; then
5028 if test -n "$ac_tool_prefix"; then
5029 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5030set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5031{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5033if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5034 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5035else
5036 if test -n "$RANLIB"; then
5037 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5038else
c0d27fcc
MR
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5046 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5047 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5049 fi
5050done
503d2be0 5051done
ca81d7a0 5052IFS=$as_save_IFS
503d2be0 5053
7397acc4
DL
5054fi
5055fi
503d2be0 5056RANLIB=$ac_cv_prog_RANLIB
7397acc4 5057if test -n "$RANLIB"; then
ca81d7a0
JD
5058 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5059echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5060else
ca81d7a0
JD
5061 { echo "$as_me:$LINENO: result: no" >&5
5062echo "${ECHO_T}no" >&6; }
503d2be0
AS
5063fi
5064
ca81d7a0 5065
503d2be0
AS
5066fi
5067if test -z "$ac_cv_prog_RANLIB"; then
5068 ac_ct_RANLIB=$RANLIB
5069 # Extract the first word of "ranlib", so it can be a program name with args.
5070set dummy ranlib; ac_word=$2
ca81d7a0
JD
5071{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5072echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5073if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5074 echo $ECHO_N "(cached) $ECHO_C" >&6
5075else
5076 if test -n "$ac_ct_RANLIB"; then
5077 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5078else
c0d27fcc
MR
5079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5086 ac_cv_prog_ac_ct_RANLIB="ranlib"
5087 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5089 fi
5090done
503d2be0 5091done
ca81d7a0 5092IFS=$as_save_IFS
503d2be0 5093
503d2be0
AS
5094fi
5095fi
5096ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5097if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5098 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5099echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5100else
ca81d7a0
JD
5101 { echo "$as_me:$LINENO: result: no" >&5
5102echo "${ECHO_T}no" >&6; }
503d2be0
AS
5103fi
5104
ca81d7a0
JD
5105 if test "x$ac_ct_RANLIB" = x; then
5106 RANLIB=":"
5107 else
5108 case $cross_compiling:$ac_tool_warned in
5109yes:)
5110{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5111whose name does not start with the host triplet. If you think this
5112configuration is useful to you, please write to autoconf@gnu.org." >&5
5113echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5114whose name does not start with the host triplet. If you think this
5115configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5116ac_tool_warned=yes ;;
5117esac
5118 RANLIB=$ac_ct_RANLIB
5119 fi
7397acc4 5120else
503d2be0 5121 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5122fi
5123
5124fi
9e71690e
DK
5125# Extract the first word of "install-info", so it can be a program name with args.
5126set dummy install-info; ac_word=$2
ca81d7a0
JD
5127{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5128echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5129if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5130 echo $ECHO_N "(cached) $ECHO_C" >&6
5131else
5132 case $INSTALL_INFO in
5133 [\\/]* | ?:[\\/]*)
5134 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5135 ;;
5136 *)
5137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5143 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5144 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5145 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
5148done
5149done
ca81d7a0 5150IFS=$as_save_IFS
9e71690e
DK
5151
5152 ;;
5153esac
5154fi
5155INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5156if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5157 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5158echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5159else
ca81d7a0
JD
5160 { echo "$as_me:$LINENO: result: no" >&5
5161echo "${ECHO_T}no" >&6; }
9e71690e
DK
5162fi
5163
ca81d7a0 5164
9e71690e
DK
5165# Extract the first word of "install-info", so it can be a program name with args.
5166set dummy install-info; ac_word=$2
ca81d7a0
JD
5167{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5169if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5170 echo $ECHO_N "(cached) $ECHO_C" >&6
5171else
5172 case $INSTALL_INFO in
5173 [\\/]* | ?:[\\/]*)
5174 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5175 ;;
5176 *)
5177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in /usr/sbin
5179do
5180 IFS=$as_save_IFS
5181 test -z "$as_dir" && as_dir=.
5182 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5183 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5184 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5186 break 2
5187 fi
5188done
5189done
ca81d7a0 5190IFS=$as_save_IFS
9e71690e
DK
5191
5192 ;;
5193esac
5194fi
5195INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5196if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5197 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5198echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5199else
ca81d7a0
JD
5200 { echo "$as_me:$LINENO: result: no" >&5
5201echo "${ECHO_T}no" >&6; }
9e71690e
DK
5202fi
5203
ca81d7a0 5204
9e71690e
DK
5205# Extract the first word of "install-info", so it can be a program name with args.
5206set dummy install-info; ac_word=$2
ca81d7a0
JD
5207{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5208echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5209if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5210 echo $ECHO_N "(cached) $ECHO_C" >&6
5211else
5212 case $INSTALL_INFO in
5213 [\\/]* | ?:[\\/]*)
5214 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5215 ;;
5216 *)
5217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in /sbin
5219do
5220 IFS=$as_save_IFS
5221 test -z "$as_dir" && as_dir=.
5222 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5223 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5224 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5225 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5226 break 2
5227 fi
5228done
5229done
ca81d7a0 5230IFS=$as_save_IFS
9e71690e
DK
5231
5232 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5233 ;;
5234esac
5235fi
5236INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5237if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5238 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5239echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5240else
ca81d7a0
JD
5241 { echo "$as_me:$LINENO: result: no" >&5
5242echo "${ECHO_T}no" >&6; }
9e71690e
DK
5243fi
5244
ca81d7a0 5245
8ae52ca6
RF
5246# Extract the first word of "gzip", so it can be a program name with args.
5247set dummy gzip; ac_word=$2
ca81d7a0
JD
5248{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5250if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5251 echo $ECHO_N "(cached) $ECHO_C" >&6
5252else
46e35e9f 5253 case $GZIP_PROG in
8ae52ca6 5254 [\\/]* | ?:[\\/]*)
46e35e9f 5255 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5256 ;;
5257 *)
5258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259for as_dir in $PATH
5260do
5261 IFS=$as_save_IFS
5262 test -z "$as_dir" && as_dir=.
5263 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5265 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5267 break 2
5268 fi
5269done
5270done
ca81d7a0 5271IFS=$as_save_IFS
8ae52ca6
RF
5272
5273 ;;
5274esac
5275fi
46e35e9f 5276GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5277if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5278 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5279echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5280else
ca81d7a0
JD
5281 { echo "$as_me:$LINENO: result: no" >&5
5282echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5283fi
5284
ba4481b5 5285
c0d27fcc 5286
ca81d7a0 5287
1bb9a689
MB
5288## Need makeinfo >= 4.6 (?) to build the manuals.
5289# Extract the first word of "makeinfo", so it can be a program name with args.
5290set dummy makeinfo; ac_word=$2
5291{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5293if test "${ac_cv_path_MAKEINFO+set}" = set; then
5294 echo $ECHO_N "(cached) $ECHO_C" >&6
5295else
5296 case $MAKEINFO in
5297 [\\/]* | ?:[\\/]*)
5298 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5299 ;;
5300 *)
5301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304 IFS=$as_save_IFS
5305 test -z "$as_dir" && as_dir=.
5306 for ac_exec_ext in '' $ac_executable_extensions; do
5307 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5308 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5309 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5310 break 2
5311 fi
5312done
5313done
5314IFS=$as_save_IFS
5315
5316 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5317 ;;
5318esac
5319fi
5320MAKEINFO=$ac_cv_path_MAKEINFO
5321if test -n "$MAKEINFO"; then
5322 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5323echo "${ECHO_T}$MAKEINFO" >&6; }
5324else
5325 { echo "$as_me:$LINENO: result: no" >&5
5326echo "${ECHO_T}no" >&6; }
5327fi
5328
5329
5330if test "$MAKEINFO" != "no" && \
d4840f44 5331 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
5332 MAKEINFO=no
5333fi
5334
e1b89931
GM
5335## Makeinfo is unusual. For a released Emacs, the manuals are
5336## pre-built, and not deleted by the normal clean rules. makeinfo is
5337## therefore in the category of "special tools" not normally required, which
5338## configure does not have to check for (eg autoconf itself).
5339## In a CVS checkout on the other hand, the manuals are not included.
5340## So makeinfo is a requirement to build from CVS, and configure
5341## should test for it as it does for any other build requirement.
5342## We use the presence of $srcdir/info/emacs to distinguish a release,
5343## with pre-built manuals, from a CVS checkout.
5344if test "$MAKEINFO" = "no"; then
5345 if test "x${with_makeinfo}" = "xno"; then
5346 MAKEINFO=off
5347 elif ! test -e $srcdir/info/emacs; then
5348 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5349source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5350Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5351with the \`--without-makeinfo' option to build without the manuals. " >&5
5352echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5353source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5354Either install a suitable version of makeinfo, or re-run configure
e1b89931 5355with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5356 { (exit 1); exit 1; }; }
e1b89931 5357 fi
921fbdf0 5358fi
1bb9a689
MB
5359
5360
8e967cf7
MR
5361if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5362then
5363 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5364fi
5365
5366if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5367then
5368 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5369fi
5370
c0d27fcc 5371
fe239f0f 5372late_LDFLAGS=$LDFLAGS
4af002d6 5373if test "$GCC" = yes; then
fe239f0f
AS
5374 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5375else
5376 LDFLAGS="$LDFLAGS -znocombreloc"
5377fi
5378
ca81d7a0
JD
5379{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5380echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5381cat >conftest.$ac_ext <<_ACEOF
5382main(){return 0;}
5383_ACEOF
5384rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5385if { (ac_try="$ac_link"
5386case "(($ac_try" in
5387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5388 *) ac_try_echo=$ac_try;;
5389esac
5390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5391 (eval "$ac_link") 2>conftest.er1
fe239f0f 5392 ac_status=$?
edfaf76d
LK
5393 grep -v '^ *+' conftest.er1 >conftest.err
5394 rm -f conftest.er1
5395 cat conftest.err >&5
fe239f0f 5396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5397 (exit $ac_status); } && {
5398 test -z "$ac_c_werror_flag" ||
5399 test ! -s conftest.err
5400 } && test -s conftest$ac_exeext &&
5401 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5402 { echo "$as_me:$LINENO: result: yes" >&5
5403echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5404else
5405 echo "$as_me: failed program was:" >&5
5406sed 's/^/| /' conftest.$ac_ext >&5
5407
ca81d7a0
JD
5408 LDFLAGS=$late_LDFLAGS
5409 { echo "$as_me:$LINENO: result: no" >&5
5410echo "${ECHO_T}no" >&6; }
fe239f0f 5411fi
ca81d7a0 5412
f053c89f 5413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5414 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5415
3b33a005
DL
5416#### Extract some information from the operating system and machine files.
5417
c0d27fcc 5418{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5419 - which libraries the lib-src programs will want, and
503d2be0
AS
5420 - whether the GNU malloc routines are usable..." >&5
5421echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5422 - which libraries the lib-src programs will want, and
503d2be0 5423 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5424
5425### First figure out CFLAGS (which we use for running the compiler here)
5426### and REAL_CFLAGS (which we use for real compilation).
5427### The two are the same except on a few systems, where they are made
5428### different to work around various lossages. For example,
5429### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5430### as implying static linking.
5431
5432### If the CFLAGS env var is specified, we use that value
5433### instead of the default.
5434
5435### It's not important that this name contain the PID; you can't run
5436### two configures in the same directory and have anything work
5437### anyway.
5438tempcname="conftest.c"
5439
5440echo '
5441#include "'${srcdir}'/src/'${opsysfile}'"
5442#include "'${srcdir}'/src/'${machfile}'"
5443#ifndef LIBS_MACHINE
5444#define LIBS_MACHINE
5445#endif
5446#ifndef LIBS_SYSTEM
5447#define LIBS_SYSTEM
5448#endif
5449#ifndef C_SWITCH_SYSTEM
5450#define C_SWITCH_SYSTEM
5451#endif
5452#ifndef C_SWITCH_MACHINE
5453#define C_SWITCH_MACHINE
5454#endif
5455configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5456configure___ c_switch_system=C_SWITCH_SYSTEM
5457configure___ c_switch_machine=C_SWITCH_MACHINE
5458
5459#ifndef LIB_X11_LIB
5460#define LIB_X11_LIB -lX11
5461#endif
5462
3b33a005
DL
5463#ifndef LIBX11_SYSTEM
5464#define LIBX11_SYSTEM
5465#endif
9d2818d6 5466configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5467
5468#ifdef UNEXEC
5469configure___ unexec=UNEXEC
5470#else
5471configure___ unexec=unexec.o
5472#endif
5473
5474#ifdef SYSTEM_MALLOC
5475configure___ system_malloc=yes
5476#else
5477configure___ system_malloc=no
5478#endif
5479
ef9e4345
GM
5480#ifdef USE_MMAP_FOR_BUFFERS
5481configure___ use_mmap_for_buffers=yes
73b77ee5 5482#else
ef9e4345 5483configure___ use_mmap_for_buffers=no
73b77ee5
GM
5484#endif
5485
3b33a005
DL
5486#ifndef C_DEBUG_SWITCH
5487#define C_DEBUG_SWITCH -g
5488#endif
5489
5490#ifndef C_OPTIMIZE_SWITCH
5491#ifdef __GNUC__
5492#define C_OPTIMIZE_SWITCH -O2
5493#else
5494#define C_OPTIMIZE_SWITCH -O
5495#endif
5496#endif
5497
01abe918
CY
5498#ifndef C_WARNINGS_SWITCH
5499#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5500#endif
5501
3b33a005
DL
5502#ifndef LD_SWITCH_MACHINE
5503#define LD_SWITCH_MACHINE
5504#endif
5505
5506#ifndef LD_SWITCH_SYSTEM
5507#define LD_SWITCH_SYSTEM
5508#endif
5509
5510#ifndef LD_SWITCH_X_SITE_AUX
5511#define LD_SWITCH_X_SITE_AUX
503d2be0 5512#endif
3b33a005
DL
5513
5514configure___ ld_switch_system=LD_SWITCH_SYSTEM
5515configure___ ld_switch_machine=LD_SWITCH_MACHINE
5516
5517#ifdef THIS_IS_CONFIGURE
5518
5519/* Get the CFLAGS for tests in configure. */
5520#ifdef __GNUC__
5521configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5522#else
5523configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5524#endif
5525
5526#else /* not THIS_IS_CONFIGURE */
5527
5528/* Get the CFLAGS for real compilation. */
5529#ifdef __GNUC__
01abe918 5530configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5531#else
5532configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5533#endif
5534
5535#endif /* not THIS_IS_CONFIGURE */
5536' > ${tempcname}
5537
5538# The value of CPP is a quoted variable reference, so we need to do this
5539# to get its actual value...
5540CPP=`eval "echo $CPP"`
5541eval `${CPP} -Isrc ${tempcname} \
5542 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5543if test "x$SPECIFIED_CFLAGS" = x; then
5544 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5545 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5546else
5547 REAL_CFLAGS="$CFLAGS"
5548fi
5549rm ${tempcname}
5550
5551ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5552
5553### Make sure subsequent tests use flags consistent with the build flags.
5554
5555if test x"${OVERRIDE_CPPFLAGS}" != x; then
5556 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5557else
5558 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5559fi
5560
6bae0ccf
DL
5561
5562
ca81d7a0 5563# Check whether --enable-largefile was given.
f4988be7 5564if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5565 enableval=$enable_largefile;
5566fi
f4988be7 5567
503d2be0 5568if test "$enable_largefile" != no; then
f4988be7 5569
ca81d7a0
JD
5570 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5571echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5572if test "${ac_cv_sys_largefile_CC+set}" = set; then
5573 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5574else
f4988be7 5575 ac_cv_sys_largefile_CC=no
503d2be0
AS
5576 if test "$GCC" != yes; then
5577 ac_save_CC=$CC
5578 while :; do
ca81d7a0
JD
5579 # IRIX 6.2 and later do not support large files by default,
5580 # so use the C compiler's -n32 option if that helps.
edfaf76d 5581 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5582/* confdefs.h. */
5583_ACEOF
5584cat confdefs.h >>conftest.$ac_ext
5585cat >>conftest.$ac_ext <<_ACEOF
5586/* end confdefs.h. */
f4988be7 5587#include <sys/types.h>
503d2be0
AS
5588 /* Check that off_t can represent 2**63 - 1 correctly.
5589 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5590 since some C++ compilers masquerading as C compilers
5591 incorrectly reject 9223372036854775807. */
5592#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5593 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5594 && LARGE_OFF_T % 2147483647 == 1)
5595 ? 1 : -1];
5596int
5597main ()
5598{
f4988be7 5599
503d2be0
AS
5600 ;
5601 return 0;
5602}
5603_ACEOF
ca81d7a0
JD
5604 rm -f conftest.$ac_objext
5605if { (ac_try="$ac_compile"
5606case "(($ac_try" in
5607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5608 *) ac_try_echo=$ac_try;;
5609esac
5610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5611 (eval "$ac_compile") 2>conftest.er1
503d2be0 5612 ac_status=$?
edfaf76d
LK
5613 grep -v '^ *+' conftest.er1 >conftest.err
5614 rm -f conftest.er1
5615 cat conftest.err >&5
c0d27fcc 5616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5617 (exit $ac_status); } && {
5618 test -z "$ac_c_werror_flag" ||
5619 test ! -s conftest.err
5620 } && test -s conftest.$ac_objext; then
503d2be0 5621 break
b192d653 5622else
503d2be0 5623 echo "$as_me: failed program was:" >&5
19650fd6
AS
5624sed 's/^/| /' conftest.$ac_ext >&5
5625
ca81d7a0 5626
503d2be0 5627fi
ca81d7a0
JD
5628
5629rm -f core conftest.err conftest.$ac_objext
5630 CC="$CC -n32"
5631 rm -f conftest.$ac_objext
5632if { (ac_try="$ac_compile"
5633case "(($ac_try" in
5634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5635 *) ac_try_echo=$ac_try;;
5636esac
5637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5638 (eval "$ac_compile") 2>conftest.er1
503d2be0 5639 ac_status=$?
edfaf76d
LK
5640 grep -v '^ *+' conftest.er1 >conftest.err
5641 rm -f conftest.er1
5642 cat conftest.err >&5
c0d27fcc 5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5644 (exit $ac_status); } && {
5645 test -z "$ac_c_werror_flag" ||
5646 test ! -s conftest.err
5647 } && test -s conftest.$ac_objext; then
503d2be0
AS
5648 ac_cv_sys_largefile_CC=' -n32'; break
5649else
5650 echo "$as_me: failed program was:" >&5
19650fd6
AS
5651sed 's/^/| /' conftest.$ac_ext >&5
5652
ca81d7a0 5653
503d2be0 5654fi
ca81d7a0
JD
5655
5656rm -f core conftest.err conftest.$ac_objext
edfaf76d 5657 break
503d2be0
AS
5658 done
5659 CC=$ac_save_CC
5660 rm -f conftest.$ac_ext
5661 fi
b192d653 5662fi
ca81d7a0
JD
5663{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5664echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5665 if test "$ac_cv_sys_largefile_CC" != no; then
5666 CC=$CC$ac_cv_sys_largefile_CC
5667 fi
b192d653 5668
ca81d7a0
JD
5669 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5670echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5671if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5672 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5673else
503d2be0 5674 while :; do
503d2be0 5675 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5676/* confdefs.h. */
5677_ACEOF
5678cat confdefs.h >>conftest.$ac_ext
5679cat >>conftest.$ac_ext <<_ACEOF
5680/* end confdefs.h. */
f4988be7 5681#include <sys/types.h>
503d2be0
AS
5682 /* Check that off_t can represent 2**63 - 1 correctly.
5683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5684 since some C++ compilers masquerading as C compilers
5685 incorrectly reject 9223372036854775807. */
5686#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5688 && LARGE_OFF_T % 2147483647 == 1)
5689 ? 1 : -1];
5690int
5691main ()
5692{
f4988be7 5693
503d2be0
AS
5694 ;
5695 return 0;
5696}
5697_ACEOF
5698rm -f conftest.$ac_objext
ca81d7a0
JD
5699if { (ac_try="$ac_compile"
5700case "(($ac_try" in
5701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5702 *) ac_try_echo=$ac_try;;
5703esac
5704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5705 (eval "$ac_compile") 2>conftest.er1
503d2be0 5706 ac_status=$?
edfaf76d
LK
5707 grep -v '^ *+' conftest.er1 >conftest.err
5708 rm -f conftest.er1
5709 cat conftest.err >&5
c0d27fcc 5710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5711 (exit $ac_status); } && {
5712 test -z "$ac_c_werror_flag" ||
5713 test ! -s conftest.err
5714 } && test -s conftest.$ac_objext; then
5715 ac_cv_sys_file_offset_bits=no; break
f4988be7 5716else
503d2be0 5717 echo "$as_me: failed program was:" >&5
19650fd6
AS
5718sed 's/^/| /' conftest.$ac_ext >&5
5719
ca81d7a0 5720
503d2be0 5721fi
ca81d7a0
JD
5722
5723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5724 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5725/* confdefs.h. */
5726_ACEOF
5727cat confdefs.h >>conftest.$ac_ext
5728cat >>conftest.$ac_ext <<_ACEOF
5729/* end confdefs.h. */
f4988be7
GM
5730#define _FILE_OFFSET_BITS 64
5731#include <sys/types.h>
503d2be0
AS
5732 /* Check that off_t can represent 2**63 - 1 correctly.
5733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5734 since some C++ compilers masquerading as C compilers
5735 incorrectly reject 9223372036854775807. */
5736#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5738 && LARGE_OFF_T % 2147483647 == 1)
5739 ? 1 : -1];
5740int
5741main ()
5742{
5743
5744 ;
5745 return 0;
5746}
5747_ACEOF
5748rm -f conftest.$ac_objext
ca81d7a0
JD
5749if { (ac_try="$ac_compile"
5750case "(($ac_try" in
5751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5752 *) ac_try_echo=$ac_try;;
5753esac
5754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5755 (eval "$ac_compile") 2>conftest.er1
503d2be0 5756 ac_status=$?
edfaf76d
LK
5757 grep -v '^ *+' conftest.er1 >conftest.err
5758 rm -f conftest.er1
5759 cat conftest.err >&5
c0d27fcc 5760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5761 (exit $ac_status); } && {
5762 test -z "$ac_c_werror_flag" ||
5763 test ! -s conftest.err
5764 } && test -s conftest.$ac_objext; then
503d2be0
AS
5765 ac_cv_sys_file_offset_bits=64; break
5766else
5767 echo "$as_me: failed program was:" >&5
19650fd6
AS
5768sed 's/^/| /' conftest.$ac_ext >&5
5769
ca81d7a0 5770
503d2be0 5771fi
ca81d7a0
JD
5772
5773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5774 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5775 break
5776done
ba4481b5 5777fi
ca81d7a0
JD
5778{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5779echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5780case $ac_cv_sys_file_offset_bits in #(
5781 no | unknown) ;;
5782 *)
c0d27fcc 5783cat >>confdefs.h <<_ACEOF
f4988be7 5784#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5785_ACEOF
f053c89f
CY
5786;;
5787esac
503d2be0 5788rm -f conftest*
f053c89f
CY
5789 if test $ac_cv_sys_file_offset_bits = unknown; then
5790 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5791echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5792if test "${ac_cv_sys_large_files+set}" = set; then
5793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5794else
503d2be0 5795 while :; do
503d2be0 5796 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5797/* confdefs.h. */
5798_ACEOF
5799cat confdefs.h >>conftest.$ac_ext
5800cat >>conftest.$ac_ext <<_ACEOF
5801/* end confdefs.h. */
503d2be0
AS
5802#include <sys/types.h>
5803 /* Check that off_t can represent 2**63 - 1 correctly.
5804 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5805 since some C++ compilers masquerading as C compilers
5806 incorrectly reject 9223372036854775807. */
5807#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5808 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5809 && LARGE_OFF_T % 2147483647 == 1)
5810 ? 1 : -1];
5811int
5812main ()
5813{
ba4481b5 5814
503d2be0
AS
5815 ;
5816 return 0;
5817}
5818_ACEOF
5819rm -f conftest.$ac_objext
ca81d7a0
JD
5820if { (ac_try="$ac_compile"
5821case "(($ac_try" in
5822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5823 *) ac_try_echo=$ac_try;;
5824esac
5825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5826 (eval "$ac_compile") 2>conftest.er1
503d2be0 5827 ac_status=$?
edfaf76d
LK
5828 grep -v '^ *+' conftest.er1 >conftest.err
5829 rm -f conftest.er1
5830 cat conftest.err >&5
c0d27fcc 5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5832 (exit $ac_status); } && {
5833 test -z "$ac_c_werror_flag" ||
5834 test ! -s conftest.err
5835 } && test -s conftest.$ac_objext; then
5836 ac_cv_sys_large_files=no; break
ba4481b5 5837else
503d2be0 5838 echo "$as_me: failed program was:" >&5
19650fd6
AS
5839sed 's/^/| /' conftest.$ac_ext >&5
5840
ca81d7a0 5841
503d2be0 5842fi
ca81d7a0
JD
5843
5844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5845 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5846/* confdefs.h. */
5847_ACEOF
5848cat confdefs.h >>conftest.$ac_ext
5849cat >>conftest.$ac_ext <<_ACEOF
5850/* end confdefs.h. */
f4988be7 5851#define _LARGE_FILES 1
503d2be0
AS
5852#include <sys/types.h>
5853 /* Check that off_t can represent 2**63 - 1 correctly.
5854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5855 since some C++ compilers masquerading as C compilers
5856 incorrectly reject 9223372036854775807. */
5857#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5859 && LARGE_OFF_T % 2147483647 == 1)
5860 ? 1 : -1];
5861int
5862main ()
5863{
f4988be7 5864
503d2be0
AS
5865 ;
5866 return 0;
5867}
5868_ACEOF
5869rm -f conftest.$ac_objext
ca81d7a0
JD
5870if { (ac_try="$ac_compile"
5871case "(($ac_try" in
5872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5873 *) ac_try_echo=$ac_try;;
5874esac
5875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5876 (eval "$ac_compile") 2>conftest.er1
503d2be0 5877 ac_status=$?
edfaf76d
LK
5878 grep -v '^ *+' conftest.er1 >conftest.err
5879 rm -f conftest.er1
5880 cat conftest.err >&5
c0d27fcc 5881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5882 (exit $ac_status); } && {
5883 test -z "$ac_c_werror_flag" ||
5884 test ! -s conftest.err
5885 } && test -s conftest.$ac_objext; then
503d2be0
AS
5886 ac_cv_sys_large_files=1; break
5887else
5888 echo "$as_me: failed program was:" >&5
19650fd6
AS
5889sed 's/^/| /' conftest.$ac_ext >&5
5890
ca81d7a0 5891
503d2be0 5892fi
ca81d7a0
JD
5893
5894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5895 ac_cv_sys_large_files=unknown
503d2be0
AS
5896 break
5897done
ba4481b5 5898fi
ca81d7a0
JD
5899{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5900echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5901case $ac_cv_sys_large_files in #(
5902 no | unknown) ;;
5903 *)
c0d27fcc 5904cat >>confdefs.h <<_ACEOF
f4988be7 5905#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5906_ACEOF
f053c89f
CY
5907;;
5908esac
503d2be0 5909rm -f conftest*
f053c89f 5910 fi
503d2be0 5911fi
ba4481b5 5912
c0d27fcc 5913
439f58ee 5914
55e6d9b2 5915### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888 5916### be located in either /usr/lib64 or /usr/lib.
076f0c7d
GM
5917### In some rare cases, /usr/lib64 exists but does not contain the
5918### relevant files (bug#1287). Hence test for crtn.o.
bc5d9888 5919case "${canonical}" in
55e6d9b2 5920 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
076f0c7d 5921 if test -e /usr/lib64/crtn.o; then
bc5d9888
CY
5922
5923cat >>confdefs.h <<\_ACEOF
55e6d9b2 5924#define HAVE_LIB64_DIR 1
bc5d9888
CY
5925_ACEOF
5926
5927fi
5928esac
5929
439f58ee
JD
5930
5931
5932
2c9dccc9
PJ
5933if test "${with_sound}" != "no"; then
5934 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5935
5936
5937
5938for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5939do
5940as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5941if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5942 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5943echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5944if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5945 echo $ECHO_N "(cached) $ECHO_C" >&6
5946fi
ca81d7a0
JD
5947ac_res=`eval echo '${'$as_ac_Header'}'`
5948 { echo "$as_me:$LINENO: result: $ac_res" >&5
5949echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5950else
5951 # Is the header compilable?
ca81d7a0
JD
5952{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5953echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5954cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5955/* confdefs.h. */
5956_ACEOF
5957cat confdefs.h >>conftest.$ac_ext
5958cat >>conftest.$ac_ext <<_ACEOF
5959/* end confdefs.h. */
c0d27fcc 5960$ac_includes_default
98418dba 5961#include <$ac_header>
503d2be0 5962_ACEOF
c0d27fcc 5963rm -f conftest.$ac_objext
ca81d7a0
JD
5964if { (ac_try="$ac_compile"
5965case "(($ac_try" in
5966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5967 *) ac_try_echo=$ac_try;;
5968esac
5969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5970 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5971 ac_status=$?
edfaf76d
LK
5972 grep -v '^ *+' conftest.er1 >conftest.err
5973 rm -f conftest.er1
5974 cat conftest.err >&5
c0d27fcc 5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5976 (exit $ac_status); } && {
5977 test -z "$ac_c_werror_flag" ||
5978 test ! -s conftest.err
5979 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5980 ac_header_compiler=yes
5981else
5982 echo "$as_me: failed program was:" >&5
19650fd6
AS
5983sed 's/^/| /' conftest.$ac_ext >&5
5984
ca81d7a0 5985 ac_header_compiler=no
c0d27fcc 5986fi
ca81d7a0
JD
5987
5988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5989{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5990echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5991
5992# Is the header present?
ca81d7a0
JD
5993{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5994echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5995cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5996/* confdefs.h. */
5997_ACEOF
5998cat confdefs.h >>conftest.$ac_ext
5999cat >>conftest.$ac_ext <<_ACEOF
6000/* end confdefs.h. */
c0d27fcc
MR
6001#include <$ac_header>
6002_ACEOF
ca81d7a0
JD
6003if { (ac_try="$ac_cpp conftest.$ac_ext"
6004case "(($ac_try" in
6005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6006 *) ac_try_echo=$ac_try;;
6007esac
6008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6009 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6010 ac_status=$?
6bae0ccf 6011 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6012 rm -f conftest.er1
6013 cat conftest.err >&5
c0d27fcc 6014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6015 (exit $ac_status); } >/dev/null && {
6016 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6017 test ! -s conftest.err
6018 }; then
c0d27fcc 6019 ac_header_preproc=yes
f4988be7 6020else
503d2be0 6021 echo "$as_me: failed program was:" >&5
19650fd6
AS
6022sed 's/^/| /' conftest.$ac_ext >&5
6023
c0d27fcc 6024 ac_header_preproc=no
f4988be7 6025fi
ca81d7a0 6026
98418dba 6027rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6028{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6029echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6030
6031# So? What about this header?
edfaf76d
LK
6032case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6033 yes:no: )
c0d27fcc
MR
6034 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6035echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6036 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6037echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6038 ac_header_preproc=yes
19650fd6 6039 ;;
edfaf76d 6040 no:yes:* )
c0d27fcc
MR
6041 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6042echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6043 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6044echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6045 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6046echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6047 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6048echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6049 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6050echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6051 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6052echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6053
19650fd6 6054 ;;
c0d27fcc 6055esac
ca81d7a0
JD
6056{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6057echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6058if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6059 echo $ECHO_N "(cached) $ECHO_C" >&6
6060else
edfaf76d 6061 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6062fi
ca81d7a0
JD
6063ac_res=`eval echo '${'$as_ac_Header'}'`
6064 { echo "$as_me:$LINENO: result: $ac_res" >&5
6065echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6066
6067fi
98418dba 6068if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6069 cat >>confdefs.h <<_ACEOF
98418dba 6070#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6071_ACEOF
f4988be7
GM
6072
6073fi
c0d27fcc 6074
98418dba
CW
6075done
6076
6077 # Emulation library used on NetBSD.
ca81d7a0
JD
6078 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6079echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6080if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6081 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6082else
98418dba
CW
6083 ac_check_lib_save_LIBS=$LIBS
6084LIBS="-lossaudio $LIBS"
6085cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6086/* confdefs.h. */
6087_ACEOF
6088cat confdefs.h >>conftest.$ac_ext
6089cat >>conftest.$ac_ext <<_ACEOF
6090/* end confdefs.h. */
98418dba 6091
ca81d7a0
JD
6092/* Override any GCC internal prototype to avoid an error.
6093 Use char because int might match the return type of a GCC
6094 builtin and then its argument prototype would still apply. */
98418dba
CW
6095#ifdef __cplusplus
6096extern "C"
f4988be7 6097#endif
98418dba 6098char _oss_ioctl ();
503d2be0
AS
6099int
6100main ()
6101{
ca81d7a0 6102return _oss_ioctl ();
503d2be0
AS
6103 ;
6104 return 0;
6105}
6106_ACEOF
98418dba 6107rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6108if { (ac_try="$ac_link"
6109case "(($ac_try" in
6110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6111 *) ac_try_echo=$ac_try;;
6112esac
6113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6114 (eval "$ac_link") 2>conftest.er1
503d2be0 6115 ac_status=$?
edfaf76d
LK
6116 grep -v '^ *+' conftest.er1 >conftest.err
6117 rm -f conftest.er1
6118 cat conftest.err >&5
c0d27fcc 6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6120 (exit $ac_status); } && {
6121 test -z "$ac_c_werror_flag" ||
6122 test ! -s conftest.err
6123 } && test -s conftest$ac_exeext &&
6124 $as_test_x conftest$ac_exeext; then
98418dba 6125 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6126else
503d2be0 6127 echo "$as_me: failed program was:" >&5
19650fd6
AS
6128sed 's/^/| /' conftest.$ac_ext >&5
6129
ca81d7a0 6130 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6131fi
ca81d7a0 6132
f053c89f 6133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6134 conftest$ac_exeext conftest.$ac_ext
98418dba 6135LIBS=$ac_check_lib_save_LIBS
f4988be7 6136fi
ca81d7a0
JD
6137{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6138echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6139if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6140 LIBSOUND=-lossaudio
6141else
6142 LIBSOUND=
6143fi
6144
c0d27fcc 6145
439f58ee
JD
6146
6147 ALSA_REQUIRED=1.0.0
6148 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6149
6150 succeeded=no
6151
00b9c927 6152 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6153set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6154{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6155echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6156if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6157 echo $ECHO_N "(cached) $ECHO_C" >&6
6158else
6159 case $PKG_CONFIG in
6160 [\\/]* | ?:[\\/]*)
6161 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6162 ;;
6163 *)
6164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH
6166do
6167 IFS=$as_save_IFS
6168 test -z "$as_dir" && as_dir=.
6169 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6171 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6173 break 2
6174 fi
6175done
6176done
ca81d7a0 6177IFS=$as_save_IFS
439f58ee
JD
6178
6179 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6180 ;;
6181esac
6182fi
6183PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6184if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6185 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6186echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6187else
ca81d7a0
JD
6188 { echo "$as_me:$LINENO: result: no" >&5
6189echo "${ECHO_T}no" >&6; }
439f58ee
JD
6190fi
6191
ca81d7a0 6192
439f58ee
JD
6193
6194 if test "$PKG_CONFIG" = "no" ; then
6195 HAVE_ALSA=no
6196 else
6197 PKG_CONFIG_MIN_VERSION=0.9.0
6198 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6199 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6200echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6201
67db6aa2 6202 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6203 { echo "$as_me:$LINENO: result: yes" >&5
6204echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6205 succeeded=yes
6206
ca81d7a0
JD
6207 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6208echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6209 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6210 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6211echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6212
ca81d7a0
JD
6213 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6214echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6215 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6216 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6217echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6218 else
ca81d7a0
JD
6219 { echo "$as_me:$LINENO: result: no" >&5
6220echo "${ECHO_T}no" >&6; }
439f58ee
JD
6221 ALSA_CFLAGS=""
6222 ALSA_LIBS=""
6223 ## If we have a custom action on failure, don't print errors, but
6224 ## do set a variable so people can do so.
6225 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6226
6227 fi
6228
6229
6230
6231 else
6232 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6233 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6234 fi
6235 fi
6236
6237 if test $succeeded = yes; then
6238 HAVE_ALSA=yes
6239 else
6240 HAVE_ALSA=no
6241 fi
6242
6243 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6244 SAVE_CFLAGS="$CFLAGS"
6245 SAVE_LDFLAGS="$LDFLAGS"
6246 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6247 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6248 cat >conftest.$ac_ext <<_ACEOF
6249/* confdefs.h. */
6250_ACEOF
6251cat confdefs.h >>conftest.$ac_ext
6252cat >>conftest.$ac_ext <<_ACEOF
6253/* end confdefs.h. */
6254#include <asoundlib.h>
6255int
6256main ()
6257{
6258snd_lib_error_set_handler (0);
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest.$ac_objext
6264if { (ac_try="$ac_compile"
6265case "(($ac_try" in
6266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6267 *) ac_try_echo=$ac_try;;
6268esac
6269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6270 (eval "$ac_compile") 2>conftest.er1
6271 ac_status=$?
6272 grep -v '^ *+' conftest.er1 >conftest.err
6273 rm -f conftest.er1
6274 cat conftest.err >&5
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6276 (exit $ac_status); } && {
6277 test -z "$ac_c_werror_flag" ||
6278 test ! -s conftest.err
6279 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6280 emacs_alsa_normal=yes
6281else
6282 echo "$as_me: failed program was:" >&5
6283sed 's/^/| /' conftest.$ac_ext >&5
6284
6285 emacs_alsa_normal=no
6286fi
6287
6288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6289 if test "$emacs_alsa_normal" != yes; then
6290 cat >conftest.$ac_ext <<_ACEOF
6291/* confdefs.h. */
6292_ACEOF
6293cat confdefs.h >>conftest.$ac_ext
6294cat >>conftest.$ac_ext <<_ACEOF
6295/* end confdefs.h. */
6296#include <alsa/asoundlib.h>
6297int
6298main ()
6299{
6300snd_lib_error_set_handler (0);
6301 ;
6302 return 0;
6303}
6304_ACEOF
6305rm -f conftest.$ac_objext
6306if { (ac_try="$ac_compile"
6307case "(($ac_try" in
6308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6309 *) ac_try_echo=$ac_try;;
6310esac
6311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6312 (eval "$ac_compile") 2>conftest.er1
6313 ac_status=$?
6314 grep -v '^ *+' conftest.er1 >conftest.err
6315 rm -f conftest.er1
6316 cat conftest.err >&5
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6318 (exit $ac_status); } && {
6319 test -z "$ac_c_werror_flag" ||
6320 test ! -s conftest.err
6321 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6322 emacs_alsa_subdir=yes
6323else
6324 echo "$as_me: failed program was:" >&5
6325sed 's/^/| /' conftest.$ac_ext >&5
6326
6327 emacs_alsa_subdir=no
6328fi
6329
6330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6331 if test "$emacs_alsa_subdir" != yes; then
6332 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6333echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6334 { (exit 1); exit 1; }; }
6335 fi
6336 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6337 fi
6338
6339 CFLAGS="$SAVE_CFLAGS"
6340 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6341 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6342 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6343
6344cat >>confdefs.h <<\_ACEOF
6345#define HAVE_ALSA 1
6346_ACEOF
6347
6348 fi
6349
f4988be7 6350fi
c0d27fcc
MR
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
22044edf
DL
6369
6370
973a76b1 6371
cffcede7 6372
551ffc27 6373
226e2359 6374
c0d27fcc 6375
f4988be7 6376
98418dba
CW
6377for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6378 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6379 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6380 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6381 sys/utsname.h pwd.h
98418dba
CW
6382do
6383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6384if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6385 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6386echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6388 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6389fi
ca81d7a0
JD
6390ac_res=`eval echo '${'$as_ac_Header'}'`
6391 { echo "$as_me:$LINENO: result: $ac_res" >&5
6392echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6393else
c0d27fcc 6394 # Is the header compilable?
ca81d7a0
JD
6395{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6396echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6397cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6398/* confdefs.h. */
6399_ACEOF
6400cat confdefs.h >>conftest.$ac_ext
6401cat >>conftest.$ac_ext <<_ACEOF
6402/* end confdefs.h. */
c0d27fcc
MR
6403$ac_includes_default
6404#include <$ac_header>
6405_ACEOF
6406rm -f conftest.$ac_objext
ca81d7a0
JD
6407if { (ac_try="$ac_compile"
6408case "(($ac_try" in
6409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6410 *) ac_try_echo=$ac_try;;
6411esac
6412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6413 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6414 ac_status=$?
edfaf76d
LK
6415 grep -v '^ *+' conftest.er1 >conftest.err
6416 rm -f conftest.er1
6417 cat conftest.err >&5
c0d27fcc 6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6419 (exit $ac_status); } && {
6420 test -z "$ac_c_werror_flag" ||
6421 test ! -s conftest.err
6422 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6423 ac_header_compiler=yes
6424else
6425 echo "$as_me: failed program was:" >&5
19650fd6
AS
6426sed 's/^/| /' conftest.$ac_ext >&5
6427
ca81d7a0 6428 ac_header_compiler=no
c0d27fcc 6429fi
ca81d7a0
JD
6430
6431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6433echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6434
6435# Is the header present?
ca81d7a0
JD
6436{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6437echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6438cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
98418dba 6444#include <$ac_header>
503d2be0 6445_ACEOF
ca81d7a0
JD
6446if { (ac_try="$ac_cpp conftest.$ac_ext"
6447case "(($ac_try" in
6448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6449 *) ac_try_echo=$ac_try;;
6450esac
6451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6452 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6453 ac_status=$?
6bae0ccf 6454 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6455 rm -f conftest.er1
6456 cat conftest.err >&5
c0d27fcc 6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6458 (exit $ac_status); } >/dev/null && {
6459 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6460 test ! -s conftest.err
6461 }; then
c0d27fcc 6462 ac_header_preproc=yes
34ec9ebe 6463else
503d2be0 6464 echo "$as_me: failed program was:" >&5
19650fd6
AS
6465sed 's/^/| /' conftest.$ac_ext >&5
6466
c0d27fcc 6467 ac_header_preproc=no
34ec9ebe 6468fi
ca81d7a0 6469
98418dba 6470rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6471{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6472echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6473
6474# So? What about this header?
edfaf76d
LK
6475case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6476 yes:no: )
c0d27fcc
MR
6477 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6478echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6479 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6480echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6481 ac_header_preproc=yes
19650fd6 6482 ;;
edfaf76d 6483 no:yes:* )
c0d27fcc
MR
6484 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6485echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6486 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6487echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6488 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6489echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6490 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6491echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6492 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6493echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6494 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6495echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6496
19650fd6 6497 ;;
c0d27fcc 6498esac
ca81d7a0
JD
6499{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6500echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6501if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6502 echo $ECHO_N "(cached) $ECHO_C" >&6
6503else
edfaf76d 6504 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6505fi
ca81d7a0
JD
6506ac_res=`eval echo '${'$as_ac_Header'}'`
6507 { echo "$as_me:$LINENO: result: $ac_res" >&5
6508echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6509
6510fi
98418dba 6511if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6512 cat >>confdefs.h <<_ACEOF
98418dba 6513#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6514_ACEOF
34ec9ebe 6515
98418dba 6516fi
c0d27fcc 6517
98418dba
CW
6518done
6519
22044edf 6520
ca81d7a0
JD
6521{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6522echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6523cat >conftest.$ac_ext <<_ACEOF
6524/* confdefs.h. */
6525_ACEOF
6526cat confdefs.h >>conftest.$ac_ext
6527cat >>conftest.$ac_ext <<_ACEOF
6528/* end confdefs.h. */
6529#include <sys/personality.h>
6530int
6531main ()
6532{
6533personality (PER_LINUX32)
6534 ;
6535 return 0;
6536}
6537_ACEOF
6538rm -f conftest.$ac_objext
ca81d7a0
JD
6539if { (ac_try="$ac_compile"
6540case "(($ac_try" in
6541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6542 *) ac_try_echo=$ac_try;;
6543esac
6544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6545 (eval "$ac_compile") 2>conftest.er1
f17e308a 6546 ac_status=$?
edfaf76d
LK
6547 grep -v '^ *+' conftest.er1 >conftest.err
6548 rm -f conftest.er1
6549 cat conftest.err >&5
f17e308a 6550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6551 (exit $ac_status); } && {
6552 test -z "$ac_c_werror_flag" ||
6553 test ! -s conftest.err
6554 } && test -s conftest.$ac_objext; then
f17e308a
JD
6555 emacs_cv_personality_linux32=yes
6556else
6557 echo "$as_me: failed program was:" >&5
6558sed 's/^/| /' conftest.$ac_ext >&5
6559
ca81d7a0 6560 emacs_cv_personality_linux32=no
f17e308a 6561fi
ca81d7a0
JD
6562
6563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6564{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6565echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6566
6567if test $emacs_cv_personality_linux32 = yes; then
6568
6569cat >>confdefs.h <<\_ACEOF
6570#define HAVE_PERSONALITY_LINUX32 1
6571_ACEOF
6572
6573fi
6574
6575
22044edf
DL
6576for ac_header in term.h
6577do
6578as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6579{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6580echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6581if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6582 echo $ECHO_N "(cached) $ECHO_C" >&6
6583else
6584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
22044edf
DL
6590#include <$ac_header>
6591_ACEOF
ca81d7a0
JD
6592if { (ac_try="$ac_cpp conftest.$ac_ext"
6593case "(($ac_try" in
6594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6595 *) ac_try_echo=$ac_try;;
6596esac
6597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6598 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6599 ac_status=$?
6600 grep -v '^ *+' conftest.er1 >conftest.err
6601 rm -f conftest.er1
6602 cat conftest.err >&5
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6604 (exit $ac_status); } >/dev/null && {
6605 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6606 test ! -s conftest.err
6607 }; then
22044edf
DL
6608 eval "$as_ac_Header=yes"
6609else
6610 echo "$as_me: failed program was:" >&5
19650fd6
AS
6611sed 's/^/| /' conftest.$ac_ext >&5
6612
22044edf
DL
6613 eval "$as_ac_Header=no"
6614fi
ca81d7a0 6615
22044edf
DL
6616rm -f conftest.err conftest.$ac_ext
6617fi
ca81d7a0
JD
6618ac_res=`eval echo '${'$as_ac_Header'}'`
6619 { echo "$as_me:$LINENO: result: $ac_res" >&5
6620echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6621if test `eval echo '${'$as_ac_Header'}'` = yes; then
6622 cat >>confdefs.h <<_ACEOF
6623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6624_ACEOF
6625
6626fi
6627
6628done
6629
ca81d7a0
JD
6630{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6631echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6632if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6634else
503d2be0 6635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6636/* confdefs.h. */
6637_ACEOF
6638cat confdefs.h >>conftest.$ac_ext
6639cat >>conftest.$ac_ext <<_ACEOF
6640/* end confdefs.h. */
98418dba
CW
6641#include <stdlib.h>
6642#include <stdarg.h>
6643#include <string.h>
6644#include <float.h>
6645
19650fd6
AS
6646int
6647main ()
6648{
6649
6650 ;
6651 return 0;
6652}
98418dba 6653_ACEOF
19650fd6 6654rm -f conftest.$ac_objext
ca81d7a0
JD
6655if { (ac_try="$ac_compile"
6656case "(($ac_try" in
6657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6658 *) ac_try_echo=$ac_try;;
6659esac
6660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6661 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6662 ac_status=$?
edfaf76d
LK
6663 grep -v '^ *+' conftest.er1 >conftest.err
6664 rm -f conftest.er1
6665 cat conftest.err >&5
cd958eb3 6666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6667 (exit $ac_status); } && {
6668 test -z "$ac_c_werror_flag" ||
6669 test ! -s conftest.err
6670 } && test -s conftest.$ac_objext; then
98418dba 6671 ac_cv_header_stdc=yes
ba4481b5 6672else
503d2be0 6673 echo "$as_me: failed program was:" >&5
19650fd6
AS
6674sed 's/^/| /' conftest.$ac_ext >&5
6675
ca81d7a0 6676 ac_cv_header_stdc=no
ba4481b5 6677fi
ca81d7a0
JD
6678
6679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6680
6681if test $ac_cv_header_stdc = yes; then
6682 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6683 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6684/* confdefs.h. */
6685_ACEOF
6686cat confdefs.h >>conftest.$ac_ext
6687cat >>conftest.$ac_ext <<_ACEOF
6688/* end confdefs.h. */
98418dba
CW
6689#include <string.h>
6690
6691_ACEOF
6692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6693 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6694 :
6695else
6696 ac_cv_header_stdc=no
ba4481b5 6697fi
98418dba 6698rm -f conftest*
ba4481b5
DL
6699
6700fi
6701
98418dba
CW
6702if test $ac_cv_header_stdc = yes; then
6703 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6704 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6705/* confdefs.h. */
6706_ACEOF
6707cat confdefs.h >>conftest.$ac_ext
6708cat >>conftest.$ac_ext <<_ACEOF
6709/* end confdefs.h. */
98418dba
CW
6710#include <stdlib.h>
6711
6712_ACEOF
6713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6714 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6715 :
6716else
6717 ac_cv_header_stdc=no
6718fi
6719rm -f conftest*
6720
6721fi
6722
6723if test $ac_cv_header_stdc = yes; then
6724 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6725 if test "$cross_compiling" = yes; then
6726 :
d42122a3 6727else
503d2be0 6728 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6729/* confdefs.h. */
6730_ACEOF
6731cat confdefs.h >>conftest.$ac_ext
6732cat >>conftest.$ac_ext <<_ACEOF
6733/* end confdefs.h. */
98418dba 6734#include <ctype.h>
ca81d7a0 6735#include <stdlib.h>
98418dba
CW
6736#if ((' ' & 0x0FF) == 0x020)
6737# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6738# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6739#else
19650fd6 6740# define ISLOWER(c) \
edfaf76d
LK
6741 (('a' <= (c) && (c) <= 'i') \
6742 || ('j' <= (c) && (c) <= 'r') \
6743 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6744# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6745#endif
6746
6747#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6748int
6749main ()
6750{
98418dba
CW
6751 int i;
6752 for (i = 0; i < 256; i++)
6753 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6754 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6755 return 2;
6756 return 0;
503d2be0
AS
6757}
6758_ACEOF
98418dba 6759rm -f conftest$ac_exeext
ca81d7a0
JD
6760if { (ac_try="$ac_link"
6761case "(($ac_try" in
6762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6763 *) ac_try_echo=$ac_try;;
6764esac
6765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6766 (eval "$ac_link") 2>&5
503d2be0 6767 ac_status=$?
c0d27fcc 6768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6770 { (case "(($ac_try" in
6771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6772 *) ac_try_echo=$ac_try;;
6773esac
6774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6775 (eval "$ac_try") 2>&5
503d2be0 6776 ac_status=$?
c0d27fcc 6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6778 (exit $ac_status); }; }; then
98418dba 6779 :
d42122a3 6780else
98418dba
CW
6781 echo "$as_me: program exited with status $ac_status" >&5
6782echo "$as_me: failed program was:" >&5
19650fd6
AS
6783sed 's/^/| /' conftest.$ac_ext >&5
6784
c0d27fcc 6785( exit $ac_status )
98418dba 6786ac_cv_header_stdc=no
d42122a3 6787fi
ca81d7a0 6788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6789fi
ca81d7a0
JD
6790
6791
98418dba
CW
6792fi
6793fi
ca81d7a0
JD
6794{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6795echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6796if test $ac_cv_header_stdc = yes; then
6797
c0d27fcc 6798cat >>confdefs.h <<\_ACEOF
98418dba 6799#define STDC_HEADERS 1
c0d27fcc 6800_ACEOF
d42122a3
DL
6801
6802fi
6803
ca81d7a0
JD
6804{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6805echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6806if test "${ac_cv_header_time+set}" = set; then
503d2be0 6807 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6808else
503d2be0 6809 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6810/* confdefs.h. */
6811_ACEOF
6812cat confdefs.h >>conftest.$ac_ext
6813cat >>conftest.$ac_ext <<_ACEOF
6814/* end confdefs.h. */
ba4481b5 6815#include <sys/types.h>
98418dba 6816#include <sys/time.h>
ba4481b5 6817#include <time.h>
503d2be0
AS
6818
6819int
6820main ()
6821{
98418dba
CW
6822if ((struct tm *) 0)
6823return 0;
503d2be0
AS
6824 ;
6825 return 0;
6826}
6827_ACEOF
6828rm -f conftest.$ac_objext
ca81d7a0
JD
6829if { (ac_try="$ac_compile"
6830case "(($ac_try" in
6831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6832 *) ac_try_echo=$ac_try;;
6833esac
6834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6835 (eval "$ac_compile") 2>conftest.er1
503d2be0 6836 ac_status=$?
edfaf76d
LK
6837 grep -v '^ *+' conftest.er1 >conftest.err
6838 rm -f conftest.er1
6839 cat conftest.err >&5
c0d27fcc 6840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6841 (exit $ac_status); } && {
6842 test -z "$ac_c_werror_flag" ||
6843 test ! -s conftest.err
6844 } && test -s conftest.$ac_objext; then
98418dba 6845 ac_cv_header_time=yes
ba4481b5 6846else
503d2be0 6847 echo "$as_me: failed program was:" >&5
19650fd6
AS
6848sed 's/^/| /' conftest.$ac_ext >&5
6849
ca81d7a0 6850 ac_cv_header_time=no
ba4481b5 6851fi
ca81d7a0
JD
6852
6853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6854fi
ca81d7a0
JD
6855{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6856echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6857if test $ac_cv_header_time = yes; then
503d2be0 6858
c0d27fcc 6859cat >>confdefs.h <<\_ACEOF
98418dba 6860#define TIME_WITH_SYS_TIME 1
c0d27fcc 6861_ACEOF
ba4481b5
DL
6862
6863fi
6864
ca81d7a0
JD
6865{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6866echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6867if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6868 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6869else
503d2be0 6870 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6871/* confdefs.h. */
6872_ACEOF
6873cat confdefs.h >>conftest.$ac_ext
6874cat >>conftest.$ac_ext <<_ACEOF
6875/* end confdefs.h. */
cd958eb3
MB
6876$ac_includes_default
6877int
6878main ()
6879{
6880#ifndef sys_siglist
f053c89f 6881 (void) sys_siglist;
98418dba 6882#endif
503d2be0 6883
cd958eb3
MB
6884 ;
6885 return 0;
6886}
6887_ACEOF
6888rm -f conftest.$ac_objext
ca81d7a0
JD
6889if { (ac_try="$ac_compile"
6890case "(($ac_try" in
6891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6892 *) ac_try_echo=$ac_try;;
6893esac
6894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6895 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6896 ac_status=$?
edfaf76d
LK
6897 grep -v '^ *+' conftest.er1 >conftest.err
6898 rm -f conftest.er1
6899 cat conftest.err >&5
cd958eb3 6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6901 (exit $ac_status); } && {
6902 test -z "$ac_c_werror_flag" ||
6903 test ! -s conftest.err
6904 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6905 ac_cv_have_decl_sys_siglist=yes
6906else
6907 echo "$as_me: failed program was:" >&5
19650fd6
AS
6908sed 's/^/| /' conftest.$ac_ext >&5
6909
ca81d7a0 6910 ac_cv_have_decl_sys_siglist=no
cd958eb3 6911fi
ca81d7a0
JD
6912
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6914fi
ca81d7a0
JD
6915{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6916echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6917if test $ac_cv_have_decl_sys_siglist = yes; then
6918
6919cat >>confdefs.h <<_ACEOF
6920#define HAVE_DECL_SYS_SIGLIST 1
6921_ACEOF
6922
6923
6924else
6925 cat >>confdefs.h <<_ACEOF
6926#define HAVE_DECL_SYS_SIGLIST 0
6927_ACEOF
6928
6929
6930fi
6931
6932
6933if test $ac_cv_have_decl_sys_siglist != yes; then
6934 # For Tru64, at least:
ca81d7a0
JD
6935 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6936echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6937if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6938 echo $ECHO_N "(cached) $ECHO_C" >&6
6939else
6940 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6941/* confdefs.h. */
6942_ACEOF
6943cat confdefs.h >>conftest.$ac_ext
6944cat >>conftest.$ac_ext <<_ACEOF
6945/* end confdefs.h. */
cd958eb3 6946$ac_includes_default
503d2be0
AS
6947int
6948main ()
6949{
cd958eb3 6950#ifndef __sys_siglist
f053c89f 6951 (void) __sys_siglist;
cd958eb3
MB
6952#endif
6953
503d2be0
AS
6954 ;
6955 return 0;
6956}
6957_ACEOF
6958rm -f conftest.$ac_objext
ca81d7a0
JD
6959if { (ac_try="$ac_compile"
6960case "(($ac_try" in
6961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6962 *) ac_try_echo=$ac_try;;
6963esac
6964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6965 (eval "$ac_compile") 2>conftest.er1
503d2be0 6966 ac_status=$?
edfaf76d
LK
6967 grep -v '^ *+' conftest.er1 >conftest.err
6968 rm -f conftest.er1
6969 cat conftest.err >&5
c0d27fcc 6970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6971 (exit $ac_status); } && {
6972 test -z "$ac_c_werror_flag" ||
6973 test ! -s conftest.err
6974 } && test -s conftest.$ac_objext; then
cd958eb3 6975 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6976else
503d2be0 6977 echo "$as_me: failed program was:" >&5
19650fd6
AS
6978sed 's/^/| /' conftest.$ac_ext >&5
6979
ca81d7a0 6980 ac_cv_have_decl___sys_siglist=no
ba4481b5 6981fi
ca81d7a0
JD
6982
6983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6984fi
ca81d7a0
JD
6985{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6986echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6987if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6988
cd958eb3
MB
6989cat >>confdefs.h <<_ACEOF
6990#define HAVE_DECL___SYS_SIGLIST 1
6991_ACEOF
6992
6993
6994else
6995 cat >>confdefs.h <<_ACEOF
6996#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6997_ACEOF
503d2be0 6998
cd958eb3 6999
ba4481b5
DL
7000fi
7001
cd958eb3
MB
7002
7003 if test $ac_cv_have_decl___sys_siglist = yes; then
7004
7005cat >>confdefs.h <<\_ACEOF
7006#define sys_siglist __sys_siglist
7007_ACEOF
7008
7009 fi
7010fi
ca81d7a0
JD
7011{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7012echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7013if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7014 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7015else
503d2be0 7016 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
98418dba
CW
7022#include <sys/types.h>
7023#include <sys/wait.h>
7024#ifndef WEXITSTATUS
ca81d7a0 7025# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7026#endif
7027#ifndef WIFEXITED
7028# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7029#endif
503d2be0
AS
7030
7031int
7032main ()
7033{
98418dba
CW
7034 int s;
7035 wait (&s);
7036 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7037 ;
7038 return 0;
7039}
7040_ACEOF
98418dba 7041rm -f conftest.$ac_objext
ca81d7a0
JD
7042if { (ac_try="$ac_compile"
7043case "(($ac_try" in
7044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7045 *) ac_try_echo=$ac_try;;
7046esac
7047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7048 (eval "$ac_compile") 2>conftest.er1
503d2be0 7049 ac_status=$?
edfaf76d
LK
7050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
c0d27fcc 7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7054 (exit $ac_status); } && {
7055 test -z "$ac_c_werror_flag" ||
7056 test ! -s conftest.err
7057 } && test -s conftest.$ac_objext; then
98418dba 7058 ac_cv_header_sys_wait_h=yes
ba4481b5 7059else
503d2be0 7060 echo "$as_me: failed program was:" >&5
19650fd6
AS
7061sed 's/^/| /' conftest.$ac_ext >&5
7062
ca81d7a0 7063 ac_cv_header_sys_wait_h=no
ba4481b5 7064fi
ca81d7a0
JD
7065
7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7067fi
ca81d7a0
JD
7068{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7069echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7070if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7071
c0d27fcc 7072cat >>confdefs.h <<\_ACEOF
98418dba 7073#define HAVE_SYS_WAIT_H 1
c0d27fcc 7074_ACEOF
ba4481b5 7075
ba4481b5
DL
7076fi
7077
c0d27fcc 7078
ca81d7a0
JD
7079{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7080echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7081if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7082 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7083else
503d2be0 7084 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7085/* confdefs.h. */
7086_ACEOF
7087cat confdefs.h >>conftest.$ac_ext
7088cat >>conftest.$ac_ext <<_ACEOF
7089/* end confdefs.h. */
98418dba
CW
7090#ifdef TIME_WITH_SYS_TIME
7091#include <sys/time.h>
7092#include <time.h>
7093#else
7094#ifdef HAVE_SYS_TIME_H
7095#include <sys/time.h>
7096#else
1113b624 7097#include <time.h>
98418dba
CW
7098#endif
7099#endif
7100#ifdef HAVE_UTIME_H
7101#include <utime.h>
7102#endif
503d2be0
AS
7103int
7104main ()
7105{
98418dba 7106static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7107 ;
7108 return 0;
7109}
7110_ACEOF
98418dba 7111rm -f conftest.$ac_objext
ca81d7a0
JD
7112if { (ac_try="$ac_compile"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
7117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7118 (eval "$ac_compile") 2>conftest.er1
503d2be0 7119 ac_status=$?
edfaf76d
LK
7120 grep -v '^ *+' conftest.er1 >conftest.err
7121 rm -f conftest.er1
7122 cat conftest.err >&5
c0d27fcc 7123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7124 (exit $ac_status); } && {
7125 test -z "$ac_c_werror_flag" ||
7126 test ! -s conftest.err
7127 } && test -s conftest.$ac_objext; then
98418dba 7128 emacs_cv_struct_utimbuf=yes
1113b624 7129else
503d2be0 7130 echo "$as_me: failed program was:" >&5
19650fd6
AS
7131sed 's/^/| /' conftest.$ac_ext >&5
7132
ca81d7a0 7133 emacs_cv_struct_utimbuf=no
1113b624 7134fi
ca81d7a0
JD
7135
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7137fi
ca81d7a0
JD
7138{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7139echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7140if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7141
c0d27fcc 7142cat >>confdefs.h <<\_ACEOF
98418dba 7143#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7144_ACEOF
1113b624
PE
7145
7146fi
ba4481b5 7147
ca81d7a0
JD
7148{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7149echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7150if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7151 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7152else
98418dba 7153 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7154/* confdefs.h. */
7155_ACEOF
7156cat confdefs.h >>conftest.$ac_ext
7157cat >>conftest.$ac_ext <<_ACEOF
7158/* end confdefs.h. */
7397acc4 7159#include <sys/types.h>
98418dba 7160#include <signal.h>
98418dba 7161
503d2be0
AS
7162int
7163main ()
7164{
ca81d7a0 7165return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7166 ;
7167 return 0;
7168}
7169_ACEOF
98418dba 7170rm -f conftest.$ac_objext
ca81d7a0
JD
7171if { (ac_try="$ac_compile"
7172case "(($ac_try" in
7173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7174 *) ac_try_echo=$ac_try;;
7175esac
7176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7177 (eval "$ac_compile") 2>conftest.er1
503d2be0 7178 ac_status=$?
edfaf76d
LK
7179 grep -v '^ *+' conftest.er1 >conftest.err
7180 rm -f conftest.er1
7181 cat conftest.err >&5
c0d27fcc 7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7183 (exit $ac_status); } && {
7184 test -z "$ac_c_werror_flag" ||
7185 test ! -s conftest.err
7186 } && test -s conftest.$ac_objext; then
ca81d7a0 7187 ac_cv_type_signal=int
503d2be0
AS
7188else
7189 echo "$as_me: failed program was:" >&5
19650fd6
AS
7190sed 's/^/| /' conftest.$ac_ext >&5
7191
ca81d7a0 7192 ac_cv_type_signal=void
503d2be0 7193fi
ca81d7a0
JD
7194
7195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7196fi
ca81d7a0
JD
7197{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7198echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7199
c0d27fcc 7200cat >>confdefs.h <<_ACEOF
98418dba 7201#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7202_ACEOF
7203
503d2be0 7204
c0d27fcc 7205
ca81d7a0
JD
7206{ echo "$as_me:$LINENO: checking for speed_t" >&5
7207echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7208if test "${emacs_cv_speed_t+set}" = set; then
7209 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7210else
98418dba 7211 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7212/* confdefs.h. */
7213_ACEOF
7214cat confdefs.h >>conftest.$ac_ext
7215cat >>conftest.$ac_ext <<_ACEOF
7216/* end confdefs.h. */
98418dba 7217#include <termios.h>
98418dba
CW
7218int
7219main ()
7220{
7221speed_t x = 1;
7222 ;
7223 return 0;
7224}
7225_ACEOF
7226rm -f conftest.$ac_objext
ca81d7a0
JD
7227if { (ac_try="$ac_compile"
7228case "(($ac_try" in
7229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7230 *) ac_try_echo=$ac_try;;
7231esac
7232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7233 (eval "$ac_compile") 2>conftest.er1
98418dba 7234 ac_status=$?
edfaf76d
LK
7235 grep -v '^ *+' conftest.er1 >conftest.err
7236 rm -f conftest.er1
7237 cat conftest.err >&5
c0d27fcc 7238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7239 (exit $ac_status); } && {
7240 test -z "$ac_c_werror_flag" ||
7241 test ! -s conftest.err
7242 } && test -s conftest.$ac_objext; then
98418dba
CW
7243 emacs_cv_speed_t=yes
7244else
7245 echo "$as_me: failed program was:" >&5
19650fd6
AS
7246sed 's/^/| /' conftest.$ac_ext >&5
7247
ca81d7a0 7248 emacs_cv_speed_t=no
98418dba 7249fi
ca81d7a0
JD
7250
7251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7252fi
ca81d7a0
JD
7253{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7254echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7255if test $emacs_cv_speed_t = yes; then
b936fae4 7256
c0d27fcc 7257cat >>confdefs.h <<\_ACEOF
98418dba 7258#define HAVE_SPEED_T 1
c0d27fcc 7259_ACEOF
98418dba 7260
7397acc4
DL
7261fi
7262
ca81d7a0
JD
7263{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7264echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7265if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7266 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7267else
503d2be0 7268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7269/* confdefs.h. */
7270_ACEOF
7271cat confdefs.h >>conftest.$ac_ext
7272cat >>conftest.$ac_ext <<_ACEOF
7273/* end confdefs.h. */
98418dba
CW
7274#ifdef TIME_WITH_SYS_TIME
7275#include <sys/time.h>
7276#include <time.h>
7277#else
7278#ifdef HAVE_SYS_TIME_H
7279#include <sys/time.h>
7280#else
7281#include <time.h>
7282#endif
7283#endif
503d2be0
AS
7284int
7285main ()
7286{
98418dba 7287static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7288 ;
7289 return 0;
7290}
7291_ACEOF
7292rm -f conftest.$ac_objext
ca81d7a0
JD
7293if { (ac_try="$ac_compile"
7294case "(($ac_try" in
7295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7296 *) ac_try_echo=$ac_try;;
7297esac
7298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7299 (eval "$ac_compile") 2>conftest.er1
503d2be0 7300 ac_status=$?
edfaf76d
LK
7301 grep -v '^ *+' conftest.er1 >conftest.err
7302 rm -f conftest.er1
7303 cat conftest.err >&5
c0d27fcc 7304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7305 (exit $ac_status); } && {
7306 test -z "$ac_c_werror_flag" ||
7307 test ! -s conftest.err
7308 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7309 emacs_cv_struct_timeval=yes
7310else
503d2be0 7311 echo "$as_me: failed program was:" >&5
19650fd6
AS
7312sed 's/^/| /' conftest.$ac_ext >&5
7313
ca81d7a0 7314 emacs_cv_struct_timeval=no
7397acc4 7315fi
ca81d7a0
JD
7316
7317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7318fi
ca81d7a0
JD
7319{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7320echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7321HAVE_TIMEVAL=$emacs_cv_struct_timeval
7322if test $emacs_cv_struct_timeval = yes; then
b936fae4 7323
c0d27fcc 7324cat >>confdefs.h <<\_ACEOF
98418dba 7325#define HAVE_TIMEVAL 1
c0d27fcc 7326_ACEOF
7397acc4
DL
7327
7328fi
7329
ca81d7a0
JD
7330{ echo "$as_me:$LINENO: checking for struct exception" >&5
7331echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7332if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7333 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7334else
503d2be0 7335 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7336/* confdefs.h. */
7337_ACEOF
7338cat confdefs.h >>conftest.$ac_ext
7339cat >>conftest.$ac_ext <<_ACEOF
7340/* end confdefs.h. */
98418dba 7341#include <math.h>
503d2be0
AS
7342int
7343main ()
7344{
98418dba 7345static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7346 ;
7347 return 0;
ba4481b5 7348}
503d2be0
AS
7349_ACEOF
7350rm -f conftest.$ac_objext
ca81d7a0
JD
7351if { (ac_try="$ac_compile"
7352case "(($ac_try" in
7353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7354 *) ac_try_echo=$ac_try;;
7355esac
7356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7357 (eval "$ac_compile") 2>conftest.er1
503d2be0 7358 ac_status=$?
edfaf76d
LK
7359 grep -v '^ *+' conftest.er1 >conftest.err
7360 rm -f conftest.er1
7361 cat conftest.err >&5
c0d27fcc 7362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7363 (exit $ac_status); } && {
7364 test -z "$ac_c_werror_flag" ||
7365 test ! -s conftest.err
7366 } && test -s conftest.$ac_objext; then
98418dba 7367 emacs_cv_struct_exception=yes
ba4481b5 7368else
503d2be0 7369 echo "$as_me: failed program was:" >&5
19650fd6
AS
7370sed 's/^/| /' conftest.$ac_ext >&5
7371
ca81d7a0 7372 emacs_cv_struct_exception=no
ba4481b5 7373fi
ca81d7a0
JD
7374
7375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7376fi
ca81d7a0
JD
7377{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7378echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7379HAVE_EXCEPTION=$emacs_cv_struct_exception
7380if test $emacs_cv_struct_exception != yes; then
b936fae4 7381
c0d27fcc 7382cat >>confdefs.h <<\_ACEOF
98418dba 7383#define NO_MATHERR 1
c0d27fcc 7384_ACEOF
ba4481b5
DL
7385
7386fi
7387
7862d3a8
AS
7388
7389for ac_header in sys/socket.h
7390do
7391as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7392if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7393 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7394echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7395if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7396 echo $ECHO_N "(cached) $ECHO_C" >&6
7397fi
ca81d7a0
JD
7398ac_res=`eval echo '${'$as_ac_Header'}'`
7399 { echo "$as_me:$LINENO: result: $ac_res" >&5
7400echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7401else
7402 # Is the header compilable?
ca81d7a0
JD
7403{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7404echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7405cat >conftest.$ac_ext <<_ACEOF
7406/* confdefs.h. */
7407_ACEOF
7408cat confdefs.h >>conftest.$ac_ext
7409cat >>conftest.$ac_ext <<_ACEOF
7410/* end confdefs.h. */
7411$ac_includes_default
7412#include <$ac_header>
7413_ACEOF
7414rm -f conftest.$ac_objext
ca81d7a0
JD
7415if { (ac_try="$ac_compile"
7416case "(($ac_try" in
7417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7418 *) ac_try_echo=$ac_try;;
7419esac
7420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7421 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7422 ac_status=$?
edfaf76d
LK
7423 grep -v '^ *+' conftest.er1 >conftest.err
7424 rm -f conftest.er1
7425 cat conftest.err >&5
7862d3a8 7426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7427 (exit $ac_status); } && {
7428 test -z "$ac_c_werror_flag" ||
7429 test ! -s conftest.err
7430 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7431 ac_header_compiler=yes
7432else
7433 echo "$as_me: failed program was:" >&5
7434sed 's/^/| /' conftest.$ac_ext >&5
7435
ca81d7a0 7436 ac_header_compiler=no
7862d3a8 7437fi
ca81d7a0
JD
7438
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7441echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7442
7443# Is the header present?
ca81d7a0
JD
7444{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7445echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7446cat >conftest.$ac_ext <<_ACEOF
7447/* confdefs.h. */
7448_ACEOF
7449cat confdefs.h >>conftest.$ac_ext
7450cat >>conftest.$ac_ext <<_ACEOF
7451/* end confdefs.h. */
7452#include <$ac_header>
7453_ACEOF
ca81d7a0
JD
7454if { (ac_try="$ac_cpp conftest.$ac_ext"
7455case "(($ac_try" in
7456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7457 *) ac_try_echo=$ac_try;;
7458esac
7459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7460 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7461 ac_status=$?
7462 grep -v '^ *+' conftest.er1 >conftest.err
7463 rm -f conftest.er1
7464 cat conftest.err >&5
7465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7466 (exit $ac_status); } >/dev/null && {
7467 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7468 test ! -s conftest.err
7469 }; then
7862d3a8
AS
7470 ac_header_preproc=yes
7471else
7472 echo "$as_me: failed program was:" >&5
7473sed 's/^/| /' conftest.$ac_ext >&5
7474
7475 ac_header_preproc=no
7476fi
ca81d7a0 7477
7862d3a8 7478rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7479{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7480echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7481
7482# So? What about this header?
edfaf76d
LK
7483case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7484 yes:no: )
7862d3a8
AS
7485 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7486echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7487 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7488echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7489 ac_header_preproc=yes
7862d3a8 7490 ;;
edfaf76d 7491 no:yes:* )
7862d3a8
AS
7492 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7493echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7494 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7495echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7496 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7497echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7498 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7499echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7500 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7501echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7502 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7503echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7504
7862d3a8
AS
7505 ;;
7506esac
ca81d7a0
JD
7507{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7508echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7509if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7510 echo $ECHO_N "(cached) $ECHO_C" >&6
7511else
edfaf76d 7512 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7513fi
ca81d7a0
JD
7514ac_res=`eval echo '${'$as_ac_Header'}'`
7515 { echo "$as_me:$LINENO: result: $ac_res" >&5
7516echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7517
7518fi
7519if test `eval echo '${'$as_ac_Header'}'` = yes; then
7520 cat >>confdefs.h <<_ACEOF
7521#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7522_ACEOF
7523
7524fi
7525
7526done
7527
7528
7529for ac_header in net/if.h
7530do
7531as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7532{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7533echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7534if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7535 echo $ECHO_N "(cached) $ECHO_C" >&6
7536else
7537 cat >conftest.$ac_ext <<_ACEOF
7538/* confdefs.h. */
7539_ACEOF
7540cat confdefs.h >>conftest.$ac_ext
7541cat >>conftest.$ac_ext <<_ACEOF
7542/* end confdefs.h. */
7543$ac_includes_default
7544#if HAVE_SYS_SOCKET_H
7545#include <sys/socket.h>
7546#endif
7547
7548#include <$ac_header>
7549_ACEOF
7550rm -f conftest.$ac_objext
ca81d7a0
JD
7551if { (ac_try="$ac_compile"
7552case "(($ac_try" in
7553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7554 *) ac_try_echo=$ac_try;;
7555esac
7556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7557 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7558 ac_status=$?
edfaf76d
LK
7559 grep -v '^ *+' conftest.er1 >conftest.err
7560 rm -f conftest.er1
7561 cat conftest.err >&5
7862d3a8 7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7563 (exit $ac_status); } && {
7564 test -z "$ac_c_werror_flag" ||
7565 test ! -s conftest.err
7566 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7567 eval "$as_ac_Header=yes"
7568else
7569 echo "$as_me: failed program was:" >&5
7570sed 's/^/| /' conftest.$ac_ext >&5
7571
ca81d7a0 7572 eval "$as_ac_Header=no"
7862d3a8 7573fi
ca81d7a0
JD
7574
7575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7576fi
ca81d7a0
JD
7577ac_res=`eval echo '${'$as_ac_Header'}'`
7578 { echo "$as_me:$LINENO: result: $ac_res" >&5
7579echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7580if test `eval echo '${'$as_ac_Header'}'` = yes; then
7581 cat >>confdefs.h <<_ACEOF
7582#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7583_ACEOF
7584
7585fi
7586
7587done
7588
7589
ca81d7a0
JD
7590{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7591echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7592if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7593 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7594else
503d2be0 7595 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7596/* confdefs.h. */
7597_ACEOF
7598cat confdefs.h >>conftest.$ac_ext
7599cat >>conftest.$ac_ext <<_ACEOF
7600/* end confdefs.h. */
98418dba
CW
7601#include <sys/types.h>
7602#include <time.h>
7397acc4 7603
503d2be0
AS
7604int
7605main ()
7606{
f053c89f
CY
7607struct tm tm;
7608 int *p = &tm.tm_sec;
7609 return !p;
503d2be0
AS
7610 ;
7611 return 0;
7612}
7613_ACEOF
7614rm -f conftest.$ac_objext
ca81d7a0
JD
7615if { (ac_try="$ac_compile"
7616case "(($ac_try" in
7617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7618 *) ac_try_echo=$ac_try;;
7619esac
7620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7621 (eval "$ac_compile") 2>conftest.er1
503d2be0 7622 ac_status=$?
edfaf76d
LK
7623 grep -v '^ *+' conftest.er1 >conftest.err
7624 rm -f conftest.er1
7625 cat conftest.err >&5
c0d27fcc 7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7627 (exit $ac_status); } && {
7628 test -z "$ac_c_werror_flag" ||
7629 test ! -s conftest.err
7630 } && test -s conftest.$ac_objext; then
35996d22
AS
7631 ac_cv_struct_tm=time.h
7632else
503d2be0 7633 echo "$as_me: failed program was:" >&5
19650fd6
AS
7634sed 's/^/| /' conftest.$ac_ext >&5
7635
ca81d7a0 7636 ac_cv_struct_tm=sys/time.h
7397acc4 7637fi
ca81d7a0
JD
7638
7639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7640fi
ca81d7a0
JD
7641{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7642echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7643if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7644
c0d27fcc 7645cat >>confdefs.h <<\_ACEOF
98418dba 7646#define TM_IN_SYS_TIME 1
c0d27fcc 7647_ACEOF
7397acc4
DL
7648
7649fi
ba4481b5 7650
ca81d7a0
JD
7651{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7652echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7653if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7654 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7655else
98418dba 7656 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7657/* confdefs.h. */
7658_ACEOF
7659cat confdefs.h >>conftest.$ac_ext
7660cat >>conftest.$ac_ext <<_ACEOF
7661/* end confdefs.h. */
98418dba
CW
7662#include <sys/types.h>
7663#include <$ac_cv_struct_tm>
ba4481b5 7664
c0d27fcc 7665
98418dba
CW
7666int
7667main ()
7668{
7669static struct tm ac_aggr;
7670if (ac_aggr.tm_zone)
7671return 0;
7672 ;
7673 return 0;
7674}
7675_ACEOF
7676rm -f conftest.$ac_objext
ca81d7a0
JD
7677if { (ac_try="$ac_compile"
7678case "(($ac_try" in
7679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7680 *) ac_try_echo=$ac_try;;
7681esac
7682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7683 (eval "$ac_compile") 2>conftest.er1
98418dba 7684 ac_status=$?
edfaf76d
LK
7685 grep -v '^ *+' conftest.er1 >conftest.err
7686 rm -f conftest.er1
7687 cat conftest.err >&5
c0d27fcc 7688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7689 (exit $ac_status); } && {
7690 test -z "$ac_c_werror_flag" ||
7691 test ! -s conftest.err
7692 } && test -s conftest.$ac_objext; then
98418dba 7693 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7694else
98418dba 7695 echo "$as_me: failed program was:" >&5
19650fd6
AS
7696sed 's/^/| /' conftest.$ac_ext >&5
7697
ca81d7a0 7698 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7699/* confdefs.h. */
7700_ACEOF
7701cat confdefs.h >>conftest.$ac_ext
7702cat >>conftest.$ac_ext <<_ACEOF
7703/* end confdefs.h. */
6bae0ccf
DL
7704#include <sys/types.h>
7705#include <$ac_cv_struct_tm>
7706
7707
7708int
7709main ()
7710{
7711static struct tm ac_aggr;
7712if (sizeof ac_aggr.tm_zone)
7713return 0;
7714 ;
7715 return 0;
7716}
7717_ACEOF
7718rm -f conftest.$ac_objext
ca81d7a0
JD
7719if { (ac_try="$ac_compile"
7720case "(($ac_try" in
7721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7722 *) ac_try_echo=$ac_try;;
7723esac
7724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7725 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7726 ac_status=$?
edfaf76d
LK
7727 grep -v '^ *+' conftest.er1 >conftest.err
7728 rm -f conftest.er1
7729 cat conftest.err >&5
6bae0ccf 7730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7731 (exit $ac_status); } && {
7732 test -z "$ac_c_werror_flag" ||
7733 test ! -s conftest.err
7734 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7735 ac_cv_member_struct_tm_tm_zone=yes
7736else
7737 echo "$as_me: failed program was:" >&5
19650fd6
AS
7738sed 's/^/| /' conftest.$ac_ext >&5
7739
ca81d7a0 7740 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7741fi
ca81d7a0
JD
7742
7743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7744fi
ca81d7a0
JD
7745
7746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7747fi
ca81d7a0
JD
7748{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7749echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7750if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7751
c0d27fcc 7752cat >>confdefs.h <<_ACEOF
98418dba 7753#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7754_ACEOF
7755
ba4481b5 7756
98418dba 7757fi
ba4481b5 7758
98418dba 7759if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7760
c0d27fcc 7761cat >>confdefs.h <<\_ACEOF
98418dba 7762#define HAVE_TM_ZONE 1
c0d27fcc 7763_ACEOF
ba4481b5 7764
ba4481b5 7765else
ca81d7a0
JD
7766 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7767echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7768if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7769 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7770else
98418dba 7771 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7772/* confdefs.h. */
7773_ACEOF
7774cat confdefs.h >>conftest.$ac_ext
7775cat >>conftest.$ac_ext <<_ACEOF
7776/* end confdefs.h. */
98418dba 7777#include <time.h>
98418dba 7778
98418dba
CW
7779int
7780main ()
7781{
ca81d7a0 7782#ifndef tzname
f053c89f 7783 (void) tzname;
ca81d7a0
JD
7784#endif
7785
6bae0ccf
DL
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790rm -f conftest.$ac_objext
ca81d7a0
JD
7791if { (ac_try="$ac_compile"
7792case "(($ac_try" in
7793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7794 *) ac_try_echo=$ac_try;;
7795esac
7796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7797 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7798 ac_status=$?
edfaf76d
LK
7799 grep -v '^ *+' conftest.er1 >conftest.err
7800 rm -f conftest.er1
7801 cat conftest.err >&5
6bae0ccf 7802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7803 (exit $ac_status); } && {
7804 test -z "$ac_c_werror_flag" ||
7805 test ! -s conftest.err
7806 } && test -s conftest.$ac_objext; then
ca81d7a0 7807 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7808else
7809 echo "$as_me: failed program was:" >&5
19650fd6
AS
7810sed 's/^/| /' conftest.$ac_ext >&5
7811
ca81d7a0 7812 ac_cv_have_decl_tzname=no
ba4481b5 7813fi
ca81d7a0
JD
7814
7815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7816fi
ca81d7a0
JD
7817{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7818echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7819if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7820
c0d27fcc 7821cat >>confdefs.h <<_ACEOF
ca81d7a0 7822#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7823_ACEOF
7824
ba4481b5 7825
ca81d7a0
JD
7826else
7827 cat >>confdefs.h <<_ACEOF
7828#define HAVE_DECL_TZNAME 0
7829_ACEOF
ba4481b5 7830
ba4481b5 7831
98418dba 7832fi
ba4481b5 7833
ca81d7a0
JD
7834
7835 { echo "$as_me:$LINENO: checking for tzname" >&5
7836echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7837if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7838 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7839else
98418dba 7840 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7841/* confdefs.h. */
7842_ACEOF
7843cat confdefs.h >>conftest.$ac_ext
7844cat >>conftest.$ac_ext <<_ACEOF
7845/* end confdefs.h. */
98418dba 7846#include <time.h>
ca81d7a0
JD
7847#if !HAVE_DECL_TZNAME
7848extern char *tzname[];
98418dba
CW
7849#endif
7850
98418dba
CW
7851int
7852main ()
7853{
ca81d7a0 7854return tzname[0][0];
98418dba
CW
7855 ;
7856 return 0;
7857}
7858_ACEOF
7859rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7860if { (ac_try="$ac_link"
7861case "(($ac_try" in
7862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7863 *) ac_try_echo=$ac_try;;
7864esac
7865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7866 (eval "$ac_link") 2>conftest.er1
98418dba 7867 ac_status=$?
edfaf76d
LK
7868 grep -v '^ *+' conftest.er1 >conftest.err
7869 rm -f conftest.er1
7870 cat conftest.err >&5
c0d27fcc 7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7872 (exit $ac_status); } && {
7873 test -z "$ac_c_werror_flag" ||
7874 test ! -s conftest.err
7875 } && test -s conftest$ac_exeext &&
7876 $as_test_x conftest$ac_exeext; then
98418dba
CW
7877 ac_cv_var_tzname=yes
7878else
7879 echo "$as_me: failed program was:" >&5
19650fd6
AS
7880sed 's/^/| /' conftest.$ac_ext >&5
7881
ca81d7a0 7882 ac_cv_var_tzname=no
ba4481b5 7883fi
6bae0ccf 7884
f053c89f 7885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7886 conftest$ac_exeext conftest.$ac_ext
98418dba 7887fi
ca81d7a0
JD
7888{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7889echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7890 if test $ac_cv_var_tzname = yes; then
ba4481b5 7891
c0d27fcc 7892cat >>confdefs.h <<\_ACEOF
98418dba 7893#define HAVE_TZNAME 1
c0d27fcc 7894_ACEOF
503d2be0 7895
98418dba
CW
7896 fi
7897fi
503d2be0 7898
ca81d7a0
JD
7899{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7900echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7901if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7902 echo $ECHO_N "(cached) $ECHO_C" >&6
7903else
7904 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7905/* confdefs.h. */
7906_ACEOF
7907cat confdefs.h >>conftest.$ac_ext
7908cat >>conftest.$ac_ext <<_ACEOF
7909/* end confdefs.h. */
98418dba 7910#include <time.h>
b936fae4 7911
98418dba
CW
7912int
7913main ()
7914{
b936fae4
AS
7915static struct tm ac_aggr;
7916if (ac_aggr.tm_gmtoff)
7917return 0;
98418dba
CW
7918 ;
7919 return 0;
7920}
7921_ACEOF
b936fae4 7922rm -f conftest.$ac_objext
ca81d7a0
JD
7923if { (ac_try="$ac_compile"
7924case "(($ac_try" in
7925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7926 *) ac_try_echo=$ac_try;;
7927esac
7928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7929 (eval "$ac_compile") 2>conftest.er1
98418dba 7930 ac_status=$?
edfaf76d
LK
7931 grep -v '^ *+' conftest.er1 >conftest.err
7932 rm -f conftest.er1
7933 cat conftest.err >&5
c0d27fcc 7934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7935 (exit $ac_status); } && {
7936 test -z "$ac_c_werror_flag" ||
7937 test ! -s conftest.err
7938 } && test -s conftest.$ac_objext; then
b936fae4 7939 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7940else
7941 echo "$as_me: failed program was:" >&5
19650fd6
AS
7942sed 's/^/| /' conftest.$ac_ext >&5
7943
ca81d7a0 7944 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7945/* confdefs.h. */
7946_ACEOF
7947cat confdefs.h >>conftest.$ac_ext
7948cat >>conftest.$ac_ext <<_ACEOF
7949/* end confdefs.h. */
6bae0ccf
DL
7950#include <time.h>
7951
8799b3e4
CW
7952int
7953main ()
7954{
6bae0ccf
DL
7955static struct tm ac_aggr;
7956if (sizeof ac_aggr.tm_gmtoff)
7957return 0;
8799b3e4
CW
7958 ;
7959 return 0;
7960}
7961_ACEOF
6bae0ccf 7962rm -f conftest.$ac_objext
ca81d7a0
JD
7963if { (ac_try="$ac_compile"
7964case "(($ac_try" in
7965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7966 *) ac_try_echo=$ac_try;;
7967esac
7968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7969 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7970 ac_status=$?
edfaf76d
LK
7971 grep -v '^ *+' conftest.er1 >conftest.err
7972 rm -f conftest.er1
7973 cat conftest.err >&5
c0d27fcc 7974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7975 (exit $ac_status); } && {
7976 test -z "$ac_c_werror_flag" ||
7977 test ! -s conftest.err
7978 } && test -s conftest.$ac_objext; then
6bae0ccf 7979 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7980else
7981 echo "$as_me: failed program was:" >&5
19650fd6
AS
7982sed 's/^/| /' conftest.$ac_ext >&5
7983
ca81d7a0 7984 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7985fi
ca81d7a0
JD
7986
7987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7988fi
ca81d7a0
JD
7989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7991fi
ca81d7a0
JD
7992{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7993echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7994if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7995
7996cat >>confdefs.h <<\_ACEOF
7997#define HAVE_TM_GMTOFF 1
7998_ACEOF
7999
8000fi
8001
ca81d7a0
JD
8002{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8003echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8004if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8005 echo $ECHO_N "(cached) $ECHO_C" >&6
8006else
8007 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8008/* confdefs.h. */
8009_ACEOF
8010cat confdefs.h >>conftest.$ac_ext
8011cat >>conftest.$ac_ext <<_ACEOF
8012/* end confdefs.h. */
7862d3a8
AS
8013$ac_includes_default
8014#if HAVE_SYS_SOCKET_H
8015#include <sys/socket.h>
8016#endif
8017#if HAVE_NET_IF_H
96f3a036 8018#include <net/if.h>
7862d3a8 8019#endif
96f3a036
DL
8020
8021int
8022main ()
8023{
8024static struct ifreq ac_aggr;
8025if (ac_aggr.ifr_flags)
8026return 0;
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031rm -f conftest.$ac_objext
ca81d7a0
JD
8032if { (ac_try="$ac_compile"
8033case "(($ac_try" in
8034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8035 *) ac_try_echo=$ac_try;;
8036esac
8037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8038 (eval "$ac_compile") 2>conftest.er1
96f3a036 8039 ac_status=$?
edfaf76d
LK
8040 grep -v '^ *+' conftest.er1 >conftest.err
8041 rm -f conftest.er1
8042 cat conftest.err >&5
96f3a036 8043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8044 (exit $ac_status); } && {
8045 test -z "$ac_c_werror_flag" ||
8046 test ! -s conftest.err
8047 } && test -s conftest.$ac_objext; then
96f3a036
DL
8048 ac_cv_member_struct_ifreq_ifr_flags=yes
8049else
8050 echo "$as_me: failed program was:" >&5
8051sed 's/^/| /' conftest.$ac_ext >&5
8052
ca81d7a0 8053 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8054/* confdefs.h. */
8055_ACEOF
8056cat confdefs.h >>conftest.$ac_ext
8057cat >>conftest.$ac_ext <<_ACEOF
8058/* end confdefs.h. */
7862d3a8
AS
8059$ac_includes_default
8060#if HAVE_SYS_SOCKET_H
8061#include <sys/socket.h>
8062#endif
8063#if HAVE_NET_IF_H
96f3a036 8064#include <net/if.h>
7862d3a8 8065#endif
96f3a036
DL
8066
8067int
8068main ()
8069{
8070static struct ifreq ac_aggr;
8071if (sizeof ac_aggr.ifr_flags)
8072return 0;
8073 ;
8074 return 0;
8075}
8076_ACEOF
8077rm -f conftest.$ac_objext
ca81d7a0
JD
8078if { (ac_try="$ac_compile"
8079case "(($ac_try" in
8080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8081 *) ac_try_echo=$ac_try;;
8082esac
8083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8084 (eval "$ac_compile") 2>conftest.er1
96f3a036 8085 ac_status=$?
edfaf76d
LK
8086 grep -v '^ *+' conftest.er1 >conftest.err
8087 rm -f conftest.er1
8088 cat conftest.err >&5
96f3a036 8089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8090 (exit $ac_status); } && {
8091 test -z "$ac_c_werror_flag" ||
8092 test ! -s conftest.err
8093 } && test -s conftest.$ac_objext; then
96f3a036
DL
8094 ac_cv_member_struct_ifreq_ifr_flags=yes
8095else
8096 echo "$as_me: failed program was:" >&5
8097sed 's/^/| /' conftest.$ac_ext >&5
8098
ca81d7a0 8099 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8100fi
ca81d7a0
JD
8101
8102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8103fi
ca81d7a0
JD
8104
8105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8106fi
ca81d7a0
JD
8107{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8108echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8109if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8110
8111cat >>confdefs.h <<_ACEOF
8112#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8113_ACEOF
8114
8115
8116fi
ca81d7a0
JD
8117{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8118echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8119if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8120 echo $ECHO_N "(cached) $ECHO_C" >&6
8121else
8122 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
7862d3a8
AS
8128$ac_includes_default
8129#if HAVE_SYS_SOCKET_H
8130#include <sys/socket.h>
8131#endif
8132#if HAVE_NET_IF_H
96f3a036 8133#include <net/if.h>
7862d3a8 8134#endif
96f3a036
DL
8135
8136int
8137main ()
8138{
8139static struct ifreq ac_aggr;
8140if (ac_aggr.ifr_hwaddr)
8141return 0;
8142 ;
8143 return 0;
8144}
8145_ACEOF
8146rm -f conftest.$ac_objext
ca81d7a0
JD
8147if { (ac_try="$ac_compile"
8148case "(($ac_try" in
8149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8150 *) ac_try_echo=$ac_try;;
8151esac
8152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8153 (eval "$ac_compile") 2>conftest.er1
96f3a036 8154 ac_status=$?
edfaf76d
LK
8155 grep -v '^ *+' conftest.er1 >conftest.err
8156 rm -f conftest.er1
8157 cat conftest.err >&5
96f3a036 8158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8159 (exit $ac_status); } && {
8160 test -z "$ac_c_werror_flag" ||
8161 test ! -s conftest.err
8162 } && test -s conftest.$ac_objext; then
96f3a036
DL
8163 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8164else
8165 echo "$as_me: failed program was:" >&5
8166sed 's/^/| /' conftest.$ac_ext >&5
8167
ca81d7a0 8168 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8169/* confdefs.h. */
8170_ACEOF
8171cat confdefs.h >>conftest.$ac_ext
8172cat >>conftest.$ac_ext <<_ACEOF
8173/* end confdefs.h. */
7862d3a8
AS
8174$ac_includes_default
8175#if HAVE_SYS_SOCKET_H
8176#include <sys/socket.h>
8177#endif
8178#if HAVE_NET_IF_H
96f3a036 8179#include <net/if.h>
7862d3a8 8180#endif
96f3a036
DL
8181
8182int
8183main ()
8184{
8185static struct ifreq ac_aggr;
8186if (sizeof ac_aggr.ifr_hwaddr)
8187return 0;
8188 ;
8189 return 0;
8190}
8191_ACEOF
8192rm -f conftest.$ac_objext
ca81d7a0
JD
8193if { (ac_try="$ac_compile"
8194case "(($ac_try" in
8195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8196 *) ac_try_echo=$ac_try;;
8197esac
8198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8199 (eval "$ac_compile") 2>conftest.er1
96f3a036 8200 ac_status=$?
edfaf76d
LK
8201 grep -v '^ *+' conftest.er1 >conftest.err
8202 rm -f conftest.er1
8203 cat conftest.err >&5
96f3a036 8204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8205 (exit $ac_status); } && {
8206 test -z "$ac_c_werror_flag" ||
8207 test ! -s conftest.err
8208 } && test -s conftest.$ac_objext; then
96f3a036
DL
8209 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8210else
8211 echo "$as_me: failed program was:" >&5
8212sed 's/^/| /' conftest.$ac_ext >&5
8213
ca81d7a0 8214 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8215fi
ca81d7a0
JD
8216
8217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8218fi
ca81d7a0
JD
8219
8220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8221fi
ca81d7a0
JD
8222{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8223echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8224if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8225
8226cat >>confdefs.h <<_ACEOF
8227#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8228_ACEOF
8229
8230
8231fi
ca81d7a0
JD
8232{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8233echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8234if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8235 echo $ECHO_N "(cached) $ECHO_C" >&6
8236else
8237 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8238/* confdefs.h. */
8239_ACEOF
8240cat confdefs.h >>conftest.$ac_ext
8241cat >>conftest.$ac_ext <<_ACEOF
8242/* end confdefs.h. */
7862d3a8
AS
8243$ac_includes_default
8244#if HAVE_SYS_SOCKET_H
8245#include <sys/socket.h>
8246#endif
8247#if HAVE_NET_IF_H
96f3a036 8248#include <net/if.h>
7862d3a8 8249#endif
96f3a036
DL
8250
8251int
8252main ()
8253{
8254static struct ifreq ac_aggr;
8255if (ac_aggr.ifr_netmask)
8256return 0;
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
ca81d7a0
JD
8262if { (ac_try="$ac_compile"
8263case "(($ac_try" in
8264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8265 *) ac_try_echo=$ac_try;;
8266esac
8267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8268 (eval "$ac_compile") 2>conftest.er1
96f3a036 8269 ac_status=$?
edfaf76d
LK
8270 grep -v '^ *+' conftest.er1 >conftest.err
8271 rm -f conftest.er1
8272 cat conftest.err >&5
96f3a036 8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8274 (exit $ac_status); } && {
8275 test -z "$ac_c_werror_flag" ||
8276 test ! -s conftest.err
8277 } && test -s conftest.$ac_objext; then
96f3a036
DL
8278 ac_cv_member_struct_ifreq_ifr_netmask=yes
8279else
8280 echo "$as_me: failed program was:" >&5
8281sed 's/^/| /' conftest.$ac_ext >&5
8282
ca81d7a0 8283 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8284/* confdefs.h. */
8285_ACEOF
8286cat confdefs.h >>conftest.$ac_ext
8287cat >>conftest.$ac_ext <<_ACEOF
8288/* end confdefs.h. */
7862d3a8
AS
8289$ac_includes_default
8290#if HAVE_SYS_SOCKET_H
8291#include <sys/socket.h>
8292#endif
8293#if HAVE_NET_IF_H
96f3a036 8294#include <net/if.h>
7862d3a8 8295#endif
96f3a036
DL
8296
8297int
8298main ()
8299{
8300static struct ifreq ac_aggr;
8301if (sizeof ac_aggr.ifr_netmask)
8302return 0;
8303 ;
8304 return 0;
8305}
8306_ACEOF
8307rm -f conftest.$ac_objext
ca81d7a0
JD
8308if { (ac_try="$ac_compile"
8309case "(($ac_try" in
8310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8311 *) ac_try_echo=$ac_try;;
8312esac
8313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8314 (eval "$ac_compile") 2>conftest.er1
96f3a036 8315 ac_status=$?
edfaf76d
LK
8316 grep -v '^ *+' conftest.er1 >conftest.err
8317 rm -f conftest.er1
8318 cat conftest.err >&5
96f3a036 8319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8320 (exit $ac_status); } && {
8321 test -z "$ac_c_werror_flag" ||
8322 test ! -s conftest.err
8323 } && test -s conftest.$ac_objext; then
96f3a036
DL
8324 ac_cv_member_struct_ifreq_ifr_netmask=yes
8325else
8326 echo "$as_me: failed program was:" >&5
8327sed 's/^/| /' conftest.$ac_ext >&5
8328
ca81d7a0 8329 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8330fi
ca81d7a0
JD
8331
8332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8333fi
ca81d7a0
JD
8334
8335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8336fi
ca81d7a0
JD
8337{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8338echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8339if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8340
8341cat >>confdefs.h <<_ACEOF
8342#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8343_ACEOF
8344
8345
8346fi
ca81d7a0
JD
8347{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8348echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8349if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
8351else
8352 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8353/* confdefs.h. */
8354_ACEOF
8355cat confdefs.h >>conftest.$ac_ext
8356cat >>conftest.$ac_ext <<_ACEOF
8357/* end confdefs.h. */
7862d3a8
AS
8358$ac_includes_default
8359#if HAVE_SYS_SOCKET_H
8360#include <sys/socket.h>
8361#endif
8362#if HAVE_NET_IF_H
96f3a036 8363#include <net/if.h>
7862d3a8 8364#endif
96f3a036
DL
8365
8366int
8367main ()
8368{
8369static struct ifreq ac_aggr;
8370if (ac_aggr.ifr_broadaddr)
8371return 0;
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext
ca81d7a0
JD
8377if { (ac_try="$ac_compile"
8378case "(($ac_try" in
8379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8380 *) ac_try_echo=$ac_try;;
8381esac
8382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8383 (eval "$ac_compile") 2>conftest.er1
96f3a036 8384 ac_status=$?
edfaf76d
LK
8385 grep -v '^ *+' conftest.er1 >conftest.err
8386 rm -f conftest.er1
8387 cat conftest.err >&5
96f3a036 8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8389 (exit $ac_status); } && {
8390 test -z "$ac_c_werror_flag" ||
8391 test ! -s conftest.err
8392 } && test -s conftest.$ac_objext; then
96f3a036
DL
8393 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8394else
8395 echo "$as_me: failed program was:" >&5
8396sed 's/^/| /' conftest.$ac_ext >&5
8397
ca81d7a0 8398 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
7862d3a8
AS
8404$ac_includes_default
8405#if HAVE_SYS_SOCKET_H
8406#include <sys/socket.h>
8407#endif
8408#if HAVE_NET_IF_H
96f3a036 8409#include <net/if.h>
7862d3a8 8410#endif
96f3a036
DL
8411
8412int
8413main ()
8414{
8415static struct ifreq ac_aggr;
8416if (sizeof ac_aggr.ifr_broadaddr)
8417return 0;
8418 ;
8419 return 0;
8420}
8421_ACEOF
8422rm -f conftest.$ac_objext
ca81d7a0
JD
8423if { (ac_try="$ac_compile"
8424case "(($ac_try" in
8425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8426 *) ac_try_echo=$ac_try;;
8427esac
8428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8429 (eval "$ac_compile") 2>conftest.er1
96f3a036 8430 ac_status=$?
edfaf76d
LK
8431 grep -v '^ *+' conftest.er1 >conftest.err
8432 rm -f conftest.er1
8433 cat conftest.err >&5
96f3a036 8434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8435 (exit $ac_status); } && {
8436 test -z "$ac_c_werror_flag" ||
8437 test ! -s conftest.err
8438 } && test -s conftest.$ac_objext; then
96f3a036
DL
8439 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8440else
8441 echo "$as_me: failed program was:" >&5
8442sed 's/^/| /' conftest.$ac_ext >&5
8443
ca81d7a0 8444 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8445fi
ca81d7a0
JD
8446
8447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8448fi
ca81d7a0
JD
8449
8450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8451fi
ca81d7a0
JD
8452{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8453echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8454if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8455
8456cat >>confdefs.h <<_ACEOF
8457#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8458_ACEOF
8459
8460
8461fi
ca81d7a0
JD
8462{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8463echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8464if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8465 echo $ECHO_N "(cached) $ECHO_C" >&6
8466else
8467 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8468/* confdefs.h. */
8469_ACEOF
8470cat confdefs.h >>conftest.$ac_ext
8471cat >>conftest.$ac_ext <<_ACEOF
8472/* end confdefs.h. */
7862d3a8
AS
8473$ac_includes_default
8474#if HAVE_SYS_SOCKET_H
8475#include <sys/socket.h>
8476#endif
8477#if HAVE_NET_IF_H
96f3a036 8478#include <net/if.h>
7862d3a8 8479#endif
96f3a036
DL
8480
8481int
8482main ()
8483{
8484static struct ifreq ac_aggr;
8485if (ac_aggr.ifr_addr)
8486return 0;
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491rm -f conftest.$ac_objext
ca81d7a0
JD
8492if { (ac_try="$ac_compile"
8493case "(($ac_try" in
8494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8495 *) ac_try_echo=$ac_try;;
8496esac
8497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8498 (eval "$ac_compile") 2>conftest.er1
96f3a036 8499 ac_status=$?
edfaf76d
LK
8500 grep -v '^ *+' conftest.er1 >conftest.err
8501 rm -f conftest.er1
8502 cat conftest.err >&5
96f3a036 8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8504 (exit $ac_status); } && {
8505 test -z "$ac_c_werror_flag" ||
8506 test ! -s conftest.err
8507 } && test -s conftest.$ac_objext; then
96f3a036
DL
8508 ac_cv_member_struct_ifreq_ifr_addr=yes
8509else
8510 echo "$as_me: failed program was:" >&5
8511sed 's/^/| /' conftest.$ac_ext >&5
8512
ca81d7a0 8513 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8514/* confdefs.h. */
8515_ACEOF
8516cat confdefs.h >>conftest.$ac_ext
8517cat >>conftest.$ac_ext <<_ACEOF
8518/* end confdefs.h. */
7862d3a8
AS
8519$ac_includes_default
8520#if HAVE_SYS_SOCKET_H
8521#include <sys/socket.h>
8522#endif
8523#if HAVE_NET_IF_H
96f3a036 8524#include <net/if.h>
7862d3a8 8525#endif
96f3a036
DL
8526
8527int
8528main ()
8529{
8530static struct ifreq ac_aggr;
8531if (sizeof ac_aggr.ifr_addr)
8532return 0;
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537rm -f conftest.$ac_objext
ca81d7a0
JD
8538if { (ac_try="$ac_compile"
8539case "(($ac_try" in
8540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8541 *) ac_try_echo=$ac_try;;
8542esac
8543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8544 (eval "$ac_compile") 2>conftest.er1
96f3a036 8545 ac_status=$?
edfaf76d
LK
8546 grep -v '^ *+' conftest.er1 >conftest.err
8547 rm -f conftest.er1
8548 cat conftest.err >&5
96f3a036 8549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8550 (exit $ac_status); } && {
8551 test -z "$ac_c_werror_flag" ||
8552 test ! -s conftest.err
8553 } && test -s conftest.$ac_objext; then
96f3a036
DL
8554 ac_cv_member_struct_ifreq_ifr_addr=yes
8555else
8556 echo "$as_me: failed program was:" >&5
8557sed 's/^/| /' conftest.$ac_ext >&5
8558
ca81d7a0 8559 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8560fi
ca81d7a0
JD
8561
8562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8563fi
ca81d7a0
JD
8564
8565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8566fi
ca81d7a0
JD
8567{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8568echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8569if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8570
8571cat >>confdefs.h <<_ACEOF
8572#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8573_ACEOF
8574
8575
8576fi
8577
8799b3e4 8578
8799b3e4 8579
ca81d7a0
JD
8580{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8581echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8582if test "$ac_cv_prog_cc_c89" != no; then
8583 { echo "$as_me:$LINENO: result: yes" >&5
8584echo "${ECHO_T}yes" >&6; }
98418dba 8585
c0d27fcc 8586cat >>confdefs.h <<\_ACEOF
98418dba 8587#define PROTOTYPES 1
c0d27fcc
MR
8588_ACEOF
8589
8590
8591cat >>confdefs.h <<\_ACEOF
8592#define __PROTOTYPES 1
8593_ACEOF
98418dba
CW
8594
8595else
ca81d7a0
JD
8596 { echo "$as_me:$LINENO: result: no" >&5
8597echo "${ECHO_T}no" >&6; }
98418dba
CW
8598fi
8599
ca81d7a0
JD
8600{ echo "$as_me:$LINENO: checking for working volatile" >&5
8601echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8602if test "${ac_cv_c_volatile+set}" = set; then
8603 echo $ECHO_N "(cached) $ECHO_C" >&6
8604else
8605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8606/* confdefs.h. */
8607_ACEOF
8608cat confdefs.h >>conftest.$ac_ext
8609cat >>conftest.$ac_ext <<_ACEOF
8610/* end confdefs.h. */
98418dba 8611
98418dba
CW
8612int
8613main ()
8614{
8615
8616volatile int x;
ca81d7a0
JD
8617int * volatile y = (int *) 0;
8618return !x && !y;
98418dba
CW
8619 ;
8620 return 0;
8621}
8622_ACEOF
8623rm -f conftest.$ac_objext
ca81d7a0
JD
8624if { (ac_try="$ac_compile"
8625case "(($ac_try" in
8626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8627 *) ac_try_echo=$ac_try;;
8628esac
8629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8630 (eval "$ac_compile") 2>conftest.er1
98418dba 8631 ac_status=$?
edfaf76d
LK
8632 grep -v '^ *+' conftest.er1 >conftest.err
8633 rm -f conftest.er1
8634 cat conftest.err >&5
c0d27fcc 8635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8636 (exit $ac_status); } && {
8637 test -z "$ac_c_werror_flag" ||
8638 test ! -s conftest.err
8639 } && test -s conftest.$ac_objext; then
98418dba
CW
8640 ac_cv_c_volatile=yes
8641else
8642 echo "$as_me: failed program was:" >&5
19650fd6
AS
8643sed 's/^/| /' conftest.$ac_ext >&5
8644
ca81d7a0 8645 ac_cv_c_volatile=no
98418dba 8646fi
ca81d7a0
JD
8647
8648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8649fi
ca81d7a0
JD
8650{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8651echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8652if test $ac_cv_c_volatile = no; then
8653
c0d27fcc 8654cat >>confdefs.h <<\_ACEOF
98418dba 8655#define volatile
c0d27fcc 8656_ACEOF
98418dba
CW
8657
8658fi
8659
ca81d7a0
JD
8660{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8661echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8662if test "${ac_cv_c_const+set}" = set; then
8663 echo $ECHO_N "(cached) $ECHO_C" >&6
8664else
8665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8666/* confdefs.h. */
8667_ACEOF
8668cat confdefs.h >>conftest.$ac_ext
8669cat >>conftest.$ac_ext <<_ACEOF
8670/* end confdefs.h. */
98418dba 8671
98418dba
CW
8672int
8673main ()
8674{
8675/* FIXME: Include the comments suggested by Paul. */
8676#ifndef __cplusplus
8677 /* Ultrix mips cc rejects this. */
8678 typedef int charset[2];
f053c89f 8679 const charset cs;
98418dba 8680 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8681 char const *const *pcpcc;
8682 char **ppc;
98418dba
CW
8683 /* NEC SVR4.0.2 mips cc rejects this. */
8684 struct point {int x, y;};
8685 static struct point const zero = {0,0};
8686 /* AIX XL C 1.02.0.0 rejects this.
8687 It does not let you subtract one const X* pointer from another in
8688 an arm of an if-expression whose if-part is not a constant
8689 expression */
8690 const char *g = "string";
f053c89f 8691 pcpcc = &g + (g ? g-g : 0);
98418dba 8692 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8693 ++pcpcc;
8694 ppc = (char**) pcpcc;
8695 pcpcc = (char const *const *) ppc;
98418dba
CW
8696 { /* SCO 3.2v4 cc rejects this. */
8697 char *t;
8698 char const *s = 0 ? (char *) 0 : (char const *) 0;
8699
8700 *t++ = 0;
ca81d7a0 8701 if (s) return 0;
98418dba
CW
8702 }
8703 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8704 int x[] = {25, 17};
8705 const int *foo = &x[0];
8706 ++foo;
8707 }
8708 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8709 typedef const int *iptr;
8710 iptr p = 0;
8711 ++p;
8712 }
8713 { /* AIX XL C 1.02.0.0 rejects this saying
8714 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8715 struct s { int j; const int *ap[3]; };
8716 struct s *b; b->j = 5;
8717 }
8718 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8719 const int foo = 10;
ca81d7a0 8720 if (!foo) return 0;
98418dba 8721 }
f053c89f 8722 return !cs[0] && !zero.x;
98418dba
CW
8723#endif
8724
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
ca81d7a0
JD
8730if { (ac_try="$ac_compile"
8731case "(($ac_try" in
8732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8733 *) ac_try_echo=$ac_try;;
8734esac
8735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8736 (eval "$ac_compile") 2>conftest.er1
98418dba 8737 ac_status=$?
edfaf76d
LK
8738 grep -v '^ *+' conftest.er1 >conftest.err
8739 rm -f conftest.er1
8740 cat conftest.err >&5
c0d27fcc 8741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8742 (exit $ac_status); } && {
8743 test -z "$ac_c_werror_flag" ||
8744 test ! -s conftest.err
8745 } && test -s conftest.$ac_objext; then
98418dba
CW
8746 ac_cv_c_const=yes
8747else
8748 echo "$as_me: failed program was:" >&5
19650fd6
AS
8749sed 's/^/| /' conftest.$ac_ext >&5
8750
ca81d7a0 8751 ac_cv_c_const=no
98418dba 8752fi
ca81d7a0
JD
8753
8754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8755fi
ca81d7a0
JD
8756{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8757echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8758if test $ac_cv_c_const = no; then
8759
c0d27fcc 8760cat >>confdefs.h <<\_ACEOF
98418dba 8761#define const
c0d27fcc 8762_ACEOF
98418dba
CW
8763
8764fi
8765
ca81d7a0
JD
8766{ echo "$as_me:$LINENO: checking for void * support" >&5
8767echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8768if test "${emacs_cv_void_star+set}" = set; then
8769 echo $ECHO_N "(cached) $ECHO_C" >&6
8770else
8771 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8772/* confdefs.h. */
8773_ACEOF
8774cat confdefs.h >>conftest.$ac_ext
8775cat >>conftest.$ac_ext <<_ACEOF
8776/* end confdefs.h. */
98418dba 8777
98418dba
CW
8778int
8779main ()
8780{
8781void * foo;
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786rm -f conftest.$ac_objext
ca81d7a0
JD
8787if { (ac_try="$ac_compile"
8788case "(($ac_try" in
8789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8790 *) ac_try_echo=$ac_try;;
8791esac
8792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8793 (eval "$ac_compile") 2>conftest.er1
98418dba 8794 ac_status=$?
edfaf76d
LK
8795 grep -v '^ *+' conftest.er1 >conftest.err
8796 rm -f conftest.er1
8797 cat conftest.err >&5
c0d27fcc 8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8799 (exit $ac_status); } && {
8800 test -z "$ac_c_werror_flag" ||
8801 test ! -s conftest.err
8802 } && test -s conftest.$ac_objext; then
98418dba
CW
8803 emacs_cv_void_star=yes
8804else
8805 echo "$as_me: failed program was:" >&5
19650fd6
AS
8806sed 's/^/| /' conftest.$ac_ext >&5
8807
ca81d7a0 8808 emacs_cv_void_star=no
98418dba 8809fi
ca81d7a0
JD
8810
8811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8812fi
ca81d7a0
JD
8813{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8814echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8815if test $emacs_cv_void_star = yes; then
c0d27fcc 8816 cat >>confdefs.h <<\_ACEOF
98418dba 8817#define POINTER_TYPE void
c0d27fcc 8818_ACEOF
98418dba
CW
8819
8820else
c0d27fcc 8821 cat >>confdefs.h <<\_ACEOF
98418dba 8822#define POINTER_TYPE char
c0d27fcc 8823_ACEOF
98418dba
CW
8824
8825fi
8826
c0d27fcc 8827
4494a266
JD
8828
8829
cd958eb3 8830
ca81d7a0
JD
8831{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8832echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8833set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8834if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8835 echo $ECHO_N "(cached) $ECHO_C" >&6
8836else
c0d27fcc 8837 cat >conftest.make <<\_ACEOF
ca81d7a0 8838SHELL = /bin/sh
98418dba 8839all:
ca81d7a0 8840 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8841_ACEOF
98418dba 8842# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8843case `${MAKE-make} -f conftest.make 2>/dev/null` in
8844 *@@@%%%=?*=@@@%%%*)
8845 eval ac_cv_prog_make_${ac_make}_set=yes;;
8846 *)
8847 eval ac_cv_prog_make_${ac_make}_set=no;;
8848esac
98418dba
CW
8849rm -f conftest.make
8850fi
ca81d7a0
JD
8851if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8852 { echo "$as_me:$LINENO: result: yes" >&5
8853echo "${ECHO_T}yes" >&6; }
98418dba
CW
8854 SET_MAKE=
8855else
ca81d7a0
JD
8856 { echo "$as_me:$LINENO: result: no" >&5
8857echo "${ECHO_T}no" >&6; }
98418dba
CW
8858 SET_MAKE="MAKE=${MAKE-make}"
8859fi
8860
c0d27fcc 8861
ca81d7a0
JD
8862{ echo "$as_me:$LINENO: checking for long file names" >&5
8863echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8864if test "${ac_cv_sys_long_file_names+set}" = set; then
8865 echo $ECHO_N "(cached) $ECHO_C" >&6
8866else
8867 ac_cv_sys_long_file_names=yes
8868# Test for long file names in all the places we know might matter:
8869# . the current directory, where building will happen
8870# $prefix/lib where we will be installing things
8871# $exec_prefix/lib likewise
98418dba 8872# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8873# /tmp where it might want to write temporary files
8874# /var/tmp likewise
8875# /usr/tmp likewise
ca81d7a0
JD
8876for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8877 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8878 # in the usual case where exec_prefix is '${prefix}'.
8879 case $ac_dir in #(
8880 . | /* | ?:[\\/]*) ;; #(
8881 *) continue;;
8882 esac
8883 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8884 ac_xdir=$ac_dir/cf$$
ca81d7a0 8885 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8886 ac_tf1=$ac_xdir/conftest9012345
8887 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8888 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8889 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8890 rm -f -r "$ac_xdir" 2>/dev/null
8891 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8892done
8893fi
ca81d7a0
JD
8894{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8895echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8896if test $ac_cv_sys_long_file_names = yes; then
8897
c0d27fcc 8898cat >>confdefs.h <<\_ACEOF
98418dba 8899#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8900_ACEOF
98418dba
CW
8901
8902fi
8903
c0d27fcc 8904
98418dba
CW
8905#### Choose a window system.
8906
ca81d7a0
JD
8907{ echo "$as_me:$LINENO: checking for X" >&5
8908echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8909
c0d27fcc 8910
ca81d7a0 8911# Check whether --with-x was given.
98418dba 8912if test "${with_x+set}" = set; then
ca81d7a0
JD
8913 withval=$with_x;
8914fi
98418dba 8915
98418dba
CW
8916# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8917if test "x$with_x" = xno; then
8918 # The user explicitly disabled X.
8919 have_x=disabled
8920else
ca81d7a0
JD
8921 case $x_includes,$x_libraries in #(
8922 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8923echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8924 { (exit 1); exit 1; }; };; #(
8925 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8926 echo $ECHO_N "(cached) $ECHO_C" >&6
8927else
8928 # One or both of the vars are not set, and there is no cached value.
8929ac_x_includes=no ac_x_libraries=no
ca81d7a0 8930rm -f -r conftest.dir
98418dba
CW
8931if mkdir conftest.dir; then
8932 cd conftest.dir
c0d27fcc 8933 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8934incroot:
8935 @echo incroot='${INCROOT}'
8936usrlibdir:
8937 @echo usrlibdir='${USRLIBDIR}'
8938libdir:
8939 @echo libdir='${LIBDIR}'
8940_ACEOF
8941 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8942 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8943 for ac_var in incroot usrlibdir libdir; do
8944 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8945 done
98418dba
CW
8946 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8947 for ac_extension in a so sl; do
ca81d7a0
JD
8948 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8949 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8950 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8951 fi
8952 done
8953 # Screen out bogus values from the imake configuration. They are
8954 # bogus both because they are the default anyway, and because
8955 # using them would break gcc on systems where it needs fixed includes.
8956 case $ac_im_incroot in
ca81d7a0 8957 /usr/include) ac_x_includes= ;;
98418dba
CW
8958 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8959 esac
8960 case $ac_im_usrlibdir in
8961 /usr/lib | /lib) ;;
8962 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8963 esac
8964 fi
8965 cd ..
ca81d7a0 8966 rm -f -r conftest.dir
98418dba
CW
8967fi
8968
8969# Standard set of common directories for X headers.
8970# Check X11 before X11Rn because it is often a symlink to the current release.
8971ac_x_header_dirs='
8972/usr/X11/include
8973/usr/X11R6/include
8974/usr/X11R5/include
8975/usr/X11R4/include
8976
8977/usr/include/X11
8978/usr/include/X11R6
8979/usr/include/X11R5
8980/usr/include/X11R4
8981
8982/usr/local/X11/include
8983/usr/local/X11R6/include
8984/usr/local/X11R5/include
8985/usr/local/X11R4/include
8986
8987/usr/local/include/X11
8988/usr/local/include/X11R6
8989/usr/local/include/X11R5
8990/usr/local/include/X11R4
8991
8992/usr/X386/include
8993/usr/x386/include
8994/usr/XFree86/include/X11
8995
8996/usr/include
8997/usr/local/include
8998/usr/unsupported/include
8999/usr/athena/include
9000/usr/local/x11r5/include
9001/usr/lpp/Xamples/include
9002
9003/usr/openwin/include
9004/usr/openwin/share/include'
9005
9006if test "$ac_x_includes" = no; then
ca81d7a0 9007 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9008 # First, try using that file with no special directory specified.
9009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9010/* confdefs.h. */
9011_ACEOF
9012cat confdefs.h >>conftest.$ac_ext
9013cat >>conftest.$ac_ext <<_ACEOF
9014/* end confdefs.h. */
ca81d7a0 9015#include <X11/Xlib.h>
98418dba 9016_ACEOF
ca81d7a0
JD
9017if { (ac_try="$ac_cpp conftest.$ac_ext"
9018case "(($ac_try" in
9019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9020 *) ac_try_echo=$ac_try;;
9021esac
9022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9023 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9024 ac_status=$?
6bae0ccf 9025 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9026 rm -f conftest.er1
9027 cat conftest.err >&5
c0d27fcc 9028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9029 (exit $ac_status); } >/dev/null && {
9030 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9031 test ! -s conftest.err
9032 }; then
98418dba
CW
9033 # We can compile using X headers with no special include directory.
9034ac_x_includes=
9035else
9036 echo "$as_me: failed program was:" >&5
19650fd6
AS
9037sed 's/^/| /' conftest.$ac_ext >&5
9038
98418dba 9039 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9040 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9041 ac_x_includes=$ac_dir
9042 break
9043 fi
9044done
9045fi
ca81d7a0 9046
98418dba
CW
9047rm -f conftest.err conftest.$ac_ext
9048fi # $ac_x_includes = no
9049
9050if test "$ac_x_libraries" = no; then
9051 # Check for the libraries.
9052 # See if we find them without any special options.
9053 # Don't add to $LIBS permanently.
9054 ac_save_LIBS=$LIBS
f053c89f 9055 LIBS="-lX11 $LIBS"
98418dba 9056 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
ca81d7a0 9062#include <X11/Xlib.h>
98418dba
CW
9063int
9064main ()
9065{
ca81d7a0 9066XrmInitialize ()
98418dba
CW
9067 ;
9068 return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9072if { (ac_try="$ac_link"
9073case "(($ac_try" in
9074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9075 *) ac_try_echo=$ac_try;;
9076esac
9077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9078 (eval "$ac_link") 2>conftest.er1
98418dba 9079 ac_status=$?
edfaf76d
LK
9080 grep -v '^ *+' conftest.er1 >conftest.err
9081 rm -f conftest.er1
9082 cat conftest.err >&5
c0d27fcc 9083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9084 (exit $ac_status); } && {
9085 test -z "$ac_c_werror_flag" ||
9086 test ! -s conftest.err
9087 } && test -s conftest$ac_exeext &&
9088 $as_test_x conftest$ac_exeext; then
98418dba
CW
9089 LIBS=$ac_save_LIBS
9090# We can link X programs with no special library path.
9091ac_x_libraries=
9092else
9093 echo "$as_me: failed program was:" >&5
19650fd6
AS
9094sed 's/^/| /' conftest.$ac_ext >&5
9095
ca81d7a0 9096 LIBS=$ac_save_LIBS
98418dba
CW
9097for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9098do
9099 # Don't even attempt the hair of trying to link an X program!
9100 for ac_extension in a so sl; do
f053c89f 9101 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9102 ac_x_libraries=$ac_dir
9103 break 2
9104 fi
9105 done
9106done
9107fi
ca81d7a0 9108
f053c89f 9109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9110 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9111fi # $ac_x_libraries = no
9112
ca81d7a0
JD
9113case $ac_x_includes,$ac_x_libraries in #(
9114 no,* | *,no | *\'*)
9115 # Didn't find X, or a directory has "'" in its name.
9116 ac_cv_have_x="have_x=no";; #(
9117 *)
9118 # Record where we found X for the cache.
9119 ac_cv_have_x="have_x=yes\
9120 ac_x_includes='$ac_x_includes'\
9121 ac_x_libraries='$ac_x_libraries'"
9122esac
98418dba 9123fi
ca81d7a0
JD
9124;; #(
9125 *) have_x=yes;;
9126 esac
98418dba
CW
9127 eval "$ac_cv_have_x"
9128fi # $with_x != no
9129
9130if test "$have_x" != yes; then
ca81d7a0
JD
9131 { echo "$as_me:$LINENO: result: $have_x" >&5
9132echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9133 no_x=yes
9134else
9135 # If each of the values was on the command line, it overrides each guess.
9136 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9137 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9138 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9139 ac_cv_have_x="have_x=yes\
9140 ac_x_includes='$x_includes'\
9141 ac_x_libraries='$x_libraries'"
9142 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9143echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9144fi
9145
9146if test "$no_x" = yes; then
9147 window_system=none
9148else
9149 window_system=x11
9150fi
9151
a8cd2496
GM
9152## Workaround for bug in autoconf <= 2.62.
9153## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9154## No need to do anything special for these standard directories.
921fbdf0 9155## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9156if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9157
9158 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9159
9160fi
9161
92d1ccf4
AS
9162if test "${x_libraries}" != NONE; then
9163 if test -n "${x_libraries}"; then
9164 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9165 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9166 fi
98418dba 9167 x_default_search_path=""
92d1ccf4
AS
9168 x_search_path=${x_libraries}
9169 if test -z "${x_search_path}"; then
9170 x_search_path=/usr/lib
9171 fi
9172 for x_library in `echo ${x_search_path}: | \
9173 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9174 x_search_path="\
9175${x_library}/X11/%L/%T/%N%C%S:\
9176${x_library}/X11/%l/%T/%N%C%S:\
9177${x_library}/X11/%T/%N%C%S:\
9178${x_library}/X11/%L/%T/%N%S:\
9179${x_library}/X11/%l/%T/%N%S:\
9180${x_library}/X11/%T/%N%S"
9181 if test x"${x_default_search_path}" = x; then
9182 x_default_search_path=${x_search_path}
9183 else
9184 x_default_search_path="${x_search_path}:${x_default_search_path}"
9185 fi
9186 done
9187fi
9188if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9189 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9190fi
9191
9192if test x"${x_includes}" = x; then
9193 bitmapdir=/usr/include/X11/bitmaps
9194else
9195 # accumulate include directories that have X11 bitmap subdirectories
9196 bmd_acc="dummyval"
9197 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9198 if test -d "${bmd}/X11/bitmaps"; then
9199 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9200 fi
9201 if test -d "${bmd}/bitmaps"; then
9202 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9203 fi
9204 done
9205 if test ${bmd_acc} != "dummyval"; then
9206 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9207 fi
9208fi
9209
edfda783 9210HAVE_NS=no
ff1095d1
AR
9211NS_IMPL_COCOA=no
9212NS_IMPL_GNUSTEP=no
edfda783
AR
9213tmp_CPPFLAGS="$CPPFLAGS"
9214tmp_CFLAGS="$CFLAGS"
9215CPPFLAGS="$CPPFLAGS -x objective-c"
9216CFLAGS="$CFLAGS -x objective-c"
9217if test "${with_ns}" != no; then
9218 if test "${opsys}" = darwin; then
ff1095d1 9219 NS_IMPL_COCOA=yes
06b62770
AR
9220 ns_appdir=`pwd`/nextstep/Emacs.app
9221 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9222 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9223 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
ecd43cb9 9224 elif test -f $GNUSTEP_CONFIG_FILE; then
ff1095d1 9225 NS_IMPL_GNUSTEP=yes
06b62770
AR
9226 ns_appdir=`pwd`/nextstep/Emacs.app
9227 ns_appbindir=`pwd`/nextstep/Emacs.app
9228 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9229 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
ecd43cb9
GM
9230 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
9231 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9232 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
edfda783
AR
9233 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9234 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9235 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9236 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9237 fi
9238 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9239 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9240echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9241if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9242 echo $ECHO_N "(cached) $ECHO_C" >&6
9243fi
9244{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9245echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9246else
9247 # Is the header compilable?
9248{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9249echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
9250cat >conftest.$ac_ext <<_ACEOF
9251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
9256$ac_includes_default
9257#include <AppKit/AppKit.h>
9258_ACEOF
9259rm -f conftest.$ac_objext
9260if { (ac_try="$ac_compile"
9261case "(($ac_try" in
9262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9263 *) ac_try_echo=$ac_try;;
9264esac
9265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9266 (eval "$ac_compile") 2>conftest.er1
9267 ac_status=$?
9268 grep -v '^ *+' conftest.er1 >conftest.err
9269 rm -f conftest.er1
9270 cat conftest.err >&5
9271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9272 (exit $ac_status); } && {
9273 test -z "$ac_c_werror_flag" ||
9274 test ! -s conftest.err
9275 } && test -s conftest.$ac_objext; then
9276 ac_header_compiler=yes
9277else
9278 echo "$as_me: failed program was:" >&5
9279sed 's/^/| /' conftest.$ac_ext >&5
9280
9281 ac_header_compiler=no
9282fi
9283
9284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9285{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9286echo "${ECHO_T}$ac_header_compiler" >&6; }
9287
9288# Is the header present?
9289{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9290echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9291cat >conftest.$ac_ext <<_ACEOF
9292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
9297#include <AppKit/AppKit.h>
9298_ACEOF
9299if { (ac_try="$ac_cpp conftest.$ac_ext"
9300case "(($ac_try" in
9301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9302 *) ac_try_echo=$ac_try;;
9303esac
9304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9305 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9306 ac_status=$?
9307 grep -v '^ *+' conftest.er1 >conftest.err
9308 rm -f conftest.er1
9309 cat conftest.err >&5
9310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9311 (exit $ac_status); } >/dev/null && {
9312 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9313 test ! -s conftest.err
9314 }; then
9315 ac_header_preproc=yes
9316else
9317 echo "$as_me: failed program was:" >&5
9318sed 's/^/| /' conftest.$ac_ext >&5
9319
9320 ac_header_preproc=no
9321fi
9322
9323rm -f conftest.err conftest.$ac_ext
9324{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9325echo "${ECHO_T}$ac_header_preproc" >&6; }
9326
9327# So? What about this header?
9328case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9329 yes:no: )
9330 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9331echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9332 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9333echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9334 ac_header_preproc=yes
9335 ;;
9336 no:yes:* )
9337 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9338echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9339 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9340echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9341 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9342echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9343 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9344echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9345 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9346echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9347 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9348echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9349
9350 ;;
9351esac
9352{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9353echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9354if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9355 echo $ECHO_N "(cached) $ECHO_C" >&6
9356else
9357 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9358fi
9359{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9360echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9361
9362fi
9363if test $ac_cv_header_AppKit_AppKit_h = yes; then
9364 HAVE_NS=yes
ecd43cb9
GM
9365else
9366 { { echo "$as_me:$LINENO: error: \`--with-ns' was specified, but the include
9367 files are missing or cannot be compiled." >&5
9368echo "$as_me: error: \`--with-ns' was specified, but the include
9369 files are missing or cannot be compiled." >&2;}
9370 { (exit 1); exit 1; }; }
edfda783
AR
9371fi
9372
9373
d5e2f8fe 9374 NS_HAVE_NSINTEGER=yes
519c4a9a
CY
9375 cat >conftest.$ac_ext <<_ACEOF
9376/* confdefs.h. */
9377_ACEOF
9378cat confdefs.h >>conftest.$ac_ext
9379cat >>conftest.$ac_ext <<_ACEOF
9380/* end confdefs.h. */
9381#include <Foundation/NSObjCRuntime.h>
9382int
9383main ()
9384{
9385NSInteger i;
9386 ;
9387 return 0;
9388}
9389_ACEOF
9390rm -f conftest.$ac_objext
9391if { (ac_try="$ac_compile"
9392case "(($ac_try" in
9393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9394 *) ac_try_echo=$ac_try;;
9395esac
9396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9397 (eval "$ac_compile") 2>conftest.er1
9398 ac_status=$?
9399 grep -v '^ *+' conftest.er1 >conftest.err
9400 rm -f conftest.er1
9401 cat conftest.err >&5
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); } && {
9404 test -z "$ac_c_werror_flag" ||
9405 test ! -s conftest.err
9406 } && test -s conftest.$ac_objext; then
d5e2f8fe 9407 ns_have_nsinteger=yes
519c4a9a
CY
9408else
9409 echo "$as_me: failed program was:" >&5
9410sed 's/^/| /' conftest.$ac_ext >&5
9411
d5e2f8fe 9412 ns_have_nsinteger=no
519c4a9a
CY
9413fi
9414
9415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d5e2f8fe
AR
9416 if test $ns_have_nsinteger = no; then
9417 NS_HAVE_NSINTEGER=no
519c4a9a 9418 fi
edfda783
AR
9419fi
9420if test "${HAVE_NS}" = yes; then
9421 window_system=nextstep
9422 with_xft=no
9423 with_freetype=no
06b62770
AR
9424 # set up packaging dirs
9425 exec_prefix=${ns_appbindir}
9426 libexecdir=${ns_appbindir}/libexec
9427 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9428 prefix=${ns_appresdir}
9429 fi
edfda783
AR
9430fi
9431CFLAGS="$tmp_CFLAGS"
9432CPPFLAGS="$tmp_CPPFLAGS"
9433
1d4d5604
YM
9434case "${window_system}" in
9435 x11 )
9436 HAVE_X_WINDOWS=yes
9437 HAVE_X11=yes
9438 case "${with_x_toolkit}" in
9439 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9440 motif ) USE_X_TOOLKIT=MOTIF ;;
9441 gtk ) with_gtk=yes
9442 USE_X_TOOLKIT=none ;;
9443 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9444 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9445 esac
9446 ;;
9e2a2647 9447 nextstep | none )
1d4d5604
YM
9448 HAVE_X_WINDOWS=no
9449 HAVE_X11=no
9450 USE_X_TOOLKIT=none
9451 ;;
9452esac
9453
cfe440b8
JD
9454if test "$window_system" = none && test "X$with_x" != "Xno"; then
9455 # Extract the first word of "X", so it can be a program name with args.
9456set dummy X; ac_word=$2
9457{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9458echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9459if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9460 echo $ECHO_N "(cached) $ECHO_C" >&6
9461else
9462 if test -n "$HAVE_XSERVER"; then
9463 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9464else
9465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468 IFS=$as_save_IFS
9469 test -z "$as_dir" && as_dir=.
9470 for ac_exec_ext in '' $ac_executable_extensions; do
9471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9472 ac_cv_prog_HAVE_XSERVER="true"
9473 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9474 break 2
9475 fi
9476done
9477done
9478IFS=$as_save_IFS
9479
9480 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9481fi
9482fi
9483HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9484if test -n "$HAVE_XSERVER"; then
9485 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9486echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9487else
9488 { echo "$as_me:$LINENO: result: no" >&5
9489echo "${ECHO_T}no" >&6; }
9490fi
9491
9492
9493 if test "$HAVE_XSERVER" = true ||
9494 test -n "$DISPLAY" ||
9495 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9496 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9497were found. You should install the relevant development files for X
9498and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9499sure you have development files for image handling, i.e.
9500tiff, gif, jpeg, png and xpm.
9501If you are sure you want Emacs compiled without X window support, pass
9502 --without-x
9503to configure." >&5
9504echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9505were found. You should install the relevant development files for X
9506and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9507sure you have development files for image handling, i.e.
9508tiff, gif, jpeg, png and xpm.
9509If you are sure you want Emacs compiled without X window support, pass
9510 --without-x
9511to configure." >&2;}
9512 { (exit 1); exit 1; }; }
9513 fi
9514fi
9515
1d4d5604
YM
9516### If we're using X11, we should use the X menu package.
9517HAVE_MENUS=no
9518case ${HAVE_X11} in
9519 yes ) HAVE_MENUS=yes ;;
9520esac
9521
98418dba
CW
9522# Do the opsystem or machine files prohibit the use of the GNU malloc?
9523# Assume not, until told otherwise.
9524GNU_MALLOC=yes
9525doug_lea_malloc=yes
ca81d7a0
JD
9526{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9527echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9528if test "${ac_cv_func_malloc_get_state+set}" = set; then
9529 echo $ECHO_N "(cached) $ECHO_C" >&6
9530else
9531 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9532/* confdefs.h. */
9533_ACEOF
9534cat confdefs.h >>conftest.$ac_ext
9535cat >>conftest.$ac_ext <<_ACEOF
9536/* end confdefs.h. */
edfaf76d
LK
9537/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9538 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9539#define malloc_get_state innocuous_malloc_get_state
9540
98418dba 9541/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9542 which can conflict with char malloc_get_state (); below.
9543 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9544 <limits.h> exists even on freestanding compilers. */
edfaf76d 9545
19650fd6
AS
9546#ifdef __STDC__
9547# include <limits.h>
9548#else
9549# include <assert.h>
9550#endif
edfaf76d
LK
9551
9552#undef malloc_get_state
9553
ca81d7a0
JD
9554/* Override any GCC internal prototype to avoid an error.
9555 Use char because int might match the return type of a GCC
9556 builtin and then its argument prototype would still apply. */
98418dba
CW
9557#ifdef __cplusplus
9558extern "C"
9559#endif
98418dba 9560char malloc_get_state ();
98418dba
CW
9561/* The GNU C library defines this for functions which it implements
9562 to always fail with ENOSYS. Some functions are actually named
9563 something starting with __ and the normal name is an alias. */
ca81d7a0 9564#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9565choke me
98418dba
CW
9566#endif
9567
19650fd6
AS
9568int
9569main ()
9570{
ca81d7a0 9571return malloc_get_state ();
98418dba
CW
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9577if { (ac_try="$ac_link"
9578case "(($ac_try" in
9579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580 *) ac_try_echo=$ac_try;;
9581esac
9582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9583 (eval "$ac_link") 2>conftest.er1
98418dba 9584 ac_status=$?
edfaf76d
LK
9585 grep -v '^ *+' conftest.er1 >conftest.err
9586 rm -f conftest.er1
9587 cat conftest.err >&5
c0d27fcc 9588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9589 (exit $ac_status); } && {
9590 test -z "$ac_c_werror_flag" ||
9591 test ! -s conftest.err
9592 } && test -s conftest$ac_exeext &&
9593 $as_test_x conftest$ac_exeext; then
98418dba
CW
9594 ac_cv_func_malloc_get_state=yes
9595else
9596 echo "$as_me: failed program was:" >&5
19650fd6
AS
9597sed 's/^/| /' conftest.$ac_ext >&5
9598
ca81d7a0 9599 ac_cv_func_malloc_get_state=no
98418dba 9600fi
ca81d7a0 9601
f053c89f 9602rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9603 conftest$ac_exeext conftest.$ac_ext
98418dba 9604fi
ca81d7a0
JD
9605{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9606echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9607if test $ac_cv_func_malloc_get_state = yes; then
9608 :
9609else
9610 doug_lea_malloc=no
9611fi
9612
ca81d7a0
JD
9613{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9614echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9615if test "${ac_cv_func_malloc_set_state+set}" = set; then
9616 echo $ECHO_N "(cached) $ECHO_C" >&6
9617else
9618 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9619/* confdefs.h. */
9620_ACEOF
9621cat confdefs.h >>conftest.$ac_ext
9622cat >>conftest.$ac_ext <<_ACEOF
9623/* end confdefs.h. */
edfaf76d
LK
9624/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9625 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9626#define malloc_set_state innocuous_malloc_set_state
9627
98418dba 9628/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9629 which can conflict with char malloc_set_state (); below.
9630 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9631 <limits.h> exists even on freestanding compilers. */
edfaf76d 9632
19650fd6
AS
9633#ifdef __STDC__
9634# include <limits.h>
9635#else
9636# include <assert.h>
9637#endif
edfaf76d
LK
9638
9639#undef malloc_set_state
9640
ca81d7a0
JD
9641/* Override any GCC internal prototype to avoid an error.
9642 Use char because int might match the return type of a GCC
9643 builtin and then its argument prototype would still apply. */
98418dba
CW
9644#ifdef __cplusplus
9645extern "C"
9646#endif
98418dba 9647char malloc_set_state ();
98418dba
CW
9648/* The GNU C library defines this for functions which it implements
9649 to always fail with ENOSYS. Some functions are actually named
9650 something starting with __ and the normal name is an alias. */
ca81d7a0 9651#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9652choke me
98418dba
CW
9653#endif
9654
19650fd6
AS
9655int
9656main ()
9657{
ca81d7a0 9658return malloc_set_state ();
98418dba
CW
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9664if { (ac_try="$ac_link"
9665case "(($ac_try" in
9666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9667 *) ac_try_echo=$ac_try;;
9668esac
9669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9670 (eval "$ac_link") 2>conftest.er1
98418dba 9671 ac_status=$?
edfaf76d
LK
9672 grep -v '^ *+' conftest.er1 >conftest.err
9673 rm -f conftest.er1
9674 cat conftest.err >&5
c0d27fcc 9675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9676 (exit $ac_status); } && {
9677 test -z "$ac_c_werror_flag" ||
9678 test ! -s conftest.err
9679 } && test -s conftest$ac_exeext &&
9680 $as_test_x conftest$ac_exeext; then
98418dba
CW
9681 ac_cv_func_malloc_set_state=yes
9682else
9683 echo "$as_me: failed program was:" >&5
19650fd6
AS
9684sed 's/^/| /' conftest.$ac_ext >&5
9685
ca81d7a0 9686 ac_cv_func_malloc_set_state=no
98418dba 9687fi
ca81d7a0 9688
f053c89f 9689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9690 conftest$ac_exeext conftest.$ac_ext
98418dba 9691fi
ca81d7a0
JD
9692{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9693echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9694if test $ac_cv_func_malloc_set_state = yes; then
9695 :
9696else
9697 doug_lea_malloc=no
9698fi
9699
ca81d7a0
JD
9700{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9701echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9702if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9703 echo $ECHO_N "(cached) $ECHO_C" >&6
9704else
9705 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9706/* confdefs.h. */
9707_ACEOF
9708cat confdefs.h >>conftest.$ac_ext
9709cat >>conftest.$ac_ext <<_ACEOF
9710/* end confdefs.h. */
98418dba 9711extern void (* __after_morecore_hook)();
98418dba
CW
9712int
9713main ()
9714{
9715__after_morecore_hook = 0
9716 ;
9717 return 0;
9718}
9719_ACEOF
9720rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9721if { (ac_try="$ac_link"
9722case "(($ac_try" in
9723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9724 *) ac_try_echo=$ac_try;;
9725esac
9726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9727 (eval "$ac_link") 2>conftest.er1
98418dba 9728 ac_status=$?
edfaf76d
LK
9729 grep -v '^ *+' conftest.er1 >conftest.err
9730 rm -f conftest.er1
9731 cat conftest.err >&5
c0d27fcc 9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9733 (exit $ac_status); } && {
9734 test -z "$ac_c_werror_flag" ||
9735 test ! -s conftest.err
9736 } && test -s conftest$ac_exeext &&
9737 $as_test_x conftest$ac_exeext; then
98418dba
CW
9738 emacs_cv_var___after_morecore_hook=yes
9739else
9740 echo "$as_me: failed program was:" >&5
19650fd6
AS
9741sed 's/^/| /' conftest.$ac_ext >&5
9742
ca81d7a0 9743 emacs_cv_var___after_morecore_hook=no
98418dba 9744fi
ca81d7a0 9745
f053c89f 9746rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9747 conftest$ac_exeext conftest.$ac_ext
98418dba 9748fi
ca81d7a0
JD
9749{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9750echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9751if test $emacs_cv_var___after_morecore_hook = no; then
9752 doug_lea_malloc=no
9753fi
9754if test "${system_malloc}" = "yes"; then
9755 GNU_MALLOC=no
9756 GNU_MALLOC_reason="
9757 (The GNU allocators don't work with this system configuration.)"
9758fi
9759if test "$doug_lea_malloc" = "yes" ; then
9760 if test "$GNU_MALLOC" = yes ; then
9761 GNU_MALLOC_reason="
9762 (Using Doug Lea's new malloc from the GNU C Library.)"
9763 fi
b936fae4 9764
c0d27fcc 9765cat >>confdefs.h <<\_ACEOF
98418dba 9766#define DOUG_LEA_MALLOC 1
c0d27fcc 9767_ACEOF
98418dba
CW
9768
9769fi
9770
9771if test x"${REL_ALLOC}" = x; then
9772 REL_ALLOC=${GNU_MALLOC}
9773fi
9774
9775
c0d27fcc
MR
9776
9777
9778for ac_header in stdlib.h unistd.h
98418dba
CW
9779do
9780as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9782 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9783echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9784if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9785 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9786fi
ca81d7a0
JD
9787ac_res=`eval echo '${'$as_ac_Header'}'`
9788 { echo "$as_me:$LINENO: result: $ac_res" >&5
9789echo "${ECHO_T}$ac_res" >&6; }
98418dba 9790else
c0d27fcc 9791 # Is the header compilable?
ca81d7a0
JD
9792{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9793echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9795/* confdefs.h. */
9796_ACEOF
9797cat confdefs.h >>conftest.$ac_ext
9798cat >>conftest.$ac_ext <<_ACEOF
9799/* end confdefs.h. */
98418dba
CW
9800$ac_includes_default
9801#include <$ac_header>
9802_ACEOF
9803rm -f conftest.$ac_objext
ca81d7a0
JD
9804if { (ac_try="$ac_compile"
9805case "(($ac_try" in
9806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9807 *) ac_try_echo=$ac_try;;
9808esac
9809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9810 (eval "$ac_compile") 2>conftest.er1
98418dba 9811 ac_status=$?
edfaf76d
LK
9812 grep -v '^ *+' conftest.er1 >conftest.err
9813 rm -f conftest.er1
9814 cat conftest.err >&5
c0d27fcc 9815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9816 (exit $ac_status); } && {
9817 test -z "$ac_c_werror_flag" ||
9818 test ! -s conftest.err
9819 } && test -s conftest.$ac_objext; then
c0d27fcc 9820 ac_header_compiler=yes
98418dba
CW
9821else
9822 echo "$as_me: failed program was:" >&5
19650fd6
AS
9823sed 's/^/| /' conftest.$ac_ext >&5
9824
ca81d7a0 9825 ac_header_compiler=no
98418dba 9826fi
ca81d7a0
JD
9827
9828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9829{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9830echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9831
c0d27fcc 9832# Is the header present?
ca81d7a0
JD
9833{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9834echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9835cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9836/* confdefs.h. */
9837_ACEOF
9838cat confdefs.h >>conftest.$ac_ext
9839cat >>conftest.$ac_ext <<_ACEOF
9840/* end confdefs.h. */
98418dba
CW
9841#include <$ac_header>
9842_ACEOF
ca81d7a0
JD
9843if { (ac_try="$ac_cpp conftest.$ac_ext"
9844case "(($ac_try" in
9845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9846 *) ac_try_echo=$ac_try;;
9847esac
9848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9850 ac_status=$?
6bae0ccf 9851 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9852 rm -f conftest.er1
9853 cat conftest.err >&5
c0d27fcc 9854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9855 (exit $ac_status); } >/dev/null && {
9856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9857 test ! -s conftest.err
9858 }; then
c0d27fcc 9859 ac_header_preproc=yes
98418dba
CW
9860else
9861 echo "$as_me: failed program was:" >&5
19650fd6
AS
9862sed 's/^/| /' conftest.$ac_ext >&5
9863
c0d27fcc 9864 ac_header_preproc=no
98418dba 9865fi
ca81d7a0 9866
98418dba 9867rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9868{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9869echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9870
9871# So? What about this header?
edfaf76d
LK
9872case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9873 yes:no: )
c0d27fcc
MR
9874 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9875echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9876 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9877echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9878 ac_header_preproc=yes
9879 ;;
9880 no:yes:* )
9881 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9882echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9883 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9884echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9885 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9886echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9887 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9888echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9889 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9890echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9891 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9892echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9893
19650fd6 9894 ;;
c0d27fcc 9895esac
ca81d7a0
JD
9896{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9897echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9898if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9899 echo $ECHO_N "(cached) $ECHO_C" >&6
9900else
edfaf76d 9901 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9902fi
ca81d7a0
JD
9903ac_res=`eval echo '${'$as_ac_Header'}'`
9904 { echo "$as_me:$LINENO: result: $ac_res" >&5
9905echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9906
9907fi
98418dba 9908if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9909 cat >>confdefs.h <<_ACEOF
98418dba 9910#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9911_ACEOF
98418dba
CW
9912
9913fi
c0d27fcc 9914
98418dba
CW
9915done
9916
c0d27fcc 9917
98418dba
CW
9918for ac_func in getpagesize
9919do
9920as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9921{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9922echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9923if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9924 echo $ECHO_N "(cached) $ECHO_C" >&6
9925else
9926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
edfaf76d
LK
9932/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9934#define $ac_func innocuous_$ac_func
9935
98418dba 9936/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9937 which can conflict with char $ac_func (); below.
9938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9939 <limits.h> exists even on freestanding compilers. */
edfaf76d 9940
19650fd6
AS
9941#ifdef __STDC__
9942# include <limits.h>
9943#else
9944# include <assert.h>
9945#endif
edfaf76d
LK
9946
9947#undef $ac_func
9948
ca81d7a0
JD
9949/* Override any GCC internal prototype to avoid an error.
9950 Use char because int might match the return type of a GCC
9951 builtin and then its argument prototype would still apply. */
98418dba
CW
9952#ifdef __cplusplus
9953extern "C"
9954#endif
98418dba 9955char $ac_func ();
98418dba
CW
9956/* The GNU C library defines this for functions which it implements
9957 to always fail with ENOSYS. Some functions are actually named
9958 something starting with __ and the normal name is an alias. */
ca81d7a0 9959#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9960choke me
98418dba
CW
9961#endif
9962
19650fd6
AS
9963int
9964main ()
9965{
ca81d7a0 9966return $ac_func ();
98418dba
CW
9967 ;
9968 return 0;
9969}
9970_ACEOF
9971rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9972if { (ac_try="$ac_link"
9973case "(($ac_try" in
9974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9975 *) ac_try_echo=$ac_try;;
9976esac
9977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9978 (eval "$ac_link") 2>conftest.er1
98418dba 9979 ac_status=$?
edfaf76d
LK
9980 grep -v '^ *+' conftest.er1 >conftest.err
9981 rm -f conftest.er1
9982 cat conftest.err >&5
c0d27fcc 9983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9984 (exit $ac_status); } && {
9985 test -z "$ac_c_werror_flag" ||
9986 test ! -s conftest.err
9987 } && test -s conftest$ac_exeext &&
9988 $as_test_x conftest$ac_exeext; then
98418dba
CW
9989 eval "$as_ac_var=yes"
9990else
9991 echo "$as_me: failed program was:" >&5
19650fd6
AS
9992sed 's/^/| /' conftest.$ac_ext >&5
9993
ca81d7a0 9994 eval "$as_ac_var=no"
98418dba 9995fi
ca81d7a0 9996
f053c89f 9997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9998 conftest$ac_exeext conftest.$ac_ext
98418dba 9999fi
ca81d7a0
JD
10000ac_res=`eval echo '${'$as_ac_var'}'`
10001 { echo "$as_me:$LINENO: result: $ac_res" >&5
10002echo "${ECHO_T}$ac_res" >&6; }
98418dba 10003if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10004 cat >>confdefs.h <<_ACEOF
98418dba 10005#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10006_ACEOF
98418dba
CW
10007
10008fi
10009done
10010
ca81d7a0
JD
10011{ echo "$as_me:$LINENO: checking for working mmap" >&5
10012echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10013if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015else
10016 if test "$cross_compiling" = yes; then
10017 ac_cv_func_mmap_fixed_mapped=no
10018else
10019 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10020/* confdefs.h. */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h. */
98418dba 10025$ac_includes_default
c0d27fcc
MR
10026/* malloc might have been renamed as rpl_malloc. */
10027#undef malloc
10028
98418dba
CW
10029/* Thanks to Mike Haertel and Jim Avera for this test.
10030 Here is a matrix of mmap possibilities:
10031 mmap private not fixed
10032 mmap private fixed at somewhere currently unmapped
10033 mmap private fixed at somewhere already mapped
10034 mmap shared not fixed
10035 mmap shared fixed at somewhere currently unmapped
10036 mmap shared fixed at somewhere already mapped
10037 For private mappings, we should verify that changes cannot be read()
10038 back from the file, nor mmap's back from the file at a different
10039 address. (There have been systems where private was not correctly
10040 implemented like the infamous i386 svr4.0, and systems where the
10041 VM page cache was not coherent with the file system buffer cache
10042 like early versions of FreeBSD and possibly contemporary NetBSD.)
10043 For shared mappings, we should conversely verify that changes get
c0d27fcc 10044 propagated back to all the places they're supposed to be.
98418dba
CW
10045
10046 Grep wants private fixed already mapped.
10047 The main things grep needs to know about mmap are:
10048 * does it exist and is it safe to write into the mmap'd area
10049 * how to use it (BSD variants) */
10050
10051#include <fcntl.h>
10052#include <sys/mman.h>
10053
f053c89f 10054#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10055char *malloc ();
10056#endif
10057
10058/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10059#ifndef HAVE_GETPAGESIZE
98418dba 10060/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10061# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10062# define HAVE_SYS_PARAM_H 1
10063# endif
10064
10065# ifdef _SC_PAGESIZE
10066# define getpagesize() sysconf(_SC_PAGESIZE)
10067# else /* no _SC_PAGESIZE */
f053c89f 10068# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10069# include <sys/param.h>
10070# ifdef EXEC_PAGESIZE
10071# define getpagesize() EXEC_PAGESIZE
10072# else /* no EXEC_PAGESIZE */
10073# ifdef NBPG
10074# define getpagesize() NBPG * CLSIZE
10075# ifndef CLSIZE
10076# define CLSIZE 1
10077# endif /* no CLSIZE */
10078# else /* no NBPG */
10079# ifdef NBPC
10080# define getpagesize() NBPC
10081# else /* no NBPC */
10082# ifdef PAGESIZE
10083# define getpagesize() PAGESIZE
10084# endif /* PAGESIZE */
10085# endif /* no NBPC */
10086# endif /* no NBPG */
10087# endif /* no EXEC_PAGESIZE */
10088# else /* no HAVE_SYS_PARAM_H */
10089# define getpagesize() 8192 /* punt totally */
10090# endif /* no HAVE_SYS_PARAM_H */
10091# endif /* no _SC_PAGESIZE */
10092
10093#endif /* no HAVE_GETPAGESIZE */
10094
10095int
10096main ()
10097{
10098 char *data, *data2, *data3;
10099 int i, pagesize;
10100 int fd;
10101
10102 pagesize = getpagesize ();
10103
10104 /* First, make a file with some known garbage in it. */
10105 data = (char *) malloc (pagesize);
10106 if (!data)
ca81d7a0 10107 return 1;
98418dba
CW
10108 for (i = 0; i < pagesize; ++i)
10109 *(data + i) = rand ();
10110 umask (0);
10111 fd = creat ("conftest.mmap", 0600);
10112 if (fd < 0)
ca81d7a0 10113 return 1;
98418dba 10114 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10115 return 1;
98418dba
CW
10116 close (fd);
10117
10118 /* Next, try to mmap the file at a fixed address which already has
10119 something else allocated at it. If we can, also make sure that
10120 we see the same garbage. */
10121 fd = open ("conftest.mmap", O_RDWR);
10122 if (fd < 0)
ca81d7a0 10123 return 1;
98418dba
CW
10124 data2 = (char *) malloc (2 * pagesize);
10125 if (!data2)
ca81d7a0
JD
10126 return 1;
10127 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10128 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10129 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10130 return 1;
98418dba
CW
10131 for (i = 0; i < pagesize; ++i)
10132 if (*(data + i) != *(data2 + i))
ca81d7a0 10133 return 1;
98418dba
CW
10134
10135 /* Finally, make sure that changes to the mapped area do not
10136 percolate back to the file as seen by read(). (This is a bug on
10137 some variants of i386 svr4.0.) */
10138 for (i = 0; i < pagesize; ++i)
10139 *(data2 + i) = *(data2 + i) + 1;
10140 data3 = (char *) malloc (pagesize);
10141 if (!data3)
ca81d7a0 10142 return 1;
98418dba 10143 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10144 return 1;
98418dba
CW
10145 for (i = 0; i < pagesize; ++i)
10146 if (*(data + i) != *(data3 + i))
ca81d7a0 10147 return 1;
98418dba 10148 close (fd);
ca81d7a0 10149 return 0;
98418dba
CW
10150}
10151_ACEOF
10152rm -f conftest$ac_exeext
ca81d7a0
JD
10153if { (ac_try="$ac_link"
10154case "(($ac_try" in
10155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10156 *) ac_try_echo=$ac_try;;
10157esac
10158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10159 (eval "$ac_link") 2>&5
98418dba 10160 ac_status=$?
c0d27fcc 10161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10162 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10163 { (case "(($ac_try" in
10164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10165 *) ac_try_echo=$ac_try;;
10166esac
10167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10168 (eval "$ac_try") 2>&5
98418dba 10169 ac_status=$?
c0d27fcc 10170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10171 (exit $ac_status); }; }; then
10172 ac_cv_func_mmap_fixed_mapped=yes
10173else
10174 echo "$as_me: program exited with status $ac_status" >&5
10175echo "$as_me: failed program was:" >&5
19650fd6
AS
10176sed 's/^/| /' conftest.$ac_ext >&5
10177
c0d27fcc 10178( exit $ac_status )
98418dba
CW
10179ac_cv_func_mmap_fixed_mapped=no
10180fi
ca81d7a0 10181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10182fi
ca81d7a0
JD
10183
10184
98418dba 10185fi
ca81d7a0
JD
10186{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10187echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10188if test $ac_cv_func_mmap_fixed_mapped = yes; then
10189
c0d27fcc 10190cat >>confdefs.h <<\_ACEOF
98418dba 10191#define HAVE_MMAP 1
c0d27fcc 10192_ACEOF
98418dba
CW
10193
10194fi
10195rm -f conftest.mmap
10196
10197if test $use_mmap_for_buffers = yes; then
10198 REL_ALLOC=no
10199fi
10200
10201LIBS="$libsrc_libs $LIBS"
10202
c0d27fcc 10203
ca81d7a0
JD
10204{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10205echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10206if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10207 echo $ECHO_N "(cached) $ECHO_C" >&6
10208else
10209 ac_check_lib_save_LIBS=$LIBS
10210LIBS="-ldnet $LIBS"
10211cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10212/* confdefs.h. */
10213_ACEOF
10214cat confdefs.h >>conftest.$ac_ext
10215cat >>conftest.$ac_ext <<_ACEOF
10216/* end confdefs.h. */
98418dba 10217
ca81d7a0
JD
10218/* Override any GCC internal prototype to avoid an error.
10219 Use char because int might match the return type of a GCC
10220 builtin and then its argument prototype would still apply. */
98418dba
CW
10221#ifdef __cplusplus
10222extern "C"
10223#endif
98418dba 10224char dnet_ntoa ();
98418dba
CW
10225int
10226main ()
10227{
ca81d7a0 10228return dnet_ntoa ();
98418dba
CW
10229 ;
10230 return 0;
10231}
10232_ACEOF
10233rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10234if { (ac_try="$ac_link"
10235case "(($ac_try" in
10236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10237 *) ac_try_echo=$ac_try;;
10238esac
10239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10240 (eval "$ac_link") 2>conftest.er1
98418dba 10241 ac_status=$?
edfaf76d
LK
10242 grep -v '^ *+' conftest.er1 >conftest.err
10243 rm -f conftest.er1
10244 cat conftest.err >&5
c0d27fcc 10245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10246 (exit $ac_status); } && {
10247 test -z "$ac_c_werror_flag" ||
10248 test ! -s conftest.err
10249 } && test -s conftest$ac_exeext &&
10250 $as_test_x conftest$ac_exeext; then
98418dba
CW
10251 ac_cv_lib_dnet_dnet_ntoa=yes
10252else
10253 echo "$as_me: failed program was:" >&5
19650fd6
AS
10254sed 's/^/| /' conftest.$ac_ext >&5
10255
ca81d7a0 10256 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10257fi
ca81d7a0 10258
f053c89f 10259rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10260 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10261LIBS=$ac_check_lib_save_LIBS
10262fi
ca81d7a0
JD
10263{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10264echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10265if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10266 cat >>confdefs.h <<_ACEOF
98418dba 10267#define HAVE_LIBDNET 1
c0d27fcc 10268_ACEOF
98418dba
CW
10269
10270 LIBS="-ldnet $LIBS"
10271
10272fi
10273
c0d27fcc 10274
ca81d7a0
JD
10275{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10276echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10277if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 ac_check_lib_save_LIBS=$LIBS
10281LIBS="-lXbsd $LIBS"
10282cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10283/* confdefs.h. */
10284_ACEOF
10285cat confdefs.h >>conftest.$ac_ext
10286cat >>conftest.$ac_ext <<_ACEOF
10287/* end confdefs.h. */
98418dba 10288
c0d27fcc 10289
98418dba
CW
10290int
10291main ()
10292{
ca81d7a0 10293return main ();
98418dba
CW
10294 ;
10295 return 0;
10296}
10297_ACEOF
10298rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10299if { (ac_try="$ac_link"
10300case "(($ac_try" in
10301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10302 *) ac_try_echo=$ac_try;;
10303esac
10304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10305 (eval "$ac_link") 2>conftest.er1
98418dba 10306 ac_status=$?
edfaf76d
LK
10307 grep -v '^ *+' conftest.er1 >conftest.err
10308 rm -f conftest.er1
10309 cat conftest.err >&5
c0d27fcc 10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10311 (exit $ac_status); } && {
10312 test -z "$ac_c_werror_flag" ||
10313 test ! -s conftest.err
10314 } && test -s conftest$ac_exeext &&
10315 $as_test_x conftest$ac_exeext; then
98418dba
CW
10316 ac_cv_lib_Xbsd_main=yes
10317else
10318 echo "$as_me: failed program was:" >&5
19650fd6
AS
10319sed 's/^/| /' conftest.$ac_ext >&5
10320
ca81d7a0 10321 ac_cv_lib_Xbsd_main=no
98418dba 10322fi
ca81d7a0 10323
f053c89f 10324rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10325 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10326LIBS=$ac_check_lib_save_LIBS
10327fi
ca81d7a0
JD
10328{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10329echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10330if test $ac_cv_lib_Xbsd_main = yes; then
10331 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10332fi
10333
c0d27fcc
MR
10334
10335
ca81d7a0
JD
10336{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10337echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10338if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10339 echo $ECHO_N "(cached) $ECHO_C" >&6
10340else
10341 ac_check_lib_save_LIBS=$LIBS
10342LIBS="-lpthreads $LIBS"
10343cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10344/* confdefs.h. */
10345_ACEOF
10346cat confdefs.h >>conftest.$ac_ext
10347cat >>conftest.$ac_ext <<_ACEOF
10348/* end confdefs.h. */
98418dba 10349
ca81d7a0
JD
10350/* Override any GCC internal prototype to avoid an error.
10351 Use char because int might match the return type of a GCC
10352 builtin and then its argument prototype would still apply. */
98418dba
CW
10353#ifdef __cplusplus
10354extern "C"
10355#endif
98418dba 10356char cma_open ();
98418dba
CW
10357int
10358main ()
10359{
ca81d7a0 10360return cma_open ();
98418dba
CW
10361 ;
10362 return 0;
10363}
10364_ACEOF
10365rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10366if { (ac_try="$ac_link"
10367case "(($ac_try" in
10368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10369 *) ac_try_echo=$ac_try;;
10370esac
10371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10372 (eval "$ac_link") 2>conftest.er1
98418dba 10373 ac_status=$?
edfaf76d
LK
10374 grep -v '^ *+' conftest.er1 >conftest.err
10375 rm -f conftest.er1
10376 cat conftest.err >&5
c0d27fcc 10377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10378 (exit $ac_status); } && {
10379 test -z "$ac_c_werror_flag" ||
10380 test ! -s conftest.err
10381 } && test -s conftest$ac_exeext &&
10382 $as_test_x conftest$ac_exeext; then
98418dba
CW
10383 ac_cv_lib_pthreads_cma_open=yes
10384else
10385 echo "$as_me: failed program was:" >&5
19650fd6
AS
10386sed 's/^/| /' conftest.$ac_ext >&5
10387
ca81d7a0 10388 ac_cv_lib_pthreads_cma_open=no
98418dba 10389fi
ca81d7a0 10390
f053c89f 10391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10392 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10393LIBS=$ac_check_lib_save_LIBS
10394fi
ca81d7a0
JD
10395{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10396echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10397if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10398 cat >>confdefs.h <<_ACEOF
98418dba 10399#define HAVE_LIBPTHREADS 1
c0d27fcc 10400_ACEOF
98418dba
CW
10401
10402 LIBS="-lpthreads $LIBS"
10403
10404fi
10405
c0d27fcc 10406
55597d70
DL
10407
10408case ${host_os} in
10409aix*)
ca81d7a0
JD
10410 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10411echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10412if test "${gdb_cv_bigtoc+set}" = set; then
10413 echo $ECHO_N "(cached) $ECHO_C" >&6
10414else
10415
10416 case $GCC in
10417 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10418 *) gdb_cv_bigtoc=-bbigtoc ;;
10419 esac
10420
10421 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10422 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
55597d70
DL
10428
10429int
10430main ()
10431{
10432int i;
10433 ;
10434 return 0;
10435}
10436_ACEOF
10437rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10438if { (ac_try="$ac_link"
10439case "(($ac_try" in
10440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10441 *) ac_try_echo=$ac_try;;
10442esac
10443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10444 (eval "$ac_link") 2>conftest.er1
55597d70 10445 ac_status=$?
edfaf76d
LK
10446 grep -v '^ *+' conftest.er1 >conftest.err
10447 rm -f conftest.er1
10448 cat conftest.err >&5
55597d70 10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10450 (exit $ac_status); } && {
10451 test -z "$ac_c_werror_flag" ||
10452 test ! -s conftest.err
10453 } && test -s conftest$ac_exeext &&
10454 $as_test_x conftest$ac_exeext; then
55597d70
DL
10455 :
10456else
10457 echo "$as_me: failed program was:" >&5
19650fd6
AS
10458sed 's/^/| /' conftest.$ac_ext >&5
10459
ca81d7a0 10460 gdb_cv_bigtoc=
55597d70 10461fi
ca81d7a0 10462
f053c89f 10463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10464 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10465
10466fi
ca81d7a0
JD
10467{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10468echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10469 ;;
10470esac
10471
ae1a998c
RS
10472# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10473# used for the tests that follow. We set them back to REAL_CFLAGS and
10474# REAL_CPPFLAGS later on.
98418dba
CW
10475
10476REAL_CPPFLAGS="$CPPFLAGS"
10477
10478if test "${HAVE_X11}" = "yes"; then
10479 DEFS="$C_SWITCH_X_SITE $DEFS"
10480 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10481 LIBS="$LIBX $LIBS"
10482 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10483 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10484
10485 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10486 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10487 # but it's more convenient here to set LD_RUN_PATH
10488 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10489 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10490 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10491 export LD_RUN_PATH
10492 fi
10493
10494 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10495 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10496echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10497 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10498/* confdefs.h. */
10499_ACEOF
10500cat confdefs.h >>conftest.$ac_ext
10501cat >>conftest.$ac_ext <<_ACEOF
10502/* end confdefs.h. */
98418dba 10503
98418dba
CW
10504int
10505main ()
10506{
10507XOpenDisplay ("foo");
10508 ;
10509 return 0;
10510}
10511_ACEOF
10512rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10513if { (ac_try="$ac_link"
10514case "(($ac_try" in
10515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10516 *) ac_try_echo=$ac_try;;
10517esac
10518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10519 (eval "$ac_link") 2>conftest.er1
98418dba 10520 ac_status=$?
edfaf76d
LK
10521 grep -v '^ *+' conftest.er1 >conftest.err
10522 rm -f conftest.er1
10523 cat conftest.err >&5
c0d27fcc 10524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10525 (exit $ac_status); } && {
10526 test -z "$ac_c_werror_flag" ||
10527 test ! -s conftest.err
10528 } && test -s conftest$ac_exeext &&
10529 $as_test_x conftest$ac_exeext; then
35996d22 10530 xlinux_first_failure=no
98418dba
CW
10531else
10532 echo "$as_me: failed program was:" >&5
19650fd6
AS
10533sed 's/^/| /' conftest.$ac_ext >&5
10534
ca81d7a0 10535 xlinux_first_failure=yes
98418dba 10536fi
ca81d7a0 10537
f053c89f 10538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10539 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10540 if test "${xlinux_first_failure}" = "yes"; then
10541 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10542 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10543 OLD_CPPFLAGS="$CPPFLAGS"
10544 OLD_LIBS="$LIBS"
10545 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10546 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10547 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10548 LIBS="$LIBS -b i486-linuxaout"
10549 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10550/* confdefs.h. */
10551_ACEOF
10552cat confdefs.h >>conftest.$ac_ext
10553cat >>conftest.$ac_ext <<_ACEOF
10554/* end confdefs.h. */
98418dba 10555
98418dba
CW
10556int
10557main ()
10558{
10559XOpenDisplay ("foo");
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10565if { (ac_try="$ac_link"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
10570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10571 (eval "$ac_link") 2>conftest.er1
98418dba 10572 ac_status=$?
edfaf76d
LK
10573 grep -v '^ *+' conftest.er1 >conftest.err
10574 rm -f conftest.er1
10575 cat conftest.err >&5
c0d27fcc 10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10577 (exit $ac_status); } && {
10578 test -z "$ac_c_werror_flag" ||
10579 test ! -s conftest.err
10580 } && test -s conftest$ac_exeext &&
10581 $as_test_x conftest$ac_exeext; then
98418dba
CW
10582 xlinux_second_failure=no
10583else
10584 echo "$as_me: failed program was:" >&5
19650fd6
AS
10585sed 's/^/| /' conftest.$ac_ext >&5
10586
ca81d7a0 10587 xlinux_second_failure=yes
98418dba 10588fi
ca81d7a0 10589
f053c89f 10590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10591 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10592 if test "${xlinux_second_failure}" = "yes"; then
10593 # If we get the same failure with -b, there is no use adding -b.
10594 # So take it out. This plays safe.
10595 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10596 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10597 CPPFLAGS="$OLD_CPPFLAGS"
10598 LIBS="$OLD_LIBS"
ca81d7a0
JD
10599 { echo "$as_me:$LINENO: result: no" >&5
10600echo "${ECHO_T}no" >&6; }
98418dba 10601 else
ca81d7a0
JD
10602 { echo "$as_me:$LINENO: result: yes" >&5
10603echo "${ECHO_T}yes" >&6; }
98418dba
CW
10604 fi
10605 else
ca81d7a0
JD
10606 { echo "$as_me:$LINENO: result: no" >&5
10607echo "${ECHO_T}no" >&6; }
98418dba
CW
10608 fi
10609 fi
10610
10611 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10612 # header files included from there.
ca81d7a0
JD
10613 { echo "$as_me:$LINENO: checking for Xkb" >&5
10614echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10615 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10616/* confdefs.h. */
10617_ACEOF
10618cat confdefs.h >>conftest.$ac_ext
10619cat >>conftest.$ac_ext <<_ACEOF
10620/* end confdefs.h. */
98418dba
CW
10621#include <X11/Xlib.h>
10622#include <X11/XKBlib.h>
98418dba
CW
10623int
10624main ()
10625{
10626XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10627 ;
10628 return 0;
10629}
10630_ACEOF
10631rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10632if { (ac_try="$ac_link"
10633case "(($ac_try" in
10634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10635 *) ac_try_echo=$ac_try;;
10636esac
10637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10638 (eval "$ac_link") 2>conftest.er1
98418dba 10639 ac_status=$?
edfaf76d
LK
10640 grep -v '^ *+' conftest.er1 >conftest.err
10641 rm -f conftest.er1
10642 cat conftest.err >&5
c0d27fcc 10643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10644 (exit $ac_status); } && {
10645 test -z "$ac_c_werror_flag" ||
10646 test ! -s conftest.err
10647 } && test -s conftest$ac_exeext &&
10648 $as_test_x conftest$ac_exeext; then
98418dba
CW
10649 emacs_xkb=yes
10650else
10651 echo "$as_me: failed program was:" >&5
19650fd6
AS
10652sed 's/^/| /' conftest.$ac_ext >&5
10653
ca81d7a0 10654 emacs_xkb=no
98418dba 10655fi
ca81d7a0 10656
f053c89f 10657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10658 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10659 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10660echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10661 if test $emacs_xkb = yes; then
b936fae4 10662
c0d27fcc 10663cat >>confdefs.h <<\_ACEOF
98418dba 10664#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10665_ACEOF
98418dba
CW
10666
10667 fi
10668
c0d27fcc
MR
10669
10670
10671
10672
98418dba
CW
10673for ac_func in XrmSetDatabase XScreenResourceString \
10674XScreenNumberOfScreen XSetWMProtocols
10675do
10676as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10677{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10678echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10679if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10680 echo $ECHO_N "(cached) $ECHO_C" >&6
10681else
10682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10683/* confdefs.h. */
10684_ACEOF
10685cat confdefs.h >>conftest.$ac_ext
10686cat >>conftest.$ac_ext <<_ACEOF
10687/* end confdefs.h. */
edfaf76d
LK
10688/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10690#define $ac_func innocuous_$ac_func
10691
98418dba 10692/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10693 which can conflict with char $ac_func (); below.
10694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10695 <limits.h> exists even on freestanding compilers. */
edfaf76d 10696
19650fd6
AS
10697#ifdef __STDC__
10698# include <limits.h>
10699#else
10700# include <assert.h>
10701#endif
edfaf76d
LK
10702
10703#undef $ac_func
10704
ca81d7a0
JD
10705/* Override any GCC internal prototype to avoid an error.
10706 Use char because int might match the return type of a GCC
10707 builtin and then its argument prototype would still apply. */
98418dba
CW
10708#ifdef __cplusplus
10709extern "C"
10710#endif
98418dba 10711char $ac_func ();
98418dba
CW
10712/* The GNU C library defines this for functions which it implements
10713 to always fail with ENOSYS. Some functions are actually named
10714 something starting with __ and the normal name is an alias. */
ca81d7a0 10715#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10716choke me
98418dba
CW
10717#endif
10718
19650fd6
AS
10719int
10720main ()
10721{
ca81d7a0 10722return $ac_func ();
98418dba
CW
10723 ;
10724 return 0;
10725}
10726_ACEOF
10727rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10728if { (ac_try="$ac_link"
10729case "(($ac_try" in
10730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10731 *) ac_try_echo=$ac_try;;
10732esac
10733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10734 (eval "$ac_link") 2>conftest.er1
98418dba 10735 ac_status=$?
edfaf76d
LK
10736 grep -v '^ *+' conftest.er1 >conftest.err
10737 rm -f conftest.er1
10738 cat conftest.err >&5
c0d27fcc 10739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10740 (exit $ac_status); } && {
10741 test -z "$ac_c_werror_flag" ||
10742 test ! -s conftest.err
10743 } && test -s conftest$ac_exeext &&
10744 $as_test_x conftest$ac_exeext; then
98418dba
CW
10745 eval "$as_ac_var=yes"
10746else
10747 echo "$as_me: failed program was:" >&5
19650fd6
AS
10748sed 's/^/| /' conftest.$ac_ext >&5
10749
ca81d7a0 10750 eval "$as_ac_var=no"
98418dba 10751fi
ca81d7a0 10752
f053c89f 10753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10754 conftest$ac_exeext conftest.$ac_ext
98418dba 10755fi
ca81d7a0
JD
10756ac_res=`eval echo '${'$as_ac_var'}'`
10757 { echo "$as_me:$LINENO: result: $ac_res" >&5
10758echo "${ECHO_T}$ac_res" >&6; }
98418dba 10759if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10760 cat >>confdefs.h <<_ACEOF
98418dba 10761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10762_ACEOF
98418dba
CW
10763
10764fi
10765done
10766
10767fi
10768
10769if test "${window_system}" = "x11"; then
ca81d7a0
JD
10770 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10771echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10772 if test "${emacs_cv_x11_version_6+set}" = set; then
10773 echo $ECHO_N "(cached) $ECHO_C" >&6
10774else
10775 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10776/* confdefs.h. */
10777_ACEOF
10778cat confdefs.h >>conftest.$ac_ext
10779cat >>conftest.$ac_ext <<_ACEOF
10780/* end confdefs.h. */
98418dba 10781#include <X11/Xlib.h>
98418dba
CW
10782int
10783main ()
10784{
10785#if XlibSpecificationRelease < 6
10786fail;
10787#endif
10788
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10794if { (ac_try="$ac_link"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
10799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10800 (eval "$ac_link") 2>conftest.er1
98418dba 10801 ac_status=$?
edfaf76d
LK
10802 grep -v '^ *+' conftest.er1 >conftest.err
10803 rm -f conftest.er1
10804 cat conftest.err >&5
c0d27fcc 10805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10806 (exit $ac_status); } && {
10807 test -z "$ac_c_werror_flag" ||
10808 test ! -s conftest.err
10809 } && test -s conftest$ac_exeext &&
10810 $as_test_x conftest$ac_exeext; then
98418dba
CW
10811 emacs_cv_x11_version_6=yes
10812else
10813 echo "$as_me: failed program was:" >&5
19650fd6
AS
10814sed 's/^/| /' conftest.$ac_ext >&5
10815
ca81d7a0 10816 emacs_cv_x11_version_6=no
98418dba 10817fi
ca81d7a0 10818
f053c89f 10819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10820 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10821fi
10822
10823 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10824 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10825echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10826
c0d27fcc 10827cat >>confdefs.h <<\_ACEOF
98418dba 10828#define HAVE_X11R6 1
c0d27fcc 10829_ACEOF
98418dba
CW
10830
10831 else
ca81d7a0
JD
10832 { echo "$as_me:$LINENO: result: before 6" >&5
10833echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10834 fi
10835fi
10836
98418dba 10837
0cfc0546
GM
10838### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10839HAVE_RSVG=no
9e2a2647 10840if test "${HAVE_X11}" = "yes"; then
0cfc0546 10841 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10842 RSVG_REQUIRED=2.0.0
10843 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10844
10845
10846 succeeded=no
10847
00b9c927 10848 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10849set dummy pkg-config; ac_word=$2
10850{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10851echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10852if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10853 echo $ECHO_N "(cached) $ECHO_C" >&6
10854else
10855 case $PKG_CONFIG in
10856 [\\/]* | ?:[\\/]*)
10857 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10858 ;;
10859 *)
10860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10861for as_dir in $PATH
10862do
10863 IFS=$as_save_IFS
10864 test -z "$as_dir" && as_dir=.
10865 for ac_exec_ext in '' $ac_executable_extensions; do
10866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10867 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10868 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10869 break 2
10870 fi
10871done
10872done
10873IFS=$as_save_IFS
10874
10875 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10876 ;;
10877esac
10878fi
10879PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10880if test -n "$PKG_CONFIG"; then
10881 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10882echo "${ECHO_T}$PKG_CONFIG" >&6; }
10883else
10884 { echo "$as_me:$LINENO: result: no" >&5
10885echo "${ECHO_T}no" >&6; }
10886fi
10887
10888
0cfc0546
GM
10889
10890 if test "$PKG_CONFIG" = "no" ; then
10891 :
10892 else
10893 PKG_CONFIG_MIN_VERSION=0.9.0
10894 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10895 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10896echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10897
10898 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10899 { echo "$as_me:$LINENO: result: yes" >&5
10900echo "${ECHO_T}yes" >&6; }
10901 succeeded=yes
10902
10903 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10904echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10905 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10906 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10907echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10908
10909 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10910echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10911 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10912 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10913echo "${ECHO_T}$RSVG_LIBS" >&6; }
10914 else
10915 { echo "$as_me:$LINENO: result: no" >&5
10916echo "${ECHO_T}no" >&6; }
10917 RSVG_CFLAGS=""
10918 RSVG_LIBS=""
10919 ## If we have a custom action on failure, don't print errors, but
10920 ## do set a variable so people can do so.
10921 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10922
10923 fi
10924
10925
10926
10927 else
10928 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10929 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10930 fi
10931 fi
10932
10933 if test $succeeded = yes; then
10934 :
10935 else
10936 :
10937 fi
10938
10939
10940
10941
10942 if test ".${RSVG_CFLAGS}" != "."; then
10943 HAVE_RSVG=yes
10944
10945cat >>confdefs.h <<\_ACEOF
10946#define HAVE_RSVG 1
10947_ACEOF
10948
10949 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10950 LIBS="$RSVG_LIBS $LIBS"
10951 fi
10952 fi
10953fi
10954
10955
488dd4c4 10956HAVE_GTK=no
9d2818d6 10957if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10958 GLIB_REQUIRED=2.6
10959 GTK_REQUIRED=2.6
488dd4c4
JD
10960 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10961
488dd4c4
JD
10962
10963 succeeded=no
10964
00b9c927 10965 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10966set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10967{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10968echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10969if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10970 echo $ECHO_N "(cached) $ECHO_C" >&6
10971else
10972 case $PKG_CONFIG in
10973 [\\/]* | ?:[\\/]*)
10974 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10975 ;;
10976 *)
10977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10978for as_dir in $PATH
10979do
10980 IFS=$as_save_IFS
10981 test -z "$as_dir" && as_dir=.
10982 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10983 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10984 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10985 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10986 break 2
10987 fi
10988done
10989done
ca81d7a0 10990IFS=$as_save_IFS
488dd4c4
JD
10991
10992 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10993 ;;
10994esac
10995fi
10996PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10997if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10998 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10999echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11000else
ca81d7a0
JD
11001 { echo "$as_me:$LINENO: result: no" >&5
11002echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11003fi
11004
ca81d7a0 11005
488dd4c4
JD
11006
11007 if test "$PKG_CONFIG" = "no" ; then
089a966d 11008 pkg_check_gtk=no
488dd4c4
JD
11009 else
11010 PKG_CONFIG_MIN_VERSION=0.9.0
11011 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11012 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11013echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11014
67db6aa2 11015 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11016 { echo "$as_me:$LINENO: result: yes" >&5
11017echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11018 succeeded=yes
11019
ca81d7a0
JD
11020 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11021echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11022 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11023 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11024echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11025
ca81d7a0
JD
11026 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11027echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11028 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11029 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11030echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11031 else
ca81d7a0
JD
11032 { echo "$as_me:$LINENO: result: no" >&5
11033echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11034 GTK_CFLAGS=""
11035 GTK_LIBS=""
11036 ## If we have a custom action on failure, don't print errors, but
11037 ## do set a variable so people can do so.
11038 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11039
488dd4c4
JD
11040 fi
11041
11042
11043
11044 else
11045 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11046 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11047 fi
11048 fi
11049
11050 if test $succeeded = yes; then
089a966d 11051 pkg_check_gtk=yes
488dd4c4 11052 else
089a966d
GM
11053 pkg_check_gtk=no
11054 fi
11055
11056 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11057 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11058echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11059 { (exit 1); exit 1; }; }
11060 fi
089a966d
GM
11061fi
11062
11063
11064if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11065
11066
11067
11068 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11069 CFLAGS="$CFLAGS $GTK_CFLAGS"
11070 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11071 GTK_COMPILES=no
57669b57 11072
8eeae1c9 11073for ac_func in gtk_main
57669b57
JD
11074do
11075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11076{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11078if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11079 echo $ECHO_N "(cached) $ECHO_C" >&6
11080else
11081 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11082/* confdefs.h. */
11083_ACEOF
11084cat confdefs.h >>conftest.$ac_ext
11085cat >>conftest.$ac_ext <<_ACEOF
11086/* end confdefs.h. */
edfaf76d
LK
11087/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11088 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11089#define $ac_func innocuous_$ac_func
11090
57669b57
JD
11091/* System header to define __stub macros and hopefully few prototypes,
11092 which can conflict with char $ac_func (); below.
11093 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11094 <limits.h> exists even on freestanding compilers. */
edfaf76d 11095
57669b57
JD
11096#ifdef __STDC__
11097# include <limits.h>
11098#else
11099# include <assert.h>
11100#endif
edfaf76d
LK
11101
11102#undef $ac_func
11103
ca81d7a0
JD
11104/* Override any GCC internal prototype to avoid an error.
11105 Use char because int might match the return type of a GCC
11106 builtin and then its argument prototype would still apply. */
57669b57
JD
11107#ifdef __cplusplus
11108extern "C"
57669b57 11109#endif
57669b57
JD
11110char $ac_func ();
11111/* The GNU C library defines this for functions which it implements
11112 to always fail with ENOSYS. Some functions are actually named
11113 something starting with __ and the normal name is an alias. */
ca81d7a0 11114#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11115choke me
57669b57
JD
11116#endif
11117
11118int
11119main ()
11120{
ca81d7a0 11121return $ac_func ();
57669b57
JD
11122 ;
11123 return 0;
11124}
11125_ACEOF
11126rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11127if { (ac_try="$ac_link"
11128case "(($ac_try" in
11129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11130 *) ac_try_echo=$ac_try;;
11131esac
11132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11133 (eval "$ac_link") 2>conftest.er1
57669b57 11134 ac_status=$?
edfaf76d
LK
11135 grep -v '^ *+' conftest.er1 >conftest.err
11136 rm -f conftest.er1
11137 cat conftest.err >&5
57669b57 11138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11139 (exit $ac_status); } && {
11140 test -z "$ac_c_werror_flag" ||
11141 test ! -s conftest.err
11142 } && test -s conftest$ac_exeext &&
11143 $as_test_x conftest$ac_exeext; then
57669b57
JD
11144 eval "$as_ac_var=yes"
11145else
11146 echo "$as_me: failed program was:" >&5
11147sed 's/^/| /' conftest.$ac_ext >&5
11148
ca81d7a0 11149 eval "$as_ac_var=no"
57669b57 11150fi
ca81d7a0 11151
f053c89f 11152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11153 conftest$ac_exeext conftest.$ac_ext
57669b57 11154fi
ca81d7a0
JD
11155ac_res=`eval echo '${'$as_ac_var'}'`
11156 { echo "$as_me:$LINENO: result: $ac_res" >&5
11157echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11158if test `eval echo '${'$as_ac_var'}'` = yes; then
11159 cat >>confdefs.h <<_ACEOF
11160#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11161_ACEOF
8eeae1c9 11162 GTK_COMPILES=yes
57669b57
JD
11163fi
11164done
11165
8eeae1c9 11166 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11167 if test "$USE_X_TOOLKIT" != "maybe"; then
11168 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11169echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11170 { (exit 1); exit 1; }; };
089a966d
GM
11171 fi
11172 else
11173 HAVE_GTK=yes
488dd4c4
JD
11174
11175cat >>confdefs.h <<\_ACEOF
a51f4969 11176#define USE_GTK 1
488dd4c4
JD
11177_ACEOF
11178
089a966d 11179 USE_X_TOOLKIT=none
f60c93db
JD
11180 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11181 :
11182 else
11183 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11184 closing open displays. This is no problem if you just use
11185 one display, but if you use more than one and close one of them
11186 Emacs may crash." >&5
11187echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11188 closing open displays. This is no problem if you just use
11189 one display, but if you use more than one and close one of them
11190 Emacs may crash." >&2;}
11191 sleep 3
11192 fi
089a966d
GM
11193 fi
11194
11195fi
11196
11197
11198if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11199
d0a80c21
JD
11200 if test "$with_toolkit_scroll_bars" != no; then
11201 with_toolkit_scroll_bars=yes
11202 fi
57669b57
JD
11203
11204 HAVE_GTK_MULTIDISPLAY=no
11205
11206for ac_func in gdk_display_open
11207do
11208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11209{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11211if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11212 echo $ECHO_N "(cached) $ECHO_C" >&6
11213else
11214 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11215/* confdefs.h. */
11216_ACEOF
11217cat confdefs.h >>conftest.$ac_ext
11218cat >>conftest.$ac_ext <<_ACEOF
11219/* end confdefs.h. */
edfaf76d
LK
11220/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11222#define $ac_func innocuous_$ac_func
11223
57669b57
JD
11224/* System header to define __stub macros and hopefully few prototypes,
11225 which can conflict with char $ac_func (); below.
11226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11227 <limits.h> exists even on freestanding compilers. */
edfaf76d 11228
57669b57
JD
11229#ifdef __STDC__
11230# include <limits.h>
11231#else
11232# include <assert.h>
11233#endif
edfaf76d
LK
11234
11235#undef $ac_func
11236
ca81d7a0
JD
11237/* Override any GCC internal prototype to avoid an error.
11238 Use char because int might match the return type of a GCC
11239 builtin and then its argument prototype would still apply. */
57669b57
JD
11240#ifdef __cplusplus
11241extern "C"
57669b57 11242#endif
57669b57
JD
11243char $ac_func ();
11244/* The GNU C library defines this for functions which it implements
11245 to always fail with ENOSYS. Some functions are actually named
11246 something starting with __ and the normal name is an alias. */
ca81d7a0 11247#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11248choke me
57669b57
JD
11249#endif
11250
11251int
11252main ()
11253{
ca81d7a0 11254return $ac_func ();
57669b57
JD
11255 ;
11256 return 0;
11257}
11258_ACEOF
11259rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11260if { (ac_try="$ac_link"
11261case "(($ac_try" in
11262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11263 *) ac_try_echo=$ac_try;;
11264esac
11265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11266 (eval "$ac_link") 2>conftest.er1
57669b57 11267 ac_status=$?
edfaf76d
LK
11268 grep -v '^ *+' conftest.er1 >conftest.err
11269 rm -f conftest.er1
11270 cat conftest.err >&5
57669b57 11271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11272 (exit $ac_status); } && {
11273 test -z "$ac_c_werror_flag" ||
11274 test ! -s conftest.err
11275 } && test -s conftest$ac_exeext &&
11276 $as_test_x conftest$ac_exeext; then
57669b57
JD
11277 eval "$as_ac_var=yes"
11278else
11279 echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
ca81d7a0 11282 eval "$as_ac_var=no"
57669b57 11283fi
ca81d7a0 11284
f053c89f 11285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11286 conftest$ac_exeext conftest.$ac_ext
57669b57 11287fi
ca81d7a0
JD
11288ac_res=`eval echo '${'$as_ac_var'}'`
11289 { echo "$as_me:$LINENO: result: $ac_res" >&5
11290echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11291if test `eval echo '${'$as_ac_var'}'` = yes; then
11292 cat >>confdefs.h <<_ACEOF
11293#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11294_ACEOF
11295 HAVE_GTK_MULTIDISPLAY=yes
11296fi
11297done
11298
11299 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11300
11301cat >>confdefs.h <<\_ACEOF
11302#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11303_ACEOF
11304
11305 fi
57669b57 11306
572a3cc2
JD
11307 HAVE_GTK_FILE_SELECTION=no
11308
11309for ac_func in gtk_file_selection_new
11310do
11311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11312{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11314if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11315 echo $ECHO_N "(cached) $ECHO_C" >&6
11316else
11317 cat >conftest.$ac_ext <<_ACEOF
11318/* confdefs.h. */
11319_ACEOF
11320cat confdefs.h >>conftest.$ac_ext
11321cat >>conftest.$ac_ext <<_ACEOF
11322/* end confdefs.h. */
edfaf76d
LK
11323/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11324 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11325#define $ac_func innocuous_$ac_func
11326
572a3cc2
JD
11327/* System header to define __stub macros and hopefully few prototypes,
11328 which can conflict with char $ac_func (); below.
11329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11330 <limits.h> exists even on freestanding compilers. */
edfaf76d 11331
572a3cc2
JD
11332#ifdef __STDC__
11333# include <limits.h>
11334#else
11335# include <assert.h>
11336#endif
edfaf76d
LK
11337
11338#undef $ac_func
11339
ca81d7a0
JD
11340/* Override any GCC internal prototype to avoid an error.
11341 Use char because int might match the return type of a GCC
11342 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11343#ifdef __cplusplus
11344extern "C"
572a3cc2 11345#endif
572a3cc2
JD
11346char $ac_func ();
11347/* The GNU C library defines this for functions which it implements
11348 to always fail with ENOSYS. Some functions are actually named
11349 something starting with __ and the normal name is an alias. */
ca81d7a0 11350#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11351choke me
572a3cc2
JD
11352#endif
11353
11354int
11355main ()
11356{
ca81d7a0 11357return $ac_func ();
572a3cc2
JD
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11363if { (ac_try="$ac_link"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
11368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369 (eval "$ac_link") 2>conftest.er1
572a3cc2 11370 ac_status=$?
edfaf76d
LK
11371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
572a3cc2 11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest$ac_exeext &&
11379 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11380 eval "$as_ac_var=yes"
11381else
11382 echo "$as_me: failed program was:" >&5
11383sed 's/^/| /' conftest.$ac_ext >&5
11384
ca81d7a0 11385 eval "$as_ac_var=no"
572a3cc2 11386fi
ca81d7a0 11387
f053c89f 11388rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11389 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11390fi
ca81d7a0
JD
11391ac_res=`eval echo '${'$as_ac_var'}'`
11392 { echo "$as_me:$LINENO: result: $ac_res" >&5
11393echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11394if test `eval echo '${'$as_ac_var'}'` = yes; then
11395 cat >>confdefs.h <<_ACEOF
11396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11397_ACEOF
11398 HAVE_GTK_FILE_SELECTION=yes
11399fi
11400done
11401
11402
11403 HAVE_GTK_FILE_CHOOSER=no
11404
11405for ac_func in gtk_file_chooser_dialog_new
11406do
11407as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11408{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11409echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11410if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11411 echo $ECHO_N "(cached) $ECHO_C" >&6
11412else
11413 cat >conftest.$ac_ext <<_ACEOF
11414/* confdefs.h. */
11415_ACEOF
11416cat confdefs.h >>conftest.$ac_ext
11417cat >>conftest.$ac_ext <<_ACEOF
11418/* end confdefs.h. */
edfaf76d
LK
11419/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11420 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11421#define $ac_func innocuous_$ac_func
11422
572a3cc2
JD
11423/* System header to define __stub macros and hopefully few prototypes,
11424 which can conflict with char $ac_func (); below.
11425 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11426 <limits.h> exists even on freestanding compilers. */
edfaf76d 11427
572a3cc2
JD
11428#ifdef __STDC__
11429# include <limits.h>
11430#else
11431# include <assert.h>
11432#endif
edfaf76d
LK
11433
11434#undef $ac_func
11435
ca81d7a0
JD
11436/* Override any GCC internal prototype to avoid an error.
11437 Use char because int might match the return type of a GCC
11438 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11439#ifdef __cplusplus
11440extern "C"
572a3cc2 11441#endif
572a3cc2
JD
11442char $ac_func ();
11443/* The GNU C library defines this for functions which it implements
11444 to always fail with ENOSYS. Some functions are actually named
11445 something starting with __ and the normal name is an alias. */
ca81d7a0 11446#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11447choke me
572a3cc2
JD
11448#endif
11449
11450int
11451main ()
11452{
ca81d7a0 11453return $ac_func ();
572a3cc2
JD
11454 ;
11455 return 0;
11456}
11457_ACEOF
11458rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11459if { (ac_try="$ac_link"
11460case "(($ac_try" in
11461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11462 *) ac_try_echo=$ac_try;;
11463esac
11464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11465 (eval "$ac_link") 2>conftest.er1
572a3cc2 11466 ac_status=$?
edfaf76d
LK
11467 grep -v '^ *+' conftest.er1 >conftest.err
11468 rm -f conftest.er1
11469 cat conftest.err >&5
572a3cc2 11470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11471 (exit $ac_status); } && {
11472 test -z "$ac_c_werror_flag" ||
11473 test ! -s conftest.err
11474 } && test -s conftest$ac_exeext &&
11475 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11476 eval "$as_ac_var=yes"
11477else
11478 echo "$as_me: failed program was:" >&5
11479sed 's/^/| /' conftest.$ac_ext >&5
11480
ca81d7a0 11481 eval "$as_ac_var=no"
572a3cc2 11482fi
ca81d7a0 11483
f053c89f 11484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11485 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11486fi
ca81d7a0
JD
11487ac_res=`eval echo '${'$as_ac_var'}'`
11488 { echo "$as_me:$LINENO: result: $ac_res" >&5
11489echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11490if test `eval echo '${'$as_ac_var'}'` = yes; then
11491 cat >>confdefs.h <<_ACEOF
11492#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11493_ACEOF
11494 HAVE_GTK_FILE_CHOOSER=yes
11495fi
11496done
11497
11498
11499 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11500 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11501
11502cat >>confdefs.h <<\_ACEOF
11503#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11504_ACEOF
11505
b8bdffbe
JD
11506 fi
11507
11508 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11509 HAVE_GTK_AND_PTHREAD=no
11510
11511for ac_header in pthread.h
11512do
11513as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11514if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11515 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11516echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11517if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11518 echo $ECHO_N "(cached) $ECHO_C" >&6
11519fi
ca81d7a0
JD
11520ac_res=`eval echo '${'$as_ac_Header'}'`
11521 { echo "$as_me:$LINENO: result: $ac_res" >&5
11522echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11523else
11524 # Is the header compilable?
ca81d7a0
JD
11525{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11526echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11527cat >conftest.$ac_ext <<_ACEOF
11528/* confdefs.h. */
11529_ACEOF
11530cat confdefs.h >>conftest.$ac_ext
11531cat >>conftest.$ac_ext <<_ACEOF
11532/* end confdefs.h. */
11533$ac_includes_default
11534#include <$ac_header>
11535_ACEOF
11536rm -f conftest.$ac_objext
ca81d7a0
JD
11537if { (ac_try="$ac_compile"
11538case "(($ac_try" in
11539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11540 *) ac_try_echo=$ac_try;;
11541esac
11542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11543 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11544 ac_status=$?
edfaf76d
LK
11545 grep -v '^ *+' conftest.er1 >conftest.err
11546 rm -f conftest.er1
11547 cat conftest.err >&5
b8bdffbe 11548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11549 (exit $ac_status); } && {
11550 test -z "$ac_c_werror_flag" ||
11551 test ! -s conftest.err
11552 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11553 ac_header_compiler=yes
11554else
11555 echo "$as_me: failed program was:" >&5
11556sed 's/^/| /' conftest.$ac_ext >&5
11557
ca81d7a0 11558 ac_header_compiler=no
b8bdffbe 11559fi
ca81d7a0
JD
11560
11561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11562{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11563echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11564
11565# Is the header present?
ca81d7a0
JD
11566{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11567echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11568cat >conftest.$ac_ext <<_ACEOF
11569/* confdefs.h. */
11570_ACEOF
11571cat confdefs.h >>conftest.$ac_ext
11572cat >>conftest.$ac_ext <<_ACEOF
11573/* end confdefs.h. */
11574#include <$ac_header>
11575_ACEOF
ca81d7a0
JD
11576if { (ac_try="$ac_cpp conftest.$ac_ext"
11577case "(($ac_try" in
11578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11579 *) ac_try_echo=$ac_try;;
11580esac
11581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11582 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11583 ac_status=$?
11584 grep -v '^ *+' conftest.er1 >conftest.err
11585 rm -f conftest.er1
11586 cat conftest.err >&5
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11588 (exit $ac_status); } >/dev/null && {
11589 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11590 test ! -s conftest.err
11591 }; then
b8bdffbe
JD
11592 ac_header_preproc=yes
11593else
11594 echo "$as_me: failed program was:" >&5
11595sed 's/^/| /' conftest.$ac_ext >&5
11596
11597 ac_header_preproc=no
11598fi
ca81d7a0 11599
b8bdffbe 11600rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11601{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11602echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11603
11604# So? What about this header?
edfaf76d
LK
11605case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11606 yes:no: )
b8bdffbe
JD
11607 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11608echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11609 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11610echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11611 ac_header_preproc=yes
b8bdffbe 11612 ;;
edfaf76d 11613 no:yes:* )
b8bdffbe
JD
11614 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11615echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11616 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11617echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11618 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11619echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11620 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11621echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11622 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11623echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11624 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11625echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11626
b8bdffbe
JD
11627 ;;
11628esac
ca81d7a0
JD
11629{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11630echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11631if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11632 echo $ECHO_N "(cached) $ECHO_C" >&6
11633else
edfaf76d 11634 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11635fi
ca81d7a0
JD
11636ac_res=`eval echo '${'$as_ac_Header'}'`
11637 { echo "$as_me:$LINENO: result: $ac_res" >&5
11638echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11639
11640fi
11641if test `eval echo '${'$as_ac_Header'}'` = yes; then
11642 cat >>confdefs.h <<_ACEOF
11643#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11644_ACEOF
11645
11646fi
11647
11648done
11649
11650 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11651 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11652echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11653if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11654 echo $ECHO_N "(cached) $ECHO_C" >&6
11655else
11656 ac_check_lib_save_LIBS=$LIBS
11657LIBS="-lpthread $LIBS"
11658cat >conftest.$ac_ext <<_ACEOF
11659/* confdefs.h. */
11660_ACEOF
11661cat confdefs.h >>conftest.$ac_ext
11662cat >>conftest.$ac_ext <<_ACEOF
11663/* end confdefs.h. */
11664
ca81d7a0
JD
11665/* Override any GCC internal prototype to avoid an error.
11666 Use char because int might match the return type of a GCC
11667 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11668#ifdef __cplusplus
11669extern "C"
11670#endif
b8bdffbe
JD
11671char pthread_self ();
11672int
11673main ()
11674{
ca81d7a0 11675return pthread_self ();
b8bdffbe
JD
11676 ;
11677 return 0;
11678}
11679_ACEOF
11680rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11681if { (ac_try="$ac_link"
11682case "(($ac_try" in
11683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11684 *) ac_try_echo=$ac_try;;
11685esac
11686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11687 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11688 ac_status=$?
edfaf76d
LK
11689 grep -v '^ *+' conftest.er1 >conftest.err
11690 rm -f conftest.er1
11691 cat conftest.err >&5
b8bdffbe 11692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11693 (exit $ac_status); } && {
11694 test -z "$ac_c_werror_flag" ||
11695 test ! -s conftest.err
11696 } && test -s conftest$ac_exeext &&
11697 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11698 ac_cv_lib_pthread_pthread_self=yes
11699else
11700 echo "$as_me: failed program was:" >&5
11701sed 's/^/| /' conftest.$ac_ext >&5
11702
ca81d7a0 11703 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11704fi
ca81d7a0 11705
f053c89f 11706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11707 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11708LIBS=$ac_check_lib_save_LIBS
11709fi
ca81d7a0
JD
11710{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11711echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11712if test $ac_cv_lib_pthread_pthread_self = yes; then
11713 HAVE_GTK_AND_PTHREAD=yes
11714fi
11715
11716 fi
11717 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11718 case "${canonical}" in
11719 *-hpux*) ;;
11720 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11721 esac
b8bdffbe
JD
11722
11723cat >>confdefs.h <<\_ACEOF
11724#define HAVE_GTK_AND_PTHREAD 1
11725_ACEOF
11726
11727 fi
57669b57 11728 fi
488dd4c4
JD
11729fi
11730
131e4133
MA
11731HAVE_DBUS=no
11732if test "${with_dbus}" = "yes"; then
cffe4909
MH
11733
11734 succeeded=no
11735
00b9c927 11736 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11737set dummy pkg-config; ac_word=$2
11738{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11740if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11741 echo $ECHO_N "(cached) $ECHO_C" >&6
11742else
cffe4909
MH
11743 case $PKG_CONFIG in
11744 [\\/]* | ?:[\\/]*)
11745 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11746 ;;
11747 *)
11748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11749for as_dir in $PATH
11750do
11751 IFS=$as_save_IFS
11752 test -z "$as_dir" && as_dir=.
11753 for ac_exec_ext in '' $ac_executable_extensions; do
11754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11755 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11756 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11757 break 2
11758 fi
11759done
11760done
11761IFS=$as_save_IFS
131e4133 11762
cffe4909
MH
11763 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11764 ;;
131e4133 11765esac
cffe4909
MH
11766fi
11767PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11768if test -n "$PKG_CONFIG"; then
11769 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11770echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11771else
cffe4909
MH
11772 { echo "$as_me:$LINENO: result: no" >&5
11773echo "${ECHO_T}no" >&6; }
131e4133
MA
11774fi
11775
cffe4909 11776
cffe4909
MH
11777
11778 if test "$PKG_CONFIG" = "no" ; then
11779 HAVE_DBUS=no
11780 else
11781 PKG_CONFIG_MIN_VERSION=0.9.0
11782 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11783 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11784echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11785
11786 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11787 { echo "$as_me:$LINENO: result: yes" >&5
11788echo "${ECHO_T}yes" >&6; }
11789 succeeded=yes
11790
11791 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11792echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11793 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11794 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11795echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11796
11797 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11798echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11799 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11800 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11801echo "${ECHO_T}$DBUS_LIBS" >&6; }
11802 else
11803 { echo "$as_me:$LINENO: result: no" >&5
11804echo "${ECHO_T}no" >&6; }
11805 DBUS_CFLAGS=""
11806 DBUS_LIBS=""
11807 ## If we have a custom action on failure, don't print errors, but
11808 ## do set a variable so people can do so.
11809 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11810
11811 fi
11812
11813
11814
11815 else
11816 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11817 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11818 fi
11819 fi
11820
11821 if test $succeeded = yes; then
11822 HAVE_DBUS=yes
11823 else
11824 HAVE_DBUS=no
11825 fi
131e4133
MA
11826
11827 if test "$HAVE_DBUS" = yes; then
11828
11829cat >>confdefs.h <<\_ACEOF
11830#define HAVE_DBUS 1
11831_ACEOF
11832
131e4133
MA
11833 fi
11834fi
11835
b3615392 11836HAVE_XAW3D=no
991a7602 11837if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11838 if test "$with_xaw3d" != no; then
11839 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11840echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11841 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11842 echo $ECHO_N "(cached) $ECHO_C" >&6
11843else
11844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11845/* confdefs.h. */
11846_ACEOF
11847cat confdefs.h >>conftest.$ac_ext
11848cat >>conftest.$ac_ext <<_ACEOF
11849/* end confdefs.h. */
98418dba
CW
11850
11851#include <X11/Intrinsic.h>
b3615392 11852#include <X11/Xaw3d/Simple.h>
98418dba
CW
11853int
11854main ()
11855{
11856
11857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11862if { (ac_try="$ac_link"
11863case "(($ac_try" in
11864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11865 *) ac_try_echo=$ac_try;;
11866esac
11867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11868 (eval "$ac_link") 2>conftest.er1
98418dba 11869 ac_status=$?
edfaf76d
LK
11870 grep -v '^ *+' conftest.er1 >conftest.err
11871 rm -f conftest.er1
11872 cat conftest.err >&5
c0d27fcc 11873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11874 (exit $ac_status); } && {
11875 test -z "$ac_c_werror_flag" ||
11876 test ! -s conftest.err
11877 } && test -s conftest$ac_exeext &&
11878 $as_test_x conftest$ac_exeext; then
b3615392 11879 emacs_cv_xaw3d=yes
98418dba
CW
11880else
11881 echo "$as_me: failed program was:" >&5
19650fd6
AS
11882sed 's/^/| /' conftest.$ac_ext >&5
11883
b3615392 11884 emacs_cv_xaw3d=no
98418dba 11885fi
ca81d7a0 11886
f053c89f 11887rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11888 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11889fi
11890
9d89ffd0 11891 else
f23d76bd 11892 emacs_cv_xaw3d=no
9d89ffd0 11893 fi
f23d76bd
MB
11894 if test $emacs_cv_xaw3d = yes; then
11895 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11896echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11897 USE_X_TOOLKIT=LUCID
11898 HAVE_XAW3D=yes
9d89ffd0 11899
b3615392
MB
11900cat >>confdefs.h <<\_ACEOF
11901#define HAVE_XAW3D 1
11902_ACEOF
9d89ffd0 11903
f23d76bd
MB
11904 else
11905 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11906echo "${ECHO_T}no" >&6; }
f23d76bd 11907 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11908echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11909 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11910 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11911else
b3615392 11912 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11913/* confdefs.h. */
11914_ACEOF
11915cat confdefs.h >>conftest.$ac_ext
11916cat >>conftest.$ac_ext <<_ACEOF
11917/* end confdefs.h. */
b3615392
MB
11918
11919#include <X11/Intrinsic.h>
11920#include <X11/Xaw/Simple.h>
11921int
11922main ()
11923{
11924
11925 ;
11926 return 0;
11927}
9d89ffd0 11928_ACEOF
b3615392
MB
11929rm -f conftest.$ac_objext conftest$ac_exeext
11930if { (ac_try="$ac_link"
9d89ffd0
JD
11931case "(($ac_try" in
11932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11933 *) ac_try_echo=$ac_try;;
11934esac
11935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11936 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11937 ac_status=$?
11938 grep -v '^ *+' conftest.er1 >conftest.err
11939 rm -f conftest.er1
11940 cat conftest.err >&5
11941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11942 (exit $ac_status); } && {
11943 test -z "$ac_c_werror_flag" ||
11944 test ! -s conftest.err
b3615392
MB
11945 } && test -s conftest$ac_exeext &&
11946 $as_test_x conftest$ac_exeext; then
11947 emacs_cv_xaw=yes
9d89ffd0
JD
11948else
11949 echo "$as_me: failed program was:" >&5
11950sed 's/^/| /' conftest.$ac_ext >&5
11951
b3615392 11952 emacs_cv_xaw=no
9d89ffd0
JD
11953fi
11954
b3615392
MB
11955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11956 conftest$ac_exeext conftest.$ac_ext
11957fi
9d89ffd0 11958
f23d76bd
MB
11959 if test $emacs_cv_xaw = yes; then
11960 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11961echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11962 USE_X_TOOLKIT=LUCID
11963 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11964 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11965echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11966 { (exit 1); exit 1; }; }
f23d76bd
MB
11967 else
11968 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11969echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11970 USE_X_TOOLKIT=none
98418dba 11971 fi
98418dba
CW
11972 fi
11973fi
11974
11975X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11976
11977if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11978 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11979echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11980 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11981 echo $ECHO_N "(cached) $ECHO_C" >&6
11982else
11983 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11984/* confdefs.h. */
11985_ACEOF
11986cat confdefs.h >>conftest.$ac_ext
11987cat >>conftest.$ac_ext <<_ACEOF
11988/* end confdefs.h. */
98418dba 11989#include <X11/Intrinsic.h>
98418dba
CW
11990int
11991main ()
11992{
11993#if XtSpecificationRelease < 6
11994fail;
11995#endif
11996
11997 ;
11998 return 0;
11999}
12000_ACEOF
12001rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12002if { (ac_try="$ac_link"
12003case "(($ac_try" in
12004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12005 *) ac_try_echo=$ac_try;;
12006esac
12007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12008 (eval "$ac_link") 2>conftest.er1
98418dba 12009 ac_status=$?
edfaf76d
LK
12010 grep -v '^ *+' conftest.er1 >conftest.err
12011 rm -f conftest.er1
12012 cat conftest.err >&5
c0d27fcc 12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12014 (exit $ac_status); } && {
12015 test -z "$ac_c_werror_flag" ||
12016 test ! -s conftest.err
12017 } && test -s conftest$ac_exeext &&
12018 $as_test_x conftest$ac_exeext; then
98418dba
CW
12019 emacs_cv_x11_toolkit_version_6=yes
12020else
12021 echo "$as_me: failed program was:" >&5
19650fd6
AS
12022sed 's/^/| /' conftest.$ac_ext >&5
12023
ca81d7a0 12024 emacs_cv_x11_toolkit_version_6=no
98418dba 12025fi
ca81d7a0 12026
f053c89f 12027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12028 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12029fi
12030
12031 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12032 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12033 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12034echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12035
c0d27fcc 12036cat >>confdefs.h <<\_ACEOF
98418dba 12037#define HAVE_X11XTR6 1
c0d27fcc 12038_ACEOF
98418dba
CW
12039
12040 else
ca81d7a0
JD
12041 { echo "$as_me:$LINENO: result: before 6" >&5
12042echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12043 fi
12044
12045 OLDLIBS="$LIBS"
12046 if test x$HAVE_X11XTR6 = xyes; then
12047 LIBS="-lXt -lSM -lICE $LIBS"
12048 else
12049 LIBS="-lXt $LIBS"
12050 fi
12051
ca81d7a0
JD
12052{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12053echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12054if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12055 echo $ECHO_N "(cached) $ECHO_C" >&6
12056else
12057 ac_check_lib_save_LIBS=$LIBS
12058LIBS="-lXmu $LIBS"
12059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12060/* confdefs.h. */
12061_ACEOF
12062cat confdefs.h >>conftest.$ac_ext
12063cat >>conftest.$ac_ext <<_ACEOF
12064/* end confdefs.h. */
98418dba 12065
ca81d7a0
JD
12066/* Override any GCC internal prototype to avoid an error.
12067 Use char because int might match the return type of a GCC
12068 builtin and then its argument prototype would still apply. */
98418dba
CW
12069#ifdef __cplusplus
12070extern "C"
12071#endif
98418dba 12072char XmuConvertStandardSelection ();
98418dba
CW
12073int
12074main ()
12075{
ca81d7a0 12076return XmuConvertStandardSelection ();
98418dba
CW
12077 ;
12078 return 0;
12079}
12080_ACEOF
12081rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12082if { (ac_try="$ac_link"
12083case "(($ac_try" in
12084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12085 *) ac_try_echo=$ac_try;;
12086esac
12087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12088 (eval "$ac_link") 2>conftest.er1
98418dba 12089 ac_status=$?
edfaf76d
LK
12090 grep -v '^ *+' conftest.er1 >conftest.err
12091 rm -f conftest.er1
12092 cat conftest.err >&5
c0d27fcc 12093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12094 (exit $ac_status); } && {
12095 test -z "$ac_c_werror_flag" ||
12096 test ! -s conftest.err
12097 } && test -s conftest$ac_exeext &&
12098 $as_test_x conftest$ac_exeext; then
98418dba
CW
12099 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12100else
12101 echo "$as_me: failed program was:" >&5
19650fd6
AS
12102sed 's/^/| /' conftest.$ac_ext >&5
12103
ca81d7a0 12104 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12105fi
ca81d7a0 12106
f053c89f 12107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12108 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12109LIBS=$ac_check_lib_save_LIBS
12110fi
ca81d7a0
JD
12111{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12112echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12113if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12114 cat >>confdefs.h <<_ACEOF
98418dba 12115#define HAVE_LIBXMU 1
c0d27fcc 12116_ACEOF
98418dba
CW
12117
12118 LIBS="-lXmu $LIBS"
12119
12120fi
12121
12122 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12123fi
12124
12125# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12126if test "${HAVE_X11}" = "yes"; then
12127 if test "${USE_X_TOOLKIT}" != "none"; then
12128
ca81d7a0
JD
12129{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12130echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12131if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12132 echo $ECHO_N "(cached) $ECHO_C" >&6
12133else
12134 ac_check_lib_save_LIBS=$LIBS
12135LIBS="-lXext $LIBS"
12136cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12137/* confdefs.h. */
12138_ACEOF
12139cat confdefs.h >>conftest.$ac_ext
12140cat >>conftest.$ac_ext <<_ACEOF
12141/* end confdefs.h. */
98418dba 12142
ca81d7a0
JD
12143/* Override any GCC internal prototype to avoid an error.
12144 Use char because int might match the return type of a GCC
12145 builtin and then its argument prototype would still apply. */
98418dba
CW
12146#ifdef __cplusplus
12147extern "C"
12148#endif
98418dba 12149char XShapeQueryExtension ();
98418dba
CW
12150int
12151main ()
12152{
ca81d7a0 12153return XShapeQueryExtension ();
98418dba
CW
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12159if { (ac_try="$ac_link"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
12164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12165 (eval "$ac_link") 2>conftest.er1
98418dba 12166 ac_status=$?
edfaf76d
LK
12167 grep -v '^ *+' conftest.er1 >conftest.err
12168 rm -f conftest.er1
12169 cat conftest.err >&5
c0d27fcc 12170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12171 (exit $ac_status); } && {
12172 test -z "$ac_c_werror_flag" ||
12173 test ! -s conftest.err
12174 } && test -s conftest$ac_exeext &&
12175 $as_test_x conftest$ac_exeext; then
98418dba
CW
12176 ac_cv_lib_Xext_XShapeQueryExtension=yes
12177else
12178 echo "$as_me: failed program was:" >&5
19650fd6
AS
12179sed 's/^/| /' conftest.$ac_ext >&5
12180
ca81d7a0 12181 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12182fi
ca81d7a0 12183
f053c89f 12184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12185 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12186LIBS=$ac_check_lib_save_LIBS
12187fi
ca81d7a0
JD
12188{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12189echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12190if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12191 cat >>confdefs.h <<_ACEOF
98418dba 12192#define HAVE_LIBXEXT 1
c0d27fcc 12193_ACEOF
98418dba
CW
12194
12195 LIBS="-lXext $LIBS"
12196
12197fi
12198
12199 fi
12200fi
12201
12202if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12203 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12204echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12205if test "${emacs_cv_motif_version_2_1+set}" = set; then
12206 echo $ECHO_N "(cached) $ECHO_C" >&6
12207else
12208 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12209/* confdefs.h. */
12210_ACEOF
12211cat confdefs.h >>conftest.$ac_ext
12212cat >>conftest.$ac_ext <<_ACEOF
12213/* end confdefs.h. */
98418dba 12214#include <Xm/Xm.h>
98418dba
CW
12215int
12216main ()
12217{
12218#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12219int x = 5;
12220#else
12221Motif version prior to 2.1.
12222#endif
12223 ;
12224 return 0;
12225}
12226_ACEOF
12227rm -f conftest.$ac_objext
ca81d7a0
JD
12228if { (ac_try="$ac_compile"
12229case "(($ac_try" in
12230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12231 *) ac_try_echo=$ac_try;;
12232esac
12233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12234 (eval "$ac_compile") 2>conftest.er1
98418dba 12235 ac_status=$?
edfaf76d
LK
12236 grep -v '^ *+' conftest.er1 >conftest.err
12237 rm -f conftest.er1
12238 cat conftest.err >&5
c0d27fcc 12239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12240 (exit $ac_status); } && {
12241 test -z "$ac_c_werror_flag" ||
12242 test ! -s conftest.err
12243 } && test -s conftest.$ac_objext; then
98418dba
CW
12244 emacs_cv_motif_version_2_1=yes
12245else
12246 echo "$as_me: failed program was:" >&5
19650fd6
AS
12247sed 's/^/| /' conftest.$ac_ext >&5
12248
ca81d7a0 12249 emacs_cv_motif_version_2_1=no
98418dba 12250fi
ca81d7a0
JD
12251
12252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12253fi
ca81d7a0
JD
12254{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12255echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12256 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12257 if test $emacs_cv_motif_version_2_1 = yes; then
12258 HAVE_LIBXP=no
b936fae4 12259
c0d27fcc 12260cat >>confdefs.h <<\_ACEOF
98418dba 12261#define HAVE_MOTIF_2_1 1
c0d27fcc 12262_ACEOF
98418dba 12263
ca81d7a0
JD
12264 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12265echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12266if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12267 echo $ECHO_N "(cached) $ECHO_C" >&6
12268else
12269 ac_check_lib_save_LIBS=$LIBS
12270LIBS="-lXp $LIBS"
12271cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12272/* confdefs.h. */
12273_ACEOF
12274cat confdefs.h >>conftest.$ac_ext
12275cat >>conftest.$ac_ext <<_ACEOF
12276/* end confdefs.h. */
98418dba 12277
ca81d7a0
JD
12278/* Override any GCC internal prototype to avoid an error.
12279 Use char because int might match the return type of a GCC
12280 builtin and then its argument prototype would still apply. */
98418dba
CW
12281#ifdef __cplusplus
12282extern "C"
12283#endif
98418dba 12284char XpCreateContext ();
98418dba
CW
12285int
12286main ()
12287{
ca81d7a0 12288return XpCreateContext ();
98418dba
CW
12289 ;
12290 return 0;
12291}
12292_ACEOF
12293rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12294if { (ac_try="$ac_link"
12295case "(($ac_try" in
12296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12297 *) ac_try_echo=$ac_try;;
12298esac
12299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12300 (eval "$ac_link") 2>conftest.er1
98418dba 12301 ac_status=$?
edfaf76d
LK
12302 grep -v '^ *+' conftest.er1 >conftest.err
12303 rm -f conftest.er1
12304 cat conftest.err >&5
c0d27fcc 12305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12306 (exit $ac_status); } && {
12307 test -z "$ac_c_werror_flag" ||
12308 test ! -s conftest.err
12309 } && test -s conftest$ac_exeext &&
12310 $as_test_x conftest$ac_exeext; then
98418dba
CW
12311 ac_cv_lib_Xp_XpCreateContext=yes
12312else
12313 echo "$as_me: failed program was:" >&5
19650fd6
AS
12314sed 's/^/| /' conftest.$ac_ext >&5
12315
ca81d7a0 12316 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12317fi
ca81d7a0 12318
f053c89f 12319rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12320 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12321LIBS=$ac_check_lib_save_LIBS
12322fi
ca81d7a0
JD
12323{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12324echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12325if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12326 HAVE_LIBXP=yes
12327fi
503d2be0 12328
98418dba 12329 if test ${HAVE_LIBXP} = yes; then
b936fae4 12330
c0d27fcc 12331cat >>confdefs.h <<\_ACEOF
98418dba 12332#define HAVE_LIBXP 1
c0d27fcc 12333_ACEOF
503d2be0 12334
98418dba 12335 fi
4693dbc9 12336 else
ca81d7a0
JD
12337 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12338echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12339if test "${emacs_cv_lesstif+set}" = set; then
12340 echo $ECHO_N "(cached) $ECHO_C" >&6
12341else
12342 # We put this in CFLAGS temporarily to precede other -I options
12343 # that might be in CFLAGS temporarily.
12344 # We put this in CPPFLAGS where it precedes the other -I options.
12345 OLD_CPPFLAGS=$CPPFLAGS
12346 OLD_CFLAGS=$CFLAGS
12347 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12348 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12349 cat >conftest.$ac_ext <<_ACEOF
12350/* confdefs.h. */
12351_ACEOF
12352cat confdefs.h >>conftest.$ac_ext
12353cat >>conftest.$ac_ext <<_ACEOF
12354/* end confdefs.h. */
12355#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12356int
12357main ()
12358{
12359int x = 5;
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext
ca81d7a0
JD
12365if { (ac_try="$ac_compile"
12366case "(($ac_try" in
12367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12368 *) ac_try_echo=$ac_try;;
12369esac
12370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12371 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12372 ac_status=$?
edfaf76d
LK
12373 grep -v '^ *+' conftest.er1 >conftest.err
12374 rm -f conftest.er1
12375 cat conftest.err >&5
4693dbc9 12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12377 (exit $ac_status); } && {
12378 test -z "$ac_c_werror_flag" ||
12379 test ! -s conftest.err
12380 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12381 emacs_cv_lesstif=yes
12382else
12383 echo "$as_me: failed program was:" >&5
12384sed 's/^/| /' conftest.$ac_ext >&5
12385
ca81d7a0 12386 emacs_cv_lesstif=no
4693dbc9 12387fi
ca81d7a0
JD
12388
12389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12390fi
ca81d7a0
JD
12391{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12392echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12393 if test $emacs_cv_lesstif = yes; then
12394 # Make sure this -I option remains in CPPFLAGS after it is set
12395 # back to REAL_CPPFLAGS.
12396 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12397 # have those other -I options anyway. Ultimately, having this
12398 # directory ultimately in CPPFLAGS will be enough.
12399 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12400 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12401 else
12402 CFLAGS=$OLD_CFLAGS
12403 CPPFLAGS=$OLD_CPPFLAGS
12404 fi
98418dba
CW
12405 fi
12406fi
12407
c0d27fcc
MR
12408
12409
98418dba
CW
12410USE_TOOLKIT_SCROLL_BARS=no
12411if test "${with_toolkit_scroll_bars}" != "no"; then
12412 if test "${USE_X_TOOLKIT}" != "none"; then
12413 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12414 cat >>confdefs.h <<\_ACEOF
98418dba 12415#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12416_ACEOF
98418dba
CW
12417
12418 HAVE_XAW3D=no
12419 USE_TOOLKIT_SCROLL_BARS=yes
12420 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12421 cat >>confdefs.h <<\_ACEOF
98418dba 12422#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12423_ACEOF
98418dba
CW
12424
12425 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12426 fi
488dd4c4
JD
12427 elif test "${HAVE_GTK}" = "yes"; then
12428 cat >>confdefs.h <<\_ACEOF
12429#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12430_ACEOF
12431
12432 USE_TOOLKIT_SCROLL_BARS=yes
12433 elif test "${HAVE_NS}" = "yes"; then
12434 cat >>confdefs.h <<\_ACEOF
12435#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12436_ACEOF
12437
12438 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12439 fi
12440fi
12441
abd39b57 12442cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12443/* confdefs.h. */
12444_ACEOF
12445cat confdefs.h >>conftest.$ac_ext
12446cat >>conftest.$ac_ext <<_ACEOF
12447/* end confdefs.h. */
12448
12449 #include <X11/Xlib.h>
12450 #include <X11/Xresource.h>
12451int
12452main ()
12453{
12454XIMProc callback;
12455 ;
12456 return 0;
12457}
12458_ACEOF
12459rm -f conftest.$ac_objext
ca81d7a0
JD
12460if { (ac_try="$ac_compile"
12461case "(($ac_try" in
12462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12463 *) ac_try_echo=$ac_try;;
12464esac
12465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12466 (eval "$ac_compile") 2>conftest.er1
abd39b57 12467 ac_status=$?
edfaf76d
LK
12468 grep -v '^ *+' conftest.er1 >conftest.err
12469 rm -f conftest.er1
12470 cat conftest.err >&5
abd39b57 12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12472 (exit $ac_status); } && {
12473 test -z "$ac_c_werror_flag" ||
12474 test ! -s conftest.err
12475 } && test -s conftest.$ac_objext; then
abd39b57
AC
12476 HAVE_XIM=yes
12477
12478cat >>confdefs.h <<\_ACEOF
12479#define HAVE_XIM 1
12480_ACEOF
12481
12482else
12483 echo "$as_me: failed program was:" >&5
12484sed 's/^/| /' conftest.$ac_ext >&5
12485
ca81d7a0 12486 HAVE_XIM=no
abd39b57 12487fi
ca81d7a0
JD
12488
12489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12490
c0d27fcc 12491
98418dba 12492if test "${with_xim}" != "no"; then
b936fae4 12493
c0d27fcc 12494cat >>confdefs.h <<\_ACEOF
98418dba 12495#define USE_XIM 1
c0d27fcc 12496_ACEOF
98418dba 12497
793fa0d7 12498fi
abd39b57
AC
12499
12500
12501if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12502 late_CFLAGS=$CFLAGS
12503 if test "$GCC" = yes; then
12504 CFLAGS="$CFLAGS --pedantic-errors"
12505 fi
cffcede7 12506 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12507/* confdefs.h. */
12508_ACEOF
12509cat confdefs.h >>conftest.$ac_ext
12510cat >>conftest.$ac_ext <<_ACEOF
12511/* end confdefs.h. */
cffcede7
JD
12512
12513#include <X11/Xlib.h>
12514#include <X11/Xresource.h>
12515int
12516main ()
12517{
12518Display *display;
12519XrmDatabase db;
12520char *res_name;
12521char *res_class;
12522XIMProc callback;
12523XPointer *client_data;
849d80cf
DL
12524#ifndef __GNUC__
12525/* If we're not using GCC, it's probably not XFree86, and this is
12526 probably right, but we can't use something like --pedantic-errors. */
12527extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12528 char*, XIMProc, XPointer*);
12529#endif
cffcede7
JD
12530(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12531 client_data);
12532 ;
12533 return 0;
12534}
12535_ACEOF
12536rm -f conftest.$ac_objext
ca81d7a0
JD
12537if { (ac_try="$ac_compile"
12538case "(($ac_try" in
12539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12540 *) ac_try_echo=$ac_try;;
12541esac
12542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12543 (eval "$ac_compile") 2>conftest.er1
cffcede7 12544 ac_status=$?
edfaf76d
LK
12545 grep -v '^ *+' conftest.er1 >conftest.err
12546 rm -f conftest.er1
12547 cat conftest.err >&5
cffcede7 12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12549 (exit $ac_status); } && {
12550 test -z "$ac_c_werror_flag" ||
12551 test ! -s conftest.err
12552 } && test -s conftest.$ac_objext; then
cffcede7
JD
12553 emacs_cv_arg6_star=yes
12554else
12555 echo "$as_me: failed program was:" >&5
19650fd6
AS
12556sed 's/^/| /' conftest.$ac_ext >&5
12557
ca81d7a0 12558
cffcede7 12559fi
ca81d7a0
JD
12560
12561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12562
12563 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12564 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12565#define XRegisterIMInstantiateCallback_arg6 XPointer*
12566_ACEOF
12567
12568 else
f57bd967 12569 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12570#define XRegisterIMInstantiateCallback_arg6 XPointer
12571_ACEOF
12572
12573 fi
849d80cf 12574 CFLAGS=$late_CFLAGS
45a4b03e
KH
12575fi
12576
77dfeef5 12577### Start of font-backend section.
45a4b03e 12578
44e5501c
GM
12579 succeeded=no
12580
12581 # Extract the first word of "pkg-config", so it can be a program name with args.
12582set dummy pkg-config; ac_word=$2
12583{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12584echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12585if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12586 echo $ECHO_N "(cached) $ECHO_C" >&6
12587else
12588 case $PKG_CONFIG in
12589 [\\/]* | ?:[\\/]*)
12590 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12591 ;;
12592 *)
12593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594for as_dir in $PATH
12595do
12596 IFS=$as_save_IFS
12597 test -z "$as_dir" && as_dir=.
12598 for ac_exec_ext in '' $ac_executable_extensions; do
12599 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12600 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12601 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12602 break 2
12603 fi
12604done
12605done
12606IFS=$as_save_IFS
12607
12608 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12609 ;;
12610esac
12611fi
12612PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12613if test -n "$PKG_CONFIG"; then
12614 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12615echo "${ECHO_T}$PKG_CONFIG" >&6; }
12616else
12617 { echo "$as_me:$LINENO: result: no" >&5
12618echo "${ECHO_T}no" >&6; }
12619fi
12620
12621
12622
12623 if test "$PKG_CONFIG" = "no" ; then
12624 HAVE_FC=no
12625 else
12626 PKG_CONFIG_MIN_VERSION=0.9.0
12627 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12628 { echo "$as_me:$LINENO: checking for fontconfig >= 2.2.0" >&5
12629echo $ECHO_N "checking for fontconfig >= 2.2.0... $ECHO_C" >&6; }
12630
12631 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
12632 { echo "$as_me:$LINENO: result: yes" >&5
12633echo "${ECHO_T}yes" >&6; }
12634 succeeded=yes
12635
12636 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12637echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
12638 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12639 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12640echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
12641
12642 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12643echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
12644 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12645 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12646echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
12647 else
12648 { echo "$as_me:$LINENO: result: no" >&5
12649echo "${ECHO_T}no" >&6; }
12650 FONTCONFIG_CFLAGS=""
12651 FONTCONFIG_LIBS=""
12652 ## If we have a custom action on failure, don't print errors, but
12653 ## do set a variable so people can do so.
12654 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12655
12656 fi
12657
12658
12659
12660 else
12661 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12662 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12663 fi
12664 fi
12665
12666 if test $succeeded = yes; then
12667 HAVE_FC=yes
12668 else
12669 HAVE_FC=no
12670 fi
12671
12672test "${HAVE_FC}" = "no" && with_freetype=no
12673
b8bdd8c9
KH
12674## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12675HAVE_XFT=maybe
392b3c3a 12676if test "x${with_freetype}" = "xno" || test "x${with_x}" = "xno"; then
b8bdd8c9
KH
12677 with_xft="no";
12678fi
12679if test "x${with_xft}" != "xno"; then
45a4b03e 12680
45a4b03e
KH
12681
12682 succeeded=no
12683
d235ca2f 12684 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12685set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12686{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12687echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12688if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12689 echo $ECHO_N "(cached) $ECHO_C" >&6
12690else
12691 case $PKG_CONFIG in
12692 [\\/]* | ?:[\\/]*)
12693 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12694 ;;
12695 *)
12696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12697for as_dir in $PATH
12698do
12699 IFS=$as_save_IFS
12700 test -z "$as_dir" && as_dir=.
12701 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12703 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12704 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12705 break 2
12706 fi
12707done
12708done
c24fa7dc 12709IFS=$as_save_IFS
45a4b03e
KH
12710
12711 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12712 ;;
12713esac
12714fi
12715PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12716if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12717 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12718echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12719else
c24fa7dc
MB
12720 { echo "$as_me:$LINENO: result: no" >&5
12721echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12722fi
12723
c24fa7dc 12724
45a4b03e
KH
12725
12726 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12727 HAVE_XFT=no
45a4b03e
KH
12728 else
12729 PKG_CONFIG_MIN_VERSION=0.9.0
12730 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12731 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12732echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12733
c24fa7dc
MB
12734 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12735 { echo "$as_me:$LINENO: result: yes" >&5
12736echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12737 succeeded=yes
12738
c24fa7dc
MB
12739 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12740echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12741 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12742 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12743echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12744
c24fa7dc
MB
12745 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12746echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12747 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12748 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12749echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12750 else
c24fa7dc
MB
12751 { echo "$as_me:$LINENO: result: no" >&5
12752echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12753 XFT_CFLAGS=""
12754 XFT_LIBS=""
12755 ## If we have a custom action on failure, don't print errors, but
12756 ## do set a variable so people can do so.
12757 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12758
12759 fi
12760
12761
12762
12763 else
12764 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12765 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12766 fi
12767 fi
12768
12769 if test $succeeded = yes; then
12770 :
12771 else
12772 HAVE_XFT=no
12773 fi
12774
b8bdd8c9
KH
12775 if test "$HAVE_XFT" != no; then
12776 OLD_CPPFLAGS="$CPPFLAGS"
12777 OLD_CFLAGS="$CFLAGS"
12778 OLD_LIBS="$LIBS"
12779 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12780 CFLAGS="$CFLAGS $XFT_CFLAGS"
12781 LIBS="$XFT_LIBS $LIBS"
12782 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12783 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12784echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12785if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12786 echo $ECHO_N "(cached) $ECHO_C" >&6
12787fi
c24fa7dc
MB
12788{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12789echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12790else
12791 # Is the header compilable?
c24fa7dc
MB
12792{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12793echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12794cat >conftest.$ac_ext <<_ACEOF
12795/* confdefs.h. */
12796_ACEOF
12797cat confdefs.h >>conftest.$ac_ext
12798cat >>conftest.$ac_ext <<_ACEOF
12799/* end confdefs.h. */
12800$ac_includes_default
12801#include <X11/Xft/Xft.h>
12802_ACEOF
12803rm -f conftest.$ac_objext
c24fa7dc
MB
12804if { (ac_try="$ac_compile"
12805case "(($ac_try" in
12806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12807 *) ac_try_echo=$ac_try;;
12808esac
12809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12810 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12811 ac_status=$?
12812 grep -v '^ *+' conftest.er1 >conftest.err
12813 rm -f conftest.er1
12814 cat conftest.err >&5
12815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12816 (exit $ac_status); } && {
12817 test -z "$ac_c_werror_flag" ||
12818 test ! -s conftest.err
12819 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12820 ac_header_compiler=yes
12821else
12822 echo "$as_me: failed program was:" >&5
12823sed 's/^/| /' conftest.$ac_ext >&5
12824
c24fa7dc 12825 ac_header_compiler=no
45a4b03e 12826fi
c24fa7dc
MB
12827
12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12829{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12830echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12831
12832# Is the header present?
c24fa7dc
MB
12833{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12834echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12835cat >conftest.$ac_ext <<_ACEOF
12836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
12841#include <X11/Xft/Xft.h>
12842_ACEOF
c24fa7dc
MB
12843if { (ac_try="$ac_cpp conftest.$ac_ext"
12844case "(($ac_try" in
12845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12846 *) ac_try_echo=$ac_try;;
12847esac
12848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12850 ac_status=$?
12851 grep -v '^ *+' conftest.er1 >conftest.err
12852 rm -f conftest.er1
12853 cat conftest.err >&5
12854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12855 (exit $ac_status); } >/dev/null && {
12856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12857 test ! -s conftest.err
12858 }; then
45a4b03e
KH
12859 ac_header_preproc=yes
12860else
12861 echo "$as_me: failed program was:" >&5
12862sed 's/^/| /' conftest.$ac_ext >&5
12863
12864 ac_header_preproc=no
12865fi
c24fa7dc 12866
45a4b03e 12867rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12868{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12869echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12870
12871# So? What about this header?
12872case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12873 yes:no: )
12874 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12875echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12876 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12877echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12878 ac_header_preproc=yes
12879 ;;
12880 no:yes:* )
12881 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12882echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12883 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12884echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12885 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12886echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12887 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12888echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12889 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12890echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12891 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12892echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12893
45a4b03e
KH
12894 ;;
12895esac
c24fa7dc
MB
12896{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12897echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12898if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
12900else
12901 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12902fi
c24fa7dc
MB
12903{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12904echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12905
12906fi
12907if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12908 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12909echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12910if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12911 echo $ECHO_N "(cached) $ECHO_C" >&6
12912else
12913 ac_check_lib_save_LIBS=$LIBS
12914LIBS="-lXft $XFT_LIBS $LIBS"
12915cat >conftest.$ac_ext <<_ACEOF
12916/* confdefs.h. */
12917_ACEOF
12918cat confdefs.h >>conftest.$ac_ext
12919cat >>conftest.$ac_ext <<_ACEOF
12920/* end confdefs.h. */
12921
c24fa7dc
MB
12922/* Override any GCC internal prototype to avoid an error.
12923 Use char because int might match the return type of a GCC
12924 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12925#ifdef __cplusplus
12926extern "C"
12927#endif
45a4b03e
KH
12928char XftFontOpen ();
12929int
12930main ()
12931{
c24fa7dc 12932return XftFontOpen ();
45a4b03e
KH
12933 ;
12934 return 0;
12935}
12936_ACEOF
12937rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12938if { (ac_try="$ac_link"
12939case "(($ac_try" in
12940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12941 *) ac_try_echo=$ac_try;;
12942esac
12943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12944 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12945 ac_status=$?
12946 grep -v '^ *+' conftest.er1 >conftest.err
12947 rm -f conftest.er1
12948 cat conftest.err >&5
12949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12950 (exit $ac_status); } && {
12951 test -z "$ac_c_werror_flag" ||
12952 test ! -s conftest.err
12953 } && test -s conftest$ac_exeext &&
12954 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12955 ac_cv_lib_Xft_XftFontOpen=yes
12956else
12957 echo "$as_me: failed program was:" >&5
12958sed 's/^/| /' conftest.$ac_ext >&5
12959
c24fa7dc 12960 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12961fi
c24fa7dc
MB
12962
12963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12964 conftest$ac_exeext conftest.$ac_ext
12965LIBS=$ac_check_lib_save_LIBS
12966fi
c24fa7dc
MB
12967{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12968echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12969if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12970 HAVE_XFT=yes
12971fi
12972
12973fi
12974
12975
12976
b8bdd8c9 12977 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12978
12979cat >>confdefs.h <<\_ACEOF
12980#define HAVE_XFT 1
12981_ACEOF
12982
12983
b8bdd8c9
KH
12984 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12985 else
12986 CPPFLAGS="$OLD_CPPFLAGS"
12987 CFLAGS="$OLD_CFLAGS"
12988 LIBS="$OLD_LIBS"
12989 fi # "${HAVE_XFT}" = "yes"
12990 fi # "$HAVE_XFT" != no
12991fi # "x${with_xft}" != "xno"
2ee27f27 12992
b8bdd8c9
KH
12993if test "$HAVE_XFT" != "yes"; then
12994 HAVE_XFT=no
12995fi
45a4b03e 12996
b8bdd8c9
KH
12997
12998HAVE_FREETYPE=no
12999### Use -lfreetype if available, unless `--with-freetype=no'.
13000if test "${HAVE_XFT}" = "yes"; then
13001 HAVE_FREETYPE=yes
44e5501c
GM
13002 FONTCONFIG_CFLAGS=
13003 FONTCONFIG_LIBS=
392b3c3a 13004elif test "x${with_freetype}" != "xno" && test "x${with_x}" != "xno"; then
45a4b03e 13005
d235ca2f 13006
45a4b03e
KH
13007 succeeded=no
13008
d235ca2f 13009 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13010set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13011{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13013if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
13015else
13016 case $PKG_CONFIG in
13017 [\\/]* | ?:[\\/]*)
13018 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13019 ;;
13020 *)
13021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH
13023do
13024 IFS=$as_save_IFS
13025 test -z "$as_dir" && as_dir=.
13026 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13027 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13028 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13029 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13030 break 2
13031 fi
13032done
13033done
c24fa7dc 13034IFS=$as_save_IFS
45a4b03e
KH
13035
13036 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13037 ;;
13038esac
13039fi
13040PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13041if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13042 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13043echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13044else
c24fa7dc
MB
13045 { echo "$as_me:$LINENO: result: no" >&5
13046echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13047fi
13048
c24fa7dc 13049
45a4b03e
KH
13050
13051 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13052 HAVE_FREETYPE=no
45a4b03e
KH
13053 else
13054 PKG_CONFIG_MIN_VERSION=0.9.0
13055 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13056 { echo "$as_me:$LINENO: checking for freetype2" >&5
13057echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13058
c24fa7dc
MB
13059 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13060 { echo "$as_me:$LINENO: result: yes" >&5
13061echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13062 succeeded=yes
13063
c24fa7dc
MB
13064 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13065echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13066 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13067 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13068echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13069
c24fa7dc
MB
13070 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13071echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13072 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13073 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13074echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13075 else
c24fa7dc
MB
13076 { echo "$as_me:$LINENO: result: no" >&5
13077echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13078 FREETYPE_CFLAGS=""
13079 FREETYPE_LIBS=""
13080 ## If we have a custom action on failure, don't print errors, but
13081 ## do set a variable so people can do so.
13082 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13083
13084 fi
13085
13086
13087
13088 else
13089 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13090 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13091 fi
13092 fi
13093
13094 if test $succeeded = yes; then
13095 HAVE_FREETYPE=yes
13096 else
13097 HAVE_FREETYPE=no
13098 fi
13099
b8bdd8c9 13100fi
e70b2110 13101
b8bdd8c9
KH
13102HAVE_LIBOTF=no
13103if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13104
13105cat >>confdefs.h <<\_ACEOF
13106#define HAVE_FREETYPE 1
13107_ACEOF
13108
b8bdd8c9 13109 if test "${with_libotf}" != "no"; then
e70b2110
KH
13110
13111 succeeded=no
13112
d235ca2f 13113 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13114set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13115{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13116echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13117if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13118 echo $ECHO_N "(cached) $ECHO_C" >&6
13119else
e70b2110
KH
13120 case $PKG_CONFIG in
13121 [\\/]* | ?:[\\/]*)
13122 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13123 ;;
13124 *)
13125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13126for as_dir in $PATH
13127do
13128 IFS=$as_save_IFS
13129 test -z "$as_dir" && as_dir=.
13130 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13132 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13133 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13134 break 2
13135 fi
13136done
13137done
c24fa7dc 13138IFS=$as_save_IFS
45a4b03e 13139
e70b2110
KH
13140 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13141 ;;
13142esac
45a4b03e 13143fi
e70b2110
KH
13144PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13145if test -n "$PKG_CONFIG"; then
13146 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13147echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13148else
c24fa7dc
MB
13149 { echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13151fi
13152
c24fa7dc 13153
45a4b03e 13154
e70b2110 13155 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13156 HAVE_LIBOTF=no
e70b2110
KH
13157 else
13158 PKG_CONFIG_MIN_VERSION=0.9.0
13159 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13160 { echo "$as_me:$LINENO: checking for libotf" >&5
13161echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13162
e70b2110
KH
13163 if $PKG_CONFIG --exists "libotf" 2>&5; then
13164 { echo "$as_me:$LINENO: result: yes" >&5
13165echo "${ECHO_T}yes" >&6; }
13166 succeeded=yes
6ed29d7b 13167
e70b2110
KH
13168 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13169echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13170 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13171 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13172echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13173
13174 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13175echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13176 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13177 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13178echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13179 else
13180 { echo "$as_me:$LINENO: result: no" >&5
13181echo "${ECHO_T}no" >&6; }
13182 LIBOTF_CFLAGS=""
13183 LIBOTF_LIBS=""
13184 ## If we have a custom action on failure, don't print errors, but
13185 ## do set a variable so people can do so.
13186 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13187
e70b2110 13188 fi
6ed29d7b 13189
6ed29d7b 13190
6ed29d7b 13191
e70b2110
KH
13192 else
13193 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13194 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13195 fi
13196 fi
13197
13198 if test $succeeded = yes; then
435f8bc5 13199 HAVE_LIBOTF=yes
e70b2110 13200 else
435f8bc5 13201 HAVE_LIBOTF=no
e70b2110
KH
13202 fi
13203
b8bdd8c9 13204 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13205
45a4b03e
KH
13206cat >>confdefs.h <<\_ACEOF
13207#define HAVE_LIBOTF 1
13208_ACEOF
13209
6ed29d7b 13210 fi
45a4b03e 13211 fi
b8bdd8c9 13212fi
45a4b03e 13213
b8bdd8c9 13214HAVE_M17N_FLT=no
6b0262c1
AS
13215if test "${HAVE_LIBOTF}" = yes; then
13216 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13217
13218 succeeded=no
13219
d235ca2f 13220 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13221set dummy pkg-config; ac_word=$2
13222{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13223echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13224if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13225 echo $ECHO_N "(cached) $ECHO_C" >&6
13226else
13227 case $PKG_CONFIG in
13228 [\\/]* | ?:[\\/]*)
13229 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13230 ;;
13231 *)
13232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13233for as_dir in $PATH
13234do
13235 IFS=$as_save_IFS
13236 test -z "$as_dir" && as_dir=.
13237 for ac_exec_ext in '' $ac_executable_extensions; do
13238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13239 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13240 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13241 break 2
13242 fi
13243done
13244done
13245IFS=$as_save_IFS
13246
13247 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13248 ;;
13249esac
13250fi
13251PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13252if test -n "$PKG_CONFIG"; then
13253 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13254echo "${ECHO_T}$PKG_CONFIG" >&6; }
13255else
13256 { echo "$as_me:$LINENO: result: no" >&5
13257echo "${ECHO_T}no" >&6; }
13258fi
13259
13260
7f0942ba
KH
13261
13262 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13263 HAVE_M17N_FLT=no
7f0942ba
KH
13264 else
13265 PKG_CONFIG_MIN_VERSION=0.9.0
13266 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13267 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13268echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13269
13270 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13271 { echo "$as_me:$LINENO: result: yes" >&5
13272echo "${ECHO_T}yes" >&6; }
13273 succeeded=yes
13274
13275 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13276echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13277 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13278 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13279echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13280
13281 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13282echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13283 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13284 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13285echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13286 else
13287 { echo "$as_me:$LINENO: result: no" >&5
13288echo "${ECHO_T}no" >&6; }
13289 M17N_FLT_CFLAGS=""
13290 M17N_FLT_LIBS=""
13291 ## If we have a custom action on failure, don't print errors, but
13292 ## do set a variable so people can do so.
13293 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13294
13295 fi
13296
13297
13298
13299 else
13300 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13301 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13302 fi
13303 fi
13304
13305 if test $succeeded = yes; then
435f8bc5 13306 HAVE_M17N_FLT=yes
7f0942ba 13307 else
435f8bc5 13308 HAVE_M17N_FLT=no
7f0942ba
KH
13309 fi
13310
6b0262c1 13311 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13312
13313cat >>confdefs.h <<\_ACEOF
13314#define HAVE_M17N_FLT 1
13315_ACEOF
13316
6b0262c1 13317 fi
e70b2110 13318 fi
b8bdd8c9 13319fi
e70b2110
KH
13320
13321
13322
13323
13324
13325
13326
7f0942ba
KH
13327
13328
7f0942ba 13329
77dfeef5 13330### End of font-backend section.
98418dba
CW
13331
13332### Use -lXpm if available, unless `--with-xpm=no'.
13333HAVE_XPM=no
13334if test "${HAVE_X11}" = "yes"; then
13335 if test "${with_xpm}" != "no"; then
c0d27fcc 13336 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13337 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13338echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13339if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13341fi
4c34eeee
MB
13342{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13343echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13344else
c0d27fcc 13345 # Is the header compilable?
4c34eeee
MB
13346{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13347echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13348cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13349/* confdefs.h. */
13350_ACEOF
13351cat confdefs.h >>conftest.$ac_ext
13352cat >>conftest.$ac_ext <<_ACEOF
13353/* end confdefs.h. */
c0d27fcc
MR
13354$ac_includes_default
13355#include <X11/xpm.h>
13356_ACEOF
13357rm -f conftest.$ac_objext
4c34eeee
MB
13358if { (ac_try="$ac_compile"
13359case "(($ac_try" in
13360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13361 *) ac_try_echo=$ac_try;;
13362esac
13363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13364 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13365 ac_status=$?
edfaf76d
LK
13366 grep -v '^ *+' conftest.er1 >conftest.err
13367 rm -f conftest.er1
13368 cat conftest.err >&5
c0d27fcc 13369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13370 (exit $ac_status); } && {
13371 test -z "$ac_c_werror_flag" ||
13372 test ! -s conftest.err
13373 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13374 ac_header_compiler=yes
13375else
13376 echo "$as_me: failed program was:" >&5
19650fd6
AS
13377sed 's/^/| /' conftest.$ac_ext >&5
13378
4c34eeee 13379 ac_header_compiler=no
c0d27fcc 13380fi
4c34eeee
MB
13381
13382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13384echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13385
13386# Is the header present?
4c34eeee
MB
13387{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13388echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13389cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13390/* confdefs.h. */
13391_ACEOF
13392cat confdefs.h >>conftest.$ac_ext
13393cat >>conftest.$ac_ext <<_ACEOF
13394/* end confdefs.h. */
98418dba
CW
13395#include <X11/xpm.h>
13396_ACEOF
4c34eeee
MB
13397if { (ac_try="$ac_cpp conftest.$ac_ext"
13398case "(($ac_try" in
13399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13400 *) ac_try_echo=$ac_try;;
13401esac
13402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13403 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13404 ac_status=$?
6bae0ccf 13405 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13406 rm -f conftest.er1
13407 cat conftest.err >&5
c0d27fcc 13408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13409 (exit $ac_status); } >/dev/null && {
13410 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13411 test ! -s conftest.err
13412 }; then
c0d27fcc 13413 ac_header_preproc=yes
98418dba
CW
13414else
13415 echo "$as_me: failed program was:" >&5
19650fd6
AS
13416sed 's/^/| /' conftest.$ac_ext >&5
13417
c0d27fcc 13418 ac_header_preproc=no
98418dba 13419fi
4c34eeee 13420
98418dba 13421rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13422{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13423echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13424
13425# So? What about this header?
edfaf76d
LK
13426case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13427 yes:no: )
c0d27fcc
MR
13428 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13429echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13430 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13431echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13432 ac_header_preproc=yes
13433 ;;
13434 no:yes:* )
13435 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13436echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13437 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13438echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13439 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13440echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13441 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13442echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13443 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13444echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13445 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13446echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13447
19650fd6 13448 ;;
c0d27fcc 13449esac
4c34eeee
MB
13450{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13451echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13452if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13453 echo $ECHO_N "(cached) $ECHO_C" >&6
13454else
13455 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13456fi
4c34eeee
MB
13457{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13458echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13459
13460fi
98418dba 13461if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13462 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13463echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13464if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13465 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13466else
98418dba
CW
13467 ac_check_lib_save_LIBS=$LIBS
13468LIBS="-lXpm -lX11 $LIBS"
13469cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13470/* confdefs.h. */
13471_ACEOF
13472cat confdefs.h >>conftest.$ac_ext
13473cat >>conftest.$ac_ext <<_ACEOF
13474/* end confdefs.h. */
98418dba 13475
4c34eeee
MB
13476/* Override any GCC internal prototype to avoid an error.
13477 Use char because int might match the return type of a GCC
13478 builtin and then its argument prototype would still apply. */
503d2be0
AS
13479#ifdef __cplusplus
13480extern "C"
13481#endif
98418dba 13482char XpmReadFileToPixmap ();
503d2be0
AS
13483int
13484main ()
13485{
4c34eeee 13486return XpmReadFileToPixmap ();
503d2be0
AS
13487 ;
13488 return 0;
13489}
13490_ACEOF
13491rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13492if { (ac_try="$ac_link"
13493case "(($ac_try" in
13494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13495 *) ac_try_echo=$ac_try;;
13496esac
13497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13498 (eval "$ac_link") 2>conftest.er1
503d2be0 13499 ac_status=$?
edfaf76d
LK
13500 grep -v '^ *+' conftest.er1 >conftest.err
13501 rm -f conftest.er1
13502 cat conftest.err >&5
c0d27fcc 13503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13504 (exit $ac_status); } && {
13505 test -z "$ac_c_werror_flag" ||
13506 test ! -s conftest.err
13507 } && test -s conftest$ac_exeext &&
13508 $as_test_x conftest$ac_exeext; then
98418dba 13509 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13510else
13511 echo "$as_me: failed program was:" >&5
19650fd6
AS
13512sed 's/^/| /' conftest.$ac_ext >&5
13513
4c34eeee 13514 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13515fi
4c34eeee
MB
13516
13517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13518 conftest$ac_exeext conftest.$ac_ext
98418dba 13519LIBS=$ac_check_lib_save_LIBS
503d2be0 13520fi
4c34eeee
MB
13521{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13522echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13523if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13524 HAVE_XPM=yes
ba4481b5
DL
13525fi
13526
98418dba
CW
13527fi
13528
c0d27fcc 13529
98418dba 13530 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13531 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13532echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13533 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
98418dba
CW
13539#include "X11/xpm.h"
13540#ifndef XpmReturnAllocPixels
13541no_return_alloc_pixels
503d2be0 13542#endif
ba4481b5 13543
98418dba
CW
13544_ACEOF
13545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13546 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13547 HAVE_XPM=no
13548else
13549 HAVE_XPM=yes
13550fi
13551rm -f conftest*
ba4481b5 13552
c0d27fcc 13553
98418dba 13554 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13555 { echo "$as_me:$LINENO: result: yes" >&5
13556echo "${ECHO_T}yes" >&6; }
98418dba 13557 else
4c34eeee
MB
13558 { echo "$as_me:$LINENO: result: no" >&5
13559echo "${ECHO_T}no" >&6; }
98418dba
CW
13560 fi
13561 fi
13562 fi
13563
13564 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13565
c0d27fcc 13566cat >>confdefs.h <<\_ACEOF
98418dba 13567#define HAVE_XPM 1
c0d27fcc 13568_ACEOF
98418dba
CW
13569
13570 fi
13571fi
13572
13573### Use -ljpeg if available, unless `--with-jpeg=no'.
13574HAVE_JPEG=no
13575if test "${HAVE_X11}" = "yes"; then
13576 if test "${with_jpeg}" != "no"; then
c0d27fcc 13577 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13578 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13579echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13580if test "${ac_cv_header_jerror_h+set}" = set; then
13581 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13582fi
ca81d7a0
JD
13583{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13584echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13585else
c0d27fcc 13586 # Is the header compilable?
ca81d7a0
JD
13587{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13588echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13589cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13590/* confdefs.h. */
13591_ACEOF
13592cat confdefs.h >>conftest.$ac_ext
13593cat >>conftest.$ac_ext <<_ACEOF
13594/* end confdefs.h. */
c0d27fcc
MR
13595$ac_includes_default
13596#include <jerror.h>
13597_ACEOF
13598rm -f conftest.$ac_objext
ca81d7a0
JD
13599if { (ac_try="$ac_compile"
13600case "(($ac_try" in
13601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13602 *) ac_try_echo=$ac_try;;
13603esac
13604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13605 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13606 ac_status=$?
edfaf76d
LK
13607 grep -v '^ *+' conftest.er1 >conftest.err
13608 rm -f conftest.er1
13609 cat conftest.err >&5
c0d27fcc 13610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13611 (exit $ac_status); } && {
13612 test -z "$ac_c_werror_flag" ||
13613 test ! -s conftest.err
13614 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13615 ac_header_compiler=yes
13616else
13617 echo "$as_me: failed program was:" >&5
19650fd6
AS
13618sed 's/^/| /' conftest.$ac_ext >&5
13619
ca81d7a0 13620 ac_header_compiler=no
c0d27fcc 13621fi
ca81d7a0
JD
13622
13623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13624{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13625echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13626
13627# Is the header present?
ca81d7a0
JD
13628{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13629echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13630cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13631/* confdefs.h. */
13632_ACEOF
13633cat confdefs.h >>conftest.$ac_ext
13634cat >>conftest.$ac_ext <<_ACEOF
13635/* end confdefs.h. */
98418dba
CW
13636#include <jerror.h>
13637_ACEOF
ca81d7a0
JD
13638if { (ac_try="$ac_cpp conftest.$ac_ext"
13639case "(($ac_try" in
13640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13641 *) ac_try_echo=$ac_try;;
13642esac
13643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13644 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13645 ac_status=$?
6bae0ccf 13646 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13647 rm -f conftest.er1
13648 cat conftest.err >&5
c0d27fcc 13649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13650 (exit $ac_status); } >/dev/null && {
13651 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13652 test ! -s conftest.err
13653 }; then
c0d27fcc 13654 ac_header_preproc=yes
ba4481b5 13655else
98418dba 13656 echo "$as_me: failed program was:" >&5
19650fd6
AS
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
c0d27fcc 13659 ac_header_preproc=no
98418dba 13660fi
ca81d7a0 13661
98418dba 13662rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13663{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13664echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13665
13666# So? What about this header?
edfaf76d
LK
13667case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13668 yes:no: )
c0d27fcc
MR
13669 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13670echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13671 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13672echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13673 ac_header_preproc=yes
19650fd6 13674 ;;
edfaf76d 13675 no:yes:* )
c0d27fcc
MR
13676 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13677echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13678 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13679echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13680 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13681echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13682 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13683echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13684 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13685echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13686 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13687echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13688
19650fd6 13689 ;;
c0d27fcc 13690esac
ca81d7a0
JD
13691{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13692echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13693if test "${ac_cv_header_jerror_h+set}" = set; then
13694 echo $ECHO_N "(cached) $ECHO_C" >&6
13695else
13696 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13697fi
ca81d7a0
JD
13698{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13699echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13700
13701fi
98418dba 13702if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13703 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13704echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13705if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13706 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13707else
98418dba
CW
13708 ac_check_lib_save_LIBS=$LIBS
13709LIBS="-ljpeg $LIBS"
13710cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13711/* confdefs.h. */
13712_ACEOF
13713cat confdefs.h >>conftest.$ac_ext
13714cat >>conftest.$ac_ext <<_ACEOF
13715/* end confdefs.h. */
98418dba 13716
ca81d7a0
JD
13717/* Override any GCC internal prototype to avoid an error.
13718 Use char because int might match the return type of a GCC
13719 builtin and then its argument prototype would still apply. */
98418dba
CW
13720#ifdef __cplusplus
13721extern "C"
13722#endif
98418dba 13723char jpeg_destroy_compress ();
503d2be0
AS
13724int
13725main ()
13726{
ca81d7a0 13727return jpeg_destroy_compress ();
503d2be0
AS
13728 ;
13729 return 0;
13730}
13731_ACEOF
13732rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13733if { (ac_try="$ac_link"
13734case "(($ac_try" in
13735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13736 *) ac_try_echo=$ac_try;;
13737esac
13738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13739 (eval "$ac_link") 2>conftest.er1
503d2be0 13740 ac_status=$?
edfaf76d
LK
13741 grep -v '^ *+' conftest.er1 >conftest.err
13742 rm -f conftest.er1
13743 cat conftest.err >&5
c0d27fcc 13744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13745 (exit $ac_status); } && {
13746 test -z "$ac_c_werror_flag" ||
13747 test ! -s conftest.err
13748 } && test -s conftest$ac_exeext &&
13749 $as_test_x conftest$ac_exeext; then
98418dba 13750 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13751else
503d2be0 13752 echo "$as_me: failed program was:" >&5
19650fd6
AS
13753sed 's/^/| /' conftest.$ac_ext >&5
13754
ca81d7a0 13755 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13756fi
ca81d7a0 13757
f053c89f 13758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13759 conftest$ac_exeext conftest.$ac_ext
98418dba 13760LIBS=$ac_check_lib_save_LIBS
ba4481b5 13761fi
ca81d7a0
JD
13762{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13763echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13764if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13765 HAVE_JPEG=yes
ba4481b5 13766fi
98418dba 13767
ba4481b5 13768fi
98418dba 13769
c0d27fcc 13770
ba4481b5 13771 fi
ba4481b5 13772
c0d27fcc 13773
98418dba 13774 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13775 cat >>confdefs.h <<\_ACEOF
98418dba 13776#define HAVE_JPEG 1
c0d27fcc 13777_ACEOF
98418dba
CW
13778
13779 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13780/* confdefs.h. */
13781_ACEOF
13782cat confdefs.h >>conftest.$ac_ext
13783cat >>conftest.$ac_ext <<_ACEOF
13784/* end confdefs.h. */
22044edf 13785#include <jpeglib.h>
98418dba
CW
13786 version=JPEG_LIB_VERSION
13787
13788_ACEOF
13789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13790 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13791 cat >>confdefs.h <<\_ACEOF
98418dba 13792#define HAVE_JPEG 1
c0d27fcc 13793_ACEOF
ba4481b5 13794
98418dba 13795else
c0d27fcc 13796 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13797echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13798 HAVE_JPEG=no
ba4481b5 13799fi
98418dba 13800rm -f conftest*
ba4481b5 13801
98418dba
CW
13802 fi
13803fi
503d2be0 13804
98418dba
CW
13805### Use -lpng if available, unless `--with-png=no'.
13806HAVE_PNG=no
13807if test "${HAVE_X11}" = "yes"; then
13808 if test "${with_png}" != "no"; then
f57bd967
DL
13809 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13810 # in /usr/include/libpng.
13811
13812
13813for ac_header in png.h libpng/png.h
13814do
13815as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13816if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13817 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13818echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13819if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13820 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13821fi
ca81d7a0
JD
13822ac_res=`eval echo '${'$as_ac_Header'}'`
13823 { echo "$as_me:$LINENO: result: $ac_res" >&5
13824echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13825else
c0d27fcc 13826 # Is the header compilable?
ca81d7a0
JD
13827{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13828echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13829cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13830/* confdefs.h. */
13831_ACEOF
13832cat confdefs.h >>conftest.$ac_ext
13833cat >>conftest.$ac_ext <<_ACEOF
13834/* end confdefs.h. */
c0d27fcc 13835$ac_includes_default
f57bd967 13836#include <$ac_header>
c0d27fcc
MR
13837_ACEOF
13838rm -f conftest.$ac_objext
ca81d7a0
JD
13839if { (ac_try="$ac_compile"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
13844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13845 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13846 ac_status=$?
edfaf76d
LK
13847 grep -v '^ *+' conftest.er1 >conftest.err
13848 rm -f conftest.er1
13849 cat conftest.err >&5
c0d27fcc 13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13851 (exit $ac_status); } && {
13852 test -z "$ac_c_werror_flag" ||
13853 test ! -s conftest.err
13854 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13855 ac_header_compiler=yes
13856else
13857 echo "$as_me: failed program was:" >&5
19650fd6
AS
13858sed 's/^/| /' conftest.$ac_ext >&5
13859
ca81d7a0 13860 ac_header_compiler=no
c0d27fcc 13861fi
ca81d7a0
JD
13862
13863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13864{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13865echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13866
13867# Is the header present?
ca81d7a0
JD
13868{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13869echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13870cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13871/* confdefs.h. */
13872_ACEOF
13873cat confdefs.h >>conftest.$ac_ext
13874cat >>conftest.$ac_ext <<_ACEOF
13875/* end confdefs.h. */
f57bd967 13876#include <$ac_header>
503d2be0 13877_ACEOF
ca81d7a0
JD
13878if { (ac_try="$ac_cpp conftest.$ac_ext"
13879case "(($ac_try" in
13880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13881 *) ac_try_echo=$ac_try;;
13882esac
13883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13884 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13885 ac_status=$?
6bae0ccf 13886 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13887 rm -f conftest.er1
13888 cat conftest.err >&5
c0d27fcc 13889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13890 (exit $ac_status); } >/dev/null && {
13891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13892 test ! -s conftest.err
13893 }; then
c0d27fcc 13894 ac_header_preproc=yes
503d2be0
AS
13895else
13896 echo "$as_me: failed program was:" >&5
19650fd6
AS
13897sed 's/^/| /' conftest.$ac_ext >&5
13898
c0d27fcc 13899 ac_header_preproc=no
ba4481b5 13900fi
ca81d7a0 13901
503d2be0 13902rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13903{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13904echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13905
13906# So? What about this header?
edfaf76d
LK
13907case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13908 yes:no: )
f57bd967
DL
13909 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13910echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13911 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13912echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13913 ac_header_preproc=yes
19650fd6 13914 ;;
edfaf76d 13915 no:yes:* )
f57bd967
DL
13916 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13917echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13918 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13919echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13920 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13921echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13922 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13923echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13924 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13925echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13926 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13927echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13928
19650fd6 13929 ;;
c0d27fcc 13930esac
ca81d7a0
JD
13931{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13932echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13933if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13934 echo $ECHO_N "(cached) $ECHO_C" >&6
13935else
edfaf76d 13936 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13937fi
ca81d7a0
JD
13938ac_res=`eval echo '${'$as_ac_Header'}'`
13939 { echo "$as_me:$LINENO: result: $ac_res" >&5
13940echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13941
ba4481b5 13942fi
f57bd967
DL
13943if test `eval echo '${'$as_ac_Header'}'` = yes; then
13944 cat >>confdefs.h <<_ACEOF
13945#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13946_ACEOF
c0d27fcc
MR
13947
13948fi
f57bd967
DL
13949
13950done
13951
13952 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13953 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13954echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13955if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13956 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13957else
98418dba
CW
13958 ac_check_lib_save_LIBS=$LIBS
13959LIBS="-lpng -lz -lm $LIBS"
13960cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13961/* confdefs.h. */
13962_ACEOF
13963cat confdefs.h >>conftest.$ac_ext
13964cat >>conftest.$ac_ext <<_ACEOF
13965/* end confdefs.h. */
98418dba 13966
ca81d7a0
JD
13967/* Override any GCC internal prototype to avoid an error.
13968 Use char because int might match the return type of a GCC
13969 builtin and then its argument prototype would still apply. */
503d2be0
AS
13970#ifdef __cplusplus
13971extern "C"
13972#endif
98418dba 13973char png_get_channels ();
503d2be0
AS
13974int
13975main ()
13976{
ca81d7a0 13977return png_get_channels ();
503d2be0
AS
13978 ;
13979 return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13983if { (ac_try="$ac_link"
13984case "(($ac_try" in
13985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13986 *) ac_try_echo=$ac_try;;
13987esac
13988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13989 (eval "$ac_link") 2>conftest.er1
503d2be0 13990 ac_status=$?
edfaf76d
LK
13991 grep -v '^ *+' conftest.er1 >conftest.err
13992 rm -f conftest.er1
13993 cat conftest.err >&5
c0d27fcc 13994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13995 (exit $ac_status); } && {
13996 test -z "$ac_c_werror_flag" ||
13997 test ! -s conftest.err
13998 } && test -s conftest$ac_exeext &&
13999 $as_test_x conftest$ac_exeext; then
98418dba 14000 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14001else
98418dba 14002 echo "$as_me: failed program was:" >&5
19650fd6
AS
14003sed 's/^/| /' conftest.$ac_ext >&5
14004
ca81d7a0 14005 ac_cv_lib_png_png_get_channels=no
73b77ee5 14006fi
ca81d7a0 14007
f053c89f 14008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14009 conftest$ac_exeext conftest.$ac_ext
98418dba 14010LIBS=$ac_check_lib_save_LIBS
73b77ee5 14011fi
ca81d7a0
JD
14012{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14013echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14014if test $ac_cv_lib_png_png_get_channels = yes; then
14015 HAVE_PNG=yes
73b77ee5 14016fi
503d2be0 14017
f57bd967 14018 fi
98418dba
CW
14019 fi
14020
14021 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14022
c0d27fcc 14023cat >>confdefs.h <<\_ACEOF
98418dba 14024#define HAVE_PNG 1
c0d27fcc 14025_ACEOF
73b77ee5 14026
98418dba 14027 fi
73b77ee5
GM
14028fi
14029
98418dba
CW
14030### Use -ltiff if available, unless `--with-tiff=no'.
14031HAVE_TIFF=no
14032if test "${HAVE_X11}" = "yes"; then
14033 if test "${with_tiff}" != "no"; then
c0d27fcc 14034 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14035 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14036echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14037if test "${ac_cv_header_tiffio_h+set}" = set; then
14038 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14039fi
ca81d7a0
JD
14040{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14041echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14042else
c0d27fcc 14043 # Is the header compilable?
ca81d7a0
JD
14044{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14045echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14047/* confdefs.h. */
14048_ACEOF
14049cat confdefs.h >>conftest.$ac_ext
14050cat >>conftest.$ac_ext <<_ACEOF
14051/* end confdefs.h. */
c0d27fcc
MR
14052$ac_includes_default
14053#include <tiffio.h>
14054_ACEOF
14055rm -f conftest.$ac_objext
ca81d7a0
JD
14056if { (ac_try="$ac_compile"
14057case "(($ac_try" in
14058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14059 *) ac_try_echo=$ac_try;;
14060esac
14061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14062 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14063 ac_status=$?
edfaf76d
LK
14064 grep -v '^ *+' conftest.er1 >conftest.err
14065 rm -f conftest.er1
14066 cat conftest.err >&5
c0d27fcc 14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14068 (exit $ac_status); } && {
14069 test -z "$ac_c_werror_flag" ||
14070 test ! -s conftest.err
14071 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14072 ac_header_compiler=yes
14073else
14074 echo "$as_me: failed program was:" >&5
19650fd6
AS
14075sed 's/^/| /' conftest.$ac_ext >&5
14076
ca81d7a0 14077 ac_header_compiler=no
c0d27fcc 14078fi
ca81d7a0
JD
14079
14080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14081{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14082echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14083
14084# Is the header present?
ca81d7a0
JD
14085{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14086echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14087cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14088/* confdefs.h. */
14089_ACEOF
14090cat confdefs.h >>conftest.$ac_ext
14091cat >>conftest.$ac_ext <<_ACEOF
14092/* end confdefs.h. */
98418dba
CW
14093#include <tiffio.h>
14094_ACEOF
ca81d7a0
JD
14095if { (ac_try="$ac_cpp conftest.$ac_ext"
14096case "(($ac_try" in
14097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14098 *) ac_try_echo=$ac_try;;
14099esac
14100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14101 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14102 ac_status=$?
6bae0ccf 14103 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14104 rm -f conftest.er1
14105 cat conftest.err >&5
c0d27fcc 14106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14107 (exit $ac_status); } >/dev/null && {
14108 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14109 test ! -s conftest.err
14110 }; then
c0d27fcc 14111 ac_header_preproc=yes
98418dba
CW
14112else
14113 echo "$as_me: failed program was:" >&5
19650fd6
AS
14114sed 's/^/| /' conftest.$ac_ext >&5
14115
c0d27fcc 14116 ac_header_preproc=no
98418dba 14117fi
ca81d7a0 14118
98418dba 14119rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14120{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14121echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14122
14123# So? What about this header?
edfaf76d
LK
14124case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14125 yes:no: )
c0d27fcc
MR
14126 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14127echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14128 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14129echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14130 ac_header_preproc=yes
19650fd6 14131 ;;
edfaf76d 14132 no:yes:* )
c0d27fcc
MR
14133 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14134echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14135 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14136echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14137 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14138echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14139 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14140echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14141 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14142echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14143 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14144echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14145
19650fd6 14146 ;;
c0d27fcc 14147esac
ca81d7a0
JD
14148{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14149echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14150if test "${ac_cv_header_tiffio_h+set}" = set; then
14151 echo $ECHO_N "(cached) $ECHO_C" >&6
14152else
14153 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14154fi
ca81d7a0
JD
14155{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14156echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14157
14158fi
98418dba
CW
14159if test $ac_cv_header_tiffio_h = yes; then
14160 tifflibs="-lz -lm"
14161 # At least one tiff package requires the jpeg library.
14162 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14163 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14164echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14165if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14166 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14167else
503d2be0 14168 ac_check_lib_save_LIBS=$LIBS
98418dba 14169LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14170cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14171/* confdefs.h. */
14172_ACEOF
14173cat confdefs.h >>conftest.$ac_ext
14174cat >>conftest.$ac_ext <<_ACEOF
14175/* end confdefs.h. */
503d2be0 14176
ca81d7a0
JD
14177/* Override any GCC internal prototype to avoid an error.
14178 Use char because int might match the return type of a GCC
14179 builtin and then its argument prototype would still apply. */
503d2be0
AS
14180#ifdef __cplusplus
14181extern "C"
14182#endif
98418dba 14183char TIFFGetVersion ();
503d2be0
AS
14184int
14185main ()
14186{
ca81d7a0 14187return TIFFGetVersion ();
503d2be0
AS
14188 ;
14189 return 0;
14190}
14191_ACEOF
14192rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14193if { (ac_try="$ac_link"
14194case "(($ac_try" in
14195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14196 *) ac_try_echo=$ac_try;;
14197esac
14198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14199 (eval "$ac_link") 2>conftest.er1
503d2be0 14200 ac_status=$?
edfaf76d
LK
14201 grep -v '^ *+' conftest.er1 >conftest.err
14202 rm -f conftest.er1
14203 cat conftest.err >&5
c0d27fcc 14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14205 (exit $ac_status); } && {
14206 test -z "$ac_c_werror_flag" ||
14207 test ! -s conftest.err
14208 } && test -s conftest$ac_exeext &&
14209 $as_test_x conftest$ac_exeext; then
98418dba 14210 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14211else
14212 echo "$as_me: failed program was:" >&5
19650fd6
AS
14213sed 's/^/| /' conftest.$ac_ext >&5
14214
ca81d7a0 14215 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14216fi
ca81d7a0 14217
f053c89f 14218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14219 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14220LIBS=$ac_check_lib_save_LIBS
14221fi
ca81d7a0
JD
14222{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14223echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14224if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14225 HAVE_TIFF=yes
14226fi
14227
14228fi
73b77ee5 14229
c0d27fcc 14230
98418dba
CW
14231 fi
14232
14233 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14234
c0d27fcc 14235cat >>confdefs.h <<\_ACEOF
98418dba 14236#define HAVE_TIFF 1
c0d27fcc 14237_ACEOF
98418dba
CW
14238
14239 fi
73b77ee5
GM
14240fi
14241
9aeb8aaa 14242### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14243HAVE_GIF=no
9aeb8aaa
GM
14244if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14245 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14246 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14247echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14248if test "${ac_cv_header_gif_lib_h+set}" = set; then
14249 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14250fi
ca81d7a0
JD
14251{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14252echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14253else
c0d27fcc 14254 # Is the header compilable?
ca81d7a0
JD
14255{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14256echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14257cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14258/* confdefs.h. */
14259_ACEOF
14260cat confdefs.h >>conftest.$ac_ext
14261cat >>conftest.$ac_ext <<_ACEOF
14262/* end confdefs.h. */
c0d27fcc
MR
14263$ac_includes_default
14264#include <gif_lib.h>
14265_ACEOF
14266rm -f conftest.$ac_objext
ca81d7a0
JD
14267if { (ac_try="$ac_compile"
14268case "(($ac_try" in
14269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14270 *) ac_try_echo=$ac_try;;
14271esac
14272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14273 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14274 ac_status=$?
edfaf76d
LK
14275 grep -v '^ *+' conftest.er1 >conftest.err
14276 rm -f conftest.er1
14277 cat conftest.err >&5
c0d27fcc 14278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14279 (exit $ac_status); } && {
14280 test -z "$ac_c_werror_flag" ||
14281 test ! -s conftest.err
14282 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14283 ac_header_compiler=yes
14284else
14285 echo "$as_me: failed program was:" >&5
19650fd6
AS
14286sed 's/^/| /' conftest.$ac_ext >&5
14287
ca81d7a0 14288 ac_header_compiler=no
c0d27fcc 14289fi
ca81d7a0
JD
14290
14291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14292{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14293echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14294
14295# Is the header present?
ca81d7a0
JD
14296{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14297echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14298cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14299/* confdefs.h. */
14300_ACEOF
14301cat confdefs.h >>conftest.$ac_ext
14302cat >>conftest.$ac_ext <<_ACEOF
14303/* end confdefs.h. */
98418dba
CW
14304#include <gif_lib.h>
14305_ACEOF
ca81d7a0
JD
14306if { (ac_try="$ac_cpp conftest.$ac_ext"
14307case "(($ac_try" in
14308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14309 *) ac_try_echo=$ac_try;;
14310esac
14311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14312 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14313 ac_status=$?
6bae0ccf 14314 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14315 rm -f conftest.er1
14316 cat conftest.err >&5
c0d27fcc 14317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14318 (exit $ac_status); } >/dev/null && {
14319 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14320 test ! -s conftest.err
14321 }; then
c0d27fcc 14322 ac_header_preproc=yes
98418dba
CW
14323else
14324 echo "$as_me: failed program was:" >&5
19650fd6
AS
14325sed 's/^/| /' conftest.$ac_ext >&5
14326
c0d27fcc 14327 ac_header_preproc=no
98418dba 14328fi
ca81d7a0 14329
98418dba 14330rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14331{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14332echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14333
14334# So? What about this header?
edfaf76d
LK
14335case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14336 yes:no: )
c0d27fcc
MR
14337 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14338echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14339 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14340echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14341 ac_header_preproc=yes
19650fd6 14342 ;;
edfaf76d 14343 no:yes:* )
c0d27fcc
MR
14344 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14345echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14346 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14347echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14348 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14349echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14350 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14351echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14352 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14353echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14354 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14355echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14356
19650fd6 14357 ;;
c0d27fcc 14358esac
ca81d7a0
JD
14359{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14360echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14361if test "${ac_cv_header_gif_lib_h+set}" = set; then
14362 echo $ECHO_N "(cached) $ECHO_C" >&6
14363else
14364 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14365fi
ca81d7a0
JD
14366{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14367echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14368
14369fi
98418dba
CW
14370if test $ac_cv_header_gif_lib_h = yes; then
14371 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14372# Earlier versions can crash Emacs.
63175cd2
GM
14373 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14374echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14375if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14376 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14377else
503d2be0 14378 ac_check_lib_save_LIBS=$LIBS
63175cd2 14379LIBS="-lgif $LIBS"
503d2be0 14380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14381/* confdefs.h. */
14382_ACEOF
14383cat confdefs.h >>conftest.$ac_ext
14384cat >>conftest.$ac_ext <<_ACEOF
14385/* end confdefs.h. */
73b77ee5 14386
ca81d7a0
JD
14387/* Override any GCC internal prototype to avoid an error.
14388 Use char because int might match the return type of a GCC
14389 builtin and then its argument prototype would still apply. */
98418dba
CW
14390#ifdef __cplusplus
14391extern "C"
14392#endif
98418dba 14393char EGifPutExtensionLast ();
503d2be0
AS
14394int
14395main ()
14396{
ca81d7a0 14397return EGifPutExtensionLast ();
503d2be0
AS
14398 ;
14399 return 0;
14400}
14401_ACEOF
14402rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14403if { (ac_try="$ac_link"
14404case "(($ac_try" in
14405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14406 *) ac_try_echo=$ac_try;;
14407esac
14408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14409 (eval "$ac_link") 2>conftest.er1
503d2be0 14410 ac_status=$?
edfaf76d
LK
14411 grep -v '^ *+' conftest.er1 >conftest.err
14412 rm -f conftest.er1
14413 cat conftest.err >&5
c0d27fcc 14414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14415 (exit $ac_status); } && {
14416 test -z "$ac_c_werror_flag" ||
14417 test ! -s conftest.err
14418 } && test -s conftest$ac_exeext &&
14419 $as_test_x conftest$ac_exeext; then
63175cd2 14420 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14421else
98418dba 14422 echo "$as_me: failed program was:" >&5
19650fd6
AS
14423sed 's/^/| /' conftest.$ac_ext >&5
14424
63175cd2 14425 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14426fi
ca81d7a0 14427
f053c89f 14428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14429 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14430LIBS=$ac_check_lib_save_LIBS
14431fi
63175cd2
GM
14432{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14433echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14434if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14435 HAVE_GIF=yes
9aeb8aaa 14436else
63175cd2 14437 try_libungif=yes
98418dba
CW
14438fi
14439
14440fi
14441
c0d27fcc 14442
9aeb8aaa
GM
14443
14444 if test "$HAVE_GIF" = yes; then
63175cd2 14445 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14446 fi
14447
63175cd2
GM
14448# If gif_lib.h but no libgif, try libungif.
14449 if test x"$try_libungif" = xyes; then
14450 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14451echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14452if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14453 echo $ECHO_N "(cached) $ECHO_C" >&6
14454else
14455 ac_check_lib_save_LIBS=$LIBS
63175cd2 14456LIBS="-lungif $LIBS"
9aeb8aaa
GM
14457cat >conftest.$ac_ext <<_ACEOF
14458/* confdefs.h. */
14459_ACEOF
14460cat confdefs.h >>conftest.$ac_ext
14461cat >>conftest.$ac_ext <<_ACEOF
14462/* end confdefs.h. */
14463
14464/* Override any GCC internal prototype to avoid an error.
14465 Use char because int might match the return type of a GCC
14466 builtin and then its argument prototype would still apply. */
14467#ifdef __cplusplus
14468extern "C"
14469#endif
14470char EGifPutExtensionLast ();
14471int
14472main ()
14473{
14474return EGifPutExtensionLast ();
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479rm -f conftest.$ac_objext conftest$ac_exeext
14480if { (ac_try="$ac_link"
14481case "(($ac_try" in
14482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14483 *) ac_try_echo=$ac_try;;
14484esac
14485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14486 (eval "$ac_link") 2>conftest.er1
14487 ac_status=$?
14488 grep -v '^ *+' conftest.er1 >conftest.err
14489 rm -f conftest.er1
14490 cat conftest.err >&5
14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492 (exit $ac_status); } && {
14493 test -z "$ac_c_werror_flag" ||
14494 test ! -s conftest.err
14495 } && test -s conftest$ac_exeext &&
14496 $as_test_x conftest$ac_exeext; then
63175cd2 14497 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14498else
14499 echo "$as_me: failed program was:" >&5
14500sed 's/^/| /' conftest.$ac_ext >&5
14501
63175cd2 14502 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14503fi
14504
9aeb8aaa
GM
14505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14506 conftest$ac_exeext conftest.$ac_ext
14507LIBS=$ac_check_lib_save_LIBS
14508fi
63175cd2
GM
14509{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14510echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14511if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14512 HAVE_GIF=yes
98418dba
CW
14513fi
14514
c0d27fcc 14515
9aeb8aaa
GM
14516 if test "$HAVE_GIF" = yes; then
14517
14518cat >>confdefs.h <<\_ACEOF
63175cd2 14519#define LIBGIF -lungif
9aeb8aaa
GM
14520_ACEOF
14521
63175cd2 14522 ac_gif_lib_name="-lungif"
9aeb8aaa 14523 fi
98418dba
CW
14524 fi
14525
14526 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14527
c0d27fcc 14528cat >>confdefs.h <<\_ACEOF
98418dba 14529#define HAVE_GIF 1
c0d27fcc 14530_ACEOF
98418dba
CW
14531
14532 fi
14533fi
14534
5afbeb22
JD
14535if test "${HAVE_X11}" = "yes"; then
14536 MISSING=""
14537 WITH_NO=""
14538 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14539 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14540 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14541 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14542 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14543 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14544 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14545 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14546 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14547 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14548
14549 if test "X${MISSING}" != X; then
1bb9a689 14550 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14551 $MISSING
86e73516 14552Maybe some development libraries/packages are missing?
5afbeb22
JD
14553If you don't want to link with them give
14554 $WITH_NO
14555as options to configure" >&5
1bb9a689 14556echo "$as_me: error: The following required libraries were not found:
5afbeb22 14557 $MISSING
86e73516 14558Maybe some development libraries/packages are missing?
5afbeb22
JD
14559If you don't want to link with them give
14560 $WITH_NO
14561as options to configure" >&2;}
86e73516 14562 { (exit 1); exit 1; }; }
98418dba
CW
14563 fi
14564fi
14565
79011b82
NR
14566### Use -lgpm if available, unless `--with-gpm=no'.
14567HAVE_GPM=no
14568if test "${with_gpm}" != "no"; then
14569 if test "${ac_cv_header_gpm_h+set}" = set; then
14570 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14571echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14572if test "${ac_cv_header_gpm_h+set}" = set; then
14573 echo $ECHO_N "(cached) $ECHO_C" >&6
14574fi
14575{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14576echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14577else
14578 # Is the header compilable?
14579{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14580echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14581cat >conftest.$ac_ext <<_ACEOF
14582/* confdefs.h. */
14583_ACEOF
14584cat confdefs.h >>conftest.$ac_ext
14585cat >>conftest.$ac_ext <<_ACEOF
14586/* end confdefs.h. */
14587$ac_includes_default
14588#include <gpm.h>
14589_ACEOF
14590rm -f conftest.$ac_objext
14591if { (ac_try="$ac_compile"
14592case "(($ac_try" in
14593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14594 *) ac_try_echo=$ac_try;;
14595esac
14596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14597 (eval "$ac_compile") 2>conftest.er1
14598 ac_status=$?
14599 grep -v '^ *+' conftest.er1 >conftest.err
14600 rm -f conftest.er1
14601 cat conftest.err >&5
14602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14603 (exit $ac_status); } && {
14604 test -z "$ac_c_werror_flag" ||
14605 test ! -s conftest.err
14606 } && test -s conftest.$ac_objext; then
14607 ac_header_compiler=yes
14608else
14609 echo "$as_me: failed program was:" >&5
14610sed 's/^/| /' conftest.$ac_ext >&5
14611
14612 ac_header_compiler=no
14613fi
14614
14615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14617echo "${ECHO_T}$ac_header_compiler" >&6; }
14618
14619# Is the header present?
14620{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14621echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14622cat >conftest.$ac_ext <<_ACEOF
14623/* confdefs.h. */
14624_ACEOF
14625cat confdefs.h >>conftest.$ac_ext
14626cat >>conftest.$ac_ext <<_ACEOF
14627/* end confdefs.h. */
14628#include <gpm.h>
14629_ACEOF
14630if { (ac_try="$ac_cpp conftest.$ac_ext"
14631case "(($ac_try" in
14632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14633 *) ac_try_echo=$ac_try;;
14634esac
14635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14636 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14637 ac_status=$?
14638 grep -v '^ *+' conftest.er1 >conftest.err
14639 rm -f conftest.er1
14640 cat conftest.err >&5
14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642 (exit $ac_status); } >/dev/null && {
14643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14644 test ! -s conftest.err
14645 }; then
14646 ac_header_preproc=yes
14647else
14648 echo "$as_me: failed program was:" >&5
14649sed 's/^/| /' conftest.$ac_ext >&5
14650
14651 ac_header_preproc=no
14652fi
14653
14654rm -f conftest.err conftest.$ac_ext
14655{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14656echo "${ECHO_T}$ac_header_preproc" >&6; }
14657
14658# So? What about this header?
14659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14660 yes:no: )
14661 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14662echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14663 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14664echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14665 ac_header_preproc=yes
14666 ;;
14667 no:yes:* )
14668 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14669echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14670 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14671echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14672 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14673echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14674 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14675echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14676 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14677echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14678 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14679echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14680
14681 ;;
14682esac
14683{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14684echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14685if test "${ac_cv_header_gpm_h+set}" = set; then
14686 echo $ECHO_N "(cached) $ECHO_C" >&6
14687else
14688 ac_cv_header_gpm_h=$ac_header_preproc
14689fi
14690{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14691echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14692
14693fi
14694if test $ac_cv_header_gpm_h = yes; then
14695 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14696echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14697if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14698 echo $ECHO_N "(cached) $ECHO_C" >&6
14699else
14700 ac_check_lib_save_LIBS=$LIBS
14701LIBS="-lgpm $LIBS"
14702cat >conftest.$ac_ext <<_ACEOF
14703/* confdefs.h. */
14704_ACEOF
14705cat confdefs.h >>conftest.$ac_ext
14706cat >>conftest.$ac_ext <<_ACEOF
14707/* end confdefs.h. */
14708
14709/* Override any GCC internal prototype to avoid an error.
14710 Use char because int might match the return type of a GCC
14711 builtin and then its argument prototype would still apply. */
14712#ifdef __cplusplus
14713extern "C"
14714#endif
14715char Gpm_Open ();
14716int
14717main ()
14718{
14719return Gpm_Open ();
14720 ;
14721 return 0;
14722}
14723_ACEOF
14724rm -f conftest.$ac_objext conftest$ac_exeext
14725if { (ac_try="$ac_link"
14726case "(($ac_try" in
14727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14728 *) ac_try_echo=$ac_try;;
14729esac
14730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14731 (eval "$ac_link") 2>conftest.er1
14732 ac_status=$?
14733 grep -v '^ *+' conftest.er1 >conftest.err
14734 rm -f conftest.er1
14735 cat conftest.err >&5
14736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14737 (exit $ac_status); } && {
14738 test -z "$ac_c_werror_flag" ||
14739 test ! -s conftest.err
14740 } && test -s conftest$ac_exeext &&
14741 $as_test_x conftest$ac_exeext; then
14742 ac_cv_lib_gpm_Gpm_Open=yes
14743else
14744 echo "$as_me: failed program was:" >&5
14745sed 's/^/| /' conftest.$ac_ext >&5
14746
14747 ac_cv_lib_gpm_Gpm_Open=no
14748fi
14749
14750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14751 conftest$ac_exeext conftest.$ac_ext
14752LIBS=$ac_check_lib_save_LIBS
14753fi
14754{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14755echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14756if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14757 HAVE_GPM=yes
14758fi
14759
14760fi
14761
14762
14763fi
14764
14765if test "${HAVE_GPM}" = "yes"; then
14766
14767cat >>confdefs.h <<\_ACEOF
14768#define HAVE_GPM 1
14769_ACEOF
14770
14771fi
14772
cef11da2 14773if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14774 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14775echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14776if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14777 echo $ECHO_N "(cached) $ECHO_C" >&6
14778fi
ca81d7a0
JD
14779{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14780echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14781else
14782 # Is the header compilable?
ca81d7a0
JD
14783{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14784echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14785cat >conftest.$ac_ext <<_ACEOF
14786/* confdefs.h. */
14787_ACEOF
14788cat confdefs.h >>conftest.$ac_ext
14789cat >>conftest.$ac_ext <<_ACEOF
14790/* end confdefs.h. */
14791$ac_includes_default
14792#include <malloc/malloc.h>
14793_ACEOF
14794rm -f conftest.$ac_objext
ca81d7a0
JD
14795if { (ac_try="$ac_compile"
14796case "(($ac_try" in
14797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14798 *) ac_try_echo=$ac_try;;
14799esac
14800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14801 (eval "$ac_compile") 2>conftest.er1
cef11da2 14802 ac_status=$?
edfaf76d
LK
14803 grep -v '^ *+' conftest.er1 >conftest.err
14804 rm -f conftest.er1
14805 cat conftest.err >&5
cef11da2 14806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14807 (exit $ac_status); } && {
14808 test -z "$ac_c_werror_flag" ||
14809 test ! -s conftest.err
14810 } && test -s conftest.$ac_objext; then
cef11da2
ST
14811 ac_header_compiler=yes
14812else
14813 echo "$as_me: failed program was:" >&5
14814sed 's/^/| /' conftest.$ac_ext >&5
14815
ca81d7a0 14816 ac_header_compiler=no
cef11da2 14817fi
ca81d7a0
JD
14818
14819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14820{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14821echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14822
14823# Is the header present?
ca81d7a0
JD
14824{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14825echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14826cat >conftest.$ac_ext <<_ACEOF
14827/* confdefs.h. */
14828_ACEOF
14829cat confdefs.h >>conftest.$ac_ext
14830cat >>conftest.$ac_ext <<_ACEOF
14831/* end confdefs.h. */
14832#include <malloc/malloc.h>
14833_ACEOF
ca81d7a0
JD
14834if { (ac_try="$ac_cpp conftest.$ac_ext"
14835case "(($ac_try" in
14836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14837 *) ac_try_echo=$ac_try;;
14838esac
14839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14840 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14841 ac_status=$?
14842 grep -v '^ *+' conftest.er1 >conftest.err
14843 rm -f conftest.er1
14844 cat conftest.err >&5
14845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14846 (exit $ac_status); } >/dev/null && {
14847 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14848 test ! -s conftest.err
14849 }; then
cef11da2
ST
14850 ac_header_preproc=yes
14851else
14852 echo "$as_me: failed program was:" >&5
14853sed 's/^/| /' conftest.$ac_ext >&5
14854
14855 ac_header_preproc=no
14856fi
ca81d7a0 14857
cef11da2 14858rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14859{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14860echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14861
14862# So? What about this header?
edfaf76d
LK
14863case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14864 yes:no: )
cef11da2
ST
14865 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14866echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14867 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14868echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14869 ac_header_preproc=yes
cef11da2 14870 ;;
edfaf76d 14871 no:yes:* )
cef11da2
ST
14872 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14873echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14874 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14875echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14876 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14877echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14878 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14879echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14880 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14881echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14882 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14883echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14884
cef11da2
ST
14885 ;;
14886esac
ca81d7a0
JD
14887{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14888echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14889if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14890 echo $ECHO_N "(cached) $ECHO_C" >&6
14891else
14892 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14893fi
ca81d7a0
JD
14894{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14895echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14896
7c9e5167 14897fi
cef11da2
ST
14898if test $ac_cv_header_malloc_malloc_h = yes; then
14899
14900cat >>confdefs.h <<\_ACEOF
14901#define HAVE_MALLOC_MALLOC_H 1
14902_ACEOF
14903
7c9e5167
JD
14904fi
14905
cef11da2
ST
14906
14907
edfda783
AR
14908### Use NeXTstep API to implement GUI.
14909if test "${HAVE_NS}" = "yes"; then
14910
14911cat >>confdefs.h <<\_ACEOF
14912#define HAVE_NS 1
14913_ACEOF
14914
ff1095d1 14915 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
14916
14917cat >>confdefs.h <<\_ACEOF
14918#define NS_IMPL_COCOA 1
14919_ACEOF
14920
48fad8e8
DN
14921 GNU_OBJC_CFLAGS=
14922 LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
edfda783
AR
14923 fi
14924 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
14925
14926cat >>confdefs.h <<\_ACEOF
14927#define COCOA_EXPERIMENTAL_CTRL_G 1
14928_ACEOF
14929
14930 fi
ff1095d1 14931 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
14932
14933cat >>confdefs.h <<\_ACEOF
14934#define NS_IMPL_GNUSTEP 1
14935_ACEOF
14936
48fad8e8 14937 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
edfda783 14938 fi
d5e2f8fe 14939 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
519c4a9a
CY
14940
14941cat >>confdefs.h <<\_ACEOF
d5e2f8fe 14942#define NS_HAVE_NSINTEGER 1
519c4a9a
CY
14943_ACEOF
14944
177cd151
CY
14945 fi
14946 # We also have mouse menus.
edfda783
AR
14947 HAVE_MENUS=yes
14948fi
14949
e0f712ba 14950
98418dba
CW
14951### Use session management (-lSM -lICE) if available
14952HAVE_X_SM=no
14953if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14954 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14955 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14956echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14957if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14958 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14959fi
ca81d7a0
JD
14960{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14961echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14962else
c0d27fcc 14963 # Is the header compilable?
ca81d7a0
JD
14964{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14965echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14966cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14967/* confdefs.h. */
14968_ACEOF
14969cat confdefs.h >>conftest.$ac_ext
14970cat >>conftest.$ac_ext <<_ACEOF
14971/* end confdefs.h. */
c0d27fcc
MR
14972$ac_includes_default
14973#include <X11/SM/SMlib.h>
14974_ACEOF
14975rm -f conftest.$ac_objext
ca81d7a0
JD
14976if { (ac_try="$ac_compile"
14977case "(($ac_try" in
14978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14979 *) ac_try_echo=$ac_try;;
14980esac
14981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14982 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14983 ac_status=$?
edfaf76d
LK
14984 grep -v '^ *+' conftest.er1 >conftest.err
14985 rm -f conftest.er1
14986 cat conftest.err >&5
c0d27fcc 14987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14988 (exit $ac_status); } && {
14989 test -z "$ac_c_werror_flag" ||
14990 test ! -s conftest.err
14991 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14992 ac_header_compiler=yes
14993else
14994 echo "$as_me: failed program was:" >&5
19650fd6
AS
14995sed 's/^/| /' conftest.$ac_ext >&5
14996
ca81d7a0 14997 ac_header_compiler=no
c0d27fcc 14998fi
ca81d7a0
JD
14999
15000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15001{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15002echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15003
15004# Is the header present?
ca81d7a0
JD
15005{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15006echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15007cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15008/* confdefs.h. */
15009_ACEOF
15010cat confdefs.h >>conftest.$ac_ext
15011cat >>conftest.$ac_ext <<_ACEOF
15012/* end confdefs.h. */
98418dba
CW
15013#include <X11/SM/SMlib.h>
15014_ACEOF
ca81d7a0
JD
15015if { (ac_try="$ac_cpp conftest.$ac_ext"
15016case "(($ac_try" in
15017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15018 *) ac_try_echo=$ac_try;;
15019esac
15020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15021 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15022 ac_status=$?
6bae0ccf 15023 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15024 rm -f conftest.er1
15025 cat conftest.err >&5
c0d27fcc 15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15027 (exit $ac_status); } >/dev/null && {
15028 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15029 test ! -s conftest.err
15030 }; then
c0d27fcc 15031 ac_header_preproc=yes
98418dba
CW
15032else
15033 echo "$as_me: failed program was:" >&5
19650fd6
AS
15034sed 's/^/| /' conftest.$ac_ext >&5
15035
c0d27fcc 15036 ac_header_preproc=no
98418dba 15037fi
ca81d7a0 15038
98418dba 15039rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15040{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15041echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15042
15043# So? What about this header?
edfaf76d
LK
15044case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15045 yes:no: )
c0d27fcc
MR
15046 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15047echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15048 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15049echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15050 ac_header_preproc=yes
19650fd6 15051 ;;
edfaf76d 15052 no:yes:* )
c0d27fcc
MR
15053 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15054echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15055 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15056echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15057 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15058echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15059 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15060echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15061 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15062echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15063 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15064echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15065
19650fd6 15066 ;;
c0d27fcc 15067esac
ca81d7a0
JD
15068{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15069echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15070if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15071 echo $ECHO_N "(cached) $ECHO_C" >&6
15072else
15073 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15074fi
ca81d7a0
JD
15075{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15076echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15077
15078fi
98418dba 15079if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15080 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15081echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15082if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15083 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15084else
503d2be0 15085 ac_check_lib_save_LIBS=$LIBS
1660500f 15086LIBS="-lSM -lICE $LIBS"
503d2be0 15087cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15088/* confdefs.h. */
15089_ACEOF
15090cat confdefs.h >>conftest.$ac_ext
15091cat >>conftest.$ac_ext <<_ACEOF
15092/* end confdefs.h. */
503d2be0 15093
ca81d7a0
JD
15094/* Override any GCC internal prototype to avoid an error.
15095 Use char because int might match the return type of a GCC
15096 builtin and then its argument prototype would still apply. */
503d2be0
AS
15097#ifdef __cplusplus
15098extern "C"
15099#endif
98418dba 15100char SmcOpenConnection ();
503d2be0
AS
15101int
15102main ()
15103{
ca81d7a0 15104return SmcOpenConnection ();
503d2be0
AS
15105 ;
15106 return 0;
15107}
15108_ACEOF
15109rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15110if { (ac_try="$ac_link"
15111case "(($ac_try" in
15112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15113 *) ac_try_echo=$ac_try;;
15114esac
15115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15116 (eval "$ac_link") 2>conftest.er1
503d2be0 15117 ac_status=$?
edfaf76d
LK
15118 grep -v '^ *+' conftest.er1 >conftest.err
15119 rm -f conftest.er1
15120 cat conftest.err >&5
c0d27fcc 15121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15122 (exit $ac_status); } && {
15123 test -z "$ac_c_werror_flag" ||
15124 test ! -s conftest.err
15125 } && test -s conftest$ac_exeext &&
15126 $as_test_x conftest$ac_exeext; then
98418dba 15127 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15128else
15129 echo "$as_me: failed program was:" >&5
19650fd6
AS
15130sed 's/^/| /' conftest.$ac_ext >&5
15131
ca81d7a0 15132 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15133fi
ca81d7a0 15134
f053c89f 15135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15136 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15137LIBS=$ac_check_lib_save_LIBS
15138fi
ca81d7a0
JD
15139{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15140echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15141if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15142 HAVE_X_SM=yes
73b77ee5
GM
15143fi
15144
73b77ee5 15145fi
73b77ee5 15146
c0d27fcc
MR
15147
15148
98418dba 15149 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15150
c0d27fcc 15151cat >>confdefs.h <<\_ACEOF
98418dba 15152#define HAVE_X_SM 1
c0d27fcc 15153_ACEOF
73b77ee5 15154
98418dba
CW
15155 case "$LIBS" in
15156 *-lSM*) ;;
15157 *) LIBS="-lSM -lICE $LIBS" ;;
15158 esac
73b77ee5 15159 fi
98418dba 15160fi
73b77ee5 15161
98418dba 15162# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15163{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15164echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15165if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15166 echo $ECHO_N "(cached) $ECHO_C" >&6
15167else
15168 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15169/* confdefs.h. */
15170_ACEOF
15171cat confdefs.h >>conftest.$ac_ext
15172cat >>conftest.$ac_ext <<_ACEOF
15173/* end confdefs.h. */
98418dba 15174#include <netdb.h>
503d2be0
AS
15175int
15176main ()
15177{
98418dba 15178return h_errno;
503d2be0
AS
15179 ;
15180 return 0;
15181}
15182_ACEOF
15183rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15184if { (ac_try="$ac_link"
15185case "(($ac_try" in
15186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15187 *) ac_try_echo=$ac_try;;
15188esac
15189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15190 (eval "$ac_link") 2>conftest.er1
503d2be0 15191 ac_status=$?
edfaf76d
LK
15192 grep -v '^ *+' conftest.er1 >conftest.err
15193 rm -f conftest.er1
15194 cat conftest.err >&5
c0d27fcc 15195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15196 (exit $ac_status); } && {
15197 test -z "$ac_c_werror_flag" ||
15198 test ! -s conftest.err
15199 } && test -s conftest$ac_exeext &&
15200 $as_test_x conftest$ac_exeext; then
98418dba 15201 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15202else
503d2be0 15203 echo "$as_me: failed program was:" >&5
19650fd6
AS
15204sed 's/^/| /' conftest.$ac_ext >&5
15205
ca81d7a0 15206 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15207fi
ca81d7a0 15208
f053c89f 15209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15210 conftest$ac_exeext conftest.$ac_ext
98418dba 15211fi
ca81d7a0
JD
15212{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15213echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15214if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15215
c0d27fcc 15216cat >>confdefs.h <<\_ACEOF
98418dba 15217#define HAVE_H_ERRNO 1
c0d27fcc 15218_ACEOF
73b77ee5 15219
98418dba
CW
15220fi
15221
15222# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15223# for constant arguments. Useless!
ca81d7a0
JD
15224{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15225echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15226if test "${ac_cv_working_alloca_h+set}" = set; then
15227 echo $ECHO_N "(cached) $ECHO_C" >&6
15228else
15229 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15230/* confdefs.h. */
15231_ACEOF
15232cat confdefs.h >>conftest.$ac_ext
15233cat >>conftest.$ac_ext <<_ACEOF
15234/* end confdefs.h. */
98418dba 15235#include <alloca.h>
503d2be0
AS
15236int
15237main ()
15238{
98418dba 15239char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15240 if (p) return 0;
503d2be0
AS
15241 ;
15242 return 0;
15243}
15244_ACEOF
15245rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15246if { (ac_try="$ac_link"
15247case "(($ac_try" in
15248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15249 *) ac_try_echo=$ac_try;;
15250esac
15251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15252 (eval "$ac_link") 2>conftest.er1
503d2be0 15253 ac_status=$?
edfaf76d
LK
15254 grep -v '^ *+' conftest.er1 >conftest.err
15255 rm -f conftest.er1
15256 cat conftest.err >&5
c0d27fcc 15257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15258 (exit $ac_status); } && {
15259 test -z "$ac_c_werror_flag" ||
15260 test ! -s conftest.err
15261 } && test -s conftest$ac_exeext &&
15262 $as_test_x conftest$ac_exeext; then
98418dba 15263 ac_cv_working_alloca_h=yes
73b77ee5 15264else
503d2be0 15265 echo "$as_me: failed program was:" >&5
19650fd6
AS
15266sed 's/^/| /' conftest.$ac_ext >&5
15267
ca81d7a0 15268 ac_cv_working_alloca_h=no
73b77ee5 15269fi
ca81d7a0 15270
f053c89f 15271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15272 conftest$ac_exeext conftest.$ac_ext
98418dba 15273fi
ca81d7a0
JD
15274{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15275echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15276if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15277
c0d27fcc 15278cat >>confdefs.h <<\_ACEOF
98418dba 15279#define HAVE_ALLOCA_H 1
c0d27fcc 15280_ACEOF
98418dba
CW
15281
15282fi
15283
ca81d7a0
JD
15284{ echo "$as_me:$LINENO: checking for alloca" >&5
15285echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15286if test "${ac_cv_func_alloca_works+set}" = set; then
15287 echo $ECHO_N "(cached) $ECHO_C" >&6
15288else
503d2be0 15289 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15290/* confdefs.h. */
15291_ACEOF
15292cat confdefs.h >>conftest.$ac_ext
15293cat >>conftest.$ac_ext <<_ACEOF
15294/* end confdefs.h. */
98418dba
CW
15295#ifdef __GNUC__
15296# define alloca __builtin_alloca
15297#else
15298# ifdef _MSC_VER
15299# include <malloc.h>
15300# define alloca _alloca
15301# else
f053c89f 15302# ifdef HAVE_ALLOCA_H
98418dba
CW
15303# include <alloca.h>
15304# else
15305# ifdef _AIX
15306 #pragma alloca
15307# else
15308# ifndef alloca /* predefined by HP cc +Olibcalls */
15309char *alloca ();
15310# endif
15311# endif
15312# endif
15313# endif
15314#endif
15315
503d2be0
AS
15316int
15317main ()
15318{
98418dba 15319char *p = (char *) alloca (1);
ca81d7a0 15320 if (p) return 0;
503d2be0
AS
15321 ;
15322 return 0;
15323}
15324_ACEOF
15325rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15326if { (ac_try="$ac_link"
15327case "(($ac_try" in
15328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15329 *) ac_try_echo=$ac_try;;
15330esac
15331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15332 (eval "$ac_link") 2>conftest.er1
503d2be0 15333 ac_status=$?
edfaf76d
LK
15334 grep -v '^ *+' conftest.er1 >conftest.err
15335 rm -f conftest.er1
15336 cat conftest.err >&5
c0d27fcc 15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15338 (exit $ac_status); } && {
15339 test -z "$ac_c_werror_flag" ||
15340 test ! -s conftest.err
15341 } && test -s conftest$ac_exeext &&
15342 $as_test_x conftest$ac_exeext; then
98418dba 15343 ac_cv_func_alloca_works=yes
ac95a621 15344else
503d2be0 15345 echo "$as_me: failed program was:" >&5
19650fd6
AS
15346sed 's/^/| /' conftest.$ac_ext >&5
15347
ca81d7a0 15348 ac_cv_func_alloca_works=no
ac95a621 15349fi
ca81d7a0 15350
f053c89f 15351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15352 conftest$ac_exeext conftest.$ac_ext
98418dba 15353fi
ca81d7a0
JD
15354{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15355echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15356
98418dba
CW
15357if test $ac_cv_func_alloca_works = yes; then
15358
c0d27fcc 15359cat >>confdefs.h <<\_ACEOF
98418dba 15360#define HAVE_ALLOCA 1
c0d27fcc 15361_ACEOF
98418dba
CW
15362
15363else
15364 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15365# that cause trouble. Some versions do not even contain alloca or
15366# contain a buggy version. If you still want to use their alloca,
15367# use ar to extract alloca.o from them instead of compiling alloca.c.
15368
ca81d7a0 15369ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15370
c0d27fcc 15371cat >>confdefs.h <<\_ACEOF
98418dba 15372#define C_ALLOCA 1
c0d27fcc 15373_ACEOF
98418dba 15374
c0d27fcc 15375
ca81d7a0
JD
15376{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15377echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15378if test "${ac_cv_os_cray+set}" = set; then
15379 echo $ECHO_N "(cached) $ECHO_C" >&6
15380else
15381 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15382/* confdefs.h. */
15383_ACEOF
15384cat confdefs.h >>conftest.$ac_ext
15385cat >>conftest.$ac_ext <<_ACEOF
15386/* end confdefs.h. */
ca81d7a0 15387#if defined CRAY && ! defined CRAY2
98418dba
CW
15388webecray
15389#else
15390wenotbecray
15391#endif
15392
15393_ACEOF
15394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15395 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15396 ac_cv_os_cray=yes
15397else
15398 ac_cv_os_cray=no
15399fi
15400rm -f conftest*
ac95a621 15401
98418dba 15402fi
ca81d7a0
JD
15403{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15404echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15405if test $ac_cv_os_cray = yes; then
15406 for ac_func in _getb67 GETB67 getb67; do
15407 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15408{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15409echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15410if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15411 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15412else
503d2be0 15413 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15414/* confdefs.h. */
15415_ACEOF
15416cat confdefs.h >>conftest.$ac_ext
15417cat >>conftest.$ac_ext <<_ACEOF
15418/* end confdefs.h. */
edfaf76d
LK
15419/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15420 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15421#define $ac_func innocuous_$ac_func
15422
73b77ee5 15423/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15424 which can conflict with char $ac_func (); below.
15425 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15426 <limits.h> exists even on freestanding compilers. */
edfaf76d 15427
19650fd6
AS
15428#ifdef __STDC__
15429# include <limits.h>
15430#else
15431# include <assert.h>
15432#endif
edfaf76d
LK
15433
15434#undef $ac_func
15435
ca81d7a0
JD
15436/* Override any GCC internal prototype to avoid an error.
15437 Use char because int might match the return type of a GCC
15438 builtin and then its argument prototype would still apply. */
503d2be0
AS
15439#ifdef __cplusplus
15440extern "C"
15441#endif
503d2be0 15442char $ac_func ();
73b77ee5
GM
15443/* The GNU C library defines this for functions which it implements
15444 to always fail with ENOSYS. Some functions are actually named
15445 something starting with __ and the normal name is an alias. */
ca81d7a0 15446#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15447choke me
73b77ee5
GM
15448#endif
15449
19650fd6
AS
15450int
15451main ()
15452{
ca81d7a0 15453return $ac_func ();
503d2be0
AS
15454 ;
15455 return 0;
15456}
15457_ACEOF
15458rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15459if { (ac_try="$ac_link"
15460case "(($ac_try" in
15461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15462 *) ac_try_echo=$ac_try;;
15463esac
15464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15465 (eval "$ac_link") 2>conftest.er1
503d2be0 15466 ac_status=$?
edfaf76d
LK
15467 grep -v '^ *+' conftest.er1 >conftest.err
15468 rm -f conftest.er1
15469 cat conftest.err >&5
c0d27fcc 15470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15471 (exit $ac_status); } && {
15472 test -z "$ac_c_werror_flag" ||
15473 test ! -s conftest.err
15474 } && test -s conftest$ac_exeext &&
15475 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15476 eval "$as_ac_var=yes"
15477else
15478 echo "$as_me: failed program was:" >&5
19650fd6
AS
15479sed 's/^/| /' conftest.$ac_ext >&5
15480
ca81d7a0 15481 eval "$as_ac_var=no"
503d2be0 15482fi
ca81d7a0 15483
f053c89f 15484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15485 conftest$ac_exeext conftest.$ac_ext
503d2be0 15486fi
ca81d7a0
JD
15487ac_res=`eval echo '${'$as_ac_var'}'`
15488 { echo "$as_me:$LINENO: result: $ac_res" >&5
15489echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15490if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15491
c0d27fcc 15492cat >>confdefs.h <<_ACEOF
98418dba 15493#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15494_ACEOF
98418dba
CW
15495
15496 break
73b77ee5 15497fi
73b77ee5 15498
98418dba 15499 done
73b77ee5
GM
15500fi
15501
ca81d7a0
JD
15502{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15503echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15504if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15505 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15506else
15507 if test "$cross_compiling" = yes; then
15508 ac_cv_c_stack_direction=0
73b77ee5 15509else
503d2be0 15510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15511/* confdefs.h. */
15512_ACEOF
15513cat confdefs.h >>conftest.$ac_ext
15514cat >>conftest.$ac_ext <<_ACEOF
15515/* end confdefs.h. */
ca81d7a0 15516$ac_includes_default
503d2be0 15517int
98418dba 15518find_stack_direction ()
503d2be0 15519{
98418dba
CW
15520 static char *addr = 0;
15521 auto char dummy;
15522 if (addr == 0)
15523 {
15524 addr = &dummy;
15525 return find_stack_direction ();
15526 }
73b77ee5 15527 else
98418dba
CW
15528 return (&dummy > addr) ? 1 : -1;
15529}
ba4481b5 15530
503d2be0
AS
15531int
15532main ()
15533{
ca81d7a0 15534 return find_stack_direction () < 0;
503d2be0
AS
15535}
15536_ACEOF
98418dba 15537rm -f conftest$ac_exeext
ca81d7a0
JD
15538if { (ac_try="$ac_link"
15539case "(($ac_try" in
15540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15541 *) ac_try_echo=$ac_try;;
15542esac
15543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15544 (eval "$ac_link") 2>&5
503d2be0 15545 ac_status=$?
c0d27fcc 15546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15548 { (case "(($ac_try" in
15549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15550 *) ac_try_echo=$ac_try;;
15551esac
15552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15553 (eval "$ac_try") 2>&5
503d2be0 15554 ac_status=$?
c0d27fcc 15555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15556 (exit $ac_status); }; }; then
98418dba 15557 ac_cv_c_stack_direction=1
ba4481b5 15558else
98418dba
CW
15559 echo "$as_me: program exited with status $ac_status" >&5
15560echo "$as_me: failed program was:" >&5
19650fd6
AS
15561sed 's/^/| /' conftest.$ac_ext >&5
15562
c0d27fcc 15563( exit $ac_status )
98418dba 15564ac_cv_c_stack_direction=-1
ba4481b5 15565fi
ca81d7a0 15566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15567fi
ca81d7a0
JD
15568
15569
98418dba 15570fi
ca81d7a0
JD
15571{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15572echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15573
c0d27fcc 15574cat >>confdefs.h <<_ACEOF
98418dba 15575#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15576_ACEOF
15577
ba4481b5 15578
ba4481b5
DL
15579fi
15580
c0d27fcc 15581
611adb3e
GM
15582if test x"$ac_cv_func_alloca_works" != xyes; then
15583 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15584echo "$as_me: error: a system implementation of alloca is required " >&2;}
15585 { (exit 1); exit 1; }; }
15586fi
15587
98418dba
CW
15588# fmod, logb, and frexp are found in -lm on most systems.
15589# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15590
ca81d7a0
JD
15591{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15592echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15593if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15594 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15595else
98418dba
CW
15596 ac_check_lib_save_LIBS=$LIBS
15597LIBS="-lm $LIBS"
15598cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15599/* confdefs.h. */
15600_ACEOF
15601cat confdefs.h >>conftest.$ac_ext
15602cat >>conftest.$ac_ext <<_ACEOF
15603/* end confdefs.h. */
ba4481b5 15604
ca81d7a0
JD
15605/* Override any GCC internal prototype to avoid an error.
15606 Use char because int might match the return type of a GCC
15607 builtin and then its argument prototype would still apply. */
98418dba
CW
15608#ifdef __cplusplus
15609extern "C"
15610#endif
98418dba 15611char sqrt ();
503d2be0
AS
15612int
15613main ()
15614{
ca81d7a0 15615return sqrt ();
503d2be0
AS
15616 ;
15617 return 0;
15618}
15619_ACEOF
15620rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15621if { (ac_try="$ac_link"
15622case "(($ac_try" in
15623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15624 *) ac_try_echo=$ac_try;;
15625esac
15626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15627 (eval "$ac_link") 2>conftest.er1
503d2be0 15628 ac_status=$?
edfaf76d
LK
15629 grep -v '^ *+' conftest.er1 >conftest.err
15630 rm -f conftest.er1
15631 cat conftest.err >&5
c0d27fcc 15632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15633 (exit $ac_status); } && {
15634 test -z "$ac_c_werror_flag" ||
15635 test ! -s conftest.err
15636 } && test -s conftest$ac_exeext &&
15637 $as_test_x conftest$ac_exeext; then
98418dba 15638 ac_cv_lib_m_sqrt=yes
ba4481b5 15639else
503d2be0 15640 echo "$as_me: failed program was:" >&5
19650fd6
AS
15641sed 's/^/| /' conftest.$ac_ext >&5
15642
ca81d7a0 15643 ac_cv_lib_m_sqrt=no
ba4481b5 15644fi
ca81d7a0 15645
f053c89f 15646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15647 conftest$ac_exeext conftest.$ac_ext
98418dba 15648LIBS=$ac_check_lib_save_LIBS
ba4481b5 15649fi
ca81d7a0
JD
15650{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15651echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15652if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15653 cat >>confdefs.h <<_ACEOF
98418dba 15654#define HAVE_LIBM 1
c0d27fcc 15655_ACEOF
98418dba
CW
15656
15657 LIBS="-lm $LIBS"
ba4481b5 15658
ba4481b5
DL
15659fi
15660
c0d27fcc 15661
55597d70
DL
15662# Check for mail-locking functions in a "mail" library. Probably this should
15663# have the same check as for liblockfile below.
98418dba 15664
ca81d7a0
JD
15665{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15666echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15667if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15668 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15669else
98418dba
CW
15670 ac_check_lib_save_LIBS=$LIBS
15671LIBS="-lmail $LIBS"
15672cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15673/* confdefs.h. */
15674_ACEOF
15675cat confdefs.h >>conftest.$ac_ext
15676cat >>conftest.$ac_ext <<_ACEOF
15677/* end confdefs.h. */
98418dba 15678
ca81d7a0
JD
15679/* Override any GCC internal prototype to avoid an error.
15680 Use char because int might match the return type of a GCC
15681 builtin and then its argument prototype would still apply. */
98418dba
CW
15682#ifdef __cplusplus
15683extern "C"
15684#endif
98418dba 15685char maillock ();
503d2be0
AS
15686int
15687main ()
15688{
ca81d7a0 15689return maillock ();
503d2be0
AS
15690 ;
15691 return 0;
15692}
15693_ACEOF
15694rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15695if { (ac_try="$ac_link"
15696case "(($ac_try" in
15697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15698 *) ac_try_echo=$ac_try;;
15699esac
15700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15701 (eval "$ac_link") 2>conftest.er1
503d2be0 15702 ac_status=$?
edfaf76d
LK
15703 grep -v '^ *+' conftest.er1 >conftest.err
15704 rm -f conftest.er1
15705 cat conftest.err >&5
c0d27fcc 15706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15707 (exit $ac_status); } && {
15708 test -z "$ac_c_werror_flag" ||
15709 test ! -s conftest.err
15710 } && test -s conftest$ac_exeext &&
15711 $as_test_x conftest$ac_exeext; then
98418dba 15712 ac_cv_lib_mail_maillock=yes
ba4481b5 15713else
503d2be0 15714 echo "$as_me: failed program was:" >&5
19650fd6
AS
15715sed 's/^/| /' conftest.$ac_ext >&5
15716
ca81d7a0 15717 ac_cv_lib_mail_maillock=no
ba4481b5 15718fi
ca81d7a0 15719
f053c89f 15720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15721 conftest$ac_exeext conftest.$ac_ext
98418dba 15722LIBS=$ac_check_lib_save_LIBS
ba4481b5 15723fi
ca81d7a0
JD
15724{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15725echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15726if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15727 cat >>confdefs.h <<_ACEOF
98418dba 15728#define HAVE_LIBMAIL 1
c0d27fcc 15729_ACEOF
ba4481b5 15730
98418dba 15731 LIBS="-lmail $LIBS"
ba4481b5 15732
98418dba 15733fi
ba4481b5 15734
c0d27fcc 15735
ca81d7a0
JD
15736{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15737echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15738if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15739 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15740else
503d2be0 15741 ac_check_lib_save_LIBS=$LIBS
98418dba 15742LIBS="-llockfile $LIBS"
503d2be0 15743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15744/* confdefs.h. */
15745_ACEOF
15746cat confdefs.h >>conftest.$ac_ext
15747cat >>conftest.$ac_ext <<_ACEOF
15748/* end confdefs.h. */
503d2be0 15749
ca81d7a0
JD
15750/* Override any GCC internal prototype to avoid an error.
15751 Use char because int might match the return type of a GCC
15752 builtin and then its argument prototype would still apply. */
503d2be0
AS
15753#ifdef __cplusplus
15754extern "C"
15755#endif
98418dba 15756char maillock ();
503d2be0
AS
15757int
15758main ()
15759{
ca81d7a0 15760return maillock ();
503d2be0
AS
15761 ;
15762 return 0;
15763}
15764_ACEOF
15765rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15766if { (ac_try="$ac_link"
15767case "(($ac_try" in
15768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15769 *) ac_try_echo=$ac_try;;
15770esac
15771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15772 (eval "$ac_link") 2>conftest.er1
503d2be0 15773 ac_status=$?
edfaf76d
LK
15774 grep -v '^ *+' conftest.er1 >conftest.err
15775 rm -f conftest.er1
15776 cat conftest.err >&5
c0d27fcc 15777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15778 (exit $ac_status); } && {
15779 test -z "$ac_c_werror_flag" ||
15780 test ! -s conftest.err
15781 } && test -s conftest$ac_exeext &&
15782 $as_test_x conftest$ac_exeext; then
98418dba 15783 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15784else
15785 echo "$as_me: failed program was:" >&5
19650fd6
AS
15786sed 's/^/| /' conftest.$ac_ext >&5
15787
ca81d7a0 15788 ac_cv_lib_lockfile_maillock=no
98418dba 15789fi
ca81d7a0 15790
f053c89f 15791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15792 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15793LIBS=$ac_check_lib_save_LIBS
15794fi
ca81d7a0
JD
15795{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15796echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15797if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15798 cat >>confdefs.h <<_ACEOF
98418dba 15799#define HAVE_LIBLOCKFILE 1
c0d27fcc 15800_ACEOF
98418dba
CW
15801
15802 LIBS="-llockfile $LIBS"
15803
15804fi
15805
15806# If we have the shared liblockfile, assume we must use it for mail
15807# locking (e.g. Debian). If we couldn't link against liblockfile
15808# (no liblockfile.a installed), ensure that we don't need to.
15809if test "$ac_cv_lib_lockfile_maillock" = no; then
15810 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15811set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15812{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15813echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15814if test "${ac_cv_prog_liblockfile+set}" = set; then
15815 echo $ECHO_N "(cached) $ECHO_C" >&6
15816else
15817 if test -n "$liblockfile"; then
15818 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15819else
c0d27fcc 15820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15821as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15822for as_dir in $as_dummy
c0d27fcc
MR
15823do
15824 IFS=$as_save_IFS
15825 test -z "$as_dir" && as_dir=.
15826 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15828 ac_cv_prog_liblockfile="yes"
15829 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15830 break 2
15831 fi
15832done
98418dba 15833done
ca81d7a0 15834IFS=$as_save_IFS
98418dba
CW
15835
15836 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15837fi
503d2be0 15838fi
98418dba
CW
15839liblockfile=$ac_cv_prog_liblockfile
15840if test -n "$liblockfile"; then
ca81d7a0
JD
15841 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15842echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15843else
ca81d7a0
JD
15844 { echo "$as_me:$LINENO: result: no" >&5
15845echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15846fi
15847
ca81d7a0 15848
98418dba 15849 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15850 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15851This probably means that movemail could lose mail.
15852There may be a \`development' package to install containing liblockfile." >&5
15853echo "$as_me: error: Shared liblockfile found but can't link against it.
15854This probably means that movemail could lose mail.
15855There may be a \`development' package to install containing liblockfile." >&2;}
15856 { (exit 1); exit 1; }; }
98418dba 15857 else :
55597d70 15858 fi
98418dba 15859fi
503d2be0 15860
98418dba
CW
15861for ac_func in touchlock
15862do
15863as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15864{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15865echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15866if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15867 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15868else
98418dba 15869 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15870/* confdefs.h. */
15871_ACEOF
15872cat confdefs.h >>conftest.$ac_ext
15873cat >>conftest.$ac_ext <<_ACEOF
15874/* end confdefs.h. */
edfaf76d
LK
15875/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15876 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15877#define $ac_func innocuous_$ac_func
15878
98418dba 15879/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15880 which can conflict with char $ac_func (); below.
15881 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15882 <limits.h> exists even on freestanding compilers. */
edfaf76d 15883
19650fd6
AS
15884#ifdef __STDC__
15885# include <limits.h>
15886#else
15887# include <assert.h>
15888#endif
edfaf76d
LK
15889
15890#undef $ac_func
15891
ca81d7a0
JD
15892/* Override any GCC internal prototype to avoid an error.
15893 Use char because int might match the return type of a GCC
15894 builtin and then its argument prototype would still apply. */
503d2be0
AS
15895#ifdef __cplusplus
15896extern "C"
15897#endif
98418dba 15898char $ac_func ();
98418dba
CW
15899/* The GNU C library defines this for functions which it implements
15900 to always fail with ENOSYS. Some functions are actually named
15901 something starting with __ and the normal name is an alias. */
ca81d7a0 15902#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15903choke me
cd958eb3
MB
15904#endif
15905
19650fd6
AS
15906int
15907main ()
15908{
ca81d7a0 15909return $ac_func ();
503d2be0
AS
15910 ;
15911 return 0;
15912}
15913_ACEOF
15914rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15915if { (ac_try="$ac_link"
15916case "(($ac_try" in
15917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15918 *) ac_try_echo=$ac_try;;
15919esac
15920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15921 (eval "$ac_link") 2>conftest.er1
503d2be0 15922 ac_status=$?
edfaf76d
LK
15923 grep -v '^ *+' conftest.er1 >conftest.err
15924 rm -f conftest.er1
15925 cat conftest.err >&5
c0d27fcc 15926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15927 (exit $ac_status); } && {
15928 test -z "$ac_c_werror_flag" ||
15929 test ! -s conftest.err
15930 } && test -s conftest$ac_exeext &&
15931 $as_test_x conftest$ac_exeext; then
98418dba 15932 eval "$as_ac_var=yes"
503d2be0
AS
15933else
15934 echo "$as_me: failed program was:" >&5
19650fd6
AS
15935sed 's/^/| /' conftest.$ac_ext >&5
15936
ca81d7a0 15937 eval "$as_ac_var=no"
503d2be0 15938fi
ca81d7a0 15939
f053c89f 15940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15941 conftest$ac_exeext conftest.$ac_ext
503d2be0 15942fi
ca81d7a0
JD
15943ac_res=`eval echo '${'$as_ac_var'}'`
15944 { echo "$as_me:$LINENO: result: $ac_res" >&5
15945echo "${ECHO_T}$ac_res" >&6; }
98418dba 15946if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15947 cat >>confdefs.h <<_ACEOF
98418dba 15948#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15949_ACEOF
457b792c 15950
457b792c 15951fi
98418dba 15952done
457b792c 15953
c0d27fcc 15954
98418dba
CW
15955for ac_header in maillock.h
15956do
15957as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15958if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15959 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15960echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15961if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15962 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15963fi
ca81d7a0
JD
15964ac_res=`eval echo '${'$as_ac_Header'}'`
15965 { echo "$as_me:$LINENO: result: $ac_res" >&5
15966echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15967else
c0d27fcc 15968 # Is the header compilable?
ca81d7a0
JD
15969{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15970echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
c0d27fcc
MR
15977$ac_includes_default
15978#include <$ac_header>
15979_ACEOF
15980rm -f conftest.$ac_objext
ca81d7a0
JD
15981if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
c0d27fcc 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_objext; then
c0d27fcc
MR
15997 ac_header_compiler=yes
15998else
15999 echo "$as_me: failed program was:" >&5
19650fd6
AS
16000sed 's/^/| /' conftest.$ac_ext >&5
16001
ca81d7a0 16002 ac_header_compiler=no
c0d27fcc 16003fi
ca81d7a0
JD
16004
16005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16006{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16007echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16008
16009# Is the header present?
ca81d7a0
JD
16010{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16011echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16013/* confdefs.h. */
16014_ACEOF
16015cat confdefs.h >>conftest.$ac_ext
16016cat >>conftest.$ac_ext <<_ACEOF
16017/* end confdefs.h. */
98418dba 16018#include <$ac_header>
503d2be0 16019_ACEOF
ca81d7a0
JD
16020if { (ac_try="$ac_cpp conftest.$ac_ext"
16021case "(($ac_try" in
16022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16023 *) ac_try_echo=$ac_try;;
16024esac
16025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16026 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16027 ac_status=$?
6bae0ccf 16028 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16029 rm -f conftest.er1
16030 cat conftest.err >&5
c0d27fcc 16031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16032 (exit $ac_status); } >/dev/null && {
16033 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16034 test ! -s conftest.err
16035 }; then
c0d27fcc 16036 ac_header_preproc=yes
98418dba
CW
16037else
16038 echo "$as_me: failed program was:" >&5
19650fd6
AS
16039sed 's/^/| /' conftest.$ac_ext >&5
16040
c0d27fcc 16041 ac_header_preproc=no
503d2be0 16042fi
ca81d7a0 16043
98418dba 16044rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16045{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16046echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16047
16048# So? What about this header?
edfaf76d
LK
16049case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16050 yes:no: )
c0d27fcc
MR
16051 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16052echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16053 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16054echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16055 ac_header_preproc=yes
19650fd6 16056 ;;
edfaf76d 16057 no:yes:* )
c0d27fcc
MR
16058 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16059echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16060 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16061echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16062 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16063echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16064 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16065echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16066 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16067echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16068 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16069echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16070
19650fd6 16071 ;;
c0d27fcc 16072esac
ca81d7a0
JD
16073{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16075if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16076 echo $ECHO_N "(cached) $ECHO_C" >&6
16077else
edfaf76d 16078 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16079fi
ca81d7a0
JD
16080ac_res=`eval echo '${'$as_ac_Header'}'`
16081 { echo "$as_me:$LINENO: result: $ac_res" >&5
16082echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16083
16084fi
98418dba 16085if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16086 cat >>confdefs.h <<_ACEOF
98418dba 16087#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16088_ACEOF
48d4b120 16089
ba4481b5 16090fi
c0d27fcc 16091
98418dba
CW
16092done
16093
c0d27fcc
MR
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
22044edf
DL
16149
16150
c0d27fcc 16151
b0e44248
RB
16152
16153
973a76b1
DL
16154
16155
16156
cd958eb3 16157
25ca0bca 16158
ea92fc9f 16159
2d3c36ae
SM
16160
16161
e2fcf543 16162
5acf240e 16163
c0d27fcc
MR
16164
16165
98418dba 16166for ac_func in gethostname getdomainname dup2 \
e2fcf543 16167rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16168random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16169strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16170utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16171__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16172sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16173gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16174memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16175cfmakeraw cfsetspeed
98418dba
CW
16176do
16177as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16178{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16179echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16180if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16181 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16182else
503d2be0 16183 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16184/* confdefs.h. */
16185_ACEOF
16186cat confdefs.h >>conftest.$ac_ext
16187cat >>conftest.$ac_ext <<_ACEOF
16188/* end confdefs.h. */
edfaf76d
LK
16189/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16191#define $ac_func innocuous_$ac_func
16192
98418dba 16193/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16194 which can conflict with char $ac_func (); below.
16195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16196 <limits.h> exists even on freestanding compilers. */
edfaf76d 16197
19650fd6
AS
16198#ifdef __STDC__
16199# include <limits.h>
16200#else
16201# include <assert.h>
16202#endif
edfaf76d
LK
16203
16204#undef $ac_func
16205
ca81d7a0
JD
16206/* Override any GCC internal prototype to avoid an error.
16207 Use char because int might match the return type of a GCC
16208 builtin and then its argument prototype would still apply. */
503d2be0
AS
16209#ifdef __cplusplus
16210extern "C"
16211#endif
98418dba 16212char $ac_func ();
98418dba
CW
16213/* The GNU C library defines this for functions which it implements
16214 to always fail with ENOSYS. Some functions are actually named
16215 something starting with __ and the normal name is an alias. */
ca81d7a0 16216#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16217choke me
98418dba
CW
16218#endif
16219
19650fd6
AS
16220int
16221main ()
16222{
ca81d7a0 16223return $ac_func ();
503d2be0
AS
16224 ;
16225 return 0;
16226}
16227_ACEOF
16228rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16229if { (ac_try="$ac_link"
16230case "(($ac_try" in
16231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16232 *) ac_try_echo=$ac_try;;
16233esac
16234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16235 (eval "$ac_link") 2>conftest.er1
503d2be0 16236 ac_status=$?
edfaf76d
LK
16237 grep -v '^ *+' conftest.er1 >conftest.err
16238 rm -f conftest.er1
16239 cat conftest.err >&5
c0d27fcc 16240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16241 (exit $ac_status); } && {
16242 test -z "$ac_c_werror_flag" ||
16243 test ! -s conftest.err
16244 } && test -s conftest$ac_exeext &&
16245 $as_test_x conftest$ac_exeext; then
98418dba 16246 eval "$as_ac_var=yes"
503d2be0
AS
16247else
16248 echo "$as_me: failed program was:" >&5
19650fd6
AS
16249sed 's/^/| /' conftest.$ac_ext >&5
16250
ca81d7a0 16251 eval "$as_ac_var=no"
503d2be0 16252fi
ca81d7a0 16253
f053c89f 16254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16255 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16256fi
ca81d7a0
JD
16257ac_res=`eval echo '${'$as_ac_var'}'`
16258 { echo "$as_me:$LINENO: result: $ac_res" >&5
16259echo "${ECHO_T}$ac_res" >&6; }
98418dba 16260if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16261 cat >>confdefs.h <<_ACEOF
98418dba 16262#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16263_ACEOF
ba4481b5 16264
ba4481b5 16265fi
98418dba 16266done
ba4481b5 16267
c0d27fcc
MR
16268
16269
98418dba
CW
16270for ac_header in sys/un.h
16271do
16272as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16273if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16274 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16275echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16276if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16277 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16278fi
ca81d7a0
JD
16279ac_res=`eval echo '${'$as_ac_Header'}'`
16280 { echo "$as_me:$LINENO: result: $ac_res" >&5
16281echo "${ECHO_T}$ac_res" >&6; }
98418dba 16282else
c0d27fcc 16283 # Is the header compilable?
ca81d7a0
JD
16284{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16285echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
c0d27fcc
MR
16292$ac_includes_default
16293#include <$ac_header>
16294_ACEOF
16295rm -f conftest.$ac_objext
ca81d7a0
JD
16296if { (ac_try="$ac_compile"
16297case "(($ac_try" in
16298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16299 *) ac_try_echo=$ac_try;;
16300esac
16301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16302 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16303 ac_status=$?
edfaf76d
LK
16304 grep -v '^ *+' conftest.er1 >conftest.err
16305 rm -f conftest.er1
16306 cat conftest.err >&5
c0d27fcc 16307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16308 (exit $ac_status); } && {
16309 test -z "$ac_c_werror_flag" ||
16310 test ! -s conftest.err
16311 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16312 ac_header_compiler=yes
16313else
16314 echo "$as_me: failed program was:" >&5
19650fd6
AS
16315sed 's/^/| /' conftest.$ac_ext >&5
16316
ca81d7a0 16317 ac_header_compiler=no
c0d27fcc 16318fi
ca81d7a0
JD
16319
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16322echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16323
16324# Is the header present?
ca81d7a0
JD
16325{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16326echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16327cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
98418dba 16333#include <$ac_header>
503d2be0 16334_ACEOF
ca81d7a0
JD
16335if { (ac_try="$ac_cpp conftest.$ac_ext"
16336case "(($ac_try" in
16337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16338 *) ac_try_echo=$ac_try;;
16339esac
16340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16341 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16342 ac_status=$?
6bae0ccf 16343 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16344 rm -f conftest.er1
16345 cat conftest.err >&5
c0d27fcc 16346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16347 (exit $ac_status); } >/dev/null && {
16348 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16349 test ! -s conftest.err
16350 }; then
c0d27fcc 16351 ac_header_preproc=yes
ba4481b5 16352else
503d2be0 16353 echo "$as_me: failed program was:" >&5
19650fd6
AS
16354sed 's/^/| /' conftest.$ac_ext >&5
16355
c0d27fcc 16356 ac_header_preproc=no
ba4481b5 16357fi
ca81d7a0 16358
503d2be0 16359rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16360{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16361echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16362
16363# So? What about this header?
edfaf76d
LK
16364case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16365 yes:no: )
c0d27fcc
MR
16366 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16367echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16368 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16369echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16370 ac_header_preproc=yes
19650fd6 16371 ;;
edfaf76d 16372 no:yes:* )
c0d27fcc
MR
16373 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16374echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16375 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16376echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16377 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16378echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16379 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16380echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16381 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16382echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16383 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16384echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16385
19650fd6 16386 ;;
c0d27fcc 16387esac
ca81d7a0
JD
16388{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16389echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16390if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16391 echo $ECHO_N "(cached) $ECHO_C" >&6
16392else
edfaf76d 16393 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16394fi
ca81d7a0
JD
16395ac_res=`eval echo '${'$as_ac_Header'}'`
16396 { echo "$as_me:$LINENO: result: $ac_res" >&5
16397echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16398
16399fi
925c2f3f 16400if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16401 cat >>confdefs.h <<_ACEOF
925c2f3f 16402#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16403_ACEOF
503d2be0 16404
925c2f3f 16405fi
c0d27fcc 16406
925c2f3f
EZ
16407done
16408
c0d27fcc
MR
16409
16410
16411
edfaf76d 16412
f053c89f
CY
16413
16414for ac_header in $ac_header_list
925c2f3f
EZ
16415do
16416as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16417if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16418 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16419echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16420if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16421 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16422fi
ca81d7a0
JD
16423ac_res=`eval echo '${'$as_ac_Header'}'`
16424 { echo "$as_me:$LINENO: result: $ac_res" >&5
16425echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16426else
c0d27fcc 16427 # Is the header compilable?
ca81d7a0
JD
16428{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16429echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16430cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16431/* confdefs.h. */
16432_ACEOF
16433cat confdefs.h >>conftest.$ac_ext
16434cat >>conftest.$ac_ext <<_ACEOF
16435/* end confdefs.h. */
c0d27fcc
MR
16436$ac_includes_default
16437#include <$ac_header>
16438_ACEOF
16439rm -f conftest.$ac_objext
ca81d7a0
JD
16440if { (ac_try="$ac_compile"
16441case "(($ac_try" in
16442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16443 *) ac_try_echo=$ac_try;;
16444esac
16445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16446 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16447 ac_status=$?
edfaf76d
LK
16448 grep -v '^ *+' conftest.er1 >conftest.err
16449 rm -f conftest.er1
16450 cat conftest.err >&5
c0d27fcc 16451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16452 (exit $ac_status); } && {
16453 test -z "$ac_c_werror_flag" ||
16454 test ! -s conftest.err
16455 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16456 ac_header_compiler=yes
16457else
16458 echo "$as_me: failed program was:" >&5
19650fd6
AS
16459sed 's/^/| /' conftest.$ac_ext >&5
16460
ca81d7a0 16461 ac_header_compiler=no
c0d27fcc 16462fi
ca81d7a0
JD
16463
16464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16465{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16466echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16467
16468# Is the header present?
ca81d7a0
JD
16469{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16470echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16471cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16472/* confdefs.h. */
16473_ACEOF
16474cat confdefs.h >>conftest.$ac_ext
16475cat >>conftest.$ac_ext <<_ACEOF
16476/* end confdefs.h. */
98418dba 16477#include <$ac_header>
503d2be0 16478_ACEOF
ca81d7a0
JD
16479if { (ac_try="$ac_cpp conftest.$ac_ext"
16480case "(($ac_try" in
16481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16482 *) ac_try_echo=$ac_try;;
16483esac
16484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16486 ac_status=$?
6bae0ccf 16487 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16488 rm -f conftest.er1
16489 cat conftest.err >&5
c0d27fcc 16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16491 (exit $ac_status); } >/dev/null && {
16492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16493 test ! -s conftest.err
16494 }; then
c0d27fcc 16495 ac_header_preproc=yes
98418dba
CW
16496else
16497 echo "$as_me: failed program was:" >&5
19650fd6
AS
16498sed 's/^/| /' conftest.$ac_ext >&5
16499
c0d27fcc 16500 ac_header_preproc=no
98418dba 16501fi
ca81d7a0 16502
98418dba 16503rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16504{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16505echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16506
16507# So? What about this header?
edfaf76d
LK
16508case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16509 yes:no: )
c0d27fcc
MR
16510 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16511echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16512 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16513echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16514 ac_header_preproc=yes
19650fd6 16515 ;;
edfaf76d 16516 no:yes:* )
c0d27fcc
MR
16517 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16518echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16519 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16520echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16521 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16522echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16523 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16524echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16525 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16526echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16527 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16528echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16529
19650fd6 16530 ;;
c0d27fcc 16531esac
ca81d7a0
JD
16532{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16533echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16534if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16535 echo $ECHO_N "(cached) $ECHO_C" >&6
16536else
edfaf76d 16537 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16538fi
ca81d7a0
JD
16539ac_res=`eval echo '${'$as_ac_Header'}'`
16540 { echo "$as_me:$LINENO: result: $ac_res" >&5
16541echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16542
16543fi
98418dba 16544if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16545 cat >>confdefs.h <<_ACEOF
98418dba 16546#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16547_ACEOF
98418dba
CW
16548
16549fi
c0d27fcc 16550
98418dba
CW
16551done
16552
c0d27fcc 16553
f053c89f
CY
16554
16555
16556
16557
16558
16559
16560
16561for ac_func in $ac_func_list
98418dba
CW
16562do
16563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16564{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16566if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16567 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16568else
98418dba 16569 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16570/* confdefs.h. */
16571_ACEOF
16572cat confdefs.h >>conftest.$ac_ext
16573cat >>conftest.$ac_ext <<_ACEOF
16574/* end confdefs.h. */
edfaf76d
LK
16575/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16576 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16577#define $ac_func innocuous_$ac_func
16578
98418dba 16579/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16580 which can conflict with char $ac_func (); below.
16581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16582 <limits.h> exists even on freestanding compilers. */
edfaf76d 16583
19650fd6
AS
16584#ifdef __STDC__
16585# include <limits.h>
16586#else
16587# include <assert.h>
16588#endif
edfaf76d
LK
16589
16590#undef $ac_func
16591
ca81d7a0
JD
16592/* Override any GCC internal prototype to avoid an error.
16593 Use char because int might match the return type of a GCC
16594 builtin and then its argument prototype would still apply. */
503d2be0
AS
16595#ifdef __cplusplus
16596extern "C"
16597#endif
98418dba 16598char $ac_func ();
98418dba
CW
16599/* The GNU C library defines this for functions which it implements
16600 to always fail with ENOSYS. Some functions are actually named
16601 something starting with __ and the normal name is an alias. */
ca81d7a0 16602#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16603choke me
98418dba
CW
16604#endif
16605
19650fd6
AS
16606int
16607main ()
16608{
ca81d7a0 16609return $ac_func ();
503d2be0
AS
16610 ;
16611 return 0;
16612}
16613_ACEOF
16614rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16615if { (ac_try="$ac_link"
16616case "(($ac_try" in
16617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16618 *) ac_try_echo=$ac_try;;
16619esac
16620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16621 (eval "$ac_link") 2>conftest.er1
503d2be0 16622 ac_status=$?
edfaf76d
LK
16623 grep -v '^ *+' conftest.er1 >conftest.err
16624 rm -f conftest.er1
16625 cat conftest.err >&5
c0d27fcc 16626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16627 (exit $ac_status); } && {
16628 test -z "$ac_c_werror_flag" ||
16629 test ! -s conftest.err
16630 } && test -s conftest$ac_exeext &&
16631 $as_test_x conftest$ac_exeext; then
98418dba 16632 eval "$as_ac_var=yes"
503d2be0
AS
16633else
16634 echo "$as_me: failed program was:" >&5
19650fd6
AS
16635sed 's/^/| /' conftest.$ac_ext >&5
16636
ca81d7a0 16637 eval "$as_ac_var=no"
503d2be0 16638fi
ca81d7a0 16639
f053c89f 16640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16641 conftest$ac_exeext conftest.$ac_ext
ffe36136 16642fi
ca81d7a0
JD
16643ac_res=`eval echo '${'$as_ac_var'}'`
16644 { echo "$as_me:$LINENO: result: $ac_res" >&5
16645echo "${ECHO_T}$ac_res" >&6; }
98418dba 16646if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16647 cat >>confdefs.h <<_ACEOF
98418dba 16648#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16649_ACEOF
ffe36136 16650
ba4481b5 16651fi
98418dba 16652done
ba4481b5 16653
f053c89f
CY
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
ca81d7a0
JD
16670{ echo "$as_me:$LINENO: checking for working mktime" >&5
16671echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16672if test "${ac_cv_func_working_mktime+set}" = set; then
16673 echo $ECHO_N "(cached) $ECHO_C" >&6
16674else
16675 if test "$cross_compiling" = yes; then
16676 ac_cv_func_working_mktime=no
16677else
16678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16679/* confdefs.h. */
16680_ACEOF
16681cat confdefs.h >>conftest.$ac_ext
16682cat >>conftest.$ac_ext <<_ACEOF
16683/* end confdefs.h. */
98418dba 16684/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16685#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16686# include <sys/time.h>
16687# include <time.h>
16688#else
f053c89f 16689# ifdef HAVE_SYS_TIME_H
98418dba
CW
16690# include <sys/time.h>
16691# else
16692# include <time.h>
16693# endif
16694#endif
ba4481b5 16695
8801ee60 16696#include <limits.h>
f053c89f 16697#include <stdlib.h>
edfaf76d 16698
f053c89f 16699#ifdef HAVE_UNISTD_H
98418dba
CW
16700# include <unistd.h>
16701#endif
ba4481b5 16702
f053c89f 16703#ifndef HAVE_ALARM
98418dba
CW
16704# define alarm(X) /* empty */
16705#endif
df645f7c 16706
98418dba
CW
16707/* Work around redefinition to rpl_putenv by other config tests. */
16708#undef putenv
df645f7c 16709
98418dba 16710static time_t time_t_max;
edfaf76d 16711static time_t time_t_min;
df645f7c 16712
98418dba 16713/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16714static char *tz_strings[] = {
16715 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16716 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16717};
16718#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16719
ca81d7a0 16720/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16721 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16722static int
98418dba
CW
16723spring_forward_gap ()
16724{
16725 /* glibc (up to about 1998-10-07) failed this test. */
16726 struct tm tm;
16727
16728 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16729 instead of "TZ=America/Vancouver" in order to detect the bug even
16730 on systems that don't support the Olson extension, or don't have the
16731 full zoneinfo tables installed. */
16732 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16733
16734 tm.tm_year = 98;
16735 tm.tm_mon = 3;
16736 tm.tm_mday = 5;
16737 tm.tm_hour = 2;
16738 tm.tm_min = 0;
16739 tm.tm_sec = 0;
16740 tm.tm_isdst = -1;
ca81d7a0 16741 return mktime (&tm) != (time_t) -1;
98418dba
CW
16742}
16743
ca81d7a0 16744static int
edfaf76d 16745mktime_test1 (now)
98418dba
CW
16746 time_t now;
16747{
16748 struct tm *lt;
ca81d7a0 16749 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16750}
16751
ca81d7a0 16752static int
edfaf76d
LK
16753mktime_test (now)
16754 time_t now;
16755{
ca81d7a0
JD
16756 return (mktime_test1 (now)
16757 && mktime_test1 ((time_t) (time_t_max - now))
16758 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16759}
16760
ca81d7a0 16761static int
98418dba
CW
16762irix_6_4_bug ()
16763{
16764 /* Based on code from Ariel Faigon. */
16765 struct tm tm;
16766 tm.tm_year = 96;
16767 tm.tm_mon = 3;
16768 tm.tm_mday = 0;
16769 tm.tm_hour = 0;
16770 tm.tm_min = 0;
16771 tm.tm_sec = 0;
16772 tm.tm_isdst = -1;
16773 mktime (&tm);
ca81d7a0 16774 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16775}
16776
ca81d7a0 16777static int
98418dba
CW
16778bigtime_test (j)
16779 int j;
16780{
16781 struct tm tm;
16782 time_t now;
16783 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16784 now = mktime (&tm);
16785 if (now != (time_t) -1)
16786 {
16787 struct tm *lt = localtime (&now);
16788 if (! (lt
16789 && lt->tm_year == tm.tm_year
16790 && lt->tm_mon == tm.tm_mon
16791 && lt->tm_mday == tm.tm_mday
16792 && lt->tm_hour == tm.tm_hour
16793 && lt->tm_min == tm.tm_min
16794 && lt->tm_sec == tm.tm_sec
16795 && lt->tm_yday == tm.tm_yday
16796 && lt->tm_wday == tm.tm_wday
16797 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16798 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16799 return 0;
98418dba 16800 }
ca81d7a0 16801 return 1;
98418dba
CW
16802}
16803
f053c89f
CY
16804static int
16805year_2050_test ()
16806{
16807 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16808 ignoring leap seconds. */
16809 unsigned long int answer = 2527315200UL;
16810
16811 struct tm tm;
16812 time_t t;
16813 tm.tm_year = 2050 - 1900;
16814 tm.tm_mon = 2 - 1;
16815 tm.tm_mday = 1;
16816 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16817 tm.tm_isdst = -1;
16818
16819 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16820 instead of "TZ=America/Vancouver" in order to detect the bug even
16821 on systems that don't support the Olson extension, or don't have the
16822 full zoneinfo tables installed. */
16823 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16824
16825 t = mktime (&tm);
16826
16827 /* Check that the result is either a failure, or close enough
16828 to the correct answer that we can assume the discrepancy is
16829 due to leap seconds. */
16830 return (t == (time_t) -1
16831 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16832}
16833
16834int
16835main ()
16836{
16837 time_t t, delta;
16838 int i, j;
16839
16840 /* This test makes some buggy mktime implementations loop.
16841 Give up after 60 seconds; a mktime slower than that
16842 isn't worth using anyway. */
16843 alarm (60);
16844
8801ee60
RF
16845 for (;;)
16846 {
16847 t = (time_t_max << 1) + 1;
16848 if (t <= time_t_max)
16849 break;
16850 time_t_max = t;
16851 }
16852 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16853
98418dba
CW
16854 delta = time_t_max / 997; /* a suitable prime number */
16855 for (i = 0; i < N_STRINGS; i++)
16856 {
16857 if (tz_strings[i])
16858 putenv (tz_strings[i]);
503d2be0 16859
98418dba 16860 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16861 if (! mktime_test (t))
16862 return 1;
16863 if (! (mktime_test ((time_t) 1)
16864 && mktime_test ((time_t) (60 * 60))
16865 && mktime_test ((time_t) (60 * 60 * 24))))
16866 return 1;
98418dba 16867
8801ee60 16868 for (j = 1; ; j <<= 1)
ca81d7a0
JD
16869 if (! bigtime_test (j))
16870 return 1;
8801ee60
RF
16871 else if (INT_MAX / 2 < j)
16872 break;
16873 if (! bigtime_test (INT_MAX))
ca81d7a0 16874 return 1;
98418dba 16875 }
f053c89f 16876 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16877}
16878_ACEOF
98418dba 16879rm -f conftest$ac_exeext
ca81d7a0
JD
16880if { (ac_try="$ac_link"
16881case "(($ac_try" in
16882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16883 *) ac_try_echo=$ac_try;;
16884esac
16885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16886 (eval "$ac_link") 2>&5
503d2be0 16887 ac_status=$?
c0d27fcc 16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16890 { (case "(($ac_try" in
16891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16892 *) ac_try_echo=$ac_try;;
16893esac
16894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16895 (eval "$ac_try") 2>&5
503d2be0 16896 ac_status=$?
c0d27fcc 16897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16898 (exit $ac_status); }; }; then
98418dba 16899 ac_cv_func_working_mktime=yes
503d2be0 16900else
98418dba
CW
16901 echo "$as_me: program exited with status $ac_status" >&5
16902echo "$as_me: failed program was:" >&5
19650fd6
AS
16903sed 's/^/| /' conftest.$ac_ext >&5
16904
c0d27fcc 16905( exit $ac_status )
98418dba 16906ac_cv_func_working_mktime=no
503d2be0 16907fi
ca81d7a0 16908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16909fi
ca81d7a0
JD
16910
16911
ba4481b5 16912fi
ca81d7a0
JD
16913{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16914echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16915if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16916 case " $LIBOBJS " in
edfaf76d 16917 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16918 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16919 ;;
edfaf76d
LK
16920esac
16921
ba4481b5
DL
16922fi
16923
98418dba 16924if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16925
c0d27fcc 16926cat >>confdefs.h <<\_ACEOF
98418dba 16927#define BROKEN_MKTIME 1
c0d27fcc 16928_ACEOF
ba4481b5 16929
ba4481b5 16930fi
503d2be0 16931
98418dba
CW
16932ac_have_func=no # yes means we've found a way to get the load average.
16933
6bae0ccf
DL
16934# Make sure getloadavg.c is where it belongs, at configure-time.
16935test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16936 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16937echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16938 { (exit 1); exit 1; }; }
16939
98418dba
CW
16940ac_save_LIBS=$LIBS
16941
16942# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16943({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16944echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16945if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16946 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16947else
503d2be0 16948 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16949/* confdefs.h. */
16950_ACEOF
16951cat confdefs.h >>conftest.$ac_ext
16952cat >>conftest.$ac_ext <<_ACEOF
16953/* end confdefs.h. */
edfaf76d
LK
16954/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16955 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16956#define getloadavg innocuous_getloadavg
16957
98418dba 16958/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16959 which can conflict with char getloadavg (); below.
16960 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16961 <limits.h> exists even on freestanding compilers. */
edfaf76d 16962
19650fd6
AS
16963#ifdef __STDC__
16964# include <limits.h>
16965#else
16966# include <assert.h>
16967#endif
edfaf76d
LK
16968
16969#undef getloadavg
16970
ca81d7a0
JD
16971/* Override any GCC internal prototype to avoid an error.
16972 Use char because int might match the return type of a GCC
16973 builtin and then its argument prototype would still apply. */
503d2be0
AS
16974#ifdef __cplusplus
16975extern "C"
16976#endif
98418dba 16977char getloadavg ();
98418dba
CW
16978/* The GNU C library defines this for functions which it implements
16979 to always fail with ENOSYS. Some functions are actually named
16980 something starting with __ and the normal name is an alias. */
ca81d7a0 16981#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16982choke me
cd958eb3
MB
16983#endif
16984
19650fd6
AS
16985int
16986main ()
16987{
ca81d7a0 16988return getloadavg ();
503d2be0
AS
16989 ;
16990 return 0;
16991}
16992_ACEOF
16993rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16994if { (ac_try="$ac_link"
16995case "(($ac_try" in
16996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16997 *) ac_try_echo=$ac_try;;
16998esac
16999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17000 (eval "$ac_link") 2>conftest.er1
503d2be0 17001 ac_status=$?
edfaf76d
LK
17002 grep -v '^ *+' conftest.er1 >conftest.err
17003 rm -f conftest.er1
17004 cat conftest.err >&5
c0d27fcc 17005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17006 (exit $ac_status); } && {
17007 test -z "$ac_c_werror_flag" ||
17008 test ! -s conftest.err
17009 } && test -s conftest$ac_exeext &&
17010 $as_test_x conftest$ac_exeext; then
98418dba 17011 ac_cv_func_getloadavg=yes
503d2be0
AS
17012else
17013 echo "$as_me: failed program was:" >&5
19650fd6
AS
17014sed 's/^/| /' conftest.$ac_ext >&5
17015
ca81d7a0 17016 ac_cv_func_getloadavg=no
503d2be0 17017fi
ca81d7a0 17018
f053c89f 17019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17020 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17021fi
ca81d7a0
JD
17022{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17023echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17024if test $ac_cv_func_getloadavg = yes; then
17025 exit 0
17026else
17027 exit 1
ba4481b5 17028fi
98418dba 17029) && ac_have_func=yes
ba4481b5 17030
98418dba 17031# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17032
98418dba
CW
17033for ac_func in pstat_getdynamic
17034do
17035as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17036{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17037echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17038if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17039 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17040else
503d2be0 17041 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17042/* confdefs.h. */
17043_ACEOF
17044cat confdefs.h >>conftest.$ac_ext
17045cat >>conftest.$ac_ext <<_ACEOF
17046/* end confdefs.h. */
edfaf76d
LK
17047/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17048 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17049#define $ac_func innocuous_$ac_func
17050
98418dba 17051/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17052 which can conflict with char $ac_func (); below.
17053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17054 <limits.h> exists even on freestanding compilers. */
edfaf76d 17055
19650fd6
AS
17056#ifdef __STDC__
17057# include <limits.h>
17058#else
17059# include <assert.h>
17060#endif
edfaf76d
LK
17061
17062#undef $ac_func
17063
ca81d7a0
JD
17064/* Override any GCC internal prototype to avoid an error.
17065 Use char because int might match the return type of a GCC
17066 builtin and then its argument prototype would still apply. */
503d2be0
AS
17067#ifdef __cplusplus
17068extern "C"
17069#endif
98418dba 17070char $ac_func ();
98418dba
CW
17071/* The GNU C library defines this for functions which it implements
17072 to always fail with ENOSYS. Some functions are actually named
17073 something starting with __ and the normal name is an alias. */
ca81d7a0 17074#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17075choke me
98418dba
CW
17076#endif
17077
19650fd6
AS
17078int
17079main ()
17080{
ca81d7a0 17081return $ac_func ();
98418dba
CW
17082 ;
17083 return 0;
17084}
f21fadcc 17085_ACEOF
98418dba 17086rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17087if { (ac_try="$ac_link"
17088case "(($ac_try" in
17089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090 *) ac_try_echo=$ac_try;;
17091esac
17092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093 (eval "$ac_link") 2>conftest.er1
f21fadcc 17094 ac_status=$?
edfaf76d
LK
17095 grep -v '^ *+' conftest.er1 >conftest.err
17096 rm -f conftest.er1
17097 cat conftest.err >&5
c0d27fcc 17098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17099 (exit $ac_status); } && {
17100 test -z "$ac_c_werror_flag" ||
17101 test ! -s conftest.err
17102 } && test -s conftest$ac_exeext &&
17103 $as_test_x conftest$ac_exeext; then
98418dba 17104 eval "$as_ac_var=yes"
f21fadcc
JD
17105else
17106 echo "$as_me: failed program was:" >&5
19650fd6
AS
17107sed 's/^/| /' conftest.$ac_ext >&5
17108
ca81d7a0 17109 eval "$as_ac_var=no"
f21fadcc 17110fi
ca81d7a0 17111
f053c89f 17112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17113 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17114fi
ca81d7a0
JD
17115ac_res=`eval echo '${'$as_ac_var'}'`
17116 { echo "$as_me:$LINENO: result: $ac_res" >&5
17117echo "${ECHO_T}$ac_res" >&6; }
98418dba 17118if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17119 cat >>confdefs.h <<_ACEOF
98418dba 17120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17121_ACEOF
98418dba
CW
17122
17123fi
17124done
17125
c0d27fcc 17126
98418dba
CW
17127# Solaris has libkstat which does not require root.
17128
ca81d7a0
JD
17129{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17130echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17131if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17132 echo $ECHO_N "(cached) $ECHO_C" >&6
17133else
17134 ac_check_lib_save_LIBS=$LIBS
98418dba 17135LIBS="-lkstat $LIBS"
f21fadcc 17136cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17137/* confdefs.h. */
17138_ACEOF
17139cat confdefs.h >>conftest.$ac_ext
17140cat >>conftest.$ac_ext <<_ACEOF
17141/* end confdefs.h. */
f21fadcc 17142
ca81d7a0
JD
17143/* Override any GCC internal prototype to avoid an error.
17144 Use char because int might match the return type of a GCC
17145 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17146#ifdef __cplusplus
17147extern "C"
17148#endif
98418dba 17149char kstat_open ();
f21fadcc
JD
17150int
17151main ()
17152{
ca81d7a0 17153return kstat_open ();
f21fadcc
JD
17154 ;
17155 return 0;
17156}
17157_ACEOF
17158rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17159if { (ac_try="$ac_link"
17160case "(($ac_try" in
17161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17162 *) ac_try_echo=$ac_try;;
17163esac
17164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17165 (eval "$ac_link") 2>conftest.er1
f21fadcc 17166 ac_status=$?
edfaf76d
LK
17167 grep -v '^ *+' conftest.er1 >conftest.err
17168 rm -f conftest.er1
17169 cat conftest.err >&5
c0d27fcc 17170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17171 (exit $ac_status); } && {
17172 test -z "$ac_c_werror_flag" ||
17173 test ! -s conftest.err
17174 } && test -s conftest$ac_exeext &&
17175 $as_test_x conftest$ac_exeext; then
98418dba 17176 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17177else
17178 echo "$as_me: failed program was:" >&5
19650fd6
AS
17179sed 's/^/| /' conftest.$ac_ext >&5
17180
ca81d7a0 17181 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17182fi
ca81d7a0 17183
f053c89f 17184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17185 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17186LIBS=$ac_check_lib_save_LIBS
17187fi
ca81d7a0
JD
17188{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17189echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17190if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17191 cat >>confdefs.h <<_ACEOF
98418dba 17192#define HAVE_LIBKSTAT 1
c0d27fcc 17193_ACEOF
f21fadcc 17194
98418dba 17195 LIBS="-lkstat $LIBS"
f21fadcc 17196
f21fadcc
JD
17197fi
17198
98418dba
CW
17199test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17200
17201# Some systems with -lutil have (and need) -lkvm as well, some do not.
17202# On Solaris, -lkvm requires nlist from -lelf, so check that first
17203# to get the right answer into the cache.
17204# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17205if test $ac_have_func = no; then
ca81d7a0
JD
17206 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17207echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17208if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17209 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17210else
98418dba
CW
17211 ac_check_lib_save_LIBS=$LIBS
17212LIBS="-lelf $LIBS"
17213cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17214/* confdefs.h. */
17215_ACEOF
17216cat confdefs.h >>conftest.$ac_ext
17217cat >>conftest.$ac_ext <<_ACEOF
17218/* end confdefs.h. */
98418dba 17219
ca81d7a0
JD
17220/* Override any GCC internal prototype to avoid an error.
17221 Use char because int might match the return type of a GCC
17222 builtin and then its argument prototype would still apply. */
98418dba
CW
17223#ifdef __cplusplus
17224extern "C"
17225#endif
98418dba 17226char elf_begin ();
503d2be0
AS
17227int
17228main ()
17229{
ca81d7a0 17230return elf_begin ();
503d2be0
AS
17231 ;
17232 return 0;
17233}
17234_ACEOF
17235rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17236if { (ac_try="$ac_link"
17237case "(($ac_try" in
17238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17239 *) ac_try_echo=$ac_try;;
17240esac
17241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17242 (eval "$ac_link") 2>conftest.er1
503d2be0 17243 ac_status=$?
edfaf76d
LK
17244 grep -v '^ *+' conftest.er1 >conftest.err
17245 rm -f conftest.er1
17246 cat conftest.err >&5
c0d27fcc 17247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17248 (exit $ac_status); } && {
17249 test -z "$ac_c_werror_flag" ||
17250 test ! -s conftest.err
17251 } && test -s conftest$ac_exeext &&
17252 $as_test_x conftest$ac_exeext; then
98418dba 17253 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17254else
503d2be0 17255 echo "$as_me: failed program was:" >&5
19650fd6
AS
17256sed 's/^/| /' conftest.$ac_ext >&5
17257
ca81d7a0 17258 ac_cv_lib_elf_elf_begin=no
ba4481b5 17259fi
ca81d7a0 17260
f053c89f 17261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17262 conftest$ac_exeext conftest.$ac_ext
98418dba 17263LIBS=$ac_check_lib_save_LIBS
ba4481b5 17264fi
ca81d7a0
JD
17265{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17266echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17267if test $ac_cv_lib_elf_elf_begin = yes; then
17268 LIBS="-lelf $LIBS"
ba4481b5
DL
17269fi
17270
98418dba
CW
17271fi
17272if test $ac_have_func = no; then
ca81d7a0
JD
17273 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17274echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17275if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17276 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17277else
98418dba
CW
17278 ac_check_lib_save_LIBS=$LIBS
17279LIBS="-lkvm $LIBS"
17280cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17281/* confdefs.h. */
17282_ACEOF
17283cat confdefs.h >>conftest.$ac_ext
17284cat >>conftest.$ac_ext <<_ACEOF
17285/* end confdefs.h. */
98418dba 17286
ca81d7a0
JD
17287/* Override any GCC internal prototype to avoid an error.
17288 Use char because int might match the return type of a GCC
17289 builtin and then its argument prototype would still apply. */
98418dba
CW
17290#ifdef __cplusplus
17291extern "C"
17292#endif
98418dba 17293char kvm_open ();
503d2be0
AS
17294int
17295main ()
17296{
ca81d7a0 17297return kvm_open ();
503d2be0
AS
17298 ;
17299 return 0;
17300}
17301_ACEOF
17302rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17303if { (ac_try="$ac_link"
17304case "(($ac_try" in
17305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17306 *) ac_try_echo=$ac_try;;
17307esac
17308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17309 (eval "$ac_link") 2>conftest.er1
503d2be0 17310 ac_status=$?
edfaf76d
LK
17311 grep -v '^ *+' conftest.er1 >conftest.err
17312 rm -f conftest.er1
17313 cat conftest.err >&5
c0d27fcc 17314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17315 (exit $ac_status); } && {
17316 test -z "$ac_c_werror_flag" ||
17317 test ! -s conftest.err
17318 } && test -s conftest$ac_exeext &&
17319 $as_test_x conftest$ac_exeext; then
98418dba 17320 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17321else
17322 echo "$as_me: failed program was:" >&5
19650fd6
AS
17323sed 's/^/| /' conftest.$ac_ext >&5
17324
ca81d7a0 17325 ac_cv_lib_kvm_kvm_open=no
503d2be0 17326fi
ca81d7a0 17327
f053c89f 17328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17329 conftest$ac_exeext conftest.$ac_ext
98418dba 17330LIBS=$ac_check_lib_save_LIBS
503d2be0 17331fi
ca81d7a0
JD
17332{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17333echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17334if test $ac_cv_lib_kvm_kvm_open = yes; then
17335 LIBS="-lkvm $LIBS"
ba4481b5
DL
17336fi
17337
98418dba 17338 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17339 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17340echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17341if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17342 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17343else
98418dba
CW
17344 ac_check_lib_save_LIBS=$LIBS
17345LIBS="-lutil $LIBS"
17346cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17347/* confdefs.h. */
17348_ACEOF
17349cat confdefs.h >>conftest.$ac_ext
17350cat >>conftest.$ac_ext <<_ACEOF
17351/* end confdefs.h. */
98418dba 17352
ca81d7a0
JD
17353/* Override any GCC internal prototype to avoid an error.
17354 Use char because int might match the return type of a GCC
17355 builtin and then its argument prototype would still apply. */
98418dba
CW
17356#ifdef __cplusplus
17357extern "C"
17358#endif
98418dba 17359char getloadavg ();
503d2be0
AS
17360int
17361main ()
17362{
ca81d7a0 17363return getloadavg ();
503d2be0
AS
17364 ;
17365 return 0;
17366}
17367_ACEOF
17368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17369if { (ac_try="$ac_link"
17370case "(($ac_try" in
17371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17372 *) ac_try_echo=$ac_try;;
17373esac
17374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17375 (eval "$ac_link") 2>conftest.er1
503d2be0 17376 ac_status=$?
edfaf76d
LK
17377 grep -v '^ *+' conftest.er1 >conftest.err
17378 rm -f conftest.er1
17379 cat conftest.err >&5
c0d27fcc 17380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17381 (exit $ac_status); } && {
17382 test -z "$ac_c_werror_flag" ||
17383 test ! -s conftest.err
17384 } && test -s conftest$ac_exeext &&
17385 $as_test_x conftest$ac_exeext; then
35996d22
AS
17386 ac_cv_lib_util_getloadavg=yes
17387else
503d2be0 17388 echo "$as_me: failed program was:" >&5
19650fd6
AS
17389sed 's/^/| /' conftest.$ac_ext >&5
17390
ca81d7a0 17391 ac_cv_lib_util_getloadavg=no
ba4481b5 17392fi
ca81d7a0 17393
f053c89f 17394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17395 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17396LIBS=$ac_check_lib_save_LIBS
17397fi
ca81d7a0
JD
17398{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17399echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17400if test $ac_cv_lib_util_getloadavg = yes; then
17401 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17402fi
503d2be0 17403
98418dba 17404fi
ba4481b5 17405
98418dba
CW
17406if test $ac_have_func = no; then
17407 # There is a commonly available library for RS/6000 AIX.
17408 # Since it is not a standard part of AIX, it might be installed locally.
17409 ac_getloadavg_LIBS=$LIBS
17410 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17411 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17412echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17413if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17414 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17415else
98418dba
CW
17416 ac_check_lib_save_LIBS=$LIBS
17417LIBS="-lgetloadavg $LIBS"
17418cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17419/* confdefs.h. */
17420_ACEOF
17421cat confdefs.h >>conftest.$ac_ext
17422cat >>conftest.$ac_ext <<_ACEOF
17423/* end confdefs.h. */
ba4481b5 17424
ca81d7a0
JD
17425/* Override any GCC internal prototype to avoid an error.
17426 Use char because int might match the return type of a GCC
17427 builtin and then its argument prototype would still apply. */
98418dba
CW
17428#ifdef __cplusplus
17429extern "C"
17430#endif
98418dba 17431char getloadavg ();
98418dba
CW
17432int
17433main ()
17434{
ca81d7a0 17435return getloadavg ();
98418dba
CW
17436 ;
17437 return 0;
17438}
503d2be0 17439_ACEOF
98418dba 17440rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17441if { (ac_try="$ac_link"
17442case "(($ac_try" in
17443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17444 *) ac_try_echo=$ac_try;;
17445esac
17446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17447 (eval "$ac_link") 2>conftest.er1
98418dba 17448 ac_status=$?
edfaf76d
LK
17449 grep -v '^ *+' conftest.er1 >conftest.err
17450 rm -f conftest.er1
17451 cat conftest.err >&5
c0d27fcc 17452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17453 (exit $ac_status); } && {
17454 test -z "$ac_c_werror_flag" ||
17455 test ! -s conftest.err
17456 } && test -s conftest$ac_exeext &&
17457 $as_test_x conftest$ac_exeext; then
98418dba 17458 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17459else
98418dba 17460 echo "$as_me: failed program was:" >&5
19650fd6
AS
17461sed 's/^/| /' conftest.$ac_ext >&5
17462
ca81d7a0 17463 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17464fi
ca81d7a0 17465
f053c89f 17466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17467 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17468LIBS=$ac_check_lib_save_LIBS
17469fi
ca81d7a0
JD
17470{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17471echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17472if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17473 LIBS="-lgetloadavg $LIBS"
17474else
17475 LIBS=$ac_getloadavg_LIBS
ba4481b5 17476fi
ba4481b5
DL
17477
17478fi
98418dba
CW
17479
17480# Make sure it is really in the library, if we think we found it,
17481# otherwise set up the replacement function.
17482
17483for ac_func in getloadavg
17484do
17485as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17486{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17487echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17488if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17489 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17490else
503d2be0 17491 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17492/* confdefs.h. */
17493_ACEOF
17494cat confdefs.h >>conftest.$ac_ext
17495cat >>conftest.$ac_ext <<_ACEOF
17496/* end confdefs.h. */
edfaf76d
LK
17497/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17498 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17499#define $ac_func innocuous_$ac_func
17500
ba4481b5 17501/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17502 which can conflict with char $ac_func (); below.
17503 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17504 <limits.h> exists even on freestanding compilers. */
edfaf76d 17505
19650fd6
AS
17506#ifdef __STDC__
17507# include <limits.h>
17508#else
17509# include <assert.h>
17510#endif
edfaf76d
LK
17511
17512#undef $ac_func
17513
ca81d7a0
JD
17514/* Override any GCC internal prototype to avoid an error.
17515 Use char because int might match the return type of a GCC
17516 builtin and then its argument prototype would still apply. */
503d2be0
AS
17517#ifdef __cplusplus
17518extern "C"
17519#endif
503d2be0 17520char $ac_func ();
ba4481b5
DL
17521/* The GNU C library defines this for functions which it implements
17522 to always fail with ENOSYS. Some functions are actually named
17523 something starting with __ and the normal name is an alias. */
ca81d7a0 17524#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17525choke me
cd958eb3
MB
17526#endif
17527
19650fd6
AS
17528int
17529main ()
17530{
ca81d7a0 17531return $ac_func ();
503d2be0
AS
17532 ;
17533 return 0;
17534}
17535_ACEOF
17536rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17537if { (ac_try="$ac_link"
17538case "(($ac_try" in
17539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17540 *) ac_try_echo=$ac_try;;
17541esac
17542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17543 (eval "$ac_link") 2>conftest.er1
503d2be0 17544 ac_status=$?
edfaf76d
LK
17545 grep -v '^ *+' conftest.er1 >conftest.err
17546 rm -f conftest.er1
17547 cat conftest.err >&5
c0d27fcc 17548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17549 (exit $ac_status); } && {
17550 test -z "$ac_c_werror_flag" ||
17551 test ! -s conftest.err
17552 } && test -s conftest$ac_exeext &&
17553 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17554 eval "$as_ac_var=yes"
17555else
17556 echo "$as_me: failed program was:" >&5
19650fd6
AS
17557sed 's/^/| /' conftest.$ac_ext >&5
17558
ca81d7a0 17559 eval "$as_ac_var=no"
503d2be0 17560fi
ca81d7a0 17561
f053c89f 17562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17563 conftest$ac_exeext conftest.$ac_ext
503d2be0 17564fi
ca81d7a0
JD
17565ac_res=`eval echo '${'$as_ac_var'}'`
17566 { echo "$as_me:$LINENO: result: $ac_res" >&5
17567echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17568if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17569 cat >>confdefs.h <<_ACEOF
98418dba 17570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17571_ACEOF
503d2be0 17572
98418dba 17573else
ca81d7a0 17574 case " $LIBOBJS " in
edfaf76d 17575 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17576 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17577 ;;
edfaf76d
LK
17578esac
17579
ba4481b5 17580
c0d27fcc 17581cat >>confdefs.h <<\_ACEOF
98418dba 17582#define C_GETLOADAVG 1
c0d27fcc 17583_ACEOF
ba4481b5 17584
98418dba
CW
17585# Figure out what our getloadavg.c needs.
17586ac_have_func=no
c0d27fcc 17587if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17588 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17589echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17590if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17591 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17592fi
ca81d7a0
JD
17593{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17594echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17595else
c0d27fcc 17596 # Is the header compilable?
ca81d7a0
JD
17597{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17598echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17600/* confdefs.h. */
17601_ACEOF
17602cat confdefs.h >>conftest.$ac_ext
17603cat >>conftest.$ac_ext <<_ACEOF
17604/* end confdefs.h. */
c0d27fcc
MR
17605$ac_includes_default
17606#include <sys/dg_sys_info.h>
17607_ACEOF
17608rm -f conftest.$ac_objext
ca81d7a0
JD
17609if { (ac_try="$ac_compile"
17610case "(($ac_try" in
17611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17612 *) ac_try_echo=$ac_try;;
17613esac
17614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17615 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17616 ac_status=$?
edfaf76d
LK
17617 grep -v '^ *+' conftest.er1 >conftest.err
17618 rm -f conftest.er1
17619 cat conftest.err >&5
c0d27fcc 17620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17621 (exit $ac_status); } && {
17622 test -z "$ac_c_werror_flag" ||
17623 test ! -s conftest.err
17624 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17625 ac_header_compiler=yes
17626else
17627 echo "$as_me: failed program was:" >&5
19650fd6
AS
17628sed 's/^/| /' conftest.$ac_ext >&5
17629
ca81d7a0 17630 ac_header_compiler=no
c0d27fcc 17631fi
ca81d7a0
JD
17632
17633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17634{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17635echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17636
17637# Is the header present?
ca81d7a0
JD
17638{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17639echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17640cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17641/* confdefs.h. */
17642_ACEOF
17643cat confdefs.h >>conftest.$ac_ext
17644cat >>conftest.$ac_ext <<_ACEOF
17645/* end confdefs.h. */
98418dba
CW
17646#include <sys/dg_sys_info.h>
17647_ACEOF
ca81d7a0
JD
17648if { (ac_try="$ac_cpp conftest.$ac_ext"
17649case "(($ac_try" in
17650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17651 *) ac_try_echo=$ac_try;;
17652esac
17653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17655 ac_status=$?
6bae0ccf 17656 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17657 rm -f conftest.er1
17658 cat conftest.err >&5
c0d27fcc 17659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17660 (exit $ac_status); } >/dev/null && {
17661 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17662 test ! -s conftest.err
17663 }; then
c0d27fcc 17664 ac_header_preproc=yes
98418dba
CW
17665else
17666 echo "$as_me: failed program was:" >&5
19650fd6
AS
17667sed 's/^/| /' conftest.$ac_ext >&5
17668
c0d27fcc 17669 ac_header_preproc=no
ba4481b5 17670fi
ca81d7a0 17671
98418dba 17672rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17673{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17674echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17675
17676# So? What about this header?
edfaf76d
LK
17677case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17678 yes:no: )
c0d27fcc
MR
17679 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17680echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17681 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17682echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17683 ac_header_preproc=yes
19650fd6 17684 ;;
edfaf76d 17685 no:yes:* )
c0d27fcc
MR
17686 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17687echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17688 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17689echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17690 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17691echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17692 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17693echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17694 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17695echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17696 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17697echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17698
19650fd6 17699 ;;
c0d27fcc 17700esac
ca81d7a0
JD
17701{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17702echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17703if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17704 echo $ECHO_N "(cached) $ECHO_C" >&6
17705else
17706 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17707fi
ca81d7a0
JD
17708{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17709echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17710
17711fi
98418dba
CW
17712if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17713 ac_have_func=yes
ba4481b5 17714
c0d27fcc 17715cat >>confdefs.h <<\_ACEOF
98418dba 17716#define DGUX 1
c0d27fcc
MR
17717_ACEOF
17718
503d2be0 17719
ca81d7a0
JD
17720{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17721echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17722if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17723 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17724else
503d2be0 17725 ac_check_lib_save_LIBS=$LIBS
98418dba 17726LIBS="-ldgc $LIBS"
503d2be0 17727cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17728/* confdefs.h. */
17729_ACEOF
17730cat confdefs.h >>conftest.$ac_ext
17731cat >>conftest.$ac_ext <<_ACEOF
17732/* end confdefs.h. */
503d2be0 17733
ca81d7a0
JD
17734/* Override any GCC internal prototype to avoid an error.
17735 Use char because int might match the return type of a GCC
17736 builtin and then its argument prototype would still apply. */
503d2be0
AS
17737#ifdef __cplusplus
17738extern "C"
17739#endif
98418dba 17740char dg_sys_info ();
503d2be0
AS
17741int
17742main ()
17743{
ca81d7a0 17744return dg_sys_info ();
503d2be0
AS
17745 ;
17746 return 0;
17747}
17748_ACEOF
17749rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17750if { (ac_try="$ac_link"
17751case "(($ac_try" in
17752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17753 *) ac_try_echo=$ac_try;;
17754esac
17755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17756 (eval "$ac_link") 2>conftest.er1
503d2be0 17757 ac_status=$?
edfaf76d
LK
17758 grep -v '^ *+' conftest.er1 >conftest.err
17759 rm -f conftest.er1
17760 cat conftest.err >&5
c0d27fcc 17761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17762 (exit $ac_status); } && {
17763 test -z "$ac_c_werror_flag" ||
17764 test ! -s conftest.err
17765 } && test -s conftest$ac_exeext &&
17766 $as_test_x conftest$ac_exeext; then
98418dba 17767 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17768else
17769 echo "$as_me: failed program was:" >&5
19650fd6
AS
17770sed 's/^/| /' conftest.$ac_ext >&5
17771
ca81d7a0 17772 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17773fi
ca81d7a0 17774
f053c89f 17775rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17776 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17777LIBS=$ac_check_lib_save_LIBS
17778fi
ca81d7a0
JD
17779{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17780echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17781if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17782 cat >>confdefs.h <<_ACEOF
98418dba 17783#define HAVE_LIBDGC 1
c0d27fcc 17784_ACEOF
ba4481b5 17785
98418dba 17786 LIBS="-ldgc $LIBS"
ba4481b5 17787
ba4481b5
DL
17788fi
17789
98418dba 17790fi
503d2be0 17791
c0d27fcc
MR
17792
17793
17794if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17795 { echo "$as_me:$LINENO: checking for locale.h" >&5
17796echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17797if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17798 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17799fi
ca81d7a0
JD
17800{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17801echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17802else
c0d27fcc 17803 # Is the header compilable?
ca81d7a0
JD
17804{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17805echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17806cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
c0d27fcc
MR
17812$ac_includes_default
17813#include <locale.h>
17814_ACEOF
17815rm -f conftest.$ac_objext
ca81d7a0
JD
17816if { (ac_try="$ac_compile"
17817case "(($ac_try" in
17818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17819 *) ac_try_echo=$ac_try;;
17820esac
17821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17822 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17823 ac_status=$?
edfaf76d
LK
17824 grep -v '^ *+' conftest.er1 >conftest.err
17825 rm -f conftest.er1
17826 cat conftest.err >&5
c0d27fcc 17827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17828 (exit $ac_status); } && {
17829 test -z "$ac_c_werror_flag" ||
17830 test ! -s conftest.err
17831 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17832 ac_header_compiler=yes
17833else
17834 echo "$as_me: failed program was:" >&5
19650fd6
AS
17835sed 's/^/| /' conftest.$ac_ext >&5
17836
ca81d7a0 17837 ac_header_compiler=no
c0d27fcc 17838fi
ca81d7a0
JD
17839
17840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17841{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17842echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17843
17844# Is the header present?
ca81d7a0
JD
17845{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17846echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17847cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17848/* confdefs.h. */
17849_ACEOF
17850cat confdefs.h >>conftest.$ac_ext
17851cat >>conftest.$ac_ext <<_ACEOF
17852/* end confdefs.h. */
98418dba 17853#include <locale.h>
503d2be0 17854_ACEOF
ca81d7a0
JD
17855if { (ac_try="$ac_cpp conftest.$ac_ext"
17856case "(($ac_try" in
17857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17858 *) ac_try_echo=$ac_try;;
17859esac
17860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17861 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17862 ac_status=$?
6bae0ccf 17863 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17864 rm -f conftest.er1
17865 cat conftest.err >&5
c0d27fcc 17866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17867 (exit $ac_status); } >/dev/null && {
17868 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17869 test ! -s conftest.err
17870 }; then
c0d27fcc 17871 ac_header_preproc=yes
98418dba
CW
17872else
17873 echo "$as_me: failed program was:" >&5
19650fd6
AS
17874sed 's/^/| /' conftest.$ac_ext >&5
17875
c0d27fcc 17876 ac_header_preproc=no
ba4481b5 17877fi
ca81d7a0 17878
98418dba 17879rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17880{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17881echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17882
17883# So? What about this header?
edfaf76d
LK
17884case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17885 yes:no: )
c0d27fcc
MR
17886 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17887echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17888 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17889echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17890 ac_header_preproc=yes
19650fd6 17891 ;;
edfaf76d 17892 no:yes:* )
c0d27fcc
MR
17893 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17894echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17895 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17896echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17897 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17898echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17899 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17900echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17901 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17902echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17903 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17904echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17905
19650fd6 17906 ;;
c0d27fcc 17907esac
ca81d7a0
JD
17908{ echo "$as_me:$LINENO: checking for locale.h" >&5
17909echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17910if test "${ac_cv_header_locale_h+set}" = set; then
17911 echo $ECHO_N "(cached) $ECHO_C" >&6
17912else
17913 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17914fi
ca81d7a0
JD
17915{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17916echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17917
c0d27fcc
MR
17918fi
17919
17920
17921
98418dba 17922for ac_func in setlocale
ba4481b5 17923do
503d2be0 17924as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17925{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17926echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17927if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17928 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17929else
503d2be0 17930 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17931/* confdefs.h. */
17932_ACEOF
17933cat confdefs.h >>conftest.$ac_ext
17934cat >>conftest.$ac_ext <<_ACEOF
17935/* end confdefs.h. */
edfaf76d
LK
17936/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17937 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17938#define $ac_func innocuous_$ac_func
17939
ba4481b5 17940/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17941 which can conflict with char $ac_func (); below.
17942 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17943 <limits.h> exists even on freestanding compilers. */
edfaf76d 17944
19650fd6
AS
17945#ifdef __STDC__
17946# include <limits.h>
17947#else
17948# include <assert.h>
17949#endif
edfaf76d
LK
17950
17951#undef $ac_func
17952
ca81d7a0
JD
17953/* Override any GCC internal prototype to avoid an error.
17954 Use char because int might match the return type of a GCC
17955 builtin and then its argument prototype would still apply. */
503d2be0
AS
17956#ifdef __cplusplus
17957extern "C"
17958#endif
503d2be0 17959char $ac_func ();
ba4481b5
DL
17960/* The GNU C library defines this for functions which it implements
17961 to always fail with ENOSYS. Some functions are actually named
17962 something starting with __ and the normal name is an alias. */
ca81d7a0 17963#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17964choke me
ba4481b5
DL
17965#endif
17966
19650fd6
AS
17967int
17968main ()
17969{
ca81d7a0 17970return $ac_func ();
503d2be0
AS
17971 ;
17972 return 0;
17973}
17974_ACEOF
17975rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17976if { (ac_try="$ac_link"
17977case "(($ac_try" in
17978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17979 *) ac_try_echo=$ac_try;;
17980esac
17981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17982 (eval "$ac_link") 2>conftest.er1
503d2be0 17983 ac_status=$?
edfaf76d
LK
17984 grep -v '^ *+' conftest.er1 >conftest.err
17985 rm -f conftest.er1
17986 cat conftest.err >&5
c0d27fcc 17987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17988 (exit $ac_status); } && {
17989 test -z "$ac_c_werror_flag" ||
17990 test ! -s conftest.err
17991 } && test -s conftest$ac_exeext &&
17992 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17993 eval "$as_ac_var=yes"
17994else
17995 echo "$as_me: failed program was:" >&5
19650fd6
AS
17996sed 's/^/| /' conftest.$ac_ext >&5
17997
ca81d7a0 17998 eval "$as_ac_var=no"
503d2be0 17999fi
ca81d7a0 18000
f053c89f 18001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18002 conftest$ac_exeext conftest.$ac_ext
503d2be0 18003fi
ca81d7a0
JD
18004ac_res=`eval echo '${'$as_ac_var'}'`
18005 { echo "$as_me:$LINENO: result: $ac_res" >&5
18006echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18007if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18008 cat >>confdefs.h <<_ACEOF
503d2be0 18009#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18010_ACEOF
ba4481b5 18011
ba4481b5
DL
18012fi
18013done
18014
c0d27fcc 18015
98418dba
CW
18016# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18017# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18018# Irix 4.0.5F has the header but not the library.
18019if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18020 ac_have_func=yes
18021
c0d27fcc 18022cat >>confdefs.h <<\_ACEOF
98418dba 18023#define SVR4 1
c0d27fcc 18024_ACEOF
98418dba
CW
18025
18026fi
18027
18028if test $ac_have_func = no; then
c0d27fcc 18029 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18030 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18031echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18032if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18033 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18034fi
ca81d7a0
JD
18035{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18036echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18037else
c0d27fcc 18038 # Is the header compilable?
ca81d7a0
JD
18039{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18040echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18042/* confdefs.h. */
18043_ACEOF
18044cat confdefs.h >>conftest.$ac_ext
18045cat >>conftest.$ac_ext <<_ACEOF
18046/* end confdefs.h. */
c0d27fcc
MR
18047$ac_includes_default
18048#include <inq_stats/cpustats.h>
18049_ACEOF
18050rm -f conftest.$ac_objext
ca81d7a0
JD
18051if { (ac_try="$ac_compile"
18052case "(($ac_try" in
18053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18054 *) ac_try_echo=$ac_try;;
18055esac
18056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18057 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18058 ac_status=$?
edfaf76d
LK
18059 grep -v '^ *+' conftest.er1 >conftest.err
18060 rm -f conftest.er1
18061 cat conftest.err >&5
c0d27fcc 18062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18063 (exit $ac_status); } && {
18064 test -z "$ac_c_werror_flag" ||
18065 test ! -s conftest.err
18066 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18067 ac_header_compiler=yes
18068else
18069 echo "$as_me: failed program was:" >&5
19650fd6
AS
18070sed 's/^/| /' conftest.$ac_ext >&5
18071
ca81d7a0 18072 ac_header_compiler=no
c0d27fcc 18073fi
ca81d7a0
JD
18074
18075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18077echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18078
18079# Is the header present?
ca81d7a0
JD
18080{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18081echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18082cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18083/* confdefs.h. */
18084_ACEOF
18085cat confdefs.h >>conftest.$ac_ext
18086cat >>conftest.$ac_ext <<_ACEOF
18087/* end confdefs.h. */
98418dba 18088#include <inq_stats/cpustats.h>
503d2be0 18089_ACEOF
ca81d7a0
JD
18090if { (ac_try="$ac_cpp conftest.$ac_ext"
18091case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;;
18094esac
18095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18097 ac_status=$?
6bae0ccf 18098 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18099 rm -f conftest.er1
18100 cat conftest.err >&5
c0d27fcc 18101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18102 (exit $ac_status); } >/dev/null && {
18103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18104 test ! -s conftest.err
18105 }; then
c0d27fcc 18106 ac_header_preproc=yes
503d2be0
AS
18107else
18108 echo "$as_me: failed program was:" >&5
19650fd6
AS
18109sed 's/^/| /' conftest.$ac_ext >&5
18110
c0d27fcc 18111 ac_header_preproc=no
ba4481b5 18112fi
ca81d7a0 18113
503d2be0 18114rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18116echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18117
18118# So? What about this header?
edfaf76d
LK
18119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18120 yes:no: )
c0d27fcc
MR
18121 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18122echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18123 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18124echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18125 ac_header_preproc=yes
19650fd6 18126 ;;
edfaf76d 18127 no:yes:* )
c0d27fcc
MR
18128 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18129echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18130 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18131echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18132 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18133echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18134 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18135echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18136 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18137echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18138 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18139echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18140
19650fd6 18141 ;;
c0d27fcc 18142esac
ca81d7a0
JD
18143{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18144echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18145if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18146 echo $ECHO_N "(cached) $ECHO_C" >&6
18147else
18148 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18149fi
ca81d7a0
JD
18150{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18151echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18152
18153fi
98418dba
CW
18154if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18155 ac_have_func=yes
ba4481b5 18156
c0d27fcc 18157cat >>confdefs.h <<\_ACEOF
98418dba 18158#define UMAX 1
c0d27fcc 18159_ACEOF
98418dba 18160
c0d27fcc
MR
18161
18162cat >>confdefs.h <<\_ACEOF
98418dba 18163#define UMAX4_3 1
c0d27fcc 18164_ACEOF
98418dba
CW
18165
18166fi
18167
c0d27fcc 18168
98418dba
CW
18169fi
18170
18171if test $ac_have_func = no; then
c0d27fcc 18172 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18173 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18174echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18175if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18176 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18177fi
ca81d7a0
JD
18178{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18179echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18180else
c0d27fcc 18181 # Is the header compilable?
ca81d7a0
JD
18182{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18183echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18184cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18185/* confdefs.h. */
18186_ACEOF
18187cat confdefs.h >>conftest.$ac_ext
18188cat >>conftest.$ac_ext <<_ACEOF
18189/* end confdefs.h. */
c0d27fcc
MR
18190$ac_includes_default
18191#include <sys/cpustats.h>
18192_ACEOF
18193rm -f conftest.$ac_objext
ca81d7a0
JD
18194if { (ac_try="$ac_compile"
18195case "(($ac_try" in
18196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18197 *) ac_try_echo=$ac_try;;
18198esac
18199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18200 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18201 ac_status=$?
edfaf76d
LK
18202 grep -v '^ *+' conftest.er1 >conftest.err
18203 rm -f conftest.er1
18204 cat conftest.err >&5
c0d27fcc 18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18206 (exit $ac_status); } && {
18207 test -z "$ac_c_werror_flag" ||
18208 test ! -s conftest.err
18209 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18210 ac_header_compiler=yes
18211else
18212 echo "$as_me: failed program was:" >&5
19650fd6
AS
18213sed 's/^/| /' conftest.$ac_ext >&5
18214
ca81d7a0 18215 ac_header_compiler=no
c0d27fcc 18216fi
ca81d7a0
JD
18217
18218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18219{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18220echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18221
18222# Is the header present?
ca81d7a0
JD
18223{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18224echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18225cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18226/* confdefs.h. */
18227_ACEOF
18228cat confdefs.h >>conftest.$ac_ext
18229cat >>conftest.$ac_ext <<_ACEOF
18230/* end confdefs.h. */
98418dba
CW
18231#include <sys/cpustats.h>
18232_ACEOF
ca81d7a0
JD
18233if { (ac_try="$ac_cpp conftest.$ac_ext"
18234case "(($ac_try" in
18235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18236 *) ac_try_echo=$ac_try;;
18237esac
18238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18240 ac_status=$?
6bae0ccf 18241 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18242 rm -f conftest.er1
18243 cat conftest.err >&5
c0d27fcc 18244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18245 (exit $ac_status); } >/dev/null && {
18246 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18247 test ! -s conftest.err
18248 }; then
c0d27fcc 18249 ac_header_preproc=yes
98418dba
CW
18250else
18251 echo "$as_me: failed program was:" >&5
19650fd6
AS
18252sed 's/^/| /' conftest.$ac_ext >&5
18253
c0d27fcc 18254 ac_header_preproc=no
98418dba 18255fi
ca81d7a0 18256
98418dba 18257rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18258{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18259echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18260
18261# So? What about this header?
edfaf76d
LK
18262case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18263 yes:no: )
c0d27fcc
MR
18264 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18265echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18266 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18267echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18268 ac_header_preproc=yes
19650fd6 18269 ;;
edfaf76d 18270 no:yes:* )
c0d27fcc
MR
18271 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18272echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18273 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18274echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18275 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18276echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18277 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18278echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18279 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18280echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18281 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18282echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18283
19650fd6 18284 ;;
c0d27fcc 18285esac
ca81d7a0
JD
18286{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18287echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18288if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18289 echo $ECHO_N "(cached) $ECHO_C" >&6
18290else
18291 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18292fi
ca81d7a0
JD
18293{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18294echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18295
18296fi
98418dba 18297if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18298 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18299#define UMAX 1
c0d27fcc 18300_ACEOF
ba4481b5 18301
98418dba
CW
18302fi
18303
c0d27fcc 18304
98418dba
CW
18305fi
18306
18307if test $ac_have_func = no; then
18308
18309for ac_header in mach/mach.h
2c9dccc9
PJ
18310do
18311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18312if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18313 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18314echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18315if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18316 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18317fi
ca81d7a0
JD
18318ac_res=`eval echo '${'$as_ac_Header'}'`
18319 { echo "$as_me:$LINENO: result: $ac_res" >&5
18320echo "${ECHO_T}$ac_res" >&6; }
98418dba 18321else
c0d27fcc 18322 # Is the header compilable?
ca81d7a0
JD
18323{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18324echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18325cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18326/* confdefs.h. */
18327_ACEOF
18328cat confdefs.h >>conftest.$ac_ext
18329cat >>conftest.$ac_ext <<_ACEOF
18330/* end confdefs.h. */
c0d27fcc
MR
18331$ac_includes_default
18332#include <$ac_header>
18333_ACEOF
18334rm -f conftest.$ac_objext
ca81d7a0
JD
18335if { (ac_try="$ac_compile"
18336case "(($ac_try" in
18337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18338 *) ac_try_echo=$ac_try;;
18339esac
18340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18341 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18342 ac_status=$?
edfaf76d
LK
18343 grep -v '^ *+' conftest.er1 >conftest.err
18344 rm -f conftest.er1
18345 cat conftest.err >&5
c0d27fcc 18346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18347 (exit $ac_status); } && {
18348 test -z "$ac_c_werror_flag" ||
18349 test ! -s conftest.err
18350 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18351 ac_header_compiler=yes
18352else
18353 echo "$as_me: failed program was:" >&5
19650fd6
AS
18354sed 's/^/| /' conftest.$ac_ext >&5
18355
ca81d7a0 18356 ac_header_compiler=no
c0d27fcc 18357fi
ca81d7a0
JD
18358
18359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18360{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18361echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18362
18363# Is the header present?
ca81d7a0
JD
18364{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18365echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18366cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18367/* confdefs.h. */
18368_ACEOF
18369cat confdefs.h >>conftest.$ac_ext
18370cat >>conftest.$ac_ext <<_ACEOF
18371/* end confdefs.h. */
2c9dccc9
PJ
18372#include <$ac_header>
18373_ACEOF
ca81d7a0
JD
18374if { (ac_try="$ac_cpp conftest.$ac_ext"
18375case "(($ac_try" in
18376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18377 *) ac_try_echo=$ac_try;;
18378esac
18379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18380 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18381 ac_status=$?
6bae0ccf 18382 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18383 rm -f conftest.er1
18384 cat conftest.err >&5
c0d27fcc 18385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18386 (exit $ac_status); } >/dev/null && {
18387 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18388 test ! -s conftest.err
18389 }; then
c0d27fcc
MR
18390 ac_header_preproc=yes
18391else
18392 echo "$as_me: failed program was:" >&5
19650fd6
AS
18393sed 's/^/| /' conftest.$ac_ext >&5
18394
c0d27fcc
MR
18395 ac_header_preproc=no
18396fi
ca81d7a0 18397
c0d27fcc 18398rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18399{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18400echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18401
18402# So? What about this header?
edfaf76d
LK
18403case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18404 yes:no: )
c0d27fcc
MR
18405 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18406echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18407 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18408echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18409 ac_header_preproc=yes
19650fd6 18410 ;;
edfaf76d 18411 no:yes:* )
c0d27fcc
MR
18412 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18413echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18414 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18415echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18416 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18417echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18418 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18419echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18420 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18421echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18422 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18423echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18424
19650fd6 18425 ;;
c0d27fcc 18426esac
ca81d7a0
JD
18427{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18428echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18429if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18430 echo $ECHO_N "(cached) $ECHO_C" >&6
18431else
edfaf76d 18432 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18433fi
ca81d7a0
JD
18434ac_res=`eval echo '${'$as_ac_Header'}'`
18435 { echo "$as_me:$LINENO: result: $ac_res" >&5
18436echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18437
18438fi
18439if test `eval echo '${'$as_ac_Header'}'` = yes; then
18440 cat >>confdefs.h <<_ACEOF
18441#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18442_ACEOF
18443
18444fi
18445
18446done
18447
18448fi
18449
18450
18451for ac_header in nlist.h
18452do
18453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18454if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18455 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18458 echo $ECHO_N "(cached) $ECHO_C" >&6
18459fi
ca81d7a0
JD
18460ac_res=`eval echo '${'$as_ac_Header'}'`
18461 { echo "$as_me:$LINENO: result: $ac_res" >&5
18462echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18463else
18464 # Is the header compilable?
ca81d7a0
JD
18465{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18468/* confdefs.h. */
18469_ACEOF
18470cat confdefs.h >>conftest.$ac_ext
18471cat >>conftest.$ac_ext <<_ACEOF
18472/* end confdefs.h. */
c0d27fcc
MR
18473$ac_includes_default
18474#include <$ac_header>
18475_ACEOF
18476rm -f conftest.$ac_objext
ca81d7a0
JD
18477if { (ac_try="$ac_compile"
18478case "(($ac_try" in
18479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18480 *) ac_try_echo=$ac_try;;
18481esac
18482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18483 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18484 ac_status=$?
edfaf76d
LK
18485 grep -v '^ *+' conftest.er1 >conftest.err
18486 rm -f conftest.er1
18487 cat conftest.err >&5
c0d27fcc 18488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18489 (exit $ac_status); } && {
18490 test -z "$ac_c_werror_flag" ||
18491 test ! -s conftest.err
18492 } && test -s conftest.$ac_objext; then
c0d27fcc 18493 ac_header_compiler=yes
2c9dccc9
PJ
18494else
18495 echo "$as_me: failed program was:" >&5
19650fd6
AS
18496sed 's/^/| /' conftest.$ac_ext >&5
18497
ca81d7a0 18498 ac_header_compiler=no
98418dba 18499fi
ca81d7a0
JD
18500
18501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18502{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18503echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18504
c0d27fcc 18505# Is the header present?
ca81d7a0
JD
18506{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18507echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18508cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18509/* confdefs.h. */
18510_ACEOF
18511cat confdefs.h >>conftest.$ac_ext
18512cat >>conftest.$ac_ext <<_ACEOF
18513/* end confdefs.h. */
503d2be0
AS
18514#include <$ac_header>
18515_ACEOF
ca81d7a0
JD
18516if { (ac_try="$ac_cpp conftest.$ac_ext"
18517case "(($ac_try" in
18518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18519 *) ac_try_echo=$ac_try;;
18520esac
18521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18522 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18523 ac_status=$?
6bae0ccf 18524 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18525 rm -f conftest.er1
18526 cat conftest.err >&5
c0d27fcc 18527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18528 (exit $ac_status); } >/dev/null && {
18529 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18530 test ! -s conftest.err
18531 }; then
c0d27fcc 18532 ac_header_preproc=yes
503d2be0
AS
18533else
18534 echo "$as_me: failed program was:" >&5
19650fd6
AS
18535sed 's/^/| /' conftest.$ac_ext >&5
18536
c0d27fcc 18537 ac_header_preproc=no
b5de8dc0 18538fi
ca81d7a0 18539
503d2be0 18540rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18541{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18542echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18543
18544# So? What about this header?
edfaf76d
LK
18545case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18546 yes:no: )
c0d27fcc
MR
18547 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18548echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18549 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18550echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18551 ac_header_preproc=yes
19650fd6 18552 ;;
edfaf76d 18553 no:yes:* )
c0d27fcc
MR
18554 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18555echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18556 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18557echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18558 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18559echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18561echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18562 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18563echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18564 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18565echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18566
19650fd6 18567 ;;
c0d27fcc 18568esac
ca81d7a0
JD
18569{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18570echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18571if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18572 echo $ECHO_N "(cached) $ECHO_C" >&6
18573else
edfaf76d 18574 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18575fi
ca81d7a0
JD
18576ac_res=`eval echo '${'$as_ac_Header'}'`
18577 { echo "$as_me:$LINENO: result: $ac_res" >&5
18578echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18579
18580fi
98418dba 18581if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18582 cat >>confdefs.h <<_ACEOF
98418dba 18583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18584_ACEOF
ca81d7a0
JD
18585 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18586echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18587if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18588 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18589else
503d2be0 18590 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18591/* confdefs.h. */
18592_ACEOF
18593cat confdefs.h >>conftest.$ac_ext
18594cat >>conftest.$ac_ext <<_ACEOF
18595/* end confdefs.h. */
98418dba 18596#include <nlist.h>
b5de8dc0 18597
503d2be0
AS
18598int
18599main ()
18600{
98418dba
CW
18601static struct nlist ac_aggr;
18602if (ac_aggr.n_un.n_name)
18603return 0;
503d2be0
AS
18604 ;
18605 return 0;
18606}
18607_ACEOF
98418dba 18608rm -f conftest.$ac_objext
ca81d7a0
JD
18609if { (ac_try="$ac_compile"
18610case "(($ac_try" in
18611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612 *) ac_try_echo=$ac_try;;
18613esac
18614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18615 (eval "$ac_compile") 2>conftest.er1
503d2be0 18616 ac_status=$?
edfaf76d
LK
18617 grep -v '^ *+' conftest.er1 >conftest.err
18618 rm -f conftest.er1
18619 cat conftest.err >&5
c0d27fcc 18620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18621 (exit $ac_status); } && {
18622 test -z "$ac_c_werror_flag" ||
18623 test ! -s conftest.err
18624 } && test -s conftest.$ac_objext; then
edfaf76d 18625 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18626else
18627 echo "$as_me: failed program was:" >&5
19650fd6
AS
18628sed 's/^/| /' conftest.$ac_ext >&5
18629
ca81d7a0 18630 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18631/* confdefs.h. */
18632_ACEOF
18633cat confdefs.h >>conftest.$ac_ext
18634cat >>conftest.$ac_ext <<_ACEOF
18635/* end confdefs.h. */
6bae0ccf
DL
18636#include <nlist.h>
18637
18638int
18639main ()
18640{
18641static struct nlist ac_aggr;
18642if (sizeof ac_aggr.n_un.n_name)
18643return 0;
18644 ;
18645 return 0;
18646}
18647_ACEOF
18648rm -f conftest.$ac_objext
ca81d7a0
JD
18649if { (ac_try="$ac_compile"
18650case "(($ac_try" in
18651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18652 *) ac_try_echo=$ac_try;;
18653esac
18654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18655 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18656 ac_status=$?
edfaf76d
LK
18657 grep -v '^ *+' conftest.er1 >conftest.err
18658 rm -f conftest.er1
18659 cat conftest.err >&5
6bae0ccf 18660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18661 (exit $ac_status); } && {
18662 test -z "$ac_c_werror_flag" ||
18663 test ! -s conftest.err
18664 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18665 ac_cv_member_struct_nlist_n_un_n_name=yes
18666else
18667 echo "$as_me: failed program was:" >&5
19650fd6
AS
18668sed 's/^/| /' conftest.$ac_ext >&5
18669
ca81d7a0 18670 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18671fi
ca81d7a0
JD
18672
18673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18674fi
ca81d7a0
JD
18675
18676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18677fi
ca81d7a0
JD
18678{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18679echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18680if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18681
c0d27fcc 18682cat >>confdefs.h <<_ACEOF
98418dba 18683#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18684_ACEOF
b5de8dc0 18685
c0d27fcc
MR
18686
18687cat >>confdefs.h <<\_ACEOF
98418dba 18688#define NLIST_NAME_UNION 1
c0d27fcc 18689_ACEOF
b5de8dc0 18690
98418dba 18691fi
b5de8dc0 18692
c0d27fcc 18693
98418dba 18694fi
c0d27fcc 18695
98418dba 18696done
b5de8dc0 18697
98418dba
CW
18698fi
18699done
b5de8dc0 18700
c0d27fcc 18701
98418dba 18702# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18703{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18704echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18705if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18706 echo $ECHO_N "(cached) $ECHO_C" >&6
18707else
18708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18709/* confdefs.h. */
18710_ACEOF
18711cat confdefs.h >>conftest.$ac_ext
18712cat >>conftest.$ac_ext <<_ACEOF
18713/* end confdefs.h. */
6bae0ccf 18714#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18715#ifdef LDAV_PRIVILEGED
18716Yowza Am I SETGID yet
18717#endif
18718_ACEOF
18719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18720 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18721 ac_cv_func_getloadavg_setgid=yes
18722else
18723 ac_cv_func_getloadavg_setgid=no
18724fi
18725rm -f conftest*
b5de8dc0 18726
98418dba 18727fi
ca81d7a0
JD
18728{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18729echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18730if test $ac_cv_func_getloadavg_setgid = yes; then
18731 NEED_SETGID=true
b5de8dc0 18732
c0d27fcc 18733cat >>confdefs.h <<\_ACEOF
98418dba 18734#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18735_ACEOF
98418dba 18736
b5de8dc0 18737else
98418dba 18738 NEED_SETGID=false
b5de8dc0 18739fi
98418dba
CW
18740
18741if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18742 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18743echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18744if test "${ac_cv_group_kmem+set}" = set; then
18745 echo $ECHO_N "(cached) $ECHO_C" >&6
18746else
18747 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18748 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18749 # If we got an error (system does not support symlinks), try without -L.
18750 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18751 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18752 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18753 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18754 / /s/.* //;p;'`
18755
b5de8dc0 18756fi
ca81d7a0
JD
18757{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18758echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18759 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18760fi
98418dba
CW
18761if test "x$ac_save_LIBS" = x; then
18762 GETLOADAVG_LIBS=$LIBS
18763else
18764 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18765fi
98418dba 18766LIBS=$ac_save_LIBS
b5de8dc0 18767
c0d27fcc
MR
18768
18769
ca81d7a0
JD
18770{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18771echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18772if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18773 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18774else
b936fae4 18775 while :; do
503d2be0 18776 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18777/* confdefs.h. */
18778_ACEOF
18779cat confdefs.h >>conftest.$ac_ext
18780cat >>conftest.$ac_ext <<_ACEOF
18781/* end confdefs.h. */
ecd43cb9
GM
18782#include <sys/types.h> /* for off_t */
18783 #include <stdio.h>
503d2be0
AS
18784int
18785main ()
18786{
ecd43cb9
GM
18787int (*fp) (FILE *, off_t, int) = fseeko;
18788 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18789 ;
18790 return 0;
18791}
18792_ACEOF
f053c89f
CY
18793rm -f conftest.$ac_objext conftest$ac_exeext
18794if { (ac_try="$ac_link"
ca81d7a0
JD
18795case "(($ac_try" in
18796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18797 *) ac_try_echo=$ac_try;;
18798esac
18799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18800 (eval "$ac_link") 2>conftest.er1
b936fae4 18801 ac_status=$?
edfaf76d
LK
18802 grep -v '^ *+' conftest.er1 >conftest.err
18803 rm -f conftest.er1
18804 cat conftest.err >&5
c0d27fcc 18805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18806 (exit $ac_status); } && {
18807 test -z "$ac_c_werror_flag" ||
18808 test ! -s conftest.err
18809 } && test -s conftest$ac_exeext &&
18810 $as_test_x conftest$ac_exeext; then
18811 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18812else
18813 echo "$as_me: failed program was:" >&5
19650fd6
AS
18814sed 's/^/| /' conftest.$ac_ext >&5
18815
ca81d7a0 18816
b936fae4 18817fi
ca81d7a0 18818
f053c89f
CY
18819rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18820 conftest$ac_exeext conftest.$ac_ext
b936fae4 18821 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18822/* confdefs.h. */
18823_ACEOF
18824cat confdefs.h >>conftest.$ac_ext
18825cat >>conftest.$ac_ext <<_ACEOF
18826/* end confdefs.h. */
b936fae4 18827#define _LARGEFILE_SOURCE 1
ecd43cb9
GM
18828#include <sys/types.h> /* for off_t */
18829 #include <stdio.h>
b936fae4
AS
18830int
18831main ()
18832{
ecd43cb9
GM
18833int (*fp) (FILE *, off_t, int) = fseeko;
18834 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18835 ;
18836 return 0;
18837}
18838_ACEOF
f053c89f
CY
18839rm -f conftest.$ac_objext conftest$ac_exeext
18840if { (ac_try="$ac_link"
ca81d7a0
JD
18841case "(($ac_try" in
18842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18843 *) ac_try_echo=$ac_try;;
18844esac
18845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18846 (eval "$ac_link") 2>conftest.er1
b936fae4 18847 ac_status=$?
edfaf76d
LK
18848 grep -v '^ *+' conftest.er1 >conftest.err
18849 rm -f conftest.er1
18850 cat conftest.err >&5
c0d27fcc 18851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18852 (exit $ac_status); } && {
18853 test -z "$ac_c_werror_flag" ||
18854 test ! -s conftest.err
18855 } && test -s conftest$ac_exeext &&
18856 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18857 ac_cv_sys_largefile_source=1; break
18858else
18859 echo "$as_me: failed program was:" >&5
19650fd6
AS
18860sed 's/^/| /' conftest.$ac_ext >&5
18861
ca81d7a0 18862
b936fae4 18863fi
ca81d7a0 18864
f053c89f
CY
18865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18866 conftest$ac_exeext conftest.$ac_ext
18867 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18868 break
18869done
18870fi
ca81d7a0
JD
18871{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18872echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18873case $ac_cv_sys_largefile_source in #(
18874 no | unknown) ;;
18875 *)
c0d27fcc 18876cat >>confdefs.h <<_ACEOF
b936fae4 18877#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18878_ACEOF
f053c89f
CY
18879;;
18880esac
b936fae4 18881rm -f conftest*
4c343001 18882
b936fae4
AS
18883# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18884# in glibc 2.1.3, but that breaks too many other things.
18885# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18886if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18887
c0d27fcc 18888cat >>confdefs.h <<\_ACEOF
b936fae4 18889#define HAVE_FSEEKO 1
c0d27fcc 18890_ACEOF
b936fae4 18891
4c343001
DL
18892fi
18893
c0d27fcc 18894
52dbaac8
PE
18895# Configure getopt.
18896# getopt.m4 serial 10
18897
18898# The getopt module assume you want GNU getopt, with getopt_long etc,
18899# rather than vanilla POSIX getopt. This means your your code should
18900# always include <getopt.h> for the getopt prototypes.
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912# Prerequisites of lib/getopt*.
18913
18914
18915
10a3b1a1 18916
52dbaac8
PE
18917 GETOPT_H=
18918
18919for ac_header in getopt.h
18920do
18921as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18922if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18923 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18924echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18925if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18926 echo $ECHO_N "(cached) $ECHO_C" >&6
18927fi
ca81d7a0
JD
18928ac_res=`eval echo '${'$as_ac_Header'}'`
18929 { echo "$as_me:$LINENO: result: $ac_res" >&5
18930echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18931else
18932 # Is the header compilable?
ca81d7a0
JD
18933{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18934echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18935cat >conftest.$ac_ext <<_ACEOF
18936/* confdefs.h. */
18937_ACEOF
18938cat confdefs.h >>conftest.$ac_ext
18939cat >>conftest.$ac_ext <<_ACEOF
18940/* end confdefs.h. */
18941$ac_includes_default
18942#include <$ac_header>
18943_ACEOF
18944rm -f conftest.$ac_objext
ca81d7a0
JD
18945if { (ac_try="$ac_compile"
18946case "(($ac_try" in
18947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18948 *) ac_try_echo=$ac_try;;
18949esac
18950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18951 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18952 ac_status=$?
18953 grep -v '^ *+' conftest.er1 >conftest.err
18954 rm -f conftest.er1
18955 cat conftest.err >&5
18956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18957 (exit $ac_status); } && {
18958 test -z "$ac_c_werror_flag" ||
18959 test ! -s conftest.err
18960 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18961 ac_header_compiler=yes
18962else
18963 echo "$as_me: failed program was:" >&5
18964sed 's/^/| /' conftest.$ac_ext >&5
18965
ca81d7a0 18966 ac_header_compiler=no
52dbaac8 18967fi
ca81d7a0
JD
18968
18969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18970{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18971echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18972
18973# Is the header present?
ca81d7a0
JD
18974{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18975echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18976cat >conftest.$ac_ext <<_ACEOF
18977/* confdefs.h. */
18978_ACEOF
18979cat confdefs.h >>conftest.$ac_ext
18980cat >>conftest.$ac_ext <<_ACEOF
18981/* end confdefs.h. */
18982#include <$ac_header>
18983_ACEOF
ca81d7a0
JD
18984if { (ac_try="$ac_cpp conftest.$ac_ext"
18985case "(($ac_try" in
18986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18987 *) ac_try_echo=$ac_try;;
18988esac
18989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18990 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18991 ac_status=$?
18992 grep -v '^ *+' conftest.er1 >conftest.err
18993 rm -f conftest.er1
18994 cat conftest.err >&5
18995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18996 (exit $ac_status); } >/dev/null && {
18997 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18998 test ! -s conftest.err
18999 }; then
52dbaac8
PE
19000 ac_header_preproc=yes
19001else
19002 echo "$as_me: failed program was:" >&5
19003sed 's/^/| /' conftest.$ac_ext >&5
19004
19005 ac_header_preproc=no
19006fi
ca81d7a0 19007
52dbaac8 19008rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19009{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19010echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19011
19012# So? What about this header?
19013case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19014 yes:no: )
19015 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19016echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19017 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19018echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19019 ac_header_preproc=yes
19020 ;;
19021 no:yes:* )
19022 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19023echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19024 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19025echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19026 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19027echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19028 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19029echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19030 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19031echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19032 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19033echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19034
52dbaac8
PE
19035 ;;
19036esac
ca81d7a0
JD
19037{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19038echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19039if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19040 echo $ECHO_N "(cached) $ECHO_C" >&6
19041else
19042 eval "$as_ac_Header=\$ac_header_preproc"
19043fi
ca81d7a0
JD
19044ac_res=`eval echo '${'$as_ac_Header'}'`
19045 { echo "$as_me:$LINENO: result: $ac_res" >&5
19046echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19047
19048fi
19049if test `eval echo '${'$as_ac_Header'}'` = yes; then
19050 cat >>confdefs.h <<_ACEOF
19051#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19052_ACEOF
19053
19054else
19055 GETOPT_H=getopt.h
19056fi
19057
19058done
19059
19060 if test -z "$GETOPT_H"; then
19061
19062for ac_func in getopt_long_only
19063do
19064as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19065{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19066echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19067if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19068 echo $ECHO_N "(cached) $ECHO_C" >&6
19069else
19070 cat >conftest.$ac_ext <<_ACEOF
19071/* confdefs.h. */
19072_ACEOF
19073cat confdefs.h >>conftest.$ac_ext
19074cat >>conftest.$ac_ext <<_ACEOF
19075/* end confdefs.h. */
19076/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19077 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19078#define $ac_func innocuous_$ac_func
19079
19080/* System header to define __stub macros and hopefully few prototypes,
19081 which can conflict with char $ac_func (); below.
19082 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19083 <limits.h> exists even on freestanding compilers. */
19084
19085#ifdef __STDC__
19086# include <limits.h>
19087#else
19088# include <assert.h>
19089#endif
19090
19091#undef $ac_func
19092
ca81d7a0
JD
19093/* Override any GCC internal prototype to avoid an error.
19094 Use char because int might match the return type of a GCC
19095 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19096#ifdef __cplusplus
19097extern "C"
52dbaac8 19098#endif
52dbaac8
PE
19099char $ac_func ();
19100/* The GNU C library defines this for functions which it implements
19101 to always fail with ENOSYS. Some functions are actually named
19102 something starting with __ and the normal name is an alias. */
ca81d7a0 19103#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19104choke me
52dbaac8
PE
19105#endif
19106
19107int
19108main ()
19109{
ca81d7a0 19110return $ac_func ();
52dbaac8
PE
19111 ;
19112 return 0;
19113}
19114_ACEOF
19115rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19116if { (ac_try="$ac_link"
19117case "(($ac_try" in
19118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19119 *) ac_try_echo=$ac_try;;
19120esac
19121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19122 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19123 ac_status=$?
19124 grep -v '^ *+' conftest.er1 >conftest.err
19125 rm -f conftest.er1
19126 cat conftest.err >&5
19127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19128 (exit $ac_status); } && {
19129 test -z "$ac_c_werror_flag" ||
19130 test ! -s conftest.err
19131 } && test -s conftest$ac_exeext &&
19132 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19133 eval "$as_ac_var=yes"
19134else
19135 echo "$as_me: failed program was:" >&5
19136sed 's/^/| /' conftest.$ac_ext >&5
19137
ca81d7a0 19138 eval "$as_ac_var=no"
52dbaac8 19139fi
ca81d7a0 19140
f053c89f 19141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19142 conftest$ac_exeext conftest.$ac_ext
19143fi
ca81d7a0
JD
19144ac_res=`eval echo '${'$as_ac_var'}'`
19145 { echo "$as_me:$LINENO: result: $ac_res" >&5
19146echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19147if test `eval echo '${'$as_ac_var'}'` = yes; then
19148 cat >>confdefs.h <<_ACEOF
19149#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19150_ACEOF
19151
19152else
19153 GETOPT_H=getopt.h
19154fi
19155done
19156
19157 fi
19158
19159 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19160 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19161echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19162if test "${ac_cv_have_decl_optreset+set}" = set; then
19163 echo $ECHO_N "(cached) $ECHO_C" >&6
19164else
19165 cat >conftest.$ac_ext <<_ACEOF
19166/* confdefs.h. */
19167_ACEOF
19168cat confdefs.h >>conftest.$ac_ext
19169cat >>conftest.$ac_ext <<_ACEOF
19170/* end confdefs.h. */
19171#include <getopt.h>
19172
19173int
19174main ()
19175{
19176#ifndef optreset
f053c89f 19177 (void) optreset;
52dbaac8
PE
19178#endif
19179
19180 ;
19181 return 0;
19182}
19183_ACEOF
19184rm -f conftest.$ac_objext
ca81d7a0
JD
19185if { (ac_try="$ac_compile"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
19190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19191 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19192 ac_status=$?
19193 grep -v '^ *+' conftest.er1 >conftest.err
19194 rm -f conftest.er1
19195 cat conftest.err >&5
19196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19197 (exit $ac_status); } && {
19198 test -z "$ac_c_werror_flag" ||
19199 test ! -s conftest.err
19200 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19201 ac_cv_have_decl_optreset=yes
19202else
19203 echo "$as_me: failed program was:" >&5
19204sed 's/^/| /' conftest.$ac_ext >&5
19205
ca81d7a0 19206 ac_cv_have_decl_optreset=no
52dbaac8 19207fi
ca81d7a0
JD
19208
19209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19210fi
ca81d7a0
JD
19211{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19212echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19213if test $ac_cv_have_decl_optreset = yes; then
19214 GETOPT_H=getopt.h
19215fi
19216
19217 fi
19218
19219 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19220 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19221echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19222if test "${gl_cv_func_gnu_getopt+set}" = set; then
19223 echo $ECHO_N "(cached) $ECHO_C" >&6
19224else
19225 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19226 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19227echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19228if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19229 echo $ECHO_N "(cached) $ECHO_C" >&6
19230else
19231 cat >conftest.$ac_ext <<_ACEOF
19232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
19237#include <getopt.h>
19238
19239int
19240main ()
19241{
19242#ifndef getopt_clip
f053c89f 19243 (void) getopt_clip;
52dbaac8
PE
19244#endif
19245
19246 ;
19247 return 0;
19248}
19249_ACEOF
19250rm -f conftest.$ac_objext
ca81d7a0
JD
19251if { (ac_try="$ac_compile"
19252case "(($ac_try" in
19253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19254 *) ac_try_echo=$ac_try;;
19255esac
19256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19257 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19258 ac_status=$?
19259 grep -v '^ *+' conftest.er1 >conftest.err
19260 rm -f conftest.er1
19261 cat conftest.err >&5
19262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19263 (exit $ac_status); } && {
19264 test -z "$ac_c_werror_flag" ||
19265 test ! -s conftest.err
19266 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19267 ac_cv_have_decl_getopt_clip=yes
19268else
19269 echo "$as_me: failed program was:" >&5
19270sed 's/^/| /' conftest.$ac_ext >&5
19271
ca81d7a0 19272 ac_cv_have_decl_getopt_clip=no
52dbaac8 19273fi
ca81d7a0
JD
19274
19275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19276fi
ca81d7a0
JD
19277{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19278echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19279if test $ac_cv_have_decl_getopt_clip = yes; then
19280 gl_cv_func_gnu_getopt=no
19281else
19282 gl_cv_func_gnu_getopt=yes
19283fi
19284
19285else
19286 cat >conftest.$ac_ext <<_ACEOF
19287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
19292#include <getopt.h>
19293int
19294main ()
19295{
19296
19297 char *myargv[3];
19298 myargv[0] = "conftest";
19299 myargv[1] = "-+";
19300 myargv[2] = 0;
19301 return getopt (2, myargv, "+a") != '?';
19302
19303 ;
19304 return 0;
19305}
19306_ACEOF
19307rm -f conftest$ac_exeext
ca81d7a0
JD
19308if { (ac_try="$ac_link"
19309case "(($ac_try" in
19310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19311 *) ac_try_echo=$ac_try;;
19312esac
19313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19314 (eval "$ac_link") 2>&5
52dbaac8
PE
19315 ac_status=$?
19316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19318 { (case "(($ac_try" in
19319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19320 *) ac_try_echo=$ac_try;;
19321esac
19322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19323 (eval "$ac_try") 2>&5
52dbaac8
PE
19324 ac_status=$?
19325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326 (exit $ac_status); }; }; then
19327 gl_cv_func_gnu_getopt=yes
19328else
19329 echo "$as_me: program exited with status $ac_status" >&5
19330echo "$as_me: failed program was:" >&5
19331sed 's/^/| /' conftest.$ac_ext >&5
19332
19333( exit $ac_status )
19334gl_cv_func_gnu_getopt=no
19335fi
ca81d7a0 19336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19337fi
ca81d7a0
JD
19338
19339
52dbaac8 19340fi
ca81d7a0
JD
19341{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19342echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19343 if test "$gl_cv_func_gnu_getopt" = "no"; then
19344 GETOPT_H=getopt.h
19345 fi
19346 fi
19347
19348
19349
19350 if test -n "$GETOPT_H"; then
19351
19352
19353 GETOPT_H=getopt.h
19354
19355cat >>confdefs.h <<\_ACEOF
19356#define __GETOPT_PREFIX rpl_
19357_ACEOF
19358
19359
19360
19361 :
19362 GETOPTOBJS='getopt.o getopt1.o'
19363
19364fi
19365
19366
19367
19368
ca81d7a0
JD
19369{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19370echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19371if test "${ac_cv_func_getpgrp_void+set}" = set; then
19372 echo $ECHO_N "(cached) $ECHO_C" >&6
19373else
19374 # Use it with a single arg.
19375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19376/* confdefs.h. */
19377_ACEOF
19378cat confdefs.h >>conftest.$ac_ext
19379cat >>conftest.$ac_ext <<_ACEOF
19380/* end confdefs.h. */
cd958eb3
MB
19381$ac_includes_default
19382int
19383main ()
19384{
19385getpgrp (0);
19386 ;
19387 return 0;
19388}
19389_ACEOF
19390rm -f conftest.$ac_objext
ca81d7a0
JD
19391if { (ac_try="$ac_compile"
19392case "(($ac_try" in
19393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19394 *) ac_try_echo=$ac_try;;
19395esac
19396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19397 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19398 ac_status=$?
edfaf76d
LK
19399 grep -v '^ *+' conftest.er1 >conftest.err
19400 rm -f conftest.er1
19401 cat conftest.err >&5
cd958eb3 19402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19403 (exit $ac_status); } && {
19404 test -z "$ac_c_werror_flag" ||
19405 test ! -s conftest.err
19406 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19407 ac_cv_func_getpgrp_void=no
19408else
19409 echo "$as_me: failed program was:" >&5
19650fd6
AS
19410sed 's/^/| /' conftest.$ac_ext >&5
19411
ca81d7a0 19412 ac_cv_func_getpgrp_void=yes
cd958eb3 19413fi
ca81d7a0
JD
19414
19415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19416
19417fi
ca81d7a0
JD
19418{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19419echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19420if test $ac_cv_func_getpgrp_void = yes; then
19421
19422cat >>confdefs.h <<\_ACEOF
19423#define GETPGRP_VOID 1
19424_ACEOF
19425
19426fi
19427
19428
973a76b1
DL
19429
19430for ac_func in strftime
19431do
19432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19433{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19435if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19436 echo $ECHO_N "(cached) $ECHO_C" >&6
19437else
19438 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19439/* confdefs.h. */
19440_ACEOF
19441cat confdefs.h >>conftest.$ac_ext
19442cat >>conftest.$ac_ext <<_ACEOF
19443/* end confdefs.h. */
edfaf76d
LK
19444/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19446#define $ac_func innocuous_$ac_func
19447
973a76b1 19448/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19449 which can conflict with char $ac_func (); below.
19450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19451 <limits.h> exists even on freestanding compilers. */
edfaf76d 19452
19650fd6
AS
19453#ifdef __STDC__
19454# include <limits.h>
19455#else
19456# include <assert.h>
19457#endif
edfaf76d
LK
19458
19459#undef $ac_func
19460
ca81d7a0
JD
19461/* Override any GCC internal prototype to avoid an error.
19462 Use char because int might match the return type of a GCC
19463 builtin and then its argument prototype would still apply. */
973a76b1
DL
19464#ifdef __cplusplus
19465extern "C"
973a76b1 19466#endif
973a76b1
DL
19467char $ac_func ();
19468/* The GNU C library defines this for functions which it implements
19469 to always fail with ENOSYS. Some functions are actually named
19470 something starting with __ and the normal name is an alias. */
ca81d7a0 19471#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19472choke me
973a76b1
DL
19473#endif
19474
19650fd6
AS
19475int
19476main ()
19477{
ca81d7a0 19478return $ac_func ();
973a76b1
DL
19479 ;
19480 return 0;
19481}
19482_ACEOF
19483rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19484if { (ac_try="$ac_link"
19485case "(($ac_try" in
19486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19487 *) ac_try_echo=$ac_try;;
19488esac
19489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19490 (eval "$ac_link") 2>conftest.er1
973a76b1 19491 ac_status=$?
edfaf76d
LK
19492 grep -v '^ *+' conftest.er1 >conftest.err
19493 rm -f conftest.er1
19494 cat conftest.err >&5
973a76b1 19495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19496 (exit $ac_status); } && {
19497 test -z "$ac_c_werror_flag" ||
19498 test ! -s conftest.err
19499 } && test -s conftest$ac_exeext &&
19500 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19501 eval "$as_ac_var=yes"
19502else
19503 echo "$as_me: failed program was:" >&5
19650fd6
AS
19504sed 's/^/| /' conftest.$ac_ext >&5
19505
ca81d7a0 19506 eval "$as_ac_var=no"
973a76b1 19507fi
ca81d7a0 19508
f053c89f 19509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19510 conftest$ac_exeext conftest.$ac_ext
973a76b1 19511fi
ca81d7a0
JD
19512ac_res=`eval echo '${'$as_ac_var'}'`
19513 { echo "$as_me:$LINENO: result: $ac_res" >&5
19514echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19515if test `eval echo '${'$as_ac_var'}'` = yes; then
19516 cat >>confdefs.h <<_ACEOF
19517#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19518_ACEOF
19519
19520else
19521 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19522{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19523echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19524if test "${ac_cv_lib_intl_strftime+set}" = set; then
19525 echo $ECHO_N "(cached) $ECHO_C" >&6
19526else
19527 ac_check_lib_save_LIBS=$LIBS
19528LIBS="-lintl $LIBS"
19529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19530/* confdefs.h. */
19531_ACEOF
19532cat confdefs.h >>conftest.$ac_ext
19533cat >>conftest.$ac_ext <<_ACEOF
19534/* end confdefs.h. */
973a76b1 19535
ca81d7a0
JD
19536/* Override any GCC internal prototype to avoid an error.
19537 Use char because int might match the return type of a GCC
19538 builtin and then its argument prototype would still apply. */
973a76b1
DL
19539#ifdef __cplusplus
19540extern "C"
19541#endif
973a76b1
DL
19542char strftime ();
19543int
19544main ()
19545{
ca81d7a0 19546return strftime ();
973a76b1
DL
19547 ;
19548 return 0;
19549}
19550_ACEOF
19551rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19552if { (ac_try="$ac_link"
19553case "(($ac_try" in
19554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19555 *) ac_try_echo=$ac_try;;
19556esac
19557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19558 (eval "$ac_link") 2>conftest.er1
973a76b1 19559 ac_status=$?
edfaf76d
LK
19560 grep -v '^ *+' conftest.er1 >conftest.err
19561 rm -f conftest.er1
19562 cat conftest.err >&5
973a76b1 19563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19564 (exit $ac_status); } && {
19565 test -z "$ac_c_werror_flag" ||
19566 test ! -s conftest.err
19567 } && test -s conftest$ac_exeext &&
19568 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19569 ac_cv_lib_intl_strftime=yes
19570else
19571 echo "$as_me: failed program was:" >&5
19650fd6
AS
19572sed 's/^/| /' conftest.$ac_ext >&5
19573
ca81d7a0 19574 ac_cv_lib_intl_strftime=no
973a76b1 19575fi
ca81d7a0 19576
f053c89f 19577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19578 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19579LIBS=$ac_check_lib_save_LIBS
19580fi
ca81d7a0
JD
19581{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19582echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19583if test $ac_cv_lib_intl_strftime = yes; then
19584 cat >>confdefs.h <<\_ACEOF
19585#define HAVE_STRFTIME 1
19586_ACEOF
19587
19588LIBS="-lintl $LIBS"
19589fi
19590
19591fi
19592done
19593
19594
b936fae4
AS
19595# UNIX98 PTYs.
19596
19597for ac_func in grantpt
503d2be0
AS
19598do
19599as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19600{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19601echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19602if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19603 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19604else
503d2be0 19605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19606/* confdefs.h. */
19607_ACEOF
19608cat confdefs.h >>conftest.$ac_ext
19609cat >>conftest.$ac_ext <<_ACEOF
19610/* end confdefs.h. */
edfaf76d
LK
19611/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19612 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19613#define $ac_func innocuous_$ac_func
19614
503d2be0 19615/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19616 which can conflict with char $ac_func (); below.
19617 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19618 <limits.h> exists even on freestanding compilers. */
edfaf76d 19619
19650fd6
AS
19620#ifdef __STDC__
19621# include <limits.h>
19622#else
19623# include <assert.h>
19624#endif
edfaf76d
LK
19625
19626#undef $ac_func
19627
ca81d7a0
JD
19628/* Override any GCC internal prototype to avoid an error.
19629 Use char because int might match the return type of a GCC
19630 builtin and then its argument prototype would still apply. */
503d2be0
AS
19631#ifdef __cplusplus
19632extern "C"
19633#endif
503d2be0 19634char $ac_func ();
503d2be0
AS
19635/* The GNU C library defines this for functions which it implements
19636 to always fail with ENOSYS. Some functions are actually named
19637 something starting with __ and the normal name is an alias. */
ca81d7a0 19638#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19639choke me
503d2be0 19640#endif
4c343001 19641
19650fd6
AS
19642int
19643main ()
19644{
ca81d7a0 19645return $ac_func ();
503d2be0
AS
19646 ;
19647 return 0;
19648}
19649_ACEOF
19650rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19651if { (ac_try="$ac_link"
19652case "(($ac_try" in
19653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19654 *) ac_try_echo=$ac_try;;
19655esac
19656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19657 (eval "$ac_link") 2>conftest.er1
503d2be0 19658 ac_status=$?
edfaf76d
LK
19659 grep -v '^ *+' conftest.er1 >conftest.err
19660 rm -f conftest.er1
19661 cat conftest.err >&5
c0d27fcc 19662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19663 (exit $ac_status); } && {
19664 test -z "$ac_c_werror_flag" ||
19665 test ! -s conftest.err
19666 } && test -s conftest$ac_exeext &&
19667 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19668 eval "$as_ac_var=yes"
19669else
19670 echo "$as_me: failed program was:" >&5
19650fd6
AS
19671sed 's/^/| /' conftest.$ac_ext >&5
19672
ca81d7a0 19673 eval "$as_ac_var=no"
503d2be0 19674fi
ca81d7a0 19675
f053c89f 19676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19677 conftest$ac_exeext conftest.$ac_ext
503d2be0 19678fi
ca81d7a0
JD
19679ac_res=`eval echo '${'$as_ac_var'}'`
19680 { echo "$as_me:$LINENO: result: $ac_res" >&5
19681echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19682if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19683 cat >>confdefs.h <<_ACEOF
503d2be0 19684#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19685_ACEOF
4c343001
DL
19686
19687fi
503d2be0
AS
19688done
19689
c0d27fcc 19690
b936fae4 19691# PTY-related GNU extensions.
4c343001 19692
b936fae4
AS
19693for ac_func in getpt
19694do
19695as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19696{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19697echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19698if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19699 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19700else
b936fae4 19701 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19702/* confdefs.h. */
19703_ACEOF
19704cat confdefs.h >>conftest.$ac_ext
19705cat >>conftest.$ac_ext <<_ACEOF
19706/* end confdefs.h. */
edfaf76d
LK
19707/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19708 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19709#define $ac_func innocuous_$ac_func
19710
087121cc 19711/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19712 which can conflict with char $ac_func (); below.
19713 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19714 <limits.h> exists even on freestanding compilers. */
edfaf76d 19715
19650fd6
AS
19716#ifdef __STDC__
19717# include <limits.h>
19718#else
19719# include <assert.h>
19720#endif
edfaf76d
LK
19721
19722#undef $ac_func
19723
ca81d7a0
JD
19724/* Override any GCC internal prototype to avoid an error.
19725 Use char because int might match the return type of a GCC
19726 builtin and then its argument prototype would still apply. */
503d2be0
AS
19727#ifdef __cplusplus
19728extern "C"
19729#endif
503d2be0 19730char $ac_func ();
087121cc
GM
19731/* The GNU C library defines this for functions which it implements
19732 to always fail with ENOSYS. Some functions are actually named
19733 something starting with __ and the normal name is an alias. */
ca81d7a0 19734#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19735choke me
087121cc
GM
19736#endif
19737
19650fd6
AS
19738int
19739main ()
19740{
ca81d7a0 19741return $ac_func ();
503d2be0
AS
19742 ;
19743 return 0;
19744}
19745_ACEOF
19746rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19747if { (ac_try="$ac_link"
19748case "(($ac_try" in
19749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19750 *) ac_try_echo=$ac_try;;
19751esac
19752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19753 (eval "$ac_link") 2>conftest.er1
503d2be0 19754 ac_status=$?
edfaf76d
LK
19755 grep -v '^ *+' conftest.er1 >conftest.err
19756 rm -f conftest.er1
19757 cat conftest.err >&5
c0d27fcc 19758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19759 (exit $ac_status); } && {
19760 test -z "$ac_c_werror_flag" ||
19761 test ! -s conftest.err
19762 } && test -s conftest$ac_exeext &&
19763 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19764 eval "$as_ac_var=yes"
19765else
19766 echo "$as_me: failed program was:" >&5
19650fd6
AS
19767sed 's/^/| /' conftest.$ac_ext >&5
19768
ca81d7a0 19769 eval "$as_ac_var=no"
503d2be0 19770fi
ca81d7a0 19771
f053c89f 19772rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19773 conftest$ac_exeext conftest.$ac_ext
503d2be0 19774fi
ca81d7a0
JD
19775ac_res=`eval echo '${'$as_ac_var'}'`
19776 { echo "$as_me:$LINENO: result: $ac_res" >&5
19777echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19778if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19779 cat >>confdefs.h <<_ACEOF
503d2be0 19780#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19781_ACEOF
087121cc 19782
087121cc
GM
19783fi
19784done
19785
c0d27fcc 19786
ba4481b5
DL
19787# Check this now, so that we will NOT find the above functions in ncurses.
19788# That is because we have not set up to link ncurses in lib-src.
19789# It's better to believe a function is not available
19790# than to expect to find it in ncurses.
503d2be0 19791
ca81d7a0
JD
19792{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19793echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19794if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19795 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19796else
503d2be0 19797 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19798LIBS="-lncurses $LIBS"
503d2be0 19799cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19800/* confdefs.h. */
19801_ACEOF
19802cat confdefs.h >>conftest.$ac_ext
19803cat >>conftest.$ac_ext <<_ACEOF
19804/* end confdefs.h. */
503d2be0 19805
ca81d7a0
JD
19806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
503d2be0
AS
19809#ifdef __cplusplus
19810extern "C"
19811#endif
503d2be0
AS
19812char tparm ();
19813int
19814main ()
19815{
ca81d7a0 19816return tparm ();
503d2be0
AS
19817 ;
19818 return 0;
19819}
19820_ACEOF
19821rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19822if { (ac_try="$ac_link"
19823case "(($ac_try" in
19824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19825 *) ac_try_echo=$ac_try;;
19826esac
19827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19828 (eval "$ac_link") 2>conftest.er1
503d2be0 19829 ac_status=$?
edfaf76d
LK
19830 grep -v '^ *+' conftest.er1 >conftest.err
19831 rm -f conftest.er1
19832 cat conftest.err >&5
c0d27fcc 19833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19834 (exit $ac_status); } && {
19835 test -z "$ac_c_werror_flag" ||
19836 test ! -s conftest.err
19837 } && test -s conftest$ac_exeext &&
19838 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19839 ac_cv_lib_ncurses_tparm=yes
19840else
19841 echo "$as_me: failed program was:" >&5
19650fd6
AS
19842sed 's/^/| /' conftest.$ac_ext >&5
19843
ca81d7a0 19844 ac_cv_lib_ncurses_tparm=no
503d2be0 19845fi
ca81d7a0 19846
f053c89f 19847rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19848 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19849LIBS=$ac_check_lib_save_LIBS
19850fi
ca81d7a0
JD
19851{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19852echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19853if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19854 cat >>confdefs.h <<_ACEOF
503d2be0 19855#define HAVE_LIBNCURSES 1
c0d27fcc 19856_ACEOF
ba4481b5
DL
19857
19858 LIBS="-lncurses $LIBS"
19859
ba4481b5
DL
19860fi
19861
c0d27fcc 19862
bc3512d0
CY
19863# Do we have res_init, for detecting changes in /etc/resolv.conf?
19864
19865resolv=no
074767f2 19866cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19867/* confdefs.h. */
19868_ACEOF
19869cat confdefs.h >>conftest.$ac_ext
19870cat >>conftest.$ac_ext <<_ACEOF
19871/* end confdefs.h. */
074767f2
AS
19872#include <netinet/in.h>
19873#include <arpa/nameser.h>
19874#include <resolv.h>
bc3512d0
CY
19875int
19876main ()
19877{
074767f2 19878return res_init();
bc3512d0
CY
19879 ;
19880 return 0;
19881}
19882_ACEOF
19883rm -f conftest.$ac_objext conftest$ac_exeext
19884if { (ac_try="$ac_link"
19885case "(($ac_try" in
19886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19887 *) ac_try_echo=$ac_try;;
19888esac
19889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19890 (eval "$ac_link") 2>conftest.er1
19891 ac_status=$?
19892 grep -v '^ *+' conftest.er1 >conftest.err
19893 rm -f conftest.er1
19894 cat conftest.err >&5
19895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19896 (exit $ac_status); } && {
19897 test -z "$ac_c_werror_flag" ||
19898 test ! -s conftest.err
19899 } && test -s conftest$ac_exeext &&
19900 $as_test_x conftest$ac_exeext; then
074767f2 19901 have_res_init=yes
bc3512d0
CY
19902else
19903 echo "$as_me: failed program was:" >&5
19904sed 's/^/| /' conftest.$ac_ext >&5
19905
074767f2 19906 have_res_init=no
bc3512d0
CY
19907fi
19908
19909rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19910 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19911if test "$have_res_init" = no; then
19912 OLIBS="$LIBS"
19913 LIBS="$LIBS -lresolv"
19914 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19915echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19916 cat >conftest.$ac_ext <<_ACEOF
19917/* confdefs.h. */
19918_ACEOF
19919cat confdefs.h >>conftest.$ac_ext
19920cat >>conftest.$ac_ext <<_ACEOF
19921/* end confdefs.h. */
19922#include <netinet/in.h>
19923#include <arpa/nameser.h>
19924#include <resolv.h>
19925int
19926main ()
19927{
074767f2 19928return res_init();
bc3512d0
CY
19929 ;
19930 return 0;
19931}
19932_ACEOF
19933rm -f conftest.$ac_objext conftest$ac_exeext
19934if { (ac_try="$ac_link"
19935case "(($ac_try" in
19936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19937 *) ac_try_echo=$ac_try;;
19938esac
19939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19940 (eval "$ac_link") 2>conftest.er1
19941 ac_status=$?
19942 grep -v '^ *+' conftest.er1 >conftest.err
19943 rm -f conftest.er1
19944 cat conftest.err >&5
19945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19946 (exit $ac_status); } && {
19947 test -z "$ac_c_werror_flag" ||
19948 test ! -s conftest.err
19949 } && test -s conftest$ac_exeext &&
19950 $as_test_x conftest$ac_exeext; then
19951 have_res_init=yes
19952else
19953 echo "$as_me: failed program was:" >&5
19954sed 's/^/| /' conftest.$ac_ext >&5
19955
19956 have_res_init=no
19957fi
19958
19959rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19960 conftest$ac_exeext conftest.$ac_ext
19961 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19962echo "${ECHO_T}$have_res_init" >&6; }
19963 if test "$have_res_init" = yes ; then
19964 resolv=yes
19965 fi
19966 LIBS="$OLIBS"
19967fi
19968
19969if test "$have_res_init" = yes; then
19970
19971cat >>confdefs.h <<\_ACEOF
19972#define HAVE_RES_INIT 1
19973_ACEOF
19974
19975fi
19976
84e70f78 19977# Do we need the Hesiod library to provide the support routines?
ff1095d1 19978if test "$with_hesiod" != no ; then
84e70f78 19979 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
19980 { echo "$as_me:$LINENO: checking for res_send" >&5
19981echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19982if test "${ac_cv_func_res_send+set}" = set; then
19983 echo $ECHO_N "(cached) $ECHO_C" >&6
19984else
19985 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19986/* confdefs.h. */
19987_ACEOF
19988cat confdefs.h >>conftest.$ac_ext
19989cat >>conftest.$ac_ext <<_ACEOF
19990/* end confdefs.h. */
edfaf76d
LK
19991/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19992 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19993#define res_send innocuous_res_send
19994
84e70f78 19995/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19996 which can conflict with char res_send (); below.
19997 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19998 <limits.h> exists even on freestanding compilers. */
edfaf76d 19999
19650fd6
AS
20000#ifdef __STDC__
20001# include <limits.h>
20002#else
20003# include <assert.h>
20004#endif
edfaf76d
LK
20005
20006#undef res_send
20007
ca81d7a0
JD
20008/* Override any GCC internal prototype to avoid an error.
20009 Use char because int might match the return type of a GCC
20010 builtin and then its argument prototype would still apply. */
84e70f78
KR
20011#ifdef __cplusplus
20012extern "C"
20013#endif
84e70f78 20014char res_send ();
84e70f78
KR
20015/* The GNU C library defines this for functions which it implements
20016 to always fail with ENOSYS. Some functions are actually named
20017 something starting with __ and the normal name is an alias. */
ca81d7a0 20018#if defined __stub_res_send || defined __stub___res_send
84e70f78 20019choke me
cd958eb3
MB
20020#endif
20021
19650fd6
AS
20022int
20023main ()
20024{
ca81d7a0 20025return res_send ();
84e70f78
KR
20026 ;
20027 return 0;
20028}
20029_ACEOF
20030rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20031if { (ac_try="$ac_link"
20032case "(($ac_try" in
20033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20034 *) ac_try_echo=$ac_try;;
20035esac
20036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20037 (eval "$ac_link") 2>conftest.er1
84e70f78 20038 ac_status=$?
edfaf76d
LK
20039 grep -v '^ *+' conftest.er1 >conftest.err
20040 rm -f conftest.er1
20041 cat conftest.err >&5
c0d27fcc 20042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20043 (exit $ac_status); } && {
20044 test -z "$ac_c_werror_flag" ||
20045 test ! -s conftest.err
20046 } && test -s conftest$ac_exeext &&
20047 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20048 ac_cv_func_res_send=yes
20049else
20050 echo "$as_me: failed program was:" >&5
19650fd6
AS
20051sed 's/^/| /' conftest.$ac_ext >&5
20052
ca81d7a0 20053 ac_cv_func_res_send=no
84e70f78 20054fi
ca81d7a0 20055
f053c89f 20056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20057 conftest$ac_exeext conftest.$ac_ext
84e70f78 20058fi
ca81d7a0
JD
20059{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20060echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20061if test $ac_cv_func_res_send = yes; then
20062 :
20063else
ca81d7a0
JD
20064 { echo "$as_me:$LINENO: checking for __res_send" >&5
20065echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20066if test "${ac_cv_func___res_send+set}" = set; then
20067 echo $ECHO_N "(cached) $ECHO_C" >&6
20068else
20069 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20070/* confdefs.h. */
20071_ACEOF
20072cat confdefs.h >>conftest.$ac_ext
20073cat >>conftest.$ac_ext <<_ACEOF
20074/* end confdefs.h. */
edfaf76d
LK
20075/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20076 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20077#define __res_send innocuous___res_send
20078
84e70f78 20079/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20080 which can conflict with char __res_send (); below.
20081 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20082 <limits.h> exists even on freestanding compilers. */
edfaf76d 20083
19650fd6
AS
20084#ifdef __STDC__
20085# include <limits.h>
20086#else
20087# include <assert.h>
20088#endif
edfaf76d
LK
20089
20090#undef __res_send
20091
ca81d7a0
JD
20092/* Override any GCC internal prototype to avoid an error.
20093 Use char because int might match the return type of a GCC
20094 builtin and then its argument prototype would still apply. */
84e70f78
KR
20095#ifdef __cplusplus
20096extern "C"
20097#endif
84e70f78 20098char __res_send ();
84e70f78
KR
20099/* The GNU C library defines this for functions which it implements
20100 to always fail with ENOSYS. Some functions are actually named
20101 something starting with __ and the normal name is an alias. */
ca81d7a0 20102#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20103choke me
84e70f78
KR
20104#endif
20105
19650fd6
AS
20106int
20107main ()
20108{
ca81d7a0 20109return __res_send ();
84e70f78
KR
20110 ;
20111 return 0;
20112}
20113_ACEOF
20114rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20115if { (ac_try="$ac_link"
20116case "(($ac_try" in
20117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20118 *) ac_try_echo=$ac_try;;
20119esac
20120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20121 (eval "$ac_link") 2>conftest.er1
84e70f78 20122 ac_status=$?
edfaf76d
LK
20123 grep -v '^ *+' conftest.er1 >conftest.err
20124 rm -f conftest.er1
20125 cat conftest.err >&5
c0d27fcc 20126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20127 (exit $ac_status); } && {
20128 test -z "$ac_c_werror_flag" ||
20129 test ! -s conftest.err
20130 } && test -s conftest$ac_exeext &&
20131 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20132 ac_cv_func___res_send=yes
20133else
20134 echo "$as_me: failed program was:" >&5
19650fd6
AS
20135sed 's/^/| /' conftest.$ac_ext >&5
20136
ca81d7a0 20137 ac_cv_func___res_send=no
84e70f78 20138fi
ca81d7a0 20139
f053c89f 20140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20141 conftest$ac_exeext conftest.$ac_ext
84e70f78 20142fi
ca81d7a0
JD
20143{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20144echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20145if test $ac_cv_func___res_send = yes; then
20146 :
20147else
ca81d7a0
JD
20148 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20149echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20150if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20151 echo $ECHO_N "(cached) $ECHO_C" >&6
20152else
20153 ac_check_lib_save_LIBS=$LIBS
20154LIBS="-lresolv $LIBS"
20155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
84e70f78 20161
ca81d7a0
JD
20162/* Override any GCC internal prototype to avoid an error.
20163 Use char because int might match the return type of a GCC
20164 builtin and then its argument prototype would still apply. */
84e70f78
KR
20165#ifdef __cplusplus
20166extern "C"
20167#endif
84e70f78
KR
20168char res_send ();
20169int
20170main ()
20171{
ca81d7a0 20172return res_send ();
84e70f78
KR
20173 ;
20174 return 0;
20175}
20176_ACEOF
20177rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20178if { (ac_try="$ac_link"
20179case "(($ac_try" in
20180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20181 *) ac_try_echo=$ac_try;;
20182esac
20183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20184 (eval "$ac_link") 2>conftest.er1
84e70f78 20185 ac_status=$?
edfaf76d
LK
20186 grep -v '^ *+' conftest.er1 >conftest.err
20187 rm -f conftest.er1
20188 cat conftest.err >&5
c0d27fcc 20189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20190 (exit $ac_status); } && {
20191 test -z "$ac_c_werror_flag" ||
20192 test ! -s conftest.err
20193 } && test -s conftest$ac_exeext &&
20194 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20195 ac_cv_lib_resolv_res_send=yes
20196else
20197 echo "$as_me: failed program was:" >&5
19650fd6
AS
20198sed 's/^/| /' conftest.$ac_ext >&5
20199
ca81d7a0 20200 ac_cv_lib_resolv_res_send=no
84e70f78 20201fi
ca81d7a0 20202
f053c89f 20203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20204 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20205LIBS=$ac_check_lib_save_LIBS
20206fi
ca81d7a0
JD
20207{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20208echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20209if test $ac_cv_lib_resolv_res_send = yes; then
20210 resolv=yes
20211else
ca81d7a0
JD
20212 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20213echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20214if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20215 echo $ECHO_N "(cached) $ECHO_C" >&6
20216else
20217 ac_check_lib_save_LIBS=$LIBS
20218LIBS="-lresolv $LIBS"
20219cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20220/* confdefs.h. */
20221_ACEOF
20222cat confdefs.h >>conftest.$ac_ext
20223cat >>conftest.$ac_ext <<_ACEOF
20224/* end confdefs.h. */
84e70f78 20225
ca81d7a0
JD
20226/* Override any GCC internal prototype to avoid an error.
20227 Use char because int might match the return type of a GCC
20228 builtin and then its argument prototype would still apply. */
84e70f78
KR
20229#ifdef __cplusplus
20230extern "C"
20231#endif
84e70f78
KR
20232char __res_send ();
20233int
20234main ()
20235{
ca81d7a0 20236return __res_send ();
84e70f78
KR
20237 ;
20238 return 0;
20239}
20240_ACEOF
20241rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20242if { (ac_try="$ac_link"
20243case "(($ac_try" in
20244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245 *) ac_try_echo=$ac_try;;
20246esac
20247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20248 (eval "$ac_link") 2>conftest.er1
84e70f78 20249 ac_status=$?
edfaf76d
LK
20250 grep -v '^ *+' conftest.er1 >conftest.err
20251 rm -f conftest.er1
20252 cat conftest.err >&5
c0d27fcc 20253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20254 (exit $ac_status); } && {
20255 test -z "$ac_c_werror_flag" ||
20256 test ! -s conftest.err
20257 } && test -s conftest$ac_exeext &&
20258 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20259 ac_cv_lib_resolv___res_send=yes
20260else
20261 echo "$as_me: failed program was:" >&5
19650fd6
AS
20262sed 's/^/| /' conftest.$ac_ext >&5
20263
ca81d7a0 20264 ac_cv_lib_resolv___res_send=no
84e70f78 20265fi
ca81d7a0 20266
f053c89f 20267rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20268 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20269LIBS=$ac_check_lib_save_LIBS
20270fi
ca81d7a0
JD
20271{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20272echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20273if test $ac_cv_lib_resolv___res_send = yes; then
20274 resolv=yes
20275fi
20276
20277fi
20278
20279fi
20280
20281fi
20282
20283 if test "$resolv" = yes ; then
20284 RESOLVLIB=-lresolv
84e70f78
KR
20285 else
20286 RESOLVLIB=
20287 fi
ca81d7a0
JD
20288 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20289echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20290if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20291 echo $ECHO_N "(cached) $ECHO_C" >&6
20292else
20293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20294/* confdefs.h. */
20295_ACEOF
20296cat confdefs.h >>conftest.$ac_ext
20297cat >>conftest.$ac_ext <<_ACEOF
20298/* end confdefs.h. */
edfaf76d
LK
20299/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20301#define hes_getmailhost innocuous_hes_getmailhost
20302
84e70f78 20303/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20304 which can conflict with char hes_getmailhost (); below.
20305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20306 <limits.h> exists even on freestanding compilers. */
edfaf76d 20307
19650fd6
AS
20308#ifdef __STDC__
20309# include <limits.h>
20310#else
20311# include <assert.h>
20312#endif
edfaf76d
LK
20313
20314#undef hes_getmailhost
20315
ca81d7a0
JD
20316/* Override any GCC internal prototype to avoid an error.
20317 Use char because int might match the return type of a GCC
20318 builtin and then its argument prototype would still apply. */
84e70f78
KR
20319#ifdef __cplusplus
20320extern "C"
20321#endif
84e70f78 20322char hes_getmailhost ();
84e70f78
KR
20323/* The GNU C library defines this for functions which it implements
20324 to always fail with ENOSYS. Some functions are actually named
20325 something starting with __ and the normal name is an alias. */
ca81d7a0 20326#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20327choke me
cd958eb3
MB
20328#endif
20329
19650fd6
AS
20330int
20331main ()
20332{
ca81d7a0 20333return hes_getmailhost ();
84e70f78
KR
20334 ;
20335 return 0;
20336}
20337_ACEOF
20338rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20339if { (ac_try="$ac_link"
20340case "(($ac_try" in
20341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20342 *) ac_try_echo=$ac_try;;
20343esac
20344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20345 (eval "$ac_link") 2>conftest.er1
84e70f78 20346 ac_status=$?
edfaf76d
LK
20347 grep -v '^ *+' conftest.er1 >conftest.err
20348 rm -f conftest.er1
20349 cat conftest.err >&5
c0d27fcc 20350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20351 (exit $ac_status); } && {
20352 test -z "$ac_c_werror_flag" ||
20353 test ! -s conftest.err
20354 } && test -s conftest$ac_exeext &&
20355 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20356 ac_cv_func_hes_getmailhost=yes
20357else
20358 echo "$as_me: failed program was:" >&5
19650fd6
AS
20359sed 's/^/| /' conftest.$ac_ext >&5
20360
ca81d7a0 20361 ac_cv_func_hes_getmailhost=no
84e70f78 20362fi
ca81d7a0 20363
f053c89f 20364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20365 conftest$ac_exeext conftest.$ac_ext
84e70f78 20366fi
ca81d7a0
JD
20367{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20368echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20369if test $ac_cv_func_hes_getmailhost = yes; then
20370 :
20371else
ca81d7a0
JD
20372 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20373echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20374if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20375 echo $ECHO_N "(cached) $ECHO_C" >&6
20376else
20377 ac_check_lib_save_LIBS=$LIBS
20378LIBS="-lhesiod $RESOLVLIB $LIBS"
20379cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20380/* confdefs.h. */
20381_ACEOF
20382cat confdefs.h >>conftest.$ac_ext
20383cat >>conftest.$ac_ext <<_ACEOF
20384/* end confdefs.h. */
84e70f78 20385
ca81d7a0
JD
20386/* Override any GCC internal prototype to avoid an error.
20387 Use char because int might match the return type of a GCC
20388 builtin and then its argument prototype would still apply. */
84e70f78
KR
20389#ifdef __cplusplus
20390extern "C"
20391#endif
84e70f78
KR
20392char hes_getmailhost ();
20393int
20394main ()
20395{
ca81d7a0 20396return hes_getmailhost ();
84e70f78
KR
20397 ;
20398 return 0;
20399}
20400_ACEOF
20401rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20402if { (ac_try="$ac_link"
20403case "(($ac_try" in
20404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20405 *) ac_try_echo=$ac_try;;
20406esac
20407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20408 (eval "$ac_link") 2>conftest.er1
84e70f78 20409 ac_status=$?
edfaf76d
LK
20410 grep -v '^ *+' conftest.er1 >conftest.err
20411 rm -f conftest.er1
20412 cat conftest.err >&5
c0d27fcc 20413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20414 (exit $ac_status); } && {
20415 test -z "$ac_c_werror_flag" ||
20416 test ! -s conftest.err
20417 } && test -s conftest$ac_exeext &&
20418 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20419 ac_cv_lib_hesiod_hes_getmailhost=yes
20420else
20421 echo "$as_me: failed program was:" >&5
19650fd6
AS
20422sed 's/^/| /' conftest.$ac_ext >&5
20423
ca81d7a0 20424 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20425fi
ca81d7a0 20426
f053c89f 20427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20428 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20429LIBS=$ac_check_lib_save_LIBS
20430fi
ca81d7a0
JD
20431{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20432echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20433if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20434
c0d27fcc 20435cat >>confdefs.h <<\_ACEOF
84e70f78 20436#define HAVE_LIBHESIOD 1
c0d27fcc 20437_ACEOF
84e70f78
KR
20438
20439else
20440 :
20441fi
20442
20443fi
20444
20445fi
20446
bc3512d0
CY
20447# Do we need libresolv (due to res_init or Hesiod)?
20448if test "$resolv" = yes ; then
20449
20450cat >>confdefs.h <<\_ACEOF
20451#define HAVE_LIBRESOLV 1
20452_ACEOF
20453
20454fi
20455
a21616bd 20456# These tell us which Kerberos-related libraries to use.
ff1095d1 20457if test "${with_kerberos}" != no; then
503d2be0 20458
ca81d7a0
JD
20459{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20460echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20461if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20462 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20463else
503d2be0 20464 ac_check_lib_save_LIBS=$LIBS
a21616bd 20465LIBS="-lcom_err $LIBS"
503d2be0 20466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
503d2be0 20472
ca81d7a0
JD
20473/* Override any GCC internal prototype to avoid an error.
20474 Use char because int might match the return type of a GCC
20475 builtin and then its argument prototype would still apply. */
503d2be0
AS
20476#ifdef __cplusplus
20477extern "C"
20478#endif
503d2be0
AS
20479char com_err ();
20480int
20481main ()
20482{
ca81d7a0 20483return com_err ();
503d2be0
AS
20484 ;
20485 return 0;
20486}
20487_ACEOF
20488rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20489if { (ac_try="$ac_link"
20490case "(($ac_try" in
20491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492 *) ac_try_echo=$ac_try;;
20493esac
20494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20495 (eval "$ac_link") 2>conftest.er1
503d2be0 20496 ac_status=$?
edfaf76d
LK
20497 grep -v '^ *+' conftest.er1 >conftest.err
20498 rm -f conftest.er1
20499 cat conftest.err >&5
c0d27fcc 20500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20501 (exit $ac_status); } && {
20502 test -z "$ac_c_werror_flag" ||
20503 test ! -s conftest.err
20504 } && test -s conftest$ac_exeext &&
20505 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20506 ac_cv_lib_com_err_com_err=yes
20507else
20508 echo "$as_me: failed program was:" >&5
19650fd6
AS
20509sed 's/^/| /' conftest.$ac_ext >&5
20510
ca81d7a0 20511 ac_cv_lib_com_err_com_err=no
503d2be0 20512fi
ca81d7a0 20513
f053c89f 20514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20515 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20516LIBS=$ac_check_lib_save_LIBS
20517fi
ca81d7a0
JD
20518{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20519echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20520if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20521 cat >>confdefs.h <<_ACEOF
503d2be0 20522#define HAVE_LIBCOM_ERR 1
c0d27fcc 20523_ACEOF
a21616bd
KR
20524
20525 LIBS="-lcom_err $LIBS"
20526
a21616bd
KR
20527fi
20528
c0d27fcc 20529
ca81d7a0
JD
20530{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20531echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20532if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20533 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20534else
503d2be0 20535 ac_check_lib_save_LIBS=$LIBS
a21616bd 20536LIBS="-lk5crypto $LIBS"
503d2be0 20537cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20538/* confdefs.h. */
20539_ACEOF
20540cat confdefs.h >>conftest.$ac_ext
20541cat >>conftest.$ac_ext <<_ACEOF
20542/* end confdefs.h. */
503d2be0 20543
ca81d7a0
JD
20544/* Override any GCC internal prototype to avoid an error.
20545 Use char because int might match the return type of a GCC
20546 builtin and then its argument prototype would still apply. */
503d2be0
AS
20547#ifdef __cplusplus
20548extern "C"
20549#endif
503d2be0
AS
20550char mit_des_cbc_encrypt ();
20551int
20552main ()
20553{
ca81d7a0 20554return mit_des_cbc_encrypt ();
503d2be0
AS
20555 ;
20556 return 0;
20557}
20558_ACEOF
20559rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20560if { (ac_try="$ac_link"
20561case "(($ac_try" in
20562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20563 *) ac_try_echo=$ac_try;;
20564esac
20565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20566 (eval "$ac_link") 2>conftest.er1
503d2be0 20567 ac_status=$?
edfaf76d
LK
20568 grep -v '^ *+' conftest.er1 >conftest.err
20569 rm -f conftest.er1
20570 cat conftest.err >&5
c0d27fcc 20571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20572 (exit $ac_status); } && {
20573 test -z "$ac_c_werror_flag" ||
20574 test ! -s conftest.err
20575 } && test -s conftest$ac_exeext &&
20576 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20577 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20578else
20579 echo "$as_me: failed program was:" >&5
19650fd6
AS
20580sed 's/^/| /' conftest.$ac_ext >&5
20581
ca81d7a0 20582 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20583fi
ca81d7a0 20584
f053c89f 20585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20586 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20587LIBS=$ac_check_lib_save_LIBS
20588fi
ca81d7a0
JD
20589{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20590echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20591if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20592 cat >>confdefs.h <<_ACEOF
503d2be0 20593#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20594_ACEOF
a21616bd
KR
20595
20596 LIBS="-lk5crypto $LIBS"
20597
a21616bd
KR
20598fi
20599
c0d27fcc 20600
ca81d7a0
JD
20601{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20602echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20603if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20604 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20605else
503d2be0 20606 ac_check_lib_save_LIBS=$LIBS
a21616bd 20607LIBS="-lcrypto $LIBS"
503d2be0 20608cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20609/* confdefs.h. */
20610_ACEOF
20611cat confdefs.h >>conftest.$ac_ext
20612cat >>conftest.$ac_ext <<_ACEOF
20613/* end confdefs.h. */
503d2be0 20614
ca81d7a0
JD
20615/* Override any GCC internal prototype to avoid an error.
20616 Use char because int might match the return type of a GCC
20617 builtin and then its argument prototype would still apply. */
503d2be0
AS
20618#ifdef __cplusplus
20619extern "C"
20620#endif
503d2be0
AS
20621char mit_des_cbc_encrypt ();
20622int
20623main ()
20624{
ca81d7a0 20625return mit_des_cbc_encrypt ();
503d2be0
AS
20626 ;
20627 return 0;
20628}
20629_ACEOF
20630rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20631if { (ac_try="$ac_link"
20632case "(($ac_try" in
20633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20634 *) ac_try_echo=$ac_try;;
20635esac
20636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20637 (eval "$ac_link") 2>conftest.er1
503d2be0 20638 ac_status=$?
edfaf76d
LK
20639 grep -v '^ *+' conftest.er1 >conftest.err
20640 rm -f conftest.er1
20641 cat conftest.err >&5
c0d27fcc 20642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20643 (exit $ac_status); } && {
20644 test -z "$ac_c_werror_flag" ||
20645 test ! -s conftest.err
20646 } && test -s conftest$ac_exeext &&
20647 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20648 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20649else
20650 echo "$as_me: failed program was:" >&5
19650fd6
AS
20651sed 's/^/| /' conftest.$ac_ext >&5
20652
ca81d7a0 20653 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20654fi
ca81d7a0 20655
f053c89f 20656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20657 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20658LIBS=$ac_check_lib_save_LIBS
20659fi
ca81d7a0
JD
20660{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20661echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20662if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20663 cat >>confdefs.h <<_ACEOF
503d2be0 20664#define HAVE_LIBCRYPTO 1
c0d27fcc 20665_ACEOF
a21616bd
KR
20666
20667 LIBS="-lcrypto $LIBS"
20668
a21616bd
KR
20669fi
20670
c0d27fcc 20671
ca81d7a0
JD
20672{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20673echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20674if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20675 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20676else
503d2be0 20677 ac_check_lib_save_LIBS=$LIBS
a21616bd 20678LIBS="-lkrb5 $LIBS"
503d2be0 20679cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20680/* confdefs.h. */
20681_ACEOF
20682cat confdefs.h >>conftest.$ac_ext
20683cat >>conftest.$ac_ext <<_ACEOF
20684/* end confdefs.h. */
a21616bd 20685
ca81d7a0
JD
20686/* Override any GCC internal prototype to avoid an error.
20687 Use char because int might match the return type of a GCC
20688 builtin and then its argument prototype would still apply. */
503d2be0
AS
20689#ifdef __cplusplus
20690extern "C"
20691#endif
503d2be0
AS
20692char krb5_init_context ();
20693int
20694main ()
20695{
ca81d7a0 20696return krb5_init_context ();
503d2be0
AS
20697 ;
20698 return 0;
20699}
20700_ACEOF
20701rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20702if { (ac_try="$ac_link"
20703case "(($ac_try" in
20704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20705 *) ac_try_echo=$ac_try;;
20706esac
20707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20708 (eval "$ac_link") 2>conftest.er1
503d2be0 20709 ac_status=$?
edfaf76d
LK
20710 grep -v '^ *+' conftest.er1 >conftest.err
20711 rm -f conftest.er1
20712 cat conftest.err >&5
c0d27fcc 20713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20714 (exit $ac_status); } && {
20715 test -z "$ac_c_werror_flag" ||
20716 test ! -s conftest.err
20717 } && test -s conftest$ac_exeext &&
20718 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20719 ac_cv_lib_krb5_krb5_init_context=yes
20720else
20721 echo "$as_me: failed program was:" >&5
19650fd6
AS
20722sed 's/^/| /' conftest.$ac_ext >&5
20723
ca81d7a0 20724 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20725fi
ca81d7a0 20726
f053c89f 20727rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20728 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20729LIBS=$ac_check_lib_save_LIBS
20730fi
ca81d7a0
JD
20731{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20732echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20733if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20734 cat >>confdefs.h <<_ACEOF
503d2be0 20735#define HAVE_LIBKRB5 1
c0d27fcc 20736_ACEOF
a21616bd
KR
20737
20738 LIBS="-lkrb5 $LIBS"
20739
a21616bd
KR
20740fi
20741
ff1095d1 20742 if test "${with_kerberos5}" = no; then
503d2be0 20743
ca81d7a0
JD
20744{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20745echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20746if test "${ac_cv_lib_des425_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="-ldes425 $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 des_cbc_encrypt ();
20765int
20766main ()
20767{
ca81d7a0 20768return 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_des425_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_des425_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_des425_des_cbc_encrypt" >&5
20804echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20805if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20806 cat >>confdefs.h <<_ACEOF
503d2be0 20807#define HAVE_LIBDES425 1
c0d27fcc 20808_ACEOF
a21616bd
KR
20809
20810 LIBS="-ldes425 $LIBS"
20811
20812else
503d2be0 20813
ca81d7a0
JD
20814{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20815echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20816if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20817 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20818else
503d2be0 20819 ac_check_lib_save_LIBS=$LIBS
a21616bd 20820LIBS="-ldes $LIBS"
503d2be0 20821cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20822/* confdefs.h. */
20823_ACEOF
20824cat confdefs.h >>conftest.$ac_ext
20825cat >>conftest.$ac_ext <<_ACEOF
20826/* end confdefs.h. */
503d2be0 20827
ca81d7a0
JD
20828/* Override any GCC internal prototype to avoid an error.
20829 Use char because int might match the return type of a GCC
20830 builtin and then its argument prototype would still apply. */
503d2be0
AS
20831#ifdef __cplusplus
20832extern "C"
20833#endif
503d2be0
AS
20834char des_cbc_encrypt ();
20835int
20836main ()
20837{
ca81d7a0 20838return des_cbc_encrypt ();
503d2be0
AS
20839 ;
20840 return 0;
20841}
20842_ACEOF
20843rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20844if { (ac_try="$ac_link"
20845case "(($ac_try" in
20846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20847 *) ac_try_echo=$ac_try;;
20848esac
20849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20850 (eval "$ac_link") 2>conftest.er1
503d2be0 20851 ac_status=$?
edfaf76d
LK
20852 grep -v '^ *+' conftest.er1 >conftest.err
20853 rm -f conftest.er1
20854 cat conftest.err >&5
c0d27fcc 20855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20856 (exit $ac_status); } && {
20857 test -z "$ac_c_werror_flag" ||
20858 test ! -s conftest.err
20859 } && test -s conftest$ac_exeext &&
20860 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20861 ac_cv_lib_des_des_cbc_encrypt=yes
20862else
20863 echo "$as_me: failed program was:" >&5
19650fd6
AS
20864sed 's/^/| /' conftest.$ac_ext >&5
20865
ca81d7a0 20866 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20867fi
ca81d7a0 20868
f053c89f 20869rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20870 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20871LIBS=$ac_check_lib_save_LIBS
20872fi
ca81d7a0
JD
20873{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20874echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20875if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20876 cat >>confdefs.h <<_ACEOF
503d2be0 20877#define HAVE_LIBDES 1
c0d27fcc 20878_ACEOF
a21616bd
KR
20879
20880 LIBS="-ldes $LIBS"
20881
a21616bd
KR
20882fi
20883
20884fi
20885
c0d27fcc 20886
ca81d7a0
JD
20887{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20888echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20889if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20890 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20891else
503d2be0 20892 ac_check_lib_save_LIBS=$LIBS
a21616bd 20893LIBS="-lkrb4 $LIBS"
503d2be0 20894cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20895/* confdefs.h. */
20896_ACEOF
20897cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */
503d2be0 20900
ca81d7a0
JD
20901/* Override any GCC internal prototype to avoid an error.
20902 Use char because int might match the return type of a GCC
20903 builtin and then its argument prototype would still apply. */
503d2be0
AS
20904#ifdef __cplusplus
20905extern "C"
20906#endif
503d2be0
AS
20907char krb_get_cred ();
20908int
20909main ()
20910{
f053c89f 20911return krb_get_cred ();
503d2be0
AS
20912 ;
20913 return 0;
20914}
20915_ACEOF
20916rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20917if { (ac_try="$ac_link"
20918case "(($ac_try" in
ca81d7a0
JD
20919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20920 *) ac_try_echo=$ac_try;;
20921esac
20922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20923 (eval "$ac_link") 2>conftest.er1
503d2be0 20924 ac_status=$?
edfaf76d
LK
20925 grep -v '^ *+' conftest.er1 >conftest.err
20926 rm -f conftest.er1
20927 cat conftest.err >&5
c0d27fcc 20928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20929 (exit $ac_status); } && {
20930 test -z "$ac_c_werror_flag" ||
20931 test ! -s conftest.err
20932 } && test -s conftest$ac_exeext &&
20933 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20934 ac_cv_lib_krb4_krb_get_cred=yes
20935else
20936 echo "$as_me: failed program was:" >&5
19650fd6
AS
20937sed 's/^/| /' conftest.$ac_ext >&5
20938
ca81d7a0 20939 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20940fi
ca81d7a0 20941
f053c89f 20942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20943 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20944LIBS=$ac_check_lib_save_LIBS
20945fi
ca81d7a0
JD
20946{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20947echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20948if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20949 cat >>confdefs.h <<_ACEOF
503d2be0 20950#define HAVE_LIBKRB4 1
c0d27fcc 20951_ACEOF
a21616bd
KR
20952
20953 LIBS="-lkrb4 $LIBS"
20954
20955else
503d2be0 20956
ca81d7a0
JD
20957{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20958echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20959if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20960 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20961else
503d2be0 20962 ac_check_lib_save_LIBS=$LIBS
a21616bd 20963LIBS="-lkrb $LIBS"
503d2be0 20964cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20965/* confdefs.h. */
20966_ACEOF
20967cat confdefs.h >>conftest.$ac_ext
20968cat >>conftest.$ac_ext <<_ACEOF
20969/* end confdefs.h. */
503d2be0 20970
ca81d7a0
JD
20971/* Override any GCC internal prototype to avoid an error.
20972 Use char because int might match the return type of a GCC
20973 builtin and then its argument prototype would still apply. */
503d2be0
AS
20974#ifdef __cplusplus
20975extern "C"
20976#endif
503d2be0
AS
20977char krb_get_cred ();
20978int
20979main ()
20980{
ca81d7a0 20981return krb_get_cred ();
503d2be0
AS
20982 ;
20983 return 0;
20984}
20985_ACEOF
20986rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20987if { (ac_try="$ac_link"
20988case "(($ac_try" in
20989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20990 *) ac_try_echo=$ac_try;;
20991esac
20992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20993 (eval "$ac_link") 2>conftest.er1
503d2be0 20994 ac_status=$?
edfaf76d
LK
20995 grep -v '^ *+' conftest.er1 >conftest.err
20996 rm -f conftest.er1
20997 cat conftest.err >&5
c0d27fcc 20998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20999 (exit $ac_status); } && {
21000 test -z "$ac_c_werror_flag" ||
21001 test ! -s conftest.err
21002 } && test -s conftest$ac_exeext &&
21003 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21004 ac_cv_lib_krb_krb_get_cred=yes
21005else
21006 echo "$as_me: failed program was:" >&5
19650fd6
AS
21007sed 's/^/| /' conftest.$ac_ext >&5
21008
ca81d7a0 21009 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21010fi
ca81d7a0 21011
f053c89f 21012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21013 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21014LIBS=$ac_check_lib_save_LIBS
21015fi
ca81d7a0
JD
21016{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21017echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21018if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21019 cat >>confdefs.h <<_ACEOF
503d2be0 21020#define HAVE_LIBKRB 1
c0d27fcc 21021_ACEOF
a21616bd
KR
21022
21023 LIBS="-lkrb $LIBS"
21024
a21616bd
KR
21025fi
21026
21027fi
21028
21029 fi
21030
ff1095d1 21031 if test "${with_kerberos5}" != no; then
503d2be0
AS
21032
21033for ac_header in krb5.h
a21616bd 21034do
503d2be0 21035as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21036if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21037 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21038echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21039if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21040 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21041fi
ca81d7a0
JD
21042ac_res=`eval echo '${'$as_ac_Header'}'`
21043 { echo "$as_me:$LINENO: result: $ac_res" >&5
21044echo "${ECHO_T}$ac_res" >&6; }
98418dba 21045else
c0d27fcc 21046 # Is the header compilable?
ca81d7a0
JD
21047{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21048echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21049cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21050/* confdefs.h. */
21051_ACEOF
21052cat confdefs.h >>conftest.$ac_ext
21053cat >>conftest.$ac_ext <<_ACEOF
21054/* end confdefs.h. */
c0d27fcc
MR
21055$ac_includes_default
21056#include <$ac_header>
21057_ACEOF
21058rm -f conftest.$ac_objext
ca81d7a0
JD
21059if { (ac_try="$ac_compile"
21060case "(($ac_try" in
21061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21062 *) ac_try_echo=$ac_try;;
21063esac
21064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21065 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21066 ac_status=$?
edfaf76d
LK
21067 grep -v '^ *+' conftest.er1 >conftest.err
21068 rm -f conftest.er1
21069 cat conftest.err >&5
c0d27fcc 21070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21071 (exit $ac_status); } && {
21072 test -z "$ac_c_werror_flag" ||
21073 test ! -s conftest.err
21074 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21075 ac_header_compiler=yes
21076else
21077 echo "$as_me: failed program was:" >&5
19650fd6
AS
21078sed 's/^/| /' conftest.$ac_ext >&5
21079
ca81d7a0 21080 ac_header_compiler=no
c0d27fcc 21081fi
ca81d7a0
JD
21082
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21084{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21085echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21086
21087# Is the header present?
ca81d7a0
JD
21088{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21089echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21090cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21091/* confdefs.h. */
21092_ACEOF
21093cat confdefs.h >>conftest.$ac_ext
21094cat >>conftest.$ac_ext <<_ACEOF
21095/* end confdefs.h. */
503d2be0
AS
21096#include <$ac_header>
21097_ACEOF
ca81d7a0
JD
21098if { (ac_try="$ac_cpp conftest.$ac_ext"
21099case "(($ac_try" in
21100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21101 *) ac_try_echo=$ac_try;;
21102esac
21103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21104 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21105 ac_status=$?
6bae0ccf 21106 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21107 rm -f conftest.er1
21108 cat conftest.err >&5
c0d27fcc 21109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21110 (exit $ac_status); } >/dev/null && {
21111 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21112 test ! -s conftest.err
21113 }; then
c0d27fcc 21114 ac_header_preproc=yes
503d2be0
AS
21115else
21116 echo "$as_me: failed program was:" >&5
19650fd6
AS
21117sed 's/^/| /' conftest.$ac_ext >&5
21118
c0d27fcc 21119 ac_header_preproc=no
a21616bd 21120fi
ca81d7a0 21121
503d2be0 21122rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21123{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21124echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21125
21126# So? What about this header?
edfaf76d
LK
21127case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21128 yes:no: )
c0d27fcc
MR
21129 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21130echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21131 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21132echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21133 ac_header_preproc=yes
19650fd6 21134 ;;
edfaf76d 21135 no:yes:* )
c0d27fcc
MR
21136 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21137echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21138 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21139echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21140 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21141echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21142 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21143echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21144 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21145echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21146 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21147echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21148
19650fd6 21149 ;;
c0d27fcc 21150esac
ca81d7a0
JD
21151{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21152echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21153if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21154 echo $ECHO_N "(cached) $ECHO_C" >&6
21155else
edfaf76d 21156 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21157fi
ca81d7a0
JD
21158ac_res=`eval echo '${'$as_ac_Header'}'`
21159 { echo "$as_me:$LINENO: result: $ac_res" >&5
21160echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21161
21162fi
503d2be0 21163if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21164 cat >>confdefs.h <<_ACEOF
503d2be0 21165#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21166_ACEOF
21287a21
CY
21167 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21168echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21169if test "${ac_cv_member_krb5_error_text+set}" = set; then
21170 echo $ECHO_N "(cached) $ECHO_C" >&6
21171else
21172 cat >conftest.$ac_ext <<_ACEOF
21173/* confdefs.h. */
21174_ACEOF
21175cat confdefs.h >>conftest.$ac_ext
21176cat >>conftest.$ac_ext <<_ACEOF
21177/* end confdefs.h. */
21178#include <krb5.h>
21179
21180int
21181main ()
21182{
21183static krb5_error ac_aggr;
21184if (ac_aggr.text)
21185return 0;
21186 ;
21187 return 0;
21188}
21189_ACEOF
21190rm -f conftest.$ac_objext
21191if { (ac_try="$ac_compile"
21192case "(($ac_try" in
21193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21194 *) ac_try_echo=$ac_try;;
21195esac
21196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21197 (eval "$ac_compile") 2>conftest.er1
21198 ac_status=$?
21199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21203 (exit $ac_status); } && {
21204 test -z "$ac_c_werror_flag" ||
21205 test ! -s conftest.err
21206 } && test -s conftest.$ac_objext; then
21207 ac_cv_member_krb5_error_text=yes
21208else
21209 echo "$as_me: failed program was:" >&5
21210sed 's/^/| /' conftest.$ac_ext >&5
21211
21212 cat >conftest.$ac_ext <<_ACEOF
21213/* confdefs.h. */
21214_ACEOF
21215cat confdefs.h >>conftest.$ac_ext
21216cat >>conftest.$ac_ext <<_ACEOF
21217/* end confdefs.h. */
21218#include <krb5.h>
21219
21220int
21221main ()
21222{
21223static krb5_error ac_aggr;
21224if (sizeof ac_aggr.text)
21225return 0;
21226 ;
21227 return 0;
21228}
21229_ACEOF
21230rm -f conftest.$ac_objext
21231if { (ac_try="$ac_compile"
21232case "(($ac_try" in
21233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21234 *) ac_try_echo=$ac_try;;
21235esac
21236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21237 (eval "$ac_compile") 2>conftest.er1
21238 ac_status=$?
21239 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1
21241 cat conftest.err >&5
21242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21243 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err
21246 } && test -s conftest.$ac_objext; then
21247 ac_cv_member_krb5_error_text=yes
21248else
21249 echo "$as_me: failed program was:" >&5
21250sed 's/^/| /' conftest.$ac_ext >&5
21251
21252 ac_cv_member_krb5_error_text=no
21253fi
21254
21255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21256fi
21257
21258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21259fi
21260{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21261echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
21262if test $ac_cv_member_krb5_error_text = yes; then
21263
21264cat >>confdefs.h <<_ACEOF
21265#define HAVE_KRB5_ERROR_TEXT 1
21266_ACEOF
21267
21268
21269fi
21270{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21271echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21272if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
21273 echo $ECHO_N "(cached) $ECHO_C" >&6
21274else
21275 cat >conftest.$ac_ext <<_ACEOF
21276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
21281#include <krb5.h>
21282
21283int
21284main ()
21285{
21286static krb5_error ac_aggr;
21287if (ac_aggr.e_text)
21288return 0;
21289 ;
21290 return 0;
21291}
21292_ACEOF
21293rm -f conftest.$ac_objext
21294if { (ac_try="$ac_compile"
21295case "(($ac_try" in
21296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21297 *) ac_try_echo=$ac_try;;
21298esac
21299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21300 (eval "$ac_compile") 2>conftest.er1
21301 ac_status=$?
21302 grep -v '^ *+' conftest.er1 >conftest.err
21303 rm -f conftest.er1
21304 cat conftest.err >&5
21305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21306 (exit $ac_status); } && {
21307 test -z "$ac_c_werror_flag" ||
21308 test ! -s conftest.err
21309 } && test -s conftest.$ac_objext; then
21310 ac_cv_member_krb5_error_e_text=yes
21311else
21312 echo "$as_me: failed program was:" >&5
21313sed 's/^/| /' conftest.$ac_ext >&5
21314
21315 cat >conftest.$ac_ext <<_ACEOF
21316/* confdefs.h. */
21317_ACEOF
21318cat confdefs.h >>conftest.$ac_ext
21319cat >>conftest.$ac_ext <<_ACEOF
21320/* end confdefs.h. */
21321#include <krb5.h>
21322
21323int
21324main ()
21325{
21326static krb5_error ac_aggr;
21327if (sizeof ac_aggr.e_text)
21328return 0;
21329 ;
21330 return 0;
21331}
21332_ACEOF
21333rm -f conftest.$ac_objext
21334if { (ac_try="$ac_compile"
21335case "(($ac_try" in
21336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21337 *) ac_try_echo=$ac_try;;
21338esac
21339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21340 (eval "$ac_compile") 2>conftest.er1
21341 ac_status=$?
21342 grep -v '^ *+' conftest.er1 >conftest.err
21343 rm -f conftest.er1
21344 cat conftest.err >&5
21345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21346 (exit $ac_status); } && {
21347 test -z "$ac_c_werror_flag" ||
21348 test ! -s conftest.err
21349 } && test -s conftest.$ac_objext; then
21350 ac_cv_member_krb5_error_e_text=yes
21351else
21352 echo "$as_me: failed program was:" >&5
21353sed 's/^/| /' conftest.$ac_ext >&5
21354
21355 ac_cv_member_krb5_error_e_text=no
21356fi
21357
21358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21359fi
21360
21361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21362fi
21363{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21364echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
21365if test $ac_cv_member_krb5_error_e_text = yes; then
21366
21367cat >>confdefs.h <<_ACEOF
21368#define HAVE_KRB5_ERROR_E_TEXT 1
21369_ACEOF
21370
21371
21372fi
503d2be0 21373
a21616bd 21374fi
c0d27fcc 21375
a21616bd
KR
21376done
21377
21378 else
503d2be0
AS
21379
21380for ac_header in des.h
a21616bd 21381do
503d2be0 21382as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21384 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21387 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21388fi
ca81d7a0
JD
21389ac_res=`eval echo '${'$as_ac_Header'}'`
21390 { echo "$as_me:$LINENO: result: $ac_res" >&5
21391echo "${ECHO_T}$ac_res" >&6; }
98418dba 21392else
c0d27fcc 21393 # Is the header compilable?
ca81d7a0
JD
21394{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21395echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21397/* confdefs.h. */
21398_ACEOF
21399cat confdefs.h >>conftest.$ac_ext
21400cat >>conftest.$ac_ext <<_ACEOF
21401/* end confdefs.h. */
c0d27fcc
MR
21402$ac_includes_default
21403#include <$ac_header>
21404_ACEOF
21405rm -f conftest.$ac_objext
ca81d7a0
JD
21406if { (ac_try="$ac_compile"
21407case "(($ac_try" in
21408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21409 *) ac_try_echo=$ac_try;;
21410esac
21411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21412 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21413 ac_status=$?
edfaf76d
LK
21414 grep -v '^ *+' conftest.er1 >conftest.err
21415 rm -f conftest.er1
21416 cat conftest.err >&5
c0d27fcc 21417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21418 (exit $ac_status); } && {
21419 test -z "$ac_c_werror_flag" ||
21420 test ! -s conftest.err
21421 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21422 ac_header_compiler=yes
21423else
21424 echo "$as_me: failed program was:" >&5
19650fd6
AS
21425sed 's/^/| /' conftest.$ac_ext >&5
21426
ca81d7a0 21427 ac_header_compiler=no
c0d27fcc 21428fi
ca81d7a0
JD
21429
21430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21431{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21432echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21433
21434# Is the header present?
ca81d7a0
JD
21435{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21436echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21437cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21438/* confdefs.h. */
21439_ACEOF
21440cat confdefs.h >>conftest.$ac_ext
21441cat >>conftest.$ac_ext <<_ACEOF
21442/* end confdefs.h. */
503d2be0
AS
21443#include <$ac_header>
21444_ACEOF
ca81d7a0
JD
21445if { (ac_try="$ac_cpp conftest.$ac_ext"
21446case "(($ac_try" in
21447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21448 *) ac_try_echo=$ac_try;;
21449esac
21450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21451 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21452 ac_status=$?
6bae0ccf 21453 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21454 rm -f conftest.er1
21455 cat conftest.err >&5
c0d27fcc 21456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21457 (exit $ac_status); } >/dev/null && {
21458 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21459 test ! -s conftest.err
21460 }; then
c0d27fcc 21461 ac_header_preproc=yes
503d2be0
AS
21462else
21463 echo "$as_me: failed program was:" >&5
19650fd6
AS
21464sed 's/^/| /' conftest.$ac_ext >&5
21465
c0d27fcc 21466 ac_header_preproc=no
a21616bd 21467fi
ca81d7a0 21468
503d2be0 21469rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21470{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21471echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21472
21473# So? What about this header?
edfaf76d
LK
21474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21475 yes:no: )
c0d27fcc
MR
21476 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21477echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21478 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21479echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21480 ac_header_preproc=yes
19650fd6 21481 ;;
edfaf76d 21482 no:yes:* )
c0d27fcc
MR
21483 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21484echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21485 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21486echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21487 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21488echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21489 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21490echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21491 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21492echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21493 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21494echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21495
19650fd6 21496 ;;
c0d27fcc 21497esac
ca81d7a0
JD
21498{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21499echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21500if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21501 echo $ECHO_N "(cached) $ECHO_C" >&6
21502else
edfaf76d 21503 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21504fi
ca81d7a0
JD
21505ac_res=`eval echo '${'$as_ac_Header'}'`
21506 { echo "$as_me:$LINENO: result: $ac_res" >&5
21507echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21508
21509fi
503d2be0 21510if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21511 cat >>confdefs.h <<_ACEOF
503d2be0 21512#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21513_ACEOF
503d2be0 21514
a21616bd 21515else
503d2be0
AS
21516
21517for ac_header in kerberosIV/des.h
a21616bd 21518do
503d2be0 21519as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21521 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21524 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21525fi
ca81d7a0
JD
21526ac_res=`eval echo '${'$as_ac_Header'}'`
21527 { echo "$as_me:$LINENO: result: $ac_res" >&5
21528echo "${ECHO_T}$ac_res" >&6; }
98418dba 21529else
c0d27fcc 21530 # Is the header compilable?
ca81d7a0
JD
21531{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21532echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21534/* confdefs.h. */
21535_ACEOF
21536cat confdefs.h >>conftest.$ac_ext
21537cat >>conftest.$ac_ext <<_ACEOF
21538/* end confdefs.h. */
c0d27fcc
MR
21539$ac_includes_default
21540#include <$ac_header>
21541_ACEOF
21542rm -f conftest.$ac_objext
ca81d7a0
JD
21543if { (ac_try="$ac_compile"
21544case "(($ac_try" in
21545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21546 *) ac_try_echo=$ac_try;;
21547esac
21548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21549 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21550 ac_status=$?
edfaf76d
LK
21551 grep -v '^ *+' conftest.er1 >conftest.err
21552 rm -f conftest.er1
21553 cat conftest.err >&5
c0d27fcc 21554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21555 (exit $ac_status); } && {
21556 test -z "$ac_c_werror_flag" ||
21557 test ! -s conftest.err
21558 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21559 ac_header_compiler=yes
21560else
21561 echo "$as_me: failed program was:" >&5
19650fd6
AS
21562sed 's/^/| /' conftest.$ac_ext >&5
21563
ca81d7a0 21564 ac_header_compiler=no
c0d27fcc 21565fi
ca81d7a0
JD
21566
21567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21568{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21569echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21570
21571# Is the header present?
ca81d7a0
JD
21572{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21573echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21574cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21575/* confdefs.h. */
21576_ACEOF
21577cat confdefs.h >>conftest.$ac_ext
21578cat >>conftest.$ac_ext <<_ACEOF
21579/* end confdefs.h. */
503d2be0
AS
21580#include <$ac_header>
21581_ACEOF
ca81d7a0
JD
21582if { (ac_try="$ac_cpp conftest.$ac_ext"
21583case "(($ac_try" in
21584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21585 *) ac_try_echo=$ac_try;;
21586esac
21587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21589 ac_status=$?
6bae0ccf 21590 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21591 rm -f conftest.er1
21592 cat conftest.err >&5
c0d27fcc 21593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21594 (exit $ac_status); } >/dev/null && {
21595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21596 test ! -s conftest.err
21597 }; then
c0d27fcc 21598 ac_header_preproc=yes
503d2be0
AS
21599else
21600 echo "$as_me: failed program was:" >&5
19650fd6
AS
21601sed 's/^/| /' conftest.$ac_ext >&5
21602
c0d27fcc 21603 ac_header_preproc=no
a21616bd 21604fi
ca81d7a0 21605
503d2be0 21606rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21607{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21608echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21609
21610# So? What about this header?
edfaf76d
LK
21611case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21612 yes:no: )
c0d27fcc
MR
21613 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21614echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21615 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21616echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21617 ac_header_preproc=yes
19650fd6 21618 ;;
edfaf76d 21619 no:yes:* )
c0d27fcc
MR
21620 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21621echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21622 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21623echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21624 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21625echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21626 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21627echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21628 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21629echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21630 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21631echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21632
19650fd6 21633 ;;
c0d27fcc 21634esac
ca81d7a0
JD
21635{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21636echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21637if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21638 echo $ECHO_N "(cached) $ECHO_C" >&6
21639else
edfaf76d 21640 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21641fi
ca81d7a0
JD
21642ac_res=`eval echo '${'$as_ac_Header'}'`
21643 { echo "$as_me:$LINENO: result: $ac_res" >&5
21644echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21645
21646fi
503d2be0 21647if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21648 cat >>confdefs.h <<_ACEOF
503d2be0 21649#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21650_ACEOF
503d2be0 21651
a21616bd 21652else
503d2be0
AS
21653
21654for ac_header in kerberos/des.h
a21616bd 21655do
503d2be0 21656as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21658 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21659echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21660if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21661 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21662fi
ca81d7a0
JD
21663ac_res=`eval echo '${'$as_ac_Header'}'`
21664 { echo "$as_me:$LINENO: result: $ac_res" >&5
21665echo "${ECHO_T}$ac_res" >&6; }
98418dba 21666else
c0d27fcc 21667 # Is the header compilable?
ca81d7a0
JD
21668{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21669echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
c0d27fcc
MR
21676$ac_includes_default
21677#include <$ac_header>
21678_ACEOF
21679rm -f conftest.$ac_objext
ca81d7a0
JD
21680if { (ac_try="$ac_compile"
21681case "(($ac_try" in
21682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21683 *) ac_try_echo=$ac_try;;
21684esac
21685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21686 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21687 ac_status=$?
edfaf76d
LK
21688 grep -v '^ *+' conftest.er1 >conftest.err
21689 rm -f conftest.er1
21690 cat conftest.err >&5
c0d27fcc 21691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21692 (exit $ac_status); } && {
21693 test -z "$ac_c_werror_flag" ||
21694 test ! -s conftest.err
21695 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21696 ac_header_compiler=yes
21697else
21698 echo "$as_me: failed program was:" >&5
19650fd6
AS
21699sed 's/^/| /' conftest.$ac_ext >&5
21700
ca81d7a0 21701 ac_header_compiler=no
c0d27fcc 21702fi
ca81d7a0
JD
21703
21704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21705{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21706echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21707
21708# Is the header present?
ca81d7a0
JD
21709{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21710echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21712/* confdefs.h. */
21713_ACEOF
21714cat confdefs.h >>conftest.$ac_ext
21715cat >>conftest.$ac_ext <<_ACEOF
21716/* end confdefs.h. */
503d2be0
AS
21717#include <$ac_header>
21718_ACEOF
ca81d7a0
JD
21719if { (ac_try="$ac_cpp conftest.$ac_ext"
21720case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
21724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21725 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21726 ac_status=$?
6bae0ccf 21727 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21728 rm -f conftest.er1
21729 cat conftest.err >&5
c0d27fcc 21730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21731 (exit $ac_status); } >/dev/null && {
21732 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21733 test ! -s conftest.err
21734 }; then
c0d27fcc 21735 ac_header_preproc=yes
503d2be0
AS
21736else
21737 echo "$as_me: failed program was:" >&5
19650fd6
AS
21738sed 's/^/| /' conftest.$ac_ext >&5
21739
c0d27fcc 21740 ac_header_preproc=no
a21616bd 21741fi
ca81d7a0 21742
503d2be0 21743rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21744{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21745echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21746
21747# So? What about this header?
edfaf76d
LK
21748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21749 yes:no: )
c0d27fcc
MR
21750 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21751echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21752 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21753echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21754 ac_header_preproc=yes
19650fd6 21755 ;;
edfaf76d 21756 no:yes:* )
c0d27fcc
MR
21757 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21758echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21759 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21760echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21761 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21762echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21763 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21764echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21765 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21766echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21767 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21768echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21769
19650fd6 21770 ;;
c0d27fcc 21771esac
ca81d7a0
JD
21772{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21775 echo $ECHO_N "(cached) $ECHO_C" >&6
21776else
edfaf76d 21777 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21778fi
ca81d7a0
JD
21779ac_res=`eval echo '${'$as_ac_Header'}'`
21780 { echo "$as_me:$LINENO: result: $ac_res" >&5
21781echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21782
21783fi
503d2be0 21784if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21785 cat >>confdefs.h <<_ACEOF
503d2be0 21786#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21787_ACEOF
a21616bd
KR
21788
21789fi
c0d27fcc 21790
a21616bd
KR
21791done
21792
98418dba 21793fi
c0d27fcc 21794
925c2f3f
EZ
21795done
21796
98418dba 21797fi
c0d27fcc 21798
925c2f3f 21799done
98418dba 21800
c0d27fcc 21801
925c2f3f
EZ
21802for ac_header in krb.h
21803do
21804as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21805if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21806 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21807echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21808if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21809 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21810fi
ca81d7a0
JD
21811ac_res=`eval echo '${'$as_ac_Header'}'`
21812 { echo "$as_me:$LINENO: result: $ac_res" >&5
21813echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21814else
21815 # Is the header compilable?
ca81d7a0
JD
21816{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21817echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21818cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21819/* confdefs.h. */
21820_ACEOF
21821cat confdefs.h >>conftest.$ac_ext
21822cat >>conftest.$ac_ext <<_ACEOF
21823/* end confdefs.h. */
c0d27fcc
MR
21824$ac_includes_default
21825#include <$ac_header>
21826_ACEOF
21827rm -f conftest.$ac_objext
ca81d7a0
JD
21828if { (ac_try="$ac_compile"
21829case "(($ac_try" in
21830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21831 *) ac_try_echo=$ac_try;;
21832esac
21833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21834 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21835 ac_status=$?
edfaf76d
LK
21836 grep -v '^ *+' conftest.er1 >conftest.err
21837 rm -f conftest.er1
21838 cat conftest.err >&5
c0d27fcc 21839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21840 (exit $ac_status); } && {
21841 test -z "$ac_c_werror_flag" ||
21842 test ! -s conftest.err
21843 } && test -s conftest.$ac_objext; then
c0d27fcc 21844 ac_header_compiler=yes
925c2f3f 21845else
c0d27fcc 21846 echo "$as_me: failed program was:" >&5
19650fd6
AS
21847sed 's/^/| /' conftest.$ac_ext >&5
21848
ca81d7a0 21849 ac_header_compiler=no
c0d27fcc 21850fi
ca81d7a0
JD
21851
21852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21853{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21854echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21855
21856# Is the header present?
ca81d7a0
JD
21857{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21858echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21859cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21860/* confdefs.h. */
21861_ACEOF
21862cat confdefs.h >>conftest.$ac_ext
21863cat >>conftest.$ac_ext <<_ACEOF
21864/* end confdefs.h. */
503d2be0
AS
21865#include <$ac_header>
21866_ACEOF
ca81d7a0
JD
21867if { (ac_try="$ac_cpp conftest.$ac_ext"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
21872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21873 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21874 ac_status=$?
6bae0ccf 21875 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21876 rm -f conftest.er1
21877 cat conftest.err >&5
c0d27fcc 21878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21879 (exit $ac_status); } >/dev/null && {
21880 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21881 test ! -s conftest.err
21882 }; then
c0d27fcc 21883 ac_header_preproc=yes
503d2be0
AS
21884else
21885 echo "$as_me: failed program was:" >&5
19650fd6
AS
21886sed 's/^/| /' conftest.$ac_ext >&5
21887
c0d27fcc 21888 ac_header_preproc=no
a21616bd 21889fi
ca81d7a0 21890
503d2be0 21891rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21892{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21893echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21894
21895# So? What about this header?
edfaf76d
LK
21896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21897 yes:no: )
c0d27fcc
MR
21898 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21899echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21900 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21901echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21902 ac_header_preproc=yes
19650fd6 21903 ;;
edfaf76d 21904 no:yes:* )
c0d27fcc
MR
21905 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21906echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21907 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21908echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21909 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21910echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21911 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21912echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21913 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21914echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21915 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21916echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21917
19650fd6 21918 ;;
c0d27fcc 21919esac
ca81d7a0
JD
21920{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21921echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21922if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21923 echo $ECHO_N "(cached) $ECHO_C" >&6
21924else
edfaf76d 21925 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21926fi
ca81d7a0
JD
21927ac_res=`eval echo '${'$as_ac_Header'}'`
21928 { echo "$as_me:$LINENO: result: $ac_res" >&5
21929echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21930
21931fi
503d2be0 21932if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21933 cat >>confdefs.h <<_ACEOF
503d2be0 21934#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21935_ACEOF
503d2be0 21936
a21616bd 21937else
503d2be0
AS
21938
21939for ac_header in kerberosIV/krb.h
a21616bd 21940do
503d2be0 21941as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21942if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21943 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21944echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21945if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21946 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21947fi
ca81d7a0
JD
21948ac_res=`eval echo '${'$as_ac_Header'}'`
21949 { echo "$as_me:$LINENO: result: $ac_res" >&5
21950echo "${ECHO_T}$ac_res" >&6; }
98418dba 21951else
c0d27fcc 21952 # Is the header compilable?
ca81d7a0
JD
21953{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21954echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21955cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21956/* confdefs.h. */
21957_ACEOF
21958cat confdefs.h >>conftest.$ac_ext
21959cat >>conftest.$ac_ext <<_ACEOF
21960/* end confdefs.h. */
c0d27fcc
MR
21961$ac_includes_default
21962#include <$ac_header>
21963_ACEOF
21964rm -f conftest.$ac_objext
ca81d7a0
JD
21965if { (ac_try="$ac_compile"
21966case "(($ac_try" in
21967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21968 *) ac_try_echo=$ac_try;;
21969esac
21970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21971 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21972 ac_status=$?
edfaf76d
LK
21973 grep -v '^ *+' conftest.er1 >conftest.err
21974 rm -f conftest.er1
21975 cat conftest.err >&5
c0d27fcc 21976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21977 (exit $ac_status); } && {
21978 test -z "$ac_c_werror_flag" ||
21979 test ! -s conftest.err
21980 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21981 ac_header_compiler=yes
21982else
21983 echo "$as_me: failed program was:" >&5
19650fd6
AS
21984sed 's/^/| /' conftest.$ac_ext >&5
21985
ca81d7a0 21986 ac_header_compiler=no
c0d27fcc 21987fi
ca81d7a0
JD
21988
21989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21990{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21991echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21992
21993# Is the header present?
ca81d7a0
JD
21994{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21995echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21996cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21997/* confdefs.h. */
21998_ACEOF
21999cat confdefs.h >>conftest.$ac_ext
22000cat >>conftest.$ac_ext <<_ACEOF
22001/* end confdefs.h. */
503d2be0
AS
22002#include <$ac_header>
22003_ACEOF
ca81d7a0
JD
22004if { (ac_try="$ac_cpp conftest.$ac_ext"
22005case "(($ac_try" in
22006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22007 *) ac_try_echo=$ac_try;;
22008esac
22009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22010 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22011 ac_status=$?
6bae0ccf 22012 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22013 rm -f conftest.er1
22014 cat conftest.err >&5
c0d27fcc 22015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22016 (exit $ac_status); } >/dev/null && {
22017 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22018 test ! -s conftest.err
22019 }; then
c0d27fcc 22020 ac_header_preproc=yes
503d2be0
AS
22021else
22022 echo "$as_me: failed program was:" >&5
19650fd6
AS
22023sed 's/^/| /' conftest.$ac_ext >&5
22024
c0d27fcc 22025 ac_header_preproc=no
a21616bd 22026fi
ca81d7a0 22027
503d2be0 22028rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22029{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22030echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22031
22032# So? What about this header?
edfaf76d
LK
22033case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22034 yes:no: )
c0d27fcc
MR
22035 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22036echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22037 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22038echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22039 ac_header_preproc=yes
19650fd6 22040 ;;
edfaf76d 22041 no:yes:* )
c0d27fcc
MR
22042 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22043echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22044 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22045echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22046 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22047echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22048 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22049echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22050 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22051echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22052 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22053echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22054
19650fd6 22055 ;;
c0d27fcc 22056esac
ca81d7a0
JD
22057{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22058echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22059if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22060 echo $ECHO_N "(cached) $ECHO_C" >&6
22061else
edfaf76d 22062 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22063fi
ca81d7a0
JD
22064ac_res=`eval echo '${'$as_ac_Header'}'`
22065 { echo "$as_me:$LINENO: result: $ac_res" >&5
22066echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22067
22068fi
503d2be0 22069if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22070 cat >>confdefs.h <<_ACEOF
503d2be0 22071#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22072_ACEOF
503d2be0 22073
a21616bd 22074else
503d2be0
AS
22075
22076for ac_header in kerberos/krb.h
a21616bd 22077do
503d2be0 22078as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22079if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22080 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22081echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22082if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22083 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22084fi
ca81d7a0
JD
22085ac_res=`eval echo '${'$as_ac_Header'}'`
22086 { echo "$as_me:$LINENO: result: $ac_res" >&5
22087echo "${ECHO_T}$ac_res" >&6; }
98418dba 22088else
c0d27fcc 22089 # Is the header compilable?
ca81d7a0
JD
22090{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22091echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22092cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22093/* confdefs.h. */
22094_ACEOF
22095cat confdefs.h >>conftest.$ac_ext
22096cat >>conftest.$ac_ext <<_ACEOF
22097/* end confdefs.h. */
c0d27fcc
MR
22098$ac_includes_default
22099#include <$ac_header>
22100_ACEOF
22101rm -f conftest.$ac_objext
ca81d7a0
JD
22102if { (ac_try="$ac_compile"
22103case "(($ac_try" in
22104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22105 *) ac_try_echo=$ac_try;;
22106esac
22107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22108 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22109 ac_status=$?
edfaf76d
LK
22110 grep -v '^ *+' conftest.er1 >conftest.err
22111 rm -f conftest.er1
22112 cat conftest.err >&5
c0d27fcc 22113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22114 (exit $ac_status); } && {
22115 test -z "$ac_c_werror_flag" ||
22116 test ! -s conftest.err
22117 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22118 ac_header_compiler=yes
22119else
22120 echo "$as_me: failed program was:" >&5
19650fd6
AS
22121sed 's/^/| /' conftest.$ac_ext >&5
22122
ca81d7a0 22123 ac_header_compiler=no
c0d27fcc 22124fi
ca81d7a0
JD
22125
22126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22127{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22128echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22129
22130# Is the header present?
ca81d7a0
JD
22131{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22132echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22133cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22134/* confdefs.h. */
22135_ACEOF
22136cat confdefs.h >>conftest.$ac_ext
22137cat >>conftest.$ac_ext <<_ACEOF
22138/* end confdefs.h. */
503d2be0
AS
22139#include <$ac_header>
22140_ACEOF
ca81d7a0
JD
22141if { (ac_try="$ac_cpp conftest.$ac_ext"
22142case "(($ac_try" in
22143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22144 *) ac_try_echo=$ac_try;;
22145esac
22146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22147 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22148 ac_status=$?
6bae0ccf 22149 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22150 rm -f conftest.er1
22151 cat conftest.err >&5
c0d27fcc 22152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22153 (exit $ac_status); } >/dev/null && {
22154 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22155 test ! -s conftest.err
22156 }; then
c0d27fcc 22157 ac_header_preproc=yes
503d2be0
AS
22158else
22159 echo "$as_me: failed program was:" >&5
19650fd6
AS
22160sed 's/^/| /' conftest.$ac_ext >&5
22161
c0d27fcc 22162 ac_header_preproc=no
a21616bd 22163fi
ca81d7a0 22164
503d2be0 22165rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22166{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22167echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22168
22169# So? What about this header?
edfaf76d
LK
22170case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22171 yes:no: )
35996d22
AS
22172 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22173echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22174 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22175echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22176 ac_header_preproc=yes
19650fd6 22177 ;;
edfaf76d 22178 no:yes:* )
c0d27fcc
MR
22179 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22180echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22181 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22182echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22183 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22184echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22185 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22186echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22187 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22188echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22189 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22190echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22191
19650fd6 22192 ;;
c0d27fcc 22193esac
ca81d7a0
JD
22194{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22195echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22196if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22197 echo $ECHO_N "(cached) $ECHO_C" >&6
22198else
edfaf76d 22199 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22200fi
ca81d7a0
JD
22201ac_res=`eval echo '${'$as_ac_Header'}'`
22202 { echo "$as_me:$LINENO: result: $ac_res" >&5
22203echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22204
22205fi
503d2be0 22206if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22207 cat >>confdefs.h <<_ACEOF
503d2be0 22208#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22209_ACEOF
503d2be0 22210
a21616bd 22211fi
c0d27fcc 22212
a21616bd
KR
22213done
22214
22215fi
c0d27fcc 22216
a21616bd
KR
22217done
22218
22219fi
c0d27fcc 22220
a21616bd
KR
22221done
22222
22223 fi
503d2be0
AS
22224
22225for ac_header in com_err.h
a21616bd 22226do
503d2be0 22227as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22229 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22232 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22233fi
ca81d7a0
JD
22234ac_res=`eval echo '${'$as_ac_Header'}'`
22235 { echo "$as_me:$LINENO: result: $ac_res" >&5
22236echo "${ECHO_T}$ac_res" >&6; }
98418dba 22237else
c0d27fcc 22238 # Is the header compilable?
ca81d7a0
JD
22239{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22240echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22242/* confdefs.h. */
22243_ACEOF
22244cat confdefs.h >>conftest.$ac_ext
22245cat >>conftest.$ac_ext <<_ACEOF
22246/* end confdefs.h. */
c0d27fcc
MR
22247$ac_includes_default
22248#include <$ac_header>
22249_ACEOF
22250rm -f conftest.$ac_objext
ca81d7a0
JD
22251if { (ac_try="$ac_compile"
22252case "(($ac_try" in
22253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22254 *) ac_try_echo=$ac_try;;
22255esac
22256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22257 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22258 ac_status=$?
22259 grep -v '^ *+' conftest.er1 >conftest.err
22260 rm -f conftest.er1
22261 cat conftest.err >&5
22262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22263 (exit $ac_status); } && {
22264 test -z "$ac_c_werror_flag" ||
22265 test ! -s conftest.err
22266 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22267 ac_header_compiler=yes
22268else
22269 echo "$as_me: failed program was:" >&5
19650fd6
AS
22270sed 's/^/| /' conftest.$ac_ext >&5
22271
ca81d7a0 22272 ac_header_compiler=no
c0d27fcc 22273fi
ca81d7a0
JD
22274
22275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22276{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22277echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22278
22279# Is the header present?
ca81d7a0
JD
22280{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22281echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22282cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22283/* confdefs.h. */
22284_ACEOF
22285cat confdefs.h >>conftest.$ac_ext
22286cat >>conftest.$ac_ext <<_ACEOF
22287/* end confdefs.h. */
503d2be0
AS
22288#include <$ac_header>
22289_ACEOF
ca81d7a0
JD
22290if { (ac_try="$ac_cpp conftest.$ac_ext"
22291case "(($ac_try" in
22292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22293 *) ac_try_echo=$ac_try;;
22294esac
22295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22296 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22297 ac_status=$?
6bae0ccf 22298 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22299 rm -f conftest.er1
22300 cat conftest.err >&5
c0d27fcc 22301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22302 (exit $ac_status); } >/dev/null && {
22303 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22304 test ! -s conftest.err
22305 }; then
c0d27fcc 22306 ac_header_preproc=yes
503d2be0
AS
22307else
22308 echo "$as_me: failed program was:" >&5
19650fd6
AS
22309sed 's/^/| /' conftest.$ac_ext >&5
22310
c0d27fcc 22311 ac_header_preproc=no
a21616bd 22312fi
ca81d7a0 22313
503d2be0 22314rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22315{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22316echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22317
22318# So? What about this header?
edfaf76d
LK
22319case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22320 yes:no: )
c0d27fcc
MR
22321 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22322echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22323 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22324echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22325 ac_header_preproc=yes
19650fd6 22326 ;;
edfaf76d 22327 no:yes:* )
c0d27fcc
MR
22328 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22329echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22330 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22331echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22332 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22333echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22334 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22335echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22336 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22337echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22338 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22339echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22340
19650fd6 22341 ;;
c0d27fcc 22342esac
ca81d7a0
JD
22343{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22345if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22346 echo $ECHO_N "(cached) $ECHO_C" >&6
22347else
edfaf76d 22348 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22349fi
ca81d7a0
JD
22350ac_res=`eval echo '${'$as_ac_Header'}'`
22351 { echo "$as_me:$LINENO: result: $ac_res" >&5
22352echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22353
22354fi
503d2be0 22355if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22356 cat >>confdefs.h <<_ACEOF
503d2be0 22357#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22358_ACEOF
503d2be0 22359
a21616bd 22360fi
c0d27fcc 22361
a21616bd
KR
22362done
22363
22364fi
22365
ba4481b5
DL
22366# Solaris requires -lintl if you want strerror (which calls dgettext)
22367# to return localized messages.
503d2be0 22368
ca81d7a0
JD
22369{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22370echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22371if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22373else
503d2be0 22374 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22375LIBS="-lintl $LIBS"
503d2be0 22376cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22377/* confdefs.h. */
22378_ACEOF
22379cat confdefs.h >>conftest.$ac_ext
22380cat >>conftest.$ac_ext <<_ACEOF
22381/* end confdefs.h. */
503d2be0 22382
ca81d7a0
JD
22383/* Override any GCC internal prototype to avoid an error.
22384 Use char because int might match the return type of a GCC
22385 builtin and then its argument prototype would still apply. */
503d2be0
AS
22386#ifdef __cplusplus
22387extern "C"
22388#endif
503d2be0
AS
22389char dgettext ();
22390int
22391main ()
22392{
ca81d7a0 22393return dgettext ();
503d2be0
AS
22394 ;
22395 return 0;
22396}
22397_ACEOF
22398rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22399if { (ac_try="$ac_link"
22400case "(($ac_try" in
22401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22402 *) ac_try_echo=$ac_try;;
22403esac
22404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22405 (eval "$ac_link") 2>conftest.er1
503d2be0 22406 ac_status=$?
edfaf76d
LK
22407 grep -v '^ *+' conftest.er1 >conftest.err
22408 rm -f conftest.er1
22409 cat conftest.err >&5
c0d27fcc 22410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22411 (exit $ac_status); } && {
22412 test -z "$ac_c_werror_flag" ||
22413 test ! -s conftest.err
22414 } && test -s conftest$ac_exeext &&
22415 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22416 ac_cv_lib_intl_dgettext=yes
22417else
22418 echo "$as_me: failed program was:" >&5
19650fd6
AS
22419sed 's/^/| /' conftest.$ac_ext >&5
22420
ca81d7a0 22421 ac_cv_lib_intl_dgettext=no
503d2be0 22422fi
ca81d7a0 22423
f053c89f 22424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22425 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22426LIBS=$ac_check_lib_save_LIBS
22427fi
ca81d7a0
JD
22428{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22429echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22430if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22431 cat >>confdefs.h <<_ACEOF
503d2be0 22432#define HAVE_LIBINTL 1
c0d27fcc 22433_ACEOF
ba4481b5
DL
22434
22435 LIBS="-lintl $LIBS"
22436
ba4481b5
DL
22437fi
22438
c0d27fcc 22439
ca81d7a0
JD
22440{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22441echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22442if test "${emacs_cv_localtime_cache+set}" = set; then
22443 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22444else
22445 if test x$ac_cv_func_tzset = xyes; then
22446if test "$cross_compiling" = yes; then
22447 # If we have tzset, assume the worst when cross-compiling.
22448emacs_cv_localtime_cache=yes
22449else
503d2be0 22450 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22451/* confdefs.h. */
22452_ACEOF
22453cat confdefs.h >>conftest.$ac_ext
22454cat >>conftest.$ac_ext <<_ACEOF
22455/* end confdefs.h. */
ba4481b5 22456#include <time.h>
ba4481b5
DL
22457extern char **environ;
22458unset_TZ ()
22459{
22460 char **from, **to;
22461 for (to = from = environ; (*to = *from); from++)
22462 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22463 to++;
22464}
22465char TZ_GMT0[] = "TZ=GMT0";
22466char TZ_PST8[] = "TZ=PST8";
22467main()
22468{
22469 time_t now = time ((time_t *) 0);
22470 int hour_GMT0, hour_unset;
22471 if (putenv (TZ_GMT0) != 0)
22472 exit (1);
22473 hour_GMT0 = localtime (&now)->tm_hour;
22474 unset_TZ ();
22475 hour_unset = localtime (&now)->tm_hour;
22476 if (putenv (TZ_PST8) != 0)
22477 exit (1);
22478 if (localtime (&now)->tm_hour == hour_GMT0)
22479 exit (1);
22480 unset_TZ ();
22481 if (localtime (&now)->tm_hour != hour_unset)
22482 exit (1);
22483 exit (0);
22484}
503d2be0
AS
22485_ACEOF
22486rm -f conftest$ac_exeext
ca81d7a0
JD
22487if { (ac_try="$ac_link"
22488case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
22492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22493 (eval "$ac_link") 2>&5
503d2be0 22494 ac_status=$?
c0d27fcc 22495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22497 { (case "(($ac_try" in
22498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22499 *) ac_try_echo=$ac_try;;
22500esac
22501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22502 (eval "$ac_try") 2>&5
503d2be0 22503 ac_status=$?
c0d27fcc 22504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22505 (exit $ac_status); }; }; then
ba4481b5
DL
22506 emacs_cv_localtime_cache=no
22507else
503d2be0
AS
22508 echo "$as_me: program exited with status $ac_status" >&5
22509echo "$as_me: failed program was:" >&5
19650fd6
AS
22510sed 's/^/| /' conftest.$ac_ext >&5
22511
c0d27fcc 22512( exit $ac_status )
503d2be0 22513emacs_cv_localtime_cache=yes
ba4481b5 22514fi
ca81d7a0 22515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22516fi
ca81d7a0
JD
22517
22518
ba4481b5
DL
22519else
22520 # If we lack tzset, report that localtime does not cache TZ,
22521 # since we can't invalidate the cache if we don't have tzset.
22522 emacs_cv_localtime_cache=no
22523fi
22524fi
ca81d7a0
JD
22525{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22526echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22527if test $emacs_cv_localtime_cache = yes; then
b936fae4 22528
c0d27fcc 22529cat >>confdefs.h <<\_ACEOF
ba4481b5 22530#define LOCALTIME_CACHE 1
c0d27fcc 22531_ACEOF
ba4481b5
DL
22532
22533fi
22534
22535if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22536
22537for ac_func in gettimeofday
48d4b120 22538do
503d2be0 22539as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22540{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22541echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22542if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22543 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22544else
503d2be0 22545 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22546/* confdefs.h. */
22547_ACEOF
22548cat confdefs.h >>conftest.$ac_ext
22549cat >>conftest.$ac_ext <<_ACEOF
22550/* end confdefs.h. */
edfaf76d
LK
22551/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22552 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22553#define $ac_func innocuous_$ac_func
22554
48d4b120 22555/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22556 which can conflict with char $ac_func (); below.
22557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22558 <limits.h> exists even on freestanding compilers. */
edfaf76d 22559
19650fd6
AS
22560#ifdef __STDC__
22561# include <limits.h>
22562#else
22563# include <assert.h>
22564#endif
edfaf76d
LK
22565
22566#undef $ac_func
22567
ca81d7a0
JD
22568/* Override any GCC internal prototype to avoid an error.
22569 Use char because int might match the return type of a GCC
22570 builtin and then its argument prototype would still apply. */
503d2be0
AS
22571#ifdef __cplusplus
22572extern "C"
22573#endif
503d2be0 22574char $ac_func ();
48d4b120
DL
22575/* The GNU C library defines this for functions which it implements
22576 to always fail with ENOSYS. Some functions are actually named
22577 something starting with __ and the normal name is an alias. */
ca81d7a0 22578#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22579choke me
cd958eb3
MB
22580#endif
22581
19650fd6
AS
22582int
22583main ()
22584{
ca81d7a0 22585return $ac_func ();
503d2be0
AS
22586 ;
22587 return 0;
22588}
22589_ACEOF
22590rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22591if { (ac_try="$ac_link"
22592case "(($ac_try" in
22593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22594 *) ac_try_echo=$ac_try;;
22595esac
22596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22597 (eval "$ac_link") 2>conftest.er1
503d2be0 22598 ac_status=$?
edfaf76d
LK
22599 grep -v '^ *+' conftest.er1 >conftest.err
22600 rm -f conftest.er1
22601 cat conftest.err >&5
c0d27fcc 22602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22603 (exit $ac_status); } && {
22604 test -z "$ac_c_werror_flag" ||
22605 test ! -s conftest.err
22606 } && test -s conftest$ac_exeext &&
22607 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22608 eval "$as_ac_var=yes"
22609else
22610 echo "$as_me: failed program was:" >&5
19650fd6
AS
22611sed 's/^/| /' conftest.$ac_ext >&5
22612
ca81d7a0 22613 eval "$as_ac_var=no"
503d2be0 22614fi
ca81d7a0 22615
f053c89f 22616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22617 conftest$ac_exeext conftest.$ac_ext
503d2be0 22618fi
ca81d7a0
JD
22619ac_res=`eval echo '${'$as_ac_var'}'`
22620 { echo "$as_me:$LINENO: result: $ac_res" >&5
22621echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22622if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22623 cat >>confdefs.h <<_ACEOF
503d2be0 22624#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22625_ACEOF
48d4b120 22626
48d4b120
DL
22627fi
22628done
22629
b936fae4 22630 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22631 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22632echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22633if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22634 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22635else
503d2be0 22636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22637/* confdefs.h. */
22638_ACEOF
22639cat confdefs.h >>conftest.$ac_ext
22640cat >>conftest.$ac_ext <<_ACEOF
22641/* end confdefs.h. */
ba4481b5 22642
a3f08d9e
DL
22643#ifdef TIME_WITH_SYS_TIME
22644#include <sys/time.h>
22645#include <time.h>
22646#else
22647#ifdef HAVE_SYS_TIME_H
22648#include <sys/time.h>
22649#else
22650#include <time.h>
22651#endif
22652#endif
503d2be0
AS
22653int
22654main ()
22655{
a3f08d9e 22656struct timeval time;
b936fae4 22657 gettimeofday (&time, 0);
503d2be0
AS
22658 ;
22659 return 0;
22660}
22661_ACEOF
22662rm -f conftest.$ac_objext
f053c89f
CY
22663if { (ac_try="$ac_compile"
22664case "(($ac_try" in
ca81d7a0
JD
22665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666 *) ac_try_echo=$ac_try;;
22667esac
22668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22669 (eval "$ac_compile") 2>conftest.er1
503d2be0 22670 ac_status=$?
edfaf76d
LK
22671 grep -v '^ *+' conftest.er1 >conftest.err
22672 rm -f conftest.er1
22673 cat conftest.err >&5
c0d27fcc 22674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22675 (exit $ac_status); } && {
22676 test -z "$ac_c_werror_flag" ||
22677 test ! -s conftest.err
22678 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22679 emacs_cv_gettimeofday_two_arguments=yes
22680else
503d2be0 22681 echo "$as_me: failed program was:" >&5
19650fd6
AS
22682sed 's/^/| /' conftest.$ac_ext >&5
22683
ca81d7a0 22684 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22685fi
ca81d7a0
JD
22686
22687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22688fi
ca81d7a0
JD
22689{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22690echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22691 if test $emacs_cv_gettimeofday_two_arguments = no; then
22692
c0d27fcc 22693cat >>confdefs.h <<\_ACEOF
ba4481b5 22694#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22695_ACEOF
ba4481b5 22696
b936fae4 22697 fi
ba4481b5
DL
22698 fi
22699fi
22700
22701ok_so_far=yes
ca81d7a0
JD
22702{ echo "$as_me:$LINENO: checking for socket" >&5
22703echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22704if test "${ac_cv_func_socket+set}" = set; then
22705 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22706else
503d2be0 22707 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22708/* confdefs.h. */
22709_ACEOF
22710cat confdefs.h >>conftest.$ac_ext
22711cat >>conftest.$ac_ext <<_ACEOF
22712/* end confdefs.h. */
edfaf76d
LK
22713/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22714 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22715#define socket innocuous_socket
22716
ba4481b5 22717/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22718 which can conflict with char socket (); below.
22719 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22720 <limits.h> exists even on freestanding compilers. */
edfaf76d 22721
19650fd6
AS
22722#ifdef __STDC__
22723# include <limits.h>
22724#else
22725# include <assert.h>
22726#endif
edfaf76d
LK
22727
22728#undef socket
22729
ca81d7a0
JD
22730/* Override any GCC internal prototype to avoid an error.
22731 Use char because int might match the return type of a GCC
22732 builtin and then its argument prototype would still apply. */
503d2be0
AS
22733#ifdef __cplusplus
22734extern "C"
22735#endif
503d2be0 22736char socket ();
ba4481b5
DL
22737/* The GNU C library defines this for functions which it implements
22738 to always fail with ENOSYS. Some functions are actually named
22739 something starting with __ and the normal name is an alias. */
ca81d7a0 22740#if defined __stub_socket || defined __stub___socket
ba4481b5 22741choke me
cd958eb3
MB
22742#endif
22743
19650fd6
AS
22744int
22745main ()
22746{
ca81d7a0 22747return socket ();
503d2be0
AS
22748 ;
22749 return 0;
22750}
22751_ACEOF
22752rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22753if { (ac_try="$ac_link"
22754case "(($ac_try" in
22755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22756 *) ac_try_echo=$ac_try;;
22757esac
22758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22759 (eval "$ac_link") 2>conftest.er1
503d2be0 22760 ac_status=$?
edfaf76d
LK
22761 grep -v '^ *+' conftest.er1 >conftest.err
22762 rm -f conftest.er1
22763 cat conftest.err >&5
c0d27fcc 22764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22765 (exit $ac_status); } && {
22766 test -z "$ac_c_werror_flag" ||
22767 test ! -s conftest.err
22768 } && test -s conftest$ac_exeext &&
22769 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22770 ac_cv_func_socket=yes
22771else
22772 echo "$as_me: failed program was:" >&5
19650fd6
AS
22773sed 's/^/| /' conftest.$ac_ext >&5
22774
ca81d7a0 22775 ac_cv_func_socket=no
503d2be0 22776fi
ca81d7a0 22777
f053c89f 22778rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22779 conftest$ac_exeext conftest.$ac_ext
503d2be0 22780fi
ca81d7a0
JD
22781{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22782echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22783if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22784 :
22785else
503d2be0 22786 ok_so_far=no
ba4481b5
DL
22787fi
22788
22789if test $ok_so_far = yes; then
c0d27fcc 22790 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22791 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22792echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22793if test "${ac_cv_header_netinet_in_h+set}" = set; then
22794 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22795fi
ca81d7a0
JD
22796{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22797echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22798else
c0d27fcc 22799 # Is the header compilable?
ca81d7a0
JD
22800{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22801echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22802cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22803/* confdefs.h. */
22804_ACEOF
22805cat confdefs.h >>conftest.$ac_ext
22806cat >>conftest.$ac_ext <<_ACEOF
22807/* end confdefs.h. */
c0d27fcc
MR
22808$ac_includes_default
22809#include <netinet/in.h>
22810_ACEOF
22811rm -f conftest.$ac_objext
ca81d7a0
JD
22812if { (ac_try="$ac_compile"
22813case "(($ac_try" in
22814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22815 *) ac_try_echo=$ac_try;;
22816esac
22817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22818 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22819 ac_status=$?
edfaf76d
LK
22820 grep -v '^ *+' conftest.er1 >conftest.err
22821 rm -f conftest.er1
22822 cat conftest.err >&5
c0d27fcc 22823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22824 (exit $ac_status); } && {
22825 test -z "$ac_c_werror_flag" ||
22826 test ! -s conftest.err
22827 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22828 ac_header_compiler=yes
22829else
22830 echo "$as_me: failed program was:" >&5
19650fd6
AS
22831sed 's/^/| /' conftest.$ac_ext >&5
22832
ca81d7a0 22833 ac_header_compiler=no
c0d27fcc 22834fi
ca81d7a0
JD
22835
22836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22838echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22839
22840# Is the header present?
ca81d7a0
JD
22841{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22842echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22843cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22844/* confdefs.h. */
22845_ACEOF
22846cat confdefs.h >>conftest.$ac_ext
22847cat >>conftest.$ac_ext <<_ACEOF
22848/* end confdefs.h. */
ba4481b5 22849#include <netinet/in.h>
503d2be0 22850_ACEOF
ca81d7a0
JD
22851if { (ac_try="$ac_cpp conftest.$ac_ext"
22852case "(($ac_try" in
22853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22854 *) ac_try_echo=$ac_try;;
22855esac
22856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22858 ac_status=$?
6bae0ccf 22859 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22860 rm -f conftest.er1
22861 cat conftest.err >&5
c0d27fcc 22862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22863 (exit $ac_status); } >/dev/null && {
22864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22865 test ! -s conftest.err
22866 }; then
c0d27fcc 22867 ac_header_preproc=yes
ba4481b5 22868else
503d2be0 22869 echo "$as_me: failed program was:" >&5
19650fd6
AS
22870sed 's/^/| /' conftest.$ac_ext >&5
22871
c0d27fcc 22872 ac_header_preproc=no
ba4481b5 22873fi
ca81d7a0 22874
503d2be0 22875rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22877echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22878
22879# So? What about this header?
edfaf76d
LK
22880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22881 yes:no: )
c0d27fcc
MR
22882 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22883echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22884 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22885echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22886 ac_header_preproc=yes
19650fd6 22887 ;;
edfaf76d 22888 no:yes:* )
c0d27fcc
MR
22889 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22890echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22891 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22892echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22893 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22894echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22895 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22896echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22897 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22898echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22899 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22900echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22901
19650fd6 22902 ;;
c0d27fcc 22903esac
ca81d7a0
JD
22904{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22905echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22906if test "${ac_cv_header_netinet_in_h+set}" = set; then
22907 echo $ECHO_N "(cached) $ECHO_C" >&6
22908else
22909 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22910fi
ca81d7a0
JD
22911{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22912echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22913
22914fi
503d2be0 22915if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22916 :
22917else
503d2be0 22918 ok_so_far=no
ba4481b5
DL
22919fi
22920
c0d27fcc 22921
ba4481b5
DL
22922fi
22923if test $ok_so_far = yes; then
c0d27fcc 22924 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22925 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22926echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22927if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22928 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22929fi
ca81d7a0
JD
22930{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22931echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22932else
c0d27fcc 22933 # Is the header compilable?
ca81d7a0
JD
22934{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22935echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22936cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22937/* confdefs.h. */
22938_ACEOF
22939cat confdefs.h >>conftest.$ac_ext
22940cat >>conftest.$ac_ext <<_ACEOF
22941/* end confdefs.h. */
c0d27fcc
MR
22942$ac_includes_default
22943#include <arpa/inet.h>
22944_ACEOF
22945rm -f conftest.$ac_objext
ca81d7a0
JD
22946if { (ac_try="$ac_compile"
22947case "(($ac_try" in
22948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22949 *) ac_try_echo=$ac_try;;
22950esac
22951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22952 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22953 ac_status=$?
edfaf76d
LK
22954 grep -v '^ *+' conftest.er1 >conftest.err
22955 rm -f conftest.er1
22956 cat conftest.err >&5
c0d27fcc 22957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22958 (exit $ac_status); } && {
22959 test -z "$ac_c_werror_flag" ||
22960 test ! -s conftest.err
22961 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22962 ac_header_compiler=yes
22963else
22964 echo "$as_me: failed program was:" >&5
19650fd6
AS
22965sed 's/^/| /' conftest.$ac_ext >&5
22966
ca81d7a0 22967 ac_header_compiler=no
c0d27fcc 22968fi
ca81d7a0
JD
22969
22970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22971{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22972echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22973
22974# Is the header present?
ca81d7a0
JD
22975{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22976echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
ba4481b5 22983#include <arpa/inet.h>
503d2be0 22984_ACEOF
ca81d7a0
JD
22985if { (ac_try="$ac_cpp conftest.$ac_ext"
22986case "(($ac_try" in
22987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22988 *) ac_try_echo=$ac_try;;
22989esac
22990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22991 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22992 ac_status=$?
6bae0ccf 22993 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22994 rm -f conftest.er1
22995 cat conftest.err >&5
c0d27fcc 22996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22997 (exit $ac_status); } >/dev/null && {
22998 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22999 test ! -s conftest.err
23000 }; then
c0d27fcc 23001 ac_header_preproc=yes
ba4481b5 23002else
503d2be0 23003 echo "$as_me: failed program was:" >&5
19650fd6
AS
23004sed 's/^/| /' conftest.$ac_ext >&5
23005
c0d27fcc 23006 ac_header_preproc=no
ba4481b5 23007fi
ca81d7a0 23008
503d2be0 23009rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23010{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23011echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23012
23013# So? What about this header?
edfaf76d
LK
23014case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23015 yes:no: )
c0d27fcc
MR
23016 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23017echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23018 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23019echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
23020 ac_header_preproc=yes
19650fd6 23021 ;;
edfaf76d 23022 no:yes:* )
c0d27fcc
MR
23023 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23024echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
23025 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23026echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23027 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23028echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23029 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23030echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23031 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23032echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23033 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23034echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23035
19650fd6 23036 ;;
c0d27fcc 23037esac
ca81d7a0
JD
23038{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23039echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23040if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23041 echo $ECHO_N "(cached) $ECHO_C" >&6
23042else
23043 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23044fi
ca81d7a0
JD
23045{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23046echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23047
23048fi
503d2be0 23049if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23050 :
23051else
503d2be0 23052 ok_so_far=no
ba4481b5
DL
23053fi
23054
c0d27fcc 23055
ba4481b5
DL
23056fi
23057if test $ok_so_far = yes; then
b936fae4 23058
c0d27fcc 23059cat >>confdefs.h <<\_ACEOF
ba4481b5 23060#define HAVE_INET_SOCKETS 1
c0d27fcc 23061_ACEOF
ba4481b5
DL
23062
23063fi
23064
2d2b6695 23065
7862d3a8 23066for ac_header in sys/ioctl.h
2d2b6695
KS
23067do
23068as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23069if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23070 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23071echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23072if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23073 echo $ECHO_N "(cached) $ECHO_C" >&6
23074fi
ca81d7a0
JD
23075ac_res=`eval echo '${'$as_ac_Header'}'`
23076 { echo "$as_me:$LINENO: result: $ac_res" >&5
23077echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23078else
23079 # Is the header compilable?
ca81d7a0
JD
23080{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23081echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23082cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23083/* confdefs.h. */
23084_ACEOF
23085cat confdefs.h >>conftest.$ac_ext
23086cat >>conftest.$ac_ext <<_ACEOF
23087/* end confdefs.h. */
23088$ac_includes_default
23089#include <$ac_header>
23090_ACEOF
23091rm -f conftest.$ac_objext
ca81d7a0
JD
23092if { (ac_try="$ac_compile"
23093case "(($ac_try" in
23094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23095 *) ac_try_echo=$ac_try;;
23096esac
23097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23098 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23099 ac_status=$?
edfaf76d
LK
23100 grep -v '^ *+' conftest.er1 >conftest.err
23101 rm -f conftest.er1
23102 cat conftest.err >&5
2d2b6695 23103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23104 (exit $ac_status); } && {
23105 test -z "$ac_c_werror_flag" ||
23106 test ! -s conftest.err
23107 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23108 ac_header_compiler=yes
23109else
23110 echo "$as_me: failed program was:" >&5
23111sed 's/^/| /' conftest.$ac_ext >&5
23112
ca81d7a0 23113 ac_header_compiler=no
2d2b6695 23114fi
ca81d7a0
JD
23115
23116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23117{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23118echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23119
23120# Is the header present?
ca81d7a0
JD
23121{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23122echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23123cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23124/* confdefs.h. */
23125_ACEOF
23126cat confdefs.h >>conftest.$ac_ext
23127cat >>conftest.$ac_ext <<_ACEOF
23128/* end confdefs.h. */
23129#include <$ac_header>
23130_ACEOF
ca81d7a0
JD
23131if { (ac_try="$ac_cpp conftest.$ac_ext"
23132case "(($ac_try" in
23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23134 *) ac_try_echo=$ac_try;;
23135esac
23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23137 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23138 ac_status=$?
23139 grep -v '^ *+' conftest.er1 >conftest.err
23140 rm -f conftest.er1
23141 cat conftest.err >&5
23142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23143 (exit $ac_status); } >/dev/null && {
23144 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23145 test ! -s conftest.err
23146 }; then
2d2b6695
KS
23147 ac_header_preproc=yes
23148else
23149 echo "$as_me: failed program was:" >&5
23150sed 's/^/| /' conftest.$ac_ext >&5
23151
23152 ac_header_preproc=no
23153fi
ca81d7a0 23154
2d2b6695 23155rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23156{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23157echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23158
23159# So? What about this header?
edfaf76d
LK
23160case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23161 yes:no: )
2d2b6695
KS
23162 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23163echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23164 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23165echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23166 ac_header_preproc=yes
2d2b6695 23167 ;;
edfaf76d 23168 no:yes:* )
2d2b6695
KS
23169 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23170echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23171 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23172echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23173 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23174echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23175 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23176echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23177 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23178echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23179 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23180echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23181
2d2b6695
KS
23182 ;;
23183esac
ca81d7a0
JD
23184{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23186if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23187 echo $ECHO_N "(cached) $ECHO_C" >&6
23188else
edfaf76d 23189 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23190fi
ca81d7a0
JD
23191ac_res=`eval echo '${'$as_ac_Header'}'`
23192 { echo "$as_me:$LINENO: result: $ac_res" >&5
23193echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23194
23195fi
23196if test `eval echo '${'$as_ac_Header'}'` = yes; then
23197 cat >>confdefs.h <<_ACEOF
23198#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23199_ACEOF
23200
23201fi
23202
23203done
23204
23205
ba4481b5 23206if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23207
c0d27fcc 23208cat >>confdefs.h <<\_ACEOF
ba4481b5 23209#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23210_ACEOF
ba4481b5
DL
23211
23212fi
23213
ca81d7a0
JD
23214{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23215echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23216if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23217 { echo "$as_me:$LINENO: result: yes" >&5
23218echo "${ECHO_T}yes" >&6; }
b936fae4 23219
c0d27fcc 23220cat >>confdefs.h <<\_ACEOF
3d9fec71 23221#define HAVE_DEV_PTMX 1
c0d27fcc 23222_ACEOF
3d9fec71
DL
23223
23224else
ca81d7a0
JD
23225 { echo "$as_me:$LINENO: result: no" >&5
23226echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23227fi
23228
ca81d7a0
JD
23229{ echo "$as_me:$LINENO: checking for pid_t" >&5
23230echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23231if test "${ac_cv_type_pid_t+set}" = set; then
23232 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23233else
503d2be0 23234 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23235/* confdefs.h. */
23236_ACEOF
23237cat confdefs.h >>conftest.$ac_ext
23238cat >>conftest.$ac_ext <<_ACEOF
23239/* end confdefs.h. */
503d2be0 23240$ac_includes_default
ca81d7a0 23241typedef pid_t ac__type_new_;
503d2be0
AS
23242int
23243main ()
23244{
ca81d7a0 23245if ((ac__type_new_ *) 0)
503d2be0 23246 return 0;
ca81d7a0 23247if (sizeof (ac__type_new_))
503d2be0
AS
23248 return 0;
23249 ;
23250 return 0;
23251}
23252_ACEOF
23253rm -f conftest.$ac_objext
ca81d7a0
JD
23254if { (ac_try="$ac_compile"
23255case "(($ac_try" in
23256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23257 *) ac_try_echo=$ac_try;;
23258esac
23259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23260 (eval "$ac_compile") 2>conftest.er1
503d2be0 23261 ac_status=$?
edfaf76d
LK
23262 grep -v '^ *+' conftest.er1 >conftest.err
23263 rm -f conftest.er1
23264 cat conftest.err >&5
c0d27fcc 23265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23266 (exit $ac_status); } && {
23267 test -z "$ac_c_werror_flag" ||
23268 test ! -s conftest.err
23269 } && test -s conftest.$ac_objext; then
647847ea
DL
23270 ac_cv_type_pid_t=yes
23271else
503d2be0 23272 echo "$as_me: failed program was:" >&5
19650fd6
AS
23273sed 's/^/| /' conftest.$ac_ext >&5
23274
ca81d7a0 23275 ac_cv_type_pid_t=no
647847ea 23276fi
ca81d7a0
JD
23277
23278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23279fi
ca81d7a0
JD
23280{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23281echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23282if test $ac_cv_type_pid_t = yes; then
23283 :
23284else
23285
c0d27fcc 23286cat >>confdefs.h <<_ACEOF
647847ea 23287#define pid_t int
c0d27fcc 23288_ACEOF
647847ea
DL
23289
23290fi
23291
c0d27fcc 23292
ca81d7a0 23293for ac_header in vfork.h
503d2be0
AS
23294do
23295as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23296if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23297 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23298echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23299if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23300 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23301fi
ca81d7a0
JD
23302ac_res=`eval echo '${'$as_ac_Header'}'`
23303 { echo "$as_me:$LINENO: result: $ac_res" >&5
23304echo "${ECHO_T}$ac_res" >&6; }
98418dba 23305else
c0d27fcc 23306 # Is the header compilable?
ca81d7a0
JD
23307{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23308echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23309cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23310/* confdefs.h. */
23311_ACEOF
23312cat confdefs.h >>conftest.$ac_ext
23313cat >>conftest.$ac_ext <<_ACEOF
23314/* end confdefs.h. */
c0d27fcc
MR
23315$ac_includes_default
23316#include <$ac_header>
23317_ACEOF
23318rm -f conftest.$ac_objext
ca81d7a0
JD
23319if { (ac_try="$ac_compile"
23320case "(($ac_try" in
23321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23322 *) ac_try_echo=$ac_try;;
23323esac
23324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23325 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23326 ac_status=$?
edfaf76d
LK
23327 grep -v '^ *+' conftest.er1 >conftest.err
23328 rm -f conftest.er1
23329 cat conftest.err >&5
c0d27fcc 23330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23331 (exit $ac_status); } && {
23332 test -z "$ac_c_werror_flag" ||
23333 test ! -s conftest.err
23334 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23335 ac_header_compiler=yes
23336else
23337 echo "$as_me: failed program was:" >&5
19650fd6
AS
23338sed 's/^/| /' conftest.$ac_ext >&5
23339
ca81d7a0 23340 ac_header_compiler=no
c0d27fcc 23341fi
ca81d7a0
JD
23342
23343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23344{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23345echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23346
23347# Is the header present?
ca81d7a0
JD
23348{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23349echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23350cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23351/* confdefs.h. */
23352_ACEOF
23353cat confdefs.h >>conftest.$ac_ext
23354cat >>conftest.$ac_ext <<_ACEOF
23355/* end confdefs.h. */
503d2be0
AS
23356#include <$ac_header>
23357_ACEOF
ca81d7a0
JD
23358if { (ac_try="$ac_cpp conftest.$ac_ext"
23359case "(($ac_try" in
23360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23361 *) ac_try_echo=$ac_try;;
23362esac
23363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23364 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23365 ac_status=$?
6bae0ccf 23366 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23367 rm -f conftest.er1
23368 cat conftest.err >&5
c0d27fcc 23369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23370 (exit $ac_status); } >/dev/null && {
23371 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23372 test ! -s conftest.err
23373 }; then
c0d27fcc 23374 ac_header_preproc=yes
647847ea 23375else
503d2be0 23376 echo "$as_me: failed program was:" >&5
19650fd6
AS
23377sed 's/^/| /' conftest.$ac_ext >&5
23378
c0d27fcc 23379 ac_header_preproc=no
647847ea 23380fi
ca81d7a0 23381
503d2be0 23382rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23383{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23384echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23385
23386# So? What about this header?
edfaf76d
LK
23387case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23388 yes:no: )
c0d27fcc
MR
23389 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23390echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23391 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23392echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23393 ac_header_preproc=yes
19650fd6 23394 ;;
edfaf76d 23395 no:yes:* )
c0d27fcc
MR
23396 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23397echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23398 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23399echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23400 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23401echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23402 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23403echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23404 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23405echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23406 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23407echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23408
19650fd6 23409 ;;
c0d27fcc 23410esac
ca81d7a0
JD
23411{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23412echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23413if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23414 echo $ECHO_N "(cached) $ECHO_C" >&6
23415else
edfaf76d 23416 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23417fi
ca81d7a0
JD
23418ac_res=`eval echo '${'$as_ac_Header'}'`
23419 { echo "$as_me:$LINENO: result: $ac_res" >&5
23420echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23421
23422fi
503d2be0 23423if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23424 cat >>confdefs.h <<_ACEOF
503d2be0 23425#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23426_ACEOF
647847ea 23427
73b77ee5 23428fi
c0d27fcc 23429
503d2be0 23430done
73b77ee5 23431
c0d27fcc
MR
23432
23433
503d2be0
AS
23434for ac_func in fork vfork
23435do
23436as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23437{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23438echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23439if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23440 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23441else
503d2be0 23442 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23443/* confdefs.h. */
23444_ACEOF
23445cat confdefs.h >>conftest.$ac_ext
23446cat >>conftest.$ac_ext <<_ACEOF
23447/* end confdefs.h. */
edfaf76d
LK
23448/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23449 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23450#define $ac_func innocuous_$ac_func
23451
fa0b693c 23452/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23453 which can conflict with char $ac_func (); below.
23454 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23455 <limits.h> exists even on freestanding compilers. */
edfaf76d 23456
19650fd6
AS
23457#ifdef __STDC__
23458# include <limits.h>
23459#else
23460# include <assert.h>
23461#endif
edfaf76d
LK
23462
23463#undef $ac_func
23464
ca81d7a0
JD
23465/* Override any GCC internal prototype to avoid an error.
23466 Use char because int might match the return type of a GCC
23467 builtin and then its argument prototype would still apply. */
503d2be0
AS
23468#ifdef __cplusplus
23469extern "C"
23470#endif
503d2be0 23471char $ac_func ();
fa0b693c
GM
23472/* The GNU C library defines this for functions which it implements
23473 to always fail with ENOSYS. Some functions are actually named
23474 something starting with __ and the normal name is an alias. */
ca81d7a0 23475#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23476choke me
fa0b693c
GM
23477#endif
23478
19650fd6
AS
23479int
23480main ()
23481{
ca81d7a0 23482return $ac_func ();
503d2be0
AS
23483 ;
23484 return 0;
23485}
23486_ACEOF
23487rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23488if { (ac_try="$ac_link"
23489case "(($ac_try" in
23490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23491 *) ac_try_echo=$ac_try;;
23492esac
23493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23494 (eval "$ac_link") 2>conftest.er1
503d2be0 23495 ac_status=$?
edfaf76d
LK
23496 grep -v '^ *+' conftest.er1 >conftest.err
23497 rm -f conftest.er1
23498 cat conftest.err >&5
c0d27fcc 23499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23500 (exit $ac_status); } && {
23501 test -z "$ac_c_werror_flag" ||
23502 test ! -s conftest.err
23503 } && test -s conftest$ac_exeext &&
23504 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23505 eval "$as_ac_var=yes"
23506else
23507 echo "$as_me: failed program was:" >&5
19650fd6
AS
23508sed 's/^/| /' conftest.$ac_ext >&5
23509
ca81d7a0 23510 eval "$as_ac_var=no"
503d2be0 23511fi
ca81d7a0 23512
f053c89f 23513rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23514 conftest$ac_exeext conftest.$ac_ext
503d2be0 23515fi
ca81d7a0
JD
23516ac_res=`eval echo '${'$as_ac_var'}'`
23517 { echo "$as_me:$LINENO: result: $ac_res" >&5
23518echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23519if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23520 cat >>confdefs.h <<_ACEOF
503d2be0 23521#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23522_ACEOF
503d2be0 23523
fa0b693c 23524fi
503d2be0 23525done
fa0b693c 23526
503d2be0 23527if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23528 { echo "$as_me:$LINENO: checking for working fork" >&5
23529echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23530if test "${ac_cv_func_fork_works+set}" = set; then
23531 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23532else
503d2be0
AS
23533 if test "$cross_compiling" = yes; then
23534 ac_cv_func_fork_works=cross
23535else
23536 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23537/* confdefs.h. */
23538_ACEOF
23539cat confdefs.h >>conftest.$ac_ext
23540cat >>conftest.$ac_ext <<_ACEOF
23541/* end confdefs.h. */
23542$ac_includes_default
23543int
23544main ()
23545{
23546
23547 /* By Ruediger Kuhlmann. */
23548 return fork () < 0;
23549
23550 ;
23551 return 0;
23552}
503d2be0
AS
23553_ACEOF
23554rm -f conftest$ac_exeext
ca81d7a0
JD
23555if { (ac_try="$ac_link"
23556case "(($ac_try" in
23557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23558 *) ac_try_echo=$ac_try;;
23559esac
23560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23561 (eval "$ac_link") 2>&5
503d2be0 23562 ac_status=$?
c0d27fcc 23563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23565 { (case "(($ac_try" in
23566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23567 *) ac_try_echo=$ac_try;;
23568esac
23569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23570 (eval "$ac_try") 2>&5
503d2be0 23571 ac_status=$?
c0d27fcc 23572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23573 (exit $ac_status); }; }; then
23574 ac_cv_func_fork_works=yes
23575else
23576 echo "$as_me: program exited with status $ac_status" >&5
23577echo "$as_me: failed program was:" >&5
19650fd6
AS
23578sed 's/^/| /' conftest.$ac_ext >&5
23579
c0d27fcc 23580( exit $ac_status )
503d2be0
AS
23581ac_cv_func_fork_works=no
23582fi
ca81d7a0 23583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23584fi
ca81d7a0
JD
23585
23586
503d2be0 23587fi
ca81d7a0
JD
23588{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23589echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23590
6bae0ccf
DL
23591else
23592 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23593fi
23594if test "x$ac_cv_func_fork_works" = xcross; then
23595 case $host in
23596 *-*-amigaos* | *-*-msdosdjgpp*)
23597 # Override, as these systems have only a dummy fork() stub
23598 ac_cv_func_fork_works=no
23599 ;;
23600 *)
23601 ac_cv_func_fork_works=yes
23602 ;;
23603 esac
c0d27fcc
MR
23604 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23605echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23606fi
73b77ee5 23607ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23608if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23609 { echo "$as_me:$LINENO: checking for working vfork" >&5
23610echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23611if test "${ac_cv_func_vfork_works+set}" = set; then
23612 echo $ECHO_N "(cached) $ECHO_C" >&6
23613else
23614 if test "$cross_compiling" = yes; then
23615 ac_cv_func_vfork_works=cross
fa0b693c 23616else
503d2be0 23617 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23618/* confdefs.h. */
23619_ACEOF
23620cat confdefs.h >>conftest.$ac_ext
23621cat >>conftest.$ac_ext <<_ACEOF
23622/* end confdefs.h. */
73b77ee5 23623/* Thanks to Paul Eggert for this test. */
ca81d7a0 23624$ac_includes_default
19650fd6 23625#include <sys/wait.h>
f053c89f 23626#ifdef HAVE_VFORK_H
503d2be0 23627# include <vfork.h>
73b77ee5
GM
23628#endif
23629/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23630 argument registers are propagated back to the parent. The compiler
23631 is told about this with #include <vfork.h>, but some compilers
23632 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23633 static variable whose address is put into a register that is
23634 clobbered by the vfork. */
19650fd6 23635static void
fa0b693c 23636#ifdef __cplusplus
73b77ee5 23637sparc_address_test (int arg)
503d2be0 23638# else
73b77ee5 23639sparc_address_test (arg) int arg;
fa0b693c 23640#endif
fa0b693c 23641{
73b77ee5
GM
23642 static pid_t child;
23643 if (!child) {
23644 child = vfork ();
23645 if (child < 0) {
23646 perror ("vfork");
23647 _exit(2);
23648 }
23649 if (!child) {
23650 arg = getpid();
23651 write(-1, "", 0);
23652 _exit (arg);
23653 }
23654 }
23655}
503d2be0
AS
23656
23657int
23658main ()
23659{
73b77ee5
GM
23660 pid_t parent = getpid ();
23661 pid_t child;
fa0b693c 23662
19650fd6 23663 sparc_address_test (0);
fa0b693c 23664
73b77ee5 23665 child = vfork ();
fa0b693c 23666
73b77ee5 23667 if (child == 0) {
503d2be0
AS
23668 /* Here is another test for sparc vfork register problems. This
23669 test uses lots of local variables, at least as many local
23670 variables as main has allocated so far including compiler
23671 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23672 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23673 reuse the register of parent for one of the local variables,
23674 since it will think that parent can't possibly be used any more
23675 in this routine. Assigning to the local variable will thus
23676 munge parent in the parent process. */
73b77ee5
GM
23677 pid_t
23678 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23679 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23680 /* Convince the compiler that p..p7 are live; otherwise, it might
23681 use the same hardware register for all 8 local variables. */
23682 if (p != p1 || p != p2 || p != p3 || p != p4
23683 || p != p5 || p != p6 || p != p7)
23684 _exit(1);
fa0b693c 23685
503d2be0
AS
23686 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23687 from child file descriptors. If the child closes a descriptor
23688 before it execs or exits, this munges the parent's descriptor
23689 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23690 _exit(close(fileno(stdout)) != 0);
23691 } else {
23692 int status;
23693 struct stat st;
23694
23695 while (wait(&status) != child)
23696 ;
ca81d7a0 23697 return (
73b77ee5
GM
23698 /* Was there some problem with vforking? */
23699 child < 0
23700
23701 /* Did the child fail? (This shouldn't happen.) */
23702 || status
23703
23704 /* Did the vfork/compiler bug occur? */
23705 || parent != getpid()
fa0b693c 23706
73b77ee5
GM
23707 /* Did the file descriptor bug occur? */
23708 || fstat(fileno(stdout), &st) != 0
23709 );
23710 }
23711}
503d2be0
AS
23712_ACEOF
23713rm -f conftest$ac_exeext
ca81d7a0
JD
23714if { (ac_try="$ac_link"
23715case "(($ac_try" in
23716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23717 *) ac_try_echo=$ac_try;;
23718esac
23719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23720 (eval "$ac_link") 2>&5
503d2be0 23721 ac_status=$?
c0d27fcc 23722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23724 { (case "(($ac_try" in
23725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23726 *) ac_try_echo=$ac_try;;
23727esac
23728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23729 (eval "$ac_try") 2>&5
503d2be0 23730 ac_status=$?
c0d27fcc 23731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23732 (exit $ac_status); }; }; then
73b77ee5 23733 ac_cv_func_vfork_works=yes
fa0b693c 23734else
503d2be0
AS
23735 echo "$as_me: program exited with status $ac_status" >&5
23736echo "$as_me: failed program was:" >&5
19650fd6
AS
23737sed 's/^/| /' conftest.$ac_ext >&5
23738
c0d27fcc 23739( exit $ac_status )
503d2be0
AS
23740ac_cv_func_vfork_works=no
23741fi
ca81d7a0 23742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23743fi
ca81d7a0
JD
23744
23745
fa0b693c 23746fi
ca81d7a0
JD
23747{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23748echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23749
503d2be0
AS
23750fi;
23751if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23752 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23753 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23754echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23755fi
23756
503d2be0
AS
23757if test "x$ac_cv_func_vfork_works" = xyes; then
23758
c0d27fcc 23759cat >>confdefs.h <<\_ACEOF
503d2be0 23760#define HAVE_WORKING_VFORK 1
c0d27fcc 23761_ACEOF
503d2be0
AS
23762
23763else
23764
c0d27fcc 23765cat >>confdefs.h <<\_ACEOF
73b77ee5 23766#define vfork fork
c0d27fcc 23767_ACEOF
fa0b693c
GM
23768
23769fi
503d2be0
AS
23770if test "x$ac_cv_func_fork_works" = xyes; then
23771
c0d27fcc 23772cat >>confdefs.h <<\_ACEOF
503d2be0 23773#define HAVE_WORKING_FORK 1
c0d27fcc 23774_ACEOF
fa0b693c 23775
503d2be0 23776fi
647847ea 23777
c0d27fcc 23778
ca81d7a0
JD
23779{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23780echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23781if test "${emacs_cv_langinfo_codeset+set}" = set; then
23782 echo $ECHO_N "(cached) $ECHO_C" >&6
23783else
23784 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23785/* confdefs.h. */
23786_ACEOF
23787cat confdefs.h >>conftest.$ac_ext
23788cat >>conftest.$ac_ext <<_ACEOF
23789/* end confdefs.h. */
6a3a24fa
JD
23790#include <langinfo.h>
23791int
23792main ()
23793{
23794char* cs = nl_langinfo(CODESET);
23795 ;
23796 return 0;
23797}
23798_ACEOF
23799rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23800if { (ac_try="$ac_link"
23801case "(($ac_try" in
23802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23803 *) ac_try_echo=$ac_try;;
23804esac
23805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23806 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23807 ac_status=$?
edfaf76d
LK
23808 grep -v '^ *+' conftest.er1 >conftest.err
23809 rm -f conftest.er1
23810 cat conftest.err >&5
6a3a24fa 23811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23812 (exit $ac_status); } && {
23813 test -z "$ac_c_werror_flag" ||
23814 test ! -s conftest.err
23815 } && test -s conftest$ac_exeext &&
23816 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23817 emacs_cv_langinfo_codeset=yes
23818else
23819 echo "$as_me: failed program was:" >&5
19650fd6
AS
23820sed 's/^/| /' conftest.$ac_ext >&5
23821
ca81d7a0 23822 emacs_cv_langinfo_codeset=no
6a3a24fa 23823fi
ca81d7a0 23824
f053c89f 23825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23826 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23827
23828fi
ca81d7a0
JD
23829{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23830echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23831if test $emacs_cv_langinfo_codeset = yes; then
23832
23833cat >>confdefs.h <<\_ACEOF
23834#define HAVE_LANGINFO_CODESET 1
23835_ACEOF
23836
23837fi
23838
ca81d7a0
JD
23839{ echo "$as_me:$LINENO: checking for size_t" >&5
23840echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23841if test "${ac_cv_type_size_t+set}" = set; then
23842 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23843else
503d2be0 23844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
503d2be0 23850$ac_includes_default
ca81d7a0 23851typedef size_t ac__type_new_;
503d2be0
AS
23852int
23853main ()
23854{
ca81d7a0 23855if ((ac__type_new_ *) 0)
503d2be0 23856 return 0;
ca81d7a0 23857if (sizeof (ac__type_new_))
503d2be0
AS
23858 return 0;
23859 ;
23860 return 0;
23861}
23862_ACEOF
23863rm -f conftest.$ac_objext
ca81d7a0
JD
23864if { (ac_try="$ac_compile"
23865case "(($ac_try" in
23866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23867 *) ac_try_echo=$ac_try;;
23868esac
23869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23870 (eval "$ac_compile") 2>conftest.er1
503d2be0 23871 ac_status=$?
edfaf76d
LK
23872 grep -v '^ *+' conftest.er1 >conftest.err
23873 rm -f conftest.er1
23874 cat conftest.err >&5
c0d27fcc 23875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23876 (exit $ac_status); } && {
23877 test -z "$ac_c_werror_flag" ||
23878 test ! -s conftest.err
23879 } && test -s conftest.$ac_objext; then
8730a8da
DL
23880 ac_cv_type_size_t=yes
23881else
503d2be0 23882 echo "$as_me: failed program was:" >&5
19650fd6
AS
23883sed 's/^/| /' conftest.$ac_ext >&5
23884
ca81d7a0 23885 ac_cv_type_size_t=no
8730a8da 23886fi
ca81d7a0
JD
23887
23888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23889fi
ca81d7a0
JD
23890{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23891echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23892if test $ac_cv_type_size_t = yes; then
503d2be0 23893
c0d27fcc
MR
23894cat >>confdefs.h <<_ACEOF
23895#define HAVE_SIZE_T 1
23896_ACEOF
23897
8730a8da
DL
23898
23899fi
23900
c0d27fcc 23901
ca81d7a0
JD
23902{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23903echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23904if test "${ac_cv_type_mbstate_t+set}" = set; then
23905 echo $ECHO_N "(cached) $ECHO_C" >&6
23906else
23907 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23908/* confdefs.h. */
23909_ACEOF
23910cat confdefs.h >>conftest.$ac_ext
23911cat >>conftest.$ac_ext <<_ACEOF
23912/* end confdefs.h. */
973a76b1
DL
23913$ac_includes_default
23914# include <wchar.h>
23915int
23916main ()
23917{
23918mbstate_t x; return sizeof x;
23919 ;
23920 return 0;
23921}
23922_ACEOF
23923rm -f conftest.$ac_objext
ca81d7a0
JD
23924if { (ac_try="$ac_compile"
23925case "(($ac_try" in
23926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23927 *) ac_try_echo=$ac_try;;
23928esac
23929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23930 (eval "$ac_compile") 2>conftest.er1
973a76b1 23931 ac_status=$?
edfaf76d
LK
23932 grep -v '^ *+' conftest.er1 >conftest.err
23933 rm -f conftest.er1
23934 cat conftest.err >&5
973a76b1 23935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23936 (exit $ac_status); } && {
23937 test -z "$ac_c_werror_flag" ||
23938 test ! -s conftest.err
23939 } && test -s conftest.$ac_objext; then
973a76b1
DL
23940 ac_cv_type_mbstate_t=yes
23941else
23942 echo "$as_me: failed program was:" >&5
19650fd6
AS
23943sed 's/^/| /' conftest.$ac_ext >&5
23944
ca81d7a0 23945 ac_cv_type_mbstate_t=no
973a76b1 23946fi
ca81d7a0
JD
23947
23948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23949fi
ca81d7a0
JD
23950{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23951echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23952 if test $ac_cv_type_mbstate_t = yes; then
23953
23954cat >>confdefs.h <<\_ACEOF
23955#define HAVE_MBSTATE_T 1
23956_ACEOF
23957
23958 else
23959
23960cat >>confdefs.h <<\_ACEOF
23961#define mbstate_t int
23962_ACEOF
23963
23964 fi
23965
ca81d7a0
JD
23966{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23967echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23968if test "${emacs_cv_c_restrict+set}" = set; then
23969 echo $ECHO_N "(cached) $ECHO_C" >&6
23970else
23971 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23972/* confdefs.h. */
23973_ACEOF
23974cat confdefs.h >>conftest.$ac_ext
23975cat >>conftest.$ac_ext <<_ACEOF
23976/* end confdefs.h. */
22044edf
DL
23977void fred (int *restrict x);
23978int
23979main ()
23980{
b936fae4 23981
22044edf
DL
23982 ;
23983 return 0;
23984}
c0d27fcc 23985_ACEOF
22044edf 23986rm -f conftest.$ac_objext
ca81d7a0
JD
23987if { (ac_try="$ac_compile"
23988case "(($ac_try" in
23989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23990 *) ac_try_echo=$ac_try;;
23991esac
23992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23993 (eval "$ac_compile") 2>conftest.er1
22044edf 23994 ac_status=$?
edfaf76d
LK
23995 grep -v '^ *+' conftest.er1 >conftest.err
23996 rm -f conftest.er1
23997 cat conftest.err >&5
22044edf 23998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23999 (exit $ac_status); } && {
24000 test -z "$ac_c_werror_flag" ||
24001 test ! -s conftest.err
24002 } && test -s conftest.$ac_objext; then
22044edf
DL
24003 emacs_cv_c_restrict=yes
24004else
24005 echo "$as_me: failed program was:" >&5
19650fd6
AS
24006sed 's/^/| /' conftest.$ac_ext >&5
24007
ca81d7a0 24008 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24009/* confdefs.h. */
24010_ACEOF
24011cat confdefs.h >>conftest.$ac_ext
24012cat >>conftest.$ac_ext <<_ACEOF
24013/* end confdefs.h. */
22044edf
DL
24014void fred (int *__restrict x);
24015int
24016main ()
24017{
c0d27fcc 24018
22044edf
DL
24019 ;
24020 return 0;
24021}
c0d27fcc 24022_ACEOF
22044edf 24023rm -f conftest.$ac_objext
ca81d7a0
JD
24024if { (ac_try="$ac_compile"
24025case "(($ac_try" in
24026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24027 *) ac_try_echo=$ac_try;;
24028esac
24029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24030 (eval "$ac_compile") 2>conftest.er1
22044edf 24031 ac_status=$?
edfaf76d
LK
24032 grep -v '^ *+' conftest.er1 >conftest.err
24033 rm -f conftest.er1
24034 cat conftest.err >&5
22044edf 24035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24036 (exit $ac_status); } && {
24037 test -z "$ac_c_werror_flag" ||
24038 test ! -s conftest.err
24039 } && test -s conftest.$ac_objext; then
22044edf
DL
24040 emacs_cv_c_restrict=__restrict
24041else
24042 echo "$as_me: failed program was:" >&5
19650fd6
AS
24043sed 's/^/| /' conftest.$ac_ext >&5
24044
ca81d7a0 24045 emacs_cv_c_restrict=no
ba4481b5 24046fi
ca81d7a0
JD
24047
24048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24049fi
ca81d7a0
JD
24050
24051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24052fi
ca81d7a0
JD
24053{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24054echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24055case "$emacs_cv_c_restrict" in
24056 yes) emacs_restrict=restrict;;
24057 no) emacs_restrict="";;
24058 *) emacs_restrict="$emacs_cv_c_restrict";;
24059esac
24060if test "$emacs_restrict" != __restrict; then
b936fae4 24061
22044edf
DL
24062cat >>confdefs.h <<_ACEOF
24063#define __restrict $emacs_restrict
c0d27fcc 24064_ACEOF
ba4481b5
DL
24065
24066fi
ba4481b5 24067
ca81d7a0
JD
24068{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24069echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24070if test "${emacs_cv_c_restrict_arr+set}" = set; then
24071 echo $ECHO_N "(cached) $ECHO_C" >&6
24072else
24073 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24074/* confdefs.h. */
24075_ACEOF
24076cat confdefs.h >>conftest.$ac_ext
24077cat >>conftest.$ac_ext <<_ACEOF
24078/* end confdefs.h. */
22044edf
DL
24079void fred (int x[__restrict]);
24080int
24081main ()
24082{
b936fae4 24083
22044edf
DL
24084 ;
24085 return 0;
24086}
c0d27fcc 24087_ACEOF
22044edf 24088rm -f conftest.$ac_objext
ca81d7a0
JD
24089if { (ac_try="$ac_compile"
24090case "(($ac_try" in
24091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24092 *) ac_try_echo=$ac_try;;
24093esac
24094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24095 (eval "$ac_compile") 2>conftest.er1
22044edf 24096 ac_status=$?
edfaf76d
LK
24097 grep -v '^ *+' conftest.er1 >conftest.err
24098 rm -f conftest.er1
24099 cat conftest.err >&5
22044edf 24100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24101 (exit $ac_status); } && {
24102 test -z "$ac_c_werror_flag" ||
24103 test ! -s conftest.err
24104 } && test -s conftest.$ac_objext; then
22044edf
DL
24105 emacs_cv_c_restrict_arr=yes
24106else
24107 echo "$as_me: failed program was:" >&5
19650fd6
AS
24108sed 's/^/| /' conftest.$ac_ext >&5
24109
ca81d7a0 24110 emacs_cv_c_restrict_arr=no
ba4481b5 24111fi
ca81d7a0
JD
24112
24113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24114fi
ca81d7a0
JD
24115{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24116echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24117if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24118
c0d27fcc 24119cat >>confdefs.h <<\_ACEOF
22044edf 24120#define __restrict_arr __restrict
c0d27fcc 24121_ACEOF
ba4481b5 24122
ba4481b5
DL
24123fi
24124
c0d27fcc 24125
c0d27fcc 24126
22044edf
DL
24127# Set up the CFLAGS for real compilation, so we can substitute it.
24128CFLAGS="$REAL_CFLAGS"
24129CPPFLAGS="$REAL_CPPFLAGS"
24130
24131#### Find out which version of Emacs this is.
24132version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24133 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24134if test x"${version}" = x; then
24135 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24136echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24137 { (exit 1); exit 1; }; }
24138fi
24139
24140### Specify what sort of things we'll be editing into Makefile and config.h.
24141### Use configuration here uncanonicalized to avoid exceeding size limits.
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
6a3a24fa 24174
06b62770
AR
24175
24176
24177
48fad8e8
DN
24178
24179
5e159d07
CY
24180
24181
edfda783 24182
22044edf
DL
24183
24184
24185cat >>confdefs.h <<_ACEOF
24186#define EMACS_CONFIGURATION "${canonical}"
24187_ACEOF
24188
24189
24190cat >>confdefs.h <<_ACEOF
24191#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24192_ACEOF
24193
24194
24195cat >>confdefs.h <<_ACEOF
24196#define config_machfile "${machfile}"
24197_ACEOF
24198
24199
24200cat >>confdefs.h <<_ACEOF
24201#define config_opsysfile "${opsysfile}"
24202_ACEOF
24203
24204
24205cat >>confdefs.h <<_ACEOF
24206#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24207_ACEOF
24208
24209
24210cat >>confdefs.h <<_ACEOF
24211#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24212_ACEOF
24213
24214
24215cat >>confdefs.h <<_ACEOF
24216#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24217_ACEOF
24218
24219
24220cat >>confdefs.h <<_ACEOF
24221#define UNEXEC_SRC ${UNEXEC_SRC}
24222_ACEOF
24223
24224
24225if test "${HAVE_X_WINDOWS}" = "yes" ; then
24226
24227cat >>confdefs.h <<\_ACEOF
24228#define HAVE_X_WINDOWS 1
24229_ACEOF
24230
24231fi
24232if test "${USE_X_TOOLKIT}" != "none" ; then
24233
24234cat >>confdefs.h <<\_ACEOF
24235#define USE_X_TOOLKIT 1
24236_ACEOF
24237
39dd4d52 24238 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24239
24240cat >>confdefs.h <<\_ACEOF
24241#define USE_LUCID 1
24242_ACEOF
24243
39dd4d52 24244 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24245
24246cat >>confdefs.h <<\_ACEOF
24247#define USE_MOTIF 1
24248_ACEOF
24249
24250 fi
22044edf
DL
24251fi
24252if test "${HAVE_X11}" = "yes" ; then
24253
24254cat >>confdefs.h <<\_ACEOF
24255#define HAVE_X11 1
24256_ACEOF
24257
22044edf
DL
24258fi
24259if test "${HAVE_MENUS}" = "yes" ; then
24260
24261cat >>confdefs.h <<\_ACEOF
24262#define HAVE_MENUS 1
24263_ACEOF
24264
24265fi
24266if test "${GNU_MALLOC}" = "yes" ; then
24267
24268cat >>confdefs.h <<\_ACEOF
24269#define GNU_MALLOC 1
24270_ACEOF
24271
24272fi
24273if test "${REL_ALLOC}" = "yes" ; then
24274
24275cat >>confdefs.h <<\_ACEOF
24276#define REL_ALLOC 1
24277_ACEOF
24278
24279fi
24280
24281
24282
c0d27fcc
MR
24283
24284
5afbeb22 24285
ba4481b5 24286#### Report on what we decided to do.
488dd4c4
JD
24287#### Report GTK as a toolkit, even if it doesn't use Xt.
24288#### It makes printing result more understandable as using GTK sets
24289#### toolkit_scroll_bars to yes by default.
24290if test "${HAVE_GTK}" = "yes"; then
24291 USE_X_TOOLKIT=GTK
24292fi
24293
ba4481b5
DL
24294echo "
24295Configured for \`${canonical}'.
24296
24297 Where should the build process find the source code? ${srcdir}
24298 What operating system and machine description files should Emacs use?
24299 \`${opsysfile}' and \`${machfile}'
24300 What compiler should emacs be built with? ${CC} ${CFLAGS}
24301 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24302 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24303 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24304 What window system should Emacs use? ${window_system}
8e967cf7 24305 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24306
24307if test -n "${x_includes}"; then
24308echo " Where do we find X Windows header files? ${x_includes}"
24309else
24310echo " Where do we find X Windows header files? Standard dirs"
24311fi
24312if test -n "${x_libraries}"; then
24313echo " Where do we find X Windows libraries? ${x_libraries}"
24314else
24315echo " Where do we find X Windows libraries? Standard dirs"
24316fi
24317
24318echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24319echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24320echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24321echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24322echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24323echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24324echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24325echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24326echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24327
edfda783
AR
24328echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24329echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24330echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24331echo " Does Emacs use -lxft? ${HAVE_XFT}"
24332
8d87199b 24333echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
24334echo
24335
d0098f13
JD
24336if test $USE_XASSERTS = yes; then
24337 echo " Compiling with asserts turned on."
d0098f13 24338 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24339fi
05cf15c6 24340
ca34d75a
JD
24341echo
24342
a2d3b5bd
JD
24343if test "$USE_X_TOOLKIT" = GTK; then
24344 case "$canonical" in
24345 *cygwin*)
24346 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24347 will probably get a crash on startup. If this happens, please use another
24348 toolkit for Emacs. See etc/PROBLEMS for more information."
24349 ;;
24350 esac
24351fi
24352
06b62770
AR
24353if test "$HAVE_NS" = "yes"; then
24354 echo
24355 echo "You must run \"make install\" in order to test the built application.
24356The installed application will go to nextstep/Emacs.app and can be
24357run or moved from there."
24358 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24359 echo "The application will be fully self-contained."
24360 else
24361 echo "The lisp resources for the application will be installed under ${prefix}.
24362You may need to run \"make install\" with sudo. The application will fail
24363to run if these resources are not installed."
24364 fi
24365 echo
24366fi
24367
131e4133
MA
24368if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24369 echo "D-Bus integration has been tested for GNU/Linux only."
24370 echo
24371fi
24372
05cf15c6 24373
ba4481b5
DL
24374# Remove any trailing slashes in these variables.
24375test "${prefix}" != NONE &&
24376 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24377test "${exec_prefix}" != NONE &&
24378 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24379
8acdcf6f
GM
24380# Now get this: Some word that is part of the ${srcdir} directory name
24381# or the ${configuration} value might, just might, happen to be an
24382# identifier like `sun4' or `i386' or something, and be predefined by
24383# the C preprocessor to some helpful value like 1, or maybe the empty
24384# string. Needless to say consequent macro substitutions are less
24385# than conducive to the makefile finding the correct directory.
24386cpp_undefs="`echo $srcdir $configuration $canonical |
24387 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24388 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24389
d0e9bfd2
GM
24390## Check if the C preprocessor will convert `..' to `. .'. If so, set
24391## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24392## from Makefile.c can correctly provide the arg `-traditional' to the
24393## C preprocessor.
24394
503d2be0 24395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24396/* confdefs.h. */
24397_ACEOF
24398cat confdefs.h >>conftest.$ac_ext
24399cat >>conftest.$ac_ext <<_ACEOF
24400/* end confdefs.h. */
d0e9bfd2 24401yes..yes
503d2be0 24402_ACEOF
d0e9bfd2 24403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24404 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24405 CPP_NEED_TRADITIONAL=no
24406else
d0e9bfd2
GM
24407 CPP_NEED_TRADITIONAL=yes
24408fi
24409rm -f conftest*
24410
c0d27fcc 24411
f657c21b 24412ac_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
24413
24414ac_config_commands="$ac_config_commands default"
24415
503d2be0 24416cat >confcache <<\_ACEOF
ba4481b5
DL
24417# This file is a shell script that caches the results of configure
24418# tests run on this system so they can be shared between configure
503d2be0
AS
24419# scripts and configure runs, see configure's option --config-cache.
24420# It is not useful on other systems. If it contains results you don't
24421# want to keep, you may remove or edit it.
ba4481b5 24422#
503d2be0
AS
24423# config.status only pays attention to the cache file if you give it
24424# the --recheck option to rerun configure.
ba4481b5 24425#
6bae0ccf 24426# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24427# loading this file, other *unset* `ac_cv_foo' will be assigned the
24428# following values.
24429
24430_ACEOF
24431
ba4481b5
DL
24432# The following way of writing the cache mishandles newlines in values,
24433# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24434# So, we kill variables containing newlines.
ba4481b5
DL
24435# Ultrix sh set writes to stderr and can't be redirected directly,
24436# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24437(
24438 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24439 eval ac_val=\$$ac_var
24440 case $ac_val in #(
24441 *${as_nl}*)
24442 case $ac_var in #(
24443 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24444echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24445 esac
24446 case $ac_var in #(
24447 _ | IFS | as_nl) ;; #(
24448 *) $as_unset $ac_var ;;
24449 esac ;;
24450 esac
24451 done
24452
503d2be0 24453 (set) 2>&1 |
ca81d7a0
JD
24454 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24455 *${as_nl}ac_space=\ *)
503d2be0
AS
24456 # `set' does not quote correctly, so add quotes (double-quote
24457 # substitution turns \\\\ into \\, and sed turns \\ into \).
24458 sed -n \
edfaf76d
LK
24459 "s/'/'\\\\''/g;
24460 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24461 ;; #(
503d2be0
AS
24462 *)
24463 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24464 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24465 ;;
ca81d7a0
JD
24466 esac |
24467 sort
24468) |
503d2be0 24469 sed '
ca81d7a0 24470 /^ac_cv_env_/b end
503d2be0 24471 t clear
ca81d7a0 24472 :clear
503d2be0
AS
24473 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24474 t end
ca81d7a0
JD
24475 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24476 :end' >>confcache
24477if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24478 if test -w "$cache_file"; then
24479 test "x$cache_file" != "x/dev/null" &&
24480 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24481echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24482 cat confcache >$cache_file
ba4481b5 24483 else
ca81d7a0
JD
24484 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24485echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24486 fi
24487fi
24488rm -f confcache
24489
ba4481b5
DL
24490test "x$prefix" = xNONE && prefix=$ac_default_prefix
24491# Let make expand exec_prefix.
24492test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24493
ba4481b5
DL
24494DEFS=-DHAVE_CONFIG_H
24495
6bae0ccf
DL
24496ac_libobjs=
24497ac_ltlibobjs=
24498for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24499 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24500 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24501 ac_i=`echo "$ac_i" | sed "$ac_script"`
24502 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24503 # will be set to the directory where LIBOBJS objects are built.
24504 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24505 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24506done
24507LIBOBJS=$ac_libobjs
24508
24509LTLIBOBJS=$ac_ltlibobjs
24510
24511
c0d27fcc 24512
ba4481b5 24513: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24514ac_clean_files_save=$ac_clean_files
24515ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24516{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24517echo "$as_me: creating $CONFIG_STATUS" >&6;}
24518cat >$CONFIG_STATUS <<_ACEOF
24519#! $SHELL
c0d27fcc 24520# Generated by $as_me.
ba4481b5 24521# Run this file to recreate the current configuration.
ba4481b5 24522# Compiler output produced by configure, useful for debugging
503d2be0 24523# configure, is in config.log if it exists.
ba4481b5 24524
503d2be0 24525debug=false
19650fd6
AS
24526ac_cs_recheck=false
24527ac_cs_silent=false
503d2be0 24528SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24529_ACEOF
24530
24531cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24532## --------------------- ##
24533## M4sh Initialization. ##
24534## --------------------- ##
24535
f053c89f
CY
24536# Be more Bourne compatible
24537DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24538if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24539 emulate sh
24540 NULLCMD=:
6bae0ccf
DL
24541 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24542 # is contrary to our usage. Disable this feature.
24543 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24544 setopt NO_GLOB_SUBST
24545else
f053c89f
CY
24546 case `(set -o) 2>/dev/null` in
24547 *posix*) set -o posix ;;
24548esac
24549
503d2be0 24550fi
f053c89f
CY
24551
24552
503d2be0 24553
ca81d7a0
JD
24554
24555# PATH needs CR
24556# Avoid depending upon Character Ranges.
24557as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24558as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24559as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24560as_cr_digits='0123456789'
24561as_cr_alnum=$as_cr_Letters$as_cr_digits
24562
24563# The user is always right.
24564if test "${PATH_SEPARATOR+set}" != set; then
24565 echo "#! /bin/sh" >conf$$.sh
24566 echo "exit 0" >>conf$$.sh
24567 chmod +x conf$$.sh
24568 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24569 PATH_SEPARATOR=';'
24570 else
24571 PATH_SEPARATOR=:
24572 fi
24573 rm -f conf$$.sh
503d2be0
AS
24574fi
24575
c0d27fcc 24576# Support unset when possible.
edfaf76d 24577if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24578 as_unset=unset
24579else
24580 as_unset=false
24581fi
24582
6bae0ccf 24583
ca81d7a0
JD
24584# IFS
24585# We need space, tab and new line, in precisely that order. Quoting is
24586# there to prevent editors from complaining about space-tab.
24587# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24588# splitting by setting IFS to empty value.)
24589as_nl='
24590'
24591IFS=" "" $as_nl"
24592
24593# Find who we are. Look in the path if we contain no directory separator.
24594case $0 in
24595 *[\\/]* ) as_myself=$0 ;;
24596 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24597for as_dir in $PATH
24598do
24599 IFS=$as_save_IFS
24600 test -z "$as_dir" && as_dir=.
24601 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24602done
24603IFS=$as_save_IFS
24604
24605 ;;
24606esac
24607# We did not find ourselves, most probably we were run as `sh COMMAND'
24608# in which case we are not to be found in the path.
24609if test "x$as_myself" = x; then
24610 as_myself=$0
24611fi
24612if test ! -f "$as_myself"; then
24613 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24614 { (exit 1); exit 1; }
24615fi
24616
6bae0ccf 24617# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24618for as_var in ENV MAIL MAILPATH
24619do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24620done
6bae0ccf
DL
24621PS1='$ '
24622PS2='> '
24623PS4='+ '
24624
24625# NLS nuisances.
19650fd6
AS
24626for as_var in \
24627 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24628 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24629 LC_TELEPHONE LC_TIME
6bae0ccf 24630do
edfaf76d 24631 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24632 eval $as_var=C; export $as_var
24633 else
ca81d7a0 24634 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24635 fi
24636done
24637
24638# Required to use basename.
ca81d7a0
JD
24639if expr a : '\(a\)' >/dev/null 2>&1 &&
24640 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24641 as_expr=expr
24642else
24643 as_expr=false
24644fi
24645
ca81d7a0 24646if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24647 as_basename=basename
24648else
24649 as_basename=false
24650fi
c0d27fcc
MR
24651
24652
503d2be0 24653# Name of the executable.
ca81d7a0 24654as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24655$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24656 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24657 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24658echo X/"$0" |
ca81d7a0
JD
24659 sed '/^.*\/\([^/][^/]*\)\/*$/{
24660 s//\1/
24661 q
24662 }
24663 /^X\/\(\/\/\)$/{
24664 s//\1/
24665 q
24666 }
24667 /^X\/\(\/\).*/{
24668 s//\1/
24669 q
24670 }
24671 s/.*/./; q'`
c0d27fcc 24672
ca81d7a0
JD
24673# CDPATH.
24674$as_unset CDPATH
c0d27fcc
MR
24675
24676
c0d27fcc 24677
c0d27fcc 24678 as_lineno_1=$LINENO
c0d27fcc 24679 as_lineno_2=$LINENO
c0d27fcc 24680 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24681 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24682
24683 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24684 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24685 # line-number line after each line using $LINENO; the second 'sed'
24686 # does the real work. The second script uses 'N' to pair each
24687 # line-number line with the line containing $LINENO, and appends
24688 # trailing '-' during substitution so that $LINENO is not a special
24689 # case at line end.
c0d27fcc 24690 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24691 # scripts with optimization help from Paolo Bonzini. Blame Lee
24692 # E. McMahon (1931-1989) for sed's syntax. :-)
24693 sed -n '
24694 p
24695 /[$]LINENO/=
24696 ' <$as_myself |
c0d27fcc 24697 sed '
ca81d7a0
JD
24698 s/[$]LINENO.*/&-/
24699 t lineno
24700 b
24701 :lineno
c0d27fcc 24702 N
ca81d7a0
JD
24703 :loop
24704 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24705 t loop
ca81d7a0 24706 s/-\n.*//
c0d27fcc 24707 ' >$as_me.lineno &&
ca81d7a0
JD
24708 chmod +x "$as_me.lineno" ||
24709 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24710 { (exit 1); exit 1; }; }
24711
24712 # Don't try to exec as it changes $[0], causing all sort of problems
24713 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24714 # original and so on. Autoconf is especially sensitive to this).
24715 . "./$as_me.lineno"
c0d27fcc
MR
24716 # Exit status is that of the last command.
24717 exit
24718}
24719
24720
ca81d7a0
JD
24721if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24722 as_dirname=dirname
24723else
24724 as_dirname=false
24725fi
24726
24727ECHO_C= ECHO_N= ECHO_T=
24728case `echo -n x` in
24729-n*)
24730 case `echo 'x\c'` in
24731 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24732 *) ECHO_C='\c';;
24733 esac;;
24734*)
24735 ECHO_N='-n';;
c0d27fcc 24736esac
503d2be0 24737
ca81d7a0
JD
24738if expr a : '\(a\)' >/dev/null 2>&1 &&
24739 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24740 as_expr=expr
24741else
24742 as_expr=false
24743fi
24744
24745rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24746if test -d conf$$.dir; then
24747 rm -f conf$$.dir/conf$$.file
24748else
24749 rm -f conf$$.dir
24750 mkdir conf$$.dir
24751fi
503d2be0
AS
24752echo >conf$$.file
24753if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24754 as_ln_s='ln -s'
24755 # ... but there are two gotchas:
24756 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24757 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24758 # In both cases, we have to default to `cp -p'.
24759 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24760 as_ln_s='cp -p'
503d2be0
AS
24761elif ln conf$$.file conf$$ 2>/dev/null; then
24762 as_ln_s=ln
24763else
24764 as_ln_s='cp -p'
24765fi
ca81d7a0
JD
24766rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24767rmdir conf$$.dir 2>/dev/null
503d2be0 24768
6bae0ccf
DL
24769if mkdir -p . 2>/dev/null; then
24770 as_mkdir_p=:
24771else
edfaf76d 24772 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24773 as_mkdir_p=false
24774fi
24775
f053c89f
CY
24776if test -x / >/dev/null 2>&1; then
24777 as_test_x='test -x'
ca81d7a0 24778else
f053c89f
CY
24779 if ls -dL / >/dev/null 2>&1; then
24780 as_ls_L_option=L
24781 else
24782 as_ls_L_option=
24783 fi
24784 as_test_x='
24785 eval sh -c '\''
24786 if test -d "$1"; then
24787 test -d "$1/.";
24788 else
24789 case $1 in
24790 -*)set "./$1";;
24791 esac;
24792 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24793 ???[sx]*):;;*)false;;esac;fi
24794 '\'' sh
24795 '
ca81d7a0 24796fi
f053c89f 24797as_executable_p=$as_test_x
503d2be0 24798
c0d27fcc 24799# Sed expression to map a string onto a valid CPP name.
edfaf76d 24800as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24801
24802# Sed expression to map a string onto a valid variable name.
edfaf76d 24803as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24804
503d2be0 24805
503d2be0
AS
24806exec 6>&1
24807
ca81d7a0 24808# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24809# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24810# values after options handling.
24811ac_log="
5d374ce1 24812This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24813generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24814
24815 CONFIG_FILES = $CONFIG_FILES
24816 CONFIG_HEADERS = $CONFIG_HEADERS
24817 CONFIG_LINKS = $CONFIG_LINKS
24818 CONFIG_COMMANDS = $CONFIG_COMMANDS
24819 $ $0 $@
24820
ca81d7a0
JD
24821on `(hostname || uname -n) 2>/dev/null | sed 1q`
24822"
24823
503d2be0
AS
24824_ACEOF
24825
ca81d7a0 24826cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24827# Files that config.status was made for.
ca81d7a0
JD
24828config_files="$ac_config_files"
24829config_headers="$ac_config_headers"
24830config_commands="$ac_config_commands"
503d2be0 24831
ca81d7a0 24832_ACEOF
503d2be0 24833
c0d27fcc 24834cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24835ac_cs_usage="\
24836\`$as_me' instantiates files from templates according to the
24837current configuration.
24838
24839Usage: $0 [OPTIONS] [FILE]...
24840
24841 -h, --help print this help, then exit
f053c89f 24842 -V, --version print version number and configuration settings, then exit
19650fd6 24843 -q, --quiet do not print progress messages
503d2be0
AS
24844 -d, --debug don't remove temporary files
24845 --recheck update $as_me by reconfiguring in the same conditions
24846 --file=FILE[:TEMPLATE]
edfaf76d 24847 instantiate the configuration file FILE
503d2be0 24848 --header=FILE[:TEMPLATE]
edfaf76d 24849 instantiate the configuration header FILE
503d2be0
AS
24850
24851Configuration files:
24852$config_files
24853
24854Configuration headers:
24855$config_headers
24856
24857Configuration commands:
24858$config_commands
24859
24860Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24861
ca81d7a0 24862_ACEOF
c0d27fcc 24863cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24864ac_cs_version="\\
5d374ce1 24865emacs config.status 23.0.60
f053c89f 24866configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24867 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24868
ca81d7a0 24869Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24870This config.status script is free software; the Free Software Foundation
24871gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24872
24873ac_pwd='$ac_pwd'
24874srcdir='$srcdir'
24875INSTALL='$INSTALL'
c0d27fcc 24876_ACEOF
503d2be0 24877
c0d27fcc 24878cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24879# If no file are specified by the user, then we need to provide default
24880# value. By we need to know if files were specified by the user.
24881ac_need_defaults=:
24882while test $# != 0
ba4481b5 24883do
503d2be0
AS
24884 case $1 in
24885 --*=*)
ca81d7a0
JD
24886 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24887 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24888 ac_shift=:
24889 ;;
ca81d7a0 24890 *)
6bae0ccf
DL
24891 ac_option=$1
24892 ac_optarg=$2
24893 ac_shift=shift
503d2be0 24894 ;;
503d2be0
AS
24895 esac
24896
6bae0ccf 24897 case $ac_option in
503d2be0 24898 # Handling of the options.
19650fd6
AS
24899 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24900 ac_cs_recheck=: ;;
ca81d7a0
JD
24901 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24902 echo "$ac_cs_version"; exit ;;
24903 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24904 debug=: ;;
24905 --file | --fil | --fi | --f )
6bae0ccf
DL
24906 $ac_shift
24907 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24908 ac_need_defaults=false;;
24909 --header | --heade | --head | --hea )
6bae0ccf
DL
24910 $ac_shift
24911 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24912 ac_need_defaults=false;;
ca81d7a0
JD
24913 --he | --h)
24914 # Conflict between --help and --header
24915 { echo "$as_me: error: ambiguous option: $1
24916Try \`$0 --help' for more information." >&2
24917 { (exit 1); exit 1; }; };;
24918 --help | --hel | -h )
24919 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24920 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24921 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24922 ac_cs_silent=: ;;
503d2be0
AS
24923
24924 # This is an error.
ca81d7a0
JD
24925 -*) { echo "$as_me: error: unrecognized option: $1
24926Try \`$0 --help' for more information." >&2
503d2be0
AS
24927 { (exit 1); exit 1; }; } ;;
24928
ca81d7a0
JD
24929 *) ac_config_targets="$ac_config_targets $1"
24930 ac_need_defaults=false ;;
503d2be0 24931
ba4481b5 24932 esac
503d2be0 24933 shift
ba4481b5
DL
24934done
24935
19650fd6
AS
24936ac_configure_extra_args=
24937
24938if $ac_cs_silent; then
24939 exec 6>/dev/null
24940 ac_configure_extra_args="$ac_configure_extra_args --silent"
24941fi
24942
24943_ACEOF
24944cat >>$CONFIG_STATUS <<_ACEOF
24945if \$ac_cs_recheck; then
ca81d7a0
JD
24946 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24947 CONFIG_SHELL=$SHELL
24948 export CONFIG_SHELL
24949 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24950fi
24951
503d2be0 24952_ACEOF
ca81d7a0
JD
24953cat >>$CONFIG_STATUS <<\_ACEOF
24954exec 5>>config.log
24955{
24956 echo
24957 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24958## Running $as_me. ##
24959_ASBOX
24960 echo "$ac_log"
24961} >&5
ba4481b5 24962
ca81d7a0 24963_ACEOF
c0d27fcc 24964cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24965#
ca81d7a0 24966# INIT-COMMANDS
503d2be0 24967#
8acdcf6f 24968GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 24969
c0d27fcc
MR
24970_ACEOF
24971
c0d27fcc 24972cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24973
24974# Handling of arguments.
503d2be0
AS
24975for ac_config_target in $ac_config_targets
24976do
ca81d7a0
JD
24977 case $ac_config_target in
24978 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24979 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24980 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24981 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24982 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24983 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24984 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24985 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24986 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24987 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24988 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24989 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24990 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24991
c0d27fcc 24992 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24993echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24994 { (exit 1); exit 1; }; };;
24995 esac
ba4481b5 24996done
503d2be0 24997
ca81d7a0 24998
503d2be0
AS
24999# If the user did not use the arguments to specify the items to instantiate,
25000# then the envvar interface is used. Set only those that are not.
25001# We use the long form for the default assignment because of an extremely
25002# bizarre bug on SunOS 4.1.3.
25003if $ac_need_defaults; then
25004 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25005 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25006 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25007fi
503d2be0 25008
19650fd6 25009# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25010# simply because there is no reason against having it here, and in addition,
19650fd6 25011# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25012# Hook for its removal unless debugging.
25013# Note that there is a small window in which the directory will not be cleaned:
25014# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25015$debug ||
25016{
ca81d7a0
JD
25017 tmp=
25018 trap 'exit_status=$?
25019 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25020' 0
503d2be0
AS
25021 trap '{ (exit 1); exit 1; }' 1 2 13 15
25022}
503d2be0 25023# Create a (secure) tmp directory for tmp files.
19650fd6 25024
503d2be0 25025{
ca81d7a0 25026 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25027 test -n "$tmp" && test -d "$tmp"
25028} ||
25029{
ca81d7a0
JD
25030 tmp=./conf$$-$RANDOM
25031 (umask 077 && mkdir "$tmp")
503d2be0
AS
25032} ||
25033{
19650fd6 25034 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25035 { (exit 1); exit 1; }
25036}
25037
503d2be0 25038#
ca81d7a0 25039# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
25040#
25041
25042# No need to generate the scripts if there are no CONFIG_FILES.
25043# This happens for instance when ./config.status config.h
ca81d7a0
JD
25044if test -n "$CONFIG_FILES"; then
25045
25046_ACEOF
25047
25048
25049
25050ac_delim='%!_!# '
25051for ac_last_try in false false false false false :; do
25052 cat >conf$$subs.sed <<_ACEOF
25053SHELL!$SHELL$ac_delim
25054PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25055PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25056PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25057PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25058PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25059PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25060exec_prefix!$exec_prefix$ac_delim
25061prefix!$prefix$ac_delim
25062program_transform_name!$program_transform_name$ac_delim
25063bindir!$bindir$ac_delim
25064sbindir!$sbindir$ac_delim
25065libexecdir!$libexecdir$ac_delim
25066datarootdir!$datarootdir$ac_delim
25067datadir!$datadir$ac_delim
25068sysconfdir!$sysconfdir$ac_delim
25069sharedstatedir!$sharedstatedir$ac_delim
25070localstatedir!$localstatedir$ac_delim
25071includedir!$includedir$ac_delim
25072oldincludedir!$oldincludedir$ac_delim
25073docdir!$docdir$ac_delim
25074infodir!$infodir$ac_delim
25075htmldir!$htmldir$ac_delim
25076dvidir!$dvidir$ac_delim
25077pdfdir!$pdfdir$ac_delim
25078psdir!$psdir$ac_delim
25079libdir!$libdir$ac_delim
25080localedir!$localedir$ac_delim
25081mandir!$mandir$ac_delim
25082DEFS!$DEFS$ac_delim
25083ECHO_C!$ECHO_C$ac_delim
25084ECHO_N!$ECHO_N$ac_delim
25085ECHO_T!$ECHO_T$ac_delim
25086LIBS!$LIBS$ac_delim
25087build_alias!$build_alias$ac_delim
25088host_alias!$host_alias$ac_delim
25089target_alias!$target_alias$ac_delim
25090MAINT!$MAINT$ac_delim
25091build!$build$ac_delim
25092build_cpu!$build_cpu$ac_delim
25093build_vendor!$build_vendor$ac_delim
25094build_os!$build_os$ac_delim
25095host!$host$ac_delim
25096host_cpu!$host_cpu$ac_delim
25097host_vendor!$host_vendor$ac_delim
25098host_os!$host_os$ac_delim
25099CC!$CC$ac_delim
25100CFLAGS!$CFLAGS$ac_delim
25101LDFLAGS!$LDFLAGS$ac_delim
25102CPPFLAGS!$CPPFLAGS$ac_delim
25103ac_ct_CC!$ac_ct_CC$ac_delim
25104EXEEXT!$EXEEXT$ac_delim
25105OBJEXT!$OBJEXT$ac_delim
25106CPP!$CPP$ac_delim
25107GREP!$GREP$ac_delim
25108EGREP!$EGREP$ac_delim
25109LN_S!$LN_S$ac_delim
25110INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25111INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25112INSTALL_DATA!$INSTALL_DATA$ac_delim
25113RANLIB!$RANLIB$ac_delim
25114INSTALL_INFO!$INSTALL_INFO$ac_delim
25115GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25116MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25117LIBSOUND!$LIBSOUND$ac_delim
25118PKG_CONFIG!$PKG_CONFIG$ac_delim
25119ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25120ALSA_LIBS!$ALSA_LIBS$ac_delim
25121CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25122SET_MAKE!$SET_MAKE$ac_delim
25123XMKMF!$XMKMF$ac_delim
cfe440b8 25124HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25125RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25126RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25127GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25128GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25129DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25130DBUS_LIBS!$DBUS_LIBS$ac_delim
44e5501c
GM
25131FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25132FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25133XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25134XFT_LIBS!$XFT_LIBS$ac_delim
25135FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25136FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
c24fa7dc
MB
25137LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25138LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25139M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25140M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25141ALLOCA!$ALLOCA$ac_delim
25142liblockfile!$liblockfile$ac_delim
25143LIBOBJS!$LIBOBJS$ac_delim
25144NEED_SETGID!$NEED_SETGID$ac_delim
25145KMEM_GROUP!$KMEM_GROUP$ac_delim
25146GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25147GETOPT_H!$GETOPT_H$ac_delim
25148GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25149version!$version$ac_delim
ca81d7a0
JD
25150_ACEOF
25151
25152 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25153 break
25154 elif $ac_last_try; then
25155 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25156echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25157 { (exit 1); exit 1; }; }
25158 else
25159 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25160 fi
ca81d7a0
JD
25161done
25162
25163ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25164if test -n "$ac_eof"; then
25165 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25166 ac_eof=`expr $ac_eof + 1`
25167fi
503d2be0 25168
c0d27fcc 25169cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25170cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25171/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25172_ACEOF
25173sed '
25174s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25175s/^/s,@/; s/!/@,|#_!!_#|/
25176:n
25177t n
25178s/'"$ac_delim"'$/,g/; t
25179s/$/\\/; p
25180N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25181' >>$CONFIG_STATUS <conf$$subs.sed
25182rm -f conf$$subs.sed
25183cat >>$CONFIG_STATUS <<_ACEOF
25184CEOF$ac_eof
25185_ACEOF
503d2be0 25186
ca81d7a0
JD
25187
25188ac_delim='%!_!# '
25189for ac_last_try in false false false false false :; do
25190 cat >conf$$subs.sed <<_ACEOF
0bd50841 25191configuration!$configuration$ac_delim
7f0942ba
KH
25192canonical!$canonical$ac_delim
25193srcdir!$srcdir$ac_delim
1bb9a689
MB
25194lispdir!$lispdir$ac_delim
25195locallisppath!$locallisppath$ac_delim
25196lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25197x_default_search_path!$x_default_search_path$ac_delim
25198etcdir!$etcdir$ac_delim
25199archlibdir!$archlibdir$ac_delim
25200bitmapdir!$bitmapdir$ac_delim
25201gamedir!$gamedir$ac_delim
25202gameuser!$gameuser$ac_delim
25203c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25204c_switch_machine!$c_switch_machine$ac_delim
25205LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25206LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25207C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25208X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25209machfile!$machfile$ac_delim
25210opsysfile!$opsysfile$ac_delim
edfda783 25211ns_appdir!$ns_appdir$ac_delim
06b62770
AR
25212ns_appbindir!$ns_appbindir$ac_delim
25213ns_appresdir!$ns_appresdir$ac_delim
25214ns_appsrc!$ns_appsrc$ac_delim
facfbbbd 25215GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
5e159d07
CY
25216GNUSTEP_SYSTEM_HEADERS!$GNUSTEP_SYSTEM_HEADERS$ac_delim
25217GNUSTEP_SYSTEM_LIBRARIES!$GNUSTEP_SYSTEM_LIBRARIES$ac_delim
48fad8e8
DN
25218GNU_OBJC_CFLAGS!$GNU_OBJC_CFLAGS$ac_delim
25219LIB_SRC_EXTRA_INSTALLABLES!$LIB_SRC_EXTRA_INSTALLABLES$ac_delim
ca81d7a0
JD
25220LTLIBOBJS!$LTLIBOBJS$ac_delim
25221_ACEOF
503d2be0 25222
5e159d07 25223 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
c24fa7dc
MB
25224 break
25225 elif $ac_last_try; then
25226 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25227echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25228 { (exit 1); exit 1; }; }
25229 else
25230 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25231 fi
ca81d7a0
JD
25232done
25233
25234ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25235if test -n "$ac_eof"; then
25236 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25237 ac_eof=`expr $ac_eof + 1`
25238fi
ba4481b5 25239
ca81d7a0
JD
25240cat >>$CONFIG_STATUS <<_ACEOF
25241cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25242/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25243_ACEOF
25244sed '
25245s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25246s/^/s,@/; s/!/@,|#_!!_#|/
25247:n
25248t n
25249s/'"$ac_delim"'$/,g/; t
25250s/$/\\/; p
25251N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25252' >>$CONFIG_STATUS <conf$$subs.sed
25253rm -f conf$$subs.sed
25254cat >>$CONFIG_STATUS <<_ACEOF
25255:end
25256s/|#_!!_#|//g
25257CEOF$ac_eof
c0d27fcc 25258_ACEOF
ca81d7a0
JD
25259
25260
25261# VPATH may cause trouble with some makes, so we remove $(srcdir),
25262# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25263# trailing colons and then remove the whole line if VPATH becomes empty
25264# (actually we leave an empty line to preserve line numbers).
25265if test "x$srcdir" = x.; then
25266 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25267s/:*\$(srcdir):*/:/
25268s/:*\${srcdir}:*/:/
25269s/:*@srcdir@:*/:/
25270s/^\([^=]*=[ ]*\):*/\1/
25271s/:*$//
25272s/^[^=]*=[ ]*$//
25273}'
25274fi
25275
c0d27fcc 25276cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25277fi # test -n "$CONFIG_FILES"
25278
25279
25280for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25281do
25282 case $ac_tag in
25283 :[FHLC]) ac_mode=$ac_tag; continue;;
25284 esac
25285 case $ac_mode$ac_tag in
25286 :[FHL]*:*);;
25287 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25288echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25289 { (exit 1); exit 1; }; };;
25290 :[FH]-) ac_tag=-:-;;
25291 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25292 esac
25293 ac_save_IFS=$IFS
25294 IFS=:
25295 set x $ac_tag
25296 IFS=$ac_save_IFS
25297 shift
25298 ac_file=$1
25299 shift
25300
25301 case $ac_mode in
25302 :L) ac_source=$1;;
25303 :[FH])
25304 ac_file_inputs=
25305 for ac_f
25306 do
25307 case $ac_f in
25308 -) ac_f="$tmp/stdin";;
25309 *) # Look for the file first in the build tree, then in the source tree
25310 # (if the path is not absolute). The absolute path cannot be DOS-style,
25311 # because $ac_f cannot contain `:'.
25312 test -f "$ac_f" ||
25313 case $ac_f in
25314 [\\/$]*) false;;
25315 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25316 esac ||
25317 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25318echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25319 { (exit 1); exit 1; }; };;
25320 esac
25321 ac_file_inputs="$ac_file_inputs $ac_f"
25322 done
25323
25324 # Let's still pretend it is `configure' which instantiates (i.e., don't
25325 # use $as_me), people would be surprised to read:
25326 # /* config.h. Generated by config.status. */
25327 configure_input="Generated from "`IFS=:
25328 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25329 if test x"$ac_file" != x-; then
25330 configure_input="$ac_file. $configure_input"
25331 { echo "$as_me:$LINENO: creating $ac_file" >&5
25332echo "$as_me: creating $ac_file" >&6;}
25333 fi
25334
25335 case $ac_tag in
25336 *:-:* | *:-) cat >"$tmp/stdin";;
25337 esac
25338 ;;
ba4481b5
DL
25339 esac
25340
ca81d7a0 25341 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25342$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25343 X"$ac_file" : 'X\(//\)[^/]' \| \
25344 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25345 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25346echo X"$ac_file" |
ca81d7a0
JD
25347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25348 s//\1/
25349 q
25350 }
25351 /^X\(\/\/\)[^/].*/{
25352 s//\1/
25353 q
25354 }
25355 /^X\(\/\/\)$/{
25356 s//\1/
25357 q
25358 }
25359 /^X\(\/\).*/{
25360 s//\1/
25361 q
25362 }
25363 s/.*/./; q'`
25364 { as_dir="$ac_dir"
25365 case $as_dir in #(
25366 -*) as_dir=./$as_dir;;
25367 esac
25368 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25369 as_dirs=
ca81d7a0
JD
25370 while :; do
25371 case $as_dir in #(
25372 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25373 *) as_qdir=$as_dir;;
25374 esac
25375 as_dirs="'$as_qdir' $as_dirs"
25376 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25377$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25378 X"$as_dir" : 'X\(//\)[^/]' \| \
25379 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25380 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25381echo X"$as_dir" |
ca81d7a0
JD
25382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25383 s//\1/
25384 q
25385 }
25386 /^X\(\/\/\)[^/].*/{
25387 s//\1/
25388 q
25389 }
25390 /^X\(\/\/\)$/{
25391 s//\1/
25392 q
25393 }
25394 /^X\(\/\).*/{
25395 s//\1/
25396 q
25397 }
25398 s/.*/./; q'`
25399 test -d "$as_dir" && break
6bae0ccf 25400 done
ca81d7a0
JD
25401 test -z "$as_dirs" || eval "mkdir $as_dirs"
25402 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25403echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25404 { (exit 1); exit 1; }; }; }
c0d27fcc 25405 ac_builddir=.
98418dba 25406
ca81d7a0
JD
25407case "$ac_dir" in
25408.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25409*)
c0d27fcc 25410 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25411 # A ".." for each directory in $ac_dir_suffix.
25412 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25413 case $ac_top_builddir_sub in
25414 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25415 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25416 esac ;;
25417esac
25418ac_abs_top_builddir=$ac_pwd
25419ac_abs_builddir=$ac_pwd$ac_dir_suffix
25420# for backward compatibility:
25421ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25422
25423case $srcdir in
ca81d7a0 25424 .) # We are building in place.
c0d27fcc 25425 ac_srcdir=.
ca81d7a0
JD
25426 ac_top_srcdir=$ac_top_builddir_sub
25427 ac_abs_top_srcdir=$ac_pwd ;;
25428 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25429 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25430 ac_top_srcdir=$srcdir
25431 ac_abs_top_srcdir=$srcdir ;;
25432 *) # Relative name.
25433 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25434 ac_top_srcdir=$ac_top_build_prefix$srcdir
25435 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25436esac
ca81d7a0 25437ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25438
c0d27fcc 25439
ca81d7a0
JD
25440 case $ac_mode in
25441 :F)
25442 #
25443 # CONFIG_FILE
25444 #
ba4481b5 25445
503d2be0
AS
25446 case $INSTALL in
25447 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25448 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25449 esac
ca81d7a0 25450_ACEOF
ba4481b5 25451
ca81d7a0
JD
25452cat >>$CONFIG_STATUS <<\_ACEOF
25453# If the template does not know about datarootdir, expand it.
25454# FIXME: This hack should be removed a few years after 2.60.
25455ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25456
ca81d7a0
JD
25457case `sed -n '/datarootdir/ {
25458 p
25459 q
25460}
25461/@datadir@/p
25462/@docdir@/p
25463/@infodir@/p
25464/@localedir@/p
25465/@mandir@/p
25466' $ac_file_inputs` in
25467*datarootdir*) ac_datarootdir_seen=yes;;
25468*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25469 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25470echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25471_ACEOF
ca81d7a0
JD
25472cat >>$CONFIG_STATUS <<_ACEOF
25473 ac_datarootdir_hack='
25474 s&@datadir@&$datadir&g
25475 s&@docdir@&$docdir&g
25476 s&@infodir@&$infodir&g
25477 s&@localedir@&$localedir&g
25478 s&@mandir@&$mandir&g
25479 s&\\\${datarootdir}&$datarootdir&g' ;;
25480esac
c0d27fcc 25481_ACEOF
ca81d7a0
JD
25482
25483# Neutralize VPATH when `$srcdir' = `.'.
25484# Shell code in configure.ac might set extrasub.
25485# FIXME: do we really want to maintain this feature?
c0d27fcc 25486cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25487 sed "$ac_vpsub
25488$extrasub
c0d27fcc
MR
25489_ACEOF
25490cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25491:t
25492/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25493s&@configure_input@&$configure_input&;t t
25494s&@top_builddir@&$ac_top_builddir_sub&;t t
25495s&@srcdir@&$ac_srcdir&;t t
25496s&@abs_srcdir@&$ac_abs_srcdir&;t t
25497s&@top_srcdir@&$ac_top_srcdir&;t t
25498s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25499s&@builddir@&$ac_builddir&;t t
25500s&@abs_builddir@&$ac_abs_builddir&;t t
25501s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25502s&@INSTALL@&$ac_INSTALL&;t t
25503$ac_datarootdir_hack
25504" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25505
25506test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25507 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25508 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25509 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25510which seems to be undefined. Please make sure it is defined." >&5
25511echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25512which seems to be undefined. Please make sure it is defined." >&2;}
25513
25514 rm -f "$tmp/stdin"
503d2be0 25515 case $ac_file in
ca81d7a0
JD
25516 -) cat "$tmp/out"; rm -f "$tmp/out";;
25517 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25518 esac
ca81d7a0
JD
25519 ;;
25520 :H)
25521 #
25522 # CONFIG_HEADER
25523 #
25524_ACEOF
25525
25526# Transform confdefs.h into a sed script `conftest.defines', that
25527# substitutes the proper values into config.h.in to produce config.h.
25528rm -f conftest.defines conftest.tail
25529# First, append a space to every undef/define line, to ease matching.
25530echo 's/$/ /' >conftest.defines
25531# Then, protect against being on the right side of a sed subst, or in
25532# an unquoted here document, in config.status. If some macros were
25533# called several times there might be several #defines for the same
25534# symbol, which is useless. But do not sort them, since the last
25535# AC_DEFINE must be honored.
25536ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25537# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25538# NAME is the cpp macro being defined, VALUE is the value it is being given.
25539# PARAMS is the parameter list in the macro definition--in most cases, it's
25540# just an empty string.
25541ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25542ac_dB='\\)[ (].*,\\1define\\2'
25543ac_dC=' '
25544ac_dD=' ,'
25545
25546uniq confdefs.h |
25547 sed -n '
25548 t rset
25549 :rset
25550 s/^[ ]*#[ ]*define[ ][ ]*//
25551 t ok
25552 d
25553 :ok
25554 s/[\\&,]/\\&/g
25555 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25556 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25557 ' >>conftest.defines
25558
25559# Remove the space that was appended to ease matching.
25560# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25561# example, in the case of _POSIX_SOURCE, which is predefined and required
25562# on some systems where configure will not decide to define it.
ca81d7a0
JD
25563# (The regexp can be short, since the line contains either #define or #undef.)
25564echo 's/ $//
25565s,^[ #]*u.*,/* & */,' >>conftest.defines
25566
25567# Break up conftest.defines:
25568ac_max_sed_lines=50
25569
25570# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25571# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25572# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25573# et cetera.
25574ac_in='$ac_file_inputs'
25575ac_out='"$tmp/out1"'
25576ac_nxt='"$tmp/out2"'
25577
25578while :
503d2be0 25579do
ca81d7a0
JD
25580 # Write a here document:
25581 cat >>$CONFIG_STATUS <<_ACEOF
25582 # First, check the format of the line:
25583 cat >"\$tmp/defines.sed" <<\\CEOF
25584/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25585/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25586b
25587:def
25588_ACEOF
25589 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25590 echo 'CEOF
ca81d7a0
JD
25591 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25592 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25593 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25594 grep . conftest.tail >/dev/null || break
503d2be0
AS
25595 rm -f conftest.defines
25596 mv conftest.tail conftest.defines
25597done
ca81d7a0 25598rm -f conftest.defines conftest.tail
503d2be0 25599
ca81d7a0 25600echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25601cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25602 if test x"$ac_file" != x-; then
ca81d7a0
JD
25603 echo "/* $configure_input */" >"$tmp/config.h"
25604 cat "$ac_result" >>"$tmp/config.h"
25605 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25606 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25607echo "$as_me: $ac_file is unchanged" >&6;}
25608 else
503d2be0 25609 rm -f $ac_file
ca81d7a0 25610 mv "$tmp/config.h" $ac_file
ba4481b5 25611 fi
503d2be0 25612 else
ca81d7a0
JD
25613 echo "/* $configure_input */"
25614 cat "$ac_result"
ba4481b5 25615 fi
ca81d7a0
JD
25616 rm -f "$tmp/out12"
25617 ;;
edfaf76d 25618
ca81d7a0
JD
25619 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25620echo "$as_me: executing $ac_file commands" >&6;}
25621 ;;
25622 esac
ba4481b5 25623
c0d27fcc 25624
ca81d7a0
JD
25625 case $ac_file$ac_mode in
25626 "default":C)
ba4481b5
DL
25627
25628### Make the necessary directories, if they don't exist.
25629for dir in etc lisp ; do
25630 test -d ${dir} || mkdir ${dir}
25631done
25632
25633# Build src/Makefile from ${srcdir}/src/Makefile.c
25634# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25635# This must be done after src/config.h is built, since we rely on that file.
25636
ba4481b5 25637echo creating src/epaths.h
4aa6b955 25638${MAKE-make} epaths-force
ba4481b5 25639
1c203d4c
DL
25640# As of 2000-11-19, newest development versions of GNU cpp preprocess
25641# `..' to `. .' unless invoked with -traditional
25642
d0e9bfd2 25643if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25644 CPPFLAGS="$CPPFLAGS -traditional"
25645fi
25646
ba4481b5
DL
25647echo creating lib-src/Makefile
25648( cd lib-src
25649 rm -f junk.c junk1.c junk2.c
25650 sed -e '/start of cpp stuff/q' \
25651 < Makefile.c > junk1.c
25652 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25653 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25654 < Makefile.c > junk.c
8acdcf6f 25655 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25656 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25657 cat junk1.c junk2.c > Makefile.new
25658 rm -f junk.c junk1.c junk2.c
25659 chmod 444 Makefile.new
25660 mv -f Makefile.new Makefile
25661)
25662
25663echo creating src/Makefile
25664( cd src
25665 rm -f junk.c junk1.c junk2.c
25666 sed -e '/start of cpp stuff/q' \
25667 < Makefile.c > junk1.c
25668 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25669 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25670 < Makefile.c > junk.c
8acdcf6f 25671 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25672 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25673 cat junk1.c junk2.c > Makefile.new
25674 rm -f junk.c junk1.c junk2.c
25675 chmod 444 Makefile.new
25676 mv -f Makefile.new Makefile
25677)
25678
503d2be0 25679if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25680 echo creating src/.gdbinit
503d2be0 25681 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25682fi
25683
503d2be0 25684 ;;
ca81d7a0 25685
503d2be0 25686 esac
ca81d7a0 25687done # for ac_tag
503d2be0 25688
ba4481b5 25689
503d2be0 25690{ (exit 0); exit 0; }
c0d27fcc 25691_ACEOF
ba4481b5 25692chmod +x $CONFIG_STATUS
503d2be0
AS
25693ac_clean_files=$ac_clean_files_save
25694
c0d27fcc 25695
503d2be0
AS
25696# configure is writing to config.log, and then calls config.status.
25697# config.status does its own redirection, appending to config.log.
25698# Unfortunately, on DOS this fails, as config.log is still kept open
25699# by configure, so config.status won't be able to write to it; its
25700# output is simply discarded. So we exec the FD to /dev/null,
25701# effectively closing config.log, so it can be properly (re)opened and
25702# appended to by config.status. When coming back to configure, we
25703# need to make the FD available again.
25704if test "$no_create" != yes; then
25705 ac_cs_success=:
19650fd6
AS
25706 ac_config_status_args=
25707 test "$silent" = yes &&
25708 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25709 exec 5>/dev/null
19650fd6 25710 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25711 exec 5>>config.log
25712 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25713 # would make configure fail if this is the last instruction.
25714 $ac_cs_success || { (exit 1); exit 1; }
25715fi
f5f47add 25716
c0d27fcc 25717